Thread (11 messages) 11 messages, 4 authors, 2024-06-06

Re: [PATCH 04/23] scsi: initialize scsi midlayer limits before allocating the queue

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-06-06 12:33:44
Also in: linux-block, linux-ide, linux-scsi, regressions

John Garry [off-list ref] writes:
quoted
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index 817838e2f70e..3cb455a32d92 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -915,10 +915,13 @@ static const struct scsi_host_template pata_macio_sht = {
  	.sg_tablesize		= MAX_DCMDS,
  	/* We may not need that strict one */
  	.dma_boundary		= ATA_DMA_BOUNDARY,
-	/* Not sure what the real max is but we know it's less than 64K, let's
-	 * use 64K minus 256
+	/*
+	 * The SCSI core requires the segment size to cover at least a page, so
+	 * for 64K page size kernels this must be at least 64K. However the
+	 * hardware can't handle 64K, so pata_macio_qc_prep() will split large
+	 * requests.
  	 */
-	.max_segment_size	= MAX_DBDMA_SEG,
+	.max_segment_size	= SZ_64K,
  	.device_configure	= pata_macio_device_configure,
  	.sdev_groups		= ata_common_sdev_groups,
  	.can_queue		= ATA_DEF_QUEUE,
Feel free to add:
Reviewed-by: John Garry <john.g.garry@oracle.com>
Thanks.

Sorry I missed adding this when sending the proper patch, maybe whoever
applies it can add it then.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help