Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-129451 / None / ses: fallback to read SAS address from VPD #181

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

ixhamza
Copy link
Contributor

@ixhamza ixhamza commented Jun 12, 2024

Description

The mpt3sas driver does not create a parent end device for PCIe types where the SAS address is stored, causing the ses driver to not add PCIe device types connected to a tri-mode HBA. To address this, the fallback mechanism reads the SAS address from the VPD 0x83 page. This change is inspired by commit 9927c68.

Specs

SPC-6 Specs: https://www.t10.org/cgi-bin/ac.pl?t=f&f=spc6r13.pdf
Section 7.7.6 Device Identification VPD page (Page 659)

Testing

Tested with Custom 24.10 Scale Image on h10-148 to validate that NVMe devices connected to tri-mode HBA are added to sysfs enclosure entry:

root@h10-148a[/sys/class/enclosure/0:0:0:0/0/device]# lsblk -S                                       
NAME HCTL       TYPE VENDOR   MODEL            REV SERIAL       TRAN
sda  0:0:1:0    disk HGST     HUS728T8TAL4201 B980 VYJGZLEM     sas
sdb  0:2:0:0    disk NVMe     KCM6DVUL1T60    0106 2240A00PT1Q8 sas
sdc  0:2:1:0    disk NVMe     KCM6DVUL1T60    0106 X270A00QT1Q8 sas
sdd  0:2:2:0    disk NVMe     KCM6DVUL1T60    0106 5260A003TSVR sas

root@h10-148a[/sys/class/enclosure/0:0:0:0/0/device]# cat /sys/class/enclosure/0:0:0:0/*/device/model
KCM6DVUL1T60    
KCM6DVUL1T60    
HUS728T8TAL4201 
KCM6DVUL1T60 

root@h10-148a[~]# readlink /sys/class/enclosure/0:0:0:0/*/device   
../../../../../../../target0:2:2/0:2:2:0
../../../../../../../target0:2:0/0:2:0:0
../../../../../../../port-0:1/end_device-0:1/target0:0:1/0:0:1:0
../../../../../../../target0:2:1/0:2:1:0

@bugclerk bugclerk changed the title ses: fallback to read SAS address from VPD NAS-129451 / None / ses: fallback to read SAS address from VPD Jun 12, 2024
@bugclerk
Copy link

drivers/scsi/ses.c Outdated Show resolved Hide resolved
The mpt3sas driver does not create a parent end device for PCIe types
where the SAS address is stored, causing the ses driver to not add
PCIe device types connected to a tri-mode HBA. To address this, the
fallback mechanism reads the SAS address from the VPD 0x83 page. This
change is inspired by commit 9927c68.
@ixhamza ixhamza merged commit 25c4928 into truenas/linux-6.6 Jun 12, 2024
6 checks passed
@ixhamza ixhamza deleted the NAS-129451 branch June 12, 2024 17:45
@bugclerk
Copy link

Not updating JIRA ticket https://ixsystems.atlassian.net/browse/NAS-129451 target versions as no JIRA version corresponds to this PR

@bugclerk
Copy link

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants