[SCSI] qla2xxx: Correctly read sfp single byte mailbox register.
When reading a single byte using the READ SFP mailbox command, the single byte of data is returned in MB[1] and not MB[8]. The reason that MB[8] was being used is that the spec was unclear as it evolved over time; and we have not needed to read a single byte until recently. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
d652e09370
commit
1bff6cc8fb
1 changed files with 2 additions and 2 deletions
|
@ -3608,14 +3608,14 @@ qla2x00_read_edc(scsi_qla_host_t *vha, uint16_t dev, uint16_t adr,
|
||||||
mcp->mb[9] = adr;
|
mcp->mb[9] = adr;
|
||||||
mcp->mb[10] = opt;
|
mcp->mb[10] = opt;
|
||||||
mcp->out_mb = MBX_10|MBX_9|MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
|
mcp->out_mb = MBX_10|MBX_9|MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
|
||||||
mcp->in_mb = MBX_0;
|
mcp->in_mb = MBX_1|MBX_0;
|
||||||
mcp->tov = MBX_TOV_SECONDS;
|
mcp->tov = MBX_TOV_SECONDS;
|
||||||
mcp->flags = 0;
|
mcp->flags = 0;
|
||||||
rval = qla2x00_mailbox_command(vha, mcp);
|
rval = qla2x00_mailbox_command(vha, mcp);
|
||||||
|
|
||||||
if (opt & BIT_0)
|
if (opt & BIT_0)
|
||||||
if (sfp)
|
if (sfp)
|
||||||
*sfp = mcp->mb[8];
|
*sfp = mcp->mb[1];
|
||||||
|
|
||||||
if (rval != QLA_SUCCESS) {
|
if (rval != QLA_SUCCESS) {
|
||||||
DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__,
|
DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__,
|
||||||
|
|
Loading…
Add table
Reference in a new issue