Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff938e43 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller
Browse files

net: use pci_dev->revision, again



Several more network drivers that read the device's revision ID
from the PCI configuration register were merged after the commit
44c10138 (PCI: Change all drivers
to use pci_device->revision), so it's time to do another pass of
conversion to using the 'revision' field of 'struct pci_dev'...

Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: default avatar"John W. Linville" <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63d8ea7f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -547,8 +547,8 @@ static int __devinit atl1e_sw_init(struct atl1e_adapter *adapter)
	hw->device_id = pdev->device;
	hw->subsystem_vendor_id = pdev->subsystem_vendor;
	hw->subsystem_id = pdev->subsystem_device;
	hw->revision_id  = pdev->revision;

	pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);
	pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);

	phy_status_data = AT_READ_REG(hw, REG_PHY_STATUS);
+1 −1
Original line number Diff line number Diff line
@@ -93,8 +93,8 @@ static int __devinit atl2_sw_init(struct atl2_adapter *adapter)
	hw->device_id = pdev->device;
	hw->subsystem_vendor_id = pdev->subsystem_vendor;
	hw->subsystem_id = pdev->subsystem_device;
	hw->revision_id  = pdev->revision;

	pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);
	pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);

	adapter->wol = 0;
+5 −9
Original line number Diff line number Diff line
@@ -5158,16 +5158,12 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev)

	dev_hold(dev);
	pci_dev_get(pdev);
	if (pdev->device == PCI_DEVICE_ID_NX2_5709 ||
	    pdev->device == PCI_DEVICE_ID_NX2_5709S) {
		u8 rev;

		pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
		if (rev < 0x10) {
	if ((pdev->device == PCI_DEVICE_ID_NX2_5709 ||
	     pdev->device == PCI_DEVICE_ID_NX2_5709S) &&
	    (pdev->revision < 0x10)) {
		pci_dev_put(pdev);
		goto cnic_err;
	}
	}
	pci_dev_put(pdev);

	cdev = cnic_alloc_dev(dev, pdev);
+2 −4
Original line number Diff line number Diff line
@@ -433,13 +433,11 @@ static void e1000_get_regs(struct net_device *netdev,
	struct e1000_hw *hw = &adapter->hw;
	u32 *regs_buff = p;
	u16 phy_data;
	u8 revision_id;

	memset(p, 0, E1000_REGS_LEN * sizeof(u32));

	pci_read_config_byte(adapter->pdev, PCI_REVISION_ID, &revision_id);

	regs->version = (1 << 24) | (revision_id << 16) | adapter->pdev->device;
	regs->version = (1 << 24) | (adapter->pdev->revision << 16) |
			adapter->pdev->device;

	regs_buff[0]  = er32(CTRL);
	regs_buff[1]  = er32(STATUS);
+2 −4
Original line number Diff line number Diff line
@@ -201,13 +201,11 @@ static void igbvf_get_regs(struct net_device *netdev,
	struct igbvf_adapter *adapter = netdev_priv(netdev);
	struct e1000_hw *hw = &adapter->hw;
	u32 *regs_buff = p;
	u8 revision_id;

	memset(p, 0, IGBVF_REGS_LEN * sizeof(u32));

	pci_read_config_byte(adapter->pdev, PCI_REVISION_ID, &revision_id);

	regs->version = (1 << 24) | (revision_id << 16) | adapter->pdev->device;
	regs->version = (1 << 24) | (adapter->pdev->revision << 16) |
			adapter->pdev->device;

	regs_buff[0] = er32(CTRL);
	regs_buff[1] = er32(STATUS);
Loading