Commit 92c48799 authored by Sivakumar Subramani's avatar Sivakumar Subramani Committed by David S. Miller

S2IO: Fixed Link LED issue when MSI-X is enabled

-Fixed Link LED issue when MSI-X is enabled.
Signed-off-by: default avatarSivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: default avatarRamkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent c77dd43e
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
#include "s2io.h" #include "s2io.h"
#include "s2io-regs.h" #include "s2io-regs.h"
#define DRV_VERSION "2.0.25.1" #define DRV_VERSION "2.0.26.1"
/* S2io Driver name & version. */ /* S2io Driver name & version. */
static char s2io_driver_name[] = "Neterion"; static char s2io_driver_name[] = "Neterion";
...@@ -6201,13 +6201,10 @@ static void s2io_set_link(struct work_struct *work) ...@@ -6201,13 +6201,10 @@ static void s2io_set_link(struct work_struct *work)
netif_stop_queue(dev); netif_stop_queue(dev);
} }
} }
val64 = readq(&bar0->adapter_status); val64 = readq(&bar0->adapter_control);
if (!LINK_IS_UP(val64)) { val64 |= ADAPTER_LED_ON;
DBG_PRINT(ERR_DBG, "%s:", dev->name); writeq(val64, &bar0->adapter_control);
DBG_PRINT(ERR_DBG, " Link down after enabling "); s2io_link(nic, LINK_UP);
DBG_PRINT(ERR_DBG, "device \n");
} else
s2io_link(nic, LINK_UP);
} else { } else {
if (CARDS_WITH_FAULTY_LINK_INDICATORS(nic->device_type, if (CARDS_WITH_FAULTY_LINK_INDICATORS(nic->device_type,
subid)) { subid)) {
...@@ -6216,6 +6213,10 @@ static void s2io_set_link(struct work_struct *work) ...@@ -6216,6 +6213,10 @@ static void s2io_set_link(struct work_struct *work)
writeq(val64, &bar0->gpio_control); writeq(val64, &bar0->gpio_control);
val64 = readq(&bar0->gpio_control); val64 = readq(&bar0->gpio_control);
} }
/* turn off LED */
val64 = readq(&bar0->adapter_control);
val64 = val64 &(~ADAPTER_LED_ON);
writeq(val64, &bar0->adapter_control);
s2io_link(nic, LINK_DOWN); s2io_link(nic, LINK_DOWN);
} }
clear_bit(0, &(nic->link_state)); clear_bit(0, &(nic->link_state));
......
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