From patchwork Sun Mar 24 23:54:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 782562 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 EB18D2A4910; Sun, 24 Mar 2024 23:56:07 +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=1711324569; cv=none; b=eBOhVIxXpUgVts3OJEOthv/fK6gAd5Z4FxcfsfLSgM+n+yupe692BFJi6PEYE3jNHcfh2C7RXwr2TPKfOJX0Ea3WD6LaT8mT6GJxQA+sMIeS4D5HCzTjpcGTxHoWswzvz8o1BbqjxWK6NZlz9g8V7WI+1ZOvzDbIrFCYHaiprks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324569; c=relaxed/simple; bh=QkaP0e8Mes0ggr8tSjRKR1hnJDvnEOKjDSalc0xzATQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gy0YVvhZshgCxetGXTSrrn7f0ungxKwmj7c654WqPehVEt44iC8ViQC4xGVS5Nz3RAS2BYlTgd8L0UAnFVMzDpxWGisl9k/gnwgUIC+VzOOZhB/IIJphIz3uD6m1ryep1+YXS/xB8fUFgbppadZ6skpz0ELYhj1y8hhgJK2GTsY= 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=yaNYGNDq; 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="yaNYGNDq" 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=ouyfZJOprAivUD3pQoGhzFC7pBq223cKtZHCDHGO3TU=; b=yaNYGNDq75sSccoFdn2AV2nsme 3FWw3HqCcY9hlgmeZ0OAIU1iUEKf1570UJhQ/87GUC4ZlaKEkidBy/C/M78P3MAQ4Csx241lFn0oN CA+GmTa0zo9TYcNosWT8dOKZANebHq18BOMi4disy08EnkqBRDzvZUV9FTQC2L0U3UXG6XSfKiCPd gQAgdf7GNKiDHC7HGs4qPUXrB0OcCBDLQbl9g8T7p4GZkStzqsblT6BebaTW/9lKujDcMU9rqlz5f cObpYrbGlO/Rhie/ztGrxo6qC2VLMM6ALfep4fXq5FCgA4/qkmfFVJQM5f6xIzRKogfDRB5CaPO/H DVxo3EKg==; Received: from [210.13.83.2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1roXgy-0000000Dzft-48tF; Sun, 24 Mar 2024 23:55:57 +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 14/23] hptiop: switch to using ->device_configure Date: Mon, 25 Mar 2024 07:54:39 +0800 Message-Id: <20240324235448.2039074-15-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-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 --- drivers/scsi/hptiop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index f5334ccbf2cac3..e889f268601b4f 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -1151,11 +1151,11 @@ static struct attribute *hptiop_host_attrs[] = { ATTRIBUTE_GROUPS(hptiop_host); -static int hptiop_slave_config(struct scsi_device *sdev) +static int hptiop_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { if (sdev->type == TYPE_TAPE) - blk_queue_max_hw_sectors(sdev->request_queue, 8192); - + lim->max_hw_sectors = 8192; return 0; } @@ -1168,7 +1168,7 @@ static const struct scsi_host_template driver_template = { .emulated = 0, .proc_name = driver_name, .shost_groups = hptiop_host_groups, - .slave_configure = hptiop_slave_config, + .device_configure = hptiop_device_configure, .this_id = -1, .change_queue_depth = hptiop_adjust_disk_queue_depth, .cmd_size = sizeof(struct hpt_cmd_priv),