Skip to content

Commit

Permalink
[SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
Browse files Browse the repository at this point in the history
There is a case where 54xx HBA loads MID firmware as it use 24xx
firmware. In this case, the driver should issue
MBC_MID_INITIALIZE FIRMWARE even though the HBA doesn't support
NPIV.  This patch make changes in the driver so that could behave
accordingly.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Seokmann Ju authored and James Bottomley committed Jan 23, 2008
1 parent fc44765 commit c48339d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,9 @@ qla2x00_init_rings(scsi_qla_host_t *ha)

DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));

mid_init_cb->count = cpu_to_le16(ha->max_npiv_vports);
if (ha->flags.npiv_supported)
mid_init_cb->count = cpu_to_le16(ha->max_npiv_vports);

mid_init_cb->options = __constant_cpu_to_le16(BIT_1);

rval = qla2x00_init_firmware(ha, ha->init_cb_size);
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ qla2x00_init_firmware(scsi_qla_host_t *ha, uint16_t size)
DEBUG11(printk("qla2x00_init_firmware(%ld): entered.\n",
ha->host_no));

if (ha->flags.npiv_supported)
if (ha->fw_attributes & BIT_2)
mcp->mb[0] = MBC_MID_INITIALIZE_FIRMWARE;
else
mcp->mb[0] = MBC_INITIALIZE_FIRMWARE;
Expand Down

0 comments on commit c48339d

Please sign in to comment.