diff options
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 59b9943b077d..805924fc077a 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -3422,21 +3422,19 @@ done: | |||
3422 | static void cas_check_pci_invariants(struct cas *cp) | 3422 | static void cas_check_pci_invariants(struct cas *cp) |
3423 | { | 3423 | { |
3424 | struct pci_dev *pdev = cp->pdev; | 3424 | struct pci_dev *pdev = cp->pdev; |
3425 | u8 rev; | ||
3426 | 3425 | ||
3427 | cp->cas_flags = 0; | 3426 | cp->cas_flags = 0; |
3428 | pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); | ||
3429 | if ((pdev->vendor == PCI_VENDOR_ID_SUN) && | 3427 | if ((pdev->vendor == PCI_VENDOR_ID_SUN) && |
3430 | (pdev->device == PCI_DEVICE_ID_SUN_CASSINI)) { | 3428 | (pdev->device == PCI_DEVICE_ID_SUN_CASSINI)) { |
3431 | if (rev >= CAS_ID_REVPLUS) | 3429 | if (pdev->revision >= CAS_ID_REVPLUS) |
3432 | cp->cas_flags |= CAS_FLAG_REG_PLUS; | 3430 | cp->cas_flags |= CAS_FLAG_REG_PLUS; |
3433 | if (rev < CAS_ID_REVPLUS02u) | 3431 | if (pdev->revision < CAS_ID_REVPLUS02u) |
3434 | cp->cas_flags |= CAS_FLAG_TARGET_ABORT; | 3432 | cp->cas_flags |= CAS_FLAG_TARGET_ABORT; |
3435 | 3433 | ||
3436 | /* Original Cassini supports HW CSUM, but it's not | 3434 | /* Original Cassini supports HW CSUM, but it's not |
3437 | * enabled by default as it can trigger TX hangs. | 3435 | * enabled by default as it can trigger TX hangs. |
3438 | */ | 3436 | */ |
3439 | if (rev < CAS_ID_REV2) | 3437 | if (pdev->revision < CAS_ID_REV2) |
3440 | cp->cas_flags |= CAS_FLAG_NO_HW_CSUM; | 3438 | cp->cas_flags |= CAS_FLAG_NO_HW_CSUM; |
3441 | } else { | 3439 | } else { |
3442 | /* Only sun has original cassini chips. */ | 3440 | /* Only sun has original cassini chips. */ |