diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-27 10:59:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:27 -0700 |
commit | 5ec3487ac566dd443365100eab6861f004f617fb (patch) | |
tree | 60ff3457010cfc54692fc9aa33a6e67ff739789f /drivers/staging/et131x/et131x_initpci.c | |
parent | 817550815e80ff237439b1631a316bebc3023649 (diff) |
Staging: et131x: kill copied PCI fields
They are all in the pcidev anyway plus are not used by the code
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et131x_initpci.c')
-rw-r--r-- | drivers/staging/et131x/et131x_initpci.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index d84b6546160f..86bd55d2aeac 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -240,6 +240,7 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev) uint8_t eepromStat; uint8_t maxPayload = 0; uint8_t read_size_reg; + u8 rev; DBG_ENTER(et131x_dbginfo); @@ -283,15 +284,14 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev) * present, we need to fail. */ if (eepromStat & 0x4C) { - result = pci_read_config_byte(pdev, PCI_REVISION_ID, - &adapter->RevisionID); + result = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); if (result != PCIBIOS_SUCCESSFUL) { DBG_ERROR(et131x_dbginfo, "Could not read PCI config space for " "Revision ID\n"); DBG_LEAVE(et131x_dbginfo); return -EIO; - } else if (adapter->RevisionID == 0x01) { + } else if (rev == 0x01) { int32_t nLoop; uint8_t ucTemp[4] = { 0xFE, 0x13, 0x10, 0xFF }; @@ -405,16 +405,6 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev) return -EIO; } - /* PCI Express Configuration registers 0x48-0x5B (Device Control) */ - result = pci_read_config_word(pdev, ET1310_PCI_DEV_CTRL, - &adapter->PciXDevCtl); - if (result != PCIBIOS_SUCCESSFUL) { - DBG_ERROR(et131x_dbginfo, - "Could not read PCI config space for PCI Express Dev Ctl\n"); - DBG_LEAVE(et131x_dbginfo); - return -EIO; - } - /* Get MAC address from config space if an eeprom exists, otherwise * the MAC address there will not be valid */ @@ -556,7 +546,7 @@ int et131x_adapter_setup(struct et131x_adapter *etdev) * We need to turn off 1000 base half dulplex, the mac does not * support it. For the 10/100 part, turn off all gig advertisement */ - if (etdev->DeviceID != ET131X_PCI_DEVICE_ID_FAST) + if (etdev->pdev->device != ET131X_PCI_DEVICE_ID_FAST) ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_FULL); else ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_NONE); @@ -890,8 +880,6 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev, adapter = netdev_priv(netdev); adapter->pdev = pdev; adapter->netdev = netdev; - adapter->VendorID = pdev->vendor; - adapter->DeviceID = pdev->device; /* Do the same for the netdev struct */ netdev->irq = pdev->irq; |