diff options
author | gouji-new <gouji.masayuki@jp.fujitsu.com> | 2009-05-06 06:44:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-06 18:33:47 -0400 |
commit | 9ce77666da48513058e330634a766d4752324f8e (patch) | |
tree | 6d4d005c81d751a93ebd9a0447da63e6b43251fb /drivers | |
parent | 3044b8d1ff8c05237652a692fb572a34e4d70146 (diff) |
ixgbe: Proposed PARCH PCIE legacy I/O port free intel 10Gb NIC driver
Traditionally Intel based NIC drivers request I/O port even though it
doesn't need that really.
Intel PCIE 10Gb driver (ixgbe) also requests I/O port but it doesn't
need it either.
This is a little inconvenient situation because sometimes we have to
handle those cards on the slots where any I/O space is not attached.
So we made pach which makes ixgbe driver legacy I/O port free.
Signed-off-by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index dd56adb2191a..08f4a13a602f 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3773,7 +3773,8 @@ static int ixgbe_resume(struct pci_dev *pdev) | |||
3773 | 3773 | ||
3774 | pci_set_power_state(pdev, PCI_D0); | 3774 | pci_set_power_state(pdev, PCI_D0); |
3775 | pci_restore_state(pdev); | 3775 | pci_restore_state(pdev); |
3776 | err = pci_enable_device(pdev); | 3776 | |
3777 | err = pci_enable_device_mem(pdev); | ||
3777 | if (err) { | 3778 | if (err) { |
3778 | printk(KERN_ERR "ixgbe: Cannot enable PCI device from " | 3779 | printk(KERN_ERR "ixgbe: Cannot enable PCI device from " |
3779 | "suspend\n"); | 3780 | "suspend\n"); |
@@ -4778,7 +4779,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4778 | int i, err, pci_using_dac; | 4779 | int i, err, pci_using_dac; |
4779 | u32 part_num, eec; | 4780 | u32 part_num, eec; |
4780 | 4781 | ||
4781 | err = pci_enable_device(pdev); | 4782 | err = pci_enable_device_mem(pdev); |
4782 | if (err) | 4783 | if (err) |
4783 | return err; | 4784 | return err; |
4784 | 4785 | ||
@@ -4798,9 +4799,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4798 | pci_using_dac = 0; | 4799 | pci_using_dac = 0; |
4799 | } | 4800 | } |
4800 | 4801 | ||
4801 | err = pci_request_regions(pdev, ixgbe_driver_name); | 4802 | err = pci_request_selected_regions(pdev, pci_select_bars(pdev, |
4803 | IORESOURCE_MEM), ixgbe_driver_name); | ||
4802 | if (err) { | 4804 | if (err) { |
4803 | dev_err(&pdev->dev, "pci_request_regions failed 0x%x\n", err); | 4805 | dev_err(&pdev->dev, |
4806 | "pci_request_selected_regions failed 0x%x\n", err); | ||
4804 | goto err_pci_reg; | 4807 | goto err_pci_reg; |
4805 | } | 4808 | } |
4806 | 4809 | ||
@@ -5063,7 +5066,8 @@ err_eeprom: | |||
5063 | err_ioremap: | 5066 | err_ioremap: |
5064 | free_netdev(netdev); | 5067 | free_netdev(netdev); |
5065 | err_alloc_etherdev: | 5068 | err_alloc_etherdev: |
5066 | pci_release_regions(pdev); | 5069 | pci_release_selected_regions(pdev, pci_select_bars(pdev, |
5070 | IORESOURCE_MEM)); | ||
5067 | err_pci_reg: | 5071 | err_pci_reg: |
5068 | err_dma: | 5072 | err_dma: |
5069 | pci_disable_device(pdev); | 5073 | pci_disable_device(pdev); |
@@ -5115,7 +5119,8 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
5115 | ixgbe_release_hw_control(adapter); | 5119 | ixgbe_release_hw_control(adapter); |
5116 | 5120 | ||
5117 | iounmap(adapter->hw.hw_addr); | 5121 | iounmap(adapter->hw.hw_addr); |
5118 | pci_release_regions(pdev); | 5122 | pci_release_selected_regions(pdev, pci_select_bars(pdev, |
5123 | IORESOURCE_MEM)); | ||
5119 | 5124 | ||
5120 | DPRINTK(PROBE, INFO, "complete\n"); | 5125 | DPRINTK(PROBE, INFO, "complete\n"); |
5121 | 5126 | ||
@@ -5169,7 +5174,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) | |||
5169 | pci_ers_result_t result; | 5174 | pci_ers_result_t result; |
5170 | int err; | 5175 | int err; |
5171 | 5176 | ||
5172 | if (pci_enable_device(pdev)) { | 5177 | if (pci_enable_device_mem(pdev)) { |
5173 | DPRINTK(PROBE, ERR, | 5178 | DPRINTK(PROBE, ERR, |
5174 | "Cannot re-enable PCI device after reset.\n"); | 5179 | "Cannot re-enable PCI device after reset.\n"); |
5175 | result = PCI_ERS_RESULT_DISCONNECT; | 5180 | result = PCI_ERS_RESULT_DISCONNECT; |