From patchwork Fri Mar 8 11:43:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779613 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 2C52356442; Fri, 8 Mar 2024 11:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898253; cv=fail; b=TwagGVs3kRl3aLhRFvjf7s9u7LNHEbDueYpbJEwTyLBlRh6g8BhWN5XOXpf3+kSNfrEfiqrwFvo8RnAeDPOlNtpO3cNC0Zcqjm+RcUF96sivB8NaYHAYipBb0b76syKGXV50pigB5FDO8qYJblV9qEW9gUSwen+3GncdTSPzEI8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898253; c=relaxed/simple; bh=k2IniBncwkh/zAHHj8uYjWbvH1Io/Jj+uHpn14W7rLY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rz5bJX3djiDYeRqrzpPWmMQDUgM4SMkG0GQW+Nt4+FtXw4ezX3qYWDd3ZhrwDhnGHcAX5Qju/eV1T8sV4UjBlcpB7F6GE8nIqLi9rx8bNtjNP8shWESfSzyuIrsHcUY59ygs8VlIUVsqm4z18d6e+TaTJ984ZIpf8GzWlVCfe0I= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=HwzDXsSV; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=MUe3k1E5; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HwzDXsSV"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="MUe3k1E5" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Ahwlt024721; Fri, 8 Mar 2024 11:43:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=NlSMzESof/4+0bqVXi0n5S5js/K846KaNkufe3n3Pls=; b=HwzDXsSVmABfrar5PUGsaBbLeu7dQeGlXT6hw9J4E9m4hNFdvSDYHy/Ra3XjmZchlmrn UN4PKbcIUoGlr3OWm4QxepNYsUZ+kgjXSlw/o1c2rIgJwAaVnJl2qFMpn/+lgBsaTwnO n1Vd+kqcMcKBGmHz8T19qPNuR0e6Uxk6ElZ5UxBySCQ1eu4CsHx7eMEDGmiUwFr7ZJEp SUXpufYuoqcFwB6poNthrpeBXsybPPYyuP1yGpRxjrIVgzH67yKPQnTP9u7B1VEcpmcF 1KK7W3OshyVeIubaujtmnN6MD+4InFTfhMIukPH8LDMsBKYAWdll7UU7nTyrankAe4KF cg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkv5dpvua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:47 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428ASUSQ016003; Fri, 8 Mar 2024 11:43:46 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktjcpmq7-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xo83KHw0oZnTDwGdCd3sqSAXTZSGAvntlQsy509RmLkf77yyCVoSFzJri8HiAxZPD9vzZOGJuJnF5rPVx/KzUvchHarn/ZOeAuwgN9lvuftXA/K3TtYp7IXnGkb4d/UIdi18twvRcBg7yHYSzytmk9xD4feThRciQvnqqLf0+iIObH9PpF5+HOWa79c5MPwl/iOXAmH3CjG+D7H22xwCLKzHAaZ1X/5HIgpeXDLa8/RZDi5Z14KIfI7g4l3G9AtwIINWzCHumyf3dD4iLr6E1+exBtZQeO3Gk5PbmU0iT8IzDi6ECCO4TrpNHIPOEc0QrsFWmc3peH5VgYZjjMzgig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NlSMzESof/4+0bqVXi0n5S5js/K846KaNkufe3n3Pls=; b=FkkamklOztZgFy8NwgtUMiBVChK+1VYQGNngpXiy6EmqxWhfHDAiuB+6Qz2ZL190xiekLvUfw+byybgEFsmQoQ/LGFnQYlR2WRAWOvDLCAZJf0LLboKIyXmhtw4id31LlUOizvVp1bA+32xFyZSImsyr9E5sO+2nq3k+jxPZYBK1VEL5fMJutoyJ0N0zeA3Xyl8auWvCnJtRCSDv2zGv98QJwFoRAUNIzQ7hABpjUvrrGo4eTSbMBvzl0a+TVixXdtAME7Gs2tbxpjhWgygxmxmGZ0h0d++by8HCQAdzmytNsQFkYPoZFKLFcBznyuMMxOciFDv3NxMZiysT1bUsZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NlSMzESof/4+0bqVXi0n5S5js/K846KaNkufe3n3Pls=; b=MUe3k1E5mAvoW1my9KMpcgsqISHr8o0XAlM+wPNvyRYmaZtrUx77KCT8twSoBp+JFMfGuYU8I9rifG2ES/zQrYPkWOGwOHt/rnVHR8QxKtiXDjuZ3UDbNsTw6Tez09Vvh3ctPQQLT/NAcYXTyFg+TGIZ/WBsa9H69oG4CCXabE4= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:44 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:44 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 1/6] scsi: libsas: Add LIBSAS_SHT_BASE Date: Fri, 8 Mar 2024 11:43:34 +0000 Message-Id: <20240308114339.1340549-2-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: SJ0PR03CA0051.namprd03.prod.outlook.com (2603:10b6:a03:33e::26) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: 25ab4eb4-4750-45cf-c457-08dc3f650276 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NeOx3O1enj/3Yi66mDPsgrh8pXBWG4rgi7C2Gs33jlxbMsRBavYpaCczn5wIoSOgeBc8cP/iHMM0GNERNpDV14VWtKYPy7KfmxBJg3fVo9voMQ7gf90N5W9pywOJbunP/ubzSssJ6djGDMXjRQd35T1iWccZtNaaZjjhkyrVx0HK3Vfvd0gUyod8bktuC2l2bTn8PmCkASUWZILhl7QdwYKKtkhO4uuPBF4srfrGPccA1XTH8FseUaBpX3Iyq5fA3qra79oarhmd1WQEDyd+j0v3ZY1yoa6E6OxSgbwTA9p0yGOzh6gwubQ/ISXLx7/TTi+WsLHI34MxUh4rguS0dD/UyYK+cSYsJrLbZDIcs9OxTJnEZS2j4el+VIEaZs8FlnSbvwYfG8KnqvcGFVIm7CDHBffiKdDbuxFFn7viRR+2f/klmEY1aWNfiajZImkIE/HvXtc0EVBNZk1jfBVTwLUOycrLaDIGVgSMj2QCBiI/Wu5+XAtah/kheTAEypziR0EMOC3Y6130d99YU+a6+kfSwTaZAVW6MKFUcW1Q+J+7148nSFCMH6kagIDicv5TY+X9/KdwmAn1Zm68M5SBF1HyXMpJ9qp/JGSXgFrqXEzKY+yFtsp4JAOMwQJb+Imjt9a7MPctwj5JQKfPKf4lNpwkeGo/g+oykCsNs2jpYys= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JnYPHNylINBh995w6P43uPGWh+OZgGhj8q/XlU6D8QM8OcBtUHuv8zr4t+Cb8/Ri0NA6hTU+gR71rxjul+mcRRehnvLOF3/ejX3EEhGGCCjI611pEAg0GCBaIGVOQ386QkY1kJbXdYtJW5w0GiK43dx6uWJx6P4wDPZu/p3An6QYrtx/hpETIhlRpJzJi376qL8rHf9dVFOG7ffYXLsHzjJ0awnmg3bv5kReEy9zPrgy0x6sSx5kjElhOzzrz0iNtYy/1JiV1yjvVGBOcxG7/M8oe/W8SRrN2wSZR16RXXLvG5f97Px2eo4fgJ8mkVkE4zhQyvh6T6wr+aEpvhB61j3RrOWIwLwQQlmrO+yfTWJ0ca2NoG5enzupR+6QdoR02OiVeQCnKVn6xHlr28uKo0XMLwYrVJiw10TQm8wLtTlUEpB+sLRmLB3IH9zIBMFpR5ruLfAEfp5EVG5WmxhlM6J0NgLycrK4qGtltMCXLjGxHzwONe329QR69UTj8UIAHzddy3ambC3wpgHaP5wE1X9sLc8gJK9XpGFbTZn5wfirFfQ9E+m6gAsVEGK/GZEtyZ5cEPu+3v33+iLcoP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S-Exchange-AntiSpam-ExternalHop-MessageData-0: 4/RhQsp6X3aN8dWWbC92Fppg0RFcMrDU2V0cm77Q73Bmm+gJidC+vVjDWPMTEqU/fAi8JbVyQpoCyqZcP5C7/gwyt0gjUCQH7Nr40uyhZz+mGYhMhUHxPFCjHEt8AHqGRxx0TG4PoWjj9KNDyRPeuoARpsfd/Wndj4avoP+1qbh7ASVpuKXmV2Dtn18n3OnH/7bR6S1336/NoJabEQFqQe9shMJXA0/7ihRW3gO2f2Edw/dQE1M/Zbtql1XJQSu1Ba7K9g0emnxiKPuU41EcsqdZI5AZNJHK9ITHeiDaOApBM2tPAe3HeNmqDVkadt0KEWV8vYf/QcsEyw4R1MPYva0Tyy3qfb4X7lRnKsK74gZ33unNbfzmQvntYufTchUvi0N/yS2VPzBQ0Byxm9sy3YUduu+F8n9IKgV94gEPKlY1Yd/G+BTDfAGIulWAOli3nv98nwd43rTdTCrwn9oRvzaDhhas0XfaNPz+plZM4WVQpZUQtlWRH3/CTfCmVRqULm1AlfGBSawDnHT1yQOcU6SRsnxDZkWVGW8h4Es3md/W6nVu+5kym3KOUJ9gfc2Pd25uCPEwOfg8dpEWJacAdC7DkrDAhfwT1RCeUfBLVXA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25ab4eb4-4750-45cf-c457-08dc3f650276 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:44.6434 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kxmiU5b3eFNJ72IGzbSltLqNtmd69reIr3pE2ZqtuTM89GWGiPJ95AE+OTZGOqaDeHQ9RHl4UlOOCjm7y5Xhhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-GUID: MjassFqcj1HxYinMVLEemuJtuR9M-BwV X-Proofpoint-ORIG-GUID: MjassFqcj1HxYinMVLEemuJtuR9M-BwV There is much duplication in the scsi_host_template structure for the drivers which use libsas. Similar to how a standard template is used in libata with __ATA_BASE_SHT, create a standard template in LIBSAS_SHT_BASE. Don't set a default for max_sectors at SCSI_DEFAULT_MAX_SECTORS, as scsi_host_alloc() will default to this value automatically. Even though some drivers don't set proc_name, it won't make much difference to set as DRV_NAME. Also add LIBSAS_SHT_BASE_NO_SLAVE_INIT for the hisi_sas drivers which have custom .slave_alloc and .slave_configure methods. Reviewed-by: Jason Yan Signed-off-by: John Garry --- include/scsi/libsas.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index f5257103fdb6..de842602f47e 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -726,4 +726,33 @@ void sas_notify_port_event(struct asd_sas_phy *phy, enum port_event event, void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event, gfp_t gfp_flags); +#define __LIBSAS_SHT_BASE \ + .module = THIS_MODULE, \ + .name = DRV_NAME, \ + .proc_name = DRV_NAME, \ + .queuecommand = sas_queuecommand, \ + .dma_need_drain = ata_scsi_dma_need_drain, \ + .target_alloc = sas_target_alloc, \ + .change_queue_depth = sas_change_queue_depth, \ + .bios_param = sas_bios_param, \ + .this_id = -1, \ + .eh_device_reset_handler = sas_eh_device_reset_handler, \ + .eh_target_reset_handler = sas_eh_target_reset_handler, \ + .target_destroy = sas_target_destroy, \ + .ioctl = sas_ioctl, \ + +#ifdef CONFIG_COMPAT +#define _LIBSAS_SHT_BASE __LIBSAS_SHT_BASE \ + .compat_ioctl = sas_ioctl, +#else +#define _LIBSAS_SHT_BASE __LIBSAS_SHT_BASE +#endif + +#define LIBSAS_SHT_BASE _LIBSAS_SHT_BASE \ + .slave_configure = sas_slave_configure, \ + .slave_alloc = sas_slave_alloc, \ + +#define LIBSAS_SHT_BASE_NO_SLAVE_INIT _LIBSAS_SHT_BASE + + #endif /* _SASLIB_H_ */ From patchwork Fri Mar 8 11:43:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779611 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 5659E5645F; Fri, 8 Mar 2024 11:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898266; cv=fail; b=P3to5CONayNVGEwNaNi7RsnR+U/d+xL+7TvrOsdn6QQ8nnwQvz9o0RN1PM0aiy31TDl0Rpbck0Ry+AWY+EnPpV4GRQFU2eX4gfPI6FO7zreDzuykszTQZVAVN9U9Kq+mRTpfhLFJN39vHEIXJJr8xP0sHcCl5os8BF0Sx8praUI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898266; c=relaxed/simple; bh=Mn7haAzKKfAZjIPTHEo0EIkRvdrVspd3rsTOIH6gMl8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=IEgOXz2/YBV+da0mceuk8iq/frgQByVOQz+6eI4uxx/19f5od+Xk+BbwO/JpOwGz4vqQXfU3fSIpEA+HbAnvU4NnFqkuKMwiQNAsYY0Cx7d/v3ogK0+aay+7MWIKMSrEmsAbMjKA/Ci6kBe8+SKyXVYVSphCkAobc96THY879K0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=aRXYSUsm; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=pn9Pi0PY; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="aRXYSUsm"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="pn9Pi0PY" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Ai6tP004106; Fri, 8 Mar 2024 11:44:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=zCB9SnIPFqlFB8gn9sUu/crftB8liZFJpGp0S4c0LU8=; b=aRXYSUsmRTflG18+ECSsWGNdAtSsy3nqAdzZO3ZIAhheQUGGFdR3L4zsjjSmkWzxoy1y ZuaxcT9mppz6Gr+Qg9bRihTo8dj9cgGOXRBAqK9I7+qtg7wQwz+GrqSY97hjCvxl2CrJ uzAwlRdD3jLUPTdZ6AJEoaYRi34rWeOrzOhbiiuD62eduOKIrBUJxCzlekg5GrgAFAaL gF1RmlyHi+G0mOX6aYwvIC3Sviqu/1UCJKPmf/JJN+BfDTnnA0rbaP284eYQO8TTO/Wi VSubGZnrjU/k/0s059m2XP0VHiuVxeQDKJfoZ0gB73aADmqVX7UV2G1ZzvzlmJ+Gx+sc mQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkthepkpw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:44:05 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428BXYui005323; Fri, 8 Mar 2024 11:43:48 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wp7nv71s4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AMVM4oiYNulAu64C6KMjEpJEoD5PsOBHER3YhMfrmqXkP38+trhY1md0hHQ6rxiR/RzD/4wcDApoS8gVYyv4hVAtmBBFHHEYT2euCBaeg4CaLJGb1MuxvlK7k7VSyvKRBG/MjyVyRSM4VVU1x3ksTN635Kttdqv3bVKhEr7LTn5c/LMPQQdpyJ+FyVaZcgbhLfk4MBGo0SMBAKg+F1BSkhBqcH31ZHSbsLY0/FanzRktUPPZmEESbR/p5eqC+y+3ijsRKOd20hR/V8IhgLx9tBJyV9/HFjVxLuSsf1JNqOtrGYtVRYzenbw1Vk9r9MMdHQa8hilGepmrwP9cxbAiQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zCB9SnIPFqlFB8gn9sUu/crftB8liZFJpGp0S4c0LU8=; b=V/sIOZlqmZ6JmZezFGqi7siFdW1ZaRhStiHZ/rwEH2q0XcfZ+BnRi7B5jTOhBCk5pLz8vkomHcHQkLxNKdldQyXB9r2S30kWLXv1zBK8Czsvqpln5C+zKQIpKHHs7z8uUEu1eIbON9nd+QSjXas1PJcjMFO/UTXL1jjV+/JJ95/RTQFdssDuekGeLZltB1sCQzXH8Gq6hWKUC+kvfb7t2cJMMkHwuSFm9T49/2aStHp2R+jn6Eqt+TcRFCr+k6TFHU7IY6fAYyUzUew17OzQwwcFyQ9nm+MFvRR7aZta6A8L8DYLUGrInDIboo63/30gSWhzfhxYj8fBiUlV5ZZ8SQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zCB9SnIPFqlFB8gn9sUu/crftB8liZFJpGp0S4c0LU8=; b=pn9Pi0PY0F8gUlQZ8dFnPgYoXuAEAr+2LwcG37/Yn4NQkHbVdmBhgfVQRSvs4DOSE8mK1hvcfOkZVXVnRwz5L3r5pto6u1k5xn6tqFvdEUH+U9/GkLbhXmw+OAcwGIeRC2B/g00F5wXu6+fy/1dEVwgaxq1huBnZXkdmtQzkqR8= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:46 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:46 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 2/6] scsi: pm8001: Use LIBSAS_SHT_BASE Date: Fri, 8 Mar 2024 11:43:35 +0000 Message-Id: <20240308114339.1340549-3-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: BY5PR16CA0025.namprd16.prod.outlook.com (2603:10b6:a03:1a0::38) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: a965f940-1eda-4169-9093-08dc3f6503c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OwdgNa7TAMeCk5odQvpNP38ULBiGYAEDeFoDK1L7ABb3SnqAxO5Vm90A1TP9u8lIHJdDk/tG3nnOqxANe2UAJa8HhKkvynlV3kSACryJT/A2XvqrvIeEHqDkVw78WEpR/O/dgKXVc4+/0iEvNQeRp701/Nch6s3t5wzTNP4FP93flxhy/d+TMX4SvwbXK8Ft9DV78nBVJHiEp6kzOu2hbK7b+CkCNvivHY22L4c324NvDtbNKdjrJm/ffG/Hk08JZ8nUQh5QOSd4XAd95po/eTS7q7UKq45v9E/lB6fLLYjYjb6YGcNpNw32OzF2Eijuv221bMpe/ehAy1xkRgI5ytiG1Dis4HIle6VB4TaWv5zs1R0WRTQZR7RapRIevlTqg3AvXuY8hJuHMvEL3tC/3d4MuCOGpni2+ypV1L505rY2c58Zcw/ZSrEIMD3SDithJuiSfkf/7bvjoeC1JBpjYogBBYvr60HxNhg5FGVlGYWgtL8/HagfOMMEoYfs4N+RiZYCKnIF/RmlqT/uGnfbKsZwDrXS72aJQfrZM3DApRDSgW0oTaHDuOGsD8JIuCt23QJ2doRjZCXtf7et5HJLGHAYM27w4JmqCkEIwrXMUb1fQds7gVmjjEmU+fF7d6FQgq0Y/SIFJQRKWnX4GsFA/WSjSyqVvy/EpJK2SwujJeY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cAZPqdlBrEbE0Gz5tnfC01+w6SMWVl0fzVc1jlfFo0KnykFdo0Tt21t3w2E7k2SC0bWp/YXahiz2i+5jKYmPmNQYEHdw9TQ4mYoDMiRv0z1IOhGT1FwgY3CGRy2RGJj1khx/E79wwoRxDtbSuRrZ6cdgsLh7XfFFhNHvpLCz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orOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a965f940-1eda-4169-9093-08dc3f6503c2 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:46.8198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YblnZNqNolpVufhT6M0rZmA2Ik5rlzppZFphbSq6ZDMII3vLayqqHgT9KsM2GoQTRT/3pa2FPEqLLrIAXkI8Ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 adultscore=0 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-ORIG-GUID: k75YAIM2QrPUAuoNA04Rv57wIcRTmfgH X-Proofpoint-GUID: k75YAIM2QrPUAuoNA04Rv57wIcRTmfgH Use standard template for scsi_host_template structure to reduce duplication. Signed-off-by: John Garry Reviewed-by: Jason Yan --- drivers/scsi/pm8001/pm8001_init.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index ed6b7d954dda..2ba320ff0d50 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -110,29 +110,11 @@ static void pm8001_map_queues(struct Scsi_Host *shost) * The main structure which LLDD must register for scsi core. */ static const struct scsi_host_template pm8001_sht = { - .module = THIS_MODULE, - .name = DRV_NAME, - .proc_name = DRV_NAME, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + LIBSAS_SHT_BASE .scan_finished = pm8001_scan_finished, .scan_start = pm8001_scan_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, .can_queue = 1, - .this_id = -1, .sg_tablesize = PM8001_MAX_DMA_SG, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, - .slave_alloc = sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .shost_groups = pm8001_host_groups, .track_queue_depth = 1, .cmd_per_lun = 32, From patchwork Fri Mar 8 11:43:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779088 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 92CB359143; Fri, 8 Mar 2024 11:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898270; cv=fail; b=KWe5obifF2DnXCtYh3tvb/BOxjAEFLT6/ykWev00YfXoA8wmjtFTKLvyo3ubtPOAJRKos0Rqk5oZne0+ydgpF2KPQkMU1UPJC+GNVtJ5wBsRcmSk+zO8LdpiwhjyAg+t7XawHfkLuOmx6MdYwU6RofZoA+6qur/jjOOGYkM3/8A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898270; c=relaxed/simple; bh=+sazlHOLtGKbJzQP5C5HE9PLusavwIMdnD3iyL4KTt0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=LwwbhNJQ8hf7fzHEF3mM22YMg07xnN3q1iL2TLne/ePaRDUJONKtZDn9+gT4QS/R/S/i9ZdW1o8+LEKF9TKXcYqJ7o0n2w77iYfL7d2/ZhQXD2q4BHQNUqbwA/tRO/+3S613JMLIERE2dsF9RpMJtlrB7X4Tasj5FVH2x0deTMk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=GgrqQ3rS; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=heYeJdXQ; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="GgrqQ3rS"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="heYeJdXQ" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Ai03P003994; Fri, 8 Mar 2024 11:44:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=PVOe8xs+S4P/BpYQtnuECRoZa8x7JWtyFlxxcMqo5K0=; b=GgrqQ3rSD5HBufdJ6fraw9tiIS01geP9J7VVWvUdV/gl6dvSCjFwrYwMgXkECBQk0kUu /heo8l8OA8kQrDDwdYg++Yz7Vbl5UBMPbaYKLGlJ9O8wEN/giwlCjCM189zq+gyhGdbz 9DhNzRNj3n5binLrR6gUxLp6AtHCSuIE4Csgdm+n/KhELlDOnyHcp1OidsxiljkaI+8x y2073XC6W227tp/+8JbO8zEuSur4DGGnJwcrmA/9kjVv+F72KeUhNSHahVNLP3SQNZns WJYaFhIF5iFUCKrVIvUqvPmVDlvU0/fxafG2kli9asE3sZVs44UU78ao0uyxlukJuGvD mA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkthepkq0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:44:06 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428BQQop032047; Fri, 8 Mar 2024 11:43:51 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktjcn4th-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aJQjf6tnjKjGKOeP7mWtDgpqyGbRcXUAdHfQStgqTo4jfnBmhgp9QRA8veVIWJzvfdgNZeX2kfO07NZAxfDqBvmh8XtpbiAk1LSzbAgVKrzCKv6uRYji9xzT0eQGxt7ARSS1oGTxZcySlw5z6/I3NMlsaRXiDY7wibWq2Gf5IrqwGYG6ophDSKFPtobGmZnT7OfR4dgu5HZJletpo/vFVJTE1HyxrXoTY3WRes5KqXIS6DCzcajlxk92SEBJer6VapgEJvU1TpC+ieILuK/7svqi2WHM2yDQeL8/3F6v7snZ69jf5Q7oRDsk/t30EmKKggh0y4IPbP4qcVcXzGeMgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PVOe8xs+S4P/BpYQtnuECRoZa8x7JWtyFlxxcMqo5K0=; b=UAdGW3+2TTVrbkToqwjuapMBhl46dW/x4yKJnThBaXNcjwIsKhd6QepTtuRa8YMuYEjCHJEcSpso3JaNlvrNOWsRDU/dmtXrVZiUiN9k+Lqh2emF9ilsC1VUhyuWDcDfyAyGnrWcqZjjRKJ0UaeCzI5Hf5qTJoUyRx7gkQKUBXPDu7FOru0V8BrtgaPySMpsA0P1w/Y2aaYFh+rm6B7proo5uc5ixX6utguT3nM/4O/s6SV9ddzVvR6chUx88Ip65CsEnM+p6FeZs1/ZJvtwR42Xux1dEGJ9hSJry8uxDU36Jx44KZuv8EqgigRYCljRsul9zhyLqLryFiwqQcZwSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PVOe8xs+S4P/BpYQtnuECRoZa8x7JWtyFlxxcMqo5K0=; b=heYeJdXQS8EuLWAszPuruipkeJ5ZLZ3eEtG2wcDNaoLBCVf8zgphB8BGN8twNnj+mEGqqdTQeCouSbJSX8+PutE6COm+8yv4B4OlMOLw2kH8fdOzC2r1TNtjxD9NWOYDJew1wQtp99MzFN4R8Mdveq2lYwZemZ2ZaQzbP9LZ85M= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:48 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:48 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 3/6] scsi: hisi_sas: Use LIBSAS_SHT_BASE_NO_SLAVE_INIT Date: Fri, 8 Mar 2024 11:43:36 +0000 Message-Id: <20240308114339.1340549-4-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: BY5PR17CA0028.namprd17.prod.outlook.com (2603:10b6:a03:1b8::41) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: bf5b0772-75b0-4a6d-c625-08dc3f6504e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mNTLuRyO3FqzVOqhHuWw/ur6RHA3KDUwg6Wj5fX04usApmRhTPuH5/KbRKldsj1iU2QbqgulBBZBQW5Op4MdiuKRfpSWyi3j4IZqEgX9jzwbh97tCZHcP4Pcy3GGjkWej5DqhmvOvluh6jBQPmrJhcXsgzGirAlAj5v5iFc/9r2lYGMlHke4AwzS3vi7dlMOQwnX6GvNDWLJFAY/g+77NubTbvThFzo2JH/wzNLn99cNYRaZA1CCu/GaBiT6iMhnfPp5pNRKw4mB03bCfm8/ZHJly0GoaKgoJSg2RdkFELZyim6/BXF1vcbvFvl/f+1VzhwEDqbQ/VnUaMjRzjBn3XBLfrRHcPk99cLf8HHq7fEpi5o8Whoa4B7j9jr06WNCR9mlMiP3G7G3IjggC1oLoBARl8sLYLYE0BE2lyskgpC7VyUYdED0UtuAeAGl0nD0r0aA5s+RjYzvF08UBrzkummNNdwaQrAU5/F8XLzVumJ1td45Mtyld0DoB6XkYg74L0hcwDIGDEq5Vnu6Uy0IiDOaCXK68bkW+mDsOLYpkbm69+n0yQo4SHlSx01C7xLyN7TZtKmwBfF4bZUJbJQ264MlwM6gfu0gC2P8md0JLGdBwMvTLe0qy+ZF5m/OAewgXzW2pfidWgOM2E27jtwmSEu4Aa0AJWYNiTk1YWU1QzA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qnseNFr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jq5ZYgt5BaVvPYiFJIzQca2P+7PBPb27hIMiuv+BgfL6zUOkRgZwI/IQRmxANkEAXp7E3FCliNAYSyqleinR6nPIhDBDmKwC3h3SelAXGDzxfzOOhWkwuIt+GRtsONZM04uFa1fcJainFI7xUqSQ4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf5b0772-75b0-4a6d-c625-08dc3f6504e4 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:48.6915 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bwnNltxn93rrprVVvMIw+0ti+zzizs6HnUjKYn01bQ6U+EteAi7oAwXRwZuIdx/OHb7QbWoYOt0U1qUSAPcD9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-ORIG-GUID: rn3o3K76By7yq1CAL2qe0QPWA07HpGKk X-Proofpoint-GUID: rn3o3K76By7yq1CAL2qe0QPWA07HpGKk Use standard template for scsi_host_template structure to reduce duplication. Reviewed-by: Jason Yan Signed-off-by: John Garry Reviewed-by: Igor Pylypiv --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 18 +----------------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 18 +----------------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 18 +----------------- 3 files changed, 3 insertions(+), 51 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 3c555579f9a1..161feae3acab 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1735,28 +1735,12 @@ static struct attribute *host_v1_hw_attrs[] = { ATTRIBUTE_GROUPS(host_v1_hw); static const struct scsi_host_template sht_v1_hw = { - .name = DRV_NAME, - .proc_name = DRV_NAME, - .module = THIS_MODULE, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, + LIBSAS_SHT_BASE_NO_SLAVE_INIT .slave_configure = hisi_sas_slave_configure, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, - .this_id = -1, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, .slave_alloc = hisi_sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .shost_groups = host_v1_hw_groups, .host_reset = hisi_sas_host_reset, }; diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 73b378837da7..b8646f6e4c6d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3562,28 +3562,12 @@ static void map_queues_v2_hw(struct Scsi_Host *shost) } static const struct scsi_host_template sht_v2_hw = { - .name = DRV_NAME, - .proc_name = DRV_NAME, - .module = THIS_MODULE, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, + LIBSAS_SHT_BASE_NO_SLAVE_INIT .slave_configure = hisi_sas_slave_configure, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, - .this_id = -1, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, .slave_alloc = hisi_sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .shost_groups = host_v2_hw_groups, .host_reset = hisi_sas_host_reset, .map_queues = map_queues_v2_hw, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 7d2a33514538..16ef89002fd4 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3315,30 +3315,14 @@ static void hisi_sas_map_queues(struct Scsi_Host *shost) } static const struct scsi_host_template sht_v3_hw = { - .name = DRV_NAME, - .proc_name = DRV_NAME, - .module = THIS_MODULE, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, + LIBSAS_SHT_BASE_NO_SLAVE_INIT .slave_configure = slave_configure_v3_hw, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, .map_queues = hisi_sas_map_queues, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, - .this_id = -1, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT, .sg_prot_tablesize = HISI_SAS_SGE_PAGE_CNT, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, .slave_alloc = hisi_sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .shost_groups = host_v3_hw_groups, .tag_alloc_policy = BLK_TAG_ALLOC_RR, .host_reset = hisi_sas_host_reset, From patchwork Fri Mar 8 11:43:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779610 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 3FC525645E; Fri, 8 Mar 2024 11:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898271; cv=fail; b=IRaHDFdXbDIbe3sUPDtHgaOqcLMlrY1/dOb4odcNe0NxeJOJe4XZzgK4r3XbtsUP2L7paMYn/ye7wWN4bB93ATiIh2EH0kZCD8pTm2BwvLoUIX0aEiFncQo4aGl3Sw2egPL69GlgkVO2eJ0vVXZZ7YW7TnTCAwyy8HgZTd+Bssc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898271; c=relaxed/simple; bh=pEzEHiPBUz97xspaDcmRTKTNqsySLTs9El07cO3+dyk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=OAzmf+CLrVN/OK/ynagFnqDQeydyQv1i3IckDbJlWNU21aCnQnVO0cUh3Ye6mRtjvn4PO53nJn3DnfcfgZV6STi3gTooQiHvOpL4RWe6TRbOThPBcR1nhW9o+vCeaidNx3zuBvJpIQBPYBy6cysBG+olK3bSZJLG0/nbs+r1qHg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Gqfv0dN8; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=acezTuEk; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Gqfv0dN8"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="acezTuEk" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Aht0r003610; Fri, 8 Mar 2024 11:44:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=xcfHQnq+xdD7FZj+odiBiRBumssajAccWZPEPADKf4c=; b=Gqfv0dN8f14HK3PzkGZtWuQtRlbfYWdurmvHHNyqjzIesKBhbTp+rjpEKy4A9tC4d1My 2Pg7regjHLoiViapTpAgfSJMCDV54Ji3+jgdiI/Q6HU/XTvZLRerUB/eEYbsyMRmCVFc QE+tUBZJHH59w6uJZxXJoxfKkFMN55SCpnmVtMy6OHjvC1J5LGHkwqTrH62U8wACyYln g69UR9SByRCb3be3a6tSvvnUbBF9H3WSpnGgg8VG5IYRvZ6jpVvHCrEauq/MjpeJEgdh rvyjPcOpqv9C43s4WAfwuPdbkYHoPKRFUUqGyYlgpau1haA9ectj4sbszgm4pcd4Yl7O 8Q== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wktw4emh9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:44:12 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428BQQoq032047; Fri, 8 Mar 2024 11:43:52 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktjcn4th-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NWRh6/1rShwo20HwUrvCT0mWsbav9KbBiWbF0IhHptytn3YNPM5w15mpTYnANlKZQgcBQ+V1sGKlX91ByDWIaNOkfpPdEuyJvM/WMxYXzD56IcZaEpHpgSeUCLfH1kQDttcIcztCAux9C2R6BZIpveZ8nqVgZ+Ua3VV9oMG6Aq1dNEJ7y6aNLHNo69RY3RpAkvzmQsw9HiWr7FLnxL4GQ7kqUptRW7QrQRgETDKDc3py9Q1ViE6u0Bsx9V5XLt03ftr/WUeTKgokIwVhTBFFqiMRlSh/ljCqmydO+r6uwHW89+pCGHwamaT9Qas0GujLsT8or/ukuIElGivtO6tvQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xcfHQnq+xdD7FZj+odiBiRBumssajAccWZPEPADKf4c=; b=oAQTzJGzk+nJNnGphX8qQtQ8kVeJ7e3O2WBofc+JxiG/PelMeeGKBDcDijdL3pRSjPlyRgHenAzWYvUp7zu1m5MA1JNLrinBbgjOBSEnVN4NG6WeSLOFZi+YXHDV4qGGDf+Q1D6JIs5C5MnVXNS+wO0YzIH08u8fRqlZ+JLNcNV8cdSmxtSY+u7zyvctqnV0S1wsrbK1D6w6xV4Z6W4PhyNEn9/wi3KZCuxRg2bkFQ3ZsXyyjz4jQrIaUgDyl+HdoaxBMNdYnC6wXDLkSoVvEiqWtWw/hDDnv1w/Ncr1PAT+P1Cumj5pjatvqQqw4uZgCMJ4uFoqXMXVP8f+Tii4ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xcfHQnq+xdD7FZj+odiBiRBumssajAccWZPEPADKf4c=; b=acezTuEkv8LpO8EjWUrP7r+zlSYbxJ1MDmIWInrmDUpdgXSna6LY1PNPYfuVAcF8S8AyYS92RoflCIZ0qojPhuP863Qn/+j+ijwsqpkyi4MVz8dfmaWIIBJINrsUNqCDmkmWVfDzLD+QxCROfr7c4M+shiMI5qwh7Sjw/n3VuvU= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:50 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:50 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 4/6] scsi: aic94xx: Use LIBSAS_SHT_BASE Date: Fri, 8 Mar 2024 11:43:37 +0000 Message-Id: <20240308114339.1340549-5-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: BY5PR17CA0003.namprd17.prod.outlook.com (2603:10b6:a03:1b8::16) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: b466ec34-3f1a-47be-259a-08dc3f65061a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I6tLLr3em2dgXnNOLvmT5mTP0RCK+WPKswIK9AAp5hEzBHOP+i+UZRVSnZuDCqNMbWOGyeT61Vbw0IFarAU3efizZIWBas8Bkl2QpZtZQek971Zop3DJA23DSSDltV2XZZDo2IazHJ3ehyrBMgyisGK2KJLDWFC1hMuScS9NcxqpYsMMf+LF4x6SCctXfprs+3dTe1oIYuEnmg+4SJ5SAfLR5gYFvPEGouKTLqi/I8wiJYtujhH9PNZhykfQWiyDuTIqT8QjrB8bpNnzustS1DtH3s6QhU0c4vMhuaiUT4aNJ+bLmtyffS4mBGkx7mc1Vb2RwCQM5Sr7b16HwEN7faezPWllx8OKjFAxl5mnSw0gmC61/mdLqLkcF5KmI3oUV3NIRZmFliKDoAKsqJdiLPpMVjpL3dE3TBViAvJzOMWCBxHyyV9QFB34tc/L0fnQLLu/YI8et9zEn54Cedtn3tzg3YbjUILCfaG09K+yK8GtlcsPgu2pCg24ZEdL37YiAl23JnXSrQuREhcmY9QxSq6KYoaWK6ockMEqgCCrIY64deV5eVvCkRpAa//706Vk1mrEBV4olJrI6/8xyYpw8/deAP1TRrwGhq+8OWfsRd4gvhg51i1M+4R6LzZ5ODgBN/Wba4pWSQDom3iJIQZTM1Czf8wEfhzBsIngVrcZa18= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ktizAJvzR73OhARsi6nDB9aWkGJSM35Vp8DjppVlDQ9DN2N19ltBWTTyX4J25q/QgBaevvEt/W4XtJE+Ag4sMy/X5bCnf/6T7aVhdcwPHz8crsjuFd6zNA0Opcbdy6ZdSn530HLJCpjtVYqCSXSsJEBUBoIQxjsnkzoC1GXGPlgZ0CGj1RQz0WcG3zUb4cus004HQh2V9q+eaM3NrbcEgo7Qct2PP6vvnmofT86ECNl6EnVkzs30yaX+kDk5rV8fItcpUOUwRgzTsXZbi/ukquD/vrU167laqSvYAXdGuBW+NbPvQG638QJH60m7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UO0QF6pAFSftPDnGHlM6LpJ/UydMdhYW0ar+Mh4Iu7oDplmxz6SKOknIfCLW9aUna93oQ3QZxebrW9YI+D7xEiPn5IzQ3w5B3ZlaoCspwPh31AzsvuIb55MKtXtV+CKwOSbdol6QLQeJ6LKhLHlI7GitYqeJQmflZeoLmQWQHHN0LbhGDD84a4NkMHW+boubDOV0c9lTUhci2Za4lbszi81zKzS4llFG3Zx9dx2HQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: KtKa0CMafXr70jtcWybUc62evGVWM+17VWyJ60kv2NncoG8PdcXyCIsvuHdI3jUJtWiredtp6x2YpkyLMF6t5p+8Ml3qu1PTD6mCnUF5E+BtStE+5W/KdK6WhWjlA6noDM3ilGaD/W1irhd+Qqs4pl0Y6HW7Kndq/lPXNP06oRLE4vMH+R4w/bNgiWUl6T1r+pqBWknnRTIOeBteA7PpQPtoT2Cy5oVsOghaQrbMBHTRI4Hhon7gvTlbd/pn9bTZ8zbqwy813bZ3o6wQzxrblF52C09uWXGyV1B45ysI5x+014eut9AENJn+4IhuQHsd7IWRs0XV5mika3foAEYtv1f6NODREqa3BhYiKLP1QwBuc8RWKZ2MpCaKUWSBD8Lkud6BCyFTFze9Fjjh4weJOunAD4WGZQFCGbjcFaWyYbWkUZxuq3mOllZkJV5Vmr6w/ZVgbyLq92uE672WcLiMMNntsODUEjhD56cVzKksxKF7rJjpNwpX0H5AGy65YiaIgfYR3nirJPDG6kC5YFwUmoLVIsgsd6K2iGAJFeGznAdFrFy2qiVSKGGKNJ8kAZJqCfUhiuU5sEP/s1A41Vd1fDHErGhf8LoHOTN2ORvrx9U= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b466ec34-3f1a-47be-259a-08dc3f65061a X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:50.7180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZIKsfjLHfjaMWxS+gt6rziv85MhlLMo1PhDoi/WAvGXIA90vAONJ3wqzfIjJHA+av46GrterJBXiXGeI0rNyDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-ORIG-GUID: C7-OSEhjETJ73KhUHT2GPSJVl5tjS1p1 X-Proofpoint-GUID: C7-OSEhjETJ73KhUHT2GPSJVl5tjS1p1 Use standard template for scsi_host_template structure to reduce duplication. Reviewed-by: Jason Yan Signed-off-by: John Garry --- drivers/scsi/aic94xx/aic94xx_init.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 8a3340d8d7ad..53fe68124ff4 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -24,6 +24,7 @@ /* The format is "version.release.patchlevel" */ #define ASD_DRIVER_VERSION "1.0.3" +#define DRV_NAME "aic94xx" static int use_msi = 0; module_param_named(use_msi, use_msi, int, S_IRUGO); @@ -36,29 +37,11 @@ static int asd_scan_finished(struct Scsi_Host *, unsigned long); static void asd_scan_start(struct Scsi_Host *); static const struct scsi_host_template aic94xx_sht = { - .module = THIS_MODULE, - /* .name is initialized */ - .name = "aic94xx", - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + LIBSAS_SHT_BASE .scan_finished = asd_scan_finished, .scan_start = asd_scan_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, .can_queue = 1, - .this_id = -1, .sg_tablesize = SG_ALL, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, - .slave_alloc = sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .track_queue_depth = 1, }; From patchwork Fri Mar 8 11:43:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779612 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 1B1835644D; Fri, 8 Mar 2024 11:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898265; cv=fail; b=TWJj0j/jQseY2utmjwwNV2BquLGJ1ScCJcTgHC+1VeBFPOvYEsOW2Bbj/RdkR3MzRDbZFQ3UExeKS81R0LLbTaTotS3NIOiZNnGqqo2WgPaeTk3GV9P7XCt0PEKhu8uuu4u3NNXYnlJdw7C7WlON/ASJN1omL1sjPRkksC/UW+8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898265; c=relaxed/simple; bh=E/dcPLu6Lz3El0S8QZ/uNzCIBRsJxjHj+Xbbvi86x/E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=A6dQewc7wC2Xe7D+akPyGuBS48+ZHrWpwGA/ZUTwVKsOL472Qiayw/jNCUB89zsXAn8kWe/A3+mEwJsK9v8eKFpJlVowUVAnGBFa1nNWqQ0gwOcgnMRdsKRkNeycWWcaliRABl5N9oXMj4mSk2uNK7h626ZFm/bvJV0hSNFDpmg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=QJwNPjmW; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=hKudWT3l; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="QJwNPjmW"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="hKudWT3l" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Ai3R0013363; Fri, 8 Mar 2024 11:44:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=gEMF2c8+1quWP4bKrF9MGgTKynTT0l3MT+qkfrZl60A=; b=QJwNPjmWXLDgc+aZoBzm7crXw0cLjs/pJlRFSwgdQJwOP4nCK2XR599BFIzLNBI+Y+LS bQ5wUuZoVnKHfC068oA7rb6djCjKYr4FRhDkocUxC0Y0i7xxo2LH2pQXhndJWXsK0j1l JP7dRqL+uV/0Df0MTe2pQCcBV74ed3pRyKH2VnJIjHMFRqgaiLo33t1dkXyw3dLWGWlY ZuflQdmUXKJVG+I7JwE4aabfcmGrtcd4nXvbcFHEtJuHxVj3yWSMoTGCn3qb9pGXtJNJ jzBPoAo+xDJll9xnoI4OzMgmTLuHVfk9Ey0w1dmf98nvAZjqk9aZVcZYNTs8Q9oPgUXp LA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkuqvpk88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:44:03 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428AveFi015993; Fri, 8 Mar 2024 11:43:55 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktjcpmv3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IaTwgou4By6A7BCpdrDfELu6ZWkF1Au8xfp/D42VRi7CQ3xPjmDUFhKoo3fHaK7GgbowrfZKP0tr7b6KsbfMhpM0rHS34UzI9zEyv8MTEdLvm14m20eaYg7irHI2nl6Fbx7rfN8EuLEV1Br+fGMpikj9gel65OpDR91gKG/i7uUuZQ4LLJVvIVd9aouq4MVrd33nsQ5V+9VWxzy9bHNofk7KMv/mEk/dxyjVg8OSPuDCEyiaP7iY+05uxfIJIqixflUgL9pXgOz1X5Zac9tTpCglVS8xkynkOhCgjHIMzE13uwr/AurbPfE7YVcIVewNCRfwVo21jss1eF5/y/55tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gEMF2c8+1quWP4bKrF9MGgTKynTT0l3MT+qkfrZl60A=; b=eJ49/VAw8F0zxLJ157zE2zQAfXx7yEvPCJbPp1Ee9omxv9QAnipUCH24sylfYGZ4kZzjnwPNZgYkYBZssSnhvzR6g6DFBPEa5ruLXdp6HQueE/SyJmeJbZVo4XzfaQ/yVVURxyR3OqR2JloL3DVIFA02yBsxwgqm85sts0Paq5gdsjNjjcg3BR9rIjfXWBseBwYDxnV2BAA9jNPOI1/ihxjn+rN3PmEDV4SqfE+YkETiBSGTYjKCCBvreQwpAofP+P/ZiV59UNtDUhUK2zmZSnJE6tJcT+wkhLwfnt9WUg7rpstzXzCqvUg9kzGJ1GDBLy0vgl5mvP2jlJstcqigKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gEMF2c8+1quWP4bKrF9MGgTKynTT0l3MT+qkfrZl60A=; b=hKudWT3lKgsA3et74lHWAnCjfbO4RUuD16xlZXS2735FQ877rKIsqr9wsPYHeEvzCNZcXkyiNxsEp1W0FxZEzUciZE1Z/8iyy4aj1UFlqIh4bbD8+JxgysoJM9rm+JVMW3zH5jyxIGA0CILsRewLWxwA0qYvNBGO4GR23POBe4A= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:53 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:53 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 5/6] scsi: mvsas: Use LIBSAS_SHT_BASE Date: Fri, 8 Mar 2024 11:43:38 +0000 Message-Id: <20240308114339.1340549-6-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: SJ0PR03CA0140.namprd03.prod.outlook.com (2603:10b6:a03:33c::25) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: 570687db-77cb-415c-7c02-08dc3f650785 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tVEN5I2ZL0pM1bjKQw/YOeFOKmYUD4eQ43A4ptoHyhqYP96ZStim/ro7HULFcyIxJhhPF3SwGhQfqlw+JCEqIbXL5dF+pE8qOHWOuNcwr7BdDkVErgfKAKv157b57/cKPvudCyMxwZO5aRsduHZ5aCZYWDVU3rDZMvN3/RK0daxA6CG7h+0H5uvQM+fktrPOUdaIdLYzYTjis45gTBNI/EvoLGM6iBTRt905MP/9fgxT0D7Ok7ngTO9E+VHFQTSLLHJIpefpm9cFT9uPsOplzOmOm5BdNTWtXmO4odUZRve8W91ZCZTRiIPXPWRPCwVb0cZi0aZv5VCKFwH7Ail9y/lJhXBJVAbO9Di70QXOZDmPSG4+4L9qCeEyEedadQzBPw46lmFsxYTpsdJGUCOEFzMi933N4SkzTuShB9m33eGo4qOaiXfE1ZNzU+2jQH/cV5vaK+P2mewCagY3+8WVwXXLkLpuLsv+ro95EJTm8yfRQ+MbW/TT/tQnbb20tizOyMkKP7tpdkp8u06UNFjTUcFHFK/fmTHn1OpLRbSdRq9IqqBomSyH+XApd6+BjWoq47K7+nPzU5dyAlVf8ZGD6LchagvUqcXgwYISiknggRRdOlt+gaM16hYv5dZtAQhqazP1tx2Sa1tpBqqMRY4Jdwin5cOL3AfH+GIZ4Ij4jWw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QA1T3kjoyUyrUqCKpP4Y2iXY8PnPFFFfbtphTu5QFjIaNR8E/guudLc+CRM5X+G2qSeR4pWo6D9xuqqwf722/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vbSSF319IeYVjx1q5ItpfyamO3Vqgw0UjgXIISRXr/3q+KU30USAkxUSk8RWxn7dXqav54ZO5rgagTGmeGMuLvi4aa8MZVUUW+NINO7p5k1RKPiaO6DmSNMAk7/P1xaNhwpY5mhHyHnDr9+ls9Lym+CO0Yq3iGHixN8XqotmPXaguHlcoKJq/Fr5G7odv1P9ObYxRK3qC0GG8nSh1dX/3wHGNE7OScKoF1XdMARuIEgCre5f/fV30k00vUOBu237g9LVgNGsr96+103h5GDH3S5mCxfWui77fdOwZVYz9+4wDS4WNqy6uA62H/7xpm9jMGGHlewrgX95m6MGFTQZ3Qxb/IVH3j4adRjIAS+kxQ9ItoSJLZjijDsLwk9QgXoSj2PhO9zkE87c7UwV0RJDB4/E5SphLp2GReD6weKtGFitq6+4YMlq6jtpWLP9+BUeQM6Tc7ZA4A== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 2h4Pu5eRvPlWum8mgWwENmVNhjPppwm6Rvl6w81XGdhlNRE4jAujKVnuDcie2eqZwG6kVH8PwOm4mqA3JY6715kytdqrRzgRUoND36NpTRkWJqk8sj6COri8WOAgEJbgITVl7ozXbyefAnYUWh/l9GAJviedhndlvaIou+sKpNWTWTM1xMUzTxv4XJOTMwSLOnTstBiLWQrwC1pm+atTZauE6KKcpO++9K3CLqmow7/rlKmSbc+BjznzwUxiyrF35QTdFso+cOtKNZmW34j3UbwdCETcBgipA4EYXOZG4u3FRHxqphZ3Wi3W6cCddyiMY4rC46+aW+5DIxFg2a/gaeNzOcBNTKue6PNM2RPdu09gJFkEfYfNIjSibY/oqkqhsE0V6YHVhnJqNwZcLbfQ1miyoSUtJytgzyGEkfVi22NU28W5p9GbLOa8i6Vx11WhNy6hwLL/1ADSB1t5RFMT3JuQftSeLdYIzpxg6Ef4giSwnLkVK8ljOaV1ubcsivqejVPkUICA0MWs64RPFI19wFw5lgOSW4EU889uXJLbKeo/OJkMvLscSa+dCM7zz9o8GHPzxXaeHjIu9AgrshdBaaxA1CTU6Ydd4hSf1FKv4AU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 570687db-77cb-415c-7c02-08dc3f650785 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:53.1301 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SniJ6dP2u0sMEjCPMUEPc9oSveRORA9RANjRnoLHyo6SbeBUVXvVgCfcBVsk1vryDhNgKWA1iUfqRa6mwC3CeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-GUID: FEL7vWrqnaMGiEZ2F8HXmcW0dHJoDQkn X-Proofpoint-ORIG-GUID: FEL7vWrqnaMGiEZ2F8HXmcW0dHJoDQkn Use standard template for scsi_host_template structure to reduce duplication. Signed-off-by: John Garry --- drivers/scsi/mvsas/mv_init.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 43ebb331e216..fb81d267c9cc 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -30,28 +30,11 @@ static const struct attribute_group *mvst_host_groups[]; #define SOC_SAS_NUM 2 static const struct scsi_host_template mvs_sht = { - .module = THIS_MODULE, - .name = DRV_NAME, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + LIBSAS_SHT_BASE .scan_finished = mvs_scan_finished, .scan_start = mvs_scan_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, .can_queue = 1, - .this_id = -1, .sg_tablesize = SG_ALL, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, - .slave_alloc = sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif .shost_groups = mvst_host_groups, .track_queue_depth = 1, }; From patchwork Fri Mar 8 11:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 779090 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (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 C185356442; Fri, 8 Mar 2024 11:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898264; cv=fail; b=sJIEsIcxp4zgvYnIvbOmM5qz+UJPDFOhkvnxnawDslPRuKv65aW5PKlYRHaUy7UUMfVp3x07pV6BqyIfNV1BS0RPTF+oAAYx3BR5YhLJv6J266JXzc4IkBGl2uYv/ljhsqhVNc8T6dM1NXWnlhV+c2C8qYW6pHhA8ZxZbV2J5fA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709898264; c=relaxed/simple; bh=WEuX3G6Q7SZ0wTZ/H1aIEtoTOkypLrcVpQSPC5KGi4I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JO3HtdV39WORy3NtCkw2AISJxkqENUli2pmLBfet13ZNXfa51kyHHbNt4B9H2M0nfNi5WMOAr5qlmgnQ6j+cVJdXwPAIOL/bLyo1i7wdDzYmeLS5h1KUB5EpdusNSrNHC7bNlQmFoLHO1CdJP9RmKjcYv6IzuMG52r8SF5Zy8YQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=TctdH88h; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=BGV5ilLv; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="TctdH88h"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="BGV5ilLv" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428Ahwlw024721; Fri, 8 Mar 2024 11:44:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=nalAt+iOZg8YqD/EUsSHMvarV6FbLHNdn+AsfYlLl+E=; b=TctdH88h3lYhNJFgCRv1QH9zE/J5x84UtHJFv9V6BuBuWCvfhxQr5Qc+5Tsqdal6sBVe vE1lN13XaiIWN1mTR6b+Qpo5OaAZ/+hCR1Otg+u7zJto1Ea4vJzAskaE1SR7VS5qVn+G 86r7PnK1FBT5R+0YajGONBWGBLoiOkXyOnkhg9XAR4hGaVsPELoakY24VZz5qwMOCSr6 KSzr3Bki1vUG/4NUIBXh+87E6zKdpJfJsUv5xbeXJ5yECCrjBT5mzoUGZV8TcuD0E9Mg dP9aJ4F4W+dHF2jj8Wn/1ai8xu92tiz4Lsh20OiVmk6BXoPZzPYzg3fadZTFfhlaHwfl 6g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkv5dpvus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:44:00 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 428BQQou032047; Fri, 8 Mar 2024 11:43:57 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktjcn4ws-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Mar 2024 11:43:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nZMJXRvuj3LqtuAi1CGvqilQcw9E2JepzLhd+XT9GhAlYBOft9ZNGQIXrIlyckDHC+msjOu9wJG6my7BTnfcG+tOwUQt2gvbC901L6k3tBfz7dKuoUMQJ3ixHHW1H9V2dilaFN+QLP4C5vPgRcpZSjUuIj6tLSmZTfTku0KAYR39loIqttEwuI5w/wX6lVyaxAOP3W72l1TUcQjHSsi3kqD5MZmfKVE4omjqmpYOKc1V/cmg1+ZBeoer1hEJwFKJ3vpMv9O0+lGKhNzPVog3h/LDnH819HX+Sh+JDgbopa9GCEs7rsCY99lspo3j26V6p47D0S81IBgFDWNJfwEpAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nalAt+iOZg8YqD/EUsSHMvarV6FbLHNdn+AsfYlLl+E=; b=nvOiJK6Elo7ivvLTCfp1WuM+y3TxFs8jbFXw4+vL7z6f9L5SEycLgGuJ08YlELwWBG0wBf+HRiUea0mlHNLBIiT+9qoCIwe8p3worf89G+HEzTlmk4l84bxadrcvJWVm0cMiMoz77JQbYSyW4rh1X8dx8LnhfnPQiz8zuKlO5lhqpjoUVajZpViWA3PtdAIgR3LL5ggF/pJnlRFaKoS2W3+sn9CSFnqphIo8PB6+gTjczY1c9lFkPzgAY25SEnQCb4zBp25CN6kju2K0Bmn3DUjYBy/BzGCKXW+VTC9xXIPAtul0AQVE81BM1iFkZvfzV5m+bP+dIVs/Hrw8q5TIgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nalAt+iOZg8YqD/EUsSHMvarV6FbLHNdn+AsfYlLl+E=; b=BGV5ilLvgCsYMvkplxTifFWcRLXZu6FPPCg/EnVEMuc2+KWE2JKLbjP9DKIC+pF85BsGG561OdWRA99xqyP6gXQ3qknX1e184UfGQbB9Rswtn+GP600KavgMCyxOSo1zuUHAxLKgMyII9/zAuukWCJYIA4+kvdY6G0/x5911naI= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CO1PR10MB4595.namprd10.prod.outlook.com (2603:10b6:303:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27; Fri, 8 Mar 2024 11:43:55 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ae68:7d51:133f:324%4]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 11:43:55 +0000 From: John Garry To: jejb@linux.ibm.com, martin.petersen@oracle.com, chenxiang66@hisilicon.com, jinpu.wang@cloud.ionos.com, artur.paszkiewicz@intel.com, yanaijie@huawei.com, dlemoal@kernel.org, ipylypiv@google.com, cassel@kernel.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH v2 6/6] scsi: isci: Use LIBSAS_SHT_BASE Date: Fri, 8 Mar 2024 11:43:39 +0000 Message-Id: <20240308114339.1340549-7-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240308114339.1340549-1-john.g.garry@oracle.com> References: <20240308114339.1340549-1-john.g.garry@oracle.com> X-ClientProxiedBy: SJ0PR03CA0148.namprd03.prod.outlook.com (2603:10b6:a03:33c::33) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CO1PR10MB4595:EE_ X-MS-Office365-Filtering-Correlation-Id: d3202a63-7079-45d1-03bd-08dc3f6508cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2PPLyAhkjEzb43MGhprYWz+L3XLmNS2Pi6RaiX/x72GL5+uC3TPssriTqAsOeyuGpHola+SeVhWA/XK3jId8BWDsLjsnuee/C7tL00w4yTIc94eHQ84jb/TasJK2kYC4iwNh0geaPxmKUpnC7yKxTDtpcXIYr78qoQS8XGaxMorBS25Vln4eQkbevPFZZ7ugj76BsrvSB85NbHsFF5DBPtjlmNLZje2GgKGN47M9kg87YnJzXiuAzLi5fXx0ebZx7fHbdajTHLkezyXLECFpODKYhNeBx2Fp+OBe5zMgub4joWE2DZ84uH/jZwys+0peDmgoUZSDniCzcWx8IXLC6/oA/AtHAZ9vvXzwPXT57QZbY0e24C2F448Qow4XmK4dwKFI8Se61dAOCizbNxmNCNzwIdu5WfLK42DTyYQz6NeA4XOraPeNp0FB3HAiWfjBWOgR9KXWhmYk87HideFeyEmo080QPCBy0b3etZ0zrjHBWEFiI89ENFkLpWXJloRhk75Cq2s3XWTAxIHQ5kbiroIkFsMoBCYOGFtuJWiMdX5hc+pJSBqZIfNXQ0TapIOL0weGW1nbQAPh9/xJLiDDqclHFGXPWy4LoEvJCPhezTarz+8kApPHPkGvd0aBLVxGnCBXDXB4ySrAYyJSUk4nrlJe7KBQXsWp0V8rXvM7WY0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB4313.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(7416005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xlpFVeaKd+RdVMn0cmeVFakO1byN6yyqoxdPQeyLv6H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KL52zgd0odNmaVZ83WLaXp5LSrqj7HyI1EO5FuveBFYo1OlSuENYts+LCgGM9m0cLd6U/8Kq1mLk9Jh1at9Czt+5kWmW6NkeRANpo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3202a63-7079-45d1-03bd-08dc3f6508cc X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 11:43:55.3010 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ATRE7VpzRe3YkzLyIvzr+kTNivCAQ/Z0B4z+98nBa2vUNfLHwj/57vqtEclwX07RYMglLm8hlGUtj8LpW0DzwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4595 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403080093 X-Proofpoint-GUID: KffMArZCtfR59nnBusG7-myQm3HRctmC X-Proofpoint-ORIG-GUID: KffMArZCtfR59nnBusG7-myQm3HRctmC Use standard template for scsi_host_template structure to reduce duplication. Reviewed-by: Jason Yan Signed-off-by: John Garry Reviewed-by: Igor Pylypiv --- drivers/scsi/isci/init.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index c582a3932cea..2b29e8505987 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -150,31 +150,12 @@ static struct attribute *isci_host_attrs[] = { ATTRIBUTE_GROUPS(isci_host); static const struct scsi_host_template isci_sht = { - - .module = THIS_MODULE, - .name = DRV_NAME, - .proc_name = DRV_NAME, - .queuecommand = sas_queuecommand, - .dma_need_drain = ata_scsi_dma_need_drain, - .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + LIBSAS_SHT_BASE .scan_finished = isci_host_scan_finished, .scan_start = isci_host_start, - .change_queue_depth = sas_change_queue_depth, - .bios_param = sas_bios_param, .can_queue = ISCI_CAN_QUEUE_VAL, - .this_id = -1, .sg_tablesize = SG_ALL, - .max_sectors = SCSI_DEFAULT_MAX_SECTORS, - .eh_abort_handler = sas_eh_abort_handler, - .eh_device_reset_handler = sas_eh_device_reset_handler, - .eh_target_reset_handler = sas_eh_target_reset_handler, - .slave_alloc = sas_slave_alloc, - .target_destroy = sas_target_destroy, - .ioctl = sas_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sas_ioctl, -#endif + .eh_abort_handler = sas_eh_abort_handler, .shost_groups = isci_host_groups, .track_queue_depth = 1, };