diff -Nru a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c Wed Feb 4 17:17:31 2004 +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c Wed Feb 4 17:17:31 2004 @@ -204,12 +204,23 @@ int *result_length, u8 cmd_result[]) { int result, actual_len, i; - u8 b[COMMAND_PACKET_SIZE + 4]; - u8 c[COMMAND_PACKET_SIZE + 4]; + u8 *b; + u8 *c; + + b = kmalloc(COMMAND_PACKET_SIZE + 4, GFP_KERNEL); + if (!b) + return -ENOMEM; + c = kmalloc(COMMAND_PACKET_SIZE + 4, GFP_KERNEL); + if (!c) { + kfree(b); + return -ENOMEM; + } dprintk("%s\n", __FUNCTION__); if ((result = down_interruptible(&dec->usb_sem))) { + kfree(b); + kfree(c); printk("%s: Failed to down usb semaphore.\n", __FUNCTION__); return result; } @@ -230,22 +241,26 @@ } result = usb_bulk_msg(dec->udev, dec->command_pipe, b, - sizeof(b), &actual_len, HZ); + COMMAND_PACKET_SIZE + 4, &actual_len, HZ); if (result) { printk("%s: command bulk message failed: error %d\n", __FUNCTION__, result); up(&dec->usb_sem); + kfree(b); + kfree(c); return result; } result = usb_bulk_msg(dec->udev, dec->result_pipe, c, - sizeof(c), &actual_len, HZ); + COMMAND_PACKET_SIZE + 4, &actual_len, HZ); if (result) { printk("%s: result bulk message failed: error %d\n", __FUNCTION__, result); up(&dec->usb_sem); + kfree(b); + kfree(c); return result; } else { if (debug) { @@ -262,6 +277,8 @@ up(&dec->usb_sem); + kfree(b); + kfree(c); return 0; } } diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/class/cdc-acm.c Wed Feb 4 17:17:31 2004 @@ -399,6 +399,7 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) { struct acm *acm = tty->driver_data; + int stat; if (!ACM_READY(acm)) return -EINVAL; @@ -418,8 +419,12 @@ acm->writeurb->transfer_buffer_length = count; acm->writeurb->dev = acm->dev; - if (usb_submit_urb(acm->writeurb, GFP_KERNEL)) + /* GFP_KERNEL probably works if from_user */ + stat = usb_submit_urb(acm->writeurb, GFP_ATOMIC); + if (stat < 0) { dbg("usb_submit_urb(write bulk) failed"); + return stat; + } return count; } diff -Nru a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile --- a/drivers/usb/core/Makefile Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/core/Makefile Wed Feb 4 17:17:31 2004 @@ -2,7 +2,7 @@ # Makefile for USB Core files and filesystem # -usbcore-objs := usb.o usb-debug.o hub.o hcd.o urb.o message.o \ +usbcore-objs := usb.o hub.o hcd.o urb.o message.o \ config.o file.o buffer.o driverfs.o ifeq ($(CONFIG_PCI),y) diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/core/hcd.c Wed Feb 4 17:17:31 2004 @@ -34,7 +34,10 @@ #include #include #include /* for UTS_SYSNAME */ -#include /* for hcd->pdev and dma addressing */ +#include +#include +#include +#include #include #include @@ -1474,16 +1477,16 @@ if (hcd->controller->dma_mask) { if (usb_pipecontrol (urb->pipe) && !(urb->transfer_flags & URB_NO_SETUP_DMA_MAP)) - pci_unmap_single (hcd->pdev, urb->setup_dma, + dma_unmap_single (hcd->controller, urb->setup_dma, sizeof (struct usb_ctrlrequest), - PCI_DMA_TODEVICE); + DMA_TO_DEVICE); if (urb->transfer_buffer_length != 0 && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) - pci_unmap_single (hcd->pdev, urb->transfer_dma, + dma_unmap_single (hcd->controller, urb->transfer_dma, urb->transfer_buffer_length, usb_pipein (urb->pipe) - ? PCI_DMA_FROMDEVICE - : PCI_DMA_TODEVICE); + ? DMA_FROM_DEVICE + : DMA_TO_DEVICE); } /* pass ownership to the completion handler */ @@ -1513,7 +1516,9 @@ return IRQ_NONE; hcd->saw_irq = 1; - hcd->driver->irq (hcd, r); + if (hcd->driver->irq (hcd, r) == IRQ_NONE) + return IRQ_NONE; + if (hcd->state != start && hcd->state == USB_STATE_HALT) usb_hc_died (hcd); return IRQ_HANDLED; diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/core/hcd.h Wed Feb 4 17:17:31 2004 @@ -163,7 +163,7 @@ const char *description; /* "ehci-hcd" etc */ /* irq handler */ - void (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); + irqreturn_t (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); int flags; #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/core/hub.c Wed Feb 4 17:17:31 2004 @@ -179,7 +179,7 @@ hub_clear_tt_buffer (struct usb_device *hub, u16 devinfo, u16 tt) { return usb_control_msg (hub, usb_rcvctrlpipe (hub, 0), - HUB_CLEAR_TT_BUFFER, USB_DIR_IN | USB_RECIP_OTHER, + HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo, tt, 0, 0, HZ); } diff -Nru a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c --- a/drivers/usb/core/usb-debug.c Wed Feb 4 17:17:31 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,201 +0,0 @@ -/* - * debug.c - USB debug helper routines. - * - * I just want these out of the way where they aren't in your - * face, but so that you can still use them.. - */ -#include -#include -#include -#include -#ifdef CONFIG_USB_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif -#include - -static void usb_show_endpoint(struct usb_host_endpoint *endpoint) -{ - usb_show_endpoint_descriptor(&endpoint->desc); -} - -static void usb_show_interface(struct usb_host_interface *altsetting) -{ - int i; - - usb_show_interface_descriptor(&altsetting->desc); - - for (i = 0; i < altsetting->desc.bNumEndpoints; i++) - usb_show_endpoint(altsetting->endpoint + i); -} - -static void usb_show_config(struct usb_host_config *config) -{ - int i, j; - struct usb_interface *ifp; - - usb_show_config_descriptor(&config->desc); - for (i = 0; i < config->desc.bNumInterfaces; i++) { - ifp = config->interface[i]; - - if (!ifp) - break; - - printk("\n Interface: %d\n", i); - for (j = 0; j < ifp->num_altsetting; j++) - usb_show_interface(ifp->altsetting + j); - } -} - -void usb_show_device(struct usb_device *dev) -{ - int i; - - usb_show_device_descriptor(&dev->descriptor); - for (i = 0; i < dev->descriptor.bNumConfigurations; i++) - usb_show_config(dev->config + i); -} - -/* - * Parse and show the different USB descriptors. - */ -void usb_show_device_descriptor(struct usb_device_descriptor *desc) -{ - if (!desc) - { - printk("Invalid USB device descriptor (NULL POINTER)\n"); - return; - } - printk(" Length = %2d%s\n", desc->bLength, - desc->bLength == USB_DT_DEVICE_SIZE ? "" : " (!!!)"); - printk(" DescriptorType = %02x\n", desc->bDescriptorType); - - printk(" USB version = %x.%02x\n", - desc->bcdUSB >> 8, desc->bcdUSB & 0xff); - printk(" Vendor:Product = %04x:%04x\n", - desc->idVendor, desc->idProduct); - printk(" MaxPacketSize0 = %d\n", desc->bMaxPacketSize0); - printk(" NumConfigurations = %d\n", desc->bNumConfigurations); - printk(" Device version = %x.%02x\n", - desc->bcdDevice >> 8, desc->bcdDevice & 0xff); - - printk(" Device Class:SubClass:Protocol = %02x:%02x:%02x\n", - desc->bDeviceClass, desc->bDeviceSubClass, desc->bDeviceProtocol); - switch (desc->bDeviceClass) { - case 0: - printk(" Per-interface classes\n"); - break; - case USB_CLASS_AUDIO: - printk(" Audio device class\n"); - break; - case USB_CLASS_COMM: - printk(" Communications class\n"); - break; - case USB_CLASS_HID: - printk(" Human Interface Devices class\n"); - break; - case USB_CLASS_PRINTER: - printk(" Printer device class\n"); - break; - case USB_CLASS_MASS_STORAGE: - printk(" Mass Storage device class\n"); - break; - case USB_CLASS_HUB: - printk(" Hub device class\n"); - break; - case USB_CLASS_VENDOR_SPEC: - printk(" Vendor class\n"); - break; - default: - printk(" Unknown class\n"); - } -} - -void usb_show_config_descriptor(struct usb_config_descriptor *desc) -{ - printk("Configuration:\n"); - printk(" bLength = %4d%s\n", desc->bLength, - desc->bLength == USB_DT_CONFIG_SIZE ? "" : " (!!!)"); - printk(" bDescriptorType = %02x\n", desc->bDescriptorType); - printk(" wTotalLength = %04x\n", desc->wTotalLength); - printk(" bNumInterfaces = %02x\n", desc->bNumInterfaces); - printk(" bConfigurationValue = %02x\n", desc->bConfigurationValue); - printk(" iConfiguration = %02x\n", desc->iConfiguration); - printk(" bmAttributes = %02x\n", desc->bmAttributes); - printk(" bMaxPower = %4dmA\n", desc->bMaxPower * 2); -} - -void usb_show_interface_descriptor(struct usb_interface_descriptor *desc) -{ - printk(" Alternate Setting: %2d\n", desc->bAlternateSetting); - printk(" bLength = %4d%s\n", desc->bLength, - desc->bLength == USB_DT_INTERFACE_SIZE ? "" : " (!!!)"); - printk(" bDescriptorType = %02x\n", desc->bDescriptorType); - printk(" bInterfaceNumber = %02x\n", desc->bInterfaceNumber); - printk(" bAlternateSetting = %02x\n", desc->bAlternateSetting); - printk(" bNumEndpoints = %02x\n", desc->bNumEndpoints); - printk(" bInterface Class:SubClass:Protocol = %02x:%02x:%02x\n", - desc->bInterfaceClass, desc->bInterfaceSubClass, desc->bInterfaceProtocol); - printk(" iInterface = %02x\n", desc->iInterface); -} - -void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *desc) -{ - char *LengthCommentString = (desc->bLength == - USB_DT_ENDPOINT_AUDIO_SIZE) ? " (Audio)" : (desc->bLength == - USB_DT_ENDPOINT_SIZE) ? "" : " (!!!)"; - char *EndpointType[4] = { "Control", "Isochronous", "Bulk", "Interrupt" }; - - printk(" Endpoint:\n"); - printk(" bLength = %4d%s\n", - desc->bLength, LengthCommentString); - printk(" bDescriptorType = %02x\n", desc->bDescriptorType); - printk(" bEndpointAddress = %02x (%s)\n", desc->bEndpointAddress, - (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_CONTROL ? "i/o" : - (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? "in" : "out"); - printk(" bmAttributes = %02x (%s)\n", desc->bmAttributes, - EndpointType[USB_ENDPOINT_XFERTYPE_MASK & desc->bmAttributes]); - printk(" wMaxPacketSize = %04x\n", desc->wMaxPacketSize); - printk(" bInterval = %02x\n", desc->bInterval); - - /* Audio extensions to the endpoint descriptor */ - if (desc->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) { - printk(" bRefresh = %02x\n", desc->bRefresh); - printk(" bSynchAddress = %02x\n", desc->bSynchAddress); - } -} - -void usb_show_string(struct usb_device *dev, char *id, int index) -{ - char *buf; - - if (!index) - return; - if (!(buf = kmalloc(256, GFP_KERNEL))) - return; - if (usb_string(dev, index, buf, 256) > 0) - dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf); - kfree(buf); -} - -void usb_dump_urb (struct urb *urb) -{ - printk ("urb :%p\n", urb); - printk ("dev :%p\n", urb->dev); - printk ("pipe :%08X\n", urb->pipe); - printk ("status :%d\n", urb->status); - printk ("transfer_flags :%08X\n", urb->transfer_flags); - printk ("transfer_buffer :%p\n", urb->transfer_buffer); - printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length); - printk ("actual_length :%d\n", urb->actual_length); - printk ("setup_packet :%p\n", urb->setup_packet); - printk ("start_frame :%d\n", urb->start_frame); - printk ("number_of_packets :%d\n", urb->number_of_packets); - printk ("interval :%d\n", urb->interval); - printk ("error_count :%d\n", urb->error_count); - printk ("context :%p\n", urb->context); - printk ("complete :%p\n", urb->complete); -} - diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/core/usb.c Wed Feb 4 17:17:31 2004 @@ -984,6 +984,19 @@ return retval; } +static inline void usb_show_string(struct usb_device *dev, char *id, int index) +{ + char *buf; + + if (!index) + return; + if (!(buf = kmalloc(256, GFP_KERNEL))) + return; + if (usb_string(dev, index, buf, 256) > 0) + dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf); + kfree(buf); +} + /* * By the time we get here, we chose a new device address * and is in the default state. We need to identify the thing and diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c --- a/drivers/usb/gadget/file_storage.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/gadget/file_storage.c Wed Feb 4 17:17:31 2004 @@ -1,7 +1,7 @@ /* * file_storage.c -- File-backed USB Storage Gadget, for USB development * - * Copyright (C) 2003 Alan Stern + * Copyright (C) 2003, 2004 Alan Stern * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -244,7 +244,7 @@ #define DRIVER_DESC "File-backed Storage Gadget" #define DRIVER_NAME "g_file_storage" -#define DRIVER_VERSION "14 January 2004" +#define DRIVER_VERSION "26 January 2004" static const char longname[] = DRIVER_DESC; static const char shortname[] = DRIVER_NAME; @@ -435,7 +435,7 @@ #define LDBG(lun,fmt,args...) \ yprintk(lun , KERN_DEBUG , fmt , ## args) #define MDBG(fmt,args...) \ - printk(KERN_DEBUG DRIVER_NAME ": " fmt, ## args) + printk(KERN_DEBUG DRIVER_NAME ": " fmt , ## args) #else #define DBG(fsg,fmt,args...) \ do { } while (0) @@ -473,7 +473,7 @@ yprintk(lun , KERN_INFO , fmt , ## args) #define MINFO(fmt,args...) \ - printk(KERN_INFO DRIVER_NAME ": " fmt, ## args) + printk(KERN_INFO DRIVER_NAME ": " fmt , ## args) /*-------------------------------------------------------------------------*/ @@ -848,6 +848,7 @@ unsigned int nluns; struct lun *luns; struct lun *curlun; + struct completion lun_released; }; typedef void (*fsg_routine_t)(struct fsg_dev *); @@ -3771,6 +3772,13 @@ /*-------------------------------------------------------------------------*/ +static void lun_release(struct device *dev) +{ + struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev); + + complete(&fsg->lun_released); +} + static void fsg_unbind(struct usb_gadget *gadget) { struct fsg_dev *fsg = get_gadget_data(gadget); @@ -3782,12 +3790,14 @@ clear_bit(REGISTERED, &fsg->atomic_bitflags); /* Unregister the sysfs attribute files and the LUNs */ + init_completion(&fsg->lun_released); for (i = 0; i < fsg->nluns; ++i) { curlun = &fsg->luns[i]; if (curlun->registered) { device_remove_file(&curlun->dev, &dev_attr_ro); device_remove_file(&curlun->dev, &dev_attr_file); - device_unregister_wait(&curlun->dev); + device_unregister(&curlun->dev); + wait_for_completion(&fsg->lun_released); curlun->registered = 0; } } @@ -4140,6 +4150,7 @@ INFO(fsg, "failed to register LUN%d: %d\n", i, rc); else { curlun->registered = 1; + curlun->dev.release = lun_release; device_create_file(&curlun->dev, &dev_attr_ro); device_create_file(&curlun->dev, &dev_attr_file); } diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/gadget/net2280.c Wed Feb 4 17:17:31 2004 @@ -534,7 +534,10 @@ } /* write just one packet at a time */ - count = min (ep->ep.maxpacket, total); + count = ep->ep.maxpacket; + if (count > total) /* min() cannot be used on a bitfield */ + count = total; + VDEBUG (ep->dev, "write %s fifo (IN) %d bytes%s req %p\n", ep->ep.name, count, (count != ep->ep.maxpacket) ? " (short)" : "", @@ -2197,7 +2200,8 @@ unsigned len; len = req->req.length - req->req.actual; - len = min (ep->ep.maxpacket, len); + if (len > ep->ep.maxpacket) + len = ep->ep.maxpacket; req->req.actual += len; /* if we wrote it all, we're usually done */ diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/host/ehci-hcd.c Wed Feb 4 17:17:31 2004 @@ -680,7 +680,7 @@ /*-------------------------------------------------------------------------*/ -static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) +static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) { struct ehci_hcd *ehci = hcd_to_ehci (hcd); u32 status; @@ -690,6 +690,12 @@ status = readl (&ehci->regs->status); + /* shared irq */ + if (status == 0) { + spin_unlock (&ehci->lock); + return IRQ_NONE; + } + /* e.g. cardbus physical eject */ if (status == ~(u32) 0) { ehci_dbg (ehci, "device removed\n"); @@ -743,6 +749,7 @@ ehci_work (ehci, regs); done: spin_unlock (&ehci->lock); + return IRQ_HANDLED; } /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/host/ohci-hcd.c Wed Feb 4 17:17:31 2004 @@ -545,7 +545,7 @@ /* an interrupt happens */ -static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) +static irqreturn_t ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_regs *regs = ohci->regs; @@ -560,11 +560,11 @@ } else if ((ints = readl (®s->intrstatus)) == ~(u32)0) { disable (ohci); ohci_dbg (ohci, "device removed!\n"); - return; + return IRQ_HANDLED; /* interrupt for some other device? */ } else if ((ints &= readl (®s->intrenable)) == 0) { - return; + return IRQ_NONE; } if (ints & OHCI_INTR_UE) { @@ -604,6 +604,8 @@ // flush those pci writes (void) readl (&ohci->regs->control); } + + return IRQ_HANDLED; } /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c --- a/drivers/usb/host/ohci-sa1111.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/host/ohci-sa1111.c Wed Feb 4 17:17:31 2004 @@ -254,8 +254,6 @@ hcd_buffer_destroy (hcd); usb_deregister_bus (&hcd->self); - if (atomic_read (&hcd->self.refcnt) != 1) - err ("%s: %s, count != 1", __FUNCTION__, hcd->self.bus_name); base = hcd->regs; hcd->driver->hcd_free (hcd); diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/host/uhci-hcd.c Wed Feb 4 17:17:31 2004 @@ -1909,7 +1909,7 @@ spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags); } -static void uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs) +static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned int io_addr = uhci->io_addr; @@ -1922,7 +1922,7 @@ */ status = inw(io_addr + USBSTS); if (!status) /* shared interrupt, not mine */ - return; + return IRQ_NONE; outw(status, io_addr + USBSTS); /* Clear it */ if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) { @@ -1963,6 +1963,7 @@ spin_unlock(&uhci->urb_list_lock); uhci_finish_completion(hcd, regs); + return IRQ_HANDLED; } static void reset_hc(struct uhci_hcd *uhci) diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig --- a/drivers/usb/image/Kconfig Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/image/Kconfig Wed Feb 4 17:17:31 2004 @@ -19,7 +19,7 @@ config USB_SCANNER tristate "USB Scanner support (OBSOLETE)" - depends on USB + depends on USB && BROKEN help Say Y here if you want to connect a USB scanner to your computer's USB port. Please read for more diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/input/hid-core.c Wed Feb 4 17:17:31 2004 @@ -602,14 +602,16 @@ case 2: if ((end - start) < 2) return NULL; - item->data.u16 = le16_to_cpu(get_unaligned(((__u16*)start)++)); + item->data.u16 = le16_to_cpu(get_unaligned((__u16*)start)); + start = (__u8 *)((__u16 *)start + 1); return start; case 3: item->size++; if ((end - start) < 4) return NULL; - item->data.u32 = le32_to_cpu(get_unaligned(((__u32*)start)++)); + item->data.u32 = le32_to_cpu(get_unaligned((__u32*)start)); + start = (__u8 *)((__u32 *)start + 1); return start; } diff -Nru a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c --- a/drivers/usb/misc/uss720.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/misc/uss720.c Wed Feb 4 17:17:31 2004 @@ -333,7 +333,7 @@ for (; got < length; got++) { if (get_1284_register(pp, 4, (char *)buf)) break; - ((char*)buf)++; + buf++; if (priv->reg[0] & 0x01) { clear_epp_timeout(pp); break; @@ -392,7 +392,7 @@ for (; got < length; got++) { if (get_1284_register(pp, 3, (char *)buf)) break; - ((char*)buf)++; + buf++; if (priv->reg[0] & 0x01) { clear_epp_timeout(pp); break; @@ -412,7 +412,7 @@ for (; written < length; written++) { if (set_1284_register(pp, 3, *(char *)buf)) break; - ((char*)buf)++; + buf++; if (get_1284_register(pp, 1, NULL)) break; if (priv->reg[0] & 0x01) { @@ -469,7 +469,7 @@ for (; written < len; written++) { if (set_1284_register(pp, 5, *(char *)buffer)) break; - ((char*)buffer)++; + buffer++; } change_mode(pp, ECR_PS2); return written; diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/serial/belkin_sa.c Wed Feb 4 17:17:31 2004 @@ -232,8 +232,10 @@ port->interrupt_in_urb->dev = port->serial->dev; retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); - if (retval) + if (retval) { + usb_unlink_urb(port->read_urb); err(" usb_submit_urb(read int) failed"); + } exit: return retval; diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/serial/kobil_sct.c Wed Feb 4 17:17:31 2004 @@ -409,8 +409,6 @@ // someone sets the dev to 0 if the close method has been called port->interrupt_in_urb->dev = port->serial->dev; - // usb_dump_urb(port->interrupt_in_urb); - result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC ); dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result); } @@ -496,8 +494,6 @@ port->interrupt_in_urb->dev = port->serial->dev; // start reading - //usb_dump_urb(port->interrupt_in_urb); - result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC ); dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result); } diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/serial/visor.c Wed Feb 4 17:17:31 2004 @@ -241,6 +241,8 @@ .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID), .driver_info = (kernel_ulong_t)&palm_os_4_probe }, + { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID), + .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { }, /* optional parameter entry */ { } /* Terminating entry */ }; @@ -274,6 +276,7 @@ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_TJ25_ID) }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID) }, { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) }, + { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) }, { }, /* optional parameter entry */ { } /* Terminating entry */ }; diff -Nru a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h --- a/drivers/usb/serial/visor.h Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/serial/visor.h Wed Feb 4 17:17:31 2004 @@ -50,6 +50,9 @@ #define GARMIN_VENDOR_ID 0x091E #define GARMIN_IQUE_3600_ID 0x0004 +#define ACEECA_VENDOR_ID 0x4766 +#define ACEECA_MEZ1000_ID 0x0001 + /**************************************************************************** * Handspring Visor Vendor specific request codes (bRequest values) * A big thank you to Handspring for providing the following information. diff -Nru a/drivers/usb/storage/datafab.h b/drivers/usb/storage/datafab.h --- a/drivers/usb/storage/datafab.h Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/storage/datafab.h Wed Feb 4 17:17:31 2004 @@ -29,7 +29,7 @@ struct datafab_info { unsigned long sectors; // total sector count unsigned long ssize; // sector size in bytes - char lun; // used for dual-slot readers + signed char lun; // used for dual-slot readers // the following aren't used yet unsigned char sense_key; diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c --- a/drivers/usb/storage/usb.c Wed Feb 4 17:17:31 2004 +++ b/drivers/usb/storage/usb.c Wed Feb 4 17:17:31 2004 @@ -834,7 +834,7 @@ /* Finish the SCSI host removal sequence */ if (us->host) { - (struct us_data *) us->host->hostdata[0] = NULL; + us->host->hostdata[0] = 0; scsi_host_put(us->host); } diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Wed Feb 4 17:17:31 2004 +++ b/include/linux/usb.h Wed Feb 4 17:17:31 2004 @@ -1016,16 +1016,6 @@ /* -------------------------------------------------------------------------- */ -/* - * Debugging and troubleshooting/diagnostic helpers. - */ -void usb_show_device_descriptor(struct usb_device_descriptor *); -void usb_show_config_descriptor(struct usb_config_descriptor *); -void usb_show_interface_descriptor(struct usb_interface_descriptor *); -void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *); -void usb_show_device(struct usb_device *); -void usb_show_string(struct usb_device *dev, char *id, int index); - #ifdef DEBUG #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg) #else