scsi: ses: fix devices attaching to different hosts
PATCH 1/1 scsi: ses: fix devices attaching to different hosts
On a multipath SAS scsi system some devices don't end up with enclosure symlinks from a scsi device to its enclosure. Scsi devices which have enclosures linked to them are linked to enclosures on different scsi hosts.
In ses_match_to_enclosure is being called enclosure_for_each_device which iterates over all enclosures not just enclosures on the current host. Fix this by replacing this call with ses_enclosure_find_by_addr.
--- drivers/scsi/ses.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/ses.c +2 -3
@@ -528,9 +528,8 @@ struct efd { };static int ses_enclosure_find_by_addr (struct enclosure_device *edev, -void *data) +struct efd *efd) { -struct efd *efd = data;int i;struct ses_component *scomp;
@@ -683,7 +682,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,if (efd.addr) { efd.dev = &sdev->sdev_gendev; -enclosure_for_each_device (ses_enclosure_find_by_addr, &efd); +ses_enclosure_find_by_addr (edev, &efd); } }
Signature · 1 line
2.52.0
Martin K. Petersen
AppliedTomas,
Quoted 4 lines
On a multipath SAS scsi system some devices don't end up with enclosure symlinks from a scsi device to its enclosure. Scsi devices which have enclosures linked to them are linked to enclosures on different scsi hosts.
Applied to 7.0/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 9 lines · Tomas Henzl
On a multipath SAS scsi system some devices don't end up with enclosure symlinks from a scsi device to its enclosure. Scsi devices which have enclosures linked to them are linked to enclosures on different scsi hosts.
Inses_match_to_enclosureis being calledenclosure_for_each_devicewhich iterates over all enclosures not just enclosures on the current host. Fix this by replacing this call withses_enclosure_find_by_addr.[...]
Applied to 7.0/scsi-fixes, thanks!
[1/1] scsi: ses: fix devices attaching to different hosts
https://git.kernel.org/mkp/scsi/c/70ca8caa96ce
Signature · 1 line
Martin K. Petersen