Message ID | 1551285309-118346-1-git-send-email-john.garry@huawei.com |
---|---|
State | New |
Headers | show |
Series | scsi: libsas: Fix rphy phy_identifier for PHYs with end devices attached | expand |
On Thu, Feb 28, 2019 at 12:35:09AM +0800, John Garry wrote: > Commit ffeafdd2bf0b280d67ec1a47ea6287910d271f3f upstream. > > The sysfs phy_identifier attribute for a sas_end_device comes from the rphy > phy_identifier value. Now queued up, thanks. greg k-h
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 17eb4185f29d..f21c93bbb35c 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -828,6 +828,7 @@ static struct domain_device *sas_ex_discover_end_dev( rphy = sas_end_device_alloc(phy->port); if (!rphy) goto out_free; + rphy->identify.phy_identifier = phy_id; child->rphy = rphy; get_device(&rphy->dev); @@ -854,6 +855,7 @@ static struct domain_device *sas_ex_discover_end_dev( child->rphy = rphy; get_device(&rphy->dev); + rphy->identify.phy_identifier = phy_id; sas_fill_in_rphy(child, rphy); list_add_tail(&child->disco_list_node, &parent->port->disco_list);