Commit 77c309f3cdf9e217032dfe330f5881d352bb0436
Committed by
James Bottomley
1 parent
899fcf40f3
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
[SCSI] libsas: fixup target_port_protocols for expanders that don't report sata
If discovery returns 0 for target_port_protocols but shows an attached sata device, just report SAS_PROTOCOL_SATA in the identify data so userspace can reliably search for sata devices in the domain. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
drivers/scsi/libsas/sas_expander.c
... | ... | @@ -251,6 +251,8 @@ |
251 | 251 | phy->phy->identify.device_type = dr->attached_dev_type; |
252 | 252 | phy->phy->identify.initiator_port_protocols = phy->attached_iproto; |
253 | 253 | phy->phy->identify.target_port_protocols = phy->attached_tproto; |
254 | + if (!phy->attached_tproto && dr->attached_sata_dev) | |
255 | + phy->phy->identify.target_port_protocols = SAS_PROTOCOL_SATA; | |
254 | 256 | phy->phy->identify.phy_identifier = phy_id; |
255 | 257 | phy->phy->minimum_linkrate_hw = dr->hmin_linkrate; |
256 | 258 | phy->phy->maximum_linkrate_hw = dr->hmax_linkrate; |