From patchwork Thu Dec 12 23:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 850691 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 CC72F1AC891 for ; Thu, 12 Dec 2024 23:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045284; cv=none; b=Zzjne/aWKE5ZpXnxG0BQ3RLSJLua/gtCK4pViyl7Ad9CFRIGFpxCHWysWtHFzya0LIOmE1B5rsizK8UWXdjDtbDGXTtKGY1q3KUD9cqipbxBEp6Q/yxQX0Q0yLaUk967HHjHlHUY3COA7XuovyYLIe+VUxkfsOUOCkBPENPiIkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045284; c=relaxed/simple; bh=4k92MtZjJmZ2mrX2PydRLJJHpMkHuox7DW00Mq2dAoY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QxHnzQDcoSO8qrd7vnXhHTzptF08CPsnDbbBALGlNQaEL4ZzPQU6XsjIVnJEYxv+GwxcdGY90/WB51yRnZvS55JsWMzmr3+EUAxe8qr2r2rQar+aBIUTRvkXzIJPxM87hP2hyUY9e5g4mojGA0/Eb6+TvJvi8LLjlVrKa3QI5i8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MlvtoyHG; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MlvtoyHG" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-21654fdd5daso10429995ad.1 for ; Thu, 12 Dec 2024 15:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045282; x=1734650082; 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=7Xoh0fInBWbhi/eDwU8jUtcyY7mrX8SIdhTjfoMZaeg=; b=MlvtoyHGaLl/byY+1BHpaCRjKBty+EN9FCoL6HBwU5Ps0rSpDGlNNS+UuIoop1/Mvy 3yEONzHeIA5sUy3z3TbdeR+A3gzg6f526qAQqr4aHRunv/GiH6hY90u/zgmaK+WDovCf bhInReM7zpQp/tK1jtKZg1e63KqXGAyqB2zffWdA/xOiA63QVgdY1eE+ylfW5y2xSrPW ZgsYlpafm4j/3/Ed+qUm+U5On5UucYb9snny4mgS1enzFvHox9dCpXvVokcLnEhr6jAV ci8aCf0ql3I8R4DgWwERoe/68VNzWvwMIRTMVKCJ9rH8ZlFnwsof06i8uhFTcDRvtPol T48A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045282; x=1734650082; 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=7Xoh0fInBWbhi/eDwU8jUtcyY7mrX8SIdhTjfoMZaeg=; b=NNZgqiDgKLdhu2/LerFr2+16nK1qNWwgU5YSJjs6ETX04yrQDoJjtNuyWyvV5cVcDA LFa/4UiJtRZwyC/dabcqQsO3beP24/Ut4n+2uxG0Ac7O+tmxW/qcmOtqyqTuaph3InNj fdsGayQes/uej3FqK6GlIlKjpnq7m37aE63nt3UFh0736f3cPl2rOBWiuyo1uCgCBTIR RCHbNs1YEPon5fLhtP+PJDcTR8lWQSstGKM+ptAkhVu1AaKFGsvRU+Dqkke4niHmlMNO mbZ9w1k+pXFEVgVtfUp1R3vUrHmultBvqkOaWOcfxxw1C+Bf9XUgOtUUMN1bz95eXPBk eNBA== X-Gm-Message-State: AOJu0YwhFnc9r1JLSLav/K8hrG1SZ3C0Gf88fcnb+E7ZgnNpnsyZr+AD zSiEE3RIkNu0CIkD/dz/DiGo0PfPGxTN4b+v3ZqVfHwBFUgMI7E2DH9P4Q== X-Gm-Gg: ASbGncu1iAWifdKCbXiB9qKTo7q3P74uVXQR2J1P5VbtUwf1QSgIEZecNpu+sw+HwuX 8oX87i+Sjx6bosXK1CZJSsrYZCrFez8zv2Rpa9EE4GVm0noCIxYtqd/10CASnY8k2+WpjteqA1i euze6PM4eZEKyqmBMXatZ5+m17Gpf8t/T4XMZPKu6n+d7CMLoSFfzUSP++hlA3BW37JiMwYx2fC LzZ2t9HHkmbdiri7CPAtTMaDz9+dJ2SrGmjVQAZmwU5ul3o3+WJAZzt0Uzhkur2ZkxSr8FwFRtK dujEtqJcpDi9iW8NpWOc6EVKq+hFce+def2+71ns8A== X-Google-Smtp-Source: AGHT+IFuS0xiZ4DjdZw6SgzUgE4ni6TlQ8HJLOJzusQmkZejsDQNcjmh4xYj1t7GALrNt2r4DL9iPw== X-Received: by 2002:a17:902:d508:b0:216:6f1a:1c81 with SMTP id d9443c01a7336-21892992997mr6951755ad.2.1734045281880; Thu, 12 Dec 2024 15:14:41 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:41 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 01/10] lpfc: Redefine incorrect type in lpfc_create_device_data Date: Thu, 12 Dec 2024 15:33:00 -0800 Message-Id: <20241212233309.71356-2-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fix smatch warning by redefining local variable memory_flags from int to gfp_t. lpfc_scsi.c: warning: incorrect type in argument 2 (different base types) lpfc_scsi.c: expected restricted gfp_t [usertype] gfp_mask lpfc_scsi.c: got int memory_flags Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b83627108eca..c57f11f6fc84 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -6423,7 +6423,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, { struct lpfc_device_data *lun_info; - int memory_flags; + gfp_t memory_flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !(phba->cfg_fof)) From patchwork Thu Dec 12 23:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 849960 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 700EB1AC891 for ; Thu, 12 Dec 2024 23:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045286; cv=none; b=o24k61moq69KCMx+pqLEY8xN72iFGzCX7OY28yv/ViDy32Um7AKqOG504+DlYOXgA6NnmbsooAaGqXqrr5No5DIwKyWQ3vb/KWf9OI++3XnQlWyI0bzAbCFXQDbSOlgnm/ts2FFFSNLdg0MsE1zgJHP0BgL8a0pDiVLIoNx0Ups= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045286; c=relaxed/simple; bh=QZlbgphKUCDE4lwWBxXQr7bh39j0yqOT06VHz9LByOw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eP3PqAx3/tTMnX4FBI8SIqKX9q9TlJSNINUa4ShYni4Yz1Ss653wF50yFTP1UnYIlwWjz97yiOl7puB2MrW8Mp7giqTzOlt04CvVGatKpspXBV7yx6nJ7Lsh097fTZsjuuBS1B41cKBLz0l7pYpT8RnbAQIA/pU2oG1P5kS9Zsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iV8NQ343; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iV8NQ343" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-216395e151bso7824035ad.0 for ; Thu, 12 Dec 2024 15:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045284; x=1734650084; 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=BfUlV5Au1B6a5Kic7bUZWej6b7ILHa5XUrJrlRhG+p8=; b=iV8NQ343ov8uq4lsSPNHLkyTImfpQR1KbE8oVCeqzHGB6UxHlIKiuXdYE2YjiZpHi8 Fncu1o/Mp+veLHOvAet8Rbei5vFICCkZ/+EH7U7EQgtI8AvF56acVBrObBzXlxipdqUA tD296iasQk9zLK+rwB2wUk7YHNbrd5MBe0OlzgyhqGJZ7HdEt8goX6sAV0JUQV0+1B+f jfnSl6cGX7qiC0jKctAeA/WWpy0x1I8i7eoJ8z3W8qutrxKKgD5s+ItaS6sPfr952CNJ mw5Nv+dJ6nRzkPAQ+SY/8VAU4VU/zgjFtB+WSpuqTr+eacrjuyVN1V/+/Xd4B56ymc/z g5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045284; x=1734650084; 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=BfUlV5Au1B6a5Kic7bUZWej6b7ILHa5XUrJrlRhG+p8=; b=Vg273qX6gknDiitkXESOIy+pOvE2VlUWm6/zHBC6tR5SDfQ/Z7dZ3xL0RM8gc1RihY l++DJ3jcni30PFMA25QYgJjnqMFFsQj3vaAmngTrV9WpMBKQ7McJPf3vseSOdNlmoUco UWVGpN1kp0vbnjRSDQQ3U5TAeJl/HcTWtGsI1obXfnxupOa10HFAGVZi1O+STEBDt0cW sBW6MRS3SzpZw1EJgPYqa40f9UhMwIgNsCi4krA2lchVfTNuk9dB8zTGr6R8pEm2yayO wrnw9ih6RGMlad2oGTLjT6h9zXzLpnYBezXv1aPzomXYF0WP3wNxuQLBhk8XKp9A3RiM hI8Q== X-Gm-Message-State: AOJu0YxbbGjnjEyWht/EOLgEst7GywvdBfIgNzdNCaYSwakJBhdbfl/c DkPVtpI4Ge4CRBcyej0zfOvc+3BYBe1x3/9IlAj+hAz/pA0WWGXbTNgJNg== X-Gm-Gg: ASbGnctrs8J0viItFMA4F5+ronD5uqg/PQCUBoocw6Vq5zWODrwj9Ezny0qfd8b9YEP 5oiajKvP5Pj2lVJZVu1w+3fFy4cRX/X8iQjHOIiFQ9Zn6SmOEa0k3f4+0u6Uk7chpkkyvN4CZic IVvLzowrUesMe0JCyLEhibNCMtdF8sJga6iizBCPHI4mE//uNb/KWZ3UUmi1H+ugEMvcKOO2jwP kj2EGu43pyWnPOq+p60vRT1mVWJ3xjpAmhysv/yeVQAOnZkyQYixWH+aZ32tartcJ7oSK9TsBtG +hEab2queXdGPeoqdWe9esDX5QrZOlhLLHlBCv7pTg== X-Google-Smtp-Source: AGHT+IEfkMyLJcX+sGEh2y4vSLxf1FqtXz9TAhUvL99Mr+Ov66+JCLYw8peU0+cb4mltbmkHkkcJbA== X-Received: by 2002:a17:902:db02:b0:216:3440:3d21 with SMTP id d9443c01a7336-2178c874e19mr78954985ad.26.1734045284521; Thu, 12 Dec 2024 15:14:44 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:44 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 02/10] lpfc: Restrict the REG_FCFI MAM field to FCoE adapters only Date: Thu, 12 Dec 2024 15:33:01 -0800 Message-Id: <20241212233309.71356-3-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualify setting the REG_FCFI MAM field to FCoE adapters only by keying off HBA_FCOE_MODE phba->hba_flag. The field is not applicable to FC adapters. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_mbox.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index e98f1c2b2220..fb6dbcb86c09 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c @@ -2524,8 +2524,10 @@ lpfc_reg_fcfi(struct lpfc_hba *phba, struct lpfcMboxq *mbox) bf_set(lpfc_reg_fcfi_rq_id1, reg_fcfi, REG_FCF_INVALID_QID); /* addr mode is bit wise inverted value of fcf addr_mode */ - bf_set(lpfc_reg_fcfi_mam, reg_fcfi, - (~phba->fcf.addr_mode) & 0x3); + if (test_bit(HBA_FCOE_MODE, &phba->hba_flag)) { + bf_set(lpfc_reg_fcfi_mam, reg_fcfi, + (~phba->fcf.addr_mode) & 0x3); + } } else { /* This is ONLY for NVMET MRQ == 1 */ if (phba->cfg_nvmet_mrq != 1) From patchwork Thu Dec 12 23:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 850690 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 33E321DE89B for ; Thu, 12 Dec 2024 23:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045288; cv=none; b=PhuEa87+eyJQjWGj8eaATf1uvHD58Bvh9QGdVzrQprlyppc+SwJjLcfwo0aKzQhgwdiiByKvsVfbhugj66Q2K6xaRPN78URxWzSaBQywtd832OqX75lWoJmZRNO8ostSOntn03LLbrFc128NooOUvs15lzBSjfLLslC3NyvYx/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045288; c=relaxed/simple; bh=s/NRhH7EcuHFvDmZYPPrOAxpo0Kj9bxVsFXAiJpaiPM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R8FG6E+9QOwiohCZdiM85E8I12WeOsv85xNun7A7TDRmRXTW8vk3+OazHKmCJal6qXPZKYzcCGgjnxObOVgzHuX2DSHfnjVJ57DX8+7KbUemko4gHWIgaW+3jHnn8oVnGiOgA0MGBj0U9HHMQ0lyVPe7NaNdp8kcGlRtvjgyZU8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KzcnBnY4; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KzcnBnY4" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2163bd70069so11966545ad.0 for ; Thu, 12 Dec 2024 15:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045286; x=1734650086; 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=msb7H6YpNqhqS3i3C8VSQeTs1vnGuAB686qyJ7Ilrik=; b=KzcnBnY4FW7BiCRkbPYvdUmKV+G1TFobXVC3QvnB+Df7BAP7XD2Bor3G+0D0ZwMfw3 xRrofhCiaQUo0bc4PQkcBkZK/evGtRxbnhiniOXlYX45BvqB8nYXEbSCUC2294suBD67 Q1DViU1KwvtrNcwL2pG3C8++NsEVtC/GosQSvQppZVi4CYFZPyljXmWY2Nuo2IpalE0W ymYbZ7Zh14AOZbefnj9W/H+zKegb9YFnVMUbGXktQ0n4ccQLroFMwnioUqXyBMVDi7uo B9Ke9WgzQ34/UNwb3wwzifYuYN/Ncnkl4qiCXqGONvMOkOR8Jhc2MwuOErI6qE9ZLJWC /Uag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045286; x=1734650086; 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=msb7H6YpNqhqS3i3C8VSQeTs1vnGuAB686qyJ7Ilrik=; b=XWMgP7r4KMqd6VNZMOVbZ9xAxtww5fv3oR3DlZ/3tGLJ5Dr+jfscgBFtcoMvws+a/D /Wl69rsaqLLV3IRYZfPv3DEyjTqJpkVQQ5Ai+7LJtZ3fn1pgw7MKo76mu65MRrWSE0Hm eJN0Rja8TQ5+Z3Jb8OgbFJz6DfnJGlE7Sk/o66mfavp/hnCUl2sG4SRX/Kw+jeqRhuQy moyIcEMy6BYiI0eRCofoUoxFuOLb2IiUMtpQlGFX+KUxbmobYGH7QXHm6FrIndzCu5QN N/qkAQ9QQkaupMVcP/hndwnEu2E7OLc7Q5LzBNk49mgoKbCPkMJXPIXCiPJdT1WjVJbP aEug== X-Gm-Message-State: AOJu0Yw61LsM6kCSZaiNw9k8JmfBEXKGeMHwW9rMKjFrPqA2xEhzt3RJ eFDnaNyfDk4fzwDjrohilkyPaGWR82OtThngItAEkt4mnFLLNH4XqGyXow== X-Gm-Gg: ASbGncsungeN/jfO24kbpUNAwnkAHvq6qdKCFMrJhdZVu3lWN/RfD+4QDlXAUl2r4fa k/ARCkoKRsCe4sQ7ZgQmKKNpmAjYYSEnIsXPWdIciS1Bt8JbCcUrS2f5KS+VGuYUpPylsCfAzCT ncnQ9DcQ+uQxZkLMA/oh8Dd0SZl+eOARGU2nFh31q2EKiGBQw5n+cIUZVTYfWofFi65ocNjeBcq 571NVucErnfmGpLgx3Ej8xDn0nKh1CMXRstj9hu4E+0lZvFKq8h9LV4Gq3G7RHskFBMgmoznDb7 dI7T5+sdsFV2pe9hT1qy8RiD+lTlHmQKRwxvSAqwgw== X-Google-Smtp-Source: AGHT+IHTjH6jXGgzNP5BxRAxPs5iUgXkRhMN7KmLk4Hm3Y6yOTYnogh7Dp5/AQi6tn77zC7FSDKLCg== X-Received: by 2002:a17:902:d492:b0:216:50c6:6b47 with SMTP id d9443c01a7336-21892a510d5mr7581015ad.46.1734045286257; Thu, 12 Dec 2024 15:14:46 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:45 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 03/10] lpfc: Delete NLP_TARGET_REMOVE flag due to obsolete usage Date: Thu, 12 Dec 2024 15:33:02 -0800 Message-Id: <20241212233309.71356-4-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove the NLP_TARGET_REMOVE flag as its usage is obsolete. The current framework is to rely on the lpfc_dev_loss_tmo_callbk from upper layer to notify final ndlp kref release. There's no need to specifically set NLP_EVT_DEVICE_RM when a LOGO completes. The dev_loss_tmo_callbk is responsible for the final kref put. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_disc.h | 1 - drivers/scsi/lpfc/lpfc_els.c | 17 +---------------- drivers/scsi/lpfc/lpfc_nportdisc.c | 10 ++++++---- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h index 3e173b5d00e0..81cfa35dab98 100644 --- a/drivers/scsi/lpfc/lpfc_disc.h +++ b/drivers/scsi/lpfc/lpfc_disc.h @@ -208,7 +208,6 @@ enum lpfc_nlp_flag { NPR list */ NLP_RM_DFLT_RPI = 26, /* need to remove leftover dflt RPI */ NLP_NODEV_REMOVE = 27, /* Defer removal till discovery ends */ - NLP_TARGET_REMOVE = 28, /* Target remove in process */ NLP_SC_REQ = 29, /* Target requires authentication */ NLP_FIRSTBURST = 30, /* Target supports FirstBurst */ NLP_RPI_REGISTERED = 31 /* nlp_rpi is valid */ diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 37f0a930d469..842b67e37f10 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -3035,19 +3035,6 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, /* Call state machine. This will unregister the rpi if needed. */ lpfc_disc_state_machine(vport, ndlp, cmdiocb, NLP_EVT_CMPL_LOGO); - if (skip_recovery) - goto out; - - /* The driver sets this flag for an NPIV instance that doesn't want to - * log into the remote port. - */ - if (test_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag)) { - clear_bit(NLP_NPR_2B_DISC, &ndlp->nlp_flag); - lpfc_disc_state_machine(vport, ndlp, cmdiocb, - NLP_EVT_DEVICE_RM); - goto out_rsrc_free; - } - out: /* At this point, the LOGO processing is complete. NOTE: For a * pt2pt topology, we are assuming the NPortID will only change @@ -3091,7 +3078,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, lpfc_disc_state_machine(vport, ndlp, cmdiocb, NLP_EVT_DEVICE_RM); } -out_rsrc_free: + /* Driver is done with the I/O. */ lpfc_els_free_iocb(phba, cmdiocb); lpfc_nlp_put(ndlp); @@ -10411,8 +10398,6 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, } } - clear_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag); - lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 4d88cfe71cae..71c76d90e8e7 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -2255,11 +2255,13 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, (vport->port_type == LPFC_NPIV_PORT) && vport->cfg_restrict_login) { out: - set_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag); + lpfc_printf_vlog(vport, KERN_INFO, + LOG_ELS | LOG_DISCOVERY | LOG_NODE, + "6228 Sending LOGO, determined nlp_type " + "0x%x nlp_flag x%lx refcnt %u\n", + ndlp->nlp_type, ndlp->nlp_flag, + kref_read(&ndlp->kref)); lpfc_issue_els_logo(vport, ndlp, 0); - - ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; - lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); return ndlp->nlp_state; } From patchwork Thu Dec 12 23:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 849959 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 B57981AC891 for ; Thu, 12 Dec 2024 23:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045290; cv=none; b=gJHb4u80XNoY0xQ/1nvlfZGlZeoTXapdfXR/hrqkNlV1sRHhB+lHQSodc0m9L3gyEnIzng0R995ONfKXDIb499OpazhMx/L11aEkuWB36fl5y2mncE3TY7k27WzNKICikwNgfn+TpQbYdYSRK+EsV8kiVOXVM9G8c0UF7+snuKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045290; c=relaxed/simple; bh=4hyzJKQpvQAQbDN5giMWGtlmH5qqA8yosW6q/7APKnc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=USSsXqLd9jOcluerK3N4DdSeVIR1KC+rzLFXDgJHcK+QPRopaa1HW5uWJRqE8obLa9VQGDdDCXkumokbE6woEj6gUNBjkV8DJoijycHuP/vAKTrK8lJscKMlIG96UklLSyz+l3/jmLAts0JgnNO2ZDgPukKJmkZ98CKSm1H67X0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WFKy+ZxM; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WFKy+ZxM" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21631789fcdso16050965ad.1 for ; Thu, 12 Dec 2024 15:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045288; x=1734650088; 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=vfuylJuOeoTcA+wDByp6VlzCRcB6cmqBvp6ZHarWkEg=; b=WFKy+ZxM9EEcSAKeYfsW1nS8Zy0ALHyyKCcAvRqpfD2zYl+nl59FkR1c9HKYQSLmg/ BVJLsMQlPDm7EH/mltQorkRA9EW1iltB309pPO+MZmhiuDwG2YWbYJ73pdLztA9iXhLF iszoL7M1S6wqFAvz6joLeFtWaI5cwjStm06gk65dm8YTHNwUVbZA/aXW6qA9zHPi3d9o MxqulxMOLqpvfcY7qJoeImHAa9Q18cM6jGzMl3qzxKWYSgRbF1i7/3wZgDZV88ruRBjz RfjtoxbzubJSlR3FW9LAirNlLVEUuEWvvCkM9WmR7o9nklIyJ8kukZaBzZbT3+4ZEQaZ fT5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045288; x=1734650088; 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=vfuylJuOeoTcA+wDByp6VlzCRcB6cmqBvp6ZHarWkEg=; b=FjA4uegH0/NhkrFaS2z0AxBKTgV9P5guWv9KxrfKkIuW7A+z6Q9gt9GsuvMUL28kcL pbccJsc6ULFtSs7zpn9m3qrMbriqVFai8btoRfdgrDetj2dBPwaZRrYfzrqQh7nxJ+6B jfHkkuVTdp3PxDpszgrYLxK7xhEB/MH97FOsyzTLQCfkFdKvSzAPnfkF8DplzxqcSmRw pwV34o1VVAvFKw/fyGTUebPucP5Q53+XsaXRPHThu9Y7CBkwpjQPw2iEHbbCfekyP61m Iyk6wtmT5enggm8u/s7RgoLxS/IN6OKqlXYe8u15R6LHS0Vh/CD/8TinF1VOHYyK5JIl ty4w== X-Gm-Message-State: AOJu0YzrBAFVw6ZJVTZ6h+xH+cyp8nGwG9v6rrYdukH4hvZ6iJ10xtgO 0ANtlDNYBqsFkYSSvKjjHgn9xL+iL7+uABKkALil3ugyTs4I0IvfU18pcA== X-Gm-Gg: ASbGncsH4sGAALiHaOJgdbRC/JiWtJo161JjnSBLkVFSGAK7uRoxuXiUZnu0mEVLnin hy7aDjJWFXZE7esaLSBCTXkhPEw4whioNALE8DzZ0JcwCR91SbSAx3PzTZWDfev1P4ljoFIRNP/ QEqXQ9nV22l7BBRLbY3Sl6N7ps2P5tCy+H7m6od+nVpPebT2Uzs5slmmlpypUq+ZLOYhdED+J3A 89GdTdv1VMY4PKl/ynsXq+icDKFut9LdWNgpkIT/FlS5eYYCIS2mUTnUfcQRXIHCCWgkzJpgeo+ RIk4FD+qsNC3x04VHdSG9DilZrPKLWrWjmfBnbZEqA== X-Google-Smtp-Source: AGHT+IFLxWfyukLL+aOYg0fpdQc7ckKmE9MJlItFvgeMHa3VqKfrygoL8Px2GbGOxfHnSbpRFBCQFA== X-Received: by 2002:a17:903:22c9:b0:215:44fe:163d with SMTP id d9443c01a7336-218941e8d3emr3009545ad.17.1734045287853; Thu, 12 Dec 2024 15:14:47 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:47 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 04/10] lpfc: Modify handling of ADISC based on ndlp state and RPI registration Date: Thu, 12 Dec 2024 15:33:03 -0800 Message-Id: <20241212233309.71356-5-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In lpfc_check_adisc, remove the requirement that the ndlp object must have been RPI registered. Whether or not the ndlp is RPI registered is unrelated to verifying that the received ADISC is intended for that ndlp rport object. After ADISC receipt, there's no need to put the ndlp state into NPR. Let the cmpl routines from the actions taken earlier in ADISC handling set the proper ndlp state. Also, refactor when a RESUME_RPI mailbox command should be sent. It should only be sent if the RPI registered flag is set. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_nportdisc.c | 43 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 71c76d90e8e7..5aa21c683ac6 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -64,9 +64,6 @@ static int lpfc_check_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, struct lpfc_name *nn, struct lpfc_name *pn) { - /* First, we MUST have a RPI registered */ - if (!test_bit(NLP_RPI_REGISTERED, &ndlp->nlp_flag)) - return 0; /* Compare the ADISC rsp WWNN / WWPN matches our internal node * table entry for that node. @@ -735,6 +732,7 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, ADISC *ap; uint32_t *lp; uint32_t cmd; + int rc; pcmd = cmdiocb->cmd_dmabuf; lp = (uint32_t *) pcmd->virt; @@ -759,21 +757,29 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, * resume the RPI before the ACC goes out. */ if (vport->phba->sli_rev == LPFC_SLI_REV4) { - elsiocb = kmalloc(sizeof(struct lpfc_iocbq), - GFP_KERNEL); - if (elsiocb) { - /* Save info from cmd IOCB used in rsp */ - memcpy((uint8_t *)elsiocb, (uint8_t *)cmdiocb, - sizeof(struct lpfc_iocbq)); - - /* Save the ELS cmd */ - elsiocb->drvrTimeout = cmd; - - if (lpfc_sli4_resume_rpi(ndlp, - lpfc_mbx_cmpl_resume_rpi, - elsiocb)) - kfree(elsiocb); - goto out; + /* Don't resume an unregistered RPI - unnecessary + * mailbox. Just send the ACC when the RPI is not + * registered. + */ + if (test_bit(NLP_RPI_REGISTERED, &ndlp->nlp_flag)) { + elsiocb = kmalloc(sizeof(*elsiocb), GFP_KERNEL); + if (elsiocb) { + /* Save info from cmd IOCB used in + * rsp + */ + memcpy(elsiocb, cmdiocb, + sizeof(*elsiocb)); + + elsiocb->drvrTimeout = cmd; + + rc = lpfc_sli4_resume_rpi(ndlp, + lpfc_mbx_cmpl_resume_rpi, + elsiocb); + if (rc) + kfree(elsiocb); + + goto out; + } } } @@ -815,7 +821,6 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, set_bit(NLP_DELAY_TMO, &ndlp->nlp_flag); ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; ndlp->nlp_prev_state = ndlp->nlp_state; - lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); return 0; } From patchwork Thu Dec 12 23:33:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 850689 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.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 6837D1DE896 for ; Thu, 12 Dec 2024 23:14:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045291; cv=none; b=rzcNaxnUeU3s7+7GpYKHLJfVAdgDYImoBfplW6QT0UWg913gNxUWGVXXL2RJoI53AK4e68vDJPj0TB9ryMHSPUz6Lwsjp08DDiqVeOem17biSClZXDnVYT/QKPAcVRCv5VHwwKyqOhxooqWvi1MvVRn6JvgEDwS2CEZ0ddhYWM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045291; c=relaxed/simple; bh=waWug8IGDncW3tQRpAj/rZzG1k05eTpQOA+4/LIMZQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hbn/s20fyhLjSx+8nsZPvGCdbGfV8OVJEAX6cZFtPZHyHs3JkiAjTU4IxCdrMjuq4VFDCFFyO1MxJ4Z0y1vsysTtCM1D+6VVhU8Vd6JRCVRUMVUcI7+gh9MlJrRTWrafyTgh2a70VD346Jsm6lAeii8/PD0elaHVtaFzbdbCJhc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CzOdguQn; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CzOdguQn" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2165448243fso12789195ad.1 for ; Thu, 12 Dec 2024 15:14:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045289; x=1734650089; 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=p/wJgB/y7ynxTAPTPS5AevrbCTm7/rtqAIAqpuaPalE=; b=CzOdguQn9BCsjBhDxUAaEOALdA83e4tx3oh8YtYXuQ65oS2fgkOXalxIU1IF4CahgC slRgGtZYZwxvLjN4JG0WOXur4pOYt4u9YOpb0/gKGHrvaQudtV5DEJPXgHER4kWLf9UF DWsJdIeySqeng05zcTvnq+EmSPYplGLkxKz9YaXsrJUH28+1FrIF0IvPr6YPfzJJLN3b 5KLRI1It+kTfdjKZ+a9Vk+6xxw656zFELUNlxJnRt/Ie+/LMLD6d6GvndW/u2al0B3HO Uf+gNeRnYZFJSOl8Qnxy9mMZha2nosDwv2dIBva7pL2hEPsFidMRvCfmFheugr/ywow4 ToVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045289; x=1734650089; 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=p/wJgB/y7ynxTAPTPS5AevrbCTm7/rtqAIAqpuaPalE=; b=tsJiRH3wc/DTWDQ3+D/xdl5WxLDB2xB7JVGKyeDXCrFx8+IZvFFDmKPTzhFBnn511V UFJD9Ko7vgk4lQzoj6bJFtizekKvJy3UGJEzgaot6mD6owhamSBbFd2td5XiYChdsjNH 2JthWw5GA4esk0HhgP5dtKLuAQ/864ng5gNIfMeB6rABED/g0lhPWcPMg1gaiX84GAFS VyzVudoQz/HaOlBCRSIR9KO5qINoJOP08ovwwVfSTn0VWE4g+ljqpX9NRX4QpLuFrYuY puA2k7uFq3Kf8eS0rylWa66Ei/BVaQ/FH7uv0ybhlhudof3nZyIy24R0ETJ81NxGu2Q+ kY1g== X-Gm-Message-State: AOJu0YwBJbEw+zEVqbRMmyhG9ZglMhRSYoLnK/WQZeHhIse28POnETqY fF0Vi9wPwcIFFjSQ9itEXPG8Du37ct8B6p0kxOHdtcO1cDCn0dtqNpw+8w== X-Gm-Gg: ASbGnctSDcEvM6LdAJcMf5UGtJkcFi1jft4D5SPJDBws6MbXzjnYbbOrsVNWRRtYLnQ ISDjefQ/bQOot42ArP85auDWcFcwGHvdI6lzuQsoNz7V9GA4jWhEca3c0ejR24WcFcrwxbxD7Rc e+MxXJX/KJn0g/e3+b0aiWbbeY027HScUevfIkhiS2ob9U5BJrTVdk+slhii/QAr4YV/TsTuS/u bZC3xxrUiNKM33otxdfDj8UA2hS0YtGuZrClJNeUMxRV3/JTqm1Fs5wue5pR8jD03slWVgqN5kW n4R7juPpMZUyJ9P7Csda4P0ZRY2L74nlpMtmnihvYw== X-Google-Smtp-Source: AGHT+IFzVqN6+Yptv1yOtDwYKyCT/NkdhYj/lAU1eoE44/3wUOt0vPjxDlooDLvuMraUY8yRhZGt4A== X-Received: by 2002:a17:902:d503:b0:216:59ed:1a9c with SMTP id d9443c01a7336-21892a849bdmr6296485ad.55.1734045289452; Thu, 12 Dec 2024 15:14:49 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:49 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 05/10] lpfc: Add handling for LS_RJT reason explanation authentication required Date: Thu, 12 Dec 2024 15:33:04 -0800 Message-Id: <20241212233309.71356-6-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When a LS_RJT is received with reason explanation authentication required, current driver logic is to retry the PLOGI up to 48 times. In the worse case scenario, 48 retries can take longer than dev_loss_tmo and if there is an RSCN received indicating an authentication requirement change, the driver may miss processing it. Fix by adding logic to specifically handle reason explanation authentication required and set the max retry count to 8 times. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_els.c | 26 ++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_hw.h | 1 + 2 files changed, 27 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 842b67e37f10..32e5e99ebbd4 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4570,6 +4570,7 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, int link_reset = 0, rc; u32 ulp_status = get_job_ulpstatus(phba, rspiocb); u32 ulp_word4 = get_job_word4(phba, rspiocb); + u8 rsn_code_exp = 0; /* Note: cmd_dmabuf may be 0 for internal driver abort @@ -4785,11 +4786,22 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, break; case LSRJT_LOGICAL_BSY: + rsn_code_exp = stat.un.b.lsRjtRsnCodeExp; if ((cmd == ELS_CMD_PLOGI) || (cmd == ELS_CMD_PRLI) || (cmd == ELS_CMD_NVMEPRLI)) { delay = 1000; maxretry = 48; + + /* An authentication LS_RJT reason code + * explanation means some error in the + * security settings end-to-end. Reduce + * the retry count to allow lpfc to clear + * RSCN mode and not race with dev_loss. + */ + if (cmd == ELS_CMD_PLOGI && + rsn_code_exp == LSEXP_AUTH_REQ) + maxretry = 8; } else if (cmd == ELS_CMD_FDISC) { /* FDISC retry policy */ maxretry = 48; @@ -4818,6 +4830,20 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, "0820 FLOGI (x%x). " "BBCredit Not Supported\n", stat.un.lsRjtError); + } else if (cmd == ELS_CMD_PLOGI) { + rsn_code_exp = stat.un.b.lsRjtRsnCodeExp; + + /* An authentication LS_RJT reason code + * explanation means some error in the + * security settings end-to-end. Reduce + * the retry count to allow lpfc to clear + * RSCN mode and not race with dev_loss. + */ + if (rsn_code_exp == LSEXP_AUTH_REQ) { + delay = 1000; + retry = 1; + maxretry = 8; + } } break; diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index d5c15742f7f2..71d3e60f4b20 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -724,6 +724,7 @@ struct ls_rjt { /* Structure is in Big Endian format */ #define LSEXP_OUT_OF_RESOURCE 0x29 #define LSEXP_CANT_GIVE_DATA 0x2A #define LSEXP_REQ_UNSUPPORTED 0x2C +#define LSEXP_AUTH_REQ 0x48 #define LSEXP_NO_RSRC_ASSIGN 0x52 uint8_t vendorUnique; /* FC Word 0, bit 0: 7 */ } b; From patchwork Thu Dec 12 23:33:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 849958 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 C25AE1AC891 for ; Thu, 12 Dec 2024 23:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045293; cv=none; b=nPno6XCXdzqtMkSy0VEfZuC0dijQOdRMzk6eU/6sE914wPwD6PbIpO7Y/QN7/xIs74S0OBq/GLtHrDZTY7X63h2xCezU+QA/JzwKONWhOpl3iGbu2lSDW0iyzHsjnZa/PDM+dbmT7dwzT9A7Q9ALKu/Lb7olsUy6Ap36Ah6wqMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045293; c=relaxed/simple; bh=BF6nf5zW7KCJonZol6dE/ViDX1iL/lVzmh+4/bKftm8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KYLLmvIra/WcJm7ISCguV9YrDinjfbeeZhyTmTN/Q5tUcA9kOw7I06c/FjeVs1HdAXGfgdvnDMK+jEH/GIqqqRZfG9SIcO0wFCqWdWGNrbOHEk2uQOlzc3YkKTQNxhqTvIE9yf+1C9zlpHQkoIOau9RVIs1UBYOjCOdmEiC6MV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=G2e2ByVi; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G2e2ByVi" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21670dce0a7so13500495ad.1 for ; Thu, 12 Dec 2024 15:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045291; x=1734650091; 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=MietTjhNhKwekWfshXG/f57JMT3PZ5boeTAKTJM8wI0=; b=G2e2ByVivdc4/e+/eBaxkuot7K4L60yGrj3Lu+kl8kFKLcEMEo1Iv4KEu2RUMn2wUr x3jwEAMcJZTor2Z0cP6YNHLnUSBxB0eC79ffZfz3e+G4Y93ew9MejQk8dLpdsoByVogR uVQgTCQNLG7uIEaizV6THbmee2i7tv3P+bxPfVudNsYEhATQ89oKvZbWFgEKsmXPLJFZ sTjFg7EjudqWFeBFVkRE2lWAGGOIXO2aVSiYZr9WlsgHFga8jmS+D2j2OsVbEXe4AOwU SVCBQQUzhPRyhJ+4Shd0yA//1/k9HwR9cX3reJJiSH5vxmOTspBUwACTdtxhUh5wzHHn s5ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045291; x=1734650091; 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=MietTjhNhKwekWfshXG/f57JMT3PZ5boeTAKTJM8wI0=; b=W2fUGjPVifhzyHx4VWPClSwOxeLkwbD5pInmdhLY3g9JxGhS3fKd6ix8Gh0SRp/2ok akS3kXlX3BBoklNLxNTlcWVegEm1JimErdgrLw5b7bZbYWLn/P4AlFIq3WuR+S//qQdW y6MwH4/EEh/Q/rM/r/09tISb9Q/sS6AfP852Zv09AjZ99LEUiHlqjrgwyUWo3LHcqSU1 QZa/0RFBGN2ZKn4qnzIMgx7tiEAxof1M7Mgb18kf4sIDYn7nhVK7Mam1A+bSSJl6eDyp cVDi5x4U/kl9CqnC4lXBeyea5/+h2GG/jyCzot1U3vSBZTu0WLJQELoGKBY8ZInZW5r5 6pBQ== X-Gm-Message-State: AOJu0YwEvFv3GMF64AAs2GL2GYEHdUtT+3Qq7BObYoN05VpfHgT1QJCK 3OX4gGPQsMQmgsGuPxLqLRDUfKtD01qDSVx8W9d3in5l9DxcBuqxjuCjJA== X-Gm-Gg: ASbGncvrU0IIkX8fuQIjiB/AndbLcm/KS6Lj8bPftVq/dYJaqKyNj5ffofMydiqFfsK 8GiSm4HxxzPlyJ5YncRJQ7RYN4s/NK9g23FlnaBj5IZ9Plq5CuQGbMVYfseroSOlX10w0OubnYo N7L1mTLE8rtOGns95XmRVzsSx2MhWk71YzxpkIA2BWKO9F60kO7IapHbGEqWn65DDmJfWyTUL1X ERwbSxx0csJ3Y+lKe1YfT6OK/uqvJwoHWNyOlrP5ug+ZaVCBEX1Ki0XOPwiU9/kkPYygwnQzKeA JDGJm6dL3USaAI+3MK5A2uBrHm5X2TYA2f5JbFr0zQ== X-Google-Smtp-Source: AGHT+IF16iebkckM2ZNk9hPisTSiN3Ev1JgnKhVqkl9kKrKYozVwlPvzakEgnbd1ZLKSB1L0AMGSUQ== X-Received: by 2002:a17:902:cec5:b0:216:3083:d03d with SMTP id d9443c01a7336-21892a337f3mr7895455ad.44.1734045290825; Thu, 12 Dec 2024 15:14:50 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:50 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 06/10] lpfc: Change lpfc_nodelist save_flags member into a bitmask Date: Thu, 12 Dec 2024 15:33:05 -0800 Message-Id: <20241212233309.71356-7-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In attempt to reduce the amount of unnecessary ndlp->lock acquisitions in the lpfc driver, change save_flags into an unsigned long bitmask and use clear_bit/test_bit bitwise atomic APIs instead of reliance on ndlp->lock for synchronization. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_ct.c | 6 ++---- drivers/scsi/lpfc/lpfc_disc.h | 10 +++++----- drivers/scsi/lpfc/lpfc_els.c | 12 +++--------- drivers/scsi/lpfc/lpfc_hbadisc.c | 13 ++----------- drivers/scsi/lpfc/lpfc_init.c | 4 ++-- drivers/scsi/lpfc/lpfc_scsi.c | 19 ++++++++----------- drivers/scsi/lpfc/lpfc_vport.c | 22 +++++++++++----------- 7 files changed, 33 insertions(+), 53 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 30891ad17e2a..12c67cdd7c19 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -1646,14 +1646,12 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, /* If the caller wanted a synchronous DA_ID completion, signal the * wait obj and clear flag to reset the vport. */ - if (ndlp->save_flags & NLP_WAIT_FOR_DA_ID) { + if (test_bit(NLP_WAIT_FOR_DA_ID, &ndlp->save_flags)) { if (ndlp->da_id_waitq) wake_up(ndlp->da_id_waitq); } - spin_lock_irq(&ndlp->lock); - ndlp->save_flags &= ~NLP_WAIT_FOR_DA_ID; - spin_unlock_irq(&ndlp->lock); + clear_bit(NLP_WAIT_FOR_DA_ID, &ndlp->save_flags); lpfc_ct_free_iocb(phba, cmdiocb); lpfc_nlp_put(ndlp); diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h index 81cfa35dab98..3d47dc7458d1 100644 --- a/drivers/scsi/lpfc/lpfc_disc.h +++ b/drivers/scsi/lpfc/lpfc_disc.h @@ -85,13 +85,13 @@ enum lpfc_fc4_xpt_flags { NLP_XPT_HAS_HH = 0x10 }; -enum lpfc_nlp_save_flags { +enum lpfc_nlp_save_flags { /* mask bits */ /* devloss occurred during recovery */ - NLP_IN_RECOV_POST_DEV_LOSS = 0x1, + NLP_IN_RECOV_POST_DEV_LOSS, /* wait for outstanding LOGO to cmpl */ - NLP_WAIT_FOR_LOGO = 0x2, + NLP_WAIT_FOR_LOGO, /* wait for outstanding DA_ID to finish */ - NLP_WAIT_FOR_DA_ID = 0x4 + NLP_WAIT_FOR_DA_ID }; struct lpfc_nodelist { @@ -154,7 +154,7 @@ struct lpfc_nodelist { uint32_t fc4_prli_sent; /* flags to keep ndlp alive until special conditions are met */ - enum lpfc_nlp_save_flags save_flags; + unsigned long save_flags; enum lpfc_fc4_xpt_flags fc4_xpt_flags; diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 32e5e99ebbd4..1d7db49a8fe4 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -2988,12 +2988,8 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, } clear_bit(NLP_LOGO_SND, &ndlp->nlp_flag); - spin_lock_irq(&ndlp->lock); - if (ndlp->save_flags & NLP_WAIT_FOR_LOGO) { + if (test_and_clear_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags)) wake_up_waiter = 1; - ndlp->save_flags &= ~NLP_WAIT_FOR_LOGO; - } - spin_unlock_irq(&ndlp->lock); lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD, "LOGO cmpl: status:x%x/x%x did:x%x", @@ -11509,15 +11505,13 @@ lpfc_cmpl_els_npiv_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, lpfc_can_disctmo(vport); } - if (ndlp->save_flags & NLP_WAIT_FOR_LOGO) { + if (test_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags)) { /* Wake up lpfc_vport_delete if waiting...*/ if (ndlp->logo_waitq) wake_up(ndlp->logo_waitq); clear_bit(NLP_ISSUE_LOGO, &ndlp->nlp_flag); clear_bit(NLP_LOGO_SND, &ndlp->nlp_flag); - spin_lock_irq(&ndlp->lock); - ndlp->save_flags &= ~NLP_WAIT_FOR_LOGO; - spin_unlock_irq(&ndlp->lock); + clear_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags); } /* Safe to release resources now. */ diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 4036a9838bb5..36e66df36a18 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -414,12 +414,7 @@ void lpfc_check_nlp_post_devloss(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) { - unsigned long iflags; - - spin_lock_irqsave(&ndlp->lock, iflags); - if (ndlp->save_flags & NLP_IN_RECOV_POST_DEV_LOSS) { - ndlp->save_flags &= ~NLP_IN_RECOV_POST_DEV_LOSS; - spin_unlock_irqrestore(&ndlp->lock, iflags); + if (test_and_clear_bit(NLP_IN_RECOV_POST_DEV_LOSS, &ndlp->save_flags)) { lpfc_nlp_get(ndlp); lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_NODE, "8438 Devloss timeout reversed on DID x%x " @@ -427,9 +422,7 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport, "port_state = x%x\n", ndlp->nlp_DID, kref_read(&ndlp->kref), ndlp, ndlp->nlp_flag, vport->port_state); - return; } - spin_unlock_irqrestore(&ndlp->lock, iflags); } /** @@ -546,9 +539,7 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp) ndlp->nlp_DID, kref_read(&ndlp->kref), ndlp, ndlp->nlp_flag, vport->port_state); - spin_lock_irqsave(&ndlp->lock, iflags); - ndlp->save_flags |= NLP_IN_RECOV_POST_DEV_LOSS; - spin_unlock_irqrestore(&ndlp->lock, iflags); + set_bit(NLP_IN_RECOV_POST_DEV_LOSS, &ndlp->save_flags); return fcf_inuse; } else if (ndlp->nlp_state == NLP_STE_UNMAPPED_NODE) { /* Fabric node fully recovered before this dev_loss_tmo diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 7f57397d91a9..44ddecb3909d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -3847,8 +3847,8 @@ lpfc_offline_prep(struct lpfc_hba *phba, int mbx_action) * Otherwise, let dev_loss take care of * the node. */ - if (!(ndlp->save_flags & - NLP_IN_RECOV_POST_DEV_LOSS) && + if (!test_bit(NLP_IN_RECOV_POST_DEV_LOSS, + &ndlp->save_flags) && !(ndlp->fc4_xpt_flags & (NVME_XPT_REGD | SCSI_XPT_REGD))) lpfc_disc_state_machine diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index c57f11f6fc84..5ba3d4f32e1d 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -6120,31 +6120,28 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) /* Issue LOGO, if no LOGO is outstanding */ spin_lock_irqsave(&pnode->lock, flags); - if (!(pnode->save_flags & NLP_WAIT_FOR_LOGO) && + if (!test_bit(NLP_WAIT_FOR_LOGO, &pnode->save_flags) && !pnode->logo_waitq) { pnode->logo_waitq = &waitq; pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; - set_bit(NLP_ISSUE_LOGO, &pnode->nlp_flag); - pnode->save_flags |= NLP_WAIT_FOR_LOGO; spin_unlock_irqrestore(&pnode->lock, flags); + set_bit(NLP_ISSUE_LOGO, &pnode->nlp_flag); + set_bit(NLP_WAIT_FOR_LOGO, &pnode->save_flags); lpfc_unreg_rpi(vport, pnode); wait_event_timeout(waitq, - (!(pnode->save_flags & - NLP_WAIT_FOR_LOGO)), + !test_bit(NLP_WAIT_FOR_LOGO, + &pnode->save_flags), msecs_to_jiffies(dev_loss_tmo * 1000)); - if (pnode->save_flags & NLP_WAIT_FOR_LOGO) { + if (test_and_clear_bit(NLP_WAIT_FOR_LOGO, + &pnode->save_flags)) lpfc_printf_vlog(vport, KERN_ERR, logit, "0725 SCSI layer TGTRST " "failed & LOGO TMO (%d, %llu) " "return x%x\n", tgt_id, lun_id, status); - spin_lock_irqsave(&pnode->lock, flags); - pnode->save_flags &= ~NLP_WAIT_FOR_LOGO; - } else { - spin_lock_irqsave(&pnode->lock, flags); - } + spin_lock_irqsave(&pnode->lock, flags); pnode->logo_waitq = NULL; spin_unlock_irqrestore(&pnode->lock, flags); status = SUCCESS; diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 9e0e35763377..3d70cc517573 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c @@ -492,21 +492,22 @@ lpfc_send_npiv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq); spin_lock_irq(&ndlp->lock); - if (!(ndlp->save_flags & NLP_WAIT_FOR_LOGO) && + if (!test_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags) && !ndlp->logo_waitq) { ndlp->logo_waitq = &waitq; ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; set_bit(NLP_ISSUE_LOGO, &ndlp->nlp_flag); - ndlp->save_flags |= NLP_WAIT_FOR_LOGO; + set_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags); } spin_unlock_irq(&ndlp->lock); rc = lpfc_issue_els_npiv_logo(vport, ndlp); if (!rc) { wait_event_timeout(waitq, - (!(ndlp->save_flags & NLP_WAIT_FOR_LOGO)), + !test_bit(NLP_WAIT_FOR_LOGO, + &ndlp->save_flags), msecs_to_jiffies(phba->fc_ratov * 2000)); - if (!(ndlp->save_flags & NLP_WAIT_FOR_LOGO)) + if (!test_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags)) goto logo_cmpl; /* LOGO wait failed. Correct status. */ rc = -EINTR; @@ -516,9 +517,7 @@ lpfc_send_npiv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) /* Error - clean up node flags. */ clear_bit(NLP_ISSUE_LOGO, &ndlp->nlp_flag); - spin_lock_irq(&ndlp->lock); - ndlp->save_flags &= ~NLP_WAIT_FOR_LOGO; - spin_unlock_irq(&ndlp->lock); + clear_bit(NLP_WAIT_FOR_LOGO, &ndlp->save_flags); logo_cmpl: lpfc_printf_vlog(vport, KERN_INFO, LOG_VPORT, @@ -696,19 +695,20 @@ lpfc_vport_delete(struct fc_vport *fc_vport) spin_lock_irq(&ndlp->lock); ndlp->da_id_waitq = &waitq; - ndlp->save_flags |= NLP_WAIT_FOR_DA_ID; spin_unlock_irq(&ndlp->lock); + set_bit(NLP_WAIT_FOR_DA_ID, &ndlp->save_flags); rc = lpfc_ns_cmd(vport, SLI_CTNS_DA_ID, 0, 0); if (!rc) { wait_event_timeout(waitq, - !(ndlp->save_flags & NLP_WAIT_FOR_DA_ID), + !test_bit(NLP_WAIT_FOR_DA_ID, + &ndlp->save_flags), msecs_to_jiffies(phba->fc_ratov * 2000)); } lpfc_printf_vlog(vport, KERN_INFO, LOG_VPORT | LOG_ELS, "1829 DA_ID issue status %d. " - "SFlag x%x NState x%x, NFlag x%lx " + "SFlag x%lx NState x%x, NFlag x%lx " "Rpi x%x\n", rc, ndlp->save_flags, ndlp->nlp_state, ndlp->nlp_flag, ndlp->nlp_rpi); @@ -718,8 +718,8 @@ lpfc_vport_delete(struct fc_vport *fc_vport) */ spin_lock_irq(&ndlp->lock); ndlp->da_id_waitq = NULL; - ndlp->save_flags &= ~NLP_WAIT_FOR_DA_ID; spin_unlock_irq(&ndlp->lock); + clear_bit(NLP_WAIT_FOR_DA_ID, &ndlp->save_flags); } issue_logo: From patchwork Thu Dec 12 23:33:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 850688 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 2B5EF1D7E5F for ; Thu, 12 Dec 2024 23:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045294; cv=none; b=Vgi7ilb5dyMD6UaqLxZbIamYbiJ6bX3XAX80sj8DdAKiT9nuM5zBQzqzkTZ44kuUHPOgRSI7YvKrUN4uICKUTgI5ivHVzPEYmPPpBrCFpt62WUqIHcQzzoE7LJ9wIyUYed6L70YFqyeCtsBg+9BAs5bKTWGeLGBE3akLlLWSzlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045294; c=relaxed/simple; bh=jZrGVbnVSKLwNj6L+Q/es9bmcvPdY/juZgo3Ztb7M1o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YwyV0yDGpXEAh4LJG91trt+Broh8WR/IzDlI4juQX5lJgfSrLjB9lCaZxE96BmU6Bi4iuN1RLAi3FnbzusGuZYdqft51IfT+gckEhOgpSV4J0RUVI6Auv3TYTBOxQFdif98EIOjjKR/l8Ph8NzEt5zmsvvVVCrB/FejGpQNr4Sw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PzZlYjUD; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PzZlYjUD" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21644e6140cso10649075ad.1 for ; Thu, 12 Dec 2024 15:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045292; x=1734650092; 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=+7pPlW7/+yJaMsr49HqG0muqh53rPVm+l0M6brt3qJk=; b=PzZlYjUDG89bl/fO8wF1rcJC2Eo9nTqiz1BTquuhA+N/gHOPrlX4ny1kYZWBxtA0Xu J03h2Wvbv3/+PW6Gf7o9jGHiazH4HOriSWFj5Dml9zYRIYmKjmj4M/hzb23kJA8pxnc3 35K0p/byIcjbR9Lnx/M4GWK0e+8xZU41SOTBDOEvedYMFRrUFXYQG4lFQqakmZ/hQrSs 8GxMIQ8Taqynvw1qDw6X4HsglP5FS+72NrznZymhrL+glDCT8FNJn3GVPBMaKJF7QW+h LQ7UEPOzX48aTa/dp6Rg4M622o4g5VzSPCpCRGUKXiybC/vHR+d6JQNiVpklMormmzbr eegw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045292; x=1734650092; 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=+7pPlW7/+yJaMsr49HqG0muqh53rPVm+l0M6brt3qJk=; b=cpFVox01sWLkDJp7YCsJtFoUtMjKg7UN8TsVODAvsJpRpanGxRxqqyRseagC3GLX3x FS4BAeZUO8vdMpqx7HiKMX7Vx/EPO0aFpVpVR31AnZT1XJekW4mJWkU/BB2d4JLh0ESt 44ovWIBuFP6HDH6OgnymkOv79BYMPeCcA2GGhuSj1Ty63kBB3Oz/u+DBmV9i5P0f2cZ0 ImWmyFKEPJ/HBp0w5wDtYWyFmEfzIwNFaPaLJ+U/hckYUCd6dh9T/Hjt/uqBxP4EQeyG BgD+O930w1AWjIYRaFhJXuZtrmMJL5QSf9Fhb8i7K3k/SROnHcRKZRnWWlAHu9ONbE3c 121w== X-Gm-Message-State: AOJu0YwRXpCJL3NoAlsyoU1Eph6AM/wBAVi1ahxFmQ4C0PeS9USAp8Tz ffR/ZaZkQdBoxXH1W+B+aR3wygI+l9+UwjVOQWvtjjJ7BYpwGpMK/Y8q+w== X-Gm-Gg: ASbGncvkX6r85QhvOo2Ixpx5jV0l36Jw9lqS2gV5HhIUXGTFaUG8O6Qf60cNDsmutx1 WqNRpND40O2Su/zpjuQ5zCy0OScUheT1HNT2NA9SEVd5AHN9UTiakJVAChzZ/Pb+dd23BySaa/2 jix+FOZJ8nl+v7Hvlo/105Z0XlP12/388NWclCH1/Fgy5mwHj1oL5JGeXPp2vBOfqNn5WRxh5+e H5OTNDvR780035umJXccWkemuYpKwqCA85QfRDWtk3osvwNCIt6v8GROl6/i+OuvhSURftSl+Y4 e/KW0oEyN8rrqEwnMJHpdYgmgEJfF9/CzRAMWRRlHA== X-Google-Smtp-Source: AGHT+IEU4SGCgNjhjAE64EOS5uiW9C8lwsPGjdl4iU0AiJ5tgWLnWZDWF8T7rsy6gNzZK8/xNcXvxg== X-Received: by 2002:a17:903:234f:b0:216:643a:535a with SMTP id d9443c01a7336-21892a4383cmr5070345ad.20.1734045292282; Thu, 12 Dec 2024 15:14:52 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:51 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 07/10] lpfc: Update definition of firmware configuration mbox cmds Date: Thu, 12 Dec 2024 15:33:06 -0800 Message-Id: <20241212233309.71356-8-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are unused fields in mailbox commands that query for firmware configuration information. As such, update the struct definitions by correcting the name of certain fields and removing the unused fields. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_hw4.h | 85 +++++++++++------------------------ drivers/scsi/lpfc/lpfc_init.c | 7 +-- drivers/scsi/lpfc/lpfc_sli4.h | 2 - 3 files changed, 28 insertions(+), 66 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 26e1313ebb21..2dedb273b091 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1907,22 +1907,22 @@ struct lpfc_mbx_query_fw_config { uint32_t asic_revision; uint32_t physical_port; uint32_t function_mode; -#define LPFC_FCOE_INI_MODE 0x00000040 -#define LPFC_FCOE_TGT_MODE 0x00000080 +#define LPFC_FC_INI_MODE 0x00000040 +#define LPFC_FC_TGT_MODE 0x00000080 #define LPFC_DUA_MODE 0x00000800 - uint32_t ulp0_mode; -#define LPFC_ULP_FCOE_INIT_MODE 0x00000040 -#define LPFC_ULP_FCOE_TGT_MODE 0x00000080 - uint32_t ulp0_nap_words[12]; - uint32_t ulp1_mode; - uint32_t ulp1_nap_words[12]; + uint32_t oper_mode; + uint32_t rsvd9[2]; + uint32_t wqid_base; + uint32_t wqid_tot; + uint32_t rqid_base; + uint32_t rqid_tot; + uint32_t rsvd15[19]; uint32_t function_capabilities; uint32_t cqid_base; uint32_t cqid_tot; uint32_t eqid_base; uint32_t eqid_tot; - uint32_t ulp0_nap2_words[2]; - uint32_t ulp1_nap2_words[2]; + uint32_t rsvd39[4]; } rsp; }; @@ -3778,25 +3778,22 @@ struct lpfc_mbx_get_prof_cfg { struct lpfc_controller_attribute { uint32_t version_string[8]; uint32_t manufacturer_name[8]; - uint32_t supported_modes; + uint32_t rsvd16; uint32_t word17; -#define lpfc_cntl_attr_eprom_ver_lo_SHIFT 0 -#define lpfc_cntl_attr_eprom_ver_lo_MASK 0x000000ff -#define lpfc_cntl_attr_eprom_ver_lo_WORD word17 -#define lpfc_cntl_attr_eprom_ver_hi_SHIFT 8 -#define lpfc_cntl_attr_eprom_ver_hi_MASK 0x000000ff -#define lpfc_cntl_attr_eprom_ver_hi_WORD word17 #define lpfc_cntl_attr_flash_id_SHIFT 16 #define lpfc_cntl_attr_flash_id_MASK 0x000000ff #define lpfc_cntl_attr_flash_id_WORD word17 - uint32_t mbx_da_struct_ver; - uint32_t ep_fw_da_struct_ver; +#define lpfc_cntl_attr_boot_enable_SHIFT 24 +#define lpfc_cntl_attr_boot_enable_MASK 0x00000001 +#define lpfc_cntl_attr_boot_enable_WORD word17 + uint32_t rsvd18[2]; uint32_t ncsi_ver_str[3]; - uint32_t dflt_ext_timeout; + uint32_t rsvd23; uint32_t model_number[8]; uint32_t description[16]; uint32_t serial_number[8]; - uint32_t ip_ver_str[8]; + uint32_t ipl_name[5]; + uint32_t rsvd61[3]; uint32_t fw_ver_str[8]; uint32_t bios_ver_str[8]; uint32_t redboot_ver_str[8]; @@ -3804,53 +3801,31 @@ struct lpfc_controller_attribute { uint32_t flash_fw_ver_str[8]; uint32_t functionality; uint32_t word105; -#define lpfc_cntl_attr_max_cbd_len_SHIFT 0 -#define lpfc_cntl_attr_max_cbd_len_MASK 0x0000ffff -#define lpfc_cntl_attr_max_cbd_len_WORD word105 #define lpfc_cntl_attr_asic_rev_SHIFT 16 #define lpfc_cntl_attr_asic_rev_MASK 0x000000ff #define lpfc_cntl_attr_asic_rev_WORD word105 -#define lpfc_cntl_attr_gen_guid0_SHIFT 24 -#define lpfc_cntl_attr_gen_guid0_MASK 0x000000ff -#define lpfc_cntl_attr_gen_guid0_WORD word105 - uint32_t gen_guid1_12[3]; + uint32_t rsvd106[3]; uint32_t word109; -#define lpfc_cntl_attr_gen_guid13_14_SHIFT 0 -#define lpfc_cntl_attr_gen_guid13_14_MASK 0x0000ffff -#define lpfc_cntl_attr_gen_guid13_14_WORD word109 -#define lpfc_cntl_attr_gen_guid15_SHIFT 16 -#define lpfc_cntl_attr_gen_guid15_MASK 0x000000ff -#define lpfc_cntl_attr_gen_guid15_WORD word109 #define lpfc_cntl_attr_hba_port_cnt_SHIFT 24 #define lpfc_cntl_attr_hba_port_cnt_MASK 0x000000ff #define lpfc_cntl_attr_hba_port_cnt_WORD word109 - uint32_t word110; -#define lpfc_cntl_attr_dflt_lnk_tmo_SHIFT 0 -#define lpfc_cntl_attr_dflt_lnk_tmo_MASK 0x0000ffff -#define lpfc_cntl_attr_dflt_lnk_tmo_WORD word110 -#define lpfc_cntl_attr_multi_func_dev_SHIFT 24 -#define lpfc_cntl_attr_multi_func_dev_MASK 0x000000ff -#define lpfc_cntl_attr_multi_func_dev_WORD word110 + uint32_t rsvd110; uint32_t word111; -#define lpfc_cntl_attr_cache_valid_SHIFT 0 -#define lpfc_cntl_attr_cache_valid_MASK 0x000000ff -#define lpfc_cntl_attr_cache_valid_WORD word111 #define lpfc_cntl_attr_hba_status_SHIFT 8 #define lpfc_cntl_attr_hba_status_MASK 0x000000ff #define lpfc_cntl_attr_hba_status_WORD word111 -#define lpfc_cntl_attr_max_domain_SHIFT 16 -#define lpfc_cntl_attr_max_domain_MASK 0x000000ff -#define lpfc_cntl_attr_max_domain_WORD word111 #define lpfc_cntl_attr_lnk_numb_SHIFT 24 #define lpfc_cntl_attr_lnk_numb_MASK 0x0000003f #define lpfc_cntl_attr_lnk_numb_WORD word111 #define lpfc_cntl_attr_lnk_type_SHIFT 30 #define lpfc_cntl_attr_lnk_type_MASK 0x00000003 #define lpfc_cntl_attr_lnk_type_WORD word111 - uint32_t fw_post_status; - uint32_t hba_mtu[8]; + uint32_t rsvd112[9]; uint32_t word121; - uint32_t reserved1[3]; +#define lpfc_cntl_attr_asic_gen_SHIFT 8 +#define lpfc_cntl_attr_asic_gen_MASK 0x000000ff +#define lpfc_cntl_attr_asic_gen_WORD word121 + uint32_t rsvd122[3]; uint32_t word125; #define lpfc_cntl_attr_pci_vendor_id_SHIFT 0 #define lpfc_cntl_attr_pci_vendor_id_MASK 0x0000ffff @@ -3875,15 +3850,7 @@ struct lpfc_controller_attribute { #define lpfc_cntl_attr_pci_fnc_num_SHIFT 16 #define lpfc_cntl_attr_pci_fnc_num_MASK 0x000000ff #define lpfc_cntl_attr_pci_fnc_num_WORD word127 -#define lpfc_cntl_attr_inf_type_SHIFT 24 -#define lpfc_cntl_attr_inf_type_MASK 0x000000ff -#define lpfc_cntl_attr_inf_type_WORD word127 - uint32_t unique_id[2]; - uint32_t word130; -#define lpfc_cntl_attr_num_netfil_SHIFT 0 -#define lpfc_cntl_attr_num_netfil_MASK 0x000000ff -#define lpfc_cntl_attr_num_netfil_WORD word130 - uint32_t reserved2[4]; + uint32_t rsvd128[7]; }; struct lpfc_mbx_get_cntl_attributes { diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 44ddecb3909d..b94624789771 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -11109,14 +11109,11 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) phba->sli4_hba.fw_func_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.function_mode; - phba->sli4_hba.ulp0_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp0_mode; - phba->sli4_hba.ulp1_mode = mboxq->u.mqe.un.query_fw_cfg.rsp.ulp1_mode; phba->sli4_hba.physical_port = mboxq->u.mqe.un.query_fw_cfg.rsp.physical_port; lpfc_printf_log(phba, KERN_INFO, LOG_INIT, - "3251 QUERY_FW_CFG: func_mode:x%x, ulp0_mode:x%x, " - "ulp1_mode:x%x\n", phba->sli4_hba.fw_func_mode, - phba->sli4_hba.ulp0_mode, phba->sli4_hba.ulp1_mode); + "3251 QUERY_FW_CFG: func_mode:x%x\n", + phba->sli4_hba.fw_func_mode); mempool_free(mboxq, phba->mbox_mem_pool); diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index c1e9ec0243ba..9be3da91c923 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h @@ -865,8 +865,6 @@ struct lpfc_sli4_hba { struct lpfc_name wwpn; uint32_t fw_func_mode; /* FW function protocol mode */ - uint32_t ulp0_mode; /* ULP0 protocol mode */ - uint32_t ulp1_mode; /* ULP1 protocol mode */ /* Optimized Access Storage specific queues/structures */ uint64_t oas_next_lun; From patchwork Thu Dec 12 23:33:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 849957 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 8D5B41AC891 for ; Thu, 12 Dec 2024 23:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045296; cv=none; b=XSHkPSy2UT7q3mfM3IOl943TNxwwIoeO1el0VefHjihWeSHFVi5z5HMVgz6p6G3EQDYzBycmlRBZAELAo9tMtS8FNzDhVkJVUNq06ZAdJq7b7+B0fVt0pOo+k9H3+Z73qJ6LqyMdOYtlZ2/Rifp4GcqiV57uX0RyjGzkHF413kI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045296; c=relaxed/simple; bh=MporgaBP+YT4H5zMS/tYt2U7ssQT/oZfKZFIr3IujkQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LqEggE0AMsnq+aQwf3V2kKIAM/5KyuNnVAsxA6uwxyc/F5FxHXCnhgIt0l0mrUSogKJ6vZz1e1ER9fl1OizyuXzCzU9BeSg+2NfQSXHf7PIka0tAjG2VcwQscHtqXJ0Bel657RNYasyo7s4kCepXXAU47/jeuKsxeTnu0RiGlPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bv2RVTW6; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bv2RVTW6" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2166651f752so12493965ad.3 for ; Thu, 12 Dec 2024 15:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045294; x=1734650094; 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=YR8SiEdVaIQ47sGhV1TV0vxBfohKg5TKJO+4RTaj1uU=; b=bv2RVTW6mh4W+ByWjvvy80zR4tM2scpnzZkISEwuAHVkT71gb6J5XDGNiRfUdi2O18 3pp7Kjj5k0CcJXassOhJTIjXPKhPJzI0+0ndnIK4VN2SKJ6r9bt9id19R26pUDaUewtV +C7CQ1ZemS3JdYuJ36mfiCcuM8YLCEmZ4YPZbyJwYC8vFbwYy6THmw7gyFWEJPocaRF/ QTFaTBsoy1RoVo2S2uWlJeZ0wV7UsDv4Uf+VjhruIt9n79RCQtLXtwkUSsxscukitOAX HwyQSp0CAT1ukmDszRe+BoXXcQHdqAX8q4WspLs/lNKjhKbRcluRpiVdCfXMasFv75l3 FNzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045294; x=1734650094; 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=YR8SiEdVaIQ47sGhV1TV0vxBfohKg5TKJO+4RTaj1uU=; b=mlKa635rEMqvkRnroBWxXnofgTEp5rs+n4tIQ/Kq7KhdImVJrx9a7KUycMW7pl5Jnn U/yFdbzUXK2o3idL7x2hB/eQJbcMzg6pDXgpJhAfQqAHJdrFvGN5IOkAnJ5kHvNOBPte OaZNlpZ2F+NRBLHllFHL9FVqkkPOOh4M42ac6RCYvHMIxt0nODZ44EkIf/eyoUk/o5DP /Zt0b8dXr2zQq1iUd5wmQ1adW3WjGGh1ZM88unciajLqKoew25XLIzvzlRyhqtsiHLvX +LA/81vW7d98wh9Qe5LFWQcf8xrsvn5CnUmiPdc7ikukm5k4KwFKPlqK+yRbuJTEr74j ltyA== X-Gm-Message-State: AOJu0YyU9+Jq9gw4FQymo0toFJVkSs5n410ateKGLXNj5DmmmJ3QimPr cKguUjOkgyGuD380kbUpqIgiZWo0ERfigjSr8lddwmzHHZVJDqIqq7DhOg== X-Gm-Gg: ASbGncv9LJOarQY5zGM7QU38Hleo+y/SCjbjtx2Z4BZ3yM+tKeJlMu6SKTvXfkWk9ri GUwrjEZi2fjH/gMFwvPzS1rCTp5B+NjTasq6dlFHaIZos2JWlCOsgsnhfLSd+OWLrh9NN+CgLBc zmSrVqoQstt5E9RJ8AAhcHNjwU/WRJjQxMG0T2GICfjr1Jvo242ilV1YEAJQ851++7PEpWl/6GS P5ZU0UxJG2DgXaUPNtH4RAdwIdYlaW7uWQ3jSTMVN2NKYCGOXrID0BcmgxhvU4iX824DxuvVfk9 Pu3bZJFC6DdL3WoQu5OghgEqe4zwBI7vvqNAp8FBPg== X-Google-Smtp-Source: AGHT+IFgKRxO2GhTbaLE+zBhw9CNxUKNs3qR281skEOT6PN1p1NuRO0TwyJaubOz9rZTVITGTiljZg== X-Received: by 2002:a17:902:ced0:b0:216:668d:690c with SMTP id d9443c01a7336-21892a01d38mr8202805ad.28.1734045293764; Thu, 12 Dec 2024 15:14:53 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:53 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 08/10] lpfc: Add support for large fw object application layer reads Date: Thu, 12 Dec 2024 15:33:07 -0800 Message-Id: <20241212233309.71356-9-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Current lpfc bsg implementation allows a maximum fw read object size of 30KB. Implementation and support for read object mailbox commands for fw objects larger than 30KB are now required for proprietary applications. Thus, update the lpfc_sli_config_emb0_subsys structure and its associated submission and completion paths to accommodate for an alternative form of read object command that supports large fw objects. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_bsg.c | 210 ++++++++++++++++++++++++++++++++-- drivers/scsi/lpfc/lpfc_bsg.h | 17 ++- drivers/scsi/lpfc/lpfc_scsi.c | 6 + 3 files changed, 224 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 1c6b024160da..c8f8496bbdf8 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -120,6 +120,16 @@ enum ELX_LOOPBACK_CMD { #define ELX_LOOPBACK_HEADER_SZ \ (size_t)(&((struct lpfc_sli_ct_request *)NULL)->un) +/* For non-embedded read object command */ +#define READ_OBJ_EMB0_SCHEME_0 {1, 10, 256, 128} +#define READ_OBJ_EMB0_SCHEME_1 {11, LPFC_EMB0_MAX_RD_OBJ_HBD_CNT, 512, 192} +static const struct lpfc_read_object_cmd_scheme { + u32 min_hbd_cnt; + u32 max_hbd_cnt; + u32 cmd_size; + u32 payload_word_offset; +} rd_obj_scheme[2] = {READ_OBJ_EMB0_SCHEME_0, READ_OBJ_EMB0_SCHEME_1}; + struct lpfc_dmabufext { struct lpfc_dmabuf dma; uint32_t size; @@ -3538,6 +3548,103 @@ lpfc_bsg_mbox_ext_session_reset(struct lpfc_hba *phba) return; } +/** + * lpfc_rd_obj_emb0_handle_job - Handles completion for non-embedded + * READ_OBJECT_V0 mailbox commands + * @phba: pointer to lpfc_hba data struct + * @pmb_buf: pointer to mailbox buffer + * @sli_cfg_mbx: pointer to SLI_CONFIG mailbox memory region + * @job: pointer to bsg_job struct + * @bsg_reply: point to bsg_reply struct + * + * Given a non-embedded READ_OBJECT_V0's HBD_CNT, this routine copies + * a READ_OBJECT_V0 mailbox command's read data payload into a bsg_job + * structure for passing back to application layer. + * + * Return codes + * 0 - successful + * -EINVAL - invalid HBD_CNT + * -ENODEV - pointer to bsg_job struct is NULL + **/ +static int +lpfc_rd_obj_emb0_handle_job(struct lpfc_hba *phba, u8 *pmb_buf, + struct lpfc_sli_config_mbox *sli_cfg_mbx, + struct bsg_job *job, + struct fc_bsg_reply *bsg_reply) +{ + struct lpfc_dmabuf *curr_dmabuf, *next_dmabuf; + struct lpfc_sli_config_emb0_subsys *emb0_subsys; + u32 hbd_cnt; + u32 dma_buf_len; + u8 i = 0; + size_t extra_bytes; + off_t skip = 0; + + if (!job) { + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2496 NULL job\n"); + return -ENODEV; + } + + if (!bsg_reply) { + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2498 NULL bsg_reply\n"); + return -ENODEV; + } + + emb0_subsys = &sli_cfg_mbx->un.sli_config_emb0_subsys; + + hbd_cnt = bsg_bf_get(lpfc_emb0_subcmnd_rd_obj_hbd_cnt, + emb0_subsys); + + /* Calculate where the read object's read data payload is located based + * on HBD count scheme. + */ + if (hbd_cnt >= rd_obj_scheme[0].min_hbd_cnt && + hbd_cnt <= rd_obj_scheme[0].max_hbd_cnt) { + skip = rd_obj_scheme[0].payload_word_offset * 4; + } else if (hbd_cnt >= rd_obj_scheme[1].min_hbd_cnt && + hbd_cnt <= rd_obj_scheme[1].max_hbd_cnt) { + skip = rd_obj_scheme[1].payload_word_offset * 4; + } else { + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2497 bad hbd_count 0x%08x\n", + hbd_cnt); + return -EINVAL; + } + + /* Copy SLI_CONFIG command and READ_OBJECT response first */ + bsg_reply->reply_payload_rcv_len = + sg_copy_from_buffer(job->reply_payload.sg_list, + job->reply_payload.sg_cnt, + pmb_buf, skip); + + /* Copy data from hbds */ + list_for_each_entry_safe(curr_dmabuf, next_dmabuf, + &phba->mbox_ext_buf_ctx.ext_dmabuf_list, + list) { + dma_buf_len = emb0_subsys->hbd[i].buf_len; + + /* Use sg_copy_buffer to specify a skip offset */ + extra_bytes = sg_copy_buffer(job->reply_payload.sg_list, + job->reply_payload.sg_cnt, + curr_dmabuf->virt, + dma_buf_len, skip, false); + + bsg_reply->reply_payload_rcv_len += extra_bytes; + + skip += extra_bytes; + + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2499 copied hbd[%d] " + "0x%zx bytes\n", + i, extra_bytes); + i++; + } + + return 0; +} + /** * lpfc_bsg_issue_mbox_ext_handle_job - job handler for multi-buffer mbox cmpl * @phba: Pointer to HBA context object. @@ -3551,10 +3658,10 @@ lpfc_bsg_issue_mbox_ext_handle_job(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq) { struct bsg_job_data *dd_data; struct bsg_job *job; - struct fc_bsg_reply *bsg_reply; + struct fc_bsg_reply *bsg_reply = NULL; uint8_t *pmb, *pmb_buf; unsigned long flags; - uint32_t size; + u32 size, opcode; int rc = 0; struct lpfc_dmabuf *dmabuf; struct lpfc_sli_config_mbox *sli_cfg_mbx; @@ -3591,6 +3698,24 @@ lpfc_bsg_issue_mbox_ext_handle_job(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq) lpfc_sli_pcimem_bcopy(&pmbx[sizeof(MAILBOX_t)], &pmbx[sizeof(MAILBOX_t)], sli_cfg_mbx->un.sli_config_emb0_subsys.mse[0].buf_len); + + /* Special handling for non-embedded READ_OBJECT */ + opcode = bsg_bf_get(lpfc_emb0_subcmnd_opcode, + &sli_cfg_mbx->un.sli_config_emb0_subsys); + switch (opcode) { + case COMN_OPCODE_READ_OBJECT: + if (job) { + rc = lpfc_rd_obj_emb0_handle_job(phba, pmb_buf, + sli_cfg_mbx, + job, + bsg_reply); + bsg_reply->result = rc; + goto done; + } + break; + default: + break; + } } /* Complete the job if the job is still active */ @@ -3604,12 +3729,14 @@ lpfc_bsg_issue_mbox_ext_handle_job(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq) /* result for successful */ bsg_reply->result = 0; +done: lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, "2937 SLI_CONFIG ext-buffer mailbox command " "(x%x/x%x) complete bsg job done, bsize:%d\n", phba->mbox_ext_buf_ctx.nembType, - phba->mbox_ext_buf_ctx.mboxType, size); + phba->mbox_ext_buf_ctx.mboxType, + job->reply_payload.payload_len); lpfc_idiag_mbxacc_dump_bsg_mbox(phba, phba->mbox_ext_buf_ctx.nembType, phba->mbox_ext_buf_ctx.mboxType, @@ -3819,14 +3946,16 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job, { struct fc_bsg_request *bsg_request = job->request; struct lpfc_sli_config_mbox *sli_cfg_mbx; + struct lpfc_sli_config_emb0_subsys *emb0_subsys; + struct list_head *ext_dmabuf_list; struct dfc_mbox_req *mbox_req; struct lpfc_dmabuf *curr_dmabuf, *next_dmabuf; - uint32_t ext_buf_cnt, ext_buf_index; + u32 ext_buf_cnt, ext_buf_index, hbd_cnt; struct lpfc_dmabuf *ext_dmabuf = NULL; struct bsg_job_data *dd_data = NULL; LPFC_MBOXQ_t *pmboxq = NULL; MAILBOX_t *pmb; - uint8_t *pmbx; + u8 *pmbx, opcode; int rc, i; mbox_req = @@ -3836,8 +3965,9 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job, sli_cfg_mbx = (struct lpfc_sli_config_mbox *)dmabuf->virt; if (nemb_tp == nemb_mse) { + emb0_subsys = &sli_cfg_mbx->un.sli_config_emb0_subsys; ext_buf_cnt = bsg_bf_get(lpfc_mbox_hdr_mse_cnt, - &sli_cfg_mbx->un.sli_config_emb0_subsys.sli_config_hdr); + &emb0_subsys->sli_config_hdr); if (ext_buf_cnt > LPFC_MBX_SLI_CONFIG_MAX_MSE) { lpfc_printf_log(phba, KERN_ERR, LOG_LIBDFC, "2945 Handled SLI_CONFIG(mse) rd, " @@ -3847,6 +3977,57 @@ lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job, rc = -ERANGE; goto job_error; } + + /* Special handling for non-embedded READ_OBJECT */ + opcode = bsg_bf_get(lpfc_emb0_subcmnd_opcode, emb0_subsys); + switch (opcode) { + case COMN_OPCODE_READ_OBJECT: + hbd_cnt = bsg_bf_get(lpfc_emb0_subcmnd_rd_obj_hbd_cnt, + emb0_subsys); + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2449 SLI_CONFIG(mse) rd non-embedded " + "hbd count = %d\n", + hbd_cnt); + + ext_dmabuf_list = + &phba->mbox_ext_buf_ctx.ext_dmabuf_list; + + /* Allocate hbds */ + for (i = 0; i < hbd_cnt; i++) { + ext_dmabuf = lpfc_bsg_dma_page_alloc(phba); + if (!ext_dmabuf) { + rc = -ENOMEM; + goto job_error; + } + list_add_tail(&ext_dmabuf->list, + ext_dmabuf_list); + } + + /* Fill out the physical memory addresses for the + * hbds + */ + i = 0; + list_for_each_entry_safe(curr_dmabuf, next_dmabuf, + ext_dmabuf_list, list) { + emb0_subsys->hbd[i].pa_hi = + putPaddrHigh(curr_dmabuf->phys); + emb0_subsys->hbd[i].pa_lo = + putPaddrLow(curr_dmabuf->phys); + + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, + "2495 SLI_CONFIG(hbd)[%d], " + "bufLen:%d, addrHi:x%x, " + "addrLo:x%x\n", i, + emb0_subsys->hbd[i].buf_len, + emb0_subsys->hbd[i].pa_hi, + emb0_subsys->hbd[i].pa_lo); + i++; + } + break; + default: + break; + } + lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, "2941 Handled SLI_CONFIG(mse) rd, " "ext_buf_cnt:%d\n", ext_buf_cnt); @@ -4223,6 +4404,7 @@ lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct bsg_job *job, case COMN_OPCODE_GET_CNTL_ATTRIBUTES: case COMN_OPCODE_GET_PROFILE_CONFIG: case COMN_OPCODE_SET_FEATURES: + case COMN_OPCODE_READ_OBJECT: lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, "3106 Handled SLI_CONFIG " "subsys_comn, opcode:x%x\n", @@ -4665,8 +4847,7 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct bsg_job *job, bsg_reply->reply_payload_rcv_len = 0; /* sanity check to protect driver */ - if (job->reply_payload.payload_len > BSG_MBOX_SIZE || - job->request_payload.payload_len > BSG_MBOX_SIZE) { + if (job->request_payload.payload_len > BSG_MBOX_SIZE) { rc = -ERANGE; goto job_done; } @@ -4737,6 +4918,19 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct bsg_job *job, pmb->mbxOwner = OWN_HOST; pmboxq->vport = vport; + /* non-embedded SLI_CONFIG requests already parsed, check others */ + if (unlikely(job->reply_payload.payload_len > BSG_MBOX_SIZE)) { + lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC, + "2729 Cmd x%x (x%x/x%x) request has " + "out-of-range reply payload length x%x\n", + pmb->mbxCommand, + lpfc_sli_config_mbox_subsys_get(phba, pmboxq), + lpfc_sli_config_mbox_opcode_get(phba, pmboxq), + job->reply_payload.payload_len); + rc = -ERANGE; + goto job_done; + } + /* If HBA encountered an error attention, allow only DUMP * or RESTART mailbox commands until the HBA is restarted. */ diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h index 3c04ca2d7455..86d509f669f1 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.h +++ b/drivers/scsi/lpfc/lpfc_bsg.h @@ -239,12 +239,27 @@ struct lpfc_sli_config_emb0_subsys { uint32_t timeout; /* comn_set_feature timeout */ uint32_t request_length; /* comn_set_feature request len */ uint32_t version; /* comn_set_feature version */ - uint32_t csf_feature; /* comn_set_feature feature */ + uint32_t word68; /* comn_set_feature feature */ +#define lpfc_emb0_subcmnd_csf_feat_SHIFT 0 +#define lpfc_emb0_subcmnd_csf_feat_MASK 0xffffffff +#define lpfc_emb0_subcmnd_csf_feat_WORD word68 +#define lpfc_emb0_subcmnd_rd_obj_des_rd_len_SHIFT 0 +#define lpfc_emb0_subcmnd_rd_obj_des_rd_len_MASK 0x00ffffff +#define lpfc_emb0_subcmnd_rd_obj_des_rd_len_WORD word68 uint32_t word69; /* comn_set_feature parameter len */ uint32_t word70; /* comn_set_feature parameter val0 */ #define lpfc_emb0_subcmnd_csf_p0_SHIFT 0 #define lpfc_emb0_subcmnd_csf_p0_MASK 0x3 #define lpfc_emb0_subcmnd_csf_p0_WORD word70 + uint32_t reserved71[25]; + uint32_t word96; /* rd_obj hbd_count */ +#define lpfc_emb0_subcmnd_rd_obj_hbd_cnt_SHIFT 0 +#define lpfc_emb0_subcmnd_rd_obj_hbd_cnt_MASK 0xffffffff +#define lpfc_emb0_subcmnd_rd_obj_hbd_cnt_WORD word96 +#define LPFC_EMB0_MAX_RD_OBJ_HBD_CNT 31 + struct lpfc_sli_config_hbd hbd[LPFC_EMB0_MAX_RD_OBJ_HBD_CNT]; + uint32_t word190; + uint32_t word191; }; struct lpfc_sli_config_emb1_subsys { diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 5ba3d4f32e1d..055ed632c14d 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5136,6 +5136,12 @@ lpfc_info(struct Scsi_Host *host) goto buffer_done; } + /* Support for BSG ioctls */ + scnprintf(tmp, sizeof(tmp), " BSG"); + if (strlcat(lpfcinfobuf, tmp, sizeof(lpfcinfobuf)) >= + sizeof(lpfcinfobuf)) + goto buffer_done; + /* PCI resettable */ if (!lpfc_check_pci_resettable(phba)) { scnprintf(tmp, sizeof(tmp), " PCI resettable"); From patchwork Thu Dec 12 23:33:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 850687 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 0A1001D7E5F for ; Thu, 12 Dec 2024 23:14:55 +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=1734045297; cv=none; b=fZLijRfDJb/mzQWlVUJh0/Xo/PcktJE2kKU1uYUmFTrW+DkSgZKHvvUm2ursPzYZ9ts6aUYcQdr1o20PlimYAME2jbSANpW+MnCuaHQ/sR0LJStFBQypU66w+dMQu1GOTCC13QZcSNMANgv2fmsFou94YMYtunsOX6pKhY26Cyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045297; c=relaxed/simple; bh=yBg6p/BQTP6m9R+xHoDKNi6MehvglNHxhDCSFKvurTU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rhTJvFiAyLkQdHzjHB0blp7N48YxL04fq1GYmyPdVVvhNdTW7dxupg2AFy65TVXWiGOhZIYMYE8NoJYXHSMgJMyl7A7IZRqg4gkhcGjW1cxkEw7nDvO63/0lkIzBtBVigoEGZZ4LzgLoOHzoEe6KRnP/vX+awFXz3jl7W+HzlCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iPdkTqia; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iPdkTqia" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2162c0f6a39so21943975ad.0 for ; Thu, 12 Dec 2024 15:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045295; x=1734650095; 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=+c3LTJGLk/5jvIJlBDTWhLHuX0s7lJFTQZUxM6t9wYs=; b=iPdkTqiayWHuNnk9qMlidmPUjvGhvPjrBsOEdpiPbnILG8rkcwvwUxaWQG4xBU08Ix U8EgijFl6jhXmAdxeKj1DkXQ7A8P5y7NUNsYNc5EOv3TYuIW4QwvRyPhB+9HjdYVAgqr hvHEzSVv4U5l8BCHg3ENuzBa3YZbndz5VdKaijnuHL7ffgasAKgIDAxv5/6/rpCFak9c AsIpi1wDo0D8MfZ0LuT0WvyzPKoDkxc3O//tfzx/IWJDDNjlWJIyyq6HlWwTybT7+UQC yyQVnkVs9ed+bZ9bfPFuz1QYqVYpNTPriVz030NJt1Lg/vYZ6B/7FjLn87IIWILXs9v9 xZHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045295; x=1734650095; 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=+c3LTJGLk/5jvIJlBDTWhLHuX0s7lJFTQZUxM6t9wYs=; b=bPov4f6VPv/9QfkF2JL+sxWzmu+ne5U2Q1OZ0IW8AwQaxRJ2x5kpKOA5o1osGZydpu jZyv8IAReY2D0It6wWcHCrw0GW7DRS8WLdRbRl3Mvhr+KHRc673pwnaYc9gQ8f85NFsh CAh4bgzZLqnMqzcyo9a9Vvze25yJ5GOxn2UjWtYfj3CjPmOuOUo4jwRQsVHEyAir+VxX 6sEdvFY3Prt2VEYY+6wIDpZrr6d7yWezpHnotsU1x9fgO4yyvE9h/WP9r6QUE7v/A0rP 6HPal1reu0UcG01MOP/ryqd3b5qjLo2KBB05BIMncjhhOZnjfGSypaRnRI3m5FDuXhBl aioA== X-Gm-Message-State: AOJu0YzXxKKeut1dgmaCtJ8wA6kPo7Z4cywRp2NuwVbI1OIG4DlJAshf NM8P2cpzZAPvD3+FvSeAvN83SHrbxoulk8oqZDFcKElmrbSwpCub2lFILw== X-Gm-Gg: ASbGncuEF5VMfsnzhIMdaKeXLlLBvXPuTLOfNUHVO9wRqQ+pZHg1+v6uQ0DFtXrg/CU 7MyRSlAtKmLmpstTAlv2dTwAw82twlw2rCzxIY6269SCChIsnIHWlqa/D58JLJHWo3SpAe+13NY 23UbbcH9WgQ7NA0NWTp0r/9eYXrxvMU8yzvj/8wYd+jcBgiv3wT1DWSrMSXX2t38tmj+2jFoOnR 12AkRG5QNnq6Wgak8XjNKwt5HaplwMiQtWJsZnJJapEdtFubGYqZxyHYhHWipmGzRL+Meb8NIMy J7YBFAMp+7FtP1tPDNmjJNP1B2284PWSwHtZ95Zd5g== X-Google-Smtp-Source: AGHT+IF79JnzL6FOQNQmV8eVRl0p4VEc5Fb84TKclhnK7c4I85BEa6TnvyVCrDPW52/RLpQMlbZj/w== X-Received: by 2002:a17:902:ef44:b0:216:4676:dfb5 with SMTP id d9443c01a7336-218941ea491mr4472495ad.21.1734045295289; Thu, 12 Dec 2024 15:14:55 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:55 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 09/10] lpfc: Update lpfc version to 14.4.0.7 Date: Thu, 12 Dec 2024 15:33:08 -0800 Message-Id: <20241212233309.71356-10-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update lpfc version to 14.4.0.7 Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index 61fe1220f8ad..c35f7225058e 100644 --- a/drivers/scsi/lpfc/lpfc_version.h +++ b/drivers/scsi/lpfc/lpfc_version.h @@ -20,7 +20,7 @@ * included with this package. * *******************************************************************/ -#define LPFC_DRIVER_VERSION "14.4.0.6" +#define LPFC_DRIVER_VERSION "14.4.0.7" #define LPFC_DRIVER_NAME "lpfc" /* Used for SLI 2/3 */ From patchwork Thu Dec 12 23:33:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 849956 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 7FF3B1DE8A8 for ; Thu, 12 Dec 2024 23:14:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045298; cv=none; b=M7rcZVOVRTuoMB74VGIQBbSuz9Zauf3CMWQpf4mdI07y/ZToaBr7UVtVGN9CXVWo/chPpYW5VQb+J5bYzTdfn420cKBTFWOSmIcLusjwwbI81pzk9bb0JzxB3mzH1opj5GxYo/eS0jR84kcOV7jS0yERI7cbUG3ZhJ5RbucL1ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734045298; c=relaxed/simple; bh=rOXjxmyt4/NLDJ6oztjIUZSiXHcJuFeL0+D8veg0rvg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Iwx8xRE6QqxrcAOf0pvC0AOqpQna+/Cqt5Ipgil+hMurl//Gaxvqx1Qt6hXFg6eQxhmDNh563HuxBv/W0qCYejqYHigaVCROLggJdSpcqB7kklN5f0oRVGH/xVWe6YbQDu3QuW0CwQWn5ViFmNgmFlrn2WJnvT14TrgMdKkTGO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D+HOKwK/; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D+HOKwK/" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-21680814d42so10464885ad.2 for ; Thu, 12 Dec 2024 15:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734045297; x=1734650097; 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=HSgsWE9qSNc7zZsTbQmWn7ecVlZ+Cei3YklgM2z39Lo=; b=D+HOKwK/20VKwh7qgncyrhrS3N7xVde/0C7NY4SMQIac6c/C04I6PtUld+mH7F8lQI kCyTrRCOAt/66H89RUyj9tF903hZbtn/2jpRvG/K1tVxkVBpCtbEtKal8H3bfNppuRHt Ju0R2xIt3Hx6bGjFVsg5Z0UXiLUGPzBN3R9EyMhMXyOVBYh0x/tCvYwF6i1EQtGoHTNY lphF+FZFAScLZPRyeQkpx1+ygrtcs2R2Ou7cpxz42FClK8tMLFHBqbPjFMLpGKo5qq+w 81pTAigZI+Ls2RS2UIcH7582ghovThnd7AAYQp2Jk3PnHP7zyOE9pPPDnCj/tzmHWU62 OGXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734045297; x=1734650097; 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=HSgsWE9qSNc7zZsTbQmWn7ecVlZ+Cei3YklgM2z39Lo=; b=bp6NDTUrbUjQspVbFb0EUEHljeIg3MQh+FqwDRbcelk34C6K2R7pqvqQ5L9XP6RH8T KgKiaqHjJgRVrZZRRgTrXr+2j+3rGl9lSHU5iTD/bGfheYcZpYfz5fukpb21fjQJ3yBc Z98eune65ZWxUGF3BJGAiqbbs4loBI1pIIYX8bB5cxsgL1YBovpBjEEl9tX9nb1OpWdn aqnd60gEAkjnSMmmYhnyDKWO10AsEr+lh65H86bMJR5ndHuQysY5sIZmNemQnIBL4gAo mPSFjtfi2Ce78GEa0gbw0j3wvG4bo+QZy2+hqoCDSDrK3lo0ZeXUFV6liGd0G+Ex9tQr MYtw== X-Gm-Message-State: AOJu0YwNyBxlW1jCrUv3+hSFzdKFJ7naXEj7j8uwn4DJ3IteIyCpPmNq AFnwHxPKA1Ldo1DIL++mV1BHjLeMNpBQjxdoz7SwlYx+U/vEA+lQhf+iUQ== X-Gm-Gg: ASbGncvLX2+J+1ffSxodLj1JKwtP+sMhoCDy64cB8pGZAQokYo0L0+WLnAGTFGlx/ZU wWWfYz+4fyutG39Ri7SN2fx2pkatrg33nWyZiQ7CUzK4H7Ax2weSo29p9iJtEhkcaHdY0P6Xv5p ybvOyOFqNPJqLb1vtYuth4aeYfKGQaIFyWUELrtLTAu+1kYgdzdv+xDlLUtXx2iwh60xQMFUmpp AuMC61iHiVa1dYainQszNxideWf4heQQVTdvP/vE1FHbdnVXMIf0SvVqvKvRM1MluEeuHBrXhku M6rIkKhREAWvRSXVws4vtQFMXDpzZF4K2fvbhTIcBA== X-Google-Smtp-Source: AGHT+IFr98lKcEVYnnkqsCoz+Z8A2fEc984DBhugg/Oa8y+dT6sYSEBZhV6Cc3XnkU04+YzD5H2SwQ== X-Received: by 2002:a17:902:cf09:b0:212:4c82:e3d4 with SMTP id d9443c01a7336-21892a587b2mr7098505ad.46.1734045296766; Thu, 12 Dec 2024 15:14:56 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-216325f51d6sm92727875ad.197.2024.12.12.15.14.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 15:14:56 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 10/10] lpfc: Copyright updates for 14.4.0.7 patches Date: Thu, 12 Dec 2024 15:33:09 -0800 Message-Id: <20241212233309.71356-11-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20241212233309.71356-1-justintee8345@gmail.com> References: <20241212233309.71356-1-justintee8345@gmail.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update copyrights to 2024 for files modified in the 14.4.0.7 patch set. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h index 86d509f669f1..27e7a033b53d 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.h +++ b/drivers/scsi/lpfc/lpfc_bsg.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2010-2015 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 71d3e60f4b20..32298285ea5e 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *