Lines Matching refs:ch
80 struct comx_channel *ch = dev->priv; in LOCOMX_txe() local
81 struct locomx_data *hw = ch->HW_privdata; in LOCOMX_txe()
90 struct comx_channel *ch=dev->priv; in locomx_rx() local
92 if (ch->debug_flags & DEBUG_HW_RX) { in locomx_rx()
95 ch->LINE_rx(dev,skb); in locomx_rx()
100 struct comx_channel *ch = (struct comx_channel *)dev->priv; in LOCOMX_send_packet() local
101 struct locomx_data *hw = ch->HW_privdata; in LOCOMX_send_packet()
103 if (ch->debug_flags & DEBUG_HW_TX) { in LOCOMX_send_packet()
107 if (!(ch->line_status & LINE_UP)) { in LOCOMX_send_packet()
116 if (ch->debug_flags & DEBUG_HW_TX) { in LOCOMX_send_packet()
130 struct comx_channel *ch=dev->priv; in locomx_status_timerfun() local
131 struct locomx_data *hw=ch->HW_privdata; in locomx_status_timerfun()
133 if(!(ch->line_status & LINE_UP) && in locomx_status_timerfun()
135 ch->LINE_status(dev, ch->line_status | LINE_UP); in locomx_status_timerfun()
137 if((ch->line_status & LINE_UP) && in locomx_status_timerfun()
139 ch->LINE_status(dev, ch->line_status & ~LINE_UP); in locomx_status_timerfun()
141 mod_timer(&hw->status_timer,jiffies + ch->lineup_delay * HZ); in locomx_status_timerfun()
147 struct comx_channel *ch = dev->priv; in LOCOMX_open() local
148 struct locomx_data *hw = ch->HW_privdata; in LOCOMX_open()
149 struct proc_dir_entry *procfile = ch->procdir->subdir; in LOCOMX_open()
222 ch->init_status |= HW_OPEN; in LOCOMX_open()
224 ch->line_status |= LINE_UP; in LOCOMX_open()
226 ch->line_status &= ~LINE_UP; in LOCOMX_open()
229 comx_status(dev, ch->line_status); in LOCOMX_open()
234 hw->status_timer.expires=jiffies + ch->lineup_delay * HZ; in LOCOMX_open()
259 struct comx_channel *ch = dev->priv; in LOCOMX_close() local
260 struct locomx_data *hw = ch->HW_privdata; in LOCOMX_close()
261 struct proc_dir_entry *procfile = ch->procdir->subdir; in LOCOMX_close()
282 ch->init_status &= ~HW_OPEN; in LOCOMX_close()
376 struct comx_channel *ch = (struct comx_channel *)dev->priv; in LOCOMX_init() local
381 if ((ch->HW_privdata = kmalloc(sizeof(struct locomx_data), in LOCOMX_init()
386 memset(hw = ch->HW_privdata, 0, sizeof(struct locomx_data)); in LOCOMX_init()
391 ch->procdir)) == NULL) { in LOCOMX_init()
400 ch->procdir)) == NULL) { in LOCOMX_init()
420 ch->HW_access_board = NULL; in LOCOMX_init()
421 ch->HW_release_board = NULL; in LOCOMX_init()
422 ch->HW_txe = LOCOMX_txe; in LOCOMX_init()
423 ch->HW_open = LOCOMX_open; in LOCOMX_init()
424 ch->HW_close = LOCOMX_close; in LOCOMX_init()
425 ch->HW_send_packet = LOCOMX_send_packet; in LOCOMX_init()
426 ch->HW_statistics = LOCOMX_statistics; in LOCOMX_init()
427 ch->HW_set_clock = NULL; in LOCOMX_init()
429 ch->current_stats = &hw->board.chanA.stats; in LOCOMX_init()
430 memcpy(ch->current_stats, &ch->stats, sizeof(struct net_device_stats)); in LOCOMX_init()
440 remove_proc_entry(FILENAME_IO, ch->procdir); in LOCOMX_init()
442 kfree(ch->HW_privdata); in LOCOMX_init()
449 struct comx_channel *ch = (struct comx_channel *)dev->priv; in LOCOMX_exit() local
451 ch->HW_access_board = NULL; in LOCOMX_exit()
452 ch->HW_release_board = NULL; in LOCOMX_exit()
453 ch->HW_txe = NULL; in LOCOMX_exit()
454 ch->HW_open = NULL; in LOCOMX_exit()
455 ch->HW_close = NULL; in LOCOMX_exit()
456 ch->HW_send_packet = NULL; in LOCOMX_exit()
457 ch->HW_statistics = NULL; in LOCOMX_exit()
458 ch->HW_set_clock = NULL; in LOCOMX_exit()
459 memcpy(&ch->stats, ch->current_stats, sizeof(struct net_device_stats)); in LOCOMX_exit()
460 ch->current_stats = &ch->stats; in LOCOMX_exit()
462 kfree(ch->HW_privdata); in LOCOMX_exit()
464 remove_proc_entry(FILENAME_IO, ch->procdir); in LOCOMX_exit()
465 remove_proc_entry(FILENAME_IRQ, ch->procdir); in LOCOMX_exit()