Commit 42245e65 authored by Alan Stern's avatar Alan Stern Committed by Linus Torvalds

[PATCH] UHCI: add missing memory barriers

This patch (as617) adds a couple of memory barriers that Ben H. forgot in
his recent suspend/resume fix.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 42f3ab42
...@@ -717,6 +717,7 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message) ...@@ -717,6 +717,7 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message)
* at the source, so we must turn off PIRQ. * at the source, so we must turn off PIRQ.
*/ */
pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0); pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
mb();
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
uhci->hc_inaccessible = 1; uhci->hc_inaccessible = 1;
hcd->poll_rh = 0; hcd->poll_rh = 0;
...@@ -738,6 +739,7 @@ static int uhci_resume(struct usb_hcd *hcd) ...@@ -738,6 +739,7 @@ static int uhci_resume(struct usb_hcd *hcd)
* really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0 * really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0
*/ */
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
mb();
if (uhci->rh_state == UHCI_RH_RESET) /* Dead */ if (uhci->rh_state == UHCI_RH_RESET) /* Dead */
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment