diff options
Diffstat (limited to 'drivers/usb/class')
| -rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 | ||||
| -rw-r--r-- | drivers/usb/class/usblp.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d38a25f36ea5..31ae661e586a 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
| @@ -332,9 +332,9 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
| 332 | if (!ACM_READY(acm)) | 332 | if (!ACM_READY(acm)) |
| 333 | return; | 333 | return; |
| 334 | 334 | ||
| 335 | spin_lock(&acm->throttle_lock); | 335 | spin_lock_irqsave(&acm->throttle_lock, flags); |
| 336 | throttled = acm->throttle; | 336 | throttled = acm->throttle; |
| 337 | spin_unlock(&acm->throttle_lock); | 337 | spin_unlock_irqrestore(&acm->throttle_lock, flags); |
| 338 | if (throttled) | 338 | if (throttled) |
| 339 | return; | 339 | return; |
| 340 | 340 | ||
| @@ -352,9 +352,9 @@ next_buffer: | |||
| 352 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); | 352 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); |
| 353 | 353 | ||
| 354 | tty_buffer_request_room(tty, buf->size); | 354 | tty_buffer_request_room(tty, buf->size); |
| 355 | spin_lock(&acm->throttle_lock); | 355 | spin_lock_irqsave(&acm->throttle_lock, flags); |
| 356 | throttled = acm->throttle; | 356 | throttled = acm->throttle; |
| 357 | spin_unlock(&acm->throttle_lock); | 357 | spin_unlock_irqrestore(&acm->throttle_lock, flags); |
| 358 | if (!throttled) | 358 | if (!throttled) |
| 359 | tty_insert_flip_string(tty, buf->base, buf->size); | 359 | tty_insert_flip_string(tty, buf->base, buf->size); |
| 360 | tty_flip_buffer_push(tty); | 360 | tty_flip_buffer_push(tty); |
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 63e50a1f1396..6584cf00f7f3 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
| @@ -202,6 +202,7 @@ struct quirk_printer_struct { | |||
| 202 | 202 | ||
| 203 | #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ | 203 | #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ |
| 204 | #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ | 204 | #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ |
| 205 | #define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific Class or SubClass */ | ||
| 205 | 206 | ||
| 206 | static const struct quirk_printer_struct quirk_printers[] = { | 207 | static const struct quirk_printer_struct quirk_printers[] = { |
| 207 | { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ | 208 | { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ |
| @@ -218,6 +219,7 @@ static const struct quirk_printer_struct quirk_printers[] = { | |||
| 218 | { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */ | 219 | { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */ |
| 219 | { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */ | 220 | { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */ |
| 220 | { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */ | 221 | { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */ |
| 222 | { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */ | ||
| 221 | { 0, 0 } | 223 | { 0, 0 } |
| 222 | }; | 224 | }; |
| 223 | 225 | ||
| @@ -1048,7 +1050,8 @@ static int usblp_select_alts(struct usblp *usblp) | |||
| 1048 | ifd = &if_alt->altsetting[i]; | 1050 | ifd = &if_alt->altsetting[i]; |
| 1049 | 1051 | ||
| 1050 | if (ifd->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1) | 1052 | if (ifd->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1) |
| 1051 | continue; | 1053 | if (!(usblp->quirks & USBLP_QUIRK_BAD_CLASS)) |
| 1054 | continue; | ||
| 1052 | 1055 | ||
| 1053 | if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL || | 1056 | if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL || |
| 1054 | ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL) | 1057 | ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL) |
| @@ -1232,6 +1235,7 @@ static struct usb_device_id usblp_ids [] = { | |||
| 1232 | { USB_INTERFACE_INFO(7, 1, 1) }, | 1235 | { USB_INTERFACE_INFO(7, 1, 1) }, |
| 1233 | { USB_INTERFACE_INFO(7, 1, 2) }, | 1236 | { USB_INTERFACE_INFO(7, 1, 2) }, |
| 1234 | { USB_INTERFACE_INFO(7, 1, 3) }, | 1237 | { USB_INTERFACE_INFO(7, 1, 3) }, |
| 1238 | { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */ | ||
| 1235 | { } /* Terminating entry */ | 1239 | { } /* Terminating entry */ |
| 1236 | }; | 1240 | }; |
| 1237 | 1241 | ||
