aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sky2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 227df9876a2c..27da9b75dedc 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -122,6 +122,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table);
122/* Avoid conditionals by using array */ 122/* Avoid conditionals by using array */
123static const unsigned txqaddr[] = { Q_XA1, Q_XA2 }; 123static const unsigned txqaddr[] = { Q_XA1, Q_XA2 };
124static const unsigned rxqaddr[] = { Q_R1, Q_R2 }; 124static const unsigned rxqaddr[] = { Q_R1, Q_R2 };
125static const u32 portirq_msk[] = { Y2_IS_PORT_1, Y2_IS_PORT_2 };
125 126
126/* This driver supports yukon2 chipset only */ 127/* This driver supports yukon2 chipset only */
127static const char *yukon2_name[] = { 128static const char *yukon2_name[] = {
@@ -1050,7 +1051,7 @@ static int sky2_up(struct net_device *dev)
1050 1051
1051 /* Enable interrupts from phy/mac for port */ 1052 /* Enable interrupts from phy/mac for port */
1052 imask = sky2_read32(hw, B0_IMSK); 1053 imask = sky2_read32(hw, B0_IMSK);
1053 imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; 1054 imask |= portirq_msk[port];
1054 sky2_write32(hw, B0_IMSK, imask); 1055 sky2_write32(hw, B0_IMSK, imask);
1055 1056
1056 return 0; 1057 return 0;
@@ -1401,7 +1402,7 @@ static int sky2_down(struct net_device *dev)
1401 1402
1402 /* Disable port IRQ */ 1403 /* Disable port IRQ */
1403 imask = sky2_read32(hw, B0_IMSK); 1404 imask = sky2_read32(hw, B0_IMSK);
1404 imask &= ~(sky2->port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; 1405 imask &= ~portirq_msk[port];
1405 sky2_write32(hw, B0_IMSK, imask); 1406 sky2_write32(hw, B0_IMSK, imask);
1406 1407
1407 /* turn off LED's */ 1408 /* turn off LED's */