Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5011118pxu; Thu, 10 Dec 2020 10:38:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiYi198YTpg8lrvYdJDoN8x40gpqD3HE3JXdaidLCzqcTKAydZ9aKeO0e+F6EpIBAbGz4k X-Received: by 2002:a05:6402:10ce:: with SMTP id p14mr8104743edu.12.1607625521400; Thu, 10 Dec 2020 10:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607625521; cv=none; d=google.com; s=arc-20160816; b=ieKIcykp1NcEoJiKkUBcFMd++rI0cmMy6rDNgl4eJXaQCnwV/UE6zazmMwLB053aJr RYC38U3RM4Qf/gtW37iDOY8Hu4InzaazW8MTAOuAuCzYvLqLoCulYGCAKcky7OJm6rCp FYS/Kog6Tq723+BvC6hL6IX1TEty2NrYJA3NZ+bDchqTTI4NuDiitAVDlcYg7B2eOADt 2BOuZBF3bBS1Tn44j8FqHJxXTIGSMJ9oRNh1ybVBnGf7Dh8ciZihMsD/UB5t/rwt7TVj oV34vLkKofa5vdXXvt2svZp0ri6aHCQ2wHRgaPcxDoQrMDVDNFTpNdeuwTAj+IH9g++D dVtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=51bZWaLxMctxvc9WQNRwVw3FtbEJVi9Dqkpq2VQqLYU=; b=LH62TEy+MBKZRgjWNE0SzMGPYByC5wx43EnPBP6fECcQ008H1gn6RoVKUWvIJxw0jm GrNzPMP5PeQuCoeQtWvlccPa9dHivu3A9qdjhn8tkmHd0EDQxxOXGeG7r1mHMQ8MyrBj /KZSRd7mcQ73Wjwqx1Y/Bzh0WH4B6VkN/8gc4o08+nXs7FNCD5U7HHXHF4eH0AhuCoM5 VMShCW8/mRtO2pbuQGH1RuxmtpPxSwzJCyxFSRHxpPlTPKsy1ePOV41gtVWyxyAsU5L1 gCrgMSEdxZMZNm2x1hNkdcRCRTIpnqlbTb1UG+5ObRWO7tY/jON4qnLihJ0VV+F4J1yq nLYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd25si3252469edb.438.2020.12.10.10.38.17; Thu, 10 Dec 2020 10:38:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389213AbgLJSfm (ORCPT + 99 others); Thu, 10 Dec 2020 13:35:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:41670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389176AbgLJOdV (ORCPT ); Thu, 10 Dec 2020 09:33:21 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suganath Prabu S , "Martin K. Petersen" Subject: [PATCH 4.19 19/39] scsi: mpt3sas: Fix ioctl timeout Date: Thu, 10 Dec 2020 15:26:58 +0100 Message-Id: <20201210142603.229611427@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.272595094@linuxfoundation.org> References: <20201210142602.272595094@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suganath Prabu S commit 42f687038bcc34aa919e0e4c29b04e4cda3f6a79 upstream. Commit c1a6c5ac4278 ("scsi: mpt3sas: For NVME device, issue a protocol level reset") modified the ioctl path 'timeout' variable type to u8 from unsigned long, limiting the maximum timeout value that the driver can support to 255 seconds. If the management application is requesting a higher value the resulting timeout will be zero. The operation times out immediately and the ioctl request fails. Change datatype back to unsigned long. Link: https://lore.kernel.org/r/20201125094838.4340-1-suganath-prabu.subramani@broadcom.com Fixes: c1a6c5ac4278 ("scsi: mpt3sas: For NVME device, issue a protocol level reset") Cc: #v4.18+ Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -654,7 +654,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPT struct _pcie_device *pcie_device = NULL; u32 ioc_state; u16 smid; - u8 timeout; + unsigned long timeout; u8 issue_reset; u32 sz, sz_arg; void *psge;