From patchwork Tue Mar 30 10:51:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12172265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_NO_TEXT, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E88CCC433E1 for ; Tue, 30 Mar 2021 10:48:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4AC361985 for ; Tue, 30 Mar 2021 10:48:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231842AbhC3Krz (ORCPT ); Tue, 30 Mar 2021 06:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbhC3Krc (ORCPT ); Tue, 30 Mar 2021 06:47:32 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E041FC061574 for ; Tue, 30 Mar 2021 03:47:31 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id x126so11840580pfc.13 for ; Tue, 30 Mar 2021 03:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=l5lKv2/rKUQklui5yOvy65/6xVOB3BtHzkocGipo9mA=; b=SSdJQxqJdMr7JVLlKTXqxwd3pKGWTnp3O0/m0wJBR/oI8pkZIBozkAiwRl2osQ3g+K A0BILOuUhVQouV//S5LOzZt7yX/+ybOpoqUriPqWb6n6ZjOQ2e9VX6lW0yVysLhYuDZr rHMYa2xmOXRMkvxmT73r+RJkH2q1uSJ/Q6Ve0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=l5lKv2/rKUQklui5yOvy65/6xVOB3BtHzkocGipo9mA=; b=EMl7DpTjXpHf77DQY7dyzjElr2ZxWzv7UxVqb6QA4CrRQ9/ufaGtBoVgFTpKoIU3qX kkWQS0/EmFzYo3FBkrLRbcEh/wshz4CIqSWNwBomsupC6NBkOmRPo7CZabMBwxShGMWF iLpfXQSfB/nOw+hv8aQfTFwssW2mkRehpPCGcJWy+MLpdROlenVL7ZL6Ns35yRyULMlk 1828ZBZRJnwZMRdCmRn14PKM3WZ95Eixxuf6yUVXoiAxrELUh/KhSNp3SanBMEoppF7P ZiEKKLzH7Zs9kDBZnMRN5iibtLZFcK6PFYi2cLX+aezKAMMgAH8xfuyNEgMDRTOy17eg SLQg== X-Gm-Message-State: AOAM531UZj4QdsxOvY5sTuitwj/32EA7BcBHqB0CsiJ+nBFvwsnFh+ms TAmBH2vwcF9bXBOum9iLBD1K0w== X-Google-Smtp-Source: ABdhPJxA0DQHr51OEN0H/cqs/p1Cq4+RHWWGlABd5RY9Uf5qe9jwJN/hhWelUblyE8Hl6Z9ErxlAqw== X-Received: by 2002:a63:3507:: with SMTP id c7mr3836013pga.204.1617101251317; Tue, 30 Mar 2021 03:47:31 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id l4sm20437674pgn.77.2021.03.30.03.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 03:47:30 -0700 (PDT) From: Sreekanth Reddy To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, suganath-prabu.subramani@broadcom.com, Sreekanth Reddy Subject: [PATCH] mpt3sas: Fix ActiveCablePowerRequirement's endianness Date: Tue, 30 Mar 2021 16:21:06 +0530 Message-Id: <20210330105106.20569-1-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Covert ActiveCablePowerRequirement's value to target CPU endian before displaying it. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: