rts5139
rts5139 copied to clipboard
error: implicit declaration of function ‘blk_queue_dma_alignment’
rts51x_scsi.c:1947:9: error: implicit declaration of function ‘blk_queue_dma_alignment’; did you mean ‘queue_dma_alignment’? [-Werror=implicit-function-declaration]
1947 | blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
| ^~~~~~~~~~~~~~~~~~~~~~~
| queue_dma_alignment
It's likely caused by this update: https://github.com/torvalds/linux/commit/ec84ca4025c0b90c6b7173a230f78ec00cad44f5
My current workaround is to disable the line if the kernel version is 6.10 or newer, but I'm not confident it's the right thing to do.
diff --git a/rts51x_scsi.c b/rts51x_scsi.c
index aadcc26..302adb9 100644
--- a/rts51x_scsi.c
+++ b/rts51x_scsi.c
@@ -1944,7 +1944,9 @@ int slave_configure(struct scsi_device *sdev)
* mask. Guaranteeing proper alignment of the first buffer will
* have the desired effect because, except at the beginning and
* the end, scatter-gather buffers follow page boundaries. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,10,0)
blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
+#endif
/* Set the SCSI level to at least 2. We'll leave it at 3 if that's
* what is originally reported. We need this to avoid confusing
Disabling the line in 6.10+ is not the right way to do it unfortunately. The limit does not get set to 511 by default.