23 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
25 #include <linux/module.h>
26 #include <linux/kernel.h>
28 #include <linux/net.h>
30 #include <linux/netdevice.h>
31 #include <linux/if_arp.h>
33 #include <linux/hdlc.h>
35 #include <linux/slab.h>
41 #include <asm/byteorder.h>
52 return (
struct z8530_dev *)dev_to_hdlc(dev)->priv;
65 skb_reset_mac_header(skb);
116 sv11->
chanA.rx_function = hostess_input;
122 netif_start_queue(d);
126 static int hostess_close(
struct net_device *d)
168 static int hostess_attach(
struct net_device *
dev,
unsigned short encoding,
169 unsigned short parity)
181 .ndo_open = hostess_open,
182 .ndo_stop = hostess_close,
185 .ndo_do_ioctl = hostess_ioctl,
197 pr_warn(
"I/O 0x%X already in use\n", iobase);
211 sv->
chanA.ctrlio = iobase + 1;
212 sv->
chanA.dataio = iobase + 3;
213 sv->
chanB.ctrlio = -1;
214 sv->
chanB.dataio = -1;
224 "Hostess SV11", sv) < 0) {
225 pr_warn(
"IRQ %d already in use\n", irq);
230 sv->
chanA.private = sv;
241 outb(0x03 | 0x08, iobase + 4);
259 pr_err(
"Z8530 series device not found\n");
279 dev_to_hdlc(netdev)->attach = hostess_attach;
280 dev_to_hdlc(netdev)->xmit = hostess_queue_xmit;
286 pr_err(
"unable to register HDLC device\n");
310 static void sv11_shutdown(
struct z8530_dev *dev)
325 static int io = 0x200;
333 MODULE_PARM_DESC(irq,
"The interrupt line setting for the Comtrol Hostess SV11 card");
343 if ((sv11_unit = sv11_init(io, irq)) ==
NULL)
351 sv11_shutdown(sv11_unit);