diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 26 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 32 |
5 files changed, 61 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index c6dca5df7320..a8615921da81 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | |||
@@ -924,6 +924,7 @@ struct qlcnic_mac_vlan_list { | |||
924 | #define QLCNIC_FW_CAPABILITY_SET_DRV_VER BIT_5 | 924 | #define QLCNIC_FW_CAPABILITY_SET_DRV_VER BIT_5 |
925 | #define QLCNIC_FW_CAPABILITY_2_BEACON BIT_7 | 925 | #define QLCNIC_FW_CAPABILITY_2_BEACON BIT_7 |
926 | #define QLCNIC_FW_CAPABILITY_2_PER_PORT_ESWITCH_CFG BIT_9 | 926 | #define QLCNIC_FW_CAPABILITY_2_PER_PORT_ESWITCH_CFG BIT_9 |
927 | #define QLCNIC_FW_CAPABILITY_2_EXT_ISCSI_DUMP BIT_13 | ||
927 | 928 | ||
928 | #define QLCNIC_83XX_FW_CAPAB_ENCAP_RX_OFFLOAD BIT_0 | 929 | #define QLCNIC_83XX_FW_CAPAB_ENCAP_RX_OFFLOAD BIT_0 |
929 | #define QLCNIC_83XX_FW_CAPAB_ENCAP_TX_OFFLOAD BIT_1 | 930 | #define QLCNIC_83XX_FW_CAPAB_ENCAP_TX_OFFLOAD BIT_1 |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 172192d3606b..5ab3adf88166 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | |||
@@ -119,6 +119,7 @@ static const struct qlcnic_mailbox_metadata qlcnic_83xx_mbx_tbl[] = { | |||
119 | {QLCNIC_CMD_DCB_QUERY_CAP, 1, 2}, | 119 | {QLCNIC_CMD_DCB_QUERY_CAP, 1, 2}, |
120 | {QLCNIC_CMD_DCB_QUERY_PARAM, 1, 50}, | 120 | {QLCNIC_CMD_DCB_QUERY_PARAM, 1, 50}, |
121 | {QLCNIC_CMD_SET_INGRESS_ENCAP, 2, 1}, | 121 | {QLCNIC_CMD_SET_INGRESS_ENCAP, 2, 1}, |
122 | {QLCNIC_CMD_83XX_EXTEND_ISCSI_DUMP_CAP, 4, 1}, | ||
122 | }; | 123 | }; |
123 | 124 | ||
124 | const u32 qlcnic_83xx_ext_reg_tbl[] = { | 125 | const u32 qlcnic_83xx_ext_reg_tbl[] = { |
@@ -3514,6 +3515,31 @@ out: | |||
3514 | qlcnic_free_mbx_args(&cmd); | 3515 | qlcnic_free_mbx_args(&cmd); |
3515 | } | 3516 | } |
3516 | 3517 | ||
3518 | #define QLCNIC_83XX_ADD_PORT0 BIT_0 | ||
3519 | #define QLCNIC_83XX_ADD_PORT1 BIT_1 | ||
3520 | #define QLCNIC_83XX_EXTENDED_MEM_SIZE 13 /* In MB */ | ||
3521 | int qlcnic_83xx_extend_md_capab(struct qlcnic_adapter *adapter) | ||
3522 | { | ||
3523 | struct qlcnic_cmd_args cmd; | ||
3524 | int err; | ||
3525 | |||
3526 | err = qlcnic_alloc_mbx_args(&cmd, adapter, | ||
3527 | QLCNIC_CMD_83XX_EXTEND_ISCSI_DUMP_CAP); | ||
3528 | if (err) | ||
3529 | return err; | ||
3530 | |||
3531 | cmd.req.arg[1] = (QLCNIC_83XX_ADD_PORT0 | QLCNIC_83XX_ADD_PORT1); | ||
3532 | cmd.req.arg[2] = QLCNIC_83XX_EXTENDED_MEM_SIZE; | ||
3533 | cmd.req.arg[3] = QLCNIC_83XX_EXTENDED_MEM_SIZE; | ||
3534 | |||
3535 | err = qlcnic_issue_cmd(adapter, &cmd); | ||
3536 | if (err) | ||
3537 | dev_err(&adapter->pdev->dev, | ||
3538 | "failed to issue extend iSCSI minidump capability\n"); | ||
3539 | |||
3540 | return err; | ||
3541 | } | ||
3542 | |||
3517 | int qlcnic_83xx_reg_test(struct qlcnic_adapter *adapter) | 3543 | int qlcnic_83xx_reg_test(struct qlcnic_adapter *adapter) |
3518 | { | 3544 | { |
3519 | u32 major, minor, sub; | 3545 | u32 major, minor, sub; |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h index 999a90e2f697..331ae2c20f40 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | |||
@@ -627,6 +627,7 @@ int qlcnic_83xx_set_port_eswitch_status(struct qlcnic_adapter *, int, int *); | |||
627 | 627 | ||
628 | void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *); | 628 | void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *); |
629 | void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data); | 629 | void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data); |
630 | int qlcnic_83xx_extend_md_capab(struct qlcnic_adapter *); | ||
630 | int qlcnic_83xx_get_settings(struct qlcnic_adapter *, struct ethtool_cmd *); | 631 | int qlcnic_83xx_get_settings(struct qlcnic_adapter *, struct ethtool_cmd *); |
631 | int qlcnic_83xx_set_settings(struct qlcnic_adapter *, struct ethtool_cmd *); | 632 | int qlcnic_83xx_set_settings(struct qlcnic_adapter *, struct ethtool_cmd *); |
632 | void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *, | 633 | void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *, |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h index cbe2399c30a0..4bb33af8e2b3 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h | |||
@@ -109,6 +109,7 @@ enum qlcnic_regs { | |||
109 | #define QLCNIC_CMD_GET_LED_CONFIG 0x6A | 109 | #define QLCNIC_CMD_GET_LED_CONFIG 0x6A |
110 | #define QLCNIC_CMD_83XX_SET_DRV_VER 0x6F | 110 | #define QLCNIC_CMD_83XX_SET_DRV_VER 0x6F |
111 | #define QLCNIC_CMD_ADD_RCV_RINGS 0x0B | 111 | #define QLCNIC_CMD_ADD_RCV_RINGS 0x0B |
112 | #define QLCNIC_CMD_83XX_EXTEND_ISCSI_DUMP_CAP 0x37 | ||
112 | 113 | ||
113 | #define QLCNIC_INTRPT_INTX 1 | 114 | #define QLCNIC_INTRPT_INTX 1 |
114 | #define QLCNIC_INTRPT_MSIX 3 | 115 | #define QLCNIC_INTRPT_MSIX 3 |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c index 6f33e2d57f14..aca47fd4b06c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | |||
@@ -1396,19 +1396,51 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) | |||
1396 | return 0; | 1396 | return 0; |
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | static inline bool | ||
1400 | qlcnic_83xx_md_check_extended_dump_capability(struct qlcnic_adapter *adapter) | ||
1401 | { | ||
1402 | /* For special adapters (with 0x8830 device ID), where iSCSI firmware | ||
1403 | * dump needs to be captured as part of regular firmware dump | ||
1404 | * collection process, firmware exports it's capability through | ||
1405 | * capability registers | ||
1406 | */ | ||
1407 | return ((adapter->pdev->device == PCI_DEVICE_ID_QLOGIC_QLE8830) && | ||
1408 | (adapter->ahw->extra_capability[0] & | ||
1409 | QLCNIC_FW_CAPABILITY_2_EXT_ISCSI_DUMP)); | ||
1410 | } | ||
1411 | |||
1399 | void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *adapter) | 1412 | void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *adapter) |
1400 | { | 1413 | { |
1401 | u32 prev_version, current_version; | 1414 | u32 prev_version, current_version; |
1402 | struct qlcnic_hardware_context *ahw = adapter->ahw; | 1415 | struct qlcnic_hardware_context *ahw = adapter->ahw; |
1403 | struct qlcnic_fw_dump *fw_dump = &ahw->fw_dump; | 1416 | struct qlcnic_fw_dump *fw_dump = &ahw->fw_dump; |
1404 | struct pci_dev *pdev = adapter->pdev; | 1417 | struct pci_dev *pdev = adapter->pdev; |
1418 | bool extended = false; | ||
1405 | 1419 | ||
1406 | prev_version = adapter->fw_version; | 1420 | prev_version = adapter->fw_version; |
1407 | current_version = qlcnic_83xx_get_fw_version(adapter); | 1421 | current_version = qlcnic_83xx_get_fw_version(adapter); |
1408 | 1422 | ||
1409 | if (fw_dump->tmpl_hdr == NULL || current_version > prev_version) { | 1423 | if (fw_dump->tmpl_hdr == NULL || current_version > prev_version) { |
1410 | vfree(fw_dump->tmpl_hdr); | 1424 | vfree(fw_dump->tmpl_hdr); |
1425 | |||
1426 | if (qlcnic_83xx_md_check_extended_dump_capability(adapter)) | ||
1427 | extended = !qlcnic_83xx_extend_md_capab(adapter); | ||
1428 | |||
1411 | if (!qlcnic_fw_cmd_get_minidump_temp(adapter)) | 1429 | if (!qlcnic_fw_cmd_get_minidump_temp(adapter)) |
1412 | dev_info(&pdev->dev, "Supports FW dump capability\n"); | 1430 | dev_info(&pdev->dev, "Supports FW dump capability\n"); |
1431 | |||
1432 | /* Once we have minidump template with extended iSCSI dump | ||
1433 | * capability, update the minidump capture mask to 0x1f as | ||
1434 | * per FW requirement | ||
1435 | */ | ||
1436 | if (extended) { | ||
1437 | struct qlcnic_83xx_dump_template_hdr *hdr; | ||
1438 | |||
1439 | hdr = fw_dump->tmpl_hdr; | ||
1440 | hdr->drv_cap_mask = 0x1f; | ||
1441 | fw_dump->cap_mask = 0x1f; | ||
1442 | dev_info(&pdev->dev, | ||
1443 | "Extended iSCSI dump capability and updated capture mask to 0x1f\n"); | ||
1444 | } | ||
1413 | } | 1445 | } |
1414 | } | 1446 | } |