aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hcd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 03:10:21 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 03:10:21 -0500
commitf87c8e80545fd277f69521ef859c3e71c6af5656 (patch)
treeef5e7274559ec6fcdc9b758411a9c7a07cab0711 /drivers/usb/host/uhci-hcd.c
parent91f7b5c41811154706448b2bf500000cbbfa96ba (diff)
parent14e51f28ade783cd948cd10202a696ff7e5d33d6 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: asix: Fix AX88772 device PHY selection USB: usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers sisusb_con warning fixes USB: Fixed bug in endpoint release function. USB: small update to Documentation/usb/acm.txt USB storage: fix ipod ejecting issue USB Storage: unusual_devs: add supertop drives USB: omap_udc build fixes (sync with linux-omap) USB: funsoft is borken on sparc USB: fix interaction between different interfaces in an "Option" usb device UHCI: support device_may_wakeup UHCI: make test for ASUS motherboard more specific
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r--drivers/usb/host/uhci-hcd.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index acd101caeeeb..e0d4c2358b39 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -209,24 +209,16 @@ static int resume_detect_interrupts_are_broken(struct uhci_hcd *uhci)
209 209
210static int remote_wakeup_is_broken(struct uhci_hcd *uhci) 210static int remote_wakeup_is_broken(struct uhci_hcd *uhci)
211{ 211{
212 static struct dmi_system_id broken_wakeup_table[] = {
213 {
214 .ident = "Asus A7V8X",
215 .matches = {
216 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK"),
217 DMI_MATCH(DMI_BOARD_NAME, "A7V8X"),
218 DMI_MATCH(DMI_BOARD_VERSION, "REV 1.xx"),
219 }
220 },
221 { }
222 };
223 int port; 212 int port;
213 char *sys_info;
214 static char bad_Asus_board[] = "A7V8X";
224 215
225 /* One of Asus's motherboards has a bug which causes it to 216 /* One of Asus's motherboards has a bug which causes it to
226 * wake up immediately from suspend-to-RAM if any of the ports 217 * wake up immediately from suspend-to-RAM if any of the ports
227 * are connected. In such cases we will not set EGSM. 218 * are connected. In such cases we will not set EGSM.
228 */ 219 */
229 if (dmi_check_system(broken_wakeup_table)) { 220 sys_info = dmi_get_system_info(DMI_BOARD_NAME);
221 if (sys_info && !strcmp(sys_info, bad_Asus_board)) {
230 for (port = 0; port < uhci->rh_numports; ++port) { 222 for (port = 0; port < uhci->rh_numports; ++port) {
231 if (inw(uhci->io_addr + USBPORTSC1 + port * 2) & 223 if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
232 USBPORTSC_CCS) 224 USBPORTSC_CCS)
@@ -265,7 +257,9 @@ __acquires(uhci->lock)
265 int_enable = USBINTR_RESUME; 257 int_enable = USBINTR_RESUME;
266 if (remote_wakeup_is_broken(uhci)) 258 if (remote_wakeup_is_broken(uhci))
267 egsm_enable = 0; 259 egsm_enable = 0;
268 if (resume_detect_interrupts_are_broken(uhci) || !egsm_enable) 260 if (resume_detect_interrupts_are_broken(uhci) || !egsm_enable ||
261 !device_may_wakeup(
262 &uhci_to_hcd(uhci)->self.root_hub->dev))
269 uhci->working_RD = int_enable = 0; 263 uhci->working_RD = int_enable = 0;
270 264
271 outw(int_enable, uhci->io_addr + USBINTR); 265 outw(int_enable, uhci->io_addr + USBINTR);