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

Commit 05857980 authored by Jeff Kirsher's avatar Jeff Kirsher Committed by Jeff Garzik
Browse files

ixgbe: fix pci_resource allocation as in other drivers



Form: Jesse Brandeburg <jesse.brandeburg@intel.com>

Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 98c00a1c
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -3605,7 +3605,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
	struct ixgbe_adapter *adapter = NULL;
	struct ixgbe_adapter *adapter = NULL;
	struct ixgbe_hw *hw;
	struct ixgbe_hw *hw;
	const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
	const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
	unsigned long mmio_start, mmio_len;
	static int cards_found;
	static int cards_found;
	int i, err, pci_using_dac;
	int i, err, pci_using_dac;
	u16 link_status, link_speed, link_width;
	u16 link_status, link_speed, link_width;
@@ -3657,10 +3656,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
	hw->back = adapter;
	hw->back = adapter;
	adapter->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1;
	adapter->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1;


	mmio_start = pci_resource_start(pdev, 0);
	hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
	mmio_len = pci_resource_len(pdev, 0);
	                      pci_resource_len(pdev, 0));

	hw->hw_addr = ioremap(mmio_start, mmio_len);
	if (!hw->hw_addr) {
	if (!hw->hw_addr) {
		err = -EIO;
		err = -EIO;
		goto err_ioremap;
		goto err_ioremap;
@@ -3690,9 +3687,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
#endif
#endif
	strcpy(netdev->name, pci_name(pdev));
	strcpy(netdev->name, pci_name(pdev));


	netdev->mem_start = mmio_start;
	netdev->mem_end = mmio_start + mmio_len;

	adapter->bd_number = cards_found;
	adapter->bd_number = cards_found;


	/* PCI config space info */
	/* PCI config space info */