Lines Matching refs:dev

51 static void com20020_command(struct net_device *dev, int command);
52 static int com20020_status(struct net_device *dev);
53 static void com20020_setmask(struct net_device *dev, int mask);
54 static int com20020_reset(struct net_device *dev, int really_reset);
55 static void com20020_copy_to_card(struct net_device *dev, int bufnum,
57 static void com20020_copy_from_card(struct net_device *dev, int bufnum,
59 static void com20020_set_mc_list(struct net_device *dev);
62 static void com20020_copy_from_card(struct net_device *dev, int bufnum, in com20020_copy_from_card() argument
65 int ioaddr = dev->base_addr, ofs = 512 * bufnum + offset; in com20020_copy_from_card()
73 TIME(dev, "insb", count, in com20020_copy_from_card()
77 static void com20020_copy_to_card(struct net_device *dev, int bufnum, in com20020_copy_to_card() argument
80 int ioaddr = dev->base_addr, ofs = 512 * bufnum + offset; in com20020_copy_to_card()
87 TIME(dev, "outsb", count, in com20020_copy_to_card()
92 int com20020_check(struct net_device *dev) in com20020_check() argument
94 int ioaddr = dev->base_addr, status; in com20020_check()
95 struct arcnet_local *lp = netdev_priv(dev); in com20020_check()
129 arc_printk(D_NORMAL, dev, "status invalid (%Xh).\n", status); in com20020_check()
132 arc_printk(D_INIT_REASONS, dev, "status after reset: %X\n", status); in com20020_check()
137 arc_printk(D_INIT_REASONS, dev, "status after reset acknowledged: %X\n", in com20020_check()
147 arc_printk(D_NORMAL, dev, "Signature byte not found (%02Xh != D1h).\n", in com20020_check()
154 static int com20020_set_hwaddr(struct net_device *dev, void *addr) in com20020_set_hwaddr() argument
156 int ioaddr = dev->base_addr; in com20020_set_hwaddr()
157 struct arcnet_local *lp = netdev_priv(dev); in com20020_set_hwaddr()
160 dev_addr_set(dev, hwaddr->sa_data); in com20020_set_hwaddr()
162 arcnet_outb(dev->dev_addr[0], ioaddr, COM20020_REG_W_XREG); in com20020_set_hwaddr()
167 static int com20020_netdev_open(struct net_device *dev) in com20020_netdev_open() argument
169 int ioaddr = dev->base_addr; in com20020_netdev_open()
170 struct arcnet_local *lp = netdev_priv(dev); in com20020_netdev_open()
175 return arcnet_open(dev); in com20020_netdev_open()
178 static int com20020_netdev_close(struct net_device *dev) in com20020_netdev_close() argument
180 int ioaddr = dev->base_addr; in com20020_netdev_close()
181 struct arcnet_local *lp = netdev_priv(dev); in com20020_netdev_close()
183 arcnet_close(dev); in com20020_netdev_close()
203 int com20020_found(struct net_device *dev, int shared) in com20020_found() argument
206 int ioaddr = dev->base_addr; in com20020_found()
210 lp = netdev_priv(dev); in com20020_found()
222 if (!dev->dev_addr[0]) in com20020_found()
223 arcnet_set_addr(dev, arcnet_inb(ioaddr, 8)); in com20020_found()
240 arcnet_outb(dev->dev_addr[0], ioaddr, COM20020_REG_W_XREG); in com20020_found()
243 if (request_irq(dev->irq, arcnet_interrupt, shared, in com20020_found()
244 "arcnet (COM20020)", dev)) { in com20020_found()
245 arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq); in com20020_found()
249 arc_printk(D_NORMAL, dev, "%s: station %02Xh found at %03lXh, IRQ %d.\n", in com20020_found()
250 lp->card_name, dev->dev_addr[0], dev->base_addr, dev->irq); in com20020_found()
253 arc_printk(D_NORMAL, dev, "Using backplane mode.\n"); in com20020_found()
256 arc_printk(D_NORMAL, dev, "Using extended timeout value of %d\n", in com20020_found()
259 arc_printk(D_NORMAL, dev, "Using CKP %d - data rate %s\n", in com20020_found()
268 if (register_netdev(dev)) { in com20020_found()
269 free_irq(dev->irq, dev); in com20020_found()
282 static int com20020_reset(struct net_device *dev, int really_reset) in com20020_reset() argument
284 struct arcnet_local *lp = netdev_priv(dev); in com20020_reset()
285 u_int ioaddr = dev->base_addr; in com20020_reset()
288 arc_printk(D_DEBUG, dev, "%s: %d: %s: dev: %p, lp: %p, dev->name: %s\n", in com20020_reset()
289 __FILE__, __LINE__, __func__, dev, lp, dev->name); in com20020_reset()
290 arc_printk(D_INIT, dev, "Resetting %s (status=%02Xh)\n", in com20020_reset()
291 dev->name, arcnet_inb(ioaddr, COM20020_REG_R_STATUS)); in com20020_reset()
293 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
297 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
308 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
313 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
315 com20020_copy_from_card(dev, 0, 0, &inbyte, 1); in com20020_reset()
316 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
318 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", in com20020_reset()
320 arc_printk(D_NORMAL, dev, "reset failed: TESTvalue not present.\n"); in com20020_reset()
326 arc_printk(D_DEBUG, dev, "%s: %d: %s\n", __FILE__, __LINE__, __func__); in com20020_reset()
332 static void com20020_setmask(struct net_device *dev, int mask) in com20020_setmask() argument
334 u_int ioaddr = dev->base_addr; in com20020_setmask()
336 arc_printk(D_DURING, dev, "Setting mask to %x at %x\n", mask, ioaddr); in com20020_setmask()
340 static void com20020_command(struct net_device *dev, int cmd) in com20020_command() argument
342 u_int ioaddr = dev->base_addr; in com20020_command()
347 static int com20020_status(struct net_device *dev) in com20020_status() argument
349 u_int ioaddr = dev->base_addr; in com20020_status()
355 static void com20020_close(struct net_device *dev) in com20020_close() argument
357 struct arcnet_local *lp = netdev_priv(dev); in com20020_close()
358 int ioaddr = dev->base_addr; in com20020_close()
372 static void com20020_set_mc_list(struct net_device *dev) in com20020_set_mc_list() argument
374 struct arcnet_local *lp = netdev_priv(dev); in com20020_set_mc_list()
375 int ioaddr = dev->base_addr; in com20020_set_mc_list()
377 if ((dev->flags & IFF_PROMISC) && (dev->flags & IFF_UP)) { in com20020_set_mc_list()
380 arc_printk(D_NORMAL, dev, "Setting promiscuous flag...\n"); in com20020_set_mc_list()
387 arc_printk(D_NORMAL, dev, "Resetting promiscuous flag...\n"); in com20020_set_mc_list()