aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2015-04-09 15:00:02 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-10 11:42:18 -0400
commit064135e01e0abc21bad9dfb9ae42d0b88c87ed32 (patch)
tree191bb3210c1e779297a5a7b809dcd505afbcc54d /drivers/scsi
parent0137e59e6271fc91f9e6c854d7833ad8ff8cb50b (diff)
qla2xxx: Add serdes read/write support for ISP27XX
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 72971daa2552..fe7b87d4ed86 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2838,7 +2838,7 @@ qla2x00_write_serdes_word(scsi_qla_host_t *vha, uint16_t addr, uint16_t data)
2838 mbx_cmd_t mc; 2838 mbx_cmd_t mc;
2839 mbx_cmd_t *mcp = &mc; 2839 mbx_cmd_t *mcp = &mc;
2840 2840
2841 if (!IS_QLA2031(vha->hw)) 2841 if (!IS_QLA2031(vha->hw) && !IS_QLA27XX(vha->hw))
2842 return QLA_FUNCTION_FAILED; 2842 return QLA_FUNCTION_FAILED;
2843 2843
2844 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1182, 2844 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1182,
@@ -2846,7 +2846,11 @@ qla2x00_write_serdes_word(scsi_qla_host_t *vha, uint16_t addr, uint16_t data)
2846 2846
2847 mcp->mb[0] = MBC_WRITE_SERDES; 2847 mcp->mb[0] = MBC_WRITE_SERDES;
2848 mcp->mb[1] = addr; 2848 mcp->mb[1] = addr;
2849 mcp->mb[2] = data & 0xff; 2849 if (IS_QLA2031(vha->hw))
2850 mcp->mb[2] = data & 0xff;
2851 else
2852 mcp->mb[2] = data;
2853
2850 mcp->mb[3] = 0; 2854 mcp->mb[3] = 0;
2851 mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; 2855 mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0;
2852 mcp->in_mb = MBX_0; 2856 mcp->in_mb = MBX_0;
@@ -2872,7 +2876,7 @@ qla2x00_read_serdes_word(scsi_qla_host_t *vha, uint16_t addr, uint16_t *data)
2872 mbx_cmd_t mc; 2876 mbx_cmd_t mc;
2873 mbx_cmd_t *mcp = &mc; 2877 mbx_cmd_t *mcp = &mc;
2874 2878
2875 if (!IS_QLA2031(vha->hw)) 2879 if (!IS_QLA2031(vha->hw) && !IS_QLA27XX(vha->hw))
2876 return QLA_FUNCTION_FAILED; 2880 return QLA_FUNCTION_FAILED;
2877 2881
2878 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1185, 2882 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1185,
@@ -2887,7 +2891,10 @@ qla2x00_read_serdes_word(scsi_qla_host_t *vha, uint16_t addr, uint16_t *data)
2887 mcp->flags = 0; 2891 mcp->flags = 0;
2888 rval = qla2x00_mailbox_command(vha, mcp); 2892 rval = qla2x00_mailbox_command(vha, mcp);
2889 2893
2890 *data = mcp->mb[1] & 0xff; 2894 if (IS_QLA2031(vha->hw))
2895 *data = mcp->mb[1] & 0xff;
2896 else
2897 *data = mcp->mb[1];
2891 2898
2892 if (rval != QLA_SUCCESS) { 2899 if (rval != QLA_SUCCESS) {
2893 ql_dbg(ql_dbg_mbx, vha, 0x1186, 2900 ql_dbg(ql_dbg_mbx, vha, 0x1186,