mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
scsi: ses: Fix devices attaching to different hosts
On a multipath SAS system some devices don't end up with correct symlinks from the SCSI device to its enclosure. Some devices even have enclosure links pointing to enclosures attached to different SCSI hosts. ses_match_to_enclosure() calls enclosure_for_each_device() which iterates over all enclosures on the system, not just enclosures attached to the current SCSI host. Replace the iteration with a direct call to ses_enclosure_find_by_addr(). Reviewed-by: David Jeffery <djeffery@redhat.com> Signed-off-by: Tomas Henzl <thenzl@redhat.com> Link: https://patch.msgid.link/20260210191850.36784-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
2e6b5cd6a4
commit
70ca8caa96
1 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue