The reason we set this bit here is that we found the bit wasn't set when doing S1 or S3. It caused the system can not be resumed by USB KB/MS. It's weird. Thanks for the feedback. We will check this from PCI core. BRs, Joseph Chan -----Original Message----- From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx] Sent: Tuesday, December 16, 2008 12:18 AM To: Joseph Chan; Jesse Barnes Cc: USB list; linux-pci@xxxxxxxxxxxxxxx Subject: Re: [PATCH] HOST: Fix the USB KB/MS wakeup issue from S1/S3 with VIA USB HOST controllers. On Mon, 15 Dec 2008 JosephChan@xxxxxxxxxx wrote: > This patch fixes the issue which system cannot resume from S1/S3 with > VIA USB HOST controllers by using USB KB/MS. > > > Signed-off-by: Joseph Chan <JosephChan@xxxxxxxxxx> > > --- a/drivers/usb/host/uhci-hcd.c 2008-12-13 00:37:43.000000000 +0800 > +++ b/drivers/usb/host/uhci-hcd.c 2008-12-13 01:38:50.000000000 +0800 > @@ -514,11 +514,14 @@ > static int uhci_init(struct usb_hcd *hcd) { > struct uhci_hcd *uhci = hcd_to_uhci(hcd); > + struct pci_dev *pdev = to_pci_dev(hcd->self.controller); > unsigned io_size = (unsigned) hcd->rsrc_len; > int port; > > uhci->io_addr = (unsigned long) hcd->rsrc_start; > > + device_init_wakeup(&pdev->dev, 1); > + > /* The UHCI spec says devices must have 2 ports, and goes on to say > * they may have more but gives no way to determine how many there > * are. However according to the UHCI spec, Bit 7 of the port This patch is wrong. What if the device doesn't support PCI PM? We wouldn't want to set the can_wakeup flag then. In fact, the whole idea of doing device_init_wakeup() here is a bad one. It should be taken care of by the PCI core, based on the PCI capabilities and possibly on ACPI settings. Jesse, any reason why it isn't done this way already? Alan Stern ��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥