From patchwork Sun Mar 24 23:54:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 782511 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB1612A13F8; Sun, 24 Mar 2024 23:55:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324526; cv=none; b=YCP+vKUSEvf6GYdSEGuxT8gG2If+1R1q1VTGC3E6VfRPYKXdCCWr1WFUWI6MEOm+6+uqxk6f6ojXtyyT2H6ZtcXe8lo2bv7drbZESeyEMQ3gZM7niVdb42cm+joQz4KHRxiDIz0tfGLeakM9s2ojUUJA5Tf97CtFQSrDbwpdAWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324526; c=relaxed/simple; bh=SS1yTHEAQDD3w9s+Mjiofow/qSBj0zGshMyCSM4kL2Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a2Du5H6o5GBvH97hWZ2cjHowx0ePcfWZC8imSkTu6rtn3EmD5Une4ggA1+DF1MndqOO0sujavRS1s4jPRxzEI+2HyatB8TybTxdgNXB/PabcQ/qM9LjbrpMp8tibcwT4aeikYo9v2rRnqXPC0LK5bZaakUFBzjIqj0bTHgW1SG0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=T1SKhq3a; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="T1SKhq3a" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=NwLMcvkQUo8PtF9LJnhVVt6koTFG/GgNCOMHm1clmTA=; b=T1SKhq3azcBf3UbZ393DbYNVT/ TcmhU3WxzjVFIA+zYenFQZlGBRdTIcR3Lg8Wywk5EaAM0Qmc39by7dRCww/fVvwRVv9xvqbZc43mJ hsN4CKCVN4/w+vmbSJtNvtZZlQGal4fnX7WdUcOM3eGnYzVbIoaqHIOqn5uWATZki++Ip527AOr4W pGujl2g2F3H29i/ohpRn1ob3LOS4jSKItzyUPrzxeMYkGbUEgnG2mixP8ajzLXbm4WmNAlnAJJ/Il Blk2aZlnuu383olq413J8HZCC64eHNctGsSeEmkDzSmOlZaEnk0P8S7BTA5tRZA+6VZj18ql28D7v xoBqtvhw==; Received: from [210.13.83.2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1roXg6-0000000DzMm-2vNS; Sun, 24 Mar 2024 23:55:03 +0000 From: Christoph Hellwig To: Jens Axboe , "Martin K. Petersen" Cc: Damien Le Moal , Niklas Cassel , Takashi Sakamoto , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , "Juergen E. Fischer" , Xiang Chen , HighPoint Linux Team , Tyrel Datwyler , Brian King , Lee Duncan , Chris Leech , Mike Christie , John Garry , Jason Yan , Kashyap Desai , Sumit Saxena , Shivasharan S , Chandrakanth patil , Jack Wang , Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, Greg Kroah-Hartman , Alim Akhtar , Avri Altman , Bart Van Assche , Krzysztof Kozlowski , Alan Stern , linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux1394-devel@lists.sourceforge.net, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com, megaraidlinux.pdl@broadcom.com, mpi3mr-linuxdrv.pdl@broadcom.com, linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net Subject: [PATCH 03/23] mpi3mr: pass queue_limits to bsg_setup_queue Date: Mon, 25 Mar 2024 07:54:28 +0800 Message-Id: <20240324235448.2039074-4-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240324235448.2039074-1-hch@lst.de> References: <20240324235448.2039074-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Pass the limits to bsg_setup_queue instead of setting them up on the live queue. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry --- drivers/scsi/mpi3mr/mpi3mr_app.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c index 0bac3f49d8057d..1dd097f9d7b78c 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_app.c +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c @@ -1838,6 +1838,10 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc) { struct device *bsg_dev = &mrioc->bsg_dev; struct device *parent = &mrioc->shost->shost_gendev; + struct queue_limits lim = { + .max_hw_sectors = MPI3MR_MAX_APP_XFER_SECTORS, + .max_segments = MPI3MR_MAX_APP_XFER_SEGMENTS, + }; device_initialize(bsg_dev); @@ -1853,20 +1857,14 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc) return; } - mrioc->bsg_queue = bsg_setup_queue(bsg_dev, dev_name(bsg_dev), NULL, + mrioc->bsg_queue = bsg_setup_queue(bsg_dev, dev_name(bsg_dev), &lim, mpi3mr_bsg_request, NULL, 0); if (IS_ERR(mrioc->bsg_queue)) { ioc_err(mrioc, "%s: bsg registration failed\n", dev_name(bsg_dev)); device_del(bsg_dev); put_device(bsg_dev); - return; } - - blk_queue_max_segments(mrioc->bsg_queue, MPI3MR_MAX_APP_XFER_SEGMENTS); - blk_queue_max_hw_sectors(mrioc->bsg_queue, MPI3MR_MAX_APP_XFER_SECTORS); - - return; } /**