USB: convert usb_hcd bitfields into atomic flags
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 22 Jun 2010 20:39:10 +0000 (16:39 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:37 +0000 (14:35 -0700)
commit541c7d432f76771079e7c295d596ea47cc6a3030
tree9e04330713366d21849cecf0f3fd2f2c1834574d
parent89ba85d4015b7fa738b35bcc228075c117a9a578
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>
21 files changed:
drivers/staging/usbip/vhci_hcd.c
drivers/usb/c67x00/c67x00-hcd.c
drivers/usb/core/hcd.c
drivers/usb/gadget/dummy_hcd.c
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-q.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/hwa-hc.c
drivers/usb/host/isp1760-hcd.c
drivers/usb/host/ohci-dbg.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hub.c
drivers/usb/host/whci/hcd.c
drivers/usb/host/xhci.c
drivers/usb/musb/musb_virthub.c
include/linux/usb/hcd.h