diff options
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 588938204e20..e7b432c508f9 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3892,6 +3892,12 @@ static int s2io_open(struct net_device *dev) | |||
3892 | } | 3892 | } |
3893 | } | 3893 | } |
3894 | 3894 | ||
3895 | /* NAPI doesn't work well with MSI(X) */ | ||
3896 | if (sp->intr_type != INTA) { | ||
3897 | if(sp->config.napi) | ||
3898 | sp->config.napi = 0; | ||
3899 | } | ||
3900 | |||
3895 | /* Initialize H/W and enable interrupts */ | 3901 | /* Initialize H/W and enable interrupts */ |
3896 | err = s2io_card_up(sp); | 3902 | err = s2io_card_up(sp); |
3897 | if (err) { | 3903 | if (err) { |
@@ -6471,6 +6477,7 @@ static void s2io_rem_isr(struct s2io_nic * sp) | |||
6471 | { | 6477 | { |
6472 | int cnt = 0; | 6478 | int cnt = 0; |
6473 | struct net_device *dev = sp->dev; | 6479 | struct net_device *dev = sp->dev; |
6480 | struct swStat *stats = &sp->mac_control.stats_info->sw_stat; | ||
6474 | 6481 | ||
6475 | if (sp->intr_type == MSI_X) { | 6482 | if (sp->intr_type == MSI_X) { |
6476 | int i; | 6483 | int i; |
@@ -6483,6 +6490,16 @@ static void s2io_rem_isr(struct s2io_nic * sp) | |||
6483 | 6490 | ||
6484 | free_irq(vector, arg); | 6491 | free_irq(vector, arg); |
6485 | } | 6492 | } |
6493 | |||
6494 | kfree(sp->entries); | ||
6495 | stats->mem_freed += | ||
6496 | (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); | ||
6497 | kfree(sp->s2io_entries); | ||
6498 | stats->mem_freed += | ||
6499 | (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); | ||
6500 | sp->entries = NULL; | ||
6501 | sp->s2io_entries = NULL; | ||
6502 | |||
6486 | pci_read_config_word(sp->pdev, 0x42, &msi_control); | 6503 | pci_read_config_word(sp->pdev, 0x42, &msi_control); |
6487 | msi_control &= 0xFFFE; /* Disable MSI */ | 6504 | msi_control &= 0xFFFE; /* Disable MSI */ |
6488 | pci_write_config_word(sp->pdev, 0x42, msi_control); | 6505 | pci_write_config_word(sp->pdev, 0x42, msi_control); |
@@ -7377,6 +7394,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7377 | dev->addr_len = ETH_ALEN; | 7394 | dev->addr_len = ETH_ALEN; |
7378 | memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); | 7395 | memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); |
7379 | 7396 | ||
7397 | /* Store the values of the MSIX table in the s2io_nic structure */ | ||
7398 | store_xmsi_data(sp); | ||
7380 | /* reset Nic and bring it to known state */ | 7399 | /* reset Nic and bring it to known state */ |
7381 | s2io_reset(sp); | 7400 | s2io_reset(sp); |
7382 | 7401 | ||