diff options
author | Armen Baloyan <armen.baloyan@qlogic.com> | 2013-10-30 03:38:21 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-12-19 10:38:59 -0500 |
commit | 767157c5d362152938d22b803944f6a3163ed94f (patch) | |
tree | 0e19980c2ae4c2a6bc757fdd4d3c69ab8058f907 | |
parent | 02a9ae6e31975e97777a4e3db6e33e059f256c05 (diff) |
[SCSI] qla2xxx: Add logic to abort BSG commands for ISPFX00.
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index 034f86d9a368..316fb64a64a7 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c | |||
@@ -1883,6 +1883,7 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) | |||
1883 | goto done_free_sp; | 1883 | goto done_free_sp; |
1884 | } | 1884 | } |
1885 | break; | 1885 | break; |
1886 | case FXDISC_ABORT_IOCTL: | ||
1886 | default: | 1887 | default: |
1887 | break; | 1888 | break; |
1888 | } | 1889 | } |
@@ -2011,7 +2012,11 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) | |||
2011 | ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, | 2012 | ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, |
2012 | (uint8_t *)pinfo, 16); | 2013 | (uint8_t *)pinfo, 16); |
2013 | memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE); | 2014 | memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE); |
2014 | } | 2015 | } else if (fx_type == FXDISC_ABORT_IOCTL) |
2016 | fdisc->u.fxiocb.result = | ||
2017 | (fdisc->u.fxiocb.result == cpu_to_le32(0x68)) ? | ||
2018 | cpu_to_le32(QLA_SUCCESS) : cpu_to_le32(QLA_FUNCTION_FAILED); | ||
2019 | |||
2015 | rval = le32_to_cpu(fdisc->u.fxiocb.result); | 2020 | rval = le32_to_cpu(fdisc->u.fxiocb.result); |
2016 | 2021 | ||
2017 | done_unmap_dma: | 2022 | done_unmap_dma: |
@@ -2110,6 +2115,10 @@ qlafx00_abort_command(srb_t *sp) | |||
2110 | /* Command not found. */ | 2115 | /* Command not found. */ |
2111 | return QLA_FUNCTION_FAILED; | 2116 | return QLA_FUNCTION_FAILED; |
2112 | } | 2117 | } |
2118 | if (sp->type == SRB_FXIOCB_DCMD) | ||
2119 | return qlafx00_fx_disc(vha, &vha->hw->mr.fcport, | ||
2120 | FXDISC_ABORT_IOCTL); | ||
2121 | |||
2113 | return qlafx00_async_abt_cmd(sp); | 2122 | return qlafx00_async_abt_cmd(sp); |
2114 | } | 2123 | } |
2115 | 2124 | ||
diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h index a5ddea64e55a..c8b8acd31d44 100644 --- a/drivers/scsi/qla2xxx/qla_mr.h +++ b/drivers/scsi/qla2xxx/qla_mr.h | |||
@@ -343,6 +343,7 @@ struct config_info_data { | |||
343 | #define FXDISC_GET_TGT_NODE_INFO 0x80 | 343 | #define FXDISC_GET_TGT_NODE_INFO 0x80 |
344 | #define FXDISC_GET_TGT_NODE_LIST 0x81 | 344 | #define FXDISC_GET_TGT_NODE_LIST 0x81 |
345 | #define FXDISC_REG_HOST_INFO 0x99 | 345 | #define FXDISC_REG_HOST_INFO 0x99 |
346 | #define FXDISC_ABORT_IOCTL 0xff | ||
346 | 347 | ||
347 | #define QLAFX00_HBA_ICNTRL_REG 0x20B08 | 348 | #define QLAFX00_HBA_ICNTRL_REG 0x20B08 |
348 | #define QLAFX00_ICR_ENB_MASK 0x80000000 | 349 | #define QLAFX00_ICR_ENB_MASK 0x80000000 |