From patchwork Fri May 19 18:30:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9737891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F630601C2 for ; Fri, 19 May 2017 18:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 759DE2856E for ; Fri, 19 May 2017 18:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69F5428573; Fri, 19 May 2017 18:30:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA832856E for ; Fri, 19 May 2017 18:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755758AbdESSak (ORCPT ); Fri, 19 May 2017 14:30:40 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:60868 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755705AbdESSaZ (ORCPT ); Fri, 19 May 2017 14:30:25 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="20047662" Received: from mail-by2nam03lp0047.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.47]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2017 02:30:24 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sJ8HDP2jvOKBA5+zEaW0uO5FySaT9pWRgPuFi1txw1I=; b=qKKuUrc8fCUqgN1P9DIS7+5lapthfcfgNA7sYfGWwZ6vIdPOSHod9YaQN5taphOgFp+U/evj4PiOFIa7ObysVSuWVHbZ+da8tkV0OPmxtieFARx3dLHGDIdOiysFu5ovXoYJLwoMxxjLs6fsux397HTH1tNX5iIWyUf0nzBbj3U= Received: from CO2PR04CA0069.namprd04.prod.outlook.com (10.166.88.37) by CY4PR04MB0359.namprd04.prod.outlook.com (10.173.188.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 18:30:22 +0000 Received: from SN1NAM04FT028.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::209) by CO2PR04CA0069.outlook.office365.com (2603:10b6:102:1::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Fri, 19 May 2017 18:30:22 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by SN1NAM04FT028.mail.protection.outlook.com (10.152.88.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Fri, 19 May 2017 18:30:21 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 73.5A.29323.CB93F195; Fri, 19 May 2017 11:30:20 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Fri, 19 May 2017 11:30:18 -0700 X-AuditID: 0ac94369-548749800000728b-95-591f39bcab3e Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 01.47.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Bart Van Assche , Christoph Hellwig , Hannes Reinecke Subject: [PATCH 17/18] scsi: Consolidate more initialization code Date: Fri, 19 May 2017 11:30:15 -0700 Message-ID: <20170519183016.12646-18-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170519183016.12646-1-bart.vanassche@sandisk.com> References: <20170519183016.12646-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5ke4eS/lIg+19ShYL3uxls1i5+iiT xcZ+Dovu6zvYLJYf/8fkwOoxbdIpNo/dNxvYPD4+vcXisX7LVRaPz5vkAlijuGxSUnMyy1KL 9O0SuDLe7tvFWvCIr2L1hxbWBsalPF2MnBwSAiYSL1a8Z+5i5OIQEljKJLH3zjMoZwejxNMp a1hgqtZumMYCkdjMKHHiwV02kASbgJHEt/czwYpEBAolLm3rYAQpYhaYzCgxs3kDI0hCWMBR YuO93cwgNouAqsSFmy/BbF4BB4lFi/+xQWyQlzi7ZSdYnBMo/vL4QvYuRg6gbfYS9/vqQWZK CExjlXj6fzITRK+gxMmZT8AWMwtISBx88QKsV0hAXeLkkvlMExiFZiEpm4WkbAEj0ypGsdzM nOLc9NQCQ1O94sS8lMzibL3k/NxNjJBwz9zBePeJ9yFGAQ5GJR7ehF9ykUKsiWXFlbmHGCU4 mJVEeKNN5COFeFMSK6tSi/Lji0pzUosPMUpzsCiJ856TmRohJJCeWJKanZpakFoEk2Xi4JRq YNQ9PiPh+bmjCWUdDiY89x3Dt218XKdu2L9xx5tpBlm1zmvP5pzgtfy8+/kHjpOq6kKrK7dE H73VbL56s+maNVskkjs5J0aZmfTwfc4Tie2zX3HL7nL6MUXTHyf19jQuzN7LYfm8Uv/uvQ9x 8av6xb7Kvf9h+j3/ldzl7mdhWTGbCs6/ObLy3iUlluKMREMt5qLiRADlw1f6cwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJMWRmVeSWpSXmKPExsXCtZEjRXeXpXykwa5f5hYHf7YxWix4s5fN YuXqo0wWG/s5LLqv72CzWH78H5MDm8e0SafYPHbfbGDz+Pj0FovHtDXnmTzWb7nK4vF5k1wA WxSXTUpqTmZZapG+XQJXxtt9u1gLHvFVrP7QwtrAuJSni5GTQ0LARGLthmksXYxcHEICGxkl 3s7fwAiSYBMwkvj2fiYLiC0iUChx//RpNpAiZoHJjBIf1+0GSwgLOEpsvLebGcRmEVCVuHDz JZjNK+Ag8arlBTPEBnmJs1t2gtmcQPGXxxeydzFyAG2zl7jfVz+BkXsBI8MqRrHczJzi3PTM AkMjveLEvJTM4my95PzcTYzgIOGM2sF4faL5IUYmDk6pBsZy3vMP1gqFn3E4I7ZW3675ofy1 GzJv+nrfZNSczvM//XlTRJWrQcwU16mFTJvSLhZuc5h+9+OXtY5Re2YdsW2+M+GS19Z7D2bc 1Sl4IXxgfW2v1oMncR+Pui6Nv1F12Oyl5rtl8+bLdM3Q06hieHfmkdSEI8FXz5rMUjl2umOp ybHPLNKP/FU/KrEUZyQaajEXFScCAIE43eXCAQAA MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39400400002)(39450400003)(39840400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(5003940100001)(36756003)(6666003)(48376002)(50226002)(81166006)(50466002)(38730400002)(47776003)(8676002)(575784001)(86362001)(53936002)(356003)(2950100002)(305945005)(54906002)(1076002)(33646002)(8936002)(77096006)(4326008)(189998001)(50986999)(76176999)(2906002)(5660300001)(72206003)(478600001)(106466001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0359; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT028; 1:Gt4WRnpu5OhuIlN+VtFQmJbUjWiq3V9hnyRwa12jTXPlLQc9Mn+HtCvEKlL4bIKQ5sl6zKtkGL3gVfrjeTwmrbAvfAuq69CJU/RwA6HM6PDeCnVfOTTkDCGiQl7WV+fAAP65G3DQneW/+1DbmQ8aH5XHv10+JzgjuTw6aaxThv+UiPacamYChJOc2QiSsxa3E9KkX1dLgUA5eNSNRhjsydQDisbAf00R4hqrf4jGuCoGJDpWHEn2LJFP2XODRJ+y4fQ3hTcl5H5nFuEQi7WLR15NvBOXEFJaiaTndDPWQNsaWAMAj8dL6AWMpopr+mPs2bcOXTBqx1g1Ed4pDSfHRtOAR0Hb0k5ouKDlPpXcsraN66V5wJ1UYIFyssoMc2YYIQ1WfolSSr4CK40NtG+tsIGrbeCwS09NA/gneVz0YPp72TA33oMGLvFGLz/w6eDCwOVuPn+1wpmdnqHZFdVfEb2c5eOWzAVeFJstD1hed3LVEiKBtdhnIrZbHQPrIEmLc9SIIUtZRYlnsmxhFqP6SjDbFHIAZEjpQDCxlvhmI6U= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0359: X-MS-Office365-Filtering-Correlation-Id: e305bc1c-37e0-4c6c-c89a-08d49ee51c04 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0359; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 3:A/5/3+MhRg7a+vv01Lu6POk6oHF+8YJeoBQQvj+rAhF3MAo5pLPCq+Cw0wQMC1gUPXCSi8DctsEoS0uNjggrRda+7mBcsZvi7atCiKS4YJbZtWkUIS2nYtpIBobeB66o8CfXE+uHa/VEvd0iSk4rn8/x9jPHVUGsmgCyB5UMB+uTj35ahMMShUsdnNdwejb6n9t2e2zO9nPCF+E6KjZyEsPLTVqyh3Iz6L38wP2NIAJeqY8PF/R3DwnDzSew0pndryS88QUvWhw6ComFlONI0vLHyHb4pk9LBSNbf1DPc9sHVH2xN7VKunSU6yAOeIRxo6zgQFf8p56uy055O+B5lCpThEQp5QRsPwGZIE8j6aslN2YUeVxW5uslQaq9ZVQ4T0+1Y6Qn8vn627PFN5Shn3tXj8jVxkzVLlnc3+YEldZfmx7LI3ujM5TWIxRNfaXPAUM3MEsQ8SyXF3k6Q2XalM+AUAexCQ/xJIybrnlMqtUvtXrwZIAHyBAU7Wqh3Ak1 X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 25:2IKcOr5qDx4UpjQLodgIBXqSRRFWtIbfZDf+XwTmTRyHOF5M3mhPdFtLSWrHH/gmuNS/Yv05+kSe5etlqrDDe+dyD1+dsaQtGySJVP8XlMrqCJ+1ZgQklQJkcC9yxYH34pZ1HJ1L2bWn7KStngVvQOK1vaAFwBdWVqOGF+Gon+UMUl+FNbvKNaQsKGz5p3q7Xhoyw0aC3SUfhQdt0nk9yyldoH3lwpm46e6zQWyWJJ0sfV65CeiTS659dd/HWzHDPkpi9Uvmeh0zoqf+Nng0f0pyG/N5KRtnrLX95fWaOTUH02G0ejGI/Dr8lO0+NtDBmbU3a4pdR/QrPdyUpYu2yGbHPPWoYA8yFXMnkDpXHWJQ2GTs6m1uKdh/vy0tWLmvm0obHK5jwmV/qXrqZLgB16edmJTMr/cq+rPLhKMSjoEn+EPA588fMKPHArOvOv4injhHxAMuCTIJeq3d1kypkUQDgJ7jdxG3dMNCrypdUgw=; 31:Nx8oa2AJPmlOOGT2fscBns9PELE9kI6lsapobqOB9Y6n9SM6IFQgZIAu2LIyt+LlHB58+kXSWloE5pjnZ0CYLozrAuqK4m5U9+etogMhxexKLLB648N7iS/iInDClj2ckeVv08CzkTIqH0Z+UL9MOVrnRfOOik1w/PtfBERYVk0+iUW4Tob9Zn2qMuIojwLp9Ln2MvxOlBlJ4A/DAA9Ad1u4fftNe9k7NUoCZL7jf+bVR+GorBE6rOVJ6S6mRJ3A6L58pphEVTdkRr6vqGiPYg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 20:OcHIhJn0sbNB2wySOOP4aDVVZ6N0DLjYD1Ew7iZRbMmiUoS1l8q9oLqYzybZASjRNY+F4rmtFy5YS42GfvmTS9GtWm06yoKxQuSo048exv26xOqx4QPuQgvmbhAu1wbZdVU9bqnGUZVstdpdl1rH6OB7EUh/btIYTi9D4YU4u4nR2FVIINUnjCOFJcqeE96wdoeFR6e7bzM2UrNILMEJBgpioQluRJOUdO+VBtJEXPCkDY9h+ZEZNRlHl71ZqLCGG1CeRdwJUZ5dWxMQp9+UW7p4SwxdwAP3BNjssjb8kdWoidVK661m7/Idg49svf2pQXKq1Hf0Lq2uFmbxSxTSEBYyWTF0Wc5wYOwZ5dHIHvPqjioyDTm97J/iTA5VQkzWwKaSKUVLJ5M8LHsbl778oZge6aClupIZwRA7lVg5CH3FxdrMzJRoQQryd8qQMlnRxP4sHp/ZTBvDyGbGEIegnWZDwsp/JKyNqeQU2YxEDeM5ehIHH9j5yAeXOkXxBP9a X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123555025)(6072148); SRVR:CY4PR04MB0359; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0359; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 4:bZdcPapm+I5n9QGYwVwA8osLhUW3CzJHismpemly50If0E9CNJ1CA740eD+Z8yK6RbO8Vt+rO2m/pnjd8OXTAhDKYJtxeefEyExz3ixL1rY31sd4J8jtYmiiK8khFc2FInFh+HmUCNPXO4Hr2NGZD3a2lBeIHpYmktm15lBzIfugWeqYmOpDZqLiS79Wof03baRz/uzYFOAAG6n4TzSP1BR0CHnimB/m/IsmuOf5yDj9ytKinvoKAH/LPhGQWX5mXN8kc4isS8WEWhsJxBafRtY4DbGFmm735x9rjXDAbvMv5jb+KdcdppOmz654OH6ohXF/FR0UsBLeH0IRsjd6Y1cy2SsIsrnD8DwMVauBMuL4rn0NUgTxeLp7ji3XiBmh4wqkGSHNLNG+80b1sqQOgA/UiypiCTchCAgBIy/ViXIchSFwMTJcDcUg8KBkV/C39iQpsZYG6ycK6Kb77fdkxm9f8TjLUDq3jGHxcVL0p1VMFelj3gXXlkCCBwpHTJyuI/cjAVm6aE4CuMgil+XuWLsWdL0DXetr+ul8H2wZtg02wuV8+G9gI0XFUmvoPbSmZNqc9X+KE1skGZc8aEZilw920ekBugtIVxXP4HP5QX7fv9rin7ejuAvvCO3x7iMCY6/JQw9Jxf0/EUapRJvHNWn5DtLmVzXqRvr/4yi1qy+lW+DX0PnU7EY8hHI7+fv82K7neN6T8x2n1BlV4UlLOtvB38KQa3dFGyIbv/0w05vYYmnRHdGxCabSWtqb9w6evyJJxGoxXngQqH72QvoAyVCS2uCJTtjsNBZjuK1tSyACJUi2eTfc5n5wjhkQQqrI4uEAb2G3myiYreF7CKPKRzsvlCh8E1W9iG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yYxu86ITIyWo9a60/7+Ww8YwaA7kiDZWe1MX2oZ8BtiBqnrgqZx2MkHHckPk9zyo5rGoiat8jM1WnbWw==; 24:zZCFn/qNie/eFy2aLi9vVcg+zrCVdaxEgISlSLbaqpVLCUBm6LKccWvxbYaOWLwKxaX2LupYOXCATxmGHpo+SyN89iPAOqJqrqcJhIBQRf0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0359; 7:NQFiTlXniihMM7+HzQeUPWuLKgovZZvPiCCwRQe3L4vqmLV/2PuM2pKTQroP+T2ppD8g/grcNQTZr0wEV1bgYlrVKqgj1aS8Aqy44xZjITWVh5HMApMx/W6n6pQ1qVziBekBz6O7u1qiL0jDwvKQk8316BWBESwDt1C3m+lxqTNU2ev51xn410ax3eiW32GAP3EqdBkhXLrlZLSClVKZK//vRNKTGNOg092sVbxyyQdQVClCt+z+/a8IeHiUQMb6rlL/jYCfUrFMELc+uWWPDXAMdRurP2g8I4qLjiteWO5SQInWSJkOfGE1n4kUoeejRzY9pl050Ed329nljFTctQ==; 20:oROtWQSGHm5kONTij0n4VTpBXMCajah2yuyNhubRnGxGr6VMlWms75U8OHR5WK4uOyLGC7mXtYH3kN8HS5kh3mKoRxFBIQN6X5C1Ag+rwQtwsW1uOHB2tBREWvkKJDYk6GOyHprNEZIWV6p/bzi1NPErJuUmtQ1xn2YK3D7z1pw= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:21.6169 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0359 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize struct scsi_cmnd.request from inside scsi_initialize_rq() instead of every time a request is prepared. Note: moving the tag initialization into scsi_initialize_rq() is not possible because the single-queue block layer only assigns a tag to a request after a request has been started. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 2b7221bc0f32..7c2aba4b167a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2293,7 +2293,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) blk_rq_init(dev->request_queue, rq); scmd = (struct scsi_cmnd *)(rq + 1); - scmd->request = rq; scmd->cmnd = scsi_req(rq)->cmd; scmd->scsi_done = scsi_reset_provider_done_command; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e0c4481cb943..5431d114c897 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1166,6 +1166,7 @@ static void scsi_initialize_rq(struct request *rq) cmd->device = dev; cmd->sense_buffer = buf; cmd->prot_sdb = prot; + cmd->request = rq; INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler); cmd->jiffies_at_alloc = jiffies; } @@ -1345,7 +1346,6 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) } cmd->tag = req->tag; - cmd->request = req; cmd->prot_op = SCSI_PROT_NORMAL; ret = scsi_setup_cmnd(sdev, req); @@ -1865,8 +1865,6 @@ static int scsi_mq_prep_fn(struct request *req) req->special = cmd; - cmd->request = req; - cmd->tag = req->tag; cmd->prot_op = SCSI_PROT_NORMAL;