With this patch the Dymo Labelwriter 310/320 usb will be correctly detected by usblp.


Signed-off-by: A.P.Munnikes <[EMAIL PROTECTED]>

--- ./linux-2.6.9.orig/drivers/usb/class/usblp.c 2004-10-18 23:53:37.000000000 +0200
+++ ./linux-2.6.9/drivers/usb/class/usblp.c 2004-11-24 22:13:13.905321649 +0100
@@ -198,6 +198,7 @@


#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_IGNORE_ENDPOINT_TYPE 0x4 /* for Dymo 310/320 */


 static struct quirk_printer_struct quirk_printers[] = {
        { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
@@ -213,6 +214,8 @@
        { 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
        { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
        { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
+       { 0x0922, 0x0010, USBLP_QUIRK_IGNORE_ENDPOINT_TYPE }, /* DYMO 320 */
+       { 0x0922, 0x0009, USBLP_QUIRK_IGNORE_ENDPOINT_TYPE }, /* DYMO 310 */
        { 0, 0 }
 };

@@ -1021,6 +1024,8 @@

                        if ((epd->bmAttributes&USB_ENDPOINT_XFERTYPE_MASK)!=
                            USB_ENDPOINT_XFER_BULK)
+                           if ((usblp->quirks & 
USBLP_QUIRK_IGNORE_ENDPOINT_TYPE)
+                               == 0)
                                continue;

                        if (!(epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK)) {


--- ./linux-2.6.9.orig/drivers/usb/class/usblp.c        2004-10-18 
23:53:37.000000000 +0200
+++ ./linux-2.6.9/drivers/usb/class/usblp.c     2004-11-24 22:13:13.905321649 
+0100
@@ -198,6 +198,7 @@
 
 #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_IGNORE_ENDPOINT_TYPE   0x4 /* for Dymo 310/320  */
 
 static struct quirk_printer_struct quirk_printers[] = {
        { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
@@ -213,6 +214,8 @@
        { 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
        { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
        { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
+       { 0x0922, 0x0010, USBLP_QUIRK_IGNORE_ENDPOINT_TYPE }, /* DYMO 320 */
+       { 0x0922, 0x0009, USBLP_QUIRK_IGNORE_ENDPOINT_TYPE }, /* DYMO 310 */
        { 0, 0 }
 };
 
@@ -1021,6 +1024,8 @@
 
                        if ((epd->bmAttributes&USB_ENDPOINT_XFERTYPE_MASK)!=
                            USB_ENDPOINT_XFER_BULK)
+                           if ((usblp->quirks & 
USBLP_QUIRK_IGNORE_ENDPOINT_TYPE)
+                               == 0)
                                continue;
 
                        if (!(epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK)) {

Reply via email to