scst: Port to Linux kernel v6.16

Support for the following timer changes in the Linux kernel v6.16:

- 41cb08555c41 ("treewide, timers: Rename from_timer() to timer_container_of()")
This commit is contained in:
Gleb Chesnokov
2025-08-05 15:32:28 +03:00
parent c6d16dd86e
commit 974b31fdcb
4 changed files with 11 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ static struct edif_list_entry *qla_edif_list_find_sa_index(fc_port_t *fcport,
/* timeout called when no traffic and delayed rx sa_index delete */
static void qla2x00_sa_replace_iocb_timeout(struct timer_list *t)
{
struct edif_list_entry *edif_entry = from_timer(edif_entry, t, timer);
struct edif_list_entry *edif_entry = timer_container_of(edif_entry, t, timer);
fc_port_t *fcport = edif_entry->fcport;
struct scsi_qla_host *vha = fcport->vha;
struct edif_sa_ctl *sa_ctl;

View File

@@ -45,7 +45,7 @@ static void __qla24xx_handle_gpdb_event(scsi_qla_host_t *, struct event_arg *);
void
qla2x00_sp_timeout(struct timer_list *t)
{
srb_t *sp = from_timer(sp, t, u.iocb_cmd.timer);
srb_t *sp = timer_container_of(sp, t, u.iocb_cmd.timer);
struct srb_iocb *iocb;
scsi_qla_host_t *vha = sp->vha;

View File

@@ -7506,7 +7506,7 @@ static void qla_wind_down_chip(scsi_qla_host_t *vha)
void
qla2x00_timer(struct timer_list *t)
{
scsi_qla_host_t *vha = from_timer(vha, t, timer);
scsi_qla_host_t *vha = timer_container_of(vha, t, timer);
unsigned long cpu_flags = 0;
int start_dpc = 0;
int index;

View File

@@ -1733,6 +1733,14 @@ static inline int timer_delete(struct timer_list *timer)
container_of(callback_timer, typeof(*var), timer_fieldname)
#endif
/*
* See also commit 41cb08555c41 ("treewide, timers: Rename from_timer() to
* timer_container_of()") # v6.16.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0)
#define timer_container_of from_timer
#endif
/*
* See also commit 1d27e3e2252b ("timer: Remove expires and data arguments
* from DEFINE_TIMER").