mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge branch 'networking-Convert-timers-to-use-timer_setup'
Kees Cook says: ==================== networking: Convert timers to use timer_setup() This is the current set of outstanding networking patches to perform conversions to the new timer interface (rebased to -next). This is not all expected conversions, but it contains everything needed in networking to eliminate init_timer(), and all the non-standard setup_*_timer() uses. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -168,7 +168,6 @@ static int uml_net_open(struct net_device *dev)
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
lp->tl.data = (unsigned long) &lp->user;
|
||||
netif_start_queue(dev);
|
||||
|
||||
/* clear buffer - it can happen that the host side of the interface
|
||||
@@ -278,10 +277,11 @@ static const struct ethtool_ops uml_net_ethtool_ops = {
|
||||
.get_ts_info = ethtool_op_get_ts_info,
|
||||
};
|
||||
|
||||
static void uml_net_user_timer_expire(unsigned long _conn)
|
||||
static void uml_net_user_timer_expire(struct timer_list *t)
|
||||
{
|
||||
#ifdef undef
|
||||
struct connection *conn = (struct connection *)_conn;
|
||||
struct uml_net_private *lp = from_timer(lp, t, tl);
|
||||
struct connection *conn = &lp->user;
|
||||
|
||||
dprintk(KERN_INFO "uml_net_user_timer_expire [%p]\n", conn);
|
||||
do_connect(conn);
|
||||
@@ -458,9 +458,8 @@ static void eth_configure(int n, void *init, char *mac,
|
||||
.add_address = transport->user->add_address,
|
||||
.delete_address = transport->user->delete_address });
|
||||
|
||||
init_timer(&lp->tl);
|
||||
timer_setup(&lp->tl, uml_net_user_timer_expire, 0);
|
||||
spin_lock_init(&lp->lock);
|
||||
lp->tl.function = uml_net_user_timer_expire;
|
||||
memcpy(lp->mac, dev->dev_addr, sizeof(lp->mac));
|
||||
|
||||
if ((transport->user->init != NULL) &&
|
||||
|
||||
+12
-9
@@ -2073,21 +2073,19 @@ idt77252_rate_logindex(struct idt77252_dev *card, int pcr)
|
||||
}
|
||||
|
||||
static void
|
||||
idt77252_est_timer(unsigned long data)
|
||||
idt77252_est_timer(struct timer_list *t)
|
||||
{
|
||||
struct vc_map *vc = (struct vc_map *)data;
|
||||
struct rate_estimator *est = from_timer(est, t, timer);
|
||||
struct vc_map *vc = est->vc;
|
||||
struct idt77252_dev *card = vc->card;
|
||||
struct rate_estimator *est;
|
||||
unsigned long flags;
|
||||
u32 rate, cps;
|
||||
u64 ncells;
|
||||
u8 lacr;
|
||||
|
||||
spin_lock_irqsave(&vc->lock, flags);
|
||||
est = vc->estimator;
|
||||
if (!est)
|
||||
if (!vc->estimator)
|
||||
goto out;
|
||||
|
||||
ncells = est->cells;
|
||||
|
||||
rate = ((u32)(ncells - est->last_cells)) << (7 - est->interval);
|
||||
@@ -2126,10 +2124,11 @@ idt77252_init_est(struct vc_map *vc, int pcr)
|
||||
est->maxcps = pcr < 0 ? -pcr : pcr;
|
||||
est->cps = est->maxcps;
|
||||
est->avcps = est->cps << 5;
|
||||
est->vc = vc;
|
||||
|
||||
est->interval = 2; /* XXX: make this configurable */
|
||||
est->ewma_log = 2; /* XXX: make this configurable */
|
||||
setup_timer(&est->timer, idt77252_est_timer, (unsigned long)vc);
|
||||
timer_setup(&est->timer, idt77252_est_timer, 0);
|
||||
mod_timer(&est->timer, jiffies + ((HZ / 4) << est->interval));
|
||||
|
||||
return est;
|
||||
@@ -2209,16 +2208,20 @@ static int
|
||||
idt77252_init_ubr(struct idt77252_dev *card, struct vc_map *vc,
|
||||
struct atm_vcc *vcc, struct atm_qos *qos)
|
||||
{
|
||||
struct rate_estimator *est = NULL;
|
||||
unsigned long flags;
|
||||
int tcr;
|
||||
|
||||
spin_lock_irqsave(&vc->lock, flags);
|
||||
if (vc->estimator) {
|
||||
del_timer(&vc->estimator->timer);
|
||||
kfree(vc->estimator);
|
||||
est = vc->estimator;
|
||||
vc->estimator = NULL;
|
||||
}
|
||||
spin_unlock_irqrestore(&vc->lock, flags);
|
||||
if (est) {
|
||||
del_timer_sync(&est->timer);
|
||||
kfree(est);
|
||||
}
|
||||
|
||||
tcr = atm_pcr_goal(&qos->txtp);
|
||||
if (tcr == 0)
|
||||
|
||||
@@ -184,6 +184,8 @@ struct aal1 {
|
||||
unsigned char sequence;
|
||||
};
|
||||
|
||||
struct vc_map;
|
||||
|
||||
struct rate_estimator {
|
||||
struct timer_list timer;
|
||||
unsigned int interval;
|
||||
@@ -193,6 +195,7 @@ struct rate_estimator {
|
||||
long avcps;
|
||||
u32 cps;
|
||||
u32 maxcps;
|
||||
struct vc_map *vc;
|
||||
};
|
||||
|
||||
struct vc_map {
|
||||
|
||||
+4
-6
@@ -53,7 +53,7 @@ static DEFINE_SPINLOCK(sunis_lock);
|
||||
if (atomic_read(&stats->s) < 0) atomic_set(&stats->s,INT_MAX);
|
||||
|
||||
|
||||
static void suni_hz(unsigned long from_timer)
|
||||
static void suni_hz(struct timer_list *timer)
|
||||
{
|
||||
struct suni_priv *walk;
|
||||
struct atm_dev *dev;
|
||||
@@ -85,7 +85,7 @@ static void suni_hz(unsigned long from_timer)
|
||||
((GET(TACP_TCC) & 0xff) << 8) |
|
||||
((GET(TACP_TCCM) & 7) << 16));
|
||||
}
|
||||
if (from_timer) mod_timer(&poll_timer,jiffies+HZ);
|
||||
if (timer) mod_timer(&poll_timer,jiffies+HZ);
|
||||
}
|
||||
|
||||
|
||||
@@ -322,13 +322,11 @@ static int suni_start(struct atm_dev *dev)
|
||||
printk(KERN_WARNING "%s(itf %d): no signal\n",dev->type,
|
||||
dev->number);
|
||||
PRIV(dev)->loop_mode = ATM_LM_NONE;
|
||||
suni_hz(0); /* clear SUNI counters */
|
||||
suni_hz(NULL); /* clear SUNI counters */
|
||||
(void) fetch_stats(dev,NULL,1); /* clear kernel counters */
|
||||
if (first) {
|
||||
init_timer(&poll_timer);
|
||||
timer_setup(&poll_timer, suni_hz, 0);
|
||||
poll_timer.expires = jiffies+HZ;
|
||||
poll_timer.function = suni_hz;
|
||||
poll_timer.data = 1;
|
||||
#if 0
|
||||
printk(KERN_DEBUG "[u] p=0x%lx,n=0x%lx\n",(unsigned long) poll_timer.list.prev,
|
||||
(unsigned long) poll_timer.list.next);
|
||||
|
||||
@@ -433,10 +433,11 @@ static void check_pending(struct bas_cardstate *ucs)
|
||||
* argument:
|
||||
* controller state structure
|
||||
*/
|
||||
static void cmd_in_timeout(unsigned long data)
|
||||
static void cmd_in_timeout(struct timer_list *t)
|
||||
{
|
||||
struct cardstate *cs = (struct cardstate *) data;
|
||||
struct bas_cardstate *ucs = cs->hw.bas;
|
||||
struct bas_cardstate *ucs = from_timer(ucs, t, timer_cmd_in);
|
||||
struct urb *urb = ucs->urb_int_in;
|
||||
struct cardstate *cs = urb->context;
|
||||
int rc;
|
||||
|
||||
if (!ucs->rcvbuf_size) {
|
||||
@@ -639,10 +640,11 @@ static void int_in_work(struct work_struct *work)
|
||||
* argument:
|
||||
* controller state structure
|
||||
*/
|
||||
static void int_in_resubmit(unsigned long data)
|
||||
static void int_in_resubmit(struct timer_list *t)
|
||||
{
|
||||
struct cardstate *cs = (struct cardstate *) data;
|
||||
struct bas_cardstate *ucs = cs->hw.bas;
|
||||
struct bas_cardstate *ucs = from_timer(ucs, t, timer_int_in);
|
||||
struct urb *urb = ucs->urb_int_in;
|
||||
struct cardstate *cs = urb->context;
|
||||
int rc;
|
||||
|
||||
if (ucs->retry_int_in++ >= BAS_RETRY) {
|
||||
@@ -1441,10 +1443,11 @@ error:
|
||||
* argument:
|
||||
* controller state structure
|
||||
*/
|
||||
static void req_timeout(unsigned long data)
|
||||
static void req_timeout(struct timer_list *t)
|
||||
{
|
||||
struct cardstate *cs = (struct cardstate *) data;
|
||||
struct bas_cardstate *ucs = cs->hw.bas;
|
||||
struct bas_cardstate *ucs = from_timer(ucs, t, timer_ctrl);
|
||||
struct urb *urb = ucs->urb_int_in;
|
||||
struct cardstate *cs = urb->context;
|
||||
int pending;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -1837,10 +1840,11 @@ static void write_command_callback(struct urb *urb)
|
||||
* argument:
|
||||
* controller state structure
|
||||
*/
|
||||
static void atrdy_timeout(unsigned long data)
|
||||
static void atrdy_timeout(struct timer_list *t)
|
||||
{
|
||||
struct cardstate *cs = (struct cardstate *) data;
|
||||
struct bas_cardstate *ucs = cs->hw.bas;
|
||||
struct bas_cardstate *ucs = from_timer(ucs, t, timer_atrdy);
|
||||
struct urb *urb = ucs->urb_int_in;
|
||||
struct cardstate *cs = urb->context;
|
||||
|
||||
dev_warn(cs->dev, "timeout waiting for HD_READY_SEND_ATDATA\n");
|
||||
|
||||
@@ -2200,7 +2204,7 @@ static int gigaset_initcshw(struct cardstate *cs)
|
||||
{
|
||||
struct bas_cardstate *ucs;
|
||||
|
||||
cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL);
|
||||
cs->hw.bas = ucs = kzalloc(sizeof(*ucs), GFP_KERNEL);
|
||||
if (!ucs) {
|
||||
pr_err("out of memory\n");
|
||||
return -ENOMEM;
|
||||
@@ -2212,19 +2216,11 @@ static int gigaset_initcshw(struct cardstate *cs)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ucs->urb_cmd_in = NULL;
|
||||
ucs->urb_cmd_out = NULL;
|
||||
ucs->rcvbuf = NULL;
|
||||
ucs->rcvbuf_size = 0;
|
||||
|
||||
spin_lock_init(&ucs->lock);
|
||||
ucs->pending = 0;
|
||||
|
||||
ucs->basstate = 0;
|
||||
setup_timer(&ucs->timer_ctrl, req_timeout, (unsigned long) cs);
|
||||
setup_timer(&ucs->timer_atrdy, atrdy_timeout, (unsigned long) cs);
|
||||
setup_timer(&ucs->timer_cmd_in, cmd_in_timeout, (unsigned long) cs);
|
||||
setup_timer(&ucs->timer_int_in, int_in_resubmit, (unsigned long) cs);
|
||||
timer_setup(&ucs->timer_ctrl, req_timeout, 0);
|
||||
timer_setup(&ucs->timer_atrdy, atrdy_timeout, 0);
|
||||
timer_setup(&ucs->timer_cmd_in, cmd_in_timeout, 0);
|
||||
timer_setup(&ucs->timer_int_in, int_in_resubmit, 0);
|
||||
init_waitqueue_head(&ucs->waitqueue);
|
||||
INIT_WORK(&ucs->int_in_wq, int_in_work);
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ static int test_timeout(struct at_state_t *at_state)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void timer_tick(unsigned long data)
|
||||
static void timer_tick(struct timer_list *t)
|
||||
{
|
||||
struct cardstate *cs = (struct cardstate *) data;
|
||||
struct cardstate *cs = from_timer(cs, t, timer);
|
||||
unsigned long flags;
|
||||
unsigned channel;
|
||||
struct at_state_t *at_state;
|
||||
@@ -687,7 +687,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
|
||||
cs->ignoreframes = ignoreframes;
|
||||
INIT_LIST_HEAD(&cs->temp_at_states);
|
||||
cs->running = 0;
|
||||
init_timer(&cs->timer); /* clear next & prev */
|
||||
timer_setup(&cs->timer, timer_tick, 0);
|
||||
spin_lock_init(&cs->ev_lock);
|
||||
cs->ev_tail = 0;
|
||||
cs->ev_head = 0;
|
||||
@@ -768,7 +768,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
|
||||
spin_lock_irqsave(&cs->lock, flags);
|
||||
cs->running = 1;
|
||||
spin_unlock_irqrestore(&cs->lock, flags);
|
||||
setup_timer(&cs->timer, timer_tick, (unsigned long) cs);
|
||||
cs->timer.expires = jiffies + msecs_to_jiffies(GIG_TICK);
|
||||
add_timer(&cs->timer);
|
||||
|
||||
|
||||
@@ -172,7 +172,6 @@ isac_fill_fifo(struct isac_hw *isac)
|
||||
pr_debug("%s: %s dbusytimer running\n", isac->name, __func__);
|
||||
del_timer(&isac->dch.timer);
|
||||
}
|
||||
init_timer(&isac->dch.timer);
|
||||
isac->dch.timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
|
||||
add_timer(&isac->dch.timer);
|
||||
if (isac->dch.debug & DEBUG_HW_DFIFO) {
|
||||
@@ -727,8 +726,9 @@ isac_release(struct isac_hw *isac)
|
||||
}
|
||||
|
||||
static void
|
||||
dbusy_timer_handler(struct isac_hw *isac)
|
||||
dbusy_timer_handler(struct timer_list *t)
|
||||
{
|
||||
struct isac_hw *isac = from_timer(isac, t, dch.timer);
|
||||
int rbch, star;
|
||||
u_long flags;
|
||||
|
||||
@@ -796,8 +796,7 @@ isac_init(struct isac_hw *isac)
|
||||
}
|
||||
isac->mon_tx = NULL;
|
||||
isac->mon_rx = NULL;
|
||||
setup_timer(&isac->dch.timer, (void *)dbusy_timer_handler,
|
||||
(long)isac);
|
||||
timer_setup(&isac->dch.timer, dbusy_timer_handler, 0);
|
||||
isac->mocr = 0xaa;
|
||||
if (isac->type & IPAC_TYPE_ISACX) {
|
||||
/* Disable all IRQ */
|
||||
|
||||
@@ -311,7 +311,6 @@ W6692_fill_Dfifo(struct w6692_hw *card)
|
||||
pr_debug("%s: fill_Dfifo dbusytimer running\n", card->name);
|
||||
del_timer(&dch->timer);
|
||||
}
|
||||
init_timer(&dch->timer);
|
||||
dch->timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ) / 1000);
|
||||
add_timer(&dch->timer);
|
||||
if (debug & DEBUG_HW_DFIFO) {
|
||||
@@ -819,8 +818,9 @@ w6692_irq(int intno, void *dev_id)
|
||||
}
|
||||
|
||||
static void
|
||||
dbusy_timer_handler(struct dchannel *dch)
|
||||
dbusy_timer_handler(struct timer_list *t)
|
||||
{
|
||||
struct dchannel *dch = from_timer(dch, t, timer);
|
||||
struct w6692_hw *card = dch->hw;
|
||||
int rbch, star;
|
||||
u_long flags;
|
||||
@@ -852,8 +852,7 @@ static void initW6692(struct w6692_hw *card)
|
||||
{
|
||||
u8 val;
|
||||
|
||||
setup_timer(&card->dch.timer, (void *)dbusy_timer_handler,
|
||||
(u_long)&card->dch);
|
||||
timer_setup(&card->dch.timer, dbusy_timer_handler, 0);
|
||||
w6692_mode(&card->bc[0], ISDN_P_NONE);
|
||||
w6692_mode(&card->bc[1], ISDN_P_NONE);
|
||||
WriteW6692(card, W_D_CTL, 0x00);
|
||||
|
||||
@@ -398,7 +398,6 @@ Amd7930_fill_Dfifo(struct IsdnCardState *cs)
|
||||
debugl1(cs, "Amd7930: fill_Dfifo dbusytimer running");
|
||||
del_timer(&cs->dbusytimer);
|
||||
}
|
||||
init_timer(&cs->dbusytimer);
|
||||
cs->dbusytimer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ) / 1000);
|
||||
add_timer(&cs->dbusytimer);
|
||||
|
||||
@@ -686,8 +685,9 @@ DC_Close_Amd7930(struct IsdnCardState *cs) {
|
||||
|
||||
|
||||
static void
|
||||
dbusy_timer_handler(struct IsdnCardState *cs)
|
||||
dbusy_timer_handler(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, dbusytimer);
|
||||
u_long flags;
|
||||
struct PStack *stptr;
|
||||
WORD dtcr, der;
|
||||
@@ -790,5 +790,5 @@ void Amd7930_init(struct IsdnCardState *cs)
|
||||
void setup_Amd7930(struct IsdnCardState *cs)
|
||||
{
|
||||
INIT_WORK(&cs->tqueue, Amd7930_bh);
|
||||
setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
|
||||
timer_setup(&cs->dbusytimer, dbusy_timer_handler, 0);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ add_arcofi_timer(struct IsdnCardState *cs) {
|
||||
if (test_and_set_bit(FLG_ARCOFI_TIMER, &cs->HW_Flags)) {
|
||||
del_timer(&cs->dc.isac.arcofitimer);
|
||||
}
|
||||
init_timer(&cs->dc.isac.arcofitimer);
|
||||
cs->dc.isac.arcofitimer.expires = jiffies + ((ARCOFI_TIMER_VALUE * HZ) / 1000);
|
||||
add_timer(&cs->dc.isac.arcofitimer);
|
||||
}
|
||||
@@ -112,7 +111,8 @@ arcofi_fsm(struct IsdnCardState *cs, int event, void *data) {
|
||||
}
|
||||
|
||||
static void
|
||||
arcofi_timer(struct IsdnCardState *cs) {
|
||||
arcofi_timer(struct timer_list *t) {
|
||||
struct IsdnCardState *cs = from_timer(cs, t, dc.isac.arcofitimer);
|
||||
arcofi_fsm(cs, ARCOFI_TIMEOUT, NULL);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ clear_arcofi(struct IsdnCardState *cs) {
|
||||
|
||||
void
|
||||
init_arcofi(struct IsdnCardState *cs) {
|
||||
setup_timer(&cs->dc.isac.arcofitimer, (void *)arcofi_timer, (long)cs);
|
||||
timer_setup(&cs->dc.isac.arcofitimer, arcofi_timer, 0);
|
||||
init_waitqueue_head(&cs->dc.isac.arcofi_wait);
|
||||
test_and_set_bit(HW_ARCOFI, &cs->HW_Flags);
|
||||
}
|
||||
|
||||
@@ -798,8 +798,9 @@ reset_diva(struct IsdnCardState *cs)
|
||||
#define DIVA_ASSIGN 1
|
||||
|
||||
static void
|
||||
diva_led_handler(struct IsdnCardState *cs)
|
||||
diva_led_handler(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, hw.diva.tl);
|
||||
int blink = 0;
|
||||
|
||||
if ((cs->subtyp == DIVA_IPAC_ISA) ||
|
||||
@@ -828,7 +829,6 @@ diva_led_handler(struct IsdnCardState *cs)
|
||||
|
||||
byteout(cs->hw.diva.ctrl, cs->hw.diva.ctrl_reg);
|
||||
if (blink) {
|
||||
init_timer(&cs->hw.diva.tl);
|
||||
cs->hw.diva.tl.expires = jiffies + ((blink * HZ) / 1000);
|
||||
add_timer(&cs->hw.diva.tl);
|
||||
}
|
||||
@@ -900,7 +900,7 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
||||
(cs->subtyp != DIVA_IPAC_PCI) &&
|
||||
(cs->subtyp != DIVA_IPACX_PCI)) {
|
||||
spin_lock_irqsave(&cs->lock, flags);
|
||||
diva_led_handler(cs);
|
||||
diva_led_handler(&cs->hw.diva.tl);
|
||||
spin_unlock_irqrestore(&cs->lock, flags);
|
||||
}
|
||||
return (0);
|
||||
@@ -978,8 +978,7 @@ static int setup_diva_common(struct IsdnCardState *cs)
|
||||
printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
|
||||
MemReadISAC_IPACX(cs, IPACX_ID) & 0x3F);
|
||||
} else { /* DIVA 2.0 */
|
||||
setup_timer(&cs->hw.diva.tl, (void *)diva_led_handler,
|
||||
(long)cs);
|
||||
timer_setup(&cs->hw.diva.tl, diva_led_handler, 0);
|
||||
cs->readisac = &ReadISAC;
|
||||
cs->writeisac = &WriteISAC;
|
||||
cs->readisacfifo = &ReadISACfifo;
|
||||
|
||||
@@ -606,8 +606,9 @@ check_arcofi(struct IsdnCardState *cs)
|
||||
#endif /* ARCOFI_USE */
|
||||
|
||||
static void
|
||||
elsa_led_handler(struct IsdnCardState *cs)
|
||||
elsa_led_handler(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, hw.elsa.tl);
|
||||
int blink = 0;
|
||||
|
||||
if (cs->subtyp == ELSA_PCMCIA || cs->subtyp == ELSA_PCMCIA_IPAC)
|
||||
@@ -640,7 +641,6 @@ elsa_led_handler(struct IsdnCardState *cs)
|
||||
} else
|
||||
byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
|
||||
if (blink) {
|
||||
init_timer(&cs->hw.elsa.tl);
|
||||
cs->hw.elsa.tl.expires = jiffies + ((blink * HZ) / 1000);
|
||||
add_timer(&cs->hw.elsa.tl);
|
||||
}
|
||||
@@ -715,7 +715,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
||||
init_modem(cs);
|
||||
}
|
||||
#endif
|
||||
elsa_led_handler(cs);
|
||||
elsa_led_handler(&cs->hw.elsa.tl);
|
||||
return (ret);
|
||||
case (MDL_REMOVE | REQUEST):
|
||||
cs->hw.elsa.status &= 0;
|
||||
@@ -767,7 +767,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
||||
else
|
||||
cs->hw.elsa.status &= ~ELSA_BAD_PWR;
|
||||
}
|
||||
elsa_led_handler(cs);
|
||||
elsa_led_handler(&cs->hw.elsa.tl);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
@@ -1147,7 +1147,7 @@ static int setup_elsa_common(struct IsdnCard *card)
|
||||
init_arcofi(cs);
|
||||
#endif
|
||||
setup_isac(cs);
|
||||
setup_timer(&cs->hw.elsa.tl, (void *)elsa_led_handler, (long)cs);
|
||||
timer_setup(&cs->hw.elsa.tl, elsa_led_handler, 0);
|
||||
/* Teste Timer */
|
||||
if (cs->hw.elsa.timer) {
|
||||
byteout(cs->hw.elsa.trig, 0xff);
|
||||
|
||||
@@ -85,8 +85,9 @@ FsmChangeState(struct FsmInst *fi, int newstate)
|
||||
}
|
||||
|
||||
static void
|
||||
FsmExpireTimer(struct FsmTimer *ft)
|
||||
FsmExpireTimer(struct timer_list *t)
|
||||
{
|
||||
struct FsmTimer *ft = from_timer(ft, t, tl);
|
||||
#if FSM_TIMER_DEBUG
|
||||
if (ft->fi->debug)
|
||||
ft->fi->printdebug(ft->fi, "FsmExpireTimer %lx", (long) ft);
|
||||
@@ -102,7 +103,7 @@ FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
|
||||
if (ft->fi->debug)
|
||||
ft->fi->printdebug(ft->fi, "FsmInitTimer %lx", (long) ft);
|
||||
#endif
|
||||
setup_timer(&ft->tl, (void *)FsmExpireTimer, (long)ft);
|
||||
timer_setup(&ft->tl, FsmExpireTimer, 0);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -131,7 +132,6 @@ FsmAddTimer(struct FsmTimer *ft,
|
||||
ft->fi->printdebug(ft->fi, "FsmAddTimer already active!");
|
||||
return -1;
|
||||
}
|
||||
init_timer(&ft->tl);
|
||||
ft->event = event;
|
||||
ft->arg = arg;
|
||||
ft->tl.expires = jiffies + (millisec * HZ) / 1000;
|
||||
@@ -152,7 +152,6 @@ FsmRestartTimer(struct FsmTimer *ft,
|
||||
|
||||
if (timer_pending(&ft->tl))
|
||||
del_timer(&ft->tl);
|
||||
init_timer(&ft->tl);
|
||||
ft->event = event;
|
||||
ft->arg = arg;
|
||||
ft->tl.expires = jiffies + (millisec * HZ) / 1000;
|
||||
|
||||
@@ -591,8 +591,9 @@ bch_l2l1(struct hisax_if *ifc, int pr, void *arg)
|
||||
/* layer 1 timer function */
|
||||
/**************************/
|
||||
static void
|
||||
hfc_l1_timer(struct hfc4s8s_l1 *l1)
|
||||
hfc_l1_timer(struct timer_list *t)
|
||||
{
|
||||
struct hfc4s8s_l1 *l1 = from_timer(l1, t, l1_timer);
|
||||
u_long flags;
|
||||
|
||||
if (!l1->enabled)
|
||||
@@ -1396,8 +1397,7 @@ setup_instance(hfc4s8s_hw *hw)
|
||||
l1p = hw->l1 + i;
|
||||
spin_lock_init(&l1p->lock);
|
||||
l1p->hw = hw;
|
||||
setup_timer(&l1p->l1_timer, (void *)hfc_l1_timer,
|
||||
(long)(l1p));
|
||||
timer_setup(&l1p->l1_timer, hfc_l1_timer, 0);
|
||||
l1p->st_num = i;
|
||||
skb_queue_head_init(&l1p->d_tx_queue);
|
||||
l1p->d_if.ifc.priv = hw->l1 + i;
|
||||
|
||||
@@ -1014,7 +1014,7 @@ setstack_hfcd(struct PStack *st, struct IsdnCardState *cs)
|
||||
}
|
||||
|
||||
static void
|
||||
hfc_dbusy_timer(struct IsdnCardState *cs)
|
||||
hfc_dbusy_timer(struct timer_list *t)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1073,6 +1073,6 @@ set_cs_func(struct IsdnCardState *cs)
|
||||
cs->writeisacfifo = &dummyf;
|
||||
cs->BC_Read_Reg = &ReadReg;
|
||||
cs->BC_Write_Reg = &WriteReg;
|
||||
setup_timer(&cs->dbusytimer, (void *)hfc_dbusy_timer, (long)cs);
|
||||
timer_setup(&cs->dbusytimer, hfc_dbusy_timer, 0);
|
||||
INIT_WORK(&cs->tqueue, hfcd_bh);
|
||||
}
|
||||
|
||||
@@ -165,8 +165,9 @@ reset_hfcpci(struct IsdnCardState *cs)
|
||||
/* Timer function called when kernel timer expires */
|
||||
/***************************************************/
|
||||
static void
|
||||
hfcpci_Timer(struct IsdnCardState *cs)
|
||||
hfcpci_Timer(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, hw.hfcpci.timer);
|
||||
cs->hw.hfcpci.timer.expires = jiffies + 75;
|
||||
/* WD RESET */
|
||||
/* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcpci.ctmt | 0x80);
|
||||
@@ -1095,7 +1096,7 @@ hfcpci_interrupt(int intno, void *dev_id)
|
||||
/* timer callback for D-chan busy resolution. Currently no function */
|
||||
/********************************************************************/
|
||||
static void
|
||||
hfcpci_dbusy_timer(struct IsdnCardState *cs)
|
||||
hfcpci_dbusy_timer(struct timer_list *t)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1582,7 +1583,7 @@ inithfcpci(struct IsdnCardState *cs)
|
||||
cs->bcs[1].BC_SetStack = setstack_2b;
|
||||
cs->bcs[0].BC_Close = close_hfcpci;
|
||||
cs->bcs[1].BC_Close = close_hfcpci;
|
||||
setup_timer(&cs->dbusytimer, (void *)hfcpci_dbusy_timer, (long)cs);
|
||||
timer_setup(&cs->dbusytimer, hfcpci_dbusy_timer, 0);
|
||||
mode_hfcpci(cs->bcs, 0, 0);
|
||||
mode_hfcpci(cs->bcs + 1, 0, 1);
|
||||
}
|
||||
@@ -1744,7 +1745,7 @@ setup_hfcpci(struct IsdnCard *card)
|
||||
cs->BC_Write_Reg = NULL;
|
||||
cs->irq_func = &hfcpci_interrupt;
|
||||
cs->irq_flags |= IRQF_SHARED;
|
||||
setup_timer(&cs->hw.hfcpci.timer, (void *)hfcpci_Timer, (long)cs);
|
||||
timer_setup(&cs->hw.hfcpci.timer, hfcpci_Timer, 0);
|
||||
cs->cardmsg = &hfcpci_card_msg;
|
||||
cs->auxcmd = &hfcpci_auxcmd;
|
||||
|
||||
|
||||
@@ -418,8 +418,9 @@ reset_hfcsx(struct IsdnCardState *cs)
|
||||
/* Timer function called when kernel timer expires */
|
||||
/***************************************************/
|
||||
static void
|
||||
hfcsx_Timer(struct IsdnCardState *cs)
|
||||
hfcsx_Timer(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, hw.hfcsx.timer);
|
||||
cs->hw.hfcsx.timer.expires = jiffies + 75;
|
||||
/* WD RESET */
|
||||
/* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcsx.ctmt | 0x80);
|
||||
@@ -860,7 +861,7 @@ hfcsx_interrupt(int intno, void *dev_id)
|
||||
/* timer callback for D-chan busy resolution. Currently no function */
|
||||
/********************************************************************/
|
||||
static void
|
||||
hfcsx_dbusy_timer(struct IsdnCardState *cs)
|
||||
hfcsx_dbusy_timer(struct timer_list *t)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1495,7 +1496,7 @@ int setup_hfcsx(struct IsdnCard *card)
|
||||
} else
|
||||
return (0); /* no valid card type */
|
||||
|
||||
setup_timer(&cs->dbusytimer, (void *)hfcsx_dbusy_timer, (long)cs);
|
||||
timer_setup(&cs->dbusytimer, hfcsx_dbusy_timer, 0);
|
||||
INIT_WORK(&cs->tqueue, hfcsx_bh);
|
||||
cs->readisac = NULL;
|
||||
cs->writeisac = NULL;
|
||||
@@ -1507,7 +1508,7 @@ int setup_hfcsx(struct IsdnCard *card)
|
||||
|
||||
cs->hw.hfcsx.b_fifo_size = 0; /* fifo size still unknown */
|
||||
cs->hw.hfcsx.cirm = ccd_sp_irqtab[cs->irq & 0xF]; /* RAM not evaluated */
|
||||
setup_timer(&cs->hw.hfcsx.timer, (void *)hfcsx_Timer, (long)cs);
|
||||
timer_setup(&cs->hw.hfcsx.timer, hfcsx_Timer, 0);
|
||||
|
||||
reset_hfcsx(cs);
|
||||
cs->cardmsg = &hfcsx_card_msg;
|
||||
|
||||
@@ -343,8 +343,9 @@ handle_led(hfcusb_data *hfc, int event)
|
||||
|
||||
/* ISDN l1 timer T3 expires */
|
||||
static void
|
||||
l1_timer_expire_t3(hfcusb_data *hfc)
|
||||
l1_timer_expire_t3(struct timer_list *t)
|
||||
{
|
||||
hfcusb_data *hfc = from_timer(hfc, t, t3_timer);
|
||||
hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
|
||||
NULL);
|
||||
|
||||
@@ -360,8 +361,9 @@ l1_timer_expire_t3(hfcusb_data *hfc)
|
||||
|
||||
/* ISDN l1 timer T4 expires */
|
||||
static void
|
||||
l1_timer_expire_t4(hfcusb_data *hfc)
|
||||
l1_timer_expire_t4(struct timer_list *t)
|
||||
{
|
||||
hfcusb_data *hfc = from_timer(hfc, t, t4_timer);
|
||||
hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
|
||||
NULL);
|
||||
|
||||
@@ -1165,10 +1167,10 @@ hfc_usb_init(hfcusb_data *hfc)
|
||||
hfc->old_led_state = 0;
|
||||
|
||||
/* init the t3 timer */
|
||||
setup_timer(&hfc->t3_timer, (void *)l1_timer_expire_t3, (long)hfc);
|
||||
timer_setup(&hfc->t3_timer, l1_timer_expire_t3, 0);
|
||||
|
||||
/* init the t4 timer */
|
||||
setup_timer(&hfc->t4_timer, (void *)l1_timer_expire_t4, (long)hfc);
|
||||
timer_setup(&hfc->t4_timer, l1_timer_expire_t4, 0);
|
||||
|
||||
/* init the background machinery for control requests */
|
||||
hfc->ctrl_read.bRequestType = 0xc0;
|
||||
|
||||
@@ -41,8 +41,9 @@ hfcs_interrupt(int intno, void *dev_id)
|
||||
}
|
||||
|
||||
static void
|
||||
hfcs_Timer(struct IsdnCardState *cs)
|
||||
hfcs_Timer(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, hw.hfcD.timer);
|
||||
cs->hw.hfcD.timer.expires = jiffies + 75;
|
||||
/* WD RESET */
|
||||
/* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt | 0x80);
|
||||
@@ -253,7 +254,7 @@ int setup_hfcs(struct IsdnCard *card)
|
||||
outb(0x57, cs->hw.hfcD.addr | 1);
|
||||
}
|
||||
set_cs_func(cs);
|
||||
setup_timer(&cs->hw.hfcD.timer, (void *)hfcs_Timer, (long)cs);
|
||||
timer_setup(&cs->hw.hfcD.timer, hfcs_Timer, 0);
|
||||
cs->cardmsg = &hfcs_card_msg;
|
||||
cs->irq_func = &hfcs_interrupt;
|
||||
return (1);
|
||||
|
||||
@@ -168,7 +168,6 @@ icc_fill_fifo(struct IsdnCardState *cs)
|
||||
debugl1(cs, "icc_fill_fifo dbusytimer running");
|
||||
del_timer(&cs->dbusytimer);
|
||||
}
|
||||
init_timer(&cs->dbusytimer);
|
||||
cs->dbusytimer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
|
||||
add_timer(&cs->dbusytimer);
|
||||
if (cs->debug & L1_DEB_ISAC_FIFO) {
|
||||
@@ -580,8 +579,9 @@ DC_Close_icc(struct IsdnCardState *cs) {
|
||||
}
|
||||
|
||||
static void
|
||||
dbusy_timer_handler(struct IsdnCardState *cs)
|
||||
dbusy_timer_handler(struct timer_list *t)
|
||||
{
|
||||
struct IsdnCardState *cs = from_timer(cs, t, dbusytimer);
|
||||
struct PStack *stptr;
|
||||
int rbch, star;
|
||||
|
||||
@@ -676,5 +676,5 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
|
||||
void setup_icc(struct IsdnCardState *cs)
|
||||
{
|
||||
INIT_WORK(&cs->tqueue, icc_bh);
|
||||
setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
|
||||
timer_setup(&cs->dbusytimer, dbusy_timer_handler, 0);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user