]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
bnx2: Rename MSI-X vectors.
authorMichael Chan <mchan@broadcom.com>
Wed, 17 Dec 2008 04:27:45 +0000 (20:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Dec 2008 04:27:45 +0000 (20:27 -0800)
Change MSI-X vector names to "ethx-%d".

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c
drivers/net/bnx2.h

index 0e2218dadb3de7e3d76009e03cfe7740b3f61ec0..6ba2fecd89fcb0693c6a33d2d197355eaf177f79 100644 (file)
@@ -5827,6 +5827,8 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
 {
        int i, rc;
        struct msix_entry msix_ent[BNX2_MAX_MSIX_VEC];
+       struct net_device *dev = bp->dev;
+       const int len = sizeof(bp->irq_tbl[0].name);
 
        bnx2_setup_msix_tbl(bp);
        REG_WR(bp, BNX2_PCI_MSIX_CONTROL, BNX2_MAX_MSIX_HW_VEC - 1);
@@ -5837,7 +5839,7 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
                msix_ent[i].entry = i;
                msix_ent[i].vector = 0;
 
-               strcpy(bp->irq_tbl[i].name, bp->dev->name);
+               snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i);
                bp->irq_tbl[i].handler = bnx2_msi_1shot;
        }
 
index 2f43c45b7ad68f3cd197dbb6f97a4fc9e541ff80..88f962bff2d34beba6a0f28ec22c1337b12f2912 100644 (file)
@@ -6627,7 +6627,7 @@ struct bnx2_irq {
        irq_handler_t   handler;
        unsigned int    vector;
        u8              requested;
-       char            name[16];
+       char            name[IFNAMSIZ + 2];
 };
 
 struct bnx2_tx_ring_info {