diff options
| author | Brian Bunker <brian@purestorage.com> | 2026-10-28 17:25:30 -0700 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-11-08 21:58:41 -0500 |
| commit | e085b1d6b6aabd6a7dcd9f02135f9376ff39e95a (patch) | |
| tree | 38a4dd7d0a181aa062b5acfdbba5a0cf44a15050 /scripts/Makefile.thinlto | |
| parent | 746aa1d936b17679361e8d787c6480ccb7c21240 (diff) | |
| download | linux-next-e085b1d6b6aabd6a7dcd9f02135f9376ff39e95a.tar.gz linux-next-e085b1d6b6aabd6a7dcd9f02135f9376ff39e95a.zip | |
scsi: core: Read the ALUA access state when a device is scanned
sdev->access_state is only set by a device handler, and the ALUA device
handler reads the state with an RTPG that runs after the device has been
registered and matched to a driver. The SCSI core therefore has no ALUA
state for a device while it decides whether to bind an upper-level
driver to it.
For a device that reports TPGS support, send REPORT TARGET PORT GROUPS
from scsi_add_lun(), after the VPD pages have been read, and set
sdev->access_state from the descriptor of the target port group of this
path. UNIT ATTENTIONs, which a target typically reports first after a
login or an ALUA state change, are retried, and the command is resent
without the extended header if the target rejects it. If the command
fails, e.g. with LOGICAL UNIT NOT SUPPORTED because no LU is mapped at
the LUN, sdev->access_state is left as it is.
The command uses the same timeout as the INQUIRY of the scan. The ALUA
device handler keeps updating sdev->access_state afterwards as before.
Suggested-by: Hannes Reinecke <hare@kernel.org>
Co-developed-by: Krishna Kant <krishna.kant@purestorage.com>
Signed-off-by: Krishna Kant <krishna.kant@purestorage.com>
Signed-off-by: Brian Bunker <brian@purestorage.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20261029002531.82824-3-brian@purestorage.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
