|
@@ -2546,6 +2546,13 @@ static int edge_startup(struct usb_serial *serial)
|
|
|
int status;
|
|
|
u16 product_id;
|
|
|
|
|
|
+ /* Make sure we have the required endpoints when in download mode. */
|
|
|
+ if (serial->interface->cur_altsetting->desc.bNumEndpoints > 1) {
|
|
|
+ if (serial->num_bulk_in < serial->num_ports ||
|
|
|
+ serial->num_bulk_out < serial->num_ports)
|
|
|
+ return -ENODEV;
|
|
|
+ }
|
|
|
+
|
|
|
/* create our private serial structure */
|
|
|
edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
|
|
|
if (!edge_serial)
|