diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 01:58:36 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 01:58:36 -0500 |
commit | 6946d28a9f47f50fe3dd916e8b4229de9769108e (patch) | |
tree | eaa7499bf7fd367cbacf777d8eec8ed038ef287d /drivers/usb/host/ehci-sched.c | |
parent | 6c9e5eb522bca694a0311898039d2707e9bc7783 (diff) | |
parent | 5666c0947ede0432ba5148570aa66ffb9febff5b (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index f0c8aa1ccd5d..57e77374d228 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -602,6 +602,12 @@ static int intr_submit ( | |||
602 | 602 | ||
603 | spin_lock_irqsave (&ehci->lock, flags); | 603 | spin_lock_irqsave (&ehci->lock, flags); |
604 | 604 | ||
605 | if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, | ||
606 | &ehci_to_hcd(ehci)->flags))) { | ||
607 | status = -ESHUTDOWN; | ||
608 | goto done; | ||
609 | } | ||
610 | |||
605 | /* get qh and force any scheduling errors */ | 611 | /* get qh and force any scheduling errors */ |
606 | INIT_LIST_HEAD (&empty); | 612 | INIT_LIST_HEAD (&empty); |
607 | qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv); | 613 | qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv); |
@@ -1456,7 +1462,11 @@ static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, | |||
1456 | 1462 | ||
1457 | /* schedule ... need to lock */ | 1463 | /* schedule ... need to lock */ |
1458 | spin_lock_irqsave (&ehci->lock, flags); | 1464 | spin_lock_irqsave (&ehci->lock, flags); |
1459 | status = iso_stream_schedule (ehci, urb, stream); | 1465 | if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, |
1466 | &ehci_to_hcd(ehci)->flags))) | ||
1467 | status = -ESHUTDOWN; | ||
1468 | else | ||
1469 | status = iso_stream_schedule (ehci, urb, stream); | ||
1460 | if (likely (status == 0)) | 1470 | if (likely (status == 0)) |
1461 | itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); | 1471 | itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); |
1462 | spin_unlock_irqrestore (&ehci->lock, flags); | 1472 | spin_unlock_irqrestore (&ehci->lock, flags); |
@@ -1815,7 +1825,11 @@ static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, | |||
1815 | 1825 | ||
1816 | /* schedule ... need to lock */ | 1826 | /* schedule ... need to lock */ |
1817 | spin_lock_irqsave (&ehci->lock, flags); | 1827 | spin_lock_irqsave (&ehci->lock, flags); |
1818 | status = iso_stream_schedule (ehci, urb, stream); | 1828 | if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, |
1829 | &ehci_to_hcd(ehci)->flags))) | ||
1830 | status = -ESHUTDOWN; | ||
1831 | else | ||
1832 | status = iso_stream_schedule (ehci, urb, stream); | ||
1819 | if (status == 0) | 1833 | if (status == 0) |
1820 | sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); | 1834 | sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); |
1821 | spin_unlock_irqrestore (&ehci->lock, flags); | 1835 | spin_unlock_irqrestore (&ehci->lock, flags); |