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.
jhibbits bdragon luporl alfredo sumit.saxena_broadcom.com
- rG37fed6c86003: [POWERPC64BE] add mrsas driver to GENERIC64
rGd0982de778a6: [POWERPC64BE] mrsas: add big-endian support
rG9fac05ba79a4: [POWERPC64BE] add mrsas driver to GENERIC64
rGe34a057ca6eb: [POWERPC64BE] mrsas: add big-endian support
Compile and install kernel with changes and see if tools like 'geom disk list' and 'camcontrol inquiry' are able to fetch disk information.
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.
Why was this check removed?
Is there any reason to remove this trace message?
It would be nice to save le16toh(pd_addr->deviceId) to a temporary variable and use it instead of repeating the le16toh() calls.
This comment should be removed.
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.