Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ec71db59ac07eeac89a54b35a90c181bbd3c445
Commit:     5ec71db59ac07eeac89a54b35a90c181bbd3c445
Parent:     e5740b5d75af4ad9423911fe77d687f47e880a4d
Author:     Alan Stern <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 16 15:53:07 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Mon Mar 19 13:22:18 2007 -0700

    usblp: quirk flag and device entry for Seiko Epson M129C printer
    
    This patch (as872) adds a device table entry and a new quirk flag to
    the usblp driver for the Seiko Epson Receipt printer.  This printer
    returns Vendor-Specific values for bInterfaceClass and
    bInterfaceSubClass, but the bInterfaceProtocol value is valid and it
    works with usblp.  The new quirks flag tells the driver to ignore the
    Class and SubClass values in the interface descriptor.
    
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Cc: Vojtech Pavlik <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/class/usblp.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 63e50a1..6584cf0 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -202,6 +202,7 @@ struct quirk_printer_struct {
 
 #define USBLP_QUIRK_BIDIR      0x1     /* reports bidir but requires 
unidirectional mode (no INs/reads) */
 #define USBLP_QUIRK_USB_INIT   0x2     /* needs vendor USB init string */
+#define USBLP_QUIRK_BAD_CLASS  0x4     /* descriptor uses vendor-specific 
Class or SubClass */
 
 static const struct quirk_printer_struct quirk_printers[] = {
        { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
@@ -218,6 +219,7 @@ static const struct quirk_printer_struct quirk_printers[] = 
{
        { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
        { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
        { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut 
<[EMAIL PROTECTED]> */
+       { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt 
Printer M129C */
        { 0, 0 }
 };
 
@@ -1048,7 +1050,8 @@ static int usblp_select_alts(struct usblp *usblp)
                ifd = &if_alt->altsetting[i];
 
                if (ifd->desc.bInterfaceClass != 7 || 
ifd->desc.bInterfaceSubClass != 1)
-                       continue;
+                       if (!(usblp->quirks & USBLP_QUIRK_BAD_CLASS))
+                               continue;
 
                if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
                    ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL)
@@ -1232,6 +1235,7 @@ static struct usb_device_id usblp_ids [] = {
        { USB_INTERFACE_INFO(7, 1, 1) },
        { USB_INTERFACE_INFO(7, 1, 2) },
        { USB_INTERFACE_INFO(7, 1, 3) },
+       { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */
        { }                                             /* Terminating entry */
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to