]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/scsi/qla2xxx/qla_os.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm-smp
[mv-sheeva.git] / drivers / scsi / qla2xxx / qla_os.c
index fd7e730bb3ba3ff3f43137bc30bf87a64f314813..9000659bfbcfcccd21ff6d4e68563f78b650e487 100644 (file)
@@ -2,7 +2,7 @@
  *                  QLOGIC LINUX SOFTWARE
  *
  * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
+ * Copyright (C) 2003-2005 QLogic Corporation
  * (www.qlogic.com)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -317,6 +317,10 @@ qla2x00_fw_version_str(struct scsi_qla_host *ha, char *str)
 char *
 qla24xx_fw_version_str(struct scsi_qla_host *ha, char *str)
 {
+       sprintf(str, "%d.%02d.%02d ", ha->fw_major_version,
+           ha->fw_minor_version,
+           ha->fw_subminor_version);
+
        if (ha->fw_attributes & BIT_0)
                strcat(str, "[Class 2] ");
        if (ha->fw_attributes & BIT_1)
@@ -326,7 +330,6 @@ qla24xx_fw_version_str(struct scsi_qla_host *ha, char *str)
        if (ha->fw_attributes & BIT_13)
                strcat(str, "[Experimental]");
        return str;
-
 }
 
 static inline srb_t *
@@ -1068,26 +1071,12 @@ qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport)
 static int
 qla2xxx_slave_alloc(struct scsi_device *sdev)
 {
-       scsi_qla_host_t *ha = to_qla_host(sdev->host);
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
-       fc_port_t *fcport;
-       int found;
 
        if (!rport)
                return -ENXIO;
 
-       found = 0;
-       list_for_each_entry(fcport, &ha->fcports, list) {
-               if (rport->port_name ==
-                   be64_to_cpu(*(uint64_t *)fcport->port_name)) {
-                       found++;
-                       break;
-               }
-       }
-       if (!found)
-               return -ENXIO;
-
-       sdev->hostdata = fcport;
+       sdev->hostdata = rport->dd_data;
 
        return 0;
 }