diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 20742d26b..d0d3baea4 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -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 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 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; diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index a8bf14b6b..6cd11f7c0 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -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,