From: Gleb C. <lna...@ya...> - 2025-05-14 15:37:13
|
Commit: d21b6f1 GitHub URL: https://github.com/SCST-project/scst/commit/d21b6f1457f189e119b5824874f69800884b3d00 Author: Gleb Chesnokov Date: 2025-05-14T18:36:46+03:00 Log Message: ----------- scst: Port to Linux kernel v6.15 Support for the following changes in the Linux kernel v6.15: - 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()") Modified Paths: -------------- iscsi-scst/kernel/conn.c | 4 +- iscsi-scst/kernel/isert-scst/isert_login.c | 2 +- qla2x00t-32gbit/qla_edif.c | 4 +- qla2x00t-32gbit/qla_init.c | 2 +- qla2x00t-32gbit/qla_iocb.c | 4 +- qla2x00t-32gbit/qla_mid.c | 2 +- qla2x00t-32gbit/qla_os.c | 2 +- qla2x00t/qla_init.c | 2 +- qla2x00t/qla_mid.c | 2 +- qla2x00t/qla_os.c | 2 +- scst/include/backport.h | 41 +++++++++++++++ scst/src/scst_lib.c | 4 +- scst/src/scst_main.c | 2 +- 13 files changed, 57 insertions(+), 16 deletions(-) =================================================================== diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index fdeffc9..2cb385d 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -555,7 +555,7 @@ static void conn_rsp_timer_fn(struct timer_list *timer) * * Since we have not empty write_timeout_list, we are * safe to restart the timer, because we not race with - * del_timer_sync() in conn_free(). + * timer_delete_sync() in conn_free(). */ mod_timer(&conn->rsp_timer, timeout_time); } @@ -792,7 +792,7 @@ void conn_free(struct iscsi_conn *conn) lockdep_assert_held(&conn->target->target_mutex); - del_timer_sync(&conn->rsp_timer); + timer_delete_sync(&conn->rsp_timer); conn_sysfs_del(conn); diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index 859f6a0..33965c0 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -89,7 +89,7 @@ void isert_del_timer(struct isert_conn_dev *dev) { if (dev->timer_active) { dev->timer_active = 0; - del_timer_sync(&dev->tmo_timer); + timer_delete_sync(&dev->tmo_timer); } } diff --git a/qla2x00t-32gbit/qla_edif.c b/qla2x00t-32gbit/qla_edif.c index 1ce6c82..a91440b 100644 --- a/qla2x00t-32gbit/qla_edif.c +++ b/qla2x00t-32gbit/qla_edif.c @@ -416,7 +416,7 @@ static void __qla2x00_release_all_sadb(struct scsi_qla_host *vha, */ if (edif_entry->delete_sa_index != INVALID_EDIF_SA_INDEX) { - del_timer(&edif_entry->timer); + timer_delete(&edif_entry->timer); /* build and send the aen */ fcport->edif.rx_sa_set = 1; @@ -2844,7 +2844,7 @@ qla28xx_sa_update_iocb_entry(scsi_qla_host_t *v, struct req_que *req, "%s: removing edif_entry %p, new sa_index: 0x%x\n", __func__, edif_entry, pkt->sa_index); qla_edif_list_delete_sa_index(sp->fcport, edif_entry); - del_timer(&edif_entry->timer); + timer_delete(&edif_entry->timer); ql_dbg(ql_dbg_edif, vha, 0x5033, "%s: releasing edif_entry %p, new sa_index: 0x%x\n", diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index e6b616a..13484b0 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -67,7 +67,7 @@ void qla2x00_sp_free(srb_t *sp) { struct srb_iocb *iocb = &sp->u.iocb_cmd; - del_timer(&iocb->timer); + timer_delete(&iocb->timer); qla2x00_rel_sp(sp); } diff --git a/qla2x00t-32gbit/qla_iocb.c b/qla2x00t-32gbit/qla_iocb.c index 85c3b9a..2ce8e73 100644 --- a/qla2x00t-32gbit/qla_iocb.c +++ b/qla2x00t-32gbit/qla_iocb.c @@ -2588,7 +2588,7 @@ qla24xx_tm_iocb(srb_t *sp, struct tsk_mgmt_entry *tsk) static void qla2x00_async_done(struct srb *sp, int res) { - if (del_timer(&sp->u.iocb_cmd.timer)) { + if (timer_delete(&sp->u.iocb_cmd.timer)) { /* * Successfully cancelled the timeout handler * ref: TMR @@ -2661,7 +2661,7 @@ static void qla2x00_els_dcmd_sp_free(srb_t *sp) elsio->u.els_logo.els_logo_pyld, elsio->u.els_logo.els_logo_pyld_dma); - del_timer(&elsio->timer); + timer_delete(&elsio->timer); qla2x00_rel_sp(sp); } diff --git a/qla2x00t-32gbit/qla_mid.c b/qla2x00t-32gbit/qla_mid.c index 79879c4..8b71ac0 100644 --- a/qla2x00t-32gbit/qla_mid.c +++ b/qla2x00t-32gbit/qla_mid.c @@ -20,7 +20,7 @@ void qla2x00_vp_stop_timer(scsi_qla_host_t *vha) { if (vha->vp_idx && vha->timer_active) { - del_timer_sync(&vha->timer); + timer_delete_sync(&vha->timer); vha->timer_active = 0; } } diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 9dbb5b3..37417ee 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -441,7 +441,7 @@ qla2x00_restart_timer(scsi_qla_host_t *vha, unsigned long interval) static __inline__ void qla2x00_stop_timer(scsi_qla_host_t *vha) { - del_timer_sync(&vha->timer); + timer_delete_sync(&vha->timer); vha->timer_active = 0; } diff --git a/qla2x00t/qla_init.c b/qla2x00t/qla_init.c index d4fbecc..bc6edb1 100644 --- a/qla2x00t/qla_init.c +++ b/qla2x00t/qla_init.c @@ -72,7 +72,7 @@ qla2x00_sp_free(void *data, void *ptr) struct srb_iocb *iocb = &sp->u.iocb_cmd; struct scsi_qla_host *vha = (scsi_qla_host_t *)data; - del_timer(&iocb->timer); + timer_delete(&iocb->timer); mempool_free(sp, vha->hw->srb_mempool); QLA_VHA_MARK_NOT_BUSY(vha); diff --git a/qla2x00t/qla_mid.c b/qla2x00t/qla_mid.c index 24e3d3f..9efeef9 100644 --- a/qla2x00t/qla_mid.c +++ b/qla2x00t/qla_mid.c @@ -26,7 +26,7 @@ void qla2x00_vp_stop_timer(scsi_qla_host_t *vha) { if (vha->vp_idx && vha->timer_active) { - del_timer_sync(&vha->timer); + timer_delete_sync(&vha->timer); vha->timer_active = 0; } } diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 2bb5718..c3e2d37 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -350,7 +350,7 @@ qla2x00_restart_timer(scsi_qla_host_t *vha, unsigned long interval) static __inline__ void qla2x00_stop_timer(scsi_qla_host_t *vha) { - del_timer_sync(&vha->timer); + timer_delete_sync(&vha->timer); vha->timer_active = 0; } diff --git a/scst/include/backport.h b/scst/include/backport.h index e9d978d..27a9bbd 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1577,6 +1577,47 @@ struct t10_pi_tuple { /* <linux/timer.h> */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(4, 19, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 312)) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(5, 4, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 274)) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(5, 10, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 215)) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(5, 15, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 154)) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(6, 1, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 84)) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 17)) +/* + * See also commit 9b13df3fb64e ("timers: Rename del_timer_sync() to + * timer_delete_sync()") # v6.2. + * See also commit 48a8a5393960 # v4.19.312. + * See also commit df4209170b6c # v5.4.274. + * See also commit d8166e8adb7f # v5.10.215. + * See also commit 2382f2e45c71 # v5.15.154. + * See also commit 113d5341ee12 # v6.1.84. + */ +static inline int timer_delete_sync(struct timer_list *timer) +{ + return del_timer_sync(timer); +} +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(6, 1, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 91)) +/* + * See also commit bb663f0f3c39 ("timers: Rename del_timer() to timer_delete()") # v6.2. + * See also commit b086d1e82fcd # v6.1.91. + */ +static inline int timer_delete(struct timer_list *timer) +{ + return del_timer(timer); +} +#endif + /* * See also commit 686fef928bba ("timer: Prepare to change timer callback * argument type") # v4.14. See also commit 0eeda71bc30d ("timer: Replace diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 91404cf..1cf5e93 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -15850,7 +15850,7 @@ static void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev) unsigned long flags; TRACE_MGMT_DBG("Deinit TM debugging tgt_dev %p", tgt_dev); - del_timer_sync(&tm_dbg_timer); + timer_delete_sync(&tm_dbg_timer); spin_lock_irqsave(&scst_tm_dbg_lock, flags); tm_dbg_tgt_dev = NULL; spin_unlock_irqrestore(&scst_tm_dbg_lock, flags); @@ -15969,7 +15969,7 @@ static void tm_dbg_change_state(unsigned long *flags) TRACE_MGMT_DBG("%s", "Deleting timer"); spin_unlock_irqrestore(&scst_tm_dbg_lock, *flags); - del_timer_sync(&tm_dbg_timer); + timer_delete_sync(&tm_dbg_timer); spin_lock_irqsave(&scst_tm_dbg_lock, *flags); return; } diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 3ebf2d6..4d494ef 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -567,7 +567,7 @@ void scst_unregister_target(struct scst_tgt *tgt) list_del(&tgt->tgt_list_entry); mutex_unlock(&scst_mutex2); - del_timer_sync(&tgt->retry_timer); + timer_delete_sync(&tgt->retry_timer); scst_tg_tgt_remove_by_tgt(tgt); |