From: Finn Thain <fthain@linux-m68k.org>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Hannes Reinecke <hare@suse.com>,
Michael Schmitz <schmitzmic@gmail.com>,
Ondrej Zary <linux@zary.sk>, Stan Johnson <userm57@yahoo.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 05/11] scsi: mac_scsi: Enable scatter/gather by default
Date: Wed, 07 Aug 2024 13:36:28 +1000 [thread overview]
Message-ID: <f155ba5ce93055cbc6ac6d4026673f40f826edb8.1723001788.git.fthain@linux-m68k.org> (raw)
In-Reply-To: <cover.1723001788.git.fthain@linux-m68k.org>
Now that FLAG_DMA_FIXUP has itself been fixed up, it can be used to enable
scatter/gather. Increase the default value for sg_tablesize to SG_ALL
for those systems which are compatible with FLAG_DMA_FIXUP.
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
---
drivers/scsi/mac_scsi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index 2e9fad1e3069..6ab7d82c9a99 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -432,7 +432,7 @@ static struct scsi_host_template mac_scsi_template = {
.eh_host_reset_handler = macscsi_host_reset,
.can_queue = 16,
.this_id = 7,
- .sg_tablesize = 1,
+ .sg_tablesize = SG_ALL,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
.cmd_size = sizeof(struct NCR5380_cmd),
@@ -470,6 +470,9 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
if (setup_hostid >= 0)
mac_scsi_template.this_id = setup_hostid & 7;
+ if (macintosh_config->ident == MAC_MODEL_IIFX)
+ mac_scsi_template.sg_tablesize = 1;
+
instance = scsi_host_alloc(&mac_scsi_template,
sizeof(struct NCR5380_hostdata));
if (!instance)
@@ -491,6 +494,9 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;
+ if (instance->sg_tablesize > 1)
+ host_flags |= FLAG_DMA_FIXUP;
+
error = NCR5380_init(instance, host_flags | FLAG_LATE_DMA_SETUP);
if (error)
goto fail_init;
--
2.39.5
next prev parent reply other threads:[~2024-08-07 3:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 3:36 [PATCH 00/11] NCR5380: Bug fixes and other improvements Finn Thain
2024-08-07 3:36 ` [PATCH 09/11] scsi: NCR5380: Remove redundant result calculation from NCR5380_transfer_pio() Finn Thain
2024-08-07 3:36 ` [PATCH 01/11] scsi: mac_scsi: Revise printk(KERN_DEBUG ...) messages Finn Thain
2024-08-07 3:36 ` [PATCH 04/11] scsi: NCR5380: Check for phase match during PDMA fixup Finn Thain
2024-08-07 3:36 ` [PATCH 08/11] scsi: NCR5380: Drop redundant member from struct NCR5380_cmd Finn Thain
2024-08-07 3:36 ` [PATCH 11/11] scsi: NCR5380: Clean up indentation Finn Thain
2024-08-07 3:36 ` [PATCH 06/11] scsi: NCR5380: Initialize buffer for MSG IN and STATUS transfers Finn Thain
2024-08-07 3:36 ` [PATCH 07/11] scsi: NCR5380: Handle BSY signal loss during information transfer phases Finn Thain
2024-08-07 3:36 ` [PATCH 02/11] scsi: mac_scsi: Refactor polling loop Finn Thain
2024-08-07 3:36 ` [PATCH 03/11] scsi: mac_scsi: Disallow bus errors during PDMA send Finn Thain
2024-08-07 3:36 ` [PATCH 10/11] scsi: NCR5380: Remove obsolete comment Finn Thain
2024-08-07 3:36 ` Finn Thain [this message]
2024-08-13 2:07 ` [PATCH 00/11] NCR5380: Bug fixes and other improvements Martin K. Petersen
2024-08-17 1:34 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f155ba5ce93055cbc6ac6d4026673f40f826edb8.1723001788.git.fthain@linux-m68k.org \
--to=fthain@linux-m68k.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hare@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@zary.sk \
--cc=martin.petersen@oracle.com \
--cc=schmitzmic@gmail.com \
--cc=userm57@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®