From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com> To: stable@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Subject: [PATCH] mpt3sas: Fix timeout issue in ioctl commands. Date: Wed, 25 Nov 2020 15:18:38 +0530 [thread overview] Message-ID: <20201125094838.4340-1-suganath-prabu.subramani@broadcom.com> (raw) [-- Attachment #1: Type: text/plain, Size: 1249 bytes --] Description of issue: Patch with commit id "c1a6c5ac4278d406c112cc2f038e6e506feadff9" has modified ioctl path 'timeout' variable type to u8 from unsigned long. With this maximum timeout value that the driver can support is 255 seconds. But for some commands application is providing the higher timeout value (512 seconds as default), so it will be round off to zero value. Hence timeout is observed immediately and the IOCTL request fails. Fix: Inorder to accommodate higher timeout value change datatype back to unsigned long. Cc: <stable@vger.kernel.org> #v4.18+ Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com> --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b21aa55..c8a0ce1 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -664,7 +664,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, Mpi26NVMeEncapsulatedRequest_t *nvme_encap_request = NULL; struct _pcie_device *pcie_device = NULL; u16 smid; - u8 timeout; + unsigned long timeout; u8 issue_reset; u32 sz, sz_arg; void *psge; -- 2.27.0 [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4202 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com> To: stable@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Subject: [PATCH] mpt3sas: Fix timeout issue in ioctl commands. Date: Wed, 25 Nov 2020 15:18:38 +0530 [thread overview] Message-ID: <20201125094838.4340-1-suganath-prabu.subramani@broadcom.com> (raw) [-- Attachment #1: Type: text/plain, Size: 1249 bytes --] Description of issue: Patch with commit id "c1a6c5ac4278d406c112cc2f038e6e506feadff9" has modified ioctl path 'timeout' variable type to u8 from unsigned long. With this maximum timeout value that the driver can support is 255 seconds. But for some commands application is providing the higher timeout value (512 seconds as default), so it will be round off to zero value. Hence timeout is observed immediately and the IOCTL request fails. Fix: Inorder to accommodate higher timeout value change datatype back to unsigned long. Cc: <stable@vger.kernel.org> #v4.18+ Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com> --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b21aa55..c8a0ce1 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -664,7 +664,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, Mpi26NVMeEncapsulatedRequest_t *nvme_encap_request = NULL; struct _pcie_device *pcie_device = NULL; u16 smid; - u8 timeout; + unsigned long timeout; u8 issue_reset; u32 sz, sz_arg; void *psge; -- 2.27.0 [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4202 bytes --]
next reply other threads:[~2020-11-25 9:50 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-25 9:48 Suganath Prabu S [this message] 2020-11-25 9:48 ` [PATCH] mpt3sas: Fix timeout issue in ioctl commands Suganath Prabu S 2020-12-01 6:06 ` Martin K. Petersen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201125094838.4340-1-suganath-prabu.subramani@broadcom.com \ --to=suganath-prabu.subramani@broadcom.com \ --cc=Sathya.Prakash@broadcom.com \ --cc=linux-scsi@vger.kernel.org \ --cc=sreekanth.reddy@broadcom.com \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.