]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_transport_sas.c
Pull sn-handle-sc-powerdown into release branch
[linux-2.6] / drivers / scsi / scsi_transport_sas.c
index fb6641b42dfa2e8750690d8f3f4fdca2e808e129..210dab5879fa354bb99031f3e0981ca40e14c446 100644 (file)
@@ -377,7 +377,7 @@ static void sas_phy_release(struct device *dev)
 /**
  * sas_phy_alloc  --  allocates and initialize a SAS PHY structure
  * @parent:    Parent device
- * @number:    Port number
+ * @number:    Phy index
  *
  * Allocates an SAS PHY structure.  It will be added in the device tree
  * below the device specified by @parent, which has to be either a Scsi_Host
@@ -595,8 +595,8 @@ struct sas_rphy *sas_rphy_alloc(struct sas_phy *parent)
        device_initialize(&rphy->dev);
        rphy->dev.parent = get_device(&parent->dev);
        rphy->dev.release = sas_rphy_release;
-       sprintf(rphy->dev.bus_id, "rphy-%d:%d",
-               shost->host_no, parent->number);
+       sprintf(rphy->dev.bus_id, "rphy-%d:%d-%d",
+               shost->host_no, parent->port_identifier, parent->number);
        transport_setup_device(&rphy->dev);
 
        return rphy;
@@ -638,7 +638,7 @@ int sas_rphy_add(struct sas_rphy *rphy)
        mutex_unlock(&sas_host->lock);
 
        if (rphy->scsi_target_id != -1) {
-               scsi_scan_target(&rphy->dev, parent->number,
+               scsi_scan_target(&rphy->dev, parent->port_identifier,
                                rphy->scsi_target_id, ~0, 0);
        }
 
@@ -745,9 +745,9 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
                if (rphy->scsi_target_id == -1)
                        continue;
 
-               if ((channel == SCAN_WILD_CARD || channel == parent->number) &&
+               if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) &&
                    (id == SCAN_WILD_CARD || id == rphy->scsi_target_id)) {
-                       scsi_scan_target(&rphy->dev, parent->number,
+                       scsi_scan_target(&rphy->dev, parent->port_identifier,
                                         rphy->scsi_target_id, lun, 1);
                }
        }