pc300too.c (93f764371c45bc3f1d859026f12ef6255c388a85) pc300too.c (a657c8b4d50d33954a3f766c8876f31d323d32b9)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Cyclades PC300 synchronous serial card driver for Linux
4 *
5 * Copyright (C) 2000-2008 Krzysztof Halasa <khc@pm.waw.pl>
6 *
7 * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/>.
8 *

--- 144 unchanged lines hidden (view full) ---

153 writel(card->init_ctrl_value &
154 ~PC300_CHMEDIA_MASK(port->chan), init_ctrl);
155 }
156}
157
158static int pc300_open(struct net_device *dev)
159{
160 port_t *port = dev_to_port(dev);
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Cyclades PC300 synchronous serial card driver for Linux
4 *
5 * Copyright (C) 2000-2008 Krzysztof Halasa <khc@pm.waw.pl>
6 *
7 * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/>.
8 *

--- 144 unchanged lines hidden (view full) ---

153 writel(card->init_ctrl_value &
154 ~PC300_CHMEDIA_MASK(port->chan), init_ctrl);
155 }
156}
157
158static int pc300_open(struct net_device *dev)
159{
160 port_t *port = dev_to_port(dev);
161
162 int result = hdlc_open(dev);
161 int result = hdlc_open(dev);
162
163 if (result)
164 return result;
165
166 sca_open(dev);
167 pc300_set_iface(port);
168 return 0;
169}
170

--- 250 unchanged lines hidden (view full) ---

421 // sca_out(sca_in(PCR, card) | PCR_COTE, PCR, card);
422
423 sca_out(0x10, BTCR, card);
424
425 for (i = 0; i < card->n_ports; i++) {
426 port_t *port = &card->ports[i];
427 struct net_device *dev = port->netdev;
428 hdlc_device *hdlc = dev_to_hdlc(dev);
163 if (result)
164 return result;
165
166 sca_open(dev);
167 pc300_set_iface(port);
168 return 0;
169}
170

--- 250 unchanged lines hidden (view full) ---

421 // sca_out(sca_in(PCR, card) | PCR_COTE, PCR, card);
422
423 sca_out(0x10, BTCR, card);
424
425 for (i = 0; i < card->n_ports; i++) {
426 port_t *port = &card->ports[i];
427 struct net_device *dev = port->netdev;
428 hdlc_device *hdlc = dev_to_hdlc(dev);
429
429 port->chan = i;
430
431 spin_lock_init(&port->lock);
432 dev->irq = card->irq;
433 dev->mem_start = ramphys;
434 dev->mem_end = ramphys + ramsize - 1;
435 dev->tx_queue_len = 50;
436 dev->netdev_ops = &pc300_ops;

--- 73 unchanged lines hidden ---
430 port->chan = i;
431
432 spin_lock_init(&port->lock);
433 dev->irq = card->irq;
434 dev->mem_start = ramphys;
435 dev->mem_end = ramphys + ramsize - 1;
436 dev->tx_queue_len = 50;
437 dev->netdev_ops = &pc300_ops;

--- 73 unchanged lines hidden ---