mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 04:36:22 +00:00
qla2x00t-32gbit, scst_local: Port to Linux kernel v6.10
Support for the following scsi layer changes in the Linux kernel v6.10:
- 5b7dfbeff92a ("scsi: core: Add a dma_alignment field to the host and
host template")
This commit is contained in:
@@ -2002,8 +2002,10 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
|
||||
scsi_qla_host_t *vha = shost_priv(sdev->host);
|
||||
struct req_que *req = vha->req;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
if (IS_T10_PI_CAPABLE(vha->hw))
|
||||
blk_queue_update_dma_alignment(sdev->request_queue, 0x7);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
scsi_adjust_queue_depth(sdev, 0, req->max_q_depth);
|
||||
@@ -3637,6 +3639,11 @@ skip_dpc:
|
||||
QLA_SG_ALL : 128;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
|
||||
if (IS_T10_PI_CAPABLE(base_vha->hw))
|
||||
host->dma_alignment = 0x7;
|
||||
#endif
|
||||
|
||||
ret = scsi_add_host(host, &pdev->dev);
|
||||
if (ret)
|
||||
goto probe_failed;
|
||||
|
||||
@@ -1048,12 +1048,14 @@ static int scst_local_slave_alloc(struct scsi_device *sdev)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
/*
|
||||
* vdisk_blockio requires that data buffers have block_size alignment
|
||||
* and supports block sizes from 512 up to 4096. See also
|
||||
* https://github.com/sahlberg/libiscsi/issues/302.
|
||||
*/
|
||||
blk_queue_dma_alignment(q, 4095);
|
||||
blk_queue_dma_alignment(q, (4096 - 1));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1379,6 +1381,9 @@ static const struct scsi_host_template scst_lcl_ini_driver_template = {
|
||||
.name = SCST_LOCAL_NAME,
|
||||
.queuecommand = scst_local_queuecommand,
|
||||
.change_queue_depth = scst_local_change_queue_depth,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
|
||||
.dma_alignment = (4096 - 1),
|
||||
#endif
|
||||
.slave_alloc = scst_local_slave_alloc,
|
||||
.slave_configure = scst_local_slave_configure,
|
||||
.eh_abort_handler = scst_local_abort,
|
||||
|
||||
Reference in New Issue
Block a user