Skip to content

Commit cfb8da8

Browse files
jhovoldgregkh
authored andcommitted
USB: visor: fix initialisation of UX50/TH55 devices
Fix regression introduced by commit 214916f (USB: visor: reimplement using generic framework) which broke initialisation of UX50/TH55 devices that used re-mapped bulk-out endpoint addresses. Reported-by: Robert Gadsdon <rgadsdon@bayarea.net> Tested-by: Robert Gadsdon <rgadsdon@bayarea.net> Cc: stable <stable@kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 59c6ccd commit cfb8da8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎drivers/usb/serial/visor.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,10 @@ static int treo_attach(struct usb_serial *serial)
606606

607607
static int clie_5_attach(struct usb_serial *serial)
608608
{
609+
struct usb_serial_port *port;
610+
unsigned int pipe;
611+
int j;
612+
609613
dbg("%s", __func__);
610614

611615
/* TH55 registers 2 ports.
@@ -621,9 +625,14 @@ static int clie_5_attach(struct usb_serial *serial)
621625
return -1;
622626

623627
/* port 0 now uses the modified endpoint Address */
624-
serial->port[0]->bulk_out_endpointAddress =
628+
port = serial->port[0];
629+
port->bulk_out_endpointAddress =
625630
serial->port[1]->bulk_out_endpointAddress;
626631

632+
pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress);
633+
for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j)
634+
port->write_urbs[j]->pipe = pipe;
635+
627636
return 0;
628637
}
629638

0 commit comments

Comments
 (0)