diff options
author | Manish Chopra <manish.chopra@qlogic.com> | 2013-04-24 08:42:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-24 19:34:05 -0400 |
commit | c0d79cd0684454a64af5926f38680d7124289c2a (patch) | |
tree | 8517419726758cbe3984e60c9ca5b198c02234a6 /drivers/net/ethernet/qlogic/qlcnic | |
parent | 6389b76dfdb0549649d48fb50ca03242fb16a705 (diff) |
qlcnic: Take EPORT out of reset sequence before disabling PAUSE
o Disabling PAUSE requires access to EPORT registers,
which may cause a wedge, if EPORT is in reset.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index 6ea3a096054c..ab1d8d99cbd5 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | |||
@@ -25,6 +25,17 @@ | |||
25 | #define QLC_83XX_OPCODE_TMPL_END 0x0080 | 25 | #define QLC_83XX_OPCODE_TMPL_END 0x0080 |
26 | #define QLC_83XX_OPCODE_POLL_READ_LIST 0x0100 | 26 | #define QLC_83XX_OPCODE_POLL_READ_LIST 0x0100 |
27 | 27 | ||
28 | /* EPORT control registers */ | ||
29 | #define QLC_83XX_RESET_CONTROL 0x28084E50 | ||
30 | #define QLC_83XX_RESET_REG 0x28084E60 | ||
31 | #define QLC_83XX_RESET_PORT0 0x28084E70 | ||
32 | #define QLC_83XX_RESET_PORT1 0x28084E80 | ||
33 | #define QLC_83XX_RESET_PORT2 0x28084E90 | ||
34 | #define QLC_83XX_RESET_PORT3 0x28084EA0 | ||
35 | #define QLC_83XX_RESET_SRESHIM 0x28084EB0 | ||
36 | #define QLC_83XX_RESET_EPGSHIM 0x28084EC0 | ||
37 | #define QLC_83XX_RESET_ETHERPCS 0x28084ED0 | ||
38 | |||
28 | static int qlcnic_83xx_init_default_driver(struct qlcnic_adapter *adapter); | 39 | static int qlcnic_83xx_init_default_driver(struct qlcnic_adapter *adapter); |
29 | static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev); | 40 | static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev); |
30 | static int qlcnic_83xx_restart_hw(struct qlcnic_adapter *adapter); | 41 | static int qlcnic_83xx_restart_hw(struct qlcnic_adapter *adapter); |
@@ -1374,6 +1385,19 @@ static void qlcnic_83xx_disable_pause_frames(struct qlcnic_adapter *adapter) | |||
1374 | qlcnic_83xx_unlock_driver(adapter); | 1385 | qlcnic_83xx_unlock_driver(adapter); |
1375 | } | 1386 | } |
1376 | 1387 | ||
1388 | static void qlcnic_83xx_take_eport_out_of_reset(struct qlcnic_adapter *adapter) | ||
1389 | { | ||
1390 | QLCWR32(adapter, QLC_83XX_RESET_REG, 0); | ||
1391 | QLCWR32(adapter, QLC_83XX_RESET_PORT0, 0); | ||
1392 | QLCWR32(adapter, QLC_83XX_RESET_PORT1, 0); | ||
1393 | QLCWR32(adapter, QLC_83XX_RESET_PORT2, 0); | ||
1394 | QLCWR32(adapter, QLC_83XX_RESET_PORT3, 0); | ||
1395 | QLCWR32(adapter, QLC_83XX_RESET_SRESHIM, 0); | ||
1396 | QLCWR32(adapter, QLC_83XX_RESET_EPGSHIM, 0); | ||
1397 | QLCWR32(adapter, QLC_83XX_RESET_ETHERPCS, 0); | ||
1398 | QLCWR32(adapter, QLC_83XX_RESET_CONTROL, 1); | ||
1399 | } | ||
1400 | |||
1377 | static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev) | 1401 | static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev) |
1378 | { | 1402 | { |
1379 | u32 heartbeat, peg_status; | 1403 | u32 heartbeat, peg_status; |
@@ -1395,6 +1419,7 @@ static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev) | |||
1395 | 1419 | ||
1396 | if (ret) { | 1420 | if (ret) { |
1397 | dev_err(&p_dev->pdev->dev, "firmware hang detected\n"); | 1421 | dev_err(&p_dev->pdev->dev, "firmware hang detected\n"); |
1422 | qlcnic_83xx_take_eport_out_of_reset(p_dev); | ||
1398 | qlcnic_83xx_disable_pause_frames(p_dev); | 1423 | qlcnic_83xx_disable_pause_frames(p_dev); |
1399 | peg_status = QLC_SHARED_REG_RD32(p_dev, | 1424 | peg_status = QLC_SHARED_REG_RD32(p_dev, |
1400 | QLCNIC_PEG_HALT_STATUS1); | 1425 | QLCNIC_PEG_HALT_STATUS1); |