Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c77dd43e77c530a12a466865805d2068ede96860
Commit:     c77dd43e77c530a12a466865805d2068ede96860
Parent:     8abc4d5b84f23edccf405aa591aae7d9b967e8d2
Author:     Sivakumar Subramani <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 6 05:36:28 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:50:24 2007 -0700

    S2IO: Fixes in MSIX related code.
    
    - Calling store_xmsi_data to store the MSI-X datas during initialization
      in s2io-init_nic function
    - Disabling NAPI when MSI-X is enabled
    - Freeing sp->entries and sp->s2io_entries in s2io_rem_isr
    
    Signed-off-by: Sivakumar Subramani <[EMAIL PROTECTED]>
    Signed-off-by: Ramkrishna Vepa <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/s2io.c |   19 +++++++++++++++++++
 drivers/net/s2io.h |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 5889382..e7b432c 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3892,6 +3892,12 @@ static int s2io_open(struct net_device *dev)
                }
        }
 
+       /* NAPI doesn't work well with MSI(X) */
+        if (sp->intr_type != INTA) {
+               if(sp->config.napi)
+                       sp->config.napi = 0;
+       }
+
        /* Initialize H/W and enable interrupts */
        err = s2io_card_up(sp);
        if (err) {
@@ -6471,6 +6477,7 @@ static void s2io_rem_isr(struct s2io_nic * sp)
 {
        int cnt = 0;
        struct net_device *dev = sp->dev;
+       struct swStat *stats = &sp->mac_control.stats_info->sw_stat;
 
        if (sp->intr_type == MSI_X) {
                int i;
@@ -6483,6 +6490,16 @@ static void s2io_rem_isr(struct s2io_nic * sp)
 
                        free_irq(vector, arg);
                }
+
+               kfree(sp->entries);
+               stats->mem_freed +=
+                       (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
+               kfree(sp->s2io_entries);
+               stats->mem_freed +=
+                       (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
+               sp->entries = NULL;
+               sp->s2io_entries = NULL;
+
                pci_read_config_word(sp->pdev, 0x42, &msi_control);
                msi_control &= 0xFFFE; /* Disable MSI */
                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)
        dev->addr_len = ETH_ALEN;
        memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN);
 
+        /* Store the values of the MSIX table in the s2io_nic structure */
+       store_xmsi_data(sp);
        /* reset Nic and bring it to known state */
        s2io_reset(sp);
 
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 62398fa..724948d 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -415,6 +415,7 @@ struct config_param {
 #define INTA   0
 #define MSI_X  2
        u8 intr_type;
+       u8 napi;
 
        /* Specifies if Tx Intr is UTILZ or PER_LIST type. */
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to