From patchwork Wed Nov 25 09:48:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 333408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_NO_TEXT, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3046DC56201 for ; Wed, 25 Nov 2020 09:50:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABEAB2083E for ; Wed, 25 Nov 2020 09:50:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="S+y5lTGk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbgKYJu5 (ORCPT ); Wed, 25 Nov 2020 04:50:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbgKYJu5 (ORCPT ); Wed, 25 Nov 2020 04:50:57 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4CCC0613D4 for ; Wed, 25 Nov 2020 01:50:57 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id m9so1998856pgb.4 for ; Wed, 25 Nov 2020 01:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=JPYgip/RsEihyzoh8iK0QIiJFDN8Q8oI4iD1r+xKpJY=; b=S+y5lTGkFZ6KSMn46KFmyLiCl4g74MYvqF/09qFvVKeV3dEFWJ3x18Wq8euBjpcJ53 ZkI1DETaYlnhsv1U0CkfZBK7crHyIrhGpjelay27wD+nhIPCsslnZ3SpoHGJWqPuubnU cCoN8aLXhgqR0qDupLAaf+BnyP5e/xZ2M2xVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=JPYgip/RsEihyzoh8iK0QIiJFDN8Q8oI4iD1r+xKpJY=; b=djTNWMEUcb5IiMhrdMjrO06W7Wre26u52TLZGa6Mm4KY8xJySG8o60WnKzLitDKcXS HU41hMMP3FebNDKibfifbqJwWVFbgYXbwoAFLfGl4dit7J9fzGTEVwezj9tp5EBdzNnD lzCSgdPu5fX4jxZQ6yhli6rGTMe0J4FBMtQDt5Ee6voKlfehAivvbP41Igfbm2okzmG6 GemGafWypWrBDI1wXzwRU71q9JOOh3dh/Kcg1BedEvKnPdwwU04YVRFSLC6uu0m1B5hu XzvYRc60p8gsk7EDiDrwOdV4Df3JB79kq6ZSTojddVEYSNs2bJGb7h822QfBqmvaGJMa b0Rw== X-Gm-Message-State: AOAM531qHKxYcmDhrfo3IHxlj39+Rz2Gn5YUrRnB7pMGX42ppb8u/7Ed biDyPtl3FydbJM0trn8clkKpvUXQ9r72WeV3 X-Google-Smtp-Source: ABdhPJyFmMUb8SChWbEB98AZ2AZMskrvpL9TnZSDJ8HSEe2qSwsA5ZbsLQ9pB0vlV/M+zl6mgSMleQ== X-Received: by 2002:a63:d110:: with SMTP id k16mr2383578pgg.284.1606297856261; Wed, 25 Nov 2020 01:50:56 -0800 (PST) Received: from dhcp-10-123-20-14.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q21sm1742858pgk.3.2020.11.25.01.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 01:50:55 -0800 (PST) From: Suganath Prabu S To: stable@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, Suganath Prabu S Subject: [PATCH] mpt3sas: Fix timeout issue in ioctl commands. Date: Wed, 25 Nov 2020 15:18:38 +0530 Message-Id: <20201125094838.4340-1-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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: #v4.18+ Signed-off-by: Suganath Prabu S --- 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;