diff options
author | Harish Zunjarrao <harish.zunjarrao@qlogic.com> | 2011-08-12 02:51:27 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 08:36:44 -0600 |
commit | 6085491c34b37fa806f70ccd3fb2bf08416e9e98 (patch) | |
tree | 50ee5729de3dfce344ea525ee5c64c896cf7ca06 /drivers/scsi/qla4xxx/ql4_mbx.c | |
parent | 5232f801bd0cfb4122e9a28ff942965c3c485fa7 (diff) |
[SCSI] qla4xxx: Added Get ACB support using BSG
This command is used to read ACB params from firmware
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_mbx.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index dfc38aa8740d..de733a777803 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -1425,18 +1425,21 @@ int qla4xxx_disable_acb(struct scsi_qla_host *ha) return status; } -int qla4xxx_get_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, - uint32_t *mbox_sts, dma_addr_t acb_dma) +int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, + uint32_t acb_type, uint32_t len) { + uint32_t mbox_cmd[MBOX_REG_COUNT]; + uint32_t mbox_sts[MBOX_REG_COUNT]; int status = QLA_SUCCESS; - memset(mbox_cmd, 0, sizeof(mbox_cmd[0]) * MBOX_REG_COUNT); - memset(mbox_sts, 0, sizeof(mbox_sts[0]) * MBOX_REG_COUNT); + memset(&mbox_cmd, 0, sizeof(mbox_cmd)); + memset(&mbox_sts, 0, sizeof(mbox_sts)); + mbox_cmd[0] = MBOX_CMD_GET_ACB; - mbox_cmd[1] = 0; /* Primary ACB */ + mbox_cmd[1] = acb_type; mbox_cmd[2] = LSDW(acb_dma); mbox_cmd[3] = MSDW(acb_dma); - mbox_cmd[4] = sizeof(struct addr_ctrl_blk); + mbox_cmd[4] = len; status = qla4xxx_mailbox_command(ha, 5, 5, &mbox_cmd[0], &mbox_sts[0]); if (status != QLA_SUCCESS) { |