From 5b35aa5cd29bb111d847b2a2ed18110acbfb1f44 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 27 Jan 2000 23:45:22 +0000 Subject: Merge with Linux 2.3.24. --- drivers/usb/acm.c | 6 ++-- drivers/usb/cpia.c | 2 +- drivers/usb/ezusb.c | 3 -- drivers/usb/hub.c | 46 ++++++++++++------------ drivers/usb/hub.h | 26 +++++++++++--- drivers/usb/ohci-hcd.c | 93 ++++++++++++++++++++++++++++++++---------------- drivers/usb/ohci-hcd.h | 7 ++-- drivers/usb/uhci.c | 5 ++- drivers/usb/usb-serial.c | 5 ++- 9 files changed, 124 insertions(+), 69 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/acm.c b/drivers/usb/acm.c index 3ecea982e..a47920d00 100644 --- a/drivers/usb/acm.c +++ b/drivers/usb/acm.c @@ -486,8 +486,8 @@ static void acm_disconnect(struct usb_device *dev) if (!acm->present) return; - printk("disconnecting\n"); - + acm->active=0; + acm->present=0; if (acm->writing){ usb_terminate_bulk(acm->dev, acm->writetransfer); acm->writing=0; @@ -498,8 +498,6 @@ static void acm_disconnect(struct usb_device *dev) } usb_release_irq(acm->dev,acm->ctrltransfer, acm->ctrlpipe); //BUG: What to do if a device is open?? Notify process or not allow cleanup? - acm->active=0; - acm->present=0; kfree(acm->writebuffer); kfree(acm->readbuffer); diff --git a/drivers/usb/cpia.c b/drivers/usb/cpia.c index 976ab02da..e6515c710 100644 --- a/drivers/usb/cpia.c +++ b/drivers/usb/cpia.c @@ -52,7 +52,7 @@ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr) ptep = pte_offset(pmd, adr); pte = *ptep; if (pte_present(pte)) - ret = (pte_page(pte) | (adr & (PAGE_SIZE-1))); + ret = page_address(pte_page(pte)) | (adr & (PAGE_SIZE-1)); } } MDEBUG(printk("uv2kva(%lx-->%lx)", adr, ret)); diff --git a/drivers/usb/ezusb.c b/drivers/usb/ezusb.c index 8aabddd17..c64335699 100644 --- a/drivers/usb/ezusb.c +++ b/drivers/usb/ezusb.c @@ -1073,11 +1073,8 @@ void ezusb_cleanup(void) #ifdef MODULE -int minor = 192; - int init_module(void) { - ezusb_misc.minor = minor; return ezusb_init(); } diff --git a/drivers/usb/hub.c b/drivers/usb/hub.c index 59a539867..98c1c540c 100644 --- a/drivers/usb/hub.c +++ b/drivers/usb/hub.c @@ -15,6 +15,7 @@ #include #include +#include #include "usb.h" #include "hub.h" @@ -51,16 +52,16 @@ static int usb_set_port_feature(struct usb_device *dev, int port, int feature) static int usb_get_hub_status(struct usb_device *dev, void *data) { - /* FIXME: Don't hardcode 4 */ return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, data, 4, HZ); + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, + data, sizeof(struct usb_hub_status), HZ); } static int usb_get_port_status(struct usb_device *dev, int port, void *data) { - /* FIXME: Don't hardcode 4 */ return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, data, 4, HZ); + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, + data, sizeof(struct usb_hub_status), HZ); } /* @@ -101,6 +102,7 @@ static int usb_hub_configure(struct usb_hub *hub) unsigned char buffer[4], *bitmap; struct usb_hub_descriptor *descriptor; struct usb_descriptor_header *header; + struct usb_hub_status *hubsts; int i; /* Set it to the first configuration */ @@ -121,7 +123,7 @@ static int usb_hub_configure(struct usb_hub *hub) descriptor = (struct usb_hub_descriptor *)bitmap; hub->nports = dev->maxchild = descriptor->bNbrPorts; - printk(KERN_INFO "hub: %d-port%s detected\n", hub->nports, + printk(KERN_INFO "hub: %d port%s detected\n", hub->nports, (hub->nports == 1) ? "" : "s"); switch (descriptor->wHubCharacteristics & HUB_CHAR_LPSM) { @@ -144,14 +146,14 @@ static int usb_hub_configure(struct usb_hub *hub) switch (descriptor->wHubCharacteristics & HUB_CHAR_OCPM) { case 0x00: - printk(KERN_INFO "hub: global over current protection\n"); + printk(KERN_INFO "hub: global over-current protection\n"); break; case 0x08: - printk(KERN_INFO "hub: individual port over current protection\n"); + printk(KERN_INFO "hub: individual port over-current protection\n"); break; case 0x10: case 0x18: - printk(KERN_INFO "hub: no over current protection\n"); + printk(KERN_INFO "hub: no over-current protection\n"); break; } @@ -171,11 +173,12 @@ static int usb_hub_configure(struct usb_hub *hub) if (usb_get_hub_status(dev, buffer)) return -1; + hubsts = (struct usb_hub_status *)buffer; printk(KERN_INFO "hub: local power source is %s\n", - (buffer[0] & 1) ? "lost (inactive)" : "good"); + (le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good"); - printk(KERN_INFO "hub: %sover current condition exists\n", - (buffer[0] & 2) ? "" : "no "); + printk(KERN_INFO "hub: %sover-current condition exists\n", + (le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_OVERCURRENT) ? "" : "no "); /* Enable power to the ports */ printk(KERN_INFO "hub: enabling power on all ports\n"); @@ -292,7 +295,7 @@ static void hub_disconnect(struct usb_device *dev) static void usb_hub_port_connect_change(struct usb_device *hub, int port) { struct usb_device *usb; - unsigned char buf[4]; + struct usb_port_status portsts; unsigned short portstatus, portchange; /* Disconnect anything that may have been there */ @@ -304,13 +307,13 @@ static void usb_hub_port_connect_change(struct usb_device *hub, int port) wait_ms(50); /* FIXME: This is from the *BSD stack, thanks! :) */ /* Check status */ - if (usb_get_port_status(hub, port + 1, buf)) { + if (usb_get_port_status(hub, port + 1, &portsts)) { printk(KERN_ERR "get_port_status failed\n"); return; } - portstatus = le16_to_cpup((unsigned short *)buf + 0); - portchange = le16_to_cpup((unsigned short *)buf + 1); + portstatus = le16_to_cpu(portsts.wPortStatus); + portchange = le16_to_cpu(portsts.wPortChange); /* If it's not in CONNECT and ENABLE state, we're done */ if ((!(portstatus & USB_PORT_STAT_CONNECTION)) && @@ -373,16 +376,16 @@ static void usb_hub_events(void) spin_unlock_irqrestore(&hub_event_lock, flags); for (i = 0; i < hub->nports; i++) { - unsigned char buf[4]; + struct usb_port_status portsts; unsigned short portstatus, portchange; - if (usb_get_port_status(dev, i + 1, buf)) { + if (usb_get_port_status(dev, i + 1, &portsts)) { printk(KERN_ERR "get_port_status failed\n"); continue; } - portstatus = le16_to_cpup((unsigned short *)buf + 0); - portchange = le16_to_cpup((unsigned short *)buf + 1); + portstatus = le16_to_cpu(portsts.wPortStatus); + portchange = le16_to_cpu(portsts.wPortChange); if (portchange & USB_PORT_STAT_C_CONNECTION) { printk(KERN_INFO "hub: port %d connection change\n", @@ -415,9 +418,8 @@ static void usb_hub_events(void) usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_RESET); } - - } - } + } /* end for i */ + } /* end while (1) */ he_unlock: spin_unlock_irqrestore(&hub_event_lock, flags); diff --git a/drivers/usb/hub.h b/drivers/usb/hub.h index 49c531d30..c95a07d74 100644 --- a/drivers/usb/hub.h +++ b/drivers/usb/hub.h @@ -4,7 +4,7 @@ #include /* - * Hub feature numbers + * Hub Class feature numbers */ #define C_HUB_LOCAL_POWER 0 #define C_HUB_OVER_CURRENT 1 @@ -25,7 +25,12 @@ #define USB_PORT_FEAT_C_OVER_CURRENT 19 #define USB_PORT_FEAT_C_RESET 20 -/* wPortStatus */ +struct usb_port_status { + __u16 wPortStatus; + __u16 wPortChange; +} __attribute__ ((packed)); + +/* wPortStatus bits */ #define USB_PORT_STAT_CONNECTION 0x0001 #define USB_PORT_STAT_ENABLE 0x0002 #define USB_PORT_STAT_SUSPEND 0x0004 @@ -34,7 +39,7 @@ #define USB_PORT_STAT_POWER 0x0100 #define USB_PORT_STAT_LOW_SPEED 0x0200 -/* wPortChange */ +/* wPortChange bits */ #define USB_PORT_STAT_C_CONNECTION 0x0001 #define USB_PORT_STAT_C_ENABLE 0x0002 #define USB_PORT_STAT_C_SUSPEND 0x0004 @@ -46,6 +51,20 @@ #define HUB_CHAR_COMPOUND 0x0004 #define HUB_CHAR_OCPM 0x0018 +struct usb_hub_status { + __u16 wHubStatus; + __u16 wHubChange; +} __attribute__ ((packed)); + +/* + *Hub Status & Hub Change bit masks + */ +#define HUB_STATUS_LOCAL_POWER 0x0001 +#define HUB_STATUS_OVERCURRENT 0x0002 + +#define HUB_CHANGE_LOCAL_POWER 0x0001 +#define HUB_CHANGE_OVERCURRENT 0x0002 + /* Hub descriptor */ struct usb_hub_descriptor { __u8 bLength; @@ -103,4 +122,3 @@ struct usb_hub { }; #endif - diff --git a/drivers/usb/ohci-hcd.c b/drivers/usb/ohci-hcd.c index 3dc6d74ca..3345e12be 100644 --- a/drivers/usb/ohci-hcd.c +++ b/drivers/usb/ohci-hcd.c @@ -14,9 +14,8 @@ * [ Open Host Controller Interface driver for USB. ] * [ (C) Copyright 1999 Linus Torvalds (uhci.c) ] * [ (C) Copyright 1999 Gregory P. Smith ] - * [ _Log: ohci-hcd.c,v _ - * [ Revision 1.1 1999/04/05 08:32:30 greg ] * + * v4.3 1999/10/27 multiple HCs, bulk_request * v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes * v4.1 1999/08/27 Randy Dunlap's - ISO API first impl. * v4.0 1999/08/18 @@ -48,6 +47,7 @@ #include #include #include +#include #include #include @@ -61,6 +61,7 @@ static int handle_apm_event(apm_event_t event); static int apm_resume = 0; #endif +static LIST_HEAD(ohci_hcd_list); static int ohci_link_ed(struct ohci * ohci, struct usb_ohci_ed *ed); static int sohci_kill_isoc (struct usb_isoc_desc *id); @@ -85,10 +86,11 @@ OHCI_DEBUG(printk("******* dev: devnum: %4x, slow: %4x, maxpacketsize: %4x\n",us **** Interface functions ***********************************************/ -static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) +static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) { + struct usb_ohci_ed *ed = td->ed; if(lw0 != NULL) { - if(USB_ST_CRC < 0 && (status == USB_ST_DATAUNDERRUN || status == USB_ST_NOERROR)) + if(0 < 0 && (status == USB_ST_DATAUNDERRUN || status == USB_ST_NOERROR)) ((struct ohci_state * )lw0)->status = data_len; else ((struct ohci_state * )lw0)->status = status; @@ -107,9 +109,9 @@ static int sohci_blocking_handler(void * ohci_in, struct usb_ohci_ed *ed, void * return 0; } -static int sohci_int_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) +static int sohci_int_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) { - + struct usb_ohci_ed *ed = td->ed; struct ohci * ohci = ohci_in; usb_device_irq handler=(void *) lw0; void *dev_id = (void *) lw1; @@ -127,9 +129,30 @@ static int sohci_int_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data return 0; } -static int sohci_iso_handler(void * ohci_in, struct usb_ohci_ed *ed, void * data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) { +static int sohci_ret_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) +{ + struct usb_ohci_ed *ed = td->ed; + struct ohci * ohci = ohci_in; + usb_device_irq handler=(void *) lw0; + void *dev_id = (void *) lw1; + int ret; + + OHCI_DEBUG({ int i; printk("USB HC RET <<<: %x: data(%d):", ed->hwINFO, data_len);) + OHCI_DEBUG( for(i=0; i < data_len; i++ ) printk(" %02x", ((__u8 *) data)[i]);) + OHCI_DEBUG( printk(" ret_status: %x\n", status); }) + + ret = handler(status, data, data_len, dev_id); + if(ret == 0) return 0; /* 0 .. do not requeue */ + if(status > 0) return -1; /* error occured do not requeue ? */ + ohci_trans_req(ohci, ed, 0, NULL, data, dlen, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, td->type & 0x7, sohci_ret_handler); /* requeue int request */ + + return 0; +} + +static int sohci_iso_handler(void * ohci_in, struct usb_ohci_td *td, void * data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1) { // struct ohci * ohci = ohci_in; + struct usb_ohci_ed *ed = td->ed; unsigned int ix = (unsigned int) lw0; struct usb_isoc_desc * id = (struct usb_isoc_desc *) lw1; struct usb_ohci_td **tdp = id->td; @@ -311,7 +334,7 @@ static void * sohci_request_bulk(struct usb_device *usb_dev, unsigned int pipe, OHCI_DEBUG( printk("USB HC BULK_RQ>>>: %x \n", ed->hwINFO);) - ohci_trans_req(ohci, ed, 0, NULL, data, len, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, (usb_pipeout(pipe))?BULK_OUT:BULK_IN, sohci_int_handler); + ohci_trans_req(ohci, ed, 0, NULL, data, len, (__OHCI_BAG) handler, (__OHCI_BAG) dev_id, (usb_pipeout(pipe))?BULK_OUT:BULK_IN, sohci_ret_handler); if (ED_STATE(ed) != ED_OPER) ohci_link_ed(ohci, ed); return ed; @@ -482,7 +505,7 @@ static int sohci_kill_isoc(struct usb_isoc_desc *id) { struct usb_ohci_ed *ed = NULL; struct usb_ohci_td **td = id->td; int i; -printk("KILL_ISOC***:\n"); + for (i = 0; i < id->frame_count; i++) { if(td[i]) { td[i]->type |= DEL; @@ -490,22 +513,17 @@ printk("KILL_ISOC***:\n"); } } if(ed) usb_ohci_rm_ep(id->usb_dev, ed, NULL, NULL, NULL, TD_RM); -printk(": end KILL_ISOC***: %p\n", ed); + id->start_frame = -1; return 0; } static void sohci_free_isoc(struct usb_isoc_desc *id) { -printk("FREE_ISOC***\n"); -wait_ms(2000); + if(id->start_frame >= 0) sohci_kill_isoc(id); -printk("FREE_ISOC2***\n"); -wait_ms(2000); kfree(id->td); kfree(id); -printk("FREE_ISOC3***\n"); -wait_ms(2000); } struct usb_operations sohci_device_operations = { @@ -772,17 +790,14 @@ struct usb_ohci_ed *usb_ohci_add_ep(struct usb_device * usb_dev, struct usb_hcd_ // struct ohci * ohci = usb_dev->bus->hcpriv; struct usb_ohci_td * td; - struct usb_ohci_ed * ed, *ed1; + struct usb_ohci_ed * ed; - int ed_state, ed_state1; + int ed_state; spin_lock(&usb_ed_lock); ed = ohci_find_ep(usb_dev, hcd_ed); - - ed1 = ((void *) ed) + 0x40; ed_state1 = ED_STATE(ed1); -OHCI_DEBUG(printk("++++ USB HC add 60 ed1 %x: %x :state: %x\n", ed1->hwINFO, (unsigned int ) ed1, ed_state1); ) ed_state = ED_STATE(ed); /* store state of ed */ OHCI_DEBUG(printk("USB HC add ed %x: %x :state: %x\n", ed->hwINFO, (unsigned int ) ed, ed_state); ) if (ed_state == ED_NEW) { @@ -1139,7 +1154,8 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list) struct usb_ohci_td * td_list_next = NULL; int cc; - int i; + int i; + int dlen = 0; while(td_list) { td_list_next = td_list->next_dl_td; @@ -1156,8 +1172,9 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list) } else { if(td_list->hwBE != 0) { + dlen = (bus_to_virt(td_list->hwBE) - td_list->buffer_start + 1); if(td_list->hwCBP == 0) - td_list->ed->len += (bus_to_virt(td_list->hwBE) - td_list->buffer_start + 1); + td_list->ed->len += dlen; else td_list->ed->len += (bus_to_virt(td_list->hwCBP) - td_list->buffer_start); } @@ -1170,9 +1187,10 @@ static int usb_ohci_done_list(struct ohci * ohci, struct usb_ohci_td * td_list) if((td_list->type & SEND) && (ED_STATE(td_list->ed) != ED_STOP) && (td_list->handler)) { /* send the reply */ td_list->handler((void *) ohci, - td_list->ed, + td_list, td_list->ed->buffer_start, td_list->ed->len, + dlen, cc, td_list->lw0, td_list->lw1); @@ -1227,7 +1245,7 @@ void reset_hc(struct ohci *ohci) { udelay(1); } } -static struct ohci *__ohci; + /* * Start an OHCI controller, set the BUS operational @@ -1353,7 +1371,7 @@ static struct ohci *alloc_ohci(void* mem_base) ohci->irq = -1; ohci->regs = mem_base; ohci->hc_area = hc_area; - __ohci = ohci; + /* * for load ballancing of the interrupt branches */ @@ -1395,7 +1413,7 @@ static void release_ohci(struct ohci *ohci) /* disconnect all devices */ if(ohci->bus->root_hub) usb_disconnect(&ohci->bus->root_hub); - reset_hc(__ohci); + reset_hc(ohci); writel(OHCI_USB_RESET, &ohci->regs->control); wait_ms(10); @@ -1428,6 +1446,9 @@ static int found_ohci(int irq, void* mem_base) return -ENOMEM; } + INIT_LIST_HEAD(&ohci->ohci_hcd_list); + list_add(&ohci->ohci_hcd_list, &ohci_hcd_list); + reset_hc(ohci); writel(OHCI_USB_RESET, &ohci->regs->control); wait_ms(10); @@ -1438,6 +1459,7 @@ static int found_ohci(int irq, void* mem_base) start_hc(ohci); return 0; } + printk(KERN_ERR "USB HC (ohci-hcd): request interrupt %d failed\n", irq); release_ohci(ohci); return -EBUSY; } @@ -1445,7 +1467,8 @@ static int found_ohci(int irq, void* mem_base) static int start_ohci(struct pci_dev *dev) { unsigned int mem_base = dev->resource[0].start; - + + pci_set_master(dev); mem_base = (unsigned int) ioremap_nocache(mem_base, 4096); if (!mem_base) { @@ -1488,17 +1511,18 @@ static int handle_apm_event(apm_event_t event) int ohci_hcd_init(void) { + int ret = -ENODEV; struct pci_dev *dev = NULL; while((dev = pci_find_class(PCI_CLASS_SERIAL_USB_OHCI, dev))) { - if (start_ohci(dev) < 0) return -ENODEV; + if (start_ohci(dev) >= 0) ret = 0; } #ifdef CONFIG_APM apm_register_callback(&handle_apm_event); #endif - return 0; + return ret; } #ifdef MODULE @@ -1509,10 +1533,17 @@ int init_module(void) void cleanup_module(void) { + struct ohci *ohci; + # ifdef CONFIG_APM apm_unregister_callback(&handle_apm_event); # endif - release_ohci(__ohci); + while(!list_empty(&ohci_hcd_list)) { + ohci = list_entry(ohci_hcd_list.next, struct ohci, ohci_hcd_list); + list_del(ohci->ohci_hcd_list); + INIT_LIST_HEAD(ohci->ohci_hcd_list); + release_ohci(ohci); + } } #endif //MODULE diff --git a/drivers/usb/ohci-hcd.h b/drivers/usb/ohci-hcd.h index 3ff3ae91d..722bbeaea 100644 --- a/drivers/usb/ohci-hcd.h +++ b/drivers/usb/ohci-hcd.h @@ -48,10 +48,11 @@ #include #include struct usb_ohci_ed; +struct usb_ohci_td; /* for ED and TD structures */ typedef void * __OHCI_BAG; -typedef int (*f_handler )(void * ohci, struct usb_ohci_ed *ed, void *data, int data_len, int status, __OHCI_BAG lw0, __OHCI_BAG lw1); +typedef int (*f_handler )(void * ohci, struct usb_ohci_td *td, void *data, int data_len, int dlen, int status, __OHCI_BAG lw0, __OHCI_BAG lw1); @@ -309,7 +310,9 @@ struct ohci { int irq; struct ohci_regs *regs; /* OHCI controller's memory */ struct ohci_hc_area *hc_area; /* hcca, int ed-tree, ohci itself .. */ - + + struct list_head ohci_hcd_list; /* list of all ohci_hcd */ + int ohci_int_load[32]; /* load of the 32 Interrupt Chains (for load ballancing)*/ struct usb_ohci_ed * ed_rm_list; /* list of all endpoints to be removed */ struct usb_ohci_ed * ed_bulktail; /* last endpoint of bulk list */ diff --git a/drivers/usb/uhci.c b/drivers/usb/uhci.c index 20be3faab..25b2b303c 100644 --- a/drivers/usb/uhci.c +++ b/drivers/usb/uhci.c @@ -154,7 +154,10 @@ static int uhci_td_result(struct uhci_device *dev, struct uhci_td *td, unsigned actlength = uhci_actual_length(tmp->status); if (rval) *rval += actlength; - if (explength != actlength) { + /* This check is bogus, at least for acm. It + always expects 64, but gets as many bytes + as available (typically 1) -- pavel */ + if (0 && (explength != actlength)) { /* Reset the data toggle on error. */ if (debug || uhci_debug) printk(KERN_DEBUG "Set toggle from %p rval %ld%c for status=%x to %d, exp=%d, act=%d\n", diff --git a/drivers/usb/usb-serial.c b/drivers/usb/usb-serial.c index b85f2b5c6..6eb2d6455 100644 --- a/drivers/usb/usb-serial.c +++ b/drivers/usb/usb-serial.c @@ -11,6 +11,9 @@ * vendor and device ids for that device. * * + * version 0.1.2 (10/25/99) gkh + * Fixed bug in detecting device. + * * version 0.1.1 (10/05/99) gkh * Changed the major number to not conflict with anything else. * @@ -528,7 +531,7 @@ static int usb_serial_probe(struct usb_device *dev) serial->interrupt_in_interval = endpoint->bInterval; /* serial->interrupt_in_pipe = usb_rcvbulkpipe (dev, serial->bulk_in_endpoint); */ serial->interrupt_in_buffer = kmalloc (serial->bulk_in_size, GFP_KERNEL); - if (!serial->bulk_in_buffer) { + if (!serial->interrupt_in_buffer) { printk("USB Serial: Couldn't allocate interrupt_in_buffer\n"); goto probe_error; } -- cgit v1.2.3