Page MenuHomeFreeBSD

mrsas: Add big-endian support
ClosedPublic

Authored by afscoelho_gmail.com on Sep 23 2020, 5:11 PM.
Referenced Files
Unknown Object (File)
Fri, Mar 22, 3:37 PM
Unknown Object (File)
Fri, Mar 22, 3:37 PM
Unknown Object (File)
Fri, Mar 22, 3:37 PM
Unknown Object (File)
Fri, Mar 22, 3:37 PM
Unknown Object (File)
Fri, Mar 22, 3:17 PM
Unknown Object (File)
Jan 24 2024, 4:26 AM
Unknown Object (File)
Dec 17 2023, 10:13 AM
Unknown Object (File)
Dec 16 2023, 9:31 AM
Subscribers
None

Details

Summary

Add endiannes conversions in order to support big-endian platforms. Tests were done in a AVAGO Invader SAS Controller (pci vendor=0x1000 device=0x005d). This patch was tested using a Power9 and Intel machines.

Test Plan

Compile and install kernel with changes and see if tools like 'geom disk list' and 'camcontrol inquiry' are able to fetch disk information.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33771
Build 30991: arc lint + arc unit

Event Timeline

afscoelho_gmail.com created this revision.

The changes look good to me overall.

Since you have tested them on an Intel machine and most of them are calls to convert from/to LE, that are no-ops on LE machines, the chance of introducing regressions should be low.

I have just a couple of nitpicks.

sys/dev/mrsas/mrsas.c
910–912

Why was this check removed?

3105

Is there any reason to remove this trace message?

4641–4648

It would be nice to save le16toh(pd_addr->deviceId) to a temporary variable and use it instead of repeating the le16toh() calls.

sys/dev/mrsas/mrsas_fp.c
1340–1341

This comment should be removed.

afscoelho_gmail.com added inline comments.
sys/dev/mrsas/mrsas.c
910–912

This check was preventing the driver to continue execution and as it is not present on linux driver 'megaraid' that works on the same card so I removed it from here. I found no issues doing this.

This revision is now accepted and ready to land.Nov 25 2020, 7:36 PM