diff options
author | Harish Zunjarrao <harish.zunjarrao@qlogic.com> | 2011-08-12 05:51:27 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:36:44 -0400 |
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) | |||
1425 | return status; | 1425 | return status; |
1426 | } | 1426 | } |
1427 | 1427 | ||
1428 | int qla4xxx_get_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, | 1428 | int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, |
1429 | uint32_t *mbox_sts, dma_addr_t acb_dma) | 1429 | uint32_t acb_type, uint32_t len) |
1430 | { | 1430 | { |
1431 | uint32_t mbox_cmd[MBOX_REG_COUNT]; | ||
1432 | uint32_t mbox_sts[MBOX_REG_COUNT]; | ||
1431 | int status = QLA_SUCCESS; | 1433 | int status = QLA_SUCCESS; |
1432 | 1434 | ||
1433 | memset(mbox_cmd, 0, sizeof(mbox_cmd[0]) * MBOX_REG_COUNT); | 1435 | memset(&mbox_cmd, 0, sizeof(mbox_cmd)); |
1434 | memset(mbox_sts, 0, sizeof(mbox_sts[0]) * MBOX_REG_COUNT); | 1436 | memset(&mbox_sts, 0, sizeof(mbox_sts)); |
1437 | |||
1435 | mbox_cmd[0] = MBOX_CMD_GET_ACB; | 1438 | mbox_cmd[0] = MBOX_CMD_GET_ACB; |
1436 | mbox_cmd[1] = 0; /* Primary ACB */ | 1439 | mbox_cmd[1] = acb_type; |
1437 | mbox_cmd[2] = LSDW(acb_dma); | 1440 | mbox_cmd[2] = LSDW(acb_dma); |
1438 | mbox_cmd[3] = MSDW(acb_dma); | 1441 | mbox_cmd[3] = MSDW(acb_dma); |
1439 | mbox_cmd[4] = sizeof(struct addr_ctrl_blk); | 1442 | mbox_cmd[4] = len; |
1440 | 1443 | ||
1441 | status = qla4xxx_mailbox_command(ha, 5, 5, &mbox_cmd[0], &mbox_sts[0]); | 1444 | status = qla4xxx_mailbox_command(ha, 5, 5, &mbox_cmd[0], &mbox_sts[0]); |
1442 | if (status != QLA_SUCCESS) { | 1445 | if (status != QLA_SUCCESS) { |