Hi,

Here's a patch against 2.5.1-pre2 that removes the needs_interrupt_in,
needs_bulk_in, and needs_bulk_out items from the usb_serial_device_type
structure as they are not really needed.

thanks,

greg k-h


diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
--- a/drivers/usb/serial/cyberjack.c    Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/cyberjack.c    Tue Nov 27 21:59:38 2001
@@ -79,9 +79,6 @@
 static struct usb_serial_device_type cyberjack_device = {
        name:                   "Reiner SCT Cyberjack USB card reader",
        id_table:               id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
--- a/drivers/usb/serial/digi_acceleport.c      Tue Nov 27 21:59:39 2001
+++ b/drivers/usb/serial/digi_acceleport.c      Tue Nov 27 21:59:39 2001
@@ -500,9 +500,6 @@
 static struct usb_serial_device_type digi_acceleport_2_device = {
        name:                           "Digi USB",
        id_table:                       id_table_2,
-       needs_interrupt_in:             DONT_CARE,
-       needs_bulk_in:                  MUST_HAVE,
-       needs_bulk_out:                 MUST_HAVE,
        num_interrupt_in:               0,
        num_bulk_in:                    4,
        num_bulk_out:                   4,
@@ -526,9 +523,6 @@
 static struct usb_serial_device_type digi_acceleport_4_device = {
        name:                           "Digi USB",
        id_table:                       id_table_4,
-       needs_interrupt_in:             DONT_CARE,
-       needs_bulk_in:                  MUST_HAVE,
-       needs_bulk_out:                 MUST_HAVE,
        num_interrupt_in:               0,
        num_bulk_in:                    5,
        num_bulk_out:                   5,
diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
--- a/drivers/usb/serial/empeg.c        Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/empeg.c        Tue Nov 27 21:59:38 2001
@@ -116,9 +116,6 @@
 static struct usb_serial_device_type empeg_device = {
        name:                   "Empeg",
        id_table:               id_table,
-       needs_interrupt_in:     MUST_HAVE_NOT,  /* must not have an interrupt in 
endpoint */
-       needs_bulk_in:          MUST_HAVE,      /* must have a bulk in endpoint */
-       needs_bulk_out:         MUST_HAVE,      /* must have a bulk out endpoint */
        num_interrupt_in:       0,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c     Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/ftdi_sio.c     Tue Nov 27 21:59:38 2001
@@ -176,9 +176,6 @@
 static struct usb_serial_device_type ftdi_sio_device = {
        name:                   "FTDI SIO",
        id_table:               id_table_sio,
-       needs_interrupt_in:     MUST_HAVE_NOT,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       0,
        num_bulk_in:            1,
        num_bulk_out:           1,
@@ -199,9 +196,6 @@
 static struct usb_serial_device_type ftdi_8U232AM_device = {
        name:                   "FTDI 8U232AM",
        id_table:               id_table_8U232AM,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       0,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h
--- a/drivers/usb/serial/io_tables.h    Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/io_tables.h    Tue Nov 27 21:59:38 2001
@@ -74,9 +74,6 @@
 static struct usb_serial_device_type edgeport_1port_device = {
        name:                   "Edgeport 1 port adapter",
        id_table:               edgeport_1port_id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
@@ -98,9 +95,6 @@
 static struct usb_serial_device_type edgeport_2port_device = {
        name:                   "Edgeport 2 port adapter",
        id_table:               edgeport_2port_id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
@@ -122,9 +116,6 @@
 static struct usb_serial_device_type edgeport_4port_device = {
        name:                   "Edgeport 4 port adapter",
        id_table:               edgeport_4port_id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
@@ -146,9 +137,6 @@
 static struct usb_serial_device_type edgeport_8port_device = {
        name:                   "Edgeport 8 port adapter",
        id_table:               edgeport_8port_id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
--- a/drivers/usb/serial/ir-usb.c       Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/ir-usb.c       Tue Nov 27 21:59:38 2001
@@ -93,9 +93,6 @@
 struct usb_serial_device_type ir_device = {
        name:                   "IR Dongle",
        id_table:               id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h
--- a/drivers/usb/serial/keyspan.h      Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/keyspan.h      Tue Nov 27 21:59:38 2001
@@ -451,9 +451,6 @@
 static struct usb_serial_device_type keyspan_usa18x_pre_device = {
        name:                   "Keyspan USA18X - (without firmware)",
        id_table:               keyspan_usa18x_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -464,9 +461,6 @@
 static struct usb_serial_device_type keyspan_usa19_pre_device = {
        name:                   "Keyspan USA19 - (without firmware)",
        id_table:               keyspan_usa19_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -478,9 +472,6 @@
 static struct usb_serial_device_type keyspan_usa19w_pre_device = {
        name:                   "Keyspan USA19W - (without firmware)",
        id_table:               keyspan_usa19w_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -492,9 +483,6 @@
 static struct usb_serial_device_type keyspan_usa28_pre_device = {
        name:                   "Keyspan USA28 - (without firmware)",
        id_table:               keyspan_usa28_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -505,9 +493,6 @@
 static struct usb_serial_device_type keyspan_usa28x_pre_device = {
        name:                   "Keyspan USA28X - (without firmware)",
        id_table:               keyspan_usa28x_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -518,9 +503,6 @@
 static struct usb_serial_device_type keyspan_usa28xa_pre_device = {
        name:                   "Keyspan USA28XA - (without firmware)",
        id_table:               keyspan_usa28xa_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -531,9 +513,6 @@
 static struct usb_serial_device_type keyspan_usa28xb_pre_device = {
        name:                   "Keyspan USA28XB - (without firmware)",
        id_table:               keyspan_usa28xb_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -544,9 +523,6 @@
 static struct usb_serial_device_type keyspan_usa49w_pre_device = {
        name:                   "Keyspan USA49W - (without firmware)",
        id_table:               keyspan_usa49w_pre_ids,
-       needs_interrupt_in:     DONT_CARE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -557,9 +533,6 @@
 static struct usb_serial_device_type keyspan_usa18x_device = {
        name:                   "Keyspan USA18X",
        id_table:               keyspan_usa18x_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            3,
        num_bulk_out:           4,
@@ -583,9 +556,6 @@
 static struct usb_serial_device_type keyspan_usa19_device = {
        name:                   "Keyspan USA19",
        id_table:               keyspan_usa19_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            3,
        num_bulk_out:           4,
@@ -610,9 +580,6 @@
 static struct usb_serial_device_type keyspan_usa19w_device = {
        name:                   "Keyspan USA19W",
        id_table:               keyspan_usa19w_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            3,
        num_bulk_out:           4,
@@ -637,9 +604,6 @@
 static struct usb_serial_device_type keyspan_usa28_device = {
        name:                   "Keyspan USA28",
        id_table:               keyspan_usa28_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -655,9 +619,6 @@
 static struct usb_serial_device_type keyspan_usa28x_device = {
        name:                   "Keyspan USA28X/XB",
        id_table:               keyspan_usa28x_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -682,9 +643,6 @@
 static struct usb_serial_device_type keyspan_usa28xa_device = {
        name:                   "Keyspan USA28XA",
        id_table:               keyspan_usa28xa_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         DONT_CARE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -709,9 +667,6 @@
 static struct usb_serial_device_type keyspan_usa49w_device = {
        name:                   "Keyspan USA49W",
        id_table:               keyspan_usa49w_ids,
-       needs_interrupt_in:     DONT_CARE,      
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            5,
        num_bulk_out:           5,
diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
--- a/drivers/usb/serial/omninet.c      Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/omninet.c      Tue Nov 27 21:59:38 2001
@@ -90,9 +90,6 @@
 static struct usb_serial_device_type zyxel_omninet_device = {
        name:                   "ZyXEL - omni.net lcd plus usb",
        id_table:               id_table,
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          MUST_HAVE,
-       needs_bulk_out:         MUST_HAVE,
        num_interrupt_in:       1,
        num_bulk_in:            1,
        num_bulk_out:           2,
diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c       Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/pl2303.c       Tue Nov 27 21:59:38 2001
@@ -118,9 +118,6 @@
 static struct usb_serial_device_type pl2303_device = {
        name:                   "PL-2303",
        id_table:               id_table,
-       needs_interrupt_in:     DONT_CARE,              /* this device must have an 
interrupt in endpoint */
-       needs_bulk_in:          MUST_HAVE,              /* this device must have a 
bulk in endpoint */
-       needs_bulk_out:         MUST_HAVE,              /* this device must have a 
bulk out endpoint */
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            1,
        num_bulk_out:           1,
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h   Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/usb-serial.h   Tue Nov 27 21:59:38 2001
@@ -108,13 +108,6 @@
 };
 
 
-#define MUST_HAVE_NOT  0x01
-#define MUST_HAVE      0x02
-#define DONT_CARE      0x03
-
-#define        HAS             0x02
-#define HAS_NOT                0x01
-
 #define NUM_DONT_CARE  (-1)
 
 
@@ -122,9 +115,6 @@
 struct usb_serial_device_type {
        char    *name;
        const struct usb_device_id *id_table;
-       char    needs_interrupt_in;
-       char    needs_bulk_in;
-       char    needs_bulk_out;
        char    num_interrupt_in;
        char    num_bulk_in;
        char    num_bulk_out;
diff -Nru a/drivers/usb/serial/usbserial.c b/drivers/usb/serial/usbserial.c
--- a/drivers/usb/serial/usbserial.c    Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/usbserial.c    Tue Nov 27 21:59:38 2001
@@ -339,9 +339,6 @@
 static struct usb_serial_device_type generic_device = {
        name:                   "Generic",
        id_table:               generic_device_ids,
-       needs_interrupt_in:     DONT_CARE,              /* don't have to have an 
interrupt in endpoint */
-       needs_bulk_in:          DONT_CARE,              /* don't have to have a bulk 
in endpoint */
-       needs_bulk_out:         DONT_CARE,              /* don't have to have a bulk 
out endpoint */
        num_interrupt_in:       NUM_DONT_CARE,
        num_bulk_in:            NUM_DONT_CARE,
        num_bulk_out:           NUM_DONT_CARE,
@@ -1068,9 +1065,6 @@
        int minor;
        int buffer_size;
        int i;
-       char interrupt_pipe;
-       char bulk_in_pipe;
-       char bulk_out_pipe;
        int num_interrupt_in = 0;
        int num_bulk_in = 0;
        int num_bulk_out = 0;
@@ -1097,10 +1091,8 @@
                dbg("none matched");
                return(NULL);
        }
-       
+
        /* descriptor matches, let's find the endpoints needed */
-       interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
-                       
        /* check out the endpoints */
        iface_desc = &interface->altsetting[0];
        for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
@@ -1110,7 +1102,6 @@
                    ((endpoint->bmAttributes & 3) == 0x02)) {
                        /* we found a bulk in endpoint */
                        dbg("found bulk in");
-                       bulk_in_pipe = HAS;
                        bulk_in_endpoint[num_bulk_in] = endpoint;
                        ++num_bulk_in;
                }
@@ -1119,7 +1110,6 @@
                    ((endpoint->bmAttributes & 3) == 0x02)) {
                        /* we found a bulk out endpoint */
                        dbg("found bulk out");
-                       bulk_out_pipe = HAS;
                        bulk_out_endpoint[num_bulk_out] = endpoint;
                        ++num_bulk_out;
                }
@@ -1128,7 +1118,6 @@
                    ((endpoint->bmAttributes & 3) == 0x03)) {
                        /* we found a interrupt in endpoint */
                        dbg("found interrupt in");
-                       interrupt_pipe = HAS;
                        interrupt_in_endpoint[num_interrupt_in] = endpoint;
                        ++num_interrupt_in;
                }
@@ -1151,7 +1140,6 @@
                                    ((endpoint->bmAttributes & 3) == 0x03)) {
                                        /* we found a interrupt in endpoint */
                                        dbg("found interrupt in for Prolific device on 
separate interface");
-                                       interrupt_pipe = HAS;
                                        interrupt_in_endpoint[num_interrupt_in] = 
endpoint;
                                        ++num_interrupt_in;
                                }
@@ -1161,15 +1149,6 @@
        /* END HORRIBLE HACK FOR PL2303 */
 #endif
        
-       /* verify that we found all of the endpoints that we need */
-       if (!((interrupt_pipe & type->needs_interrupt_in) &&
-             (bulk_in_pipe & type->needs_bulk_in) &&
-             (bulk_out_pipe & type->needs_bulk_out))) {
-               /* nope, they don't match what we expected */
-               info("descriptors matched, but endpoints did not");
-               return NULL;
-       }
-
        /* found all that we need */
        info("%s converter detected", type->name);
 

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to