From patchwork Wed Apr 23 18:32:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 885279 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B417479F5 for ; Wed, 23 Apr 2025 18:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433161; cv=none; b=goiZF8diwPo6x73EJwWytrWh6i9Z6K5IfWZ50+sfDheWdzSXS56bLDPVZ+OewfXPFa10v69ltlWiNJlscWnLFALkfSQAOgp0FWCmsgsMmkZY1RyWBZ1bpRmTgtzPJ079Aax3Byup/mO6HZF9NoIk0HIcvAiyaF8AXgg95Jl/yqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433161; c=relaxed/simple; bh=kKzhfxanVbNKZFHGAIo+Gl7flgds0DkIag9I8116Nn8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nbVn3ElfiT0egBJTNhPNZ0u6/XdwWFaxtiobLWjmDsTgc4PIuh0Fe/H1jsT3a87lKx8k1jDW6jR2zracGQOnWIgP6nxxFiYTKSX1e7jMJ15yK5zFJTKVOXs3bz6LxIY6aF9sVrqhI/K4cxXU3vagsCOWrFY5on8EnK7r/SgnKsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=K4Za8k3I; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="K4Za8k3I" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1745433159; x=1776969159; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kKzhfxanVbNKZFHGAIo+Gl7flgds0DkIag9I8116Nn8=; b=K4Za8k3I3bHHg2Zy1LSD776uF/hwlB0uwot4uBnTU+wFRKjqFTHXc6qu TGoQLHjnESHJSiroUYr6tMJx0oDxRR7ZR9DaT7gNO0tbTx452LOJUudbH 4VBDu54Fr7nUIydkVP/vafmbini2sVwYqoo5Uav6/hb9CDZB4nBLEsVfi MN7G+kdVtx7XJX6RadPGtjgTRjG+hV6fTQdI57RAt/lCxQLuQa6GU/9e9 E4oxulGxqqIfeTnN54hIt+bda2n9DYHlEphGyik5gaU5zLy8EskteNFhn 3vT+qxfRUB8tS6JzsBNg4shdWgmnQzwBQUdBieGuYzunENjk+LTHy1deo Q==; X-CSE-ConnectionGUID: Vsy3DPLGRV+QHyOkpBwADA== X-CSE-MsgGUID: 2FNY+nCHR+24OUKj9Eww5A== X-IronPort-AV: E=Sophos;i="6.15,233,1739862000"; d="scan'208";a="208323914" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2025 11:32:33 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 23 Apr 2025 11:32:31 -0700 Received: from brunhilda.pdev.net (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 23 Apr 2025 11:32:31 -0700 From: Don Brace To: , , , , , , , , , , , , , , , Yi Zhang CC: Subject: [PATCH 1/5] smartpqi: take drives offline when controller is offline Date: Wed, 23 Apr 2025 13:32:25 -0500 Message-ID: <20250423183229.538572-2-don.brace@microchip.com> X-Mailer: git-send-email 2.49.0.391.g4bbb303af6 In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com> References: <20250423183229.538572-1-don.brace@microchip.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Microchip Technology Inc. From: David Strahan When the controller is unexpectedly taken offline, show its drives as offline. During a controller lockup, the physical and logical drives under the locked up controller are still listed at the OS level. I.E. The controller is offline but the status of each drive is 'running'. Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: David Strahan Co-developed-by: Don Brace Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 88135fdb8bd1..73f576ccf511 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -67,6 +67,7 @@ static struct pqi_cmd_priv *pqi_cmd_priv(struct scsi_cmnd *cmd) static void pqi_verify_structures(void); static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info, enum pqi_ctrl_shutdown_reason ctrl_shutdown_reason); +static void pqi_take_ctrl_devices_offline(struct pqi_ctrl_info *ctrl_info); static void pqi_ctrl_offline_worker(struct work_struct *work); static int pqi_scan_scsi_devices(struct pqi_ctrl_info *ctrl_info); static void pqi_scan_start(struct Scsi_Host *shost); @@ -9128,6 +9129,7 @@ static void pqi_take_ctrl_offline_deferred(struct pqi_ctrl_info *ctrl_info) pqi_ctrl_wait_until_quiesced(ctrl_info); pqi_fail_all_outstanding_requests(ctrl_info); pqi_ctrl_unblock_requests(ctrl_info); + pqi_take_ctrl_devices_offline(ctrl_info); } static void pqi_ctrl_offline_worker(struct work_struct *work) @@ -9202,6 +9204,27 @@ static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info, schedule_work(&ctrl_info->ctrl_offline_work); } +static void pqi_take_ctrl_devices_offline(struct pqi_ctrl_info *ctrl_info) +{ + int rc; + unsigned long flags; + struct pqi_scsi_dev *device; + + spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); + list_for_each_entry(device, &ctrl_info->scsi_device_list, scsi_device_list_entry) { + rc = list_is_last(&device->scsi_device_list_entry, &ctrl_info->scsi_device_list); + if (rc) + continue; + + /* + * Is the sdev pointer NULL? + */ + if (device->sdev) + scsi_device_set_state(device->sdev, SDEV_OFFLINE); + } + spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); +} + static void pqi_print_ctrl_info(struct pci_dev *pci_dev, const struct pci_device_id *id) { From patchwork Wed Apr 23 18:32:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 885278 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90954266B4E for ; Wed, 23 Apr 2025 18:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433163; cv=none; b=f+dp8p5H/n72sXEsBoj3KUa5rU1VwPba8ZRaSaGyJggt64kbrywWJ3d9ZHdGfMBIUCSpwDHat281WeNIdJ5rciQyPIJlaU/+T01Apd/Nu5PPXumceCZWi9MaygubqM7GilWbHOfvVdGdVr43ReLGbsXn0riuZFOKBt8LxUs0JNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433163; c=relaxed/simple; bh=sKdI9FBvDGNwNh15EOOLq4L2vmiU8Q+Th1XJGhRD6SE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nhaq/n4wK/lQBPT6g9ysJybYNij7211YeSOHcWeIuMf9jEkPDDqA7hdbhaFNEmLgfP7p3fdj/kB+NvExdpMBL2JLYiSOPslTCa2zYssb1mJK1R5EjNwMpUvzlYwxLRDUd0kxnR0AulfVZbTO/kN7X5+iAnQNnljiICHaQR0/6Ks= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=pt4mwMwA; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="pt4mwMwA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1745433161; x=1776969161; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sKdI9FBvDGNwNh15EOOLq4L2vmiU8Q+Th1XJGhRD6SE=; b=pt4mwMwA9+bMHDGi6LqMWwVM67Ga8/tKUNl+2wmQUsVzAaWQc5jvdLNC iSRhw8aAUAJHj+VMdsSq4P9zmjxdrVA4m8hpRTGmwhF8PUG1S3WI/dPY4 nYxoe9X9OO/axbImN7ttzkyxXbVuRimjnv84Lrm7Lqxsg/JUvkNgO90/D jc1L5gl7O5f0AB0FxYrWaWRYSDXM5B08THi2YcQSLnjJ0RO5IB2WZQ8vD axLNVEDJSeCE/CEHAZ4pCM+VZCKLQPSBFe2e0NBirvxDYB0YJBP7j54Gp zaFrmuGsix7fLFvxAzGQng5O4iBxfO7RYALBUgzdosxvo7k14CBx5/otO Q==; X-CSE-ConnectionGUID: Vsy3DPLGRV+QHyOkpBwADA== X-CSE-MsgGUID: xs6VSAsWSN2idKjAMb6ODw== X-IronPort-AV: E=Sophos;i="6.15,233,1739862000"; d="scan'208";a="208323915" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2025 11:32:33 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 23 Apr 2025 11:32:33 -0700 Received: from brunhilda.pdev.net (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 23 Apr 2025 11:32:32 -0700 From: Don Brace To: , , , , , , , , , , , , , , , Yi Zhang CC: Subject: [PATCH 2/5] smartpqi: add new pci ids Date: Wed, 23 Apr 2025 13:32:26 -0500 Message-ID: <20250423183229.538572-3-don.brace@microchip.com> X-Mailer: git-send-email 2.49.0.391.g4bbb303af6 In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com> References: <20250423183229.538572-1-don.brace@microchip.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Microchip Technology Inc. From: David Strahan Add in support for more PCI devices. All PCI ID entries in Hex. Add PCI IDs for Ramaxel controllers: VID / DID / SVID / SDID ---- ---- ---- ---- Ramaxel SmartHBA RX8238-16i 9005 028f 1018 8238 Ramaxel SSSRAID card 9005 028f 1f3f 0610 Add PCI ID for Alibaba controller: VID / DID / SVID / SDID ---- ---- ---- ---- HBA AS1340 9005 028f 1ded 3301 Add PCI IDs for Inspur controller: VID / DID / SVID / SDID ---- ---- ---- ---- RT0800M6E2i 9005 028f 1bd4 00a3 Add PCI IDs for Delta controllers: VID / DID / SVID / SDID ---- ---- ---- ---- ThinkSystem 4450-8i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0222 24Gb HBA ThinkSystem 4450-16i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0223 24Gb HBA ThinkSystem 4450-8e SAS/SATA PCIe Gen4 9005 028f 1d49 0224 24Gb HBA ThinkSystem RAID 4450-16e PCIe Gen4 24Gb 9005 028f 1d49 0225 Adapter HBA ThinkSystem RAID 5450-16i PCIe Gen4 24Gb Adapter 9005 028f 1d49 0521 ThinkSystem RAID 9450-8i 4GB Flash PCIe Gen4 9005 028f 1d49 0624 24Gb Adapter ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0625 24Gb Adapter ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0626 24Gb Adapter ThinkSystem RAID 9450-32i 8GB Flash PCIe Gen4 9005 028f 1d49 0627 24Gb Adapter ThinkSystem RAID 9450-16e 4GB Flash PCIe Gen4 9005 028f 1d49 0628 24Gb Adapter Add PCI ID for Cloudnine Controller: VID / DID / SVID / SDID ---- ---- ---- ---- SmartHBA P6600-24i 9005 028f 1f51 100b Add PCI IDs for Hurraydata Controllers: VID / DID / SVID / SDID ---- ---- ---- ---- HRDT TrustHBA H4100-8i 9005 028f 207d 4044 HRDT TrustHBA H4100-8e 9005 028f 207d 4054 HRDT TrustHBA H4100-16i 9005 028f 207d 4084 HRDT TrustHBA H4100-16e 9005 028f 207d 4094 HRDT TrustRAID D3152s-8i 9005 028f 207d 4140 HRDT TrustRAID D3154s-8i 9005 028f 207d 4240 Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: David Strahan Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 73f576ccf511..3cb8619e9ce9 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -9731,6 +9731,10 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1bd4, 0x0089) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x1bd4, 0x00a3) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1ff9, 0x00a1) @@ -10067,6 +10071,30 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_ADAPTEC2, 0x14f0) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4044) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4054) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4084) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4094) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4140) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x207d, 0x4240) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_ADVANTECH, 0x8312) @@ -10283,6 +10311,14 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1cc4, 0x0201) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x1018, 0x8238) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x1f3f, 0x0610) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_LENOVO, 0x0220) @@ -10291,10 +10327,30 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_LENOVO, 0x0221) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0222) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0223) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0224) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0225) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_LENOVO, 0x0520) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0521) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_LENOVO, 0x0522) @@ -10315,6 +10371,26 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, PCI_VENDOR_ID_LENOVO, 0x0623) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0624) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0625) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0626) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0627) + }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_LENOVO, 0x0628) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1014, 0x0718) @@ -10343,6 +10419,10 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1137, 0x0300) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x1ded, 0x3301) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1ff9, 0x0045) @@ -10491,6 +10571,10 @@ static const struct pci_device_id pqi_pci_id_table[] = { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1f51, 0x100a) }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x1f51, 0x100b) + }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 0x1f51, 0x100e) From patchwork Wed Apr 23 18:32:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 883712 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F21A79F5 for ; Wed, 23 Apr 2025 18:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433186; cv=none; b=dYJwNlLAtsupPqRVGnYOCuae2S13uuBM8OXuBQz6TYE/y+LO+7wb9ADl+8BYgMgD1RSLVMLUzkLHn3nWWKKTy1fUwqMHNWemQj/z113yRclATRNHKuswISmTPWWeJSNWGfckNzN5z7Y8l739z5nXtJKm/oI9+aR3/wULI+bi1gY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433186; c=relaxed/simple; bh=JxNn2p4Y196/abv20N2vRvYq4I9ql3aqZqEPczfnVu8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KlWK7LZYrZrU07k05jKY2r7LjnlIm8vp4XJWqOln2oMjlE9iMC67pDuCjb125gHv/2nQOOunDbICXIouFuSOUpuDNVXg6Dl9ZROjyC8swGnKKS1Q9DaFR77Y4zvzmkB+Pqx0gIztjKc0QMncJTCGgyIcJZUTe8o27lJL1kQ0bO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=ME8qDu4p; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="ME8qDu4p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1745433186; x=1776969186; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JxNn2p4Y196/abv20N2vRvYq4I9ql3aqZqEPczfnVu8=; b=ME8qDu4pCn4hZEmMibmQcvIvCzCMhH0GpYM0tZm/VQ2T3OEGsaIpCv0F K4BLHH7Bs/r/7T3RcYDEZ2307rPKKPI88a5jkt41PE5aHGJddJv/470es i6Phj97g/m2wvcVMvoDhzCXpPo7YO5Xvb8dLZt3UjB/LnKRRcMUe9u5mH n9wPh2/M3SthuPoITNJwwjpNyNwgdw0v81CN8yGiTtNHdU9TEqU6ggl8N 9tyQ99tktuUFVExMvPH2jazBWTg5cnJItbb5wfw1GT2J0K4w9sbMSsEKD Z2CjyPVkLOJ4XzrkvbLEsxI3uvBr5nB5CPLxVF6kfYWjPKfwCBLR0H/DA A==; X-CSE-ConnectionGUID: whCUM/FPRpqRy+T/Tuj6Xw== X-CSE-MsgGUID: qb6elJGaRiKl0nl37ZJkaw== X-IronPort-AV: E=Sophos;i="6.15,233,1739862000"; d="scan'208";a="40821212" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2025 11:33:05 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 23 Apr 2025 11:32:34 -0700 Received: from brunhilda.pdev.net (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 23 Apr 2025 11:32:33 -0700 From: Don Brace To: , , , , , , , , , , , , , , , Yi Zhang CC: Subject: [PATCH 3/5] Enhance WWID Logging Logic. Date: Wed, 23 Apr 2025 13:32:27 -0500 Message-ID: <20250423183229.538572-4-don.brace@microchip.com> X-Mailer: git-send-email 2.49.0.391.g4bbb303af6 In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com> References: <20250423183229.538572-1-don.brace@microchip.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Microchip Technology Inc. From: Venkatesh Emparala Log the extended WWID for NVMe devices and for devices that have the firmware feature bit "PQI_FIRMWARE_FEATURE_RPL_EXTENDED_FORMAT_4_5" enabled. Log 8-bytes otherwise. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: Venkatesh Emparala Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 3cb8619e9ce9..efc042071ec0 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -2011,18 +2011,31 @@ static void pqi_dev_info(struct pqi_ctrl_info *ctrl_info, PQI_DEV_INFO_BUFFER_LENGTH - count, "-:-"); - if (pqi_is_logical_device(device)) + if (pqi_is_logical_device(device)) { count += scnprintf(buffer + count, PQI_DEV_INFO_BUFFER_LENGTH - count, " %08x%08x", *((u32 *)&device->scsi3addr), *((u32 *)&device->scsi3addr[4])); - else + } else if (ctrl_info->rpl_extended_format_4_5_supported) { + if (device->device_type == SA_DEVICE_TYPE_NVME) + count += scnprintf(buffer + count, + PQI_DEV_INFO_BUFFER_LENGTH - count, + " %016llx%016llx", + get_unaligned_be64(&device->wwid[0]), + get_unaligned_be64(&device->wwid[8])); + else + count += scnprintf(buffer + count, + PQI_DEV_INFO_BUFFER_LENGTH - count, + " %016llx", + get_unaligned_be64(&device->wwid[0])); + } else { count += scnprintf(buffer + count, PQI_DEV_INFO_BUFFER_LENGTH - count, - " %016llx%016llx", - get_unaligned_be64(&device->wwid[0]), - get_unaligned_be64(&device->wwid[8])); + " %016llx", + get_unaligned_be64(&device->wwid[0])); + } + count += scnprintf(buffer + count, PQI_DEV_INFO_BUFFER_LENGTH - count, " %s %.8s %.16s ", From patchwork Wed Apr 23 18:32:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 883711 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B64226B09F for ; Wed, 23 Apr 2025 18:33:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433188; cv=none; b=R39c78A7sMC8AlZjR0Q28XhKRk15NBUpdyulS55txN8yRUHeevaMnf9cxM4ivTZZ9YHlmNPF9gJ+4cWRCvne47LyTS4MLCKRVDOtf04/Z5Up96m5SC/FICqk6GWBbXpBeMhpQoWEvC8VZT9V+LUfFtc2SOK+73sM6+X7vCOT+ZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433188; c=relaxed/simple; bh=k6RYu4gJzGOxlL6KVTX6HkVM2RCwXu9gHX4fp6HujWc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kOunbytwYPQVMLMsiPgmn1wW+Kif0pzM79dd+llTFtiGDJ8pXq17jXKKgPLNGOrJqAbAdJCZol/yYIXQhBnGji8btvSqmp6P8s75F2Xw3tUVYm86aM5C0MNsch5A8scGa1r7bUwWE6kQxVcydlNhwyzT7wUxtesC8RYispLGOsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=XtZWTE/1; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="XtZWTE/1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1745433188; x=1776969188; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k6RYu4gJzGOxlL6KVTX6HkVM2RCwXu9gHX4fp6HujWc=; b=XtZWTE/1pkCEYxN1FsJSUm2Kt4fRIdYWC+xrGJs6Y8dslj7cpEBhpKvG dRpl8dbbsA9/Jx9X4zDDcBdum3gRn/PEPDbeXxBdFd+zbhTiFYgB83Jqm 8XOYh0HQVc3117EgGk+7PhM6fB1lKx0VJGfXMUVTvJWYlysiiBip1g0Bx ur66IDPj6Z6/Z6MYerkA/nCBY3hE0Ls/jPLLCl4wR9FryHoDZhgnmakhR apLjcJnSVOL/VKL6WjTjiSyKSO++A2OzdyIfZkNSldxehTyrlQtf3EQEf Yh+Et8aHaXr/+aDERAFqT2p+sb/USIgoYGSej3wKO7crv1yKm6TVuzgz+ w==; X-CSE-ConnectionGUID: whCUM/FPRpqRy+T/Tuj6Xw== X-CSE-MsgGUID: mEmgiD/rQNW5IEY/Chf+rQ== X-IronPort-AV: E=Sophos;i="6.15,233,1739862000"; d="scan'208";a="40821227" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2025 11:33:07 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 23 Apr 2025 11:32:35 -0700 Received: from brunhilda.pdev.net (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 23 Apr 2025 11:32:34 -0700 From: Don Brace To: , , , , , , , , , , , , , , , Yi Zhang CC: Subject: [PATCH 4/5] smartpqi: fix smp_processor_id() call trace for preemptible kernels Date: Wed, 23 Apr 2025 13:32:28 -0500 Message-ID: <20250423183229.538572-5-don.brace@microchip.com> X-Mailer: git-send-email 2.49.0.391.g4bbb303af6 In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com> References: <20250423183229.538572-1-don.brace@microchip.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Microchip Technology Inc. From: Yi Zhang Correct kernel call trace when calling smp_processor_id() when called in preemptible kernels by using raw_smp_processor_id(). smp_processor_id() checks to see if preemption is disabled and if not, issue an error message followed by a call to dump_stack(). Brief example of call trace: kernel: check_preemption_disabled: 436 callbacks suppressed kernel: BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u1025:0/2354 kernel: caller is pqi_scsi_queue_command+0x183/0x310 [smartpqi] kernel: CPU: 129 PID: 2354 Comm: kworker/u1025:0 kernel: ... kernel: Workqueue: writeback wb_workfn (flush-253:0) kernel: Call Trace: kernel: kernel: dump_stack_lvl+0x34/0x48 kernel: check_preemption_disabled+0xdd/0xe0 kernel: pqi_scsi_queue_command+0x183/0x310 [smartpqi] kernel: ... Fixes: 283dcc1b142e ("scsi: smartpqi: add counter for parity write stream requests") Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Tested-by: Don Brace Signed-off-by: Yi Zhang Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index efc042071ec0..e8abfc56d0f0 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6003,7 +6003,7 @@ static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info, pqi_stream_data->next_lba = rmd.first_block + rmd.block_cnt; pqi_stream_data->last_accessed = jiffies; - per_cpu_ptr(device->raid_io_stats, smp_processor_id())->write_stream_cnt++; + per_cpu_ptr(device->raid_io_stats, raw_smp_processor_id())->write_stream_cnt++; return true; } @@ -6082,7 +6082,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scm rc = pqi_raid_bypass_submit_scsi_cmd(ctrl_info, device, scmd, queue_group); if (rc == 0 || rc == SCSI_MLQUEUE_HOST_BUSY) { raid_bypassed = true; - per_cpu_ptr(device->raid_io_stats, smp_processor_id())->raid_bypass_cnt++; + per_cpu_ptr(device->raid_io_stats, raw_smp_processor_id())->raid_bypass_cnt++; } } if (!raid_bypassed) From patchwork Wed Apr 23 18:32:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 885277 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4EFD26562C for ; Wed, 23 Apr 2025 18:33:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433188; cv=none; b=FfbZgDoM2iCgESbWsUDz5OZyFwS6afh+86NY772s2sWsbSuHv2fyv/l7C/YeBiRJz2FIUo5kafI6Ugs20yUP5asXG6Ju644j4ZRM07SK5IcKTL6ygLSPlfT/XP26lIimvYs1Wg3g3Y7JpLCN51MNuR2sfCJ/KQfw8PG+7zOtgg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745433188; c=relaxed/simple; bh=n0xt0EwP5kUz+i3RaH/wuQlIapQKYFjYfIh5C7n3hIE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l+HIgxSsSRhMNaJFBRtNS1LslWGdMc6gufUGVYVDb9YXn5piSvsyTWtW5X0ielJqPmTRZYiAkZVlvcV527vbV0yy9oSJI0PFdJkksq0SmBrCVGkeNPqcMuVy3ZgCDBR5PREipOyX3XkTOguJcnJgneSxr/MDbJ5ICk5tIN9+QKE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=uyc03by5; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="uyc03by5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1745433188; x=1776969188; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=n0xt0EwP5kUz+i3RaH/wuQlIapQKYFjYfIh5C7n3hIE=; b=uyc03by5LRxMPk6GluodOggELif2I8rrrSSN9w7zb9V90Vw3/Z0nkrNK iveKS5VaRkP4n5GZWAFtaGuHAimpr0uART8HRPQqTzdpdqHrPkiy1yKsG zkJXC3Z0ZnwWEi/AFQDGzXm32pwTv7jkIYxmAfTlY8QGaGDDfAnPB38dG YuZMR6bdersZRCNRVyxsc4woStTyG8g1+LuJWl/OPZuyj+Yh9kGGvvi1M +3OBPS+1KjVQohIsHze/EPUDJ3qgjJQK2inhR8XdVazl0RFuWgWGBI7++ ekBzff0S28IBYIfQdIv7GQ4oiczED3HrtR9SdLUhGb1zHxuE+Lpb/nB7Y g==; X-CSE-ConnectionGUID: whCUM/FPRpqRy+T/Tuj6Xw== X-CSE-MsgGUID: B3/WCib2Q2G84vT2Q+gSrw== X-IronPort-AV: E=Sophos;i="6.15,233,1739862000"; d="scan'208";a="40821228" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2025 11:33:07 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 23 Apr 2025 11:32:36 -0700 Received: from brunhilda.pdev.net (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 23 Apr 2025 11:32:35 -0700 From: Don Brace To: , , , , , , , , , , , , , , , Yi Zhang CC: Subject: [PATCH 5/5] smartpqi: update driver version to 2.1.34-035 Date: Wed, 23 Apr 2025 13:32:29 -0500 Message-ID: <20250423183229.538572-6-don.brace@microchip.com> X-Mailer: git-send-email 2.49.0.391.g4bbb303af6 In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com> References: <20250423183229.538572-1-don.brace@microchip.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Microchip Technology Inc. Update driver version to 2.1.34-035. Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index e8abfc56d0f0..a7ab87220c0c 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -32,11 +32,11 @@ #define BUILD_TIMESTAMP #endif -#define DRIVER_VERSION "2.1.30-031" +#define DRIVER_VERSION "2.1.34-035" #define DRIVER_MAJOR 2 #define DRIVER_MINOR 1 -#define DRIVER_RELEASE 30 -#define DRIVER_REVISION 31 +#define DRIVER_RELEASE 34 +#define DRIVER_REVISION 35 #define DRIVER_NAME "Microchip SmartPQI Driver (v" \ DRIVER_VERSION BUILD_TIMESTAMP ")"