From patchwork Tue Oct 10 13:11:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 9996117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C7496603B5 for ; Tue, 10 Oct 2017 13:15:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8678285D1 for ; Tue, 10 Oct 2017 13:15:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD6DF285CF; Tue, 10 Oct 2017 13:15:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B69E285CE for ; Tue, 10 Oct 2017 13:15:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756176AbdJJNMG (ORCPT ); Tue, 10 Oct 2017 09:12:06 -0400 Received: from mail-qt0-f181.google.com ([209.85.216.181]:56532 "EHLO mail-qt0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756141AbdJJNMD (ORCPT ); Tue, 10 Oct 2017 09:12:03 -0400 Received: by mail-qt0-f181.google.com with SMTP id 34so33849519qtb.13 for ; Tue, 10 Oct 2017 06:12:03 -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:in-reply-to:references; bh=rsmMGofTg4Ic45CvD/Jgi2zZUacadoKrjOCD8smq8nQ=; b=UCVplJlDU7lNRpKt++ZJf47dht/kI4ZPsLXEaMGB0vPLYOPJRXMSn6SfQeZo28l/t8 FUAkT4ch1ZJl58zlIGUxTL/3lSvyOl5lpL8xRl1tSVtf+iUjxBS8GVYQhrofU3ejUdm8 /JiWTf6p/LNf4WeutAu4CfJvCx76l9N4myJaw= 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:in-reply-to :references; bh=rsmMGofTg4Ic45CvD/Jgi2zZUacadoKrjOCD8smq8nQ=; b=ViQpTSCYqS56dBAEmNUOvWDtWdUTG+VACdDy46mMit26I/COWpw97+2zaAXSBSaPJH HNQqU+ZavpQdvJta6a8sXPrYa5WAOJH9FNTg3usqAGQcLs9hQpwUXwm/RQY9UpcKg/cz I7K1PPf2Ey6Xo4zaQGNLHq0mvb6hIGuOFqj6YU4gUBkMeilVabcxANXn1XIRmBd7hk/B NMRaLQnvHNgPp1RDacXFRmuaIxa49zOg9qQsNnCRXhS2SokMNeEbmDLuBlzrbiOTcV65 Dcc78c3qLqa0ovRTBp1Bto/GlvrD9XidUPLHG8xUp4HRbfYKizRrmtl7zM9qqaRkZ3Yx fubw== X-Gm-Message-State: AMCzsaVw1N/m2u3YhVq9LCxufnF9GqpROwKxxetiJYn7+0NH6PF3i7BQ Q11/eZvjXH0QsbG0Uc0lU5mlaiV3 X-Google-Smtp-Source: AOwi7QA5+tEadLHMLC/tzcDkOJDgY620EEpWgwJclsCFdnRAroyqE4nvNx17Q1tDZtcHvWECjY4ZNw== X-Received: by 10.200.40.142 with SMTP id i14mr19284342qti.326.1507641122706; Tue, 10 Oct 2017 06:12:02 -0700 (PDT) Received: from host1.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id h135sm634004qke.5.2017.10.10.06.11.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Oct 2017 06:12:01 -0700 (PDT) From: Sreekanth Reddy X-Google-Original-From: Sreekanth Reddy To: linux-scsi@vger.kernel.org, hch@infradead.org Cc: martin.petersen@oracle.com, JBottomley@Parallels.com, Sathya.Prakash@broadcom.com, linux-kernel@vger.kernel.org, Sreekanth Reddy Subject: [PATCH 01/10] mpt3sas: Processing of Cable Exception events Date: Tue, 10 Oct 2017 18:41:14 +0530 Message-Id: <1507641083-20207-2-git-send-email-Sreekanth.Reddy@broadcom.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1507641083-20207-1-git-send-email-Sreekanth.Reddy@broadcom.com> References: <1507641083-20207-1-git-send-email-Sreekanth.Reddy@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Earlier Active Cable Exception event with reason code "Cable Degraded (0x02))" was added only for Active Cable, Now this event is extended to Passive cable too. So re-arranged display message accordingly. Also added Cable Exception Event even for SAS3008 & SAS3108 HBAs (i.e. MPI 2.5 spec supporting HBAs) earlier this event was enabled only for MPI 2.6 spec supporting HBA devices. Signed-off-by: Sreekanth Reddy Signed-off-by: Tomas Henzl --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ++--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 8799990..844e29c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -655,7 +655,7 @@ _base_display_event_data(struct MPT3SAS_ADAPTER *ioc, desc = "Temperature Threshold"; break; case MPI2_EVENT_ACTIVE_CABLE_EXCEPTION: - desc = "Active cable exception"; + desc = "Cable Event"; break; } @@ -5517,8 +5517,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc) _base_unmask_events(ioc, MPI2_EVENT_IR_OPERATION_STATUS); _base_unmask_events(ioc, MPI2_EVENT_LOG_ENTRY_ADDED); _base_unmask_events(ioc, MPI2_EVENT_TEMP_THRESHOLD); - if (ioc->hba_mpi_version_belonged == MPI26_VERSION) - _base_unmask_events(ioc, MPI2_EVENT_ACTIVE_CABLE_EXCEPTION); + _base_unmask_events(ioc, MPI2_EVENT_ACTIVE_CABLE_EXCEPTION); r = _base_make_ioc_operational(ioc); if (r) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 22998cb..9594166 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -8056,19 +8056,21 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData; switch (ActiveCableEventData->ReasonCode) { case MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER: - pr_notice(MPT3SAS_FMT "Receptacle ID %d: This active cable" - " requires %d mW of power\n", ioc->name, - ActiveCableEventData->ReceptacleID, + pr_notice(MPT3SAS_FMT + "Currently an active cable with ReceptacleID %d\n", + ioc->name, ActiveCableEventData->ReceptacleID); + 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 require %d mW of power\n", ActiveCableEventData->ActiveCablePowerRequirement); - pr_notice(MPT3SAS_FMT "Receptacle ID %d: Devices connected" - " to this active cable will not be seen\n", - ioc->name, ActiveCableEventData->ReceptacleID); break; case MPI26_EVENT_ACTIVE_CABLE_DEGRADED: - pr_notice(MPT3SAS_FMT "ReceptacleID %d: This cable", - ioc->name, ActiveCableEventData->ReceptacleID); - pr_notice(" is not running at an optimal speed(12 Gb/s)\n"); + pr_notice(MPT3SAS_FMT + "Currently a cable with ReceptacleID %d\n", + ioc->name, ActiveCableEventData->ReceptacleID); + pr_notice( + "is not running at optimal speed(12 Gb/s rate)\n"); break; }