From patchwork Tue Apr 2 13:06:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13613989 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 C27D783CD4; Tue, 2 Apr 2024 13:07:06 +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=1712063228; cv=none; b=K6S/HGh6GHMbXPTULg/koESYE1TdHCm146cMqfAqy+0LOg9T9dOaOodoy1/quQykwSPivkiGJTzrahZzSsvUOpAiCj2n/jRHPvv1fB96OZ3X+iPGPVbtD3MElJQpagLEAUv9cwjfPq7/8nqSdGKNmHxaBjDwV/+5HjFOKVHOqLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712063228; c=relaxed/simple; bh=D7JcJf5lW/nzXp/yCy9EfyN3UYaCdaFumjv+LGK1570=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lU2GtRBaIB8363YpAFluq0Z/1Cc2IOCrfP8/X9aV7xdTiIUsaRFUr0Gnt/d614SXloSan4Aq832wnlf+ltGLE8z7kDxMsj6am3ETQR+w+FQrDI6+WvLFJn54TUyQGj69sXq7RxsylfaX8uRmiU2i8p67lwDzQzqqEkBIZHWrhqs= 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=R2MxJ9Yr; 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="R2MxJ9Yr" 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=Y6R85ITUqUhwT/3IQ1uLG/rghT5v0IaA7UulK+Ug8sg=; b=R2MxJ9Yr1BVlXxF84Ucl7ICA8T rQZzabNCFpjStk6hZiIiont3ft5uHx8DkLAWtJk/5zAkpJO5aHteinHY1EUw+zd8US1h/E2mO7Plk rD0GSftuofZ79m3HhJanX0V74OZGNv79e6BymzUuQNAQufaLrRUMEKuvVxgARPInnZcC9jcRmEkWo HJxZgiVe+aSEVwI3NYYPU6IndNoIvzyEFArln7Yvcf4sYJSP+VNAY8xgRxwz+i9I1qFqp/pO9nXX1 UMcA2TT+cQH8RurB9XfblljG7HjpHamvgJNIe8BQBceWiNVmNJ2Dj/NvUy0KcxvKit2DLlbl+xHdj Ylh/qAMg==; Received: from [2001:4bb8:199:60a5:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrdqp-0000000BFL1-15TB; Tue, 02 Apr 2024 13:06:56 +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, 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: Tue, 2 Apr 2024 15:06:25 +0200 Message-Id: <20240402130645.653507-4-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240402130645.653507-1-hch@lst.de> References: <20240402130645.653507-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-block@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 Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- 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 ce5445eb9d0e4e..05e061fc6d3a06 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; } /**