tg3: Appropriately classify interrupts during request_irq

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>
This commit is contained in:
Nithin Sujir 2013-09-20 16:47:00 -07:00 committed by David S. Miller
parent 4bc814ab71
commit 21e315e15d

View 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;
}