[PATCH] USB: EHCI updates mostly whitespace cleanups

This cleans up the recent updates to EHCI PCI support:

  - Gets rid of checks for "is this a PCI device", they're no
    longer needed since this is now all PCI-only code.

  - Reduce log spamming:  MWI is only interesting in the atypical
    case that it can actually be used.

  - Whitespace cleanup, as appropriate for a new file with no
    other pending patches.

So other than that minor logging change, no functional updates.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
David Brownell
2005-11-23 15:45:32 -08:00
committed by Linus Torvalds
parent f03c17fc9a
commit abcc944806

View File

@@ -62,6 +62,7 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
static int ehci_pci_reset(struct usb_hcd *hcd) static int ehci_pci_reset(struct usb_hcd *hcd)
{ {
struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
u32 temp; u32 temp;
unsigned count = 256/4; unsigned count = 256/4;
@@ -75,8 +76,7 @@ static int ehci_pci_reset (struct usb_hcd *hcd)
/* cache this readonly data; minimize chip reads */ /* cache this readonly data; minimize chip reads */
ehci->hcs_params = readl(&ehci->caps->hcs_params); ehci->hcs_params = readl(&ehci->caps->hcs_params);
if (hcd->self.controller->bus == &pci_bus_type) { /* NOTE: only the parts below this line are PCI-specific */
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
switch (pdev->vendor) { switch (pdev->vendor) {
case PCI_VENDOR_ID_TDI: case PCI_VENDOR_ID_TDI:
@@ -131,8 +131,6 @@ static int ehci_pci_reset (struct usb_hcd *hcd)
} }
temp = HCC_EXT_CAPS(readl(&ehci->caps->hcc_params)); temp = HCC_EXT_CAPS(readl(&ehci->caps->hcc_params));
} else
temp = 0;
/* EHCI 0.96 and later may have "extended capabilities" */ /* EHCI 0.96 and later may have "extended capabilities" */
while (temp && count--) { while (temp && count--) {
@@ -174,10 +172,6 @@ static int ehci_pci_reset (struct usb_hcd *hcd)
HCS_N_PCC(ehci->hcs_params), HCS_N_PCC(ehci->hcs_params),
HCS_N_PORTS(ehci->hcs_params)); HCS_N_PORTS(ehci->hcs_params));
if (hcd->self.controller->bus == &pci_bus_type) {
struct pci_dev *pdev;
pdev = to_pci_dev(hcd->self.controller);
switch (pdev->vendor) { switch (pdev->vendor) {
case 0x17a0: /* GENESYS */ case 0x17a0: /* GENESYS */
/* GL880S: should be PORTS=2 */ /* GL880S: should be PORTS=2 */
@@ -189,7 +183,6 @@ static int ehci_pci_reset (struct usb_hcd *hcd)
break; break;
} }
} }
}
/* force HC to halt state */ /* force HC to halt state */
return ehci_halt(ehci); return ehci_halt(ehci);
@@ -199,8 +192,6 @@ static int ehci_pci_start (struct usb_hcd *hcd)
{ {
struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd);
int result = 0; int result = 0;
if (hcd->self.controller->bus == &pci_bus_type) {
struct pci_dev *pdev; struct pci_dev *pdev;
u16 port_wake; u16 port_wake;
@@ -213,11 +204,10 @@ static int ehci_pci_start (struct usb_hcd *hcd)
pci_read_config_word(pdev, 0x62, &port_wake); pci_read_config_word(pdev, 0x62, &port_wake);
hcd->can_wakeup = (port_wake & 1) != 0; hcd->can_wakeup = (port_wake & 1) != 0;
/* help hc dma work well with cachelines */ /* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */
result = pci_set_mwi(pdev); result = pci_set_mwi(pdev);
if (result) if (!result)
ehci_dbg(ehci, "unable to enable MWI - not fatal.\n"); ehci_dbg(ehci, "MWI active\n");
}
return ehci_run(hcd); return ehci_run(hcd);
} }