Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (40 commits)
  USB: open disconnect race in usblcd
  USB: disconnect open race in legousbtower
  USB: open disconnect race in iowarrior
  USB: missing error check in emi62
  USB: missing error check in emi26
  USB: usb_serial_resume bug fix
  USB: remove new OHCI build warnings
  USB: amd5536udc - remove set_mwi() compiler warning
  USB: usbserial - fix potential deadlock between write() and IRQ
  usb: serial/pl2303: support for IO Data Device RSAQ5
  USB: fix read vs. disconnect race in cytherm driver
  USB: fix locking in idmouse
  USB: fix interface sysfs file-creation bug
  USB: fix ssb_ohci_probe() build bug
  USB: pl2303: remove can't happen checks, set speed properly and report baud rate
  USB: mos7840: Clean up old checks and stuff
  USB rio500.c: fix check-after-use
  USB iowarrior.c: fix check-after-use
  USB: add URB_FREE_BUFFER to permissible flags
  USB: isd200: sort out USB/IDE dependancy mess
  ...
  • Loading branch information
Linus Torvalds committed Oct 25, 2007
2 parents 0e81bef + d5d1cea commit a60387b
Show file tree
Hide file tree
Showing 37 changed files with 397 additions and 254 deletions.
3 changes: 2 additions & 1 deletion drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,7 @@ uart_set_options(struct uart_port *port, struct console *co,
int baud, int parity, int bits, int flow)
{
struct ktermios termios;
static struct ktermios dummy;
int i;

/*
Expand Down Expand Up @@ -1920,7 +1921,7 @@ uart_set_options(struct uart_port *port, struct console *co,
*/
port->mctrl |= TIOCM_DTR;

port->ops->set_termios(port, &termios, NULL);
port->ops->set_termios(port, &termios, &dummy);
co->cflag = termios.c_cflag;

return 0;
Expand Down
8 changes: 7 additions & 1 deletion drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,13 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
intf->dev.bus_id, ret);
continue;
}
usb_create_sysfs_intf_files (intf);

/* The driver's probe method can call usb_set_interface(),
* which would mean the interface's sysfs files are already
* created. Just in case, we'll remove them first.
*/
usb_remove_sysfs_intf_files(intf);
usb_create_sysfs_intf_files(intf);
}

usb_autosuspend_device(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)

/* enforce simple/standard policy */
allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP |
URB_NO_INTERRUPT | URB_DIR_MASK);
URB_NO_INTERRUPT | URB_DIR_MASK | URB_FREE_BUFFER);
switch (xfertype) {
case USB_ENDPOINT_XFER_BULK:
if (is_out)
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/amd5536udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@ static int udc_pci_probe(
dev->chiprev = pdev->revision;

pci_set_master(pdev);
pci_set_mwi(pdev);
pci_try_set_mwi(pdev);

/* init dma pools */
if (use_dma) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI

config USB_OHCI_HCD_SSB
bool "OHCI support for Broadcom SSB OHCI core"
depends on USB_OHCI_HCD && SSB && EXPERIMENTAL
depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL
default n
---help---
Support for the Sonics Silicon Backplane (SSB) attached
Expand Down
9 changes: 8 additions & 1 deletion drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ static const char hcd_name [] = "ohci_hcd";
static void ohci_dump (struct ohci_hcd *ohci, int verbose);
static int ohci_init (struct ohci_hcd *ohci);
static void ohci_stop (struct usb_hcd *hcd);

#if defined(CONFIG_PM) || defined(CONFIG_PCI)
static int ohci_restart (struct ohci_hcd *ohci);
#endif

#include "ohci-hub.c"
#include "ohci-dbg.c"
Expand Down Expand Up @@ -396,7 +399,7 @@ static int check_ed(struct ohci_hcd *ohci, struct ed *ed)
*/
static void unlink_watchdog_func(unsigned long _ohci)
{
long flags;
unsigned long flags;
unsigned max;
unsigned seen_count = 0;
unsigned i;
Expand Down Expand Up @@ -893,6 +896,8 @@ static void ohci_stop (struct usb_hcd *hcd)

/*-------------------------------------------------------------------------*/

#if defined(CONFIG_PM) || defined(CONFIG_PCI)

/* must not be called from interrupt context */
static int ohci_restart (struct ohci_hcd *ohci)
{
Expand Down Expand Up @@ -954,6 +959,8 @@ static int ohci_restart (struct ohci_hcd *ohci)
return 0;
}

#endif

/*-------------------------------------------------------------------------*/

#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
Expand Down
19 changes: 14 additions & 5 deletions drivers/usb/host/uhci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,8 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb,
} else if (qh->period != urb->interval) {
return -EINVAL; /* Can't change the period */

} else { /* Pick up where the last URB leaves off */
} else {
/* Find the next unused frame */
if (list_empty(&qh->queue)) {
frame = qh->iso_frame;
} else {
Expand All @@ -1283,10 +1284,18 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb,
lurb->number_of_packets *
lurb->interval;
}
if (urb->transfer_flags & URB_ISO_ASAP)
urb->start_frame = frame;
else if (urb->start_frame != frame)
return -EINVAL;
if (urb->transfer_flags & URB_ISO_ASAP) {
/* Skip some frames if necessary to insure
* the start frame is in the future.
*/
uhci_get_current_frame_number(uhci);
if (uhci_frame_before_eq(frame, uhci->frame_number)) {
frame = uhci->frame_number + 1;
frame += ((qh->phase - frame) &
(qh->period - 1));
}
} /* Otherwise pick up where the last URB leaves off */
urb->start_frame = frame;
}

/* Make sure we won't have to go too far into the future */
Expand Down
4 changes: 3 additions & 1 deletion drivers/usb/misc/cytherm.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,16 @@ static void cytherm_disconnect(struct usb_interface *interface)
struct usb_cytherm *dev;

dev = usb_get_intfdata (interface);
usb_set_intfdata (interface, NULL);

device_remove_file(&interface->dev, &dev_attr_brightness);
device_remove_file(&interface->dev, &dev_attr_temp);
device_remove_file(&interface->dev, &dev_attr_button);
device_remove_file(&interface->dev, &dev_attr_port0);
device_remove_file(&interface->dev, &dev_attr_port1);

/* first remove the files, then NULL the pointer */
usb_set_intfdata (interface, NULL);

usb_put_dev(dev->udev);

kfree(dev);
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/misc/emi26.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ static int emi26_load_firmware (struct usb_device *dev)

/* De-assert reset (let the CPU run) */
err = emi26_set_reset(dev,0);
if (err < 0) {
err("%s - error loading firmware: error = %d", __FUNCTION__, err);
goto wraperr;
}
msleep(250); /* let device settle */

/* 2. We upload the FPGA firmware into the EMI
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/misc/emi62.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ static int emi62_load_firmware (struct usb_device *dev)

/* De-assert reset (let the CPU run) */
err = emi62_set_reset(dev,0);
if (err < 0) {
err("%s - error loading firmware: error = %d", __FUNCTION__, err);
goto wraperr;
}
msleep(250); /* let device settle */

/* 2. We upload the FPGA firmware into the EMI
Expand Down
Loading

0 comments on commit a60387b

Please sign in to comment.