Limit LSI SAS2308 HBA to 3.0G with mpt3sas?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

KonstantinG

New Member
Dec 26, 2020
8
0
1
Albany, WA
Have old six-drive six SAS/SATA ports cage, seems it designed for 3Gbps PHY and have no any logic (expander) onboard to report correct PHY capabilities to controller.

Found that SAS2308 with SATA3 drives on that cage fail on commands. Switched to MB onboard SATA-3 ports - problem exists (see 6.0Gbps speed negotiated, errors, then fallback to 3.0G). Set libata.force=3.0G to kernel, voila, it's solved with slots connected to MB SATA-3 ports.

But, I need all cage ports connected to SAS2308 and limited to 3.0Gbps speed.

Is there any way to limit SAS2308 via mpt3sas to use 3.0Gbps PHY speed?
 
Last edited:

UhClem

just another Bozo on the bus
Jun 26, 2012
438
252
63
NH, USA
Hmmm, that's an obscure but interesting dilemma.
...
Is there any way to limit SAS2308 via mpt3sas to use 3.0Gbps PHY speed?
yes ... BUT ... (i.e., much more hairy than a boot_line append)
-- it would be a brute force hack (all drives using mpt3sas would be affected)
-- you need to "speak" C and either (re-) build a custom kernel or maybe just a module
-- all the speed/negotiation logic is in drivers/scsi/mpt3sas/mpt3sas_transport.c
...
???
 

KonstantinG

New Member
Dec 26, 2020
8
0
1
Albany, WA
Some nuance is that I'm not so C-speaking man and this is TrueNAS SCALE, which is regularly updated, so code should be finally pushed to mpt3sas main development tree to get things stable.

Seems that new mpt3sas module option should be added, like mpt3sas.maximum_linkrate_hw=3.0G, and some logic somewhere around _transport_phy_speed() implemented (as I could suggest with my puny programming skills).
 

UhClem

just another Bozo on the bus
Jun 26, 2012
438
252
63
NH, USA
First, (my opinion only) I don't think it is likely that this enhancement would ever be accepted into any kernel stable. SAS-2 has been in use for almost 15 years; why now? (Your predicament, while clear/obvious, is very unusual.)

If you want to use that cage, (directly) with a mpt sas controller, its probably best that you think/plan in terms of a very localized solution. Each new kernel would require re-application of your hack/patch--but, certainly script-able.

But, realistically, is it all worth it? (time and effort) vs a different cage, or putting an old HP 3G expander [Link] in between

PS yes, _transport_phy_speed() looks like the correct place
 

UhClem

just another Bozo on the bus
Jun 26, 2012
438
252
63
NH, USA
Have old six-drive six SAS/SATA ports cage, seems it designed for 3Gbps PHY ...
But, I need all cage ports connected to SAS2308 and limited to 3.0Gbps speed.

Is there any way to limit SAS2308 via mpt3sas to use 3.0Gbps PHY speed?
@KonstantinG [I hope you see this ...]
This might be an ideal solution:
In another thread here, I noticed:
...
I use lsiutil option 13 to set my cards to negotiate Sata2 speeds (3.0 Gbps) per each disk ...
[If that works, be sure to thank @BrassFox ]