diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 67 |
1 files changed, 48 insertions, 19 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index a683e766d1ae..32fdc2a66dd1 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * QLogic Fibre Channel HBA Driver | 2 | * QLogic Fibre Channel HBA Driver |
3 | * Copyright (c) 2003-2011 QLogic Corporation | 3 | * Copyright (c) 2003-2012 QLogic Corporation |
4 | * | 4 | * |
5 | * See LICENSE.qla2xxx for copyright and licensing details. | 5 | * See LICENSE.qla2xxx for copyright and licensing details. |
6 | */ | 6 | */ |
@@ -966,16 +966,16 @@ qla2xxx_get_idc_param(scsi_qla_host_t *vha) | |||
966 | QLA82XX_IDC_PARAM_ADDR , 8); | 966 | QLA82XX_IDC_PARAM_ADDR , 8); |
967 | 967 | ||
968 | if (*wptr == __constant_cpu_to_le32(0xffffffff)) { | 968 | if (*wptr == __constant_cpu_to_le32(0xffffffff)) { |
969 | ha->nx_dev_init_timeout = QLA82XX_ROM_DEV_INIT_TIMEOUT; | 969 | ha->fcoe_dev_init_timeout = QLA82XX_ROM_DEV_INIT_TIMEOUT; |
970 | ha->nx_reset_timeout = QLA82XX_ROM_DRV_RESET_ACK_TIMEOUT; | 970 | ha->fcoe_reset_timeout = QLA82XX_ROM_DRV_RESET_ACK_TIMEOUT; |
971 | } else { | 971 | } else { |
972 | ha->nx_dev_init_timeout = le32_to_cpu(*wptr++); | 972 | ha->fcoe_dev_init_timeout = le32_to_cpu(*wptr++); |
973 | ha->nx_reset_timeout = le32_to_cpu(*wptr); | 973 | ha->fcoe_reset_timeout = le32_to_cpu(*wptr); |
974 | } | 974 | } |
975 | ql_dbg(ql_dbg_init, vha, 0x004e, | 975 | ql_dbg(ql_dbg_init, vha, 0x004e, |
976 | "nx_dev_init_timeout=%d " | 976 | "fcoe_dev_init_timeout=%d " |
977 | "nx_reset_timeout=%d.\n", ha->nx_dev_init_timeout, | 977 | "fcoe_reset_timeout=%d.\n", ha->fcoe_dev_init_timeout, |
978 | ha->nx_reset_timeout); | 978 | ha->fcoe_reset_timeout); |
979 | return; | 979 | return; |
980 | } | 980 | } |
981 | 981 | ||
@@ -1017,7 +1017,7 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) | |||
1017 | !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) | 1017 | !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) |
1018 | return; | 1018 | return; |
1019 | 1019 | ||
1020 | if (ha->flags.isp82xx_reset_hdlr_active) | 1020 | if (ha->flags.nic_core_reset_hdlr_active) |
1021 | return; | 1021 | return; |
1022 | 1022 | ||
1023 | ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr, | 1023 | ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr, |
@@ -1662,6 +1662,23 @@ qla24xx_beacon_blink(struct scsi_qla_host *vha) | |||
1662 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 1662 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
1663 | } | 1663 | } |
1664 | 1664 | ||
1665 | static uint32_t | ||
1666 | qla83xx_select_led_port(struct qla_hw_data *ha) | ||
1667 | { | ||
1668 | uint32_t led_select_value = 0; | ||
1669 | |||
1670 | if (!IS_QLA83XX(ha)) | ||
1671 | goto out; | ||
1672 | |||
1673 | if (ha->flags.port0) | ||
1674 | led_select_value = QLA83XX_LED_PORT0; | ||
1675 | else | ||
1676 | led_select_value = QLA83XX_LED_PORT1; | ||
1677 | |||
1678 | out: | ||
1679 | return led_select_value; | ||
1680 | } | ||
1681 | |||
1665 | void | 1682 | void |
1666 | qla83xx_beacon_blink(struct scsi_qla_host *vha) | 1683 | qla83xx_beacon_blink(struct scsi_qla_host *vha) |
1667 | { | 1684 | { |
@@ -1669,22 +1686,34 @@ qla83xx_beacon_blink(struct scsi_qla_host *vha) | |||
1669 | struct qla_hw_data *ha = vha->hw; | 1686 | struct qla_hw_data *ha = vha->hw; |
1670 | uint16_t led_cfg[6]; | 1687 | uint16_t led_cfg[6]; |
1671 | uint16_t orig_led_cfg[6]; | 1688 | uint16_t orig_led_cfg[6]; |
1689 | uint32_t led_10_value, led_43_value; | ||
1672 | 1690 | ||
1673 | if (!IS_QLA83XX(ha) && !IS_QLA81XX(ha)) | 1691 | if (!IS_QLA83XX(ha) && !IS_QLA81XX(ha)) |
1674 | return; | 1692 | return; |
1675 | 1693 | ||
1676 | if (IS_QLA2031(ha) && ha->beacon_blink_led) { | 1694 | if (!ha->beacon_blink_led) |
1677 | if (ha->flags.port0) | 1695 | return; |
1678 | led_select_value = 0x00201320; | 1696 | |
1679 | else | 1697 | if (IS_QLA2031(ha)) { |
1680 | led_select_value = 0x00201328; | 1698 | led_select_value = qla83xx_select_led_port(ha); |
1681 | 1699 | ||
1682 | qla83xx_write_remote_reg(vha, led_select_value, 0x40002000); | 1700 | qla83xx_wr_reg(vha, led_select_value, 0x40002000); |
1683 | qla83xx_write_remote_reg(vha, led_select_value + 4, 0x40002000); | 1701 | qla83xx_wr_reg(vha, led_select_value + 4, 0x40002000); |
1702 | msleep(1000); | ||
1703 | qla83xx_wr_reg(vha, led_select_value, 0x40004000); | ||
1704 | qla83xx_wr_reg(vha, led_select_value + 4, 0x40004000); | ||
1705 | } else if (IS_QLA8031(ha)) { | ||
1706 | led_select_value = qla83xx_select_led_port(ha); | ||
1707 | |||
1708 | qla83xx_rd_reg(vha, led_select_value, &led_10_value); | ||
1709 | qla83xx_rd_reg(vha, led_select_value + 0x10, &led_43_value); | ||
1710 | qla83xx_wr_reg(vha, led_select_value, 0x01f44000); | ||
1711 | msleep(500); | ||
1712 | qla83xx_wr_reg(vha, led_select_value, 0x400001f4); | ||
1684 | msleep(1000); | 1713 | msleep(1000); |
1685 | qla83xx_write_remote_reg(vha, led_select_value, 0x40004000); | 1714 | qla83xx_wr_reg(vha, led_select_value, led_10_value); |
1686 | qla83xx_write_remote_reg(vha, led_select_value + 4, 0x40004000); | 1715 | qla83xx_wr_reg(vha, led_select_value + 0x10, led_43_value); |
1687 | } else if ((IS_QLA8031(ha) || IS_QLA81XX(ha)) && ha->beacon_blink_led) { | 1716 | } else if (IS_QLA81XX(ha)) { |
1688 | int rval; | 1717 | int rval; |
1689 | 1718 | ||
1690 | /* Save Current */ | 1719 | /* Save Current */ |