summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-05-10 14:59:29 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-10 14:59:29 -0700
commit6314410dd1e9db1c0009b0f7b56cc771a4d1e85a (patch)
treedafb5034fbeb54ee608eb0740aae561f35782880 /drivers/net/sky2.c
parent7fc5b1e3a170d865f625e609c087cf8d84fd285d (diff)
parentd8e95e52a9db0e26b37f51ab5140b89da7c4b31e (diff)
downloadop-kernel-dev-6314410dd1e9db1c0009b0f7b56cc771a4d1e85a.zip
op-kernel-dev-6314410dd1e9db1c0009b0f7b56cc771a4d1e85a.tar.gz
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6: sis900: phy for FoxCon motherboard dl2k: use DMA_48BIT_MASK constant phy: mdiobus_register(): initialize all phy_map entries sky2: ifdown kills irq mask
Diffstat (limited to 'drivers/net/sky2.c')
-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 60cdfca..ffd267f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -128,6 +128,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table);
/* Avoid conditionals by using array */
static const unsigned txqaddr[] = { Q_XA1, Q_XA2 };
static const unsigned rxqaddr[] = { Q_R1, Q_R2 };
+static const u32 portirq_msk[] = { Y2_IS_PORT_1, Y2_IS_PORT_2 };
/* This driver supports yukon2 chipset only */
static const char *yukon2_name[] = {
@@ -1084,7 +1085,7 @@ static int sky2_up(struct net_device *dev)
/* Enable interrupts from phy/mac for port */
imask = sky2_read32(hw, B0_IMSK);
- imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
+ imask |= portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
return 0;
@@ -1435,7 +1436,7 @@ static int sky2_down(struct net_device *dev)
/* Disable port IRQ */
imask = sky2_read32(hw, B0_IMSK);
- imask &= ~(sky2->port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
+ imask &= ~portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
/* turn off LED's */
OpenPOWER on IntegriCloud