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 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html