aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-01 12:17:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-01 12:17:50 -0400
commitb52e111363e366202386f3e67f71681dbbb8e5d9 (patch)
treee3b975bf8c152f19b185e61ebee5a0013ff9efb5 /drivers/usb
parente8bbd5c42b65b662756d67290a5c4dcda1abc596 (diff)
Revert "pl2303: improve the chip type information output on startup"
This reverts commit a77a8c23e4db9fb1f776147eda0d85117359c700. Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as they cause regressions on some versions of the chip. This will all be revisited for later kernel versions when we can figure out how to handle this in a way that does not break working devices. Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/pl2303.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 409000a836dd..7efb39cd6f74 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -177,7 +177,6 @@ static int pl2303_startup(struct usb_serial *serial)
177{ 177{
178 struct pl2303_serial_private *spriv; 178 struct pl2303_serial_private *spriv;
179 enum pl2303_type type = type_0; 179 enum pl2303_type type = type_0;
180 char *type_str = "unknown (treating as type_0)";
181 unsigned char *buf; 180 unsigned char *buf;
182 181
183 spriv = kzalloc(sizeof(*spriv), GFP_KERNEL); 182 spriv = kzalloc(sizeof(*spriv), GFP_KERNEL);
@@ -190,18 +189,14 @@ static int pl2303_startup(struct usb_serial *serial)
190 return -ENOMEM; 189 return -ENOMEM;
191 } 190 }
192 191
193 if (serial->dev->descriptor.bDeviceClass == 0x02) { 192 if (serial->dev->descriptor.bDeviceClass == 0x02)
194 type = type_0; 193 type = type_0;
195 type_str = "type_0"; 194 else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
196 } else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40) {
197 type = HX; 195 type = HX;
198 type_str = "X/HX"; 196 else if (serial->dev->descriptor.bDeviceClass == 0x00
199 } else if (serial->dev->descriptor.bDeviceClass == 0x00 197 || serial->dev->descriptor.bDeviceClass == 0xFF)
200 || serial->dev->descriptor.bDeviceClass == 0xFF) {
201 type = type_1; 198 type = type_1;
202 type_str = "type_1"; 199 dev_dbg(&serial->interface->dev, "device type: %d\n", type);
203 }
204 dev_dbg(&serial->interface->dev, "device type: %s\n", type_str);
205 200
206 spriv->type = type; 201 spriv->type = type;
207 usb_set_serial_data(serial, spriv); 202 usb_set_serial_data(serial, spriv);