summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-05-09 14:46:54 -0700
committerStephen Hemminger <shemminger@osdl.org>2006-05-10 14:03:41 -0700
commitf4ea431bb7c4856b930eafca6eb1fb474dae9b40 (patch)
treebfcbf5d61116abe39bdeda39de20a5e2e7ac5234
parent6810b548b25114607e0814612d84125abccc0a4f (diff)
downloadlinux-3.10-f4ea431bb7c4856b930eafca6eb1fb474dae9b40.tar.gz
linux-3.10-f4ea431bb7c4856b930eafca6eb1fb474dae9b40.tar.bz2
linux-3.10-f4ea431bb7c4856b930eafca6eb1fb474dae9b40.zip
sky2: ifdown kills irq mask
Bringing down a port also masks off the status and other IRQ's needed for device to function due to missing paren's. Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-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 227df9876a2..27da9b75ded 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -122,6 +122,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[] = {
@@ -1050,7 +1051,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;
@@ -1401,7 +1402,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 */