Skip to contentSkip to conversation

s390/dasd: fix DMA alignment

PATCH Applied Stefan Haberland 2 participants 4 messages Aug 4, 2022

Subsystems (3)
lore
Share & tools
lore

Stefan Haberland

author maintainer
#0 lore raw

cover s390/dasd: fix DMA alignment

Hi Jens,

please apply the following patches.
The first fixes a comment typo and the second fixes DMA alignment after a change to the iomap code.

Eric Farman (1):
s390/dasd: Establish DMA alignment

Jiang Jian (1):
s390/dasd: drop unexpected word 'for' in comments

 drivers/s390/block/dasd.c      | 2 +-
 drivers/s390/block/dasd_diag.c | 1 +
 drivers/s390/block/dasd_eckd.c | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/2 s390/dasd: drop unexpected word 'for' in comments

From: Jiang Jian <[email protected]>

there is an unexpected word 'for' in the comments that need to be dropped

file - drivers/s390/block/dasd.c
line - 1728

	/* check for for attention message */

changed to:

	/* check for attention message */
---
 drivers/s390/block/dasd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/block/dasd.c +1 -1
index 4df8bf6505fc..ea82821599f6 100644
@@ -1725,7 +1725,7 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 		dasd_put_device(device);
 	}
 
-	/* check for for attention message */
+	/* check for attention message */
 	if (scsw_dstat(&irb->scsw) & DEV_STAT_ATTENTION) {
 		device = dasd_device_from_cdev_locked(cdev);
 		if (!IS_ERR(device)) {
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/2 s390/dasd: Establish DMA alignment

In reply to Stefan Haberland

From: Eric Farman <[email protected]>

linux-next commit bf8d08532bc1 ("iomap: add support for dma aligned direct-io") changes the alignment requirement to come from the block device rather than the block size, and the default alignment requirement is 512-byte boundaries. Since DASD I/O has page alignments for IDAW/TIDAW requests, let's override this value to restore the expected behavior.

Make this change for both ECKD and DIAG disciplines, as they both would fall into this category. Leave FBA alone, since it is always comprised of 512-byte blocks.

---
 drivers/s390/block/dasd_diag.c | 1 +
 drivers/s390/block/dasd_eckd.c | 1 +
 2 files changed, 2 insertions(+)
drivers/s390/block/dasd_diag.c +1 -0
index e9edf3b6ed7c..94ee59864971 100644
@@ -639,6 +639,7 @@ static void dasd_diag_setup_blk_queue(struct dasd_block *block)
 	/* With page sized segments each segment can be translated into one idaw/tidaw */
 	blk_queue_max_segment_size(q, PAGE_SIZE);
 	blk_queue_segment_boundary(q, PAGE_SIZE - 1);
+	blk_queue_dma_alignment(q, PAGE_SIZE - 1);
 }
 
 static int dasd_diag_pe_handler(struct dasd_device *device,
drivers/s390/block/dasd_eckd.c +1 -0
index 836838f7d686..3cc93e2e4e15 100644
@@ -6626,6 +6626,7 @@ static void dasd_eckd_setup_blk_queue(struct dasd_block *block)
 	/* With page sized segments each segment can be translated into one idaw/tidaw */
 	blk_queue_max_segment_size(q, PAGE_SIZE);
 	blk_queue_segment_boundary(q, PAGE_SIZE - 1);
+	blk_queue_dma_alignment(q, PAGE_SIZE - 1);
 }
 
 static struct ccw_driver dasd_eckd_driver = {
Signature · 1 line
2.34.1
maintainer Applied
#3 lore raw
In reply to Stefan Haberland
Quoted 8 lines · Stefan Haberland

please apply the following patches.
The first fixes a comment typo and the second fixes DMA alignment after a change to the iomap code.

Eric Farman (1):
s390/dasd: Establish DMA alignment

[...]

Applied, thanks!

[1/2] s390/dasd: drop unexpected word 'for' in comments

      commit: bcee43dc6d5bd6f54e5e2a5d696bf8c8f4c141dd
[2/2] s390/dasd: Establish DMA alignment
      commit: bc792884b76f0da2f5c9a8d720e430e2de9756f5

Best regards,

Signature · 1 line
Jens Axboe