From patchwork Wed Apr 2 19:37:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 877883 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 810611EE7CB for ; Wed, 2 Apr 2025 19:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743622936; cv=none; b=YFWeRfQIMS5Lx55alH0lj3GnGRMm3ngOzsUQ4hMoafFIVXVqbpzY4SDbaWRa6JFzr5QfKKzeqthQstIcgVMnBBHrPVRbkAJrMKAJfHvanOAf+VPPa/Keit3cIWlkBJg46h4EihYqq+K5f8dSJsR+joMiB1fkt92r+U8fsB1xjz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743622936; c=relaxed/simple; bh=0B1varXF3zRREs2WTDB9tiKYpA6KG4nGKtDXZE75VzM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=lojUWSQ36d7+oPX+TOm03nVf12xTUDiNVX6KHgvWNuCsfDvcft9EqsHokTSugZ82KaB2ByCYGJPq14edjA9voUf0yotLU0FclqyxxxQx8XALaqGHEl2B0NxgsWnvgIuvvXs0R/+KpSCh1gi9ztA2/cN7Aox3gOCRa4023FUqV8g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=BU5aV4nI; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="BU5aV4nI" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-227b650504fso2003595ad.0 for ; Wed, 02 Apr 2025 12:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1743622933; x=1744227733; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wVsMm8NEl4VBpbG4Kvoxkxy1A+UQLlEf3tQEh4oFQV0=; b=BU5aV4nI67GwltXaAve4MLFbQAli3Av4yXQUo5yNYgnGbU6DX/ABqmYKOLOj9xPq1B RcSe/gd4wKyeEpxefAXSMDI1KNh21MVbEengKOtnPJfVupzWISFQt4rX19OOWijYaaHg INCIE6g1JILqYt+Ve869Gcl0zTA3rKOLhB75A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743622933; x=1744227733; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wVsMm8NEl4VBpbG4Kvoxkxy1A+UQLlEf3tQEh4oFQV0=; b=Syb74aPsQMv3+huvsaS4pQm/zMRVUlXblFukaPq8bsuCocjtvcp7xYtYuSqxoRp0wY 4BCznlilTGfLFK+8TUPjy0sT5hJkap7Vl0ONdnkecMiDdD8zYbDcavSoxSxPn6LTS+0W fiQ4UxSIVKrUZwzMscKa+mLxJ8FYIIUdFM9jkF/TAtbOU89IBVKVrFeOC2ilXxkqeVTf yAVZjqKoR00kiDrHJ1+Z22z4WEIacgnrGuECNc1t81xo+tfloAelSHpFMYMAPYtlO6bJ 7U8franAM0sy9o/bvqc0xPPNlQnbGGA5zPNKltrQv1FBMBDLPsUc+dzWjkZAe8585uFY JZkA== X-Gm-Message-State: AOJu0YwKzMq5SZ/q1EyTAqfNQOgF0BdINEZAFH9+usQITQzSZqMDOBxk ndjFxGXj/TtIPhSHqs53Dx3lExAUqdPdVweS1Jo5S2dV+gWJxAVlZRFpQNkM9WH8NmFxUfocY6O 9ew86J7JrH3EjzJkQHIqY/wY+1tUncT2lOsGFHnP5La4Mvyph7/G8g89uzxxda9WJyDnqxLfDyP gOPUqurAAMy9n1BXyI5SMSoAi9RnGQhRz3WoB59J1p9X/ONg== X-Gm-Gg: ASbGncvziGSSZmnyLaTEjROiZhHCBO6DWe7Yk0w1HrvK+pKr2TSJfKr2ZZU3g31ZLIo bd4c0BS4sd8JzOOzqFyYoUzeKINasUOGRqo2GQU4nBvIXiOwy7c63EdDX9iLLkHTxphfq9E3yqo djfWZCcRRwaIFOyjWvyyWJKwgERukf0ETaMWZN+TmXhZONXaDrx9h3Y8hUglWKT3xNqIS0T7vk5 qfq0s/yF4VfyRganSWh3qiDYL0pl/OGFAtVRaTI8TorJKpOw3Me3uD8o9CgCdzmVJeWZIWJPwMJ yL0XJyY9UhHcux06SVAS8zWpmAuRuOwEy7lFza0uYFhJ89pjAaBhseXB0txMYMaVozbexNnI9B1 Gt6dcZbvcYoQE9gQMs7mxJFMSV4dc2Gs= X-Google-Smtp-Source: AGHT+IHTfhbUoDeQBYlLRzs+K8M+V+hRCvhjI6pXcEwUzqz50YqReOb7nAuMOKMre8cNtG7RITwL3A== X-Received: by 2002:a17:903:94c:b0:224:abb:92c with SMTP id d9443c01a7336-22977e08336mr56185ad.50.1743622933079; Wed, 02 Apr 2025 12:42:13 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-739710d97cbsm11797396b3a.173.2025.04.02.12.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 12:42:12 -0700 (PDT) From: Chandrakanth Patil X-Google-Original-From: Chandrakanth Patil To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com, rajsekhar.chundru@broadcom.com, Chandrakanth Patil Subject: [PATCH 1/2] megaraid_sas: Block zero-length ATA VPD inquiry due to firmware bug Date: Thu, 3 Apr 2025 01:07:34 +0530 Message-Id: <20250402193735.5098-1-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is a firmware bug where ATA VPD inquiry commands with zero data length are not handled and fail with a non-standard return status code 0xf0. Hence, the driver blocks zero-length ATA VPD inquiry commands by setting the device no_vpd_size flag to 1. Additionally, if the firmware still returns status code 0xf0 in other failure scenarios, the driver converts it to a SCSI 'check condition' for proper OS handling. Suggested-by: Martin K. Petersen Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas_base.c | 9 +++++++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 28c75865967a..d793924547f8 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2103,6 +2103,9 @@ static int megasas_sdev_configure(struct scsi_device *sdev, /* This sdev property may change post OCR */ megasas_set_dynamic_target_properties(sdev, lim, is_target_prop); + if (!MEGASAS_IS_LOGICAL(sdev)) + sdev->no_vpd_size = 1; + mutex_unlock(&instance->reset_mutex); return 0; @@ -3662,8 +3665,10 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, case MFI_STAT_SCSI_IO_FAILED: case MFI_STAT_LD_INIT_IN_PROGRESS: - cmd->scmd->result = - (DID_ERROR << 16) | hdr->scsi_status; + if (hdr->scsi_status == 0xf0) + cmd->scmd->result = (DID_ERROR << 16) | SAM_STAT_CHECK_CONDITION; + else + cmd->scmd->result = (DID_ERROR << 16) | hdr->scsi_status; break; case MFI_STAT_SCSI_DONE_WITH_ERROR: diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 1eec23da28e2..1eea4df9e47d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -2043,7 +2043,10 @@ map_cmd_status(struct fusion_context *fusion, case MFI_STAT_SCSI_IO_FAILED: case MFI_STAT_LD_INIT_IN_PROGRESS: - scmd->result = (DID_ERROR << 16) | ext_status; + if (ext_status == 0xf0) + scmd->result = (DID_ERROR << 16) | SAM_STAT_CHECK_CONDITION; + else + scmd->result = (DID_ERROR << 16) | ext_status; break; case MFI_STAT_SCSI_DONE_WITH_ERROR: From patchwork Wed Apr 2 19:37:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 878565 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E2871DE2A5 for ; Wed, 2 Apr 2025 19:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743622945; cv=none; b=j1Or634YQbQi6wTfDhSp8ojCRgwHZ4bR1ikOk2b88ai3uHQVf2ZgLZr5DmhUj+gUhjmiMz6gnCoixOe5b9BOdw/qPiD7vm05nfZKQvGtobYex7J5/IaqTjH2+jE7E61fZ0FDM4vPavPAY3R0XdyihrtAEgmARIHjtSIA1kTR85Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743622945; c=relaxed/simple; bh=9XYhl0ZE9+HKWKZpuXUIPrcD8SioJ/w+JX9cypWBKV4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JuOBd8SWxTGXtm8poeeRvFv/cM7Cx6uwAFCUEw2nWaDcSPydhuT/7XxCJds+/NYzkHXDOTF26wX0CQWtlSXbZiXO1MuT3CoautGcpJl7fgxCMiGqAQFfr/nt+YTCiOnEMgJedlke2UJkefowrcTtUPDcYhOTcFdAtEhuJcLuxJA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=DAZ01r9s; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="DAZ01r9s" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-736bfa487c3so130687b3a.1 for ; Wed, 02 Apr 2025 12:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1743622943; x=1744227743; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6yRgZAfGNjbBZGwp1Ms8e/uyPt/GjJvybehTQLlt0do=; b=DAZ01r9sdnjKtn3L2g2EMPgVvW0HeHATOIvg9AApDGXEE5pqeUlHKYZ0aiN1+Ws3Ga xuDO+g0+1aY5pweUjbd3BRQbN222KxifTm6FZahjoanALq3vuq4dHLueW2Px135WUwn7 HEFfnC/HksEROFkOsaHdAeQTOmIXNg87/1A9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743622943; x=1744227743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6yRgZAfGNjbBZGwp1Ms8e/uyPt/GjJvybehTQLlt0do=; b=IwNEQad0rwyH1QkDBJjkhaXhY3/ITD/Fy3OYTyqfR5WCCTaTBb6xbJ/ixRUl7U389N NYY+uufjCNa98w+/yBSRcSqU5FsnZGwLCHeXIzVj52rIo1smr4nuoK7Ti1GuaQAGv53m WJgkwZNO4II4YoBSatJqFNXqXh3pOKnqVh9NDNS1mRPHiwO3YXiMjsmPo3yqbHeYC7P0 hhKITZ7xmHj/di62rJFmrDir7P30dffWlSikCjec0DYvgHFFOw9FdhCnU4uHmn6kQlEb YTwzWTQTl9kMwQtsFCAPvHTP+9VIrIDeYZqxSY191gGHFZzn+bIf5ih4ua9VPbgcZ63r K1wA== X-Gm-Message-State: AOJu0YwLcAVwHuJ0EPJjBjsjAHXbcQqoclrAptVvsIvvkOhPkxEd0ISL VHPeC7s8ydf8kLh/I7Dy4OlvdF+Wdm/i7e+bfm5zywgIyUOsdx7AlXTgk4HWS1dk7N6Va7TOY/f 9ExbdLudOSrBiSxOrrmtTln++bOmZLZsWe97mLf60TIX6oViLwtxB2OgYDqw+bW4OZOQAdJ1QwG RiZWz/WqU1x3LUq4n6n0D4hGcYP4WG4/pn3FKEkeQrkpZmCA== X-Gm-Gg: ASbGncvRO4s4lLvh/hGcYcLNrhdaKNvZUiN2e7CNSSv5OMQBx3m+FKZ1Mla8zzlgKVO pBC5ym2XWGWThk//Ok/AHriCJSg9aSH/OtIiQP9dtw1kN7KuPYb6MS9d7gcZ4YJUSmKS1z5nu4s mhWNwdalWo19ATh/tDlged2e+DAPb4DoQfDnQW1zUa8/0Pp1kmrI3YqpsOnORYS3fH7tyXOJZZ1 Oyi5Qb9qt7J8xhn5Dkv41MZeHDX+yAFGQZXLxTTX3vGqxwIH7ecmgbEKz+OP4lllGkqvg17Qs2W jrPAx5VNh7Dp2SYCdZSqrN3RI2HqLNEI0aA59yKsork5DGbSBpKYYQGShvQ4n5J+gkeJfnWz7Rj AwXNzfRaT/7zgszlLngufwDl6azMqG1s= X-Google-Smtp-Source: AGHT+IFdVOeIhKBvroftqUh8ZBgxkd8w7erViBVtsZf8iAKlPK9ZZbk9a2ySg941JCbJtkThCrbM0A== X-Received: by 2002:a05:6a00:8d3:b0:739:4a93:a5db with SMTP id d2e1a72fcca58-73980434c54mr24372557b3a.22.1743622943067; Wed, 02 Apr 2025 12:42:23 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-739710d97cbsm11797396b3a.173.2025.04.02.12.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 12:42:22 -0700 (PDT) From: Chandrakanth Patil X-Google-Original-From: Chandrakanth Patil To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com, rajsekhar.chundru@broadcom.com, Chandrakanth Patil Subject: [PATCH 2/2] megaraid_sas: Driver version update to 07.734.00.00-rc1 Date: Thu, 3 Apr 2025 01:07:35 +0530 Message-Id: <20250402193735.5098-2-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20250402193735.5098-1-chandrakanth.patil@broadcom.com> References: <20250402193735.5098-1-chandrakanth.patil@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 088cc40ae866..8ee2bfe47571 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -23,8 +23,8 @@ /* * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "07.727.03.00-rc1" -#define MEGASAS_RELDATE "Oct 03, 2023" +#define MEGASAS_VERSION "07.734.00.00-rc1" +#define MEGASAS_RELDATE "Apr 03, 2025" #define MEGASAS_MSIX_NAME_LEN 32