diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 60cdfcabe1fd..ffd267fab21d 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -128,6 +128,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table); | |||
128 | /* Avoid conditionals by using array */ | 128 | /* Avoid conditionals by using array */ |
129 | static const unsigned txqaddr[] = { Q_XA1, Q_XA2 }; | 129 | static const unsigned txqaddr[] = { Q_XA1, Q_XA2 }; |
130 | static const unsigned rxqaddr[] = { Q_R1, Q_R2 }; | 130 | static const unsigned rxqaddr[] = { Q_R1, Q_R2 }; |
131 | static const u32 portirq_msk[] = { Y2_IS_PORT_1, Y2_IS_PORT_2 }; | ||
131 | 132 | ||
132 | /* This driver supports yukon2 chipset only */ | 133 | /* This driver supports yukon2 chipset only */ |
133 | static const char *yukon2_name[] = { | 134 | static const char *yukon2_name[] = { |
@@ -1084,7 +1085,7 @@ static int sky2_up(struct net_device *dev) | |||
1084 | 1085 | ||
1085 | /* Enable interrupts from phy/mac for port */ | 1086 | /* Enable interrupts from phy/mac for port */ |
1086 | imask = sky2_read32(hw, B0_IMSK); | 1087 | imask = sky2_read32(hw, B0_IMSK); |
1087 | imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; | 1088 | imask |= portirq_msk[port]; |
1088 | sky2_write32(hw, B0_IMSK, imask); | 1089 | sky2_write32(hw, B0_IMSK, imask); |
1089 | 1090 | ||
1090 | return 0; | 1091 | return 0; |
@@ -1435,7 +1436,7 @@ static int sky2_down(struct net_device *dev) | |||
1435 | 1436 | ||
1436 | /* Disable port IRQ */ | 1437 | /* Disable port IRQ */ |
1437 | imask = sky2_read32(hw, B0_IMSK); | 1438 | imask = sky2_read32(hw, B0_IMSK); |
1438 | imask &= ~(sky2->port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; | 1439 | imask &= ~portirq_msk[port]; |
1439 | sky2_write32(hw, B0_IMSK, imask); | 1440 | sky2_write32(hw, B0_IMSK, imask); |
1440 | 1441 | ||
1441 | /* turn off LED's */ | 1442 | /* turn off LED's */ |