diff mbox series

mpt3sas: Fix ActiveCablePowerRequirement's endianness

Message ID 20210330105106.20569-1-sreekanth.reddy@broadcom.com (mailing list archive)
State Accepted
Headers show
Series mpt3sas: Fix ActiveCablePowerRequirement's endianness | expand

Commit Message

Sreekanth Reddy March 30, 2021, 10:51 a.m. UTC
Covert ActiveCablePowerRequirement's value to target CPU endian
before displaying it.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin K. Petersen April 13, 2021, 5:48 a.m. UTC | #1
On Tue, 30 Mar 2021 16:21:06 +0530, Sreekanth Reddy wrote:

> 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
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index ae1973878cc7..1423dfb0cb93 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -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: