aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cassini.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r--drivers/net/cassini.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 59b9943b077d..f6e4030c73d1 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -3422,21 +3422,19 @@ done:
3422static void cas_check_pci_invariants(struct cas *cp) 3422static 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. */
@@ -4919,13 +4917,13 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
4919 pci_cmd &= ~PCI_COMMAND_SERR; 4917 pci_cmd &= ~PCI_COMMAND_SERR;
4920 pci_cmd |= PCI_COMMAND_PARITY; 4918 pci_cmd |= PCI_COMMAND_PARITY;
4921 pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); 4919 pci_write_config_word(pdev, PCI_COMMAND, pci_cmd);
4922 if (pci_set_mwi(pdev)) 4920 if (pci_try_set_mwi(pdev))
4923 printk(KERN_WARNING PFX "Could not enable MWI for %s\n", 4921 printk(KERN_WARNING PFX "Could not enable MWI for %s\n",
4924 pci_name(pdev)); 4922 pci_name(pdev));
4925 4923
4926 /* 4924 /*
4927 * On some architectures, the default cache line size set 4925 * On some architectures, the default cache line size set
4928 * by pci_set_mwi reduces perforamnce. We have to increase 4926 * by pci_try_set_mwi reduces perforamnce. We have to increase
4929 * it for this case. To start, we'll print some configuration 4927 * it for this case. To start, we'll print some configuration
4930 * data. 4928 * data.
4931 */ 4929 */