From patchwork Tue Apr 2 13:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13614062 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 8DB5F1292D3; Tue, 2 Apr 2024 13:07:35 +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=1712063257; cv=none; b=c5hIE8KmZ1uHWkN0gMKmdK8/cCUsfdLzMeHl2ZOViqQNNI7FFggCSl/c8PGyQvkjKc/pRVZdPH08dEvvdrEEcn96b8NGUhiemWp7bQZFtJQk3r9ttdG4LtFNFO+D8uOkGLOsWCddIzYpYagMJ2vCdXqCRjISYiNi4uomri/k8Rw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712063257; c=relaxed/simple; bh=TmJnke1Un4zv860nSDoxdf6e1gHfrAhho0QeoNMAYTM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZERtss2I5oZlvMiinFhu5AoQ68auFturFQnTDyqWETFeDFf+55xehmlaHXGIqgpkYNpzRB4BGstP9aJ1vDws23RexlfVBeCpywbKCDrfmA+oNusJuFiMTtQyPjndWytmxU0HSejXbMUm2mS0aXJZLNSB6mbgQNDgRmS4D98HEcU= 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=MyL3Sce5; 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="MyL3Sce5" 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=SIIkUrTZx1WSQtHQl6hiIrj9ZtAFhhqtXXsQ0Oh8ifQ=; b=MyL3Sce5QHhL2X+sxet0j2H7ho xVgqq/Jozdr5YrjT+AuiDyrdVf0Bxak3GIWtEkOwpBtGwkTlpG+1kOCcNgEB51cck9GERZzJ3rLvx 3885u12fKP8A3pgqoPdqqkwsj+wfOLxJw/VaCx04nf6+2/Z2YP+8OouQcfafjtJ+YvEE04QYVVfFQ UuwMHuuTirt/PY5nLoDR7kzLrzbEl31jFSdRT5+1OqFGs4FZQ6O28q1WzrgtOEkZaybqrFAo8lIZo wJB3msqORJUerOSLv3VNbWPSCmdZvlPOyT/RdK+cLpUaF8k0/YYhbUZ7y1gooWgNj6WIZuPdlxToI 2+XnKgJg==; 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 1rrdrI-0000000BFZX-0Mtp; Tue, 02 Apr 2024 13:07:24 +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 13/23] sbp2: switch to using ->device_configure Date: Tue, 2 Apr 2024 15:06:35 +0200 Message-Id: <20240402130645.653507-14-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-usb@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 Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- drivers/firewire/sbp2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 8f7810b2a4c10f..827dee0f57dde2 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1506,7 +1506,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev) return 0; } -static int sbp2_scsi_slave_configure(struct scsi_device *sdev) +static int sbp2_scsi_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct sbp2_logical_unit *lu = sdev->hostdata; @@ -1532,7 +1533,7 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev) sdev->start_stop_pwr_cond = 1; if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) - blk_queue_max_hw_sectors(sdev->request_queue, 128 * 1024 / 512); + lim->max_hw_sectors = 128 * 1024 / 512; return 0; } @@ -1590,7 +1591,7 @@ static const struct scsi_host_template scsi_driver_template = { .proc_name = "sbp2", .queuecommand = sbp2_scsi_queuecommand, .slave_alloc = sbp2_scsi_slave_alloc, - .slave_configure = sbp2_scsi_slave_configure, + .device_configure = sbp2_scsi_device_configure, .eh_abort_handler = sbp2_scsi_abort, .this_id = -1, .sg_tablesize = SG_ALL,