From: Andrew Vasquez Date: Fri, 19 Oct 2007 22:59:19 +0000 (-0700) Subject: [SCSI] qla2xxx: Correct display of ISP serial-number. X-Git-Tag: v2.6.24-rc1~19^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8b7afc2a90d93d87d53732a9281c22facebe8d62;p=linux-2.6-omap-h63xx.git [SCSI] qla2xxx: Correct display of ISP serial-number. 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 2f0bd5abb9a..fb388b8c07c 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -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);