From patchwork Tue Apr 18 19:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranav Prasad X-Patchwork-Id: 85021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3066343vqo; Tue, 18 Apr 2023 12:04:51 -0700 (PDT) X-Google-Smtp-Source: AKy350Zu+P81FH+A8wjg/L2z86ACVobpL5TLFw1l8TvnEgVQ1dVADyHm1jdUcnFMM8oe45w/DnLZ X-Received: by 2002:a17:903:22cf:b0:1a5:1438:9bcd with SMTP id y15-20020a17090322cf00b001a514389bcdmr3338622plg.35.1681844691227; Tue, 18 Apr 2023 12:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681844691; cv=none; d=google.com; s=arc-20160816; b=RiCrqdAl5xcLEcTDVJu85HyGtULyuoRE9M+FF+zenm1av9gLygF95F008ag6NGJ9dm DmAdVGAQii9nN3BvltiqHwRMW3N3jxNgrJve8z8pu2uy62FPLMrGrk/H44Asm8I+R73V VFMfeLF3kjp1q0qbBtWNFlMLkcfdMcGbF1q8CvUVyPZxjp83+flHQUsR5n6eO8tUFQqq xzc4lKPM3gzAE5wx11spRtGMBPMzkye+rHkG82un57MO9RjIF/7B1jtjo46lP66MmeRR sjkE5+7e7o3fA+HcfVza9eEZTLY5hDJUP17tXowHoKHAp0/KKll2Y0aJuzIHfQ/5/TGi 2OYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=UH6ww4Tz5A/eOvsrLoChrvszKblTPJdXQlcphIuhfCY=; b=EXeAldw3cB6sQHsZ7YH/tXeBSMTOLAhFDCdNzbnsEqVK23/+fMhSyONabV21eixyX2 yfya0hWKlHwYNJ8X6q00VOmmKLvJRtQVKVhtEso7tyDUOjX3ohEFiqBaW7aN1VFw0YRU FMd2ilmtJy294d+XM40xAipPV6LPIfAmuLMDGLwfX9DJnd3OAdNSdAjGbDnDp+2Mg3Pr FXYL8vorhyVWL7X62eVM/Wsqb5b2sqDnMCvUYtRKG7YIrVHXwQvzwvizZNZFAb47YbR4 84e2oCDNgXt1QpHk7zuOEM0sQ3DuvYFWK8CaalcB5xpgMQtSIWeRNMKizxlVsYuelyen TWfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Xb4iQzwL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170903245200b001a6492cdf2bsi15398460pls.343.2023.04.18.12.04.33; Tue, 18 Apr 2023 12:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Xb4iQzwL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232735AbjDRTCK (ORCPT + 99 others); Tue, 18 Apr 2023 15:02:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232450AbjDRTBx (ORCPT ); Tue, 18 Apr 2023 15:01:53 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE75293D7 for ; Tue, 18 Apr 2023 12:01:52 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-5141c742deeso1368213a12.3 for ; Tue, 18 Apr 2023 12:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681844512; x=1684436512; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=UH6ww4Tz5A/eOvsrLoChrvszKblTPJdXQlcphIuhfCY=; b=Xb4iQzwLgZfPoUAQ/odJ+uLwMle0vkgg1CXXGcy+pK4IK8a5OITSiML3yjC9GIz+vt LglJZm9VtSDzqZ6zL1EqEt//YrAIc9qzOjQ/2tZ4x7oofiN/UKfvvGMnN2CUSveDqTp6 Y6qUOHeSTK7H8HaHkL7feME9f5tZs7Y8DwZU6DYL0318AK3qh4mgcbWpHQbX5KhiyX+O zYQQab4w/e+OfN5yF2Ok8eJA52iD/AwanOcagy49gu4uAoAf92SvPd5gx2lk/YadQ7fC sd9r05XEGj/lROATNCbm98AqauIDaEJBDeHgduuZza0Maqm4SQX/vyacsb0iuiGK5KI8 Rfpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681844512; x=1684436512; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UH6ww4Tz5A/eOvsrLoChrvszKblTPJdXQlcphIuhfCY=; b=SSnRLX4hZpbPxt263YCj5XuV3pKwIBiR3xRBgSJHfZHr5pKBnnwQtDpii4Va4/ar8y 3DgrPwuu4VeuDddS62l7OlPFLa2U3tEnEh6TVoFamSfGujTfT+xrKPtcPl3SNdS9XMAz QGbEweASgxkcVfGufqdjY/+gasODvNFyV2A+XwDJkCBfGfW26z5h9pfgCSmiuOH4WwKa Tw3qVkg4TLshkoyNkylIvMrEK1KjQbG6xHf2l9ovdYTDDcH41ggtK2t9g6ssL44/7BK4 LPr+5YrCu2ArJGp1EycZ65SNMqptBLNqUF3NaGTKhHbiRQiaFdaXRQEm3/W51uU3f172 Rwjg== X-Gm-Message-State: AAQBX9d41vPavmmD/ifFlo0cL2p4Yk23tgIbzDn4bwtzBc+Oek8C/bdx w5FwmsGta+pZcr2gL+PY+8sufNR3zOfgcg== X-Received: from pranav-first.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:390b]) (user=pranavpp job=sendgmr) by 2002:a63:502:0:b0:520:6a0f:da2a with SMTP id 2-20020a630502000000b005206a0fda2amr89585pgf.8.1681844512153; Tue, 18 Apr 2023 12:01:52 -0700 (PDT) Date: Tue, 18 Apr 2023 19:00:58 +0000 In-Reply-To: <20230418190101.696345-1-pranavpp@google.com> Mime-Version: 1.0 References: <20230418190101.696345-1-pranavpp@google.com> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog Message-ID: <20230418190101.696345-4-pranavpp@google.com> Subject: [PATCH 3/6] scsi: pm80xx: Print port_id in HW events From: Pranav Prasad To: Jack Wang , "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Akshat Jain , Pranav Prasad X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763541979017260196?= X-GMAIL-MSGID: =?utf-8?q?1763541979017260196?= From: Akshat Jain Log port_id and phy_id along with the PHY_UP event. Signed-off-by: Akshat Jain Signed-off-by: Pranav Prasad Acked-by: Jack Wang --- drivers/scsi/pm8001/pm80xx_hwi.c | 58 ++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 61c1bf3d98a0..c5bf65d0ad14 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -3426,30 +3426,35 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) case HW_EVENT_SAS_PHY_UP: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_SAS_PHY_UP phyid:%#x\n", phy_id); + "HW_EVENT_SAS_PHY_UP phyid:%#x port_id:%#x\n", + phy_id, port_id); hw_event_sas_phy_up(pm8001_ha, piomb); break; case HW_EVENT_SATA_PHY_UP: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_SATA_PHY_UP phyid:%#x\n", phy_id); + "HW_EVENT_SATA_PHY_UP phyid:%#x port_id:%#x\n", + phy_id, port_id); hw_event_sata_phy_up(pm8001_ha, piomb); break; case HW_EVENT_SATA_SPINUP_HOLD: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_SATA_SPINUP_HOLD phyid:%#x\n", phy_id); + "HW_EVENT_SATA_SPINUP_HOLD phyid:%#x port_id:%#x\n", + phy_id, port_id); sas_notify_phy_event(&phy->sas_phy, PHYE_SPINUP_HOLD, GFP_ATOMIC); break; case HW_EVENT_PHY_DOWN: - pm8001_dbg(pm8001_ha, EVENT, "HW_EVENT_PHY_DOWN phyid:%#x\n", - phy_id); + pm8001_dbg(pm8001_ha, EVENT, + "HW_EVENT_PHY_DOWN phyid:%#x port_id:%#x\n", + phy_id, port_id); hw_event_phy_down(pm8001_ha, piomb); phy->phy_attached = 0; phy->phy_state = PHY_LINK_DISABLE; break; case HW_EVENT_PORT_INVALID: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_PORT_INVALID phyid:%#x\n", phy_id); + "HW_EVENT_PORT_INVALID phyid:%#x port_id:%#x\n", + phy_id, port_id); sas_phy_disconnected(sas_phy); phy->phy_attached = 0; sas_notify_port_event(sas_phy, PORTE_LINK_RESET_ERR, @@ -3468,8 +3473,9 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) GFP_ATOMIC); break; case HW_EVENT_PHY_ERROR: - pm8001_dbg(pm8001_ha, EVENT, "HW_EVENT_PHY_ERROR phyid:%#x\n", - phy_id); + pm8001_dbg(pm8001_ha, EVENT, + "HW_EVENT_PHY_ERROR phyid:%#x port_id:%#x\n", + phy_id, port_id); sas_phy_disconnected(&phy->sas_phy); phy->phy_attached = 0; sas_notify_phy_event(&phy->sas_phy, PHYE_OOB_ERROR, GFP_ATOMIC); @@ -3484,31 +3490,31 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) break; case HW_EVENT_LINK_ERR_INVALID_DWORD: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_LINK_ERR_INVALID_DWORD phyid:%#x\n", - phy_id); + "HW_EVENT_LINK_ERR_INVALID_DWORD phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_LINK_ERR_INVALID_DWORD, port_id, phy_id, 0, 0); break; case HW_EVENT_LINK_ERR_DISPARITY_ERROR: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_LINK_ERR_DISPARITY_ERROR phyid:%#x\n", - phy_id); + "HW_EVENT_LINK_ERR_DISPARITY_ERROR phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_LINK_ERR_DISPARITY_ERROR, port_id, phy_id, 0, 0); break; case HW_EVENT_LINK_ERR_CODE_VIOLATION: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_LINK_ERR_CODE_VIOLATION phyid:%#x\n", - phy_id); + "HW_EVENT_LINK_ERR_CODE_VIOLATION phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_LINK_ERR_CODE_VIOLATION, port_id, phy_id, 0, 0); break; case HW_EVENT_LINK_ERR_LOSS_OF_DWORD_SYNCH: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_LINK_ERR_LOSS_OF_DWORD_SYNCH phyid:%#x\n", - phy_id); + "HW_EVENT_LINK_ERR_LOSS_OF_DWORD_SYNCH phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_LINK_ERR_LOSS_OF_DWORD_SYNCH, port_id, phy_id, 0, 0); @@ -3527,7 +3533,8 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) break; case HW_EVENT_INBOUND_CRC_ERROR: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_INBOUND_CRC_ERROR phyid:%#x\n", phy_id); + "HW_EVENT_INBOUND_CRC_ERROR phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_INBOUND_CRC_ERROR, port_id, phy_id, 0, 0); @@ -3547,8 +3554,8 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) break; case HW_EVENT_LINK_ERR_PHY_RESET_FAILED: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_LINK_ERR_PHY_RESET_FAILED phyid:%#x\n", - phy_id); + "HW_EVENT_LINK_ERR_PHY_RESET_FAILED phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_LINK_ERR_PHY_RESET_FAILED, port_id, phy_id, 0, 0); @@ -3559,8 +3566,8 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) break; case HW_EVENT_PORT_RESET_TIMER_TMO: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_PORT_RESET_TIMER_TMO phyid:%#x\n", - phy_id); + "HW_EVENT_PORT_RESET_TIMER_TMO phyid:%#x port_id:%#x\n", + phy_id, port_id); if (!pm8001_ha->phy[phy_id].reset_completion) { pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_PHY_DOWN, port_id, phy_id, 0, 0); @@ -3578,8 +3585,8 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) break; case HW_EVENT_PORT_RECOVERY_TIMER_TMO: pm8001_dbg(pm8001_ha, EVENT, - "HW_EVENT_PORT_RECOVERY_TIMER_TMO phyid:%#x\n", - phy_id); + "HW_EVENT_PORT_RECOVERY_TIMER_TMO phyid:%#x port_id:%#x\n", + phy_id, port_id); pm80xx_hw_event_ack_req(pm8001_ha, 0, HW_EVENT_PORT_RECOVERY_TIMER_TMO, port_id, phy_id, 0, 0); @@ -3613,8 +3620,9 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb) pm8001_dbg(pm8001_ha, MSG, "EVENT_BROADCAST_ASYNCH_EVENT\n"); break; default: - pm8001_dbg(pm8001_ha, DEVIO, "Unknown event type 0x%x\n", - eventType); + pm8001_dbg(pm8001_ha, DEVIO, + "Unknown event portid:%d phyid:%d event:0x%x status:0x%x\n", + port_id, phy_id, eventType, status); break; } return 0;