From patchwork Tue Mar 5 12:24:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582346 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 0E83159B5E; Tue, 5 Mar 2024 12:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641528; cv=fail; b=h+zpnEiRe1o/tHaOzOpiexmrKl4LptL+Q7WNbLZHArAdG4GCu7+be3IsM/HGHupPV/hlX5uMXJ+VG1FogKRIiKfnqhCgHH33mAxskIFt0Uz01xdmWUmHwvWOxBM9P7Sq3E9oqNWS6riQ/heSYWFwn+TjVweUktBvdZxt8mTqoQs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641528; c=relaxed/simple; bh=7iIdsSOoZMxpUtexm/xuAq+gnfuh642xxnlJHB+o4FY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=J+XiQVCU9VPfOc/fNkF4Tih5do77Y+8I3QIcImZ5VQTJFcWpQet1CQJunAUzzt7DegPKhZ2TJI074TUrwx3uDjOdMujmfv/XpxXrg3O7ZHeNwrS1pp1v6IyotgyHaBgmTSkvKG9ae7+PdjUNK5ufLLugi2MZ15jUzqicAN6ZVgQ= 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=nf/DmSCL; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=gCL/VjHU; arc=fail smtp.client-ip=205.220.165.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="nf/DmSCL"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="gCL/VjHU" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4259jUx0013901; Tue, 5 Mar 2024 12:25:11 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=1V/+6TbOsqTR44lrvZ2byboEZcSMkQx4E88WgOPQ1kQ=; b=nf/DmSCLGhSd+If9+Wtz1RBPZP0ijb9IhGbY1EOeWEFnBWjGr3HcFdY/kb6WZ+DWyD7u gSrCaaTIQokDeYVa0w6TtMyyP4S+FJA0mJuKCHpJht+e1UABqeu50joe5J2kEujkf3ap MJZ+QC2T7DMtiN9u2gHjoihkQKrA1u2PD3X/6DLzqOQIJ/KJ9ZERzNruAQxsjveKbKIz 4501q2PVYTRMfqvqlD7IfKarj6j7RzgGQFey/vbL8k6sMo3I/BNTvrzUoHfmBMidknVm IlX4bpPfYP/YHoqlgqIa2ozhVNsTIQ5F7Rr6FsintF1yl6vdkapQle9uERjKW53t+oi6 LA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkvnux2j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:11 +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 425BWTxM031969; Tue, 5 Mar 2024 12:25:10 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7r6vu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MkXhT4OM0orfCFrSqxnvaijnUH7GbO63J9b8eqvKtZammrIIHtDvBgsol0kuREvEUUnigm2LAYp8OgMFcTsg61LibRONkMlwvFhq3xvJxRURsw8ssE0N38GfGGmfq5utAdegHpZ95aVCZBBmNjkqUJH82smjpke5qIAU/8m7CPnVhu4c0xmFwxn5BC4iHnEo8NCRNWq4u1RZubFZX4a4ga/1Vv41alN+I9zzqVxCL1+E3iEve1VTbhGqvHy3sxSXWsL8su7xlq4x1gXZM1cJpgvbTq3u2wQev8LksKgcsr99eZWXsGybBH0+dUBBznF+6d0aIiOOO9mJB3Que3zEsQ== 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=1V/+6TbOsqTR44lrvZ2byboEZcSMkQx4E88WgOPQ1kQ=; b=JZeHolWjvJAX5eZoVESVxj1OmDM61dY+FfyqBjVuf7zaZqKK5iae4QosgLoIBV7HaeHGkphV4AKyZ/iLNfE9VX9/yJYdYasfe0syDsZ4Ry9vXQvkSfNw3pvomgxdEGXOGhvJ+OuQBRvZd58xZILWonjwvszE03i5Mkgs/A8SRA0QoSleU0e4tOa4pIY7xryBk2jDUVve9wGPV/9GPBSWpqxWlpAHVc8F2HuOpj0A9T+MkXljQJMHlUikyXSAUrtznIa/TP7aTOs85cxgjcn1tPDN9etG/BKlBnvi7iGhDBE547mnhBBRW8RLxJU54NeagMe/qkjFWG1pkb1Q9XSm8w== 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=1V/+6TbOsqTR44lrvZ2byboEZcSMkQx4E88WgOPQ1kQ=; b=gCL/VjHU84ckG77MyDszPZVGx2GDocr+ZdnFtugduDAVUfpYm/96x9Bn9bKuzZ5EWjRPwudiCHnbhu90j/kYSDNF9wFLJOU+h1ZjZQ6IGPQfIIPVn7HV1TF1cGII5eAsAMilEtBWNTcMWvXTbY3/ekSg0cqdCe1z1HYRMoiaIq0= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by BLAPR10MB5122.namprd10.prod.outlook.com (2603:10b6:208:328::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Tue, 5 Mar 2024 12:25:08 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:08 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 1/6] scsi: libsas: Add LIBSAS_SHT_BASE Date: Tue, 5 Mar 2024 12:24:47 +0000 Message-Id: <20240305122452.340471-2-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO4P123CA0010.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::15) 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_|BLAPR10MB5122:EE_ X-MS-Office365-Filtering-Correlation-Id: 68ca406c-4705-4b18-9bf8-08dc3d0f4b99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dnjHGOdd8SrLKBZT3OztSZkExWcOvs5jMfZK/fecFd/Ba08nGPwTG8ooIkBc9ZXLNpWSAdhSuTTfBfGD0sYT/EAn45Ojm/jejz45nsceqX2cXIbGzpq3/rc+T/FWN91FmOn7pi7FDlml5m9mgeQhQiHL7aJ0QEeHamKM/zXTp54NIzOB2U5+XcHxwh2HnvBqqSO4R2F7vSYzMc17MlyOifjECZ3zY8rQOaXvVUbIbTlFCJ1RTyOzl8kUV+j6pbbDgGYgcowcxq+X+JQ6xWcugeUNohCQMgICZTNuScRAkIuiP0l3OJvwlblpPzG4yBtyEG+788GzGmOIIqrcvM48YbUdjvY5rNyhkHFhC48RWdpF22F1k+LrhMzCrGegJAHAZOyk6wkZF+8m86mzA3iTggGkF86OPSUvWuVxMXcnG+oRfkDRmxsHnU/BSu3iJUoCSVR7usr35Y5168yrdpXg+z1c7gmrK/3ocxLS9B9jhia1O6psmKHZon+/GOXLji1QpPvlOPIR8+ON2zwoNIep4luWn9tif9xX7yVNdAWLsRRKDbFg35Jo5P2mC8kPknISCSwkWSauzk9xql+VZaypSBGT1zbwGezQBJmxXWdILnElLMUrS2IQ36tkQk9yF8MwNmejVgz80JJMzy2kOZIFPj8dDzgXp6hTn26T5RcWf5I= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SkkvqHkn2nvWg0YMDEI8kxY/EZLmLeWYk8pJdR621r4D8Nf9ACixTCbeDban+MvmjQoD475bT+97gttd6C3wg5V0pmBOJZjKlpoynGh11jMqwijYm1MHmkpbxisaE8e+3mx7+hdOaB3nvnDsOKXuICzY9X028x4lYLXpn4zVWTaUQyupEIBv2APkgvTdRIVbLP9hkLSvzh4/Na3kR4jlgz5kjY4MgIoekfYr3v3oyqk/pGZeOh/lKcdtrs+tXGoJbd5s9g2ETU42Gptw0nVsDjiYf44Sn2NwZqCkUBqmWjO3Za0DCGLd8GkFjfMbUtZbGoX8xxsvbUjImcVK5FViABaafQNz+MnpE6uonP+qDl9qHVUWKbliYge0Tr0RWINMQObYpCrqcysLf7hNxjLRMESVYIAWPuyVy3Du/pJzOxhlduM69+fiE5Nt/PmmYqX3nZeq5mxzfxLCC5iYH0raf/n9W1kiHTZO42Q2Akq+zQovSN0c7WDFpAtIa35cz5oamFNXuzL0C1A2GUMVvtJtKWcBaK1NpMrlQY5aSyr2/F8VhVdruZvElVBXoz+9mSDn6Khi4WV2vZIMBV39lodkpBG8fXRLQTm679LYFm+Tjsy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-ExternalHop-MessageData-0: weeV+c61wLWxqyD2XIFLFQCwyyDdab0QQVCLHWWF+S/jYkVUIjSzyRc9IIijrQZ7/P2dAXT+DFQDkzSszMHITdIHy0rWz9FqIKt+sW4uDvyzpX1R95jXa4F/cWWXJXXskAMJ66V8xmNv0d3T7oHGhidixltXFMCt1xAMFz0WWIj50a8RxvBVK0rpslHR4gmQDx0YISC/ygf0Az7q+ej3Mcg/FXEvpa9Kpi1FIjIcdAGhfdpd7+Mk5dpIO05higQBlV5OrAKQLhH76eaR8AAQreCps4ftp7ZiHYOjb7UI1TVJDrnkz/k81+2k3MnbT6hKkdXGgMCBcWNSejGpeeP6KbfXp5uL7A62fSy01FEb1O0nLmojStDlSdYHHooVi0Lx4w/X9FYtnnrDM9eYXzEenvsCIqXpXnsVVQ8+QNiXoCj6wncJsyN4UZfCBJQA6L9/kqudxswN7CiZUgcGFhr8vS5pg2PHtO+XbTnpWjfGv3Ya3QS32niGuhMVT6ubSup11+vUb/6/FpBfUD4tIGlugHjCgENErOIVlS64xTUrCPW6Vp8lKOXx2zpbxiE5eSWotNFPYPig8bp8JtpmvsTTLHGzOsXxNHIMzRiI/70ulAg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68ca406c-4705-4b18-9bf8-08dc3d0f4b99 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:08.4070 (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: UZMSLIfHtpDFk9735VlzKPt1Mk62/imdqf/lUCnqScc4Lj4P4kXKBap3sTW6bAXjr/pjR5JBPK3lt8N/FCSLhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5122 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-05_10,2024-03-05_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-2403050099 X-Proofpoint-ORIG-GUID: 9aH9hmdqXJ9JbuOHDPzLvyzAFVCnN9eU X-Proofpoint-GUID: 9aH9hmdqXJ9JbuOHDPzLvyzAFVCnN9eU 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. Signed-off-by: John Garry Reviewed-by: Jason Yan --- include/scsi/libsas.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index f5257103fdb6..484cab72e711 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -726,4 +726,34 @@ 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_abort_handler = sas_eh_abort_handler, \ + .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 Tue Mar 5 12:24:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582348 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 C3BCB5A4C8; Tue, 5 Mar 2024 12:25:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641529; cv=fail; b=srJEaXmoUTbFaFC/jyDwp13gpnWEcQVbwIuSteZsJlAFlOdaLjodC3ODYib8Ex3R0wG/oqXmsVEkyIF2h98oCOxQbcNjlEV9OyJkdWIGIkYhmRHVjb1hiZvKPjg00iJY2sMfXNQjuzG8xgWZJD4Rvu/NrUcacAJDUpQGyOrfIdk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641529; c=relaxed/simple; bh=vNqd+bjMiJ2WCkNE9isBfRItPa9mZecsN4F5gRWVu48=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uTJmrBaNZgZVYWKL+YCtDtl80jra+eFTjgUsz6GQkfIriFMCl0W7EBTRspXYRvb/4lY1WA2l0XYriYmop8V29GLsTCBs0rAIlGXWF2vzRlD/+0kyBUftcgKCJgMb0fVKN6FJi0lurNb1lCkhMlsdOC7kuKx2j4lhYUAmPNbLoGI= 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=DrMR8nCr; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=r3WUYiA4; arc=fail smtp.client-ip=205.220.165.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="DrMR8nCr"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="r3WUYiA4" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4259jRxp024627; Tue, 5 Mar 2024 12:25:14 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=l8RU4Na8lBBWN8JNbUugbRRKD7vvJG9EfLByvE/hrGc=; b=DrMR8nCr3m0oapr4IQg75SCHkd8rrGV5joWME3RvkUFjQtx1vL+Ccz/yGUPrmYW9fuQF i+y4a9YuImAYp/flGuv7N61G99ph3XNcgLBVXwNp8fRRui4uG2kaRAXCMVFgWOHMzF/F lrrhcns8UF0U7aCRrKibXaXXnBFoKd+zOAdFeHzuOOAl4YJ2pV/XlH2luCKpEteYlHe2 g/O0Yuq0oXeDqxwjRF5iZwv4Lbe2+c52ozxCUFi4bKQqusJBMAbr5bedIIkh5tsz00ua lmJ8Qa+ImXaOY63S8AWoawMEKvAXKhnLKUDwCkvz03c4wLNOHcRz004s2aon3JZFHLZO EA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wku1ce40c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:14 +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 425BWS7s031907; Tue, 5 Mar 2024 12:25:13 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7r6yq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kfzAj4dFuA9yBumWtfRnnkYqOFwQU7IaZpuo49R2LCZpAi6PYq+rrPT9TNvo68DrXF5ZI7JLIjb9DM1knDsy4ue7y3vP/30N4kNfGE0h3s7wQlfpBCkbtCbxEzlC6lBD1Sq+QZKuMmj/3dQ+SacHJLYVu4EkVLptEisHb3/teqd2LaVLvxeRmzAWwTvyicvlA5aBlLdhHEz6f+fs+5uBKEqAHL8/fOPts4EUlLd03gVEdvl6bjuX23bdT3sbJwIjK7P/1P/l0Bn1bDEsUD+LYih5uD8+x4zKBYvSc7VKHSUUs12EFHEuR5Vn3GMqUXUKQR3jZWrfzW0GAjK7r3VyRg== 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=l8RU4Na8lBBWN8JNbUugbRRKD7vvJG9EfLByvE/hrGc=; b=dU1N/oCMOeZgULkaYujEy5BSsaP4xsmEvRlickXgvnaZ6qGGe0SN1IsPwapRzSzKflVlU5bGC+GPit8BhMfUFQGRicYb/aD3McJNuOMbxmLwarafn4Ua8CBZ2extEo2xMMwTtsaHuJYCmcUNh/a3s/ZvMbN02B86crOBFwqNek7gLKHDFzZIJsmcaRL56BVu/Dp5bNDroCbAcJ9vr7HQ7XF+8HUqA7FD1+Trq0B7xfdnjdjeeK0i1ZWOfklFcBYIlm2popwN676Twv9iUfJJ8pv8/TwwuPh/wlimc/LtuwNOfvKz1hAOwKeEW+4YmA4i5eZjZyUS0s2DAoPXpTkUVQ== 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=l8RU4Na8lBBWN8JNbUugbRRKD7vvJG9EfLByvE/hrGc=; b=r3WUYiA4r3o/zqU0M3SEWxCGQMBGNn83INYopwBDYd4lI9gNstDrsjbxsdC5DKC+YjeONkaK2TFrzBDtSqWzD0fM5rzm3Ju9lCBlOQQYz9sssGAC1JCmnRwGXYwboPmbDol7jrVLJIiB1pYS7HxKaJqY/ek5DJBfU7uPx8zeTzg= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by BLAPR10MB5122.namprd10.prod.outlook.com (2603:10b6:208:328::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Tue, 5 Mar 2024 12:25:11 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:11 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 2/6] scsi: pm8001: Use LIBSAS_SHT_BASE Date: Tue, 5 Mar 2024 12:24:48 +0000 Message-Id: <20240305122452.340471-3-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO2P265CA0500.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::7) 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_|BLAPR10MB5122:EE_ X-MS-Office365-Filtering-Correlation-Id: 882b2c1f-b2e4-4c23-5b3a-08dc3d0f4d72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yv/4DScXgK+tLdnATnROPlkDaDnSJ3ALoHB/Xe0Rj0uWh0ZdyQ1iwbS+Q8Ev23u2z8nAwQGW0GEuB7nsUoPIYSJN/2h8CbkhRv04sVBo3l4xSFvKYxSBcyCYCH+P0T5hCw1zRYHyd8Eg+1Pb6xOiaxPzjSrVTGXBzBBrkbVUgDpiOBFf53pJJ4awZoQXAROR9CjvVCxA3nbU4eI6xYzOHSaGRw9WaNI2BTmZDLYzTIYOKTClBMbe6rOQApVpgezCwEYPN9I6jqGZYpzn/80S2pp89vfO4iS+ZCCIH8TNCRR2RHN70+PGhOEFVqWlljSc+K+OgCmI2+YpEpo8U7iZPk//ZgCNuzWlLni6Or7skRk6qmngySUYoEOMEG/AnGBcBvNPT57pr1AJYiwqVX+MTPCAykeTQxlotV3H9FO0uR9f31c+jO9xsftiqyuuhknw9QfjF+M3x88s84MjR+SG2fqT29xSdxShTyL0CE+MFI02QAWtmYe+LEu31c9F2hQlhU7kYgn2KsduYdXuOLc6bpW7+79NqETGqi/HYgalYDslqGMiXMiDiYCDiLbHY4R65GNHzYWHvay7hgmcXxcO1bNJQ9SR75M2Jb86sMypAIxpqILiA1Bs/rJYJOR8DYQ9lO543v1sQJA2IHOyp8893sHlr7I0rfZyYovUUYgpD1Y= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mn3Js3irJz/cso4FhPRasDxod7v/07SIfWXBuxKU5YrERHPYJWCgMavuWzX+c6+gWFVAIebLAEm3s35nTJRpcWqh41Eh60zsmsvjf97wxMxkOfVtMUGYb3TzrRIrwyrEmoRsiKR3tubr0Ql+UOUqf+HMBXlB7CvCfaEvcuvxD0u12nn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zgX2gwpv7FE6ViR7jqCfAre+IylLmfvJ1wwG4iPLdAGh0jpnc3lhypMAI5I/NyBaQOI9UJ5FTiu5HDIsazawBt4t7TO2U2O+KrNS7gpCV4SPXm39YqElhg6J+EgEHY/3T9SEmIwym/73d/P61nU0ag+KtM5tePsSHF1UKbkTIN6GUeZf5PiKpq86WSw0sREIZXN1YcJiNFszmzWqq2Osjqrpfnv2TWRdXrnUDqWBzRie/fp79AxBXVRAmZnc/yBFx1XLGULwsUeW/2zLbZzaqC80MdgF+4p4Y3T/uO514e06FcCn/mO382cHgjrIlfnQ+seBoNgX0qtkMdjepSLdK4p5RF/2YO7dcD53fFAyQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: RbGtAoPNS6u/EmhygYBE63XFzbP7mjMSAe30Dd/ht+j+chnOMXmMWZiYEh/jT99lyivGpiow0MRE2zerZ7LJSSFmMr+Z4fTxBqzCFk1SginBAW5dSqK/jMd+5M5wDXQB60HDqNmcRUfyRMabTucrH7ZUnVPKAF2CD7/9ulKXA5JKzR+y1+dzEv3rVPuxL06hnuXKSp+osePHrMqqxpz7caMn23gIzsfQEU7D5pkgIA0nu/cactOTP1jwgtJL5lUTgzhiIpF0EUIgQfXeVGIZ+LbuGigIPV+9+FuHaKIgu4J81rEK+sQhZqkRwgN7HuENekZA9jxRzaDu5h55xayUH6/KFq4t9W9o0Bnbe4U2jn97CpOSdawbDi0uhi82DXYrfoNpjgd4QBZ3Qv39sUu/erw6goiqTj5keT+fj/N9ko0PCr7aKA3aYS0z/b65YnI1GjJ54XAQYH+Qc4MhOYf8etAOWj9gGLGQ4Q/YcNMhRdVEQ8YfgXSfUouw9y23udaYEGVvQIzbbA+wY9CTOg94cLexLkBNnQ0KH4f4yYkVnWHojaXmn8c3EpLlHMwRzGqnAHT1weWns1FV192QHaRkjElfv7zW3kSbiBfFkAdjG7E= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 882b2c1f-b2e4-4c23-5b3a-08dc3d0f4d72 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:11.4606 (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: AOjbYALkJrO43inARfIGPd1/z9EnZ0vydyd8aBUNLs3dw8u7BiUbGclEXTZpnC+UfcwxMaCxsUm8mphbsjUhEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5122 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-05_10,2024-03-05_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-2403050099 X-Proofpoint-ORIG-GUID: Uoy858zjlH4yF3Ib7t1Es0VfOpATfg1m X-Proofpoint-GUID: Uoy858zjlH4yF3Ib7t1Es0VfOpATfg1m 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 e6b1108f6117..1e63cb6cd8e3 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, .sdev_groups = pm8001_sdev_groups, .track_queue_depth = 1, From patchwork Tue Mar 5 12:24:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582350 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 784B35BAC2; Tue, 5 Mar 2024 12:25:33 +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=1709641535; cv=fail; b=NLRilvpj0jred4Wczi0a0HPknss8DGhINTJ49bmcn3EiU4IqU7A9j+U2mM8hvzyHULb5EI3IOI4SCu0/IXpwWwGHDLIxciODysj4ZgJ//WMn38SSn1o+gTfTflQ3gkWMkRp2WUtH79n4xJELdGDNa8D9qlqY+LOgddpsmugdX5c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641535; c=relaxed/simple; bh=SvpvN7SqYiuaL8SbKBFdXmDJS0vxFwJu90qkoBf582U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=niRL8xIYdDt5VF0d9F38BnpGTvyj3H/iAYXpm7c1jd41O4lQGUj/qtXv1/Ropyx0xqS8nbGv7jQ5trmJ7yOiOl22aC86zLpGvNOPyeBd2l1vH3lSIyK06tyt5QlZ+ZHl6YcG3qDXcVJVp/MijTBCT5RsMn7lHCAu/xUBKCJrJMg= 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=GA7d0Psy; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=CuWYT4PI; 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="GA7d0Psy"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="CuWYT4PI" 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 4259hoh1008900; Tue, 5 Mar 2024 12:25:18 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=13n9ouR2zm9X33sNFnsZjnNWn1NaVlv/mOpl+rAf6Ew=; b=GA7d0PsyFpBFTLGQP9thN64MOnnIp1Fgt6Mv346bNGkpH3S0he4PmrwC9WIcQ5hyqHzy E7KvS0WnbXDl9muyEpb/YhfhuzOuEr3zlxlOQuR3DrIUYx49w6m9Cg3qkVNMlL9EjASB 2kJouyLM9ZHKjeZEjMoQNpK0irWFDtj3jM2eIv0DUELg2x/Jj0Xya//qT+4Dbi3GC7yK aYF2l/ajkX2KTxZFAIcTtlYUDsoJq4joTjkmRtU2L07+Jv+LZ6E9Ys6nmvuXTXpyq4eE 51vY+CVTWls2p8DPV90rkTes3f1o9tGEIusrONG1XbnjffwNj+yIxZihQq+hYDaCONvG eA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wktw46081-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:17 +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 425BXZnt012375; Tue, 5 Mar 2024 12:25:17 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7frwy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IDq42cqJRnKFskX72n2BQLbS6c+sxXFdh3CCpdhbpcx/wRxghqu7Cb6XE2WILOBMVBwff+q6j+USVQ85Fd6fZb+hDBNC1Yi6zeg1p5EPGfIGekhm0uC9usmWBn3PVpPKpm7q1wjKYWOCx9128I7H9/dudUyRLI1hHCcFU0gJ2bhtPHXrQQHaYXtS78xEXfwfn4UZCYx1d2tYAoVADHyF263yfV/sQXUqs2HMhlN1vvckyWp2pGuVc1mAx7X6FrErZkh54qIvvgYRhHNqur9IE5otqym064I3qw3ZE+RLjSs41x8J2X/IUUnE52AeuUTQQoPMFs362GYnq5Sau9B7xQ== 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=13n9ouR2zm9X33sNFnsZjnNWn1NaVlv/mOpl+rAf6Ew=; b=e7T5+Qxsih9IfCJRr5zqaQFViMfyre+HsNG51T0LjdoqGHP2aYZ1O3njRhL3v22fw2BsDzxTXGei2B27U6CGK2EpXiUD3KCfgWnRWxX4bktkNnwol6A/BIESx6TQ2tqziE7E/vLNvUxDmgB9XbhMFtNuJxcg1eRjSGgxMTxMntpVxEq/s/ryopOZk6O966ARdfjN/H9Ngqdvmd2+1mvkRgPAQ/4UNlyv/75e4bhwJKoZTB3kd2Rey9oyZ61YyqeEWVY7Te2XfPcNfxU7ROL9kDwcHpQZOXt5inkChXD2VWd6nU36/xrn5+0k8sWItiE9Ewz5nM+XonvfMTgVbDdDGg== 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=13n9ouR2zm9X33sNFnsZjnNWn1NaVlv/mOpl+rAf6Ew=; b=CuWYT4PICniRwnp7ydQn/SUjr9uqZGQdIR1FPEimes4OHA/O+YIoUVdo8xlQib625Fekz18zgBqsG0R4sLTXm/uoIVrThdWSKU90E9PlqcLwCV/xZ9IyEmqzsXoacV49AnVuCz2Z6DQCXfGKiXy0ZkDdxg5fNgIfq1FgiAwfJIQ= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB6507.namprd10.prod.outlook.com (2603:10b6:510:202::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 12:25:14 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:14 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 3/6] scsi: hisi_sas: Use LIBSAS_SHT_BASE_NO_SLAVE_INIT Date: Tue, 5 Mar 2024 12:24:49 +0000 Message-Id: <20240305122452.340471-4-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: LO2P265CA0273.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::21) 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_|PH7PR10MB6507:EE_ X-MS-Office365-Filtering-Correlation-Id: 20fa29f2-d70c-4aab-f980-08dc3d0f4f6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iRVE6wzQ04lBIFEkv5ONo8uVIwa2h77vdi6pMobSgE2F5IKvrbibSfgc8nhrdH/H469JQRoHHyDlNul9UieHRGPA/PIYP5Vz6qGvLCPAGSSL7fD/yDB2wCik9QNjwk4LFxVLEaJLFBoSECriTzsr1kLOzw/beGIRbuI0LEwwZM4g4/hFOIx5cB7v/GycTMFCf0V+jfyT5QIqz/KUnCdULIBEU7YjDGfd9cLaqoBbYNQdN1N5uKbvMMRiY/Exf/sgXtVutDETEITff9RXS0Msa62ZCnsjY4iDNx/9JDAHWxlDtRE4ZPVhGFZER6orNxOlh4f6EkArYxBxB1V2JxERrS/YiZqERCoeZhXm0tgiVrXRLLOUooUlCq7lz5gqYkcxz2PEk/M4thouKUZzarGOia0Nq8u5kgYH8y/0an/ezPBp/6/HOielwGV1lu/rRt4/cThWFCOmOMNriyIh+ktpVyjkXDk8EXeVIKTlfXNJekyHwMWAH1tQ3AZ7qodBCgMhhcho12ow+dmo0hrpIcpBRW890lMMEpmxauVs7S+xeADIZC8jATePv1VPl/Z1hfSkzbIOpohEaVVFpBHdlyTJIdNBeEyuZYKKGjSdOMYHOFJArsC0oLQTdtF3kw2UnKT+V7uQzBSoWb9jFqBY5HIqPV/VqYVp2E7i8Toh/yZTaLA= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aYuZrTVODFBqJfYb+AFyShrsoFEUjJK5uP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kQsHYUD3iETUA0upJCstDR2QvPWmyLjsApZuJYi6r1Kc9aXF3qojhhIHmSeMjSWIeOANdSQYCxH4TaeUqE1Ou/IRI+OcY1QAm0lqHmrWcWP6CCnQHIJ9KQk4ujwUFAkw9CCw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20fa29f2-d70c-4aab-f980-08dc3d0f4f6f X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:14.7325 (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: Zqx4x1z3HfLJlBbo9/MweGrujMMKGUKxMKAUr4YEunN++MUbJsA43OFNis2QVMsUOrtnQh+YDYtm5NR7BdSRSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6507 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-05_08,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403050099 X-Proofpoint-ORIG-GUID: l2VgYEvPw5ihwECjbr3R24HrA6gcWAXU X-Proofpoint-GUID: l2VgYEvPw5ihwECjbr3R24HrA6gcWAXU Use standard template for scsi_host_template structure to reduce duplication. Signed-off-by: John Garry Reviewed-by: Jason Yan --- 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 b5d379ebe05d..d89e97e8f5c2 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3567,28 +3567,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, .sdev_groups = sdev_groups_v2_hw, .host_reset = hisi_sas_host_reset, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index ebdfb7e7c88d..756660588a1e 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3320,30 +3320,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, .sdev_groups = sdev_groups_v3_hw, .tag_alloc_policy = BLK_TAG_ALLOC_RR, From patchwork Tue Mar 5 12:24:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582349 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 B1D925B685; Tue, 5 Mar 2024 12:25:32 +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=1709641534; cv=fail; b=ETlWpA+pFGIJ30wHOAdv1qumE7IOVAE6nvG/FjSFwWEJu7j4dse9Rzl1rQ36z2oMieeePYIj7YPdAy8YbioGKdKzmk6k8NYGghNxldAVbR7QY+N/IfYsqG5ni4FAAjZgFWLm0WGeq3jjrGH/UJdK2nFfYPB2nj8YjOx7EH9cf1Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641534; c=relaxed/simple; bh=oZ/cykRJ3Hly/QV6bi2WNl3jxVCztA1z1EGYhTefx14=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=tVexaBa6Z5yr/27Wg5lInDMkNKXYqnBLf3104GFxNlwSSSRkDblNqtClzC5GXCGDOF6YjxSmIS5Tu4Z+vNv3FHiqSfuBDUCr3yVziE41UlavXd7s3dsV2uv+oXZoIexu7XGCs3ZRjOXeexBtcljhcgQDhMxPUro/em13lwicqf0= 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=Uc5lk9GL; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=mwrAZ+9j; 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="Uc5lk9GL"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="mwrAZ+9j" 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 4259hoRn008892; Tue, 5 Mar 2024 12:25:18 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=W6EBPqEftPR9DbU0+roOgyUYY3hUDOoU2mBkNWKb6o8=; b=Uc5lk9GLttwOQonXItfUsuo2NAOnz9I/+HGKt52X/D4gbpIC27r+/6MvriQkGQnYUk4P f81YICx1RiAY0QapBMuEr/IyL1sGOkPEMA9t6lkfT4Ixue8yze8NcCUhu1WUJ0ZWE6sq VCw18SuHiUjrhz2eQaUBB6yu4IesS7hP3E9EW1GL/cBKEQEWjLYSNdr9XV/3DqLahXqI RpoMpYOEIUjqS1O+BddunF5hi4rkYJSItWCn8/1a5BSiKKmu48KfMSFE/Oe0ef47RIvt ChEZJ/aLPLW6GyyxT+qHRBBNsO9QoC5S0wwYK8PlJpgZMR+OMBIF4/g7LqmfDACT1CWp Xg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wktw46083-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:18 +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 425BXZnw012375; Tue, 5 Mar 2024 12:25:18 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7frwy-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BxnZxzijFHVmOBQ1HjlMzzF9ZvNbBg+0bgf5cTVUZQCVbW3wmmHv//j8O8ycc5/OUQC5Yis9L1pyaU9qcfeZQiazFp3cLjO+apMd6cxTHW565qI7/E+AAVjZ0e1oL4PHrxNpHEKym2vNvnFWDUM0Zg8hbx0juEZYdAvnARqAZ7oO2bBH6PzqbWDxGx2QeOIRDV9anAN8JY6bQQ6bpFi+bOcg0fPjWQxplabfgnb4M9QqnZwoTb/jh937d8bBwQtK8leME+Gb9Pt3zzuH61/udL88/FSs4MO1GzLpJYlypbtVz+HXoG5jtJOaFCPysQbODe/dBGUIBoYEM8ZXkjXWCQ== 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=W6EBPqEftPR9DbU0+roOgyUYY3hUDOoU2mBkNWKb6o8=; b=BK0lDebR8Ht4saounH3NeXA/vtvhclTbpMYM9vqkD9gUMTaTh8CR/e6pPa6HdxMU5KrD2RMVPEHJF3DEBL+qeDE86jDP3k3TiAQ7jptlS8tAvq89oosYkYdFTVyvZ7RoKTwhBmewKnJ2zGVkx/XHmrmx09eC/yVD8DdvmBZ+Xz1OivZFHswJSpBMcYLHoZCOaph7k7ueLXyIHc25slxyq1AhiLML4vh2SwPIqtyPiAQE8stiOLw/c17v2TC1bDpGmG0BDQ3OjWaVOeMFnzTeUNo5zrnHQlCypQPpWvJjcdFHGZ2P51AuPti8eRMIr5hHBT9y6YFjM9Bs0e6ib29/Dg== 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=W6EBPqEftPR9DbU0+roOgyUYY3hUDOoU2mBkNWKb6o8=; b=mwrAZ+9jN67HoDAg2zPtccvCg9UiiwKAcX1sV6E7TnSAHu99rgERDjs+CWoq728bulnBKXJbYcQc22avQksL4msKriBUOQg5irEr/rwP+Ngyxd3kLlnDIz+ZVg/5UaI1F87ZgucdwhrL6ru9UgXsW0j+MI3MX2JmXXSeCahoKc0= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB6507.namprd10.prod.outlook.com (2603:10b6:510:202::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 12:25:16 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:16 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 4/6] scsi: aic94xx: Use LIBSAS_SHT_BASE Date: Tue, 5 Mar 2024 12:24:50 +0000 Message-Id: <20240305122452.340471-5-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: MN2PR04CA0016.namprd04.prod.outlook.com (2603:10b6:208:d4::29) 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_|PH7PR10MB6507:EE_ X-MS-Office365-Filtering-Correlation-Id: e76edef1-4a62-4bc5-8368-08dc3d0f502e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kdd1jgmVMhsnp5K5AsgUcwOJ6NqfOkdvt8x65eD5n1leeOxqG4wNYULdpb5J/kM30wgc2GkT5VeINkVvX/KJjGUF/DmrRKvw4CNWKI9h4s4dqtBsKbB0P2SurrGjr3O5ThFE1hIytdBPmMs6sBpPSxT1e7vH+CuHeIhY6dukwZ6+u5W/+pZWTgiE3JQXKjYapqu3Cp5pYNMHeILauU9SZSBVEAhOo6rMRq8KPZlsTPfJzdaDWnhQCoQJ6iByciFSVNGmPMVyoxLtvLTUaaffu/iToEK6dW5bh0ue3nO/K7SmmCUXL3Rs8cmi7mZWXqZgzwWDmTzcXgDL5Wt7RmHMfj6iN/1eGRVxN+FunLDKEcz1tIFjdMMyODiAcBWACZPqoVcxvRbAgfJbHiNhaEQFBlh4gSHxrF4UoYbsr94EEFxrvMQbkMYF53I4C+/LBWQGQim7xRcHu/lADcTbSbpKkztwUqnBY2YKMgm3h1hunmeHGCDXO2pYiJPRsq03fNhXnEaiyRh/P8j08QhuDB15a9wPbxbb4XtQxaCsvjjf7jdDMBgyYdELKpmdh9RLMu/r0gikcvC0CpMbjgobAFUdGRBJCRTpqGAuWmhUELEKpppQZI6I6n/vIx/qJAreD9264qJ4+aRn5Yd1qZaB7F4pQ3uN2mr+I9mvGZFxcqoTaag= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kT3EP5Mv9mYmXs/P8pL6uSeIOlAPQo/whv6yVcBIDUqVzf09/rTvsVBAMhHKRfDpFjhrIiwkGEaHbJI2Mtbrk5qf3xGHD8c8RYNZrxzPjooP3F6L0e0b2FNJVuzmljthI1vLxMq67XoFfk5d+LskdzIoF4INR2+pHg8wrfQsG9ZdMplCulTSGaZ9gHPVqVfDzZ0q7NgjXeSzq6GndoDsnZPM0b6GCb8XKKSh52YMwsLMJK+Ed+Rgi34KSaUZROS5bxiumkH5f7a+OMmluXP5uGwow+4EBYRooQXCAcO9dFa0652TNq0eGdd4q07KthmfeX5gQf0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VsZoiQwvernKffOoPqBSwf68wRGre8+FjD/HJyg/4ZwnXzk3zdd1iuIgI3wlwrjOpD1r2eg67Ui8Xs5v36wq7dN6CZff7KGeIsv1+RqmRLw1odYbY2vrLuNi+ATNInnpH6J99VjmxLB8FyoF62xC3GbMPqlNZvyMOlsWM7sb+O3vGlaG5vZWLG7YFVuWP58D0oez6ivCD4+LmKwsA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: JDOdC0KU04DTb8TbDJBCfodhc6W4oX+pME+sXTsWDB7D0CJHzVQpOocCs+p6s3xHV7+EAecjqBdJ5NMs3R+1A/fZVXQZRAxLYZpgLfAnu1DRoDtpn/qyFA5+czLsDrow/6qAw+E8GkoJDlCwyzOtGFjz3wznH/eEQIboeHGmcvXnEIuNxGcHatdnkK0A1vMksyvxPNREL0V5xlkNMCw8ZgmAcwiNF4X9Iya1bt29dqc04QnT7cz86KJy1p0IpWdpan+EFGlWWuBrI6H7Mr88QBChx5259p8F0ycpNsHmr9i91cPLCUWBfHdaYLSblZP4jUA0Y7QcknWJp4GYu3hHtTGyZKhtYdFF84jmJ6ZC+NiJ3nF3TbJ1VBRqFHIIccrVzFcDkPZ46CEfQ9wK7skri6zZE3IcF+nvfNCB7OX8zVPaNr/dOfCMQS52EAPUikShvO0g3dPT6u75iaA5mn70MrSFP1wRtSOpm4+fzCul2NhpWhzRDJFCaALoazxuQ/Buqs5yiua6GSqeTDth4oNMSnJ62Z2V1bRYyxdD7BG4KReWKWwlwYOk1olDC89Rdxew8RrFvWMEeid1XhU9/fOpV9WR/9fUX/IagMQiF/VUPCI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e76edef1-4a62-4bc5-8368-08dc3d0f502e X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:15.9892 (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: 2PpgN7JiuBJbKlkAE3TWheqlmnxzNROqagzF97AmcGvGGiS1UxH4yuGdYCeYqVLp8v4pPmb+F9tvmwA3HJPpRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6507 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-05_08,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403050099 X-Proofpoint-ORIG-GUID: RYeoyrUh_PwjvzDI_6-r6I71y_ikIUgL X-Proofpoint-GUID: RYeoyrUh_PwjvzDI_6-r6I71y_ikIUgL Use standard template for scsi_host_template structure to reduce duplication. Signed-off-by: John Garry Reviewed-by: Jason Yan --- 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 ccccd0eb6275..538a5867e8ab 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -25,6 +25,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); @@ -38,29 +39,11 @@ static void asd_scan_start(struct Scsi_Host *); static const struct attribute_group *asd_sdev_groups[]; 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, .sdev_groups = asd_sdev_groups, }; From patchwork Tue Mar 5 12:24:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582351 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 81A555BAD5; Tue, 5 Mar 2024 12:25:34 +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=1709641536; cv=fail; b=NAKNUiajDCI+AzJnSkAUC7R6ceWzJLOrI5x5toqEkPnojLbDsJ9rs5IrEWApe32r60yuOJXwmhnLQ/AmmCvPknx61HY9x5oaCG0kXEcxY90ACf1DTMC3Au0n4/dMraPVXlBnlBR42LiU5xwBg3gmFMP/Hd5CFNxvN/RYQa0dSXs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641536; c=relaxed/simple; bh=1zlbJAf/cC0oBko5uknP+vAJSjTNnzqzcmcRQt9h94o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=KikZjGENd2WGL9pKogF5Huyd+2VIr/wa7l+wKkp3+k9Uu5oP5/jeXDesjVhHxpPJW1fTbtcNP1mql1GlU7jy4KQvBxI//RQZd7u+rZ22NuLVJ/W3rFpCH5vywGqjnCjv0Zaac5cQcyiX1dRB2mSBNZAKfHtvD1MWZb531NK62Wc= 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=OhfS5nSF; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=kjDyiSHa; 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="OhfS5nSF"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="kjDyiSHa" 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 4259hnlQ031277; Tue, 5 Mar 2024 12:25:20 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=fjBX0v4sJoBZ5nLLP7lElujX+8v9E17/Kx2/i21mcfI=; b=OhfS5nSFOUXmzJ6Qnar5bisgoiYIs/56NtEQNuZPczbXvXrkp7RxYENtq3pZc+0PqpQP t99huStt8eE/Mnb5FC7PA4Z01jwPkAUx9QQjvkRUatFkz0tRB2myPMfz7JdN6lLvYRMh jXXWDUYcd8Y11MT3fpfgIEFXJ9IfnvxUFo7WN6jn1SNnbhdVnUc9UDl70KBON7JW/3Jt dfvM2crDHLk+Nwk3YELgkmCjV6gvGMxhpYaHTR47LQUNhA6GX5CmtNgm8/5KsYsrbkFk s0gUMp+y463eIg83LO2dfHG4p/r5e7BLJVroTXXXaRzkgmFU3zV0aXWeidTykRQRgQT1 yA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkthee5fu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:20 +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 425BXVtC012259; Tue, 5 Mar 2024 12:25:19 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2041.outbound.protection.outlook.com [104.47.56.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7fs0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ixtYCDPiC5UvouuZel9LKwuKZJjb56a4a2XsoqiUBiR9UtZHBW8Q75IE6yuRYLibnB64NvVy7wie/F3lDT/OWX+yxPIQ4lt2nzyW+1i0eVCMejfmmo2jMhdvWmoo4YsY5LpdmUu5OHuzzo6y35DWmFL0fDEJp9Jpaf7I8hlb3Y6X5ARFPBId2PVBl+rUWmEw15pLOEL0NwqXeZyXkntHn0ZuyWAkLVXv504Zo/owurnvdACJ3Prpi1taNFV9goWWO8SC9UXw322g9tkCUIsCDGYUf1tB3CgyOFmRxKgoM3iwjHVeBv4+JIJCXONO8Vo39945UCP7d/v5Czj2iGsxRA== 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=fjBX0v4sJoBZ5nLLP7lElujX+8v9E17/Kx2/i21mcfI=; b=n5zid8x9JTw9ikzD6kiqqkXJmzW2H4cDT+6acz4WBfietmnBnZnkIEx3hIghhXCRadDSyBLI8LGBHBJg638aohRL95SAuYOBYgqJNoYQactBJ4gBISqVCxUvOJrCR77AnzHFgunj3YYYphNvfH/9JgYMs1o2Y4buE6HW7jXcRPWgiUAKo0oqChAGKNLzKxbumAqURennUzrbNswj6b+1un/T5OBtoZecJyx4OW8WnwpjqTUP+jlvuGoIrZ+9n6GVAWdLESlZnM89kcz+t0RxmryTAvxdc3WWDpDk1uSxxFxp+43LzFGB0+Brug5w9nDSXM6ceimdGba2BL+UW+pnGw== 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=fjBX0v4sJoBZ5nLLP7lElujX+8v9E17/Kx2/i21mcfI=; b=kjDyiSHaM2GzG0Mc6dbIqLD887RVYV/4yGbwzYHavNfPXwon7TaVEooY4tMH0fW3OE2z2L/awcrUbYRBOFH1vchk0vVZsmgQ6HdBOG9tXPNrY86qQd2e09Oezix4LdcqW+03h3RUcOfjGHbtcz9qAm8a3xmM8Ex0WNXNM1N6k4Y= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB6507.namprd10.prod.outlook.com (2603:10b6:510:202::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 12:25:17 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:17 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 5/6] scsi: mvsas: Use LIBSAS_SHT_BASE Date: Tue, 5 Mar 2024 12:24:51 +0000 Message-Id: <20240305122452.340471-6-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: BL0PR02CA0058.namprd02.prod.outlook.com (2603:10b6:207:3d::35) 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_|PH7PR10MB6507:EE_ X-MS-Office365-Filtering-Correlation-Id: 84d505f6-780e-47b4-3158-08dc3d0f50e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KZOETXeQZhmqez9hG45dkNzSxme6l4ptfUqZnx7VJS9x79w5wJq0J+ZqcjZnugvrPrJniRMphENHJqCVM1VycuCymjC6yrg7UOi31sCyJjSfEzNqqTMjRg8a19BruBZE6MEkNRBU9uUjo0CowM2sBCaA6tER+Si3WITEcxYDPzlNKg0G7Sj689cngGoKWe6+7hgdZpf8FB6zyBOP/l4RqfAo6te7hqddHlsUZtX0s7Lzjn7UH2ZNk/KcnKQ9PPVu38iD97aHwCDv0q/7Q1ZM9bHDZ/8Uw0oi/c/okfD7mitOEJyOlIwXZE+owNrrkE9Dn9B1vyK0Fgt2YIHMQ9A/ieJ94isf9Lxt9n2YxVujKV6QvNfGDTHYjYodfBlvvNgwJgHJu7twuA5rA6Ib5wraH/dNK60079WZVUW8LEFgnyyAzNN82QiuePplM+407k8JOqdZKnKIBYkB4B7iTs6Iw5fZg5cfsKXkcJEFOnVkv2lfVqXMRQ7oCtnHRigJzWeOaXCRg8leTyPNVQn2sZ8tOQcoNSrTx+UuKlMni+gVCK90voNO52P9XGlJkaew57eJ1HjUWgIZUXE3QmocqFeRCgwEBWBBO0cuVR4sC/60suJUlE1SoCD5GFJ60wLDzsZVpUoJYPJYMYXm+KUwzi6GtXN4Q8jK8rIZKynD30hhPYs= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LlpE6VHC5Q17zQiGEv9D8mZq9wOxqbNB2WdZtgH7pDG60Y551hIBdkYANA4e8bf/ukBmJwY1Gd+8iPlt95M0CV/4KxLlqNHmlpyIMApA3klZm6Tld8B7f86q+047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lZRyU4RSq6QJYlLGlsr6+nIG2UTJJLbxpo6YnX7VmnCF4eXDTqsicaWic= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84d505f6-780e-47b4-3158-08dc3d0f50e0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:17.1564 (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: Pg149/LS5eikeJMlhWIXIvxRFz6DdR0qyBM/xVsXpBYMC7KkR/9V3AkYjX63NWO+ydDtUmKL6eQVf0dltoOOew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6507 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-05_08,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403050099 X-Proofpoint-ORIG-GUID: wMJSYK_-bIf4cUDXaeYDJrIVHsGdFLXa X-Proofpoint-GUID: wMJSYK_-bIf4cUDXaeYDJrIVHsGdFLXa 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 f1090bb5f2c9..c792e4486e54 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -31,28 +31,11 @@ static const struct attribute_group *mvst_sdev_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, .sdev_groups = mvst_sdev_groups, .track_queue_depth = 1, From patchwork Tue Mar 5 12:24:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13582352 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 8FDC25A782; Tue, 5 Mar 2024 12:25:44 +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=1709641546; cv=fail; b=Aiu7OOAO/wg4ypwGlwJsfN/Hbsl9IlDhMJoa/9zfVIEwSsBWA6SVGCwYZ/TK7+CUpjXIvpseQ5qt1Jv1iAVQxJDautqm0pyp47mZCCV/Nuz3CzN1O1XyMrwo4mJ/lVMIBgusi2LMkCEx1D1OdQRQXnXSukqw3KmYBXetSHTBzDg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641546; c=relaxed/simple; bh=J+HUoIPe64MNmCWEjIY8rByj/JZdON21xNbDlAMXEPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Wd3xXTnE+6y+tv0+gPK8fTkFRDrh5J1LPkawM08JRDqijW87++wCR2N2s62/xum66xhcsoTP8oDbvBXXjrqcwKAMaxaQK9WaubeGJbX79cAn8DiUKly7huwQN5Y1Nc/Sb/yaJdAHUcmDvCeRaV+8ZdeAcM443m+VK6BLqFt/m4c= 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=dPbnjh56; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=wFFR2G7Z; 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="dPbnjh56"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="wFFR2G7Z" 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 4259hjct008661; Tue, 5 Mar 2024 12:25:20 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=xYkRLZfVHfuOdW6TM0xPCxKwhxhbBH+gJXagOvV95Mc=; b=dPbnjh56J9ZFVQy8EDwjz056ZCwBocUy+4oVvCRVg2OwQbn3zjblg8X/IgwpckwI0KIE XmB7KUjeYxfSv7x1zKpUi7svLHnChQrMeGwspJim4RKy100XNq3FdbuLWmwIP0KfPYmR SipIcBs160NLixtY+m7TGnROJoaN0ZXfczS4E+TfOUEoLxq7Ov63kD+UK3eIcn/4ljq0 lzmHiFJ5uTBPvRl9+I0MQMBir+v5zZogkYlrnHKuqFQmd+9KYaaH9X0pbZNdIhvrPYgu 0hiJUXcW8YzcWFqDRwrFTB1nYmTuOrtD3sfF5gdOTq5PqEPaYFsTFCum34Wgierp+BsZ XA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wkv5de71j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:20 +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 425BXVtD012259; Tue, 5 Mar 2024 12:25:20 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2041.outbound.protection.outlook.com [104.47.56.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wktj7fs0w-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2024 12:25:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OzcERrKe4yE7gqgIEJCCKlRws0k232522Up3mhQ3f510AekJFoE4rc+SmEjWLaS+zQiV1i1J6CeMWL5xqHIfx7LJpP4IN0fAjtXhGkLgtrWFeydEf2kQu+2CsJGE2i8KLpNIS+qGb+4+jFAHtvRnpBcIddmTt0UB49rIGVNft+dz9SdAP5NX0SJleMSSC2yMFPr09vEjuWBoR2hmTFdIdlHH3T/RZpBYgig1CcKLrNz735w7dhKKeE6PtSE/bEOIMHISOQC5bdxZ1Zit3rxQizxwJfetBkZw3nJ+XSPNb2DfuG8wxiTCgBB2komdIVfamoLulRxfDJLexU7TKeLK2Q== 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=xYkRLZfVHfuOdW6TM0xPCxKwhxhbBH+gJXagOvV95Mc=; b=KujtxEueg1BUcUYIyjjIkM/ElJGqScxl46USc6w8GlnPQF+JakIx2iAlNUHWmrYZ+MdtELCQQMx2cttuqKAArTIQR7kQxmPwSJkwRguE2n7JjLUuRf/V7IvR8/0LURQ/p5mw/UvQvpE/Ajz0wf8KbHMy7AjVFAZfLnuXyXzoiobH7wNLeKgWtD8eu+i2mBS4GvuxF2fMh/8JGrRzFR7d/k8GMMmhL1gAS/eKGLb/iSI5dBu9fkIhzsOEF4NwBiIwTu0kn1K/EuvNOR6FFoXhU4SxNj2OcG/PV57YUaepvCiiUj1HMtgcEarZF7FCTjvIHc7+uxUsl5yrz/a8oEIwaQ== 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=xYkRLZfVHfuOdW6TM0xPCxKwhxhbBH+gJXagOvV95Mc=; b=wFFR2G7ZmSTiQtvbFhQl/+o45e87KoICDs76jBn0i+eTTx59wJI2YkjHwRSB5Mabzbvg+nZWNnoGhcZCw0yw3dHIF+hYoliVKPKYAhiiUOHQ7qP4HpAMAhiO457abwvPxEaS0vPZgcyFnGcXjnWQSKBJX3ebMrOKbxWmqBpNLOs= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB6507.namprd10.prod.outlook.com (2603:10b6:510:202::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 12:25:18 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::97a0:a2a2:315e:7aff%4]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 12:25:18 +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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry Subject: [PATCH 6/6] scsi: isci: Use LIBSAS_SHT_BASE Date: Tue, 5 Mar 2024 12:24:52 +0000 Message-Id: <20240305122452.340471-7-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240305122452.340471-1-john.g.garry@oracle.com> References: <20240305122452.340471-1-john.g.garry@oracle.com> X-ClientProxiedBy: MN2PR08CA0026.namprd08.prod.outlook.com (2603:10b6:208:239::31) 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_|PH7PR10MB6507:EE_ X-MS-Office365-Filtering-Correlation-Id: e64776bc-90ea-4583-32aa-08dc3d0f5198 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5T0qAOpx8LfSztoB4yOS4i5O6QkTuAnld7viA8SwdIEiqy6kknHuOfWxsLmBzVdssgZFVDll49KaUpyDNfTbRDEUDDQeQcDnCVC77fZ8WNJ6jXNEdAOzexWCf63DL9RPjmzbZzaqdBW4+LnPq4obi2OHMozVwP++SIYRlddoiKiLwcIWCJcazXJvutd+Nc2cSDf4+RLo42r8zPDq/v0+9NkqycqHvoY7CBfczOx155wEaTaxZAI44UTDjkliN2QiOavlx0Qf9MsNt4ZEwLyzmlotEF07EYsEi9FZADPfpbP4eCaCmQ+AEaqdhNbVDzTFN8WnsghuHEmq9DK3REoWO4zX4c/RDD3cBD6F5XuKiDj4I1aKYjPJoZ2P7LEYM4qh7+yZfzKLaXejlVx2DaAX2cF71FJ5+DLuWWcdvwqDYETYiwMty4WL9nXwi356F/Q2zGUGb6HSFDfLeViU9AiTl3oqBd6zWNRBzE8cYZvl3a8rS5bT0uajDiHgZytb9NGMl/xOnI0j8NrchzbVrHEDjjd7xS1UrvPhdLVvRJUaCjyT7/L/fpYApbUDGtyiM9CgvoUdI1jnZApVjr2V87CkAMiB+cb7BsiV0eA4bqpy3vzwbzj+kd9DUT+RxMqzxynx6gz5G/C7jh7sp72U9UNwCNUdM8OeOMMqzKXjszQZZhE= 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /k8W5kMu9Eft4cw9iVFqMmUjMK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F102ipzRlPMQH3gvcIUjNpUJmwFjqTz1t+vcUkuc+HVRVUGAxXZY2WXRBw5++KGUj5kwCv8zhNVn6VGW8NgVEJcdLWOZRC5oloFNxWVUBUfb/OjvuE4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e64776bc-90ea-4583-32aa-08dc3d0f5198 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 12:25:18.3601 (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: pdCZsxaf7lN3naFQh88WOKc8Dsf6MkjoPt8a7B6X7IVqmeG76MHpHG5SIQwNhaK2829jbWgTYxWn/BDp7/egxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6507 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-05_08,2024-03-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403050099 X-Proofpoint-GUID: DLiiPi_zdNVt4UyX5_Cjg7HAtaBuvdnQ X-Proofpoint-ORIG-GUID: DLiiPi_zdNVt4UyX5_Cjg7HAtaBuvdnQ Use standard template for scsi_host_template structure to reduce duplication. Signed-off-by: John Garry Reviewed-by: Jason Yan --- drivers/scsi/isci/init.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index d0a23ce4afba..49e64232def1 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -155,31 +155,11 @@ static const struct attribute_group *isci_sdev_groups[] = { }; 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 .shost_groups = isci_host_groups, .sdev_groups = isci_sdev_groups, .track_queue_depth = 1,