aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-06-22 16:39:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:37 -0400
commit541c7d432f76771079e7c295d596ea47cc6a3030 (patch)
tree9e04330713366d21849cecf0f3fd2f2c1834574d /drivers/usb/host/xhci.c
parent89ba85d4015b7fa738b35bcc228075c117a9a578 (diff)
USB: convert usb_hcd bitfields into atomic flags
This patch (as1393) converts several of the single-bit fields in struct usb_hcd to atomic flags. This is for safety's sake; not all CPUs can update bitfield values atomically, and these flags are used in multiple contexts. The flag fields that are set only during registration or removal can remain as they are, since non-atomic accesses at those times will not cause any problems. (Strictly speaking, the authorized_default flag should become atomic as well. I didn't bother with it because it gets changed only via sysfs. It can be done later, if anyone wants.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 343f1047f5d0..5e73386b3899 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -427,7 +427,6 @@ int xhci_run(struct usb_hcd *hcd)
427 void (*doorbell)(struct xhci_hcd *) = NULL; 427 void (*doorbell)(struct xhci_hcd *) = NULL;
428 428
429 hcd->uses_new_polling = 1; 429 hcd->uses_new_polling = 1;
430 hcd->poll_rh = 0;
431 430
432 xhci_dbg(xhci, "xhci_run\n"); 431 xhci_dbg(xhci, "xhci_run\n");
433#if 0 /* FIXME: MSI not setup yet */ 432#if 0 /* FIXME: MSI not setup yet */
@@ -733,7 +732,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
733 ret = -EINVAL; 732 ret = -EINVAL;
734 goto exit; 733 goto exit;
735 } 734 }
736 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { 735 if (!HCD_HW_ACCESSIBLE(hcd)) {
737 if (!in_interrupt()) 736 if (!in_interrupt())
738 xhci_dbg(xhci, "urb submitted during PCI suspend\n"); 737 xhci_dbg(xhci, "urb submitted during PCI suspend\n");
739 ret = -ESHUTDOWN; 738 ret = -ESHUTDOWN;