]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/qla2xxx/qla_attr.c
[SCSI] qla2xxx: Correct display of ISP serial-number.
[linux-2.6-omap-h63xx.git] / drivers / scsi / qla2xxx / qla_attr.c
index 05fa7796a559d325a1c44f7eb04e6b3da08f5a8b..fb388b8c07cf9edf614a63d9b35726ffbc1bb7a7 100644 (file)
@@ -114,7 +114,6 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj,
 {
        struct scsi_qla_host *ha = shost_priv(dev_to_shost(container_of(kobj,
            struct device, kobj)));
-       unsigned long   flags;
        uint16_t        cnt;
 
        if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size)
@@ -144,11 +143,9 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj,
        }
 
        /* Write NVRAM. */
-       spin_lock_irqsave(&ha->hardware_lock, flags);
        ha->isp_ops->write_nvram(ha, (uint8_t *)buf, ha->nvram_base, count);
        ha->isp_ops->read_nvram(ha, (uint8_t *)ha->nvram, ha->nvram_base,
            count);
-       spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
        set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
 
@@ -397,16 +394,13 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj,
 {
        struct scsi_qla_host *ha = shost_priv(dev_to_shost(container_of(kobj,
            struct device, kobj)));
-       unsigned long flags;
 
        if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size)
                return 0;
 
        /* Write NVRAM. */
-       spin_lock_irqsave(&ha->hardware_lock, flags);
        ha->isp_ops->write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count);
        ha->isp_ops->read_nvram(ha, (uint8_t *)ha->vpd, ha->vpd_base, count);
-       spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
        return count;
 }
@@ -544,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);