Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-15 02:10:51 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-15 02:10:51 -0700
commitafc028baf78ee1371af2de43ece31a11978ec79c (patch)
treea9f22d1b63e4aa380fbe157ed21291da1d87274b
parent8b5915b08dda13ffe1f70f00322dcc34ce161904 (diff)
parentb86da52f630ef8eace90fb685a39319ef3f7b3d3 (diff)
Merge bk://kernel.bkbits.net/gregkh/linux/fix-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c4
-rw-r--r--drivers/usb/class/usblp.c8
-rw-r--r--drivers/usb/gadget/net2280.c19
-rw-r--r--drivers/usb/host/ehci-hcd.c9
-rw-r--r--drivers/usb/host/ehci.h1
-rw-r--r--drivers/usb/input/hid-core.c2
-rw-r--r--drivers/usb/media/konicawc.c2
-rw-r--r--drivers/usb/serial/digi_acceleport.c7
8 files changed, 34 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 276b485d211b..76d722f34a9c 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -362,7 +362,7 @@ static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
int rpaphp_unconfig_pci_adapter(struct slot *slot)
{
int retval = 0;
- struct list_head *ln;
+ struct list_head *ln, *tmp;
dbg("Entry %s: slot[%s]\n", __FUNCTION__, slot->name);
if (list_empty(&slot->dev.pci_funcs)) {
@@ -373,7 +373,7 @@ int rpaphp_unconfig_pci_adapter(struct slot *slot)
goto exit;
}
/* remove the devices from the pci core */
- list_for_each (ln, &slot->dev.pci_funcs) {
+ list_for_each_safe (ln, tmp, &slot->dev.pci_funcs) {
struct rpaphp_pci_func *func;
func = list_entry(ln, struct rpaphp_pci_func, sibling);
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 5ed263886048..da91bbd6735c 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -397,10 +397,6 @@ static void usblp_cleanup (struct usblp *usblp)
{
info("usblp%d: removed", usblp->minor);
- usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
- usblp->writebuf, usblp->writeurb->transfer_dma);
- usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
- usblp->readbuf, usblp->readurb->transfer_dma);
kfree (usblp->device_id_string);
kfree (usblp->statusbuf);
usb_free_urb(usblp->writeurb);
@@ -1159,6 +1155,10 @@ static void usblp_disconnect(struct usb_interface *intf)
usb_set_intfdata (intf, NULL);
usblp_unlink_urbs(usblp);
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->writebuf, usblp->writeurb->transfer_dma);
+ usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
+ usblp->readbuf, usblp->readurb->transfer_dma);
if (!usblp->used)
usblp_cleanup (usblp);
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index eff0308b7b04..d28de0b8ceba 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -303,13 +303,16 @@ static void ep_reset (struct net2280_regs __iomem *regs, struct net2280_ep *ep)
/* init to our chosen defaults, notably so that we NAK OUT
* packets until the driver queues a read (+note erratum 0112)
*/
- writel ( (1 << SET_NAK_OUT_PACKETS_MODE)
+ tmp = (1 << SET_NAK_OUT_PACKETS_MODE)
| (1 << SET_NAK_OUT_PACKETS)
| (1 << CLEAR_EP_HIDE_STATUS_PHASE)
- | (1 << CLEAR_INTERRUPT_MODE)
- | (1 << CLEAR_ENDPOINT_TOGGLE)
- | (1 << CLEAR_ENDPOINT_HALT)
- , &ep->regs->ep_rsp);
+ | (1 << CLEAR_INTERRUPT_MODE);
+
+ if (ep->num != 0) {
+ tmp |= (1 << CLEAR_ENDPOINT_TOGGLE)
+ | (1 << CLEAR_ENDPOINT_HALT);
+ }
+ writel (tmp, &ep->regs->ep_rsp);
/* scrub most status bits, and flush any fifo state */
writel ( (1 << TIMEOUT)
@@ -1920,8 +1923,6 @@ static void ep0_start (struct net2280 *dev)
, &dev->usb->stdrsp);
writel ( (1 << USB_ROOT_PORT_WAKEUP_ENABLE)
| (1 << SELF_POWERED_USB_DEVICE)
- /* erratum 0102 workaround */
- | ((dev->chiprev == 0100) ? 0 : 1) << SUSPEND_IMMEDIATELY
| (1 << REMOTE_WAKEUP_SUPPORT)
| (dev->softconnect << USB_DETECT_ENABLE)
| (1 << SELF_POWERED_STATUS)
@@ -2047,6 +2048,8 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
stop_activity (dev, driver);
spin_unlock_irqrestore (&dev->lock, flags);
+ net2280_pullup (&dev->gadget, 0);
+
driver->unbind (&dev->gadget);
dev->gadget.dev.driver = NULL;
dev->driver = NULL;
@@ -2552,8 +2555,6 @@ static void handle_stat1_irqs (struct net2280 *dev, u32 stat)
if (stat & (1 << SUSPEND_REQUEST_INTERRUPT)) {
if (dev->driver->suspend)
dev->driver->suspend (&dev->gadget);
- /* we use SUSPEND_IMMEDIATELY */
- stat &= ~(1 << SUSPEND_REQUEST_INTERRUPT);
} else {
if (dev->driver->resume)
dev->driver->resume (&dev->gadget);
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 408d4f98fa3e..e25adf501967 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -695,9 +695,18 @@ static void ehci_work (struct ehci_hcd *ehci, struct pt_regs *regs)
timer_action_done (ehci, TIMER_IO_WATCHDOG);
if (ehci->reclaim_ready)
end_unlink_async (ehci, regs);
+
+ /* another CPU may drop ehci->lock during a schedule scan while
+ * it reports urb completions. this flag guards against bogus
+ * attempts at re-entrant schedule scanning.
+ */
+ if (ehci->scanning)
+ return;
+ ehci->scanning = 1;
scan_async (ehci, regs);
if (ehci->next_uframe != -1)
scan_periodic (ehci, regs);
+ ehci->scanning = 0;
/* the IO watchdog guards against hardware or driver bugs that
* misplace IRQs, and should let us run completely without IRQs.
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 6439a4be911d..0e8541133ff1 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -53,6 +53,7 @@ struct ehci_hcd { /* one per controller */
struct ehci_qh *async;
struct ehci_qh *reclaim;
unsigned reclaim_ready : 1;
+ unsigned scanning : 1;
/* periodic schedule support */
#define DEFAULT_I_TDPS 1024 /* some HCs can do less */
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index fb8d25a94d9d..5c415425a18c 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1859,8 +1859,8 @@ hiddev_init_fail:
static void __exit hid_exit(void)
{
- hiddev_exit();
usb_deregister(&hid_driver);
+ hiddev_exit();
}
module_init(hid_init);
diff --git a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
index 3c741a8f5b73..3376654ca051 100644
--- a/drivers/usb/media/konicawc.c
+++ b/drivers/usb/media/konicawc.c
@@ -362,8 +362,8 @@ static void konicawc_isoc_irq(struct urb *urb, struct pt_regs *regs)
else if (!urb->status && !cam->last_data_urb->status)
len = konicawc_compress_iso(uvd, cam->last_data_urb, urb);
- resubmit_urb(uvd, urb);
resubmit_urb(uvd, cam->last_data_urb);
+ resubmit_urb(uvd, urb);
cam->last_data_urb = NULL;
uvd->stats.urb_length = len;
uvd->stats.data_count += len;
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index eef146950bb7..3ac69f2c2510 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1546,13 +1546,17 @@ static void digi_close( struct usb_serial_port *port, struct file *filp )
dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
+ /* if disconnected, just clear flags */
+ if (!usb_get_intfdata(port->serial->interface))
+ goto exit;
+
/* do cleanup only after final close on this port */
spin_lock_irqsave( &priv->dp_port_lock, flags );
priv->dp_in_close = 1;
spin_unlock_irqrestore( &priv->dp_port_lock, flags );
/* tell line discipline to process only XON/XOFF */
- tty->closing = 1;
+ tty->closing = 1;
/* wait for output to drain */
if( (filp->f_flags&(O_NDELAY|O_NONBLOCK)) == 0 ) {
@@ -1616,6 +1620,7 @@ dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_co
tty->closing = 0;
+exit:
spin_lock_irqsave( &priv->dp_port_lock, flags );
priv->dp_write_urb_in_use = 0;
priv->dp_in_close = 0;