Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp645838imu; Fri, 11 Jan 2019 06:44:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Fw+ztTZGIEEvicidVnU0P9ZI5IOX7ihty6lGrF0KQqeRYM0XPodplRVpv180s1iQJi9ji X-Received: by 2002:a63:82c6:: with SMTP id w189mr13785583pgd.344.1547217852819; Fri, 11 Jan 2019 06:44:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547217852; cv=none; d=google.com; s=arc-20160816; b=sCfw9CYbYtuXJVGYIDLC/44C2+PnFmyB0bTsQkVUISIaaJ+qglNXw+HnDdIXVu4RjH S8HLrahXdLWvQAT79Tegu/v5WCk54INDmBx1CxlF5wYrkx4yCcR6uOC8VDWKTXLAB+bs HlW9wlRwEwNiMifYhcPuZVSbDlsasoHVbwCx6JOhY3RenzZC4iJlsBBJ4jhhW5pnh+Pv oj2G/qfQHjCaLTj2dQeo90uZQ+hU/DSoyPcQwbtDGmigOiHUH1lmyMNhFdDAq3i7rT6D elNn0r63Ed7Rb2A38oUmJvabFbOC71XIK+R/VJ4ByoIZkgxTHyJCOsViOzhfWgtJINzY C7xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xyTvqly9nzahdLIBsdtLooAalnh3DSQFHpnZ79lqY+Q=; b=nX3i2TskUhwZo9Rnn2i9BlEOlmzlEusiqx8hv47XMqREDdH5az+1ZqHC54g8+LE4WO W9tYRljFqw2Wj4PfLabg1GGTyJseDYLxaHkV8c9rzaHZQb9IOuHkcDbfdm4nUckRYvvd PUANKTSlU1IYDcD+GOAPv/WY3mKwe73NwrACgemtPorrU780cy5oU/amD+6v2R2nvRFE Lo3T8dycaPIezf2iGEEYk9Zegdf3Q1m9PyjlWKKynKo4uQKQOCLYEu2v7eZqJLkf689p xmNXCuMJl0ZKlLlMDESAbggEiBF0XL3RJOXY3hwSUnfJ9qBGJig9BhEKu47CL5ZjNyiG 7fVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=12AczPZ9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16si21210235pls.146.2019.01.11.06.43.57; Fri, 11 Jan 2019 06:44:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=12AczPZ9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391363AbfAKOmM (ORCPT + 99 others); Fri, 11 Jan 2019 09:42:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:34928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391351AbfAKOmI (ORCPT ); Fri, 11 Jan 2019 09:42:08 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ACAC22063F; Fri, 11 Jan 2019 14:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217728; bh=2XNpW+HpyJRdvEXVFhp1MNDTYtnk4CSy4Bf1h4/krQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=12AczPZ9k1s5vouzOxdONUDkQRqbCLtUcJdG2Hv/75K3Uloc26rpwglwf7O9D2FAk oVX/Z7vzlx9gHXI48+AuG/ynFcOGQgdtvQes/HJzOO5J6h3xrUjEF7a2pcnZDt1tJU sJLmOJZOx5zKiV+j6wPga97jXYfE/OJgPQDA6+6g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Ewan D. Milne" , Laurence Oberman , "Martin K. Petersen" Subject: [PATCH 4.20 02/65] scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid Date: Fri, 11 Jan 2019 15:14:48 +0100 Message-Id: <20190111131056.286850843@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131055.331350141@linuxfoundation.org> References: <20190111131055.331350141@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ewan D. Milne commit 4e87eb2f46ea547d12a276b2e696ab934d16cfb6 upstream. Certain older adapters such as the OneConnect OCe10100 may not have a valid wqpcnt value. In this case, do not set queue->page_count to 0 in lpfc_sli4_queue_alloc() as this will prevent the driver from initializing. Fixes: 895427bd01 ("scsi: lpfc: NVME Initiator: Base modifications") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Ewan D. Milne Reviewed-by: Laurence Oberman Tested-by: Laurence Oberman Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc_sli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -14501,7 +14501,8 @@ lpfc_sli4_queue_alloc(struct lpfc_hba *p hw_page_size))/hw_page_size; /* If needed, Adjust page count to match the max the adapter supports */ - if (queue->page_count > phba->sli4_hba.pc_sli4_params.wqpcnt) + if (phba->sli4_hba.pc_sli4_params.wqpcnt && + (queue->page_count > phba->sli4_hba.pc_sli4_params.wqpcnt)) queue->page_count = phba->sli4_hba.pc_sli4_params.wqpcnt; INIT_LIST_HEAD(&queue->list);