Skip to content

Commit

Permalink
USB: visor: fix initialisation of UX50/TH55 devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 59c6ccd commit cfb8da8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/usb/serial/visor.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ static int treo_attach(struct usb_serial *serial)

static int clie_5_attach(struct usb_serial *serial)
{
struct usb_serial_port *port;
unsigned int pipe;
int j;

dbg("%s", __func__);

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

/* port 0 now uses the modified endpoint Address */
serial->port[0]->bulk_out_endpointAddress =
port = serial->port[0];
port->bulk_out_endpointAddress =
serial->port[1]->bulk_out_endpointAddress;

pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress);
for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j)
port->write_urbs[j]->pipe = pipe;

return 0;
}

Expand Down

0 comments on commit cfb8da8

Please sign in to comment.