Skip to content

Commit 2ac6d29

Browse files
fthainmartinkpetersen
authored andcommitted
scsi: mac_scsi: Enable scatter/gather by default
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 <[email protected]> Signed-off-by: Finn Thain <[email protected]> Link: https://lore.kernel.org/r/f155ba5ce93055cbc6ac6d4026673f40f826edb8.1723001788.git.fthain@linux-m68k.org Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 5768718 commit 2ac6d29

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/scsi/mac_scsi.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static struct scsi_host_template mac_scsi_template = {
432432
.eh_host_reset_handler = macscsi_host_reset,
433433
.can_queue = 16,
434434
.this_id = 7,
435-
.sg_tablesize = 1,
435+
.sg_tablesize = SG_ALL,
436436
.cmd_per_lun = 2,
437437
.dma_boundary = PAGE_SIZE - 1,
438438
.cmd_size = sizeof(struct NCR5380_cmd),
@@ -470,6 +470,9 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
470470
if (setup_hostid >= 0)
471471
mac_scsi_template.this_id = setup_hostid & 7;
472472

473+
if (macintosh_config->ident == MAC_MODEL_IIFX)
474+
mac_scsi_template.sg_tablesize = 1;
475+
473476
instance = scsi_host_alloc(&mac_scsi_template,
474477
sizeof(struct NCR5380_hostdata));
475478
if (!instance)
@@ -491,6 +494,9 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
491494

492495
host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;
493496

497+
if (instance->sg_tablesize > 1)
498+
host_flags |= FLAG_DMA_FIXUP;
499+
494500
error = NCR5380_init(instance, host_flags | FLAG_LATE_DMA_SETUP);
495501
if (error)
496502
goto fail_init;

0 commit comments

Comments
 (0)