Skip to content

Commit

Permalink
[SCSI] qla2xxx: Correct display of ISP serial-number.
Browse files Browse the repository at this point in the history
The original serial-number calculations based on WWPN no longer
apply to newer ISPs (ISP24xx and ISP25xx).  These newer board's
serial number reside in the VPD.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 23, 2007
1 parent 6acf819 commit 8b7afc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ qla2x00_serial_num_show(struct class_device *cdev, char *buf)
scsi_qla_host_t *ha = shost_priv(class_to_shost(cdev));
uint32_t sn;

if (IS_FWI2_CAPABLE(ha))
return snprintf(buf, PAGE_SIZE, "\n");

sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | ha->serial1;
return snprintf(buf, PAGE_SIZE, "%c%05d\n", 'A' + sn / 100000,
sn % 100000);
Expand Down

0 comments on commit 8b7afc2

Please sign in to comment.