From 8e8ce4b642ce4beb865fb1d67cd8ea883d9ae7d7 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 20 Oct 2008 21:46:01 -0700 Subject: USB: use pci_ioremap_bar() in drivers/usb Use the newly introduced pci_ioremap_bar() function in drivers/usb. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/pci-quirks.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/usb/host/pci-quirks.c') diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index ae6e70edd74..15e4f1d92c7 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -172,9 +172,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) if (!mmio_resource_enabled(pdev, 0)) return; - base = ioremap_nocache(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0)); - if (base == NULL) return; + base = pci_ioremap_bar(pdev, 0); + if (base == NULL) + return; /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ #ifndef __hppa__ @@ -221,9 +221,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) if (!mmio_resource_enabled(pdev, 0)) return; - base = ioremap_nocache(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0)); - if (base == NULL) return; + base = pci_ioremap_bar(pdev, 0); + if (base == NULL) + return; cap_length = readb(base); op_reg_base = base + cap_length; -- cgit v1.2.3 From d859bffc662482f06ba5603e6f592de4e18cf135 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Wed, 5 Nov 2008 12:41:24 -0800 Subject: USB: EHCI pci-quirks.c: don't wait so long for BIOS handoff Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a 1000ms loop to wait for the BIOS to acknowledge the handoff. The five second delay is really quite irritating to have to deal with every boot up, and I very seriously doubt any non-broken bios takes more than a second to do the actual handoff. Signed-off-by: Steven Noonan Cc: Alan Stern Cc: David Brownell Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/pci-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/host/pci-quirks.c') diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 15e4f1d92c7..75b69847918 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -271,7 +271,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) /* if boot firmware now owns EHCI, spin till * it hands it over. */ - msec = 5000; + msec = 1000; while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) { tried_handoff = 1; msleep(10); -- cgit v1.2.3