]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
tg3: Appropriately classify interrupts during request_irq
authorNithin Sujir <nsujir@broadcom.com>
Fri, 20 Sep 2013 23:47:00 +0000 (16:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Sep 2013 18:04:52 +0000 (14:04 -0400)
Distinguish between tx, rx and txrx interrupts.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c

index 00431bcefc41b2b046057d9aca4b1519713a7a63..6fd86457630a9ae5e7cfbe812e23e442e1a943b5 100644 (file)
@@ -11039,7 +11039,18 @@ static int tg3_request_irq(struct tg3 *tp, int irq_num)
                name = tp->dev->name;
        else {
                name = &tnapi->irq_lbl[0];
-               snprintf(name, IFNAMSIZ, "%s-%d", tp->dev->name, irq_num);
+               if (tnapi->tx_buffers && tnapi->rx_rcb)
+                       snprintf(name, IFNAMSIZ,
+                                "%s-txrx-%d", tp->dev->name, irq_num);
+               else if (tnapi->tx_buffers)
+                       snprintf(name, IFNAMSIZ,
+                                "%s-tx-%d", tp->dev->name, irq_num);
+               else if (tnapi->rx_rcb)
+                       snprintf(name, IFNAMSIZ,
+                                "%s-rx-%d", tp->dev->name, irq_num);
+               else
+                       snprintf(name, IFNAMSIZ,
+                                "%s-%d", tp->dev->name, irq_num);
                name[IFNAMSIZ-1] = 0;
        }