]> git.ipfire.org Git - thirdparty/linux.git/commit
scsi: ses: Fix devices attaching to different hosts
authorTomas Henzl <thenzl@redhat.com>
Tue, 10 Feb 2026 19:18:50 +0000 (20:18 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Feb 2026 02:26:46 +0000 (21:26 -0500)
commit70ca8caa96ce473647054f5c7b9dab5423902402
tree686f85b477afcb42ee9f6c84e820212f07b408b3
parent2e6b5cd6a4b37a95b78cf8c39a979b58c915c8ed
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>
drivers/scsi/ses.c