Commit f4ea431b authored by Stephen Hemminger's avatar Stephen Hemminger

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: default avatarStephen Hemminger <shemminger@osdl.org>
parent 6810b548
...@@ -122,6 +122,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table); ...@@ -122,6 +122,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table);
/* Avoid conditionals by using array */ /* Avoid conditionals by using array */
static const unsigned txqaddr[] = { Q_XA1, Q_XA2 }; static const unsigned txqaddr[] = { Q_XA1, Q_XA2 };
static const unsigned rxqaddr[] = { Q_R1, Q_R2 }; 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 */ /* This driver supports yukon2 chipset only */
static const char *yukon2_name[] = { static const char *yukon2_name[] = {
...@@ -1050,7 +1051,7 @@ static int sky2_up(struct net_device *dev) ...@@ -1050,7 +1051,7 @@ static int sky2_up(struct net_device *dev)
/* Enable interrupts from phy/mac for port */ /* Enable interrupts from phy/mac for port */
imask = sky2_read32(hw, B0_IMSK); 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); sky2_write32(hw, B0_IMSK, imask);
return 0; return 0;
...@@ -1401,7 +1402,7 @@ static int sky2_down(struct net_device *dev) ...@@ -1401,7 +1402,7 @@ static int sky2_down(struct net_device *dev)
/* Disable port IRQ */ /* Disable port IRQ */
imask = sky2_read32(hw, B0_IMSK); 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); sky2_write32(hw, B0_IMSK, imask);
/* turn off LED's */ /* turn off LED's */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment