Skip to contentSkip to conversation

mpt3sas: Fix ActiveCablePowerRequirement's endianness

PATCH Applied Sreekanth Reddy 2 participants 2 messages Mar 30, 2021 – Apr 13, 2021

Subsystems (2)
lore
Share & tools
lore

Sreekanth Reddy

author maintainer
#0 lore raw

PATCH 1/1 mpt3sas: Fix ActiveCablePowerRequirement's endianness

Covert ActiveCablePowerRequirement's value to target CPU endian before displaying it.

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +2 -1
index ae1973878cc7..1423dfb0cb93 100644
@@ -10804,7 +10804,8 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
 			pr_notice("cannot be powered and devices connected\n");
 			pr_notice("to this active cable will not be seen\n");
 			pr_notice("This active cable requires %d mW of power\n",
-			     ActiveCableEventData->ActiveCablePowerRequirement);
+			    le32_to_cpu(
+			    ActiveCableEventData->ActiveCablePowerRequirement));
 			break;
 
 		case MPI26_EVENT_ACTIVE_CABLE_DEGRADED:
Signature · 1 line
2.27.0
#1 lore raw
Quoted 2 lines · Sreekanth Reddy

Covert ActiveCablePowerRequirement's value to target CPU endian before displaying it.

Applied to 5.13/scsi-queue, thanks!

[1/1] mpt3sas: Fix ActiveCablePowerRequirement's endianness

      https://git.kernel.org/mkp/scsi/c/c0629d70ca55
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering