aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 6b5946fe8ae2..c6ceba95ace7 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4364,6 +4364,22 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4364 goto err_out; 4364 goto err_out;
4365 } 4365 }
4366 4366
4367 /* Get configuration information
4368 * Note: only regular PCI config access once to test for HW issues
4369 * other PCI access through shared memory for speed and to
4370 * avoid MMCONFIG problems.
4371 */
4372 err = pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);
4373 if (err) {
4374 dev_err(&pdev->dev, "PCI read config failed\n");
4375 goto err_out;
4376 }
4377
4378 if (~reg == 0) {
4379 dev_err(&pdev->dev, "PCI configuration read error\n");
4380 goto err_out;
4381 }
4382
4367 err = pci_request_regions(pdev, DRV_NAME); 4383 err = pci_request_regions(pdev, DRV_NAME);
4368 if (err) { 4384 if (err) {
4369 dev_err(&pdev->dev, "cannot obtain PCI resources\n"); 4385 dev_err(&pdev->dev, "cannot obtain PCI resources\n");
@@ -4389,21 +4405,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4389 } 4405 }
4390 } 4406 }
4391 4407
4392 /* Get configuration information
4393 * Note: only regular PCI config access once to test for HW issues
4394 * other PCI access through shared memory for speed and to
4395 * avoid MMCONFIG problems.
4396 */
4397 err = pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);
4398 if (err) {
4399 dev_err(&pdev->dev, "PCI read config failed\n");
4400 goto err_out_free_regions;
4401 }
4402
4403 /* size of available VPD, only impact sysfs */
4404 err = pci_vpd_truncate(pdev, 1ul << (((reg & PCI_VPD_ROM_SZ) >> 14) + 8));
4405 if (err)
4406 dev_warn(&pdev->dev, "Can't set VPD size\n");
4407 4408
4408#ifdef __BIG_ENDIAN 4409#ifdef __BIG_ENDIAN
4409 /* The sk98lin vendor driver uses hardware byte swapping but 4410 /* The sk98lin vendor driver uses hardware byte swapping but