Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4737543pxj; Wed, 12 May 2021 12:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5Y9KU1VWYm1PuA1rdsbDkzFAE2uEPZ1RPs4B+axSYShx61FCoGyjPrtmtgaE9xs+MdJxi X-Received: by 2002:a50:d54c:: with SMTP id f12mr22171283edj.301.1620846262035; Wed, 12 May 2021 12:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620846262; cv=none; d=google.com; s=arc-20160816; b=ZR+R7fDoCuPxAZmmVPoG3OVJ80JjEboKlLj2+4R9lxkb4fvyPofB8qrKPDiEZ5weau QqKwG1R+VY8LRa0tgmHr7O6F/lXifYLoYny2nlbaxbxDc7gwNRw119V3EaYmzhOPIRKN 613Cfg7E08WAcNy+uZ7JeHjYHEW+MVUYuRsEfyJkVUoVZcm2AMhG8nvBg4Tu5jl9cGFh trbEumswrfwmKUxS0yXMn6fghL+RwjJ7opm9IGHv63gd7xOTabZgBcBorLGCpm0du4mF orWCXnB/AoRX1vG7v2M8aqqkho52q5GiPbqWlojyNSZt9tqxIF6rP9EPPwPcei5tsWBW 7yHw== 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:dkim-signature; bh=P4CWmzCf+81jtKOiHcYnFp6R3y3n+7/3Im8J3P30kNU=; b=0ukV7ybdOwxuapOWJY8f5WjdPTvyqKcr39ClwM0VeiF8R/GwZhd/jHnhIVrtnCyp/e 154vGFKR2YBcqGsNEZFBmBkkQVUcRFxv+ub2vs+ULq2RdgBM5yke8lq+pDSZdmbgsrfr +kYcQFFMY21QE0wGso1kOmPX782DIjUHTOqIINXL8CAqvWVpLmlApT6omtQBzukE49mh 5ZH6oSeYHPZOOZKHpFJ/UMqL1InVaEp3TQl2GmZ2V1OjC+SPNB5/SoZKhm4FAU0Rg1PO odRU4qLobPRG4NUCyH/mkD03R3Ck/ha8jexSm1vcawsTmv42JkkrhDCbtXaH1i/M8Nhl O7WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nfOOmSLs; 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=pass (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 t9si522031edd.64.2021.05.12.12.03.58; Wed, 12 May 2021 12:04:22 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nfOOmSLs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359241AbhELSwp (ORCPT + 99 others); Wed, 12 May 2021 14:52:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243894AbhELQmM (ORCPT ); Wed, 12 May 2021 12:42:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F328961C50; Wed, 12 May 2021 16:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620835676; bh=SenCBhSS6IYwrXZeMOIFRbqTOuuBeY2nmthpq/qtgCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nfOOmSLszoRQZY3rCwGOxvgH5mZpRnVJ4qhBcEsyzevcG90MvoUJFVXEzI75yml3M bY5HwrZjbcflqpOwnALiws/5IidsL9G47/z8p/vvWKPOU0sVTlTO9JrRe3oZgfHLqb fJvo2YPsaiG+Rkj+Gt11kBH1aAiTxm5GjuD1FYKo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vishakha Channapattan , Jack Wang , Igor Pylypiv , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.12 413/677] scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check() Date: Wed, 12 May 2021 16:47:39 +0200 Message-Id: <20210512144851.065994600@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144837.204217980@linuxfoundation.org> References: <20210512144837.204217980@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: Igor Pylypiv [ Upstream commit 3f744a14f331f56703a9d74e86520db045f11831 ] The mpi_uninit_check() takes longer for inbound doorbell register to be cleared. Increase the timeout substantially so that the driver does not fail to load. Previously, the inbound doorbell wait time was mistakenly increased in the mpi_init_check() instead of mpi_uninit_check(). It is okay to leave the mpi_init_check() wait time as-is as these are timeout values and if there is a failure, waiting longer is not an issue. Link: https://lore.kernel.org/r/20210406180534.1924345-2-ipylypiv@google.com Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check") Reviewed-by: Vishakha Channapattan Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 84315560e8e1..c6b0834e3806 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -1502,9 +1502,9 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha) /* wait until Inbound DoorBell Clear Register toggled */ if (IS_SPCV_12G(pm8001_ha->pdev)) { - max_wait_count = 4 * 1000 * 1000;/* 4 sec */ + max_wait_count = 30 * 1000 * 1000; /* 30 sec */ } else { - max_wait_count = 2 * 1000 * 1000;/* 2 sec */ + max_wait_count = 15 * 1000 * 1000; /* 15 sec */ } do { udelay(1); -- 2.30.2