/* Pointer to the device's PCI register space */
ADDRESS_MAP_t __iomem *CSRAddress;
- /* PCI config space info, for debug purposes only. */
- u8 RevisionID;
- u16 VendorID;
- u16 DeviceID;
- u16 SubVendorID;
- u16 SubSystemID;
- u32 CacheFillSize;
- u16 PciXDevCtl;
- u8 pci_lat_timer;
- u8 pci_hdr_type;
- u8 pci_bist;
- u32 pci_cfg_state[64 / sizeof(u32)];
-
/* Registry parameters */
u8 SpeedDuplex; /* speed/duplex */
eFLOW_CONTROL_t RegistryFlowControl; /* for 802.3x flow control */
uint8_t eepromStat;
uint8_t maxPayload = 0;
uint8_t read_size_reg;
+ u8 rev;
DBG_ENTER(et131x_dbginfo);
* 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 };
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
*/
* 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);
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;