Message ID | 20170602190205.10009-1-chad.dupuis@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 854E260360 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 19:02:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7633C285A8 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 19:02:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67998285B0; Fri, 2 Jun 2017 19:02:16 +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 868D9285A8 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 19:02:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751135AbdFBTCP (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Fri, 2 Jun 2017 15:02:15 -0400 Received: from mail-by2nam03on0063.outbound.protection.outlook.com ([104.47.42.63]:64394 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750918AbdFBTCN (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Fri, 2 Jun 2017 15:02:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cDPkzYBWhJJUm6dEPJ+EBSXsQ6MSYl0AFt5NSNb/C4o=; b=Yzfw5rl7aAAdOuLo4zu1pggK9JxNBK5HLhAF6y28ODni/YqUd+GEf7CvY1U4zQ/ZKG7sd6k+yM51Bkxx8BIWRmkVhci+6rg9m/Bn92DqZn/Um6SzY9DOUtDVJWJWaWLgcyL7pqdvxnbimxzfMLueUgAYUGqpPGtcZadgFLdg/wQ= Received: from CO2PR07CA0079.namprd07.prod.outlook.com (10.174.192.47) by BN3PR0701MB1575.namprd07.prod.outlook.com (10.163.38.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Fri, 2 Jun 2017 19:02:10 +0000 Received: from BN1BFFO11FD023.protection.gbl (2a01:111:f400:7c10::1:152) by CO2PR07CA0079.outlook.office365.com (2603:10b6:100::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Fri, 2 Jun 2017 19:02:09 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none; oracle.com; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD023.mail.protection.outlook.com (10.58.144.86) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Fri, 2 Jun 2017 19:02:09 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Fri, 2 Jun 2017 12:02:05 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v52J25Mt010045; Fri, 2 Jun 2017 12:02:05 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v52J2584010043; Fri, 2 Jun 2017 12:02:05 -0700 From: "Dupuis, Chad" <chad.dupuis@cavium.com> To: <martin.petersen@oracle.com> CC: <linux-scsi@vger.kernel.org>, <james.bottomley@hansenpartnership.com>, <QLogic-Storage-Upstream@cavium.com> Subject: [PATCH] qedf: Check if sense buffer has been allocated during completion. Date: Fri, 2 Jun 2017 12:02:05 -0700 Message-ID: <20170602190205.10009-1-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(2980300002)(428002)(51234002)(189002)(199003)(9170700003)(4326008)(356003)(54906002)(45080400002)(305945005)(2906002)(48376002)(107886003)(38730400002)(110136004)(50466002)(5003940100001)(72206003)(80596001)(50986999)(42186005)(81166006)(106466001)(101416001)(478600001)(8676002)(105586002)(47776003)(36756003)(2351001)(8936002)(5660300001)(6916009)(33646002)(86362001)(50226002)(189998001)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1575; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD023; 1:1RnP3PJFk3g5u90igmGrfDbXS5KYCHSbx1ZntQgQDp4xjJBohuNgXoNbJoSrWY8Yj1/tLSPexPA/W6oY8S4UgqlobrghV2Z37FK7dvjDs7tLvbULspiQE0Tnz7mtbPveV2bilgCDnw/laj10Il2ZMRELjLBLN2fVNEbl+y898EeR3+oC0/pg2aB8DPcwSQxg8W2QL78I76TCMZNsyozaBnTdZhGedQ8jEy7vL+OKbQ4EEFqy9rvR2RbjG1YBbteKHbZjOXFMgQZO3hw4wm2R7JZJ2xojG2am/sjC3LRRfviRXgRSEXl7nF7Qde9/9oHGwMVOX2AspsNUhBX82szNTlY0YsW4Ghd4nm7iGxVzhW3B/zmqzuKulLAtX6fqdZ8FLLy2UUgs7DLEntnxYHGRSCgUTCfHiS3LKEFvvBa/X0pXNrHqjoip9GTxuMkQEoSaanYp/5VKjG4Cxjp+XPgroldc1kZB6G+IYwcEURWntQoXwq336uk69J6egISGp4Ly X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1575: X-MS-Office365-Filtering-Correlation-Id: 631c0f68-420f-4d3b-fa68-08d4a9e9dea7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN3PR0701MB1575; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1575; 3:LYs3VHuHnl3+jo6WW02HRYJpki/FNfma8sWSLs/AyCm+3+SqUqH7puYux/2fE11So0UOGV2lf+Ftzxz6DSUUjZI17cTrxRb+z8UikN0tjH7VGfrJ5iRcM298IsWGKqBDARrvjmbKLjSDMrDota3w2XK/g7T4P1LNWD0sy4miueqIOgMhr+KekYkZ1UyW9ZDcZ9MWoFdpY0hAozXbN9jSW1rSORiSnzyTH2qTmDWoO6g6OpadGYQW4jrf3sW3iq3yEHoUexp0INR9yNzekMOHIYED/ems7zcOxeKPLcMj3qlVEBRzjJGxrCJVal7sRcvCOKmkrNSbn79vDqqTgiEClD5egHQim6/7Vw17MQ/GLTGTQauq6OJ3bLJTLw5dhbUEvV5boTCAcxmZhZImsCdSdRQaF0MSUOWNijMyUCV+XBiR/TxRz9q39mnMbdBYMNgU1G2i1U/wUtCi29UEzZTCPQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1575; 25:r5xzNklExYoYF1WPw2sLCU7POjr+TA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NtNkdazNez5J0werBLkGYHsw/yEcearxIs4vF+dv2t/5yRModbCLxeyR6V1rzN3mOZeZ83LHUGNx05qk2Q7vON4Y6DybdVGpdUgdeoUxdhCLMLy7cEkcYoV78an+6Ee7uJv/XzhqgYUc8K26stApRhZXrWvUfFJvnIHCFuuvTfRTaoVRgZoebXy+vhlWUOtQAXkSuNUkmQE8078/ldUD X-Microsoft-Antispam-PRVS: <BN3PR0701MB157587DE8700DE0B8D2268DB9EF70@BN3PR0701MB1575.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0701MB1575; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0701MB1575; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1575; 4:Gwg5icHMe5rs7aOdQMArWgx2zg0tM+4CeSQC2rbD?= =?us-ascii?Q?O9/Xi7SQgm0DBJgL3CUVz/BV7Lkwsenq5zdOjfS6jfzStsXeAFk2A7kbSi1b?= =?us-ascii?Q?QX+YwxN6cTH9+Ik2oOkDZvXHE4wFEmt0ZuvLL7J+w0rS/4foowbEK2YHS0Wm?= =?us-ascii?Q?tO+mEItpEyXqbRo1V5NexK6UwY2H/zj3JVQYkPqn9nRSmBp6adZ/42fciQQj?= =?us-ascii?Q?CNalmE22IuucQmRZXN2J/nbdcbqGyY9mxuCg4WuHTlWDdNNHt8nKW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bdiRcWvUr/VoTszSysUkBl1PcW7H?= =?us-ascii?Q?uP2VKwQ9vjq9fK0=3D?= X-Forefront-PRVS: 03264AEA72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1575; 23:gf9GBwfS0gfTn4YYQZ7SPxb4gro6EEyWyc09MHp?= =?us-ascii?Q?MZ1Ejd4kaSVd2iRgJDZuk4yY9iVnD7mTD0jS+Gpind+uUZqFfozW+eGitexj?= =?us-ascii?Q?vsuYSDknDcmCVmb7Rv91oez1+We27439A5L0260Rwt6CfmPYIiaVk1rhX0JO?= =?us-ascii?Q?FsdJSTYW76RWk8skoAJY8qG80Czd8UCp+wE6J3M4CWj8rXaM6HYVt+tB9gCK?= =?us-ascii?Q?qj6RL0ps3zxZObWEob3lh2u9K4nmllwsUXc1tLpTbZg4H5flvFnEKKe3DmPa?= =?us-ascii?Q?tDhAVpK7iCrZmJBexfXH/CNdaTg0EvsebLENullUgZARXuAOf7DnIZPeyeFb?= =?us-ascii?Q?JkYZI33HXbBVovvsJGiE+4Y/SESl/zimO0D7ypKYfHBZobvlUlL65GyfjBEi?= =?us-ascii?Q?kBf1S3RRClJGGKiweThzAfFxJoZtDrLJwtJEgPAe8+JXGbkkn2fJpfkrkvPR?= =?us-ascii?Q?wtBfaoY8xaC3hY4uw3kLy9I0t3edtiGEz5Z//4YZMox6GZLLSK9Zz1D0NxED?= =?us-ascii?Q?VxzbAzRk+iTLbmzTQIhfKPxtKvy+dP4EYnteWWQx5z9MHL7ZJUyHUR0vOFCA?= =?us-ascii?Q?MEMYl1Dq6SlJSh/XU6SnkV0+As9YWAmbpnrFCCQjI4Aq1EoSkQ5SOrkbLx7D?= =?us-ascii?Q?BKSm2RAkVKwaq4LBxv5bjk94aScx2Lsklecoe+LvqHgCVATWGONYVpIYWYlV?= =?us-ascii?Q?weJpqcWbCxsw+54XNLrrQKXB7hgyL5U0hJj/Z5IUdQYJw98aU0AMnzCz8Dwg?= =?us-ascii?Q?vVnGg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p1x++NRze6QP1XNl6qD55pIsXAaWOt2W9nmzYZ5JnvFV3GSnwEuIjSe3UejkWKC/sZ18vFK573q4jLenH2Jhnjxwoe3uZgnmRUrTk/agiediNKINQxCB8s6j/y15y64x3qt1uXAjzGGFbbFJBrs/g/sTTR7rUVEn7eiPsj4w58xkftdoItN8TEBnIYItKLVhmr/+3d3o503ng2PvgPN4HJceyaUJlJmiZLPbc9p4sdd/O4bcV/BwuwiLI40I38UHwAYo3CrzIcFDlclHjYS5u4aPfUBziGqMXHg6fJVQ6VNe+uZJjCIvmKF5ISGh2kCE60cyRgF9TUdB8bDMXrqUiBz9DYSC5pGmjJn2p5wVFm9TNQrQKjJpLYdSqp5Kqd01Evtw72cuLn3B3z6E20oQV4YihYsyznfcsUpBt/UEC2xns6xQ9bmA4kJqZjQDbTXNEHumy4mt3e9+nBKeob99g9qVjzEblF1Qbn1p0Ds1aALlfcwqZX2WOFtdGah; 24:tW2PDQMmh9CsI7QYooq8RSBOMQZIjg+F/yGPbVV1JqnjLOwlgnF5nS4YgbbwDMpQ428hNhxnZQH7e5OM/uyTUgyyQgt5RPq9B31tvq7Yu48= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1575; 7:fxT1Peep7KHdWtRzKNqphiBozbnZ4aO6k+KKRoMiYPXy0caW9/Gat0I5E/kgeK/FhasZsnknoamLRT7xbAlXSzZe6qgKOvc0wwmKmZOCn1e235FflFEnz8njUeazINtR5zJYgzCvAH+JvDwhzSLJRsBhKx1lH1+4U7crE7UbBHrV+PhFQK14QgXe+avMbtynDnkDUJ7rntqy5mREmf3GKnPEujk1uJkXsV2szT6PpWVLwAWpewjXf03AUW041uRyK3AskMP7LPPd6HRaWe9o1AZTXAF5ghdwvj+ChHxF0/SizwHSR/ifrOa2mQ4oIGP6AYh2R8/k2G7VRwpNekDz7w== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 19:02:09.0675 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1575 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Chad, > sc_cmd->sense_buffer is not guaranteed to be allocated so we need to > sc_cmd->check > if the pointer is NULL before trying to copy anything into it. Applied to 4.13/scsi-queue.
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index ea37c78..ded3860 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -1041,10 +1041,13 @@ static void qedf_parse_fcp_rsp(struct qedf_ioreq *io_req, fcp_sns_len = SCSI_SENSE_BUFFERSIZE; } - memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); - if (fcp_sns_len) - memcpy(sc_cmd->sense_buffer, sense_data, - fcp_sns_len); + /* The sense buffer can be NULL for TMF commands */ + if (sc_cmd->sense_buffer) { + memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); + if (fcp_sns_len) + memcpy(sc_cmd->sense_buffer, sense_data, + fcp_sns_len); + } } static void qedf_unmap_sg_list(struct qedf_ctx *qedf, struct qedf_ioreq *io_req)
NOTE: This should be applied after the series 'qedf: Update driver to version 8.18.22.0.' sc_cmd->sense_buffer is not guaranteed to be allocated so we need to check if the pointer is NULL before trying to copy anything into it. Fixes the crash: [ 143.793176] [0000:00:00.0]:[qedf_eh_device_reset:626]: LUN RESET Issued... [ 143.802996] BUG: unable to handle kernel NULL pointer dereference at (null) [ 143.803063] IP: qedf_parse_fcp_rsp+0xe2/0x290 [qedf] [ 143.803077] PGD 0 [ 143.803078] P4D 0 [ 143.803103] Oops: 0002 [#1] SMP [ 143.803115] Modules linked in: msr(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) raw(E) scsi_transport_iscsi(E) br_netfilter(E) bridge(E) iscsi_ibft(E) iscsi_boot_sysfs(E) intel_rapl(E) sb_edac(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) xfs(E) ghash_clmulni_intel(E) pcbc(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) ipmi_ssif(E) glue_helper(E) iTCO_wdt(E) iTCO_vendor_support(E) lpc_ich(E) ipmi_si(E) pcspkr(E) hpilo(E) ioatdma(E) cryptd(E) ipmi_devintf(E) hpwdt(E) mfd_core(E) shpchp(E) dca(E) thermal(E) pcc_cpufreq(E) ipmi_msghandler(E) acpi_cpufreq(E) af_packet(E) btrfs(E) xor(E) raid6_pq(E) sr_mod(E) cdrom(E) ata_generic(E) sd_mod(E) 8021q(E) garp(E) [ 143.803302] stp(E) llc(E) mrp(E) bnx2fc(E) cnic(E) uio(E) mgag200(E) ata_piix(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) ahci(E) fb_sys_fops(E) bnx2x(E) qedf(E) serio_raw(E) libahci(E) ttm(E) uhci_hcd(E) ehci_pci(E) qed(E) mdio(E) libcrc32c(E) ehci_hcd(E) crc32c_intel(E) drm(E) libata(E) usbcore(E) tg3(E) ptp(E) hpsa(E) pps_core(E) scsi_transport_sas(E) libphy(E) wmi(E) button(E) fcoe(E) libfcoe(E) libfc(E) scsi_transport_fc(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) autofs4(E) [ 143.803438] CPU: 31 PID: 494 Comm: kworker/31:2 Tainted: G E 4.12.0-rc1-69-default+ #1 [ 143.803461] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 08/20/2012 [ 143.803480] Workqueue: qedf_io_wq qedf_fp_io_handler [qedf] [ 143.803496] task: ffff8804181a0000 task.stack: ffffc90003b64000 [ 143.803514] RIP: 0010:qedf_parse_fcp_rsp+0xe2/0x290 [qedf] [ 143.803529] RSP: 0018:ffffc90003b67dc8 EFLAGS: 00010246 [ 143.803544] RAX: 0000000000000000 RBX: ffff880401abdd48 RCX: 000000000000000c [ 143.803563] RDX: 0000000000000060 RSI: ffffffffa039c740 RDI: 0000000000000000 [ 143.803581] RBP: ffffc90003b67df0 R08: ffffffffa039dba8 R09: 0000000000000000 [ 143.803600] R10: 0000000000000000 R11: 0000000000000018 R12: 0000000000000000 [ 143.803619] R13: ffff88040ac80bc8 R14: 0000000000000008 R15: ffff880407c14008 [ 143.803638] FS: 0000000000000000(0000) GS:ffff88043f7c0000(0000) knlGS:0000000000000000 [ 143.804360] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 143.805065] CR2: 0000000000000000 CR3: 0000000001c09000 CR4: 00000000000406e0 [ 143.805753] Call Trace: [ 143.806436] qedf_process_tmf_compl+0x19/0x30 [qedf] [ 143.807124] qedf_process_cqe+0x265/0x280 [qedf] [ 143.807800] qedf_fp_io_handler+0x26/0x60 [qedf] [ 143.808469] process_one_work+0x138/0x370 [ 143.809133] worker_thread+0x4d/0x3b0 [ 143.809797] kthread+0x109/0x140 [ 143.810451] ? rescuer_thread+0x320/0x320 [ 143.811100] ? kthread_park+0x60/0x60 [ 143.811743] ret_from_fork+0x2c/0x40 Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> --- drivers/scsi/qedf/qedf_io.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)