tag | line | file | source code |
dev | 167 | arch/alpha/boot/main.c | static inline long close(long dev) |
dev | 169 | arch/alpha/boot/main.c | return dispatch(CCB_CLOSE, dev); |
dev | 172 | arch/alpha/boot/main.c | static inline long load(long dev, unsigned long addr, unsigned long count) |
dev | 184 | arch/alpha/boot/main.c | return dispatch(CCB_READ, dev, count, addr, BOOT_SIZE/512 + 1); |
dev | 204 | arch/alpha/boot/main.c | long dev; |
dev | 214 | arch/alpha/boot/main.c | dev = openboot(); |
dev | 215 | arch/alpha/boot/main.c | if (dev < 0) { |
dev | 216 | arch/alpha/boot/main.c | printk("Unable to open boot device: %016lx\n", dev); |
dev | 219 | arch/alpha/boot/main.c | dev &= 0xffffffff; |
dev | 221 | arch/alpha/boot/main.c | i = load(dev, START_ADDR, START_SIZE); |
dev | 222 | arch/alpha/boot/main.c | close(dev); |
dev | 91 | arch/alpha/kernel/bios32.c | static void disable_dev(struct pci_dev *dev) |
dev | 96 | arch/alpha/kernel/bios32.c | bus = dev->bus; |
dev | 97 | arch/alpha/kernel/bios32.c | pcibios_read_config_word(bus->number, dev->devfn, PCI_COMMAND, &cmd); |
dev | 101 | arch/alpha/kernel/bios32.c | pcibios_write_config_word(bus->number, dev->devfn, PCI_COMMAND, cmd); |
dev | 110 | arch/alpha/kernel/bios32.c | static void layout_dev(struct pci_dev *dev) |
dev | 117 | arch/alpha/kernel/bios32.c | bus = dev->bus; |
dev | 118 | arch/alpha/kernel/bios32.c | pcibios_read_config_word(bus->number, dev->devfn, PCI_COMMAND, &cmd); |
dev | 125 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, reg, |
dev | 127 | arch/alpha/kernel/bios32.c | pcibios_read_config_dword(bus->number, dev->devfn, reg, &base); |
dev | 150 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, |
dev | 170 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 171 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn)); |
dev | 188 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 189 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn)); |
dev | 215 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 216 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn), size); |
dev | 230 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, |
dev | 235 | arch/alpha/kernel/bios32.c | if (dev->class >> 8 == PCI_CLASS_NOT_DEFINED || |
dev | 236 | arch/alpha/kernel/bios32.c | dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA || |
dev | 237 | arch/alpha/kernel/bios32.c | dev->class >> 8 == PCI_CLASS_DISPLAY_VGA || |
dev | 238 | arch/alpha/kernel/bios32.c | dev->class >> 8 == PCI_CLASS_DISPLAY_XGA) |
dev | 249 | arch/alpha/kernel/bios32.c | pcibios_write_config_word(bus->number, dev->devfn, PCI_COMMAND, |
dev | 258 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 279 | arch/alpha/kernel/bios32.c | for (dev = bus->devices; dev; dev = dev->sibling) { |
dev | 280 | arch/alpha/kernel/bios32.c | if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) { |
dev | 281 | arch/alpha/kernel/bios32.c | disable_dev(dev) ; |
dev | 288 | arch/alpha/kernel/bios32.c | for (dev = bus->devices; dev; dev = dev->sibling) { |
dev | 289 | arch/alpha/kernel/bios32.c | if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) { |
dev | 290 | arch/alpha/kernel/bios32.c | layout_dev(dev); |
dev | 353 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 355 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 356 | arch/alpha/kernel/bios32.c | if (dev->vendor == vendor && dev->device == device_id) { |
dev | 358 | arch/alpha/kernel/bios32.c | *devfn = dev->devfn; |
dev | 359 | arch/alpha/kernel/bios32.c | *bus = dev->bus->number; |
dev | 377 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 379 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 380 | arch/alpha/kernel/bios32.c | if (dev->class == class_code) { |
dev | 382 | arch/alpha/kernel/bios32.c | *devfn = dev->devfn; |
dev | 383 | arch/alpha/kernel/bios32.c | *bus = dev->bus->number; |
dev | 445 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 451 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 452 | arch/alpha/kernel/bios32.c | dev->irq = 0; |
dev | 457 | arch/alpha/kernel/bios32.c | if (dev->bus->number != 0) |
dev | 461 | arch/alpha/kernel/bios32.c | pcibios_read_config_byte(dev->bus->number, dev->devfn, |
dev | 463 | arch/alpha/kernel/bios32.c | if (irq_tab[PCI_SLOT(dev->devfn) - min_idsel][pin] != -1) |
dev | 464 | arch/alpha/kernel/bios32.c | dev->irq = irq_tab[PCI_SLOT(dev->devfn) - min_idsel][pin]; |
dev | 467 | arch/alpha/kernel/bios32.c | pcibios_write_config_byte(dev->bus->number, dev->devfn, |
dev | 468 | arch/alpha/kernel/bios32.c | PCI_INTERRUPT_LINE, dev->irq); |
dev | 473 | arch/alpha/kernel/bios32.c | if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { |
dev | 474 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(dev->bus->number, dev->devfn, |
dev | 599 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 659 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 660 | arch/alpha/kernel/bios32.c | dev->irq = 0; |
dev | 661 | arch/alpha/kernel/bios32.c | if (dev->bus->number != 0) { |
dev | 663 | arch/alpha/kernel/bios32.c | dev->bus->number); |
dev | 666 | arch/alpha/kernel/bios32.c | if (PCI_SLOT(dev->devfn) < 6 || |
dev | 667 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn) >= 6 + sizeof(pirq_tab)/sizeof(pirq_tab[0])) |
dev | 671 | arch/alpha/kernel/bios32.c | dev->vendor, dev->device, PCI_SLOT(dev->devfn)); |
dev | 674 | arch/alpha/kernel/bios32.c | pcibios_read_config_byte(dev->bus->number, dev->devfn, |
dev | 676 | arch/alpha/kernel/bios32.c | pirq = pirq_tab[PCI_SLOT(dev->devfn) - 6][pin]; |
dev | 684 | arch/alpha/kernel/bios32.c | if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { |
dev | 685 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(dev->bus->number, dev->devfn, |
dev | 689 | arch/alpha/kernel/bios32.c | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { |
dev | 692 | arch/alpha/kernel/bios32.c | dev->irq = (route_tab >> (8 * pirq)) & 0xff; |
dev | 695 | arch/alpha/kernel/bios32.c | level_bits |= (1 << dev->irq); |
dev | 699 | arch/alpha/kernel/bios32.c | pcibios_write_config_byte(dev->bus->number, dev->devfn, |
dev | 700 | arch/alpha/kernel/bios32.c | PCI_INTERRUPT_LINE, dev->irq); |
dev | 255 | arch/alpha/kernel/osf_sys.c | kdev_t dev; |
dev | 271 | arch/alpha/kernel/osf_sys.c | dev = inode->i_rdev; |
dev | 272 | arch/alpha/kernel/osf_sys.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 276 | arch/alpha/kernel/osf_sys.c | fops = get_blkfops(MAJOR(dev)); |
dev | 352 | arch/alpha/kernel/osf_sys.c | kdev_t dev; |
dev | 360 | arch/alpha/kernel/osf_sys.c | dev = get_unnamed_dev(); |
dev | 361 | arch/alpha/kernel/osf_sys.c | if (!dev) |
dev | 363 | arch/alpha/kernel/osf_sys.c | retval = do_mount(dev, "", dirname, "proc", flags, NULL); |
dev | 365 | arch/alpha/kernel/osf_sys.c | put_unnamed_dev(dev); |
dev | 54 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned int *val) |
dev | 58 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 60 | arch/ppc/kernel/pci.c | _printk("PCI Read config dword[%d.%d.%x] = ", bus, dev, offset); |
dev | 62 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 68 | arch/ppc/kernel/pci.c | ptr = (unsigned long *)(0x80800000 | (1<<dev) | offset); |
dev | 83 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned short *val) |
dev | 87 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 89 | arch/ppc/kernel/pci.c | _printk("PCI Read config word[%d.%d.%x] = ", bus, dev, offset); |
dev | 91 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 97 | arch/ppc/kernel/pci.c | ptr = (unsigned short *)(0x80800000 | (1<<dev) | offset); |
dev | 112 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned char *val) |
dev | 116 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 118 | arch/ppc/kernel/pci.c | _printk("PCI Read config byte[%d.%d.%x] = ", bus, dev, offset); |
dev | 120 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 126 | arch/ppc/kernel/pci.c | ptr = (unsigned char *)(0x80800000 | (1<<dev) | offset ^ 1); |
dev | 141 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned int val) |
dev | 145 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 148 | arch/ppc/kernel/pci.c | _printk("PCI Write config dword[%d.%d.%x] = %x\n", bus, dev, offset, _val); |
dev | 150 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 155 | arch/ppc/kernel/pci.c | ptr = (unsigned long *)(0x80800000 | (1<<dev) | offset); |
dev | 163 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned short val) |
dev | 167 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 170 | arch/ppc/kernel/pci.c | _printk("PCI Write config word[%d.%d.%x] = %x\n", bus, dev, offset, _val); |
dev | 172 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 177 | arch/ppc/kernel/pci.c | ptr = (unsigned short *)(0x80800000 | (1<<dev) | offset); |
dev | 185 | arch/ppc/kernel/pci.c | unsigned char dev, unsigned char offset, unsigned char val) |
dev | 189 | arch/ppc/kernel/pci.c | dev >>= 3; |
dev | 192 | arch/ppc/kernel/pci.c | _printk("PCI Write config byte[%d.%d.%x] = %x\n", bus, dev, offset, _val); |
dev | 194 | arch/ppc/kernel/pci.c | if ((bus != 0) || (dev < 11) || (dev > 16)) |
dev | 199 | arch/ppc/kernel/pci.c | ptr = (unsigned char *)(0x80800000 | (1<<dev) | offset ^ 1); |
dev | 208 | arch/ppc/kernel/pci.c | unsigned char *dev) |
dev | 223 | arch/ppc/kernel/pci.c | *dev = devnr<<3; |
dev | 234 | arch/ppc/kernel/pci.c | unsigned char *bus, unsigned char *dev) |
dev | 684 | arch/sparc/kernel/sys_sunos.c | dev_t dev; |
dev | 728 | arch/sparc/kernel/sys_sunos.c | dev = get_unnamed_dev (); |
dev | 730 | arch/sparc/kernel/sys_sunos.c | ret = do_mount (dev, "", dir_name, "nfs", linux_flags, &linux_nfs_mount); |
dev | 732 | arch/sparc/kernel/sys_sunos.c | put_unnamed_dev(dev); |
dev | 3520 | drivers/block/floppy.c | static int check_floppy_change(kdev_t dev) |
dev | 3522 | drivers/block/floppy.c | int drive = DRIVE(dev); |
dev | 3524 | drivers/block/floppy.c | if (MAJOR(dev) != MAJOR_NR) { |
dev | 3541 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
dev | 3550 | drivers/block/floppy.c | static int floppy_revalidate(kdev_t dev) |
dev | 3552 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
dev | 3554 | drivers/block/floppy.c | int drive=DRIVE(dev); |
dev | 3577 | drivers/block/floppy.c | int size = floppy_blocksizes[MINOR(dev)]; |
dev | 3580 | drivers/block/floppy.c | if (!(bh = getblk(dev,0,size))){ |
dev | 120 | drivers/block/genhd.c | static void extended_partition(struct gendisk *hd, kdev_t dev) |
dev | 128 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 129 | drivers/block/genhd.c | first_size = hd->part[MINOR(dev)].nr_sects; |
dev | 135 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
dev | 148 | drivers/block/genhd.c | this_size = hd->part[MINOR(dev)].nr_sects; |
dev | 200 | drivers/block/genhd.c | dev = MKDEV(hd->major, current_minor); |
dev | 207 | drivers/block/genhd.c | static int msdos_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector) |
dev | 219 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 253 | drivers/block/genhd.c | if (ide_xlate_1024(dev, -1, " [EZD]")) { |
dev | 269 | drivers/block/genhd.c | if (ide_xlate_1024(dev, 1, " [DM6:DDO]")) { |
dev | 279 | drivers/block/genhd.c | (void) ide_xlate_1024 (dev, 0, " [DM6:MBR]"); |
dev | 284 | drivers/block/genhd.c | (void) ide_xlate_1024(dev, 0, " [DM6:AUX]"); |
dev | 297 | drivers/block/genhd.c | (void) ide_xlate_1024(dev, heads, " [PTBL]"); |
dev | 352 | drivers/block/genhd.c | static int osf_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector) |
dev | 391 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 425 | drivers/block/genhd.c | static int sun_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector) |
dev | 454 | drivers/block/genhd.c | if(!(bh = bread(dev, 0, 1024))) { |
dev | 455 | drivers/block/genhd.c | printk("Dev %d: unable to read partition table\n", dev); |
dev | 461 | drivers/block/genhd.c | printk("Dev %d Sun disklabel: bad magic %08x\n", dev, label->magic); |
dev | 470 | drivers/block/genhd.c | printk("Dev %d Sun disklabel: Csum bad, label corrupted\n", dev); |
dev | 493 | drivers/block/genhd.c | static void check_partition(struct gendisk *hd, kdev_t dev) |
dev | 502 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 509 | drivers/block/genhd.c | hd->part[MINOR(dev)].start_sect = 0; |
dev | 513 | drivers/block/genhd.c | printk(" %s:", disk_name(hd, MINOR(dev), buf)); |
dev | 515 | drivers/block/genhd.c | if (msdos_partition(hd, dev, first_sector)) |
dev | 519 | drivers/block/genhd.c | if (osf_partition(hd, dev, first_sector)) |
dev | 523 | drivers/block/genhd.c | if(sun_partition(hd, dev, first_sector)) |
dev | 538 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
dev | 541 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
dev | 542 | drivers/block/genhd.c | int end_minor = first_minor + dev->max_p; |
dev | 544 | drivers/block/genhd.c | blk_size[dev->major] = NULL; |
dev | 546 | drivers/block/genhd.c | check_partition(dev, MKDEV(dev->major, first_minor)); |
dev | 552 | drivers/block/genhd.c | if (dev->sizes != NULL) { /* optional safeguard in ll_rw_blk.c */ |
dev | 554 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 555 | drivers/block/genhd.c | blk_size[dev->major] = dev->sizes; |
dev | 559 | drivers/block/genhd.c | static void setup_dev(struct gendisk *dev) |
dev | 562 | drivers/block/genhd.c | int end_minor = dev->max_nr * dev->max_p; |
dev | 564 | drivers/block/genhd.c | blk_size[dev->major] = NULL; |
dev | 566 | drivers/block/genhd.c | dev->part[i].start_sect = 0; |
dev | 567 | drivers/block/genhd.c | dev->part[i].nr_sects = 0; |
dev | 569 | drivers/block/genhd.c | dev->init(dev); |
dev | 570 | drivers/block/genhd.c | for (drive = 0 ; drive < dev->nr_real ; drive++) { |
dev | 571 | drivers/block/genhd.c | int first_minor = drive << dev->minor_shift; |
dev | 573 | drivers/block/genhd.c | check_partition(dev, MKDEV(dev->major, first_minor)); |
dev | 575 | drivers/block/genhd.c | if (dev->sizes != NULL) { /* optional safeguard in ll_rw_blk.c */ |
dev | 577 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 578 | drivers/block/genhd.c | blk_size[dev->major] = dev->sizes; |
dev | 283 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->rq_dev); |
dev | 285 | drivers/block/hd.c | struct hd_driveid *id = hd_ident_info[dev]; |
dev | 287 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 290 | drivers/block/hd.c | printk (" hd%c: non-IDE device, %dMB, CHS=%d/%d/%d\n", dev+'a', |
dev | 291 | drivers/block/hd.c | hd_info[dev].cyl*hd_info[dev].head*hd_info[dev].sect / 2048, |
dev | 292 | drivers/block/hd.c | hd_info[dev].cyl, hd_info[dev].head, hd_info[dev].sect); |
dev | 294 | drivers/block/hd.c | hd_ident_info[dev] = NULL; |
dev | 299 | drivers/block/hd.c | max_mult[dev] = id->max_multsect; |
dev | 308 | drivers/block/hd.c | hd_info[dev].cyl = id->cur_cyls; |
dev | 309 | drivers/block/hd.c | hd_info[dev].head = id->cur_heads; |
dev | 310 | drivers/block/hd.c | hd_info[dev].sect = id->cur_sectors; |
dev | 316 | drivers/block/hd.c | dev+'a', id->model, id->cyls*id->heads*id->sectors/2048, |
dev | 317 | drivers/block/hd.c | id->buf_size/2, bios_info[dev].cyl, bios_info[dev].head, |
dev | 318 | drivers/block/hd.c | bios_info[dev].sect, id->max_multsect); |
dev | 325 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 336 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->rq_dev), stat = inb_p(HD_STATUS); |
dev | 338 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 341 | drivers/block/hd.c | mult_req[dev] = mult_count[dev] = 0; |
dev | 344 | drivers/block/hd.c | if ((mult_count[dev] = mult_req[dev])) |
dev | 346 | drivers/block/hd.c | dev+'a', mult_count[dev]); |
dev | 348 | drivers/block/hd.c | printk (" hd%c: disabled multiple mode\n", dev+'a'); |
dev | 446 | drivers/block/hd.c | int dev; |
dev | 450 | drivers/block/hd.c | dev = DEVICE_NR(CURRENT->rq_dev); |
dev | 453 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 457 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 474 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->rq_dev); |
dev | 475 | drivers/block/hd.c | int i, retries = 100000, msect = mult_count[dev], nsect; |
dev | 477 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 507 | drivers/block/hd.c | dev+'a', CURRENT->sector, CURRENT->sector+nsect, |
dev | 527 | drivers/block/hd.c | static inline void multwrite (unsigned int dev) |
dev | 529 | drivers/block/hd.c | unsigned int mcount = mult_count[dev]; |
dev | 549 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(WCURRENT.rq_dev); |
dev | 551 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 556 | drivers/block/hd.c | multwrite(dev); |
dev | 635 | drivers/block/hd.c | unsigned int dev; |
dev | 643 | drivers/block/hd.c | dev = DEVICE_NR(CURRENT->rq_dev); |
dev | 644 | drivers/block/hd.c | printk("hd%c: timeout\n", dev+'a'); |
dev | 647 | drivers/block/hd.c | printk("hd%c: too many errors\n", dev+'a'); |
dev | 656 | drivers/block/hd.c | int do_special_op (unsigned int dev) |
dev | 658 | drivers/block/hd.c | if (recalibrate[dev]) { |
dev | 659 | drivers/block/hd.c | recalibrate[dev] = 0; |
dev | 660 | drivers/block/hd.c | hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr); |
dev | 663 | drivers/block/hd.c | if (!identified[dev]) { |
dev | 664 | drivers/block/hd.c | identified[dev] = 1; |
dev | 665 | drivers/block/hd.c | unmask_intr[dev] = DEFAULT_UNMASK_INTR; |
dev | 666 | drivers/block/hd.c | mult_req[dev] = DEFAULT_MULT_COUNT; |
dev | 667 | drivers/block/hd.c | hd_out(dev,0,0,0,0,WIN_IDENTIFY,&identify_intr); |
dev | 670 | drivers/block/hd.c | if (mult_req[dev] != mult_count[dev]) { |
dev | 671 | drivers/block/hd.c | hd_out(dev,mult_req[dev],0,0,0,WIN_SETMULT,&set_multmode_intr); |
dev | 674 | drivers/block/hd.c | if (hd_info[dev].head > 16) { |
dev | 675 | drivers/block/hd.c | printk ("hd%c: cannot handle device with more than 16 heads - giving up\n", dev+'a'); |
dev | 678 | drivers/block/hd.c | special_op[dev] = 0; |
dev | 696 | drivers/block/hd.c | unsigned int dev, block, nsect, sec, track, head, cyl; |
dev | 710 | drivers/block/hd.c | dev = MINOR(CURRENT->rq_dev); |
dev | 713 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects || ((block+nsect) > hd[dev].nr_sects)) { |
dev | 715 | drivers/block/hd.c | if (dev >= (NR_HD<<6)) |
dev | 725 | drivers/block/hd.c | block += hd[dev].start_sect; |
dev | 726 | drivers/block/hd.c | dev >>= 6; |
dev | 727 | drivers/block/hd.c | if (special_op[dev]) { |
dev | 728 | drivers/block/hd.c | if (do_special_op(dev)) |
dev | 732 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
dev | 733 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
dev | 734 | drivers/block/hd.c | head = track % hd_info[dev].head; |
dev | 735 | drivers/block/hd.c | cyl = track / hd_info[dev].head; |
dev | 738 | drivers/block/hd.c | dev+'a', (CURRENT->cmd == READ)?"read":"writ", |
dev | 741 | drivers/block/hd.c | if (!unmask_intr[dev]) |
dev | 744 | drivers/block/hd.c | unsigned int cmd = mult_count[dev] > 1 ? WIN_MULTREAD : WIN_READ; |
dev | 745 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,cmd,&read_intr); |
dev | 751 | drivers/block/hd.c | if (mult_count[dev]) |
dev | 752 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_MULTWRITE,&multwrite_intr); |
dev | 754 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr); |
dev | 761 | drivers/block/hd.c | if (mult_count[dev]) { |
dev | 763 | drivers/block/hd.c | multwrite(dev); |
dev | 782 | drivers/block/hd.c | int dev, err; |
dev | 787 | drivers/block/hd.c | dev = DEVICE_NR(inode->i_rdev); |
dev | 788 | drivers/block/hd.c | if (dev >= NR_HD) |
dev | 796 | drivers/block/hd.c | put_user(bios_info[dev].head, |
dev | 798 | drivers/block/hd.c | put_user(bios_info[dev].sect, |
dev | 800 | drivers/block/hd.c | put_user(bios_info[dev].cyl, |
dev | 837 | drivers/block/hd.c | unmask_intr[dev] = arg; |
dev | 845 | drivers/block/hd.c | put_user(unmask_intr[dev], (long *) arg); |
dev | 853 | drivers/block/hd.c | put_user(mult_count[dev], (long *) arg); |
dev | 861 | drivers/block/hd.c | if (arg > max_mult[dev]) |
dev | 863 | drivers/block/hd.c | else if (mult_req[dev] != mult_count[dev]) { |
dev | 864 | drivers/block/hd.c | special_op[dev] = 1; |
dev | 867 | drivers/block/hd.c | mult_req[dev] = arg; |
dev | 868 | drivers/block/hd.c | special_op[dev] = 1; |
dev | 877 | drivers/block/hd.c | if (hd_ident_info[dev] == NULL) return -ENOMSG; |
dev | 881 | drivers/block/hd.c | memcpy_tofs((char *)arg, (char *) hd_ident_info[dev], sizeof(struct hd_driveid)); |
dev | 1080 | drivers/block/hd.c | static int revalidate_hddisk(kdev_t dev, int maxusage) |
dev | 1089 | drivers/block/hd.c | target = DEVICE_NR(dev); |
dev | 133 | drivers/block/linear.c | printk ("Block %ld out of bounds on dev %04x size %d offset %d\n", block, tmp_dev->dev, tmp_dev->size, tmp_dev->offset); |
dev | 139 | drivers/block/linear.c | req->rq_dev=tmp_dev->dev; |
dev | 141 | drivers/block/linear.c | add_request (blk_dev+MAJOR (tmp_dev->dev), req); |
dev | 155 | drivers/block/linear.c | bh->b_rdev=tmp_dev->dev; |
dev | 158 | drivers/block/linear.c | pending[queue].rq_dev=tmp_dev->dev; |
dev | 192 | drivers/block/linear.c | partition_name (data->hash_table[j].dev0->dev)); |
dev | 196 | drivers/block/linear.c | partition_name(data->hash_table[j].dev1->dev)); |
dev | 83 | drivers/block/ll_rw_blk.c | static inline void plug_device(struct blk_dev_struct * dev, struct request * plug) |
dev | 92 | drivers/block/ll_rw_blk.c | if (!dev->current_request) |
dev | 93 | drivers/block/ll_rw_blk.c | dev->current_request = plug; |
dev | 100 | drivers/block/ll_rw_blk.c | static inline void unplug_device(struct blk_dev_struct * dev) |
dev | 107 | drivers/block/ll_rw_blk.c | req = dev->current_request; |
dev | 109 | drivers/block/ll_rw_blk.c | dev->current_request = req->next; |
dev | 110 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 120 | drivers/block/ll_rw_blk.c | static inline struct request * get_request(int n, kdev_t dev) |
dev | 143 | drivers/block/ll_rw_blk.c | req->rq_dev = dev; |
dev | 150 | drivers/block/ll_rw_blk.c | static struct request * __get_request_wait(int n, kdev_t dev) |
dev | 157 | drivers/block/ll_rw_blk.c | unplug_device(MAJOR(dev)+blk_dev); |
dev | 160 | drivers/block/ll_rw_blk.c | req = get_request(n, dev); |
dev | 171 | drivers/block/ll_rw_blk.c | static inline struct request * get_request_wait(int n, kdev_t dev) |
dev | 176 | drivers/block/ll_rw_blk.c | req = get_request(n, dev); |
dev | 180 | drivers/block/ll_rw_blk.c | return __get_request_wait(n, dev); |
dev | 187 | drivers/block/ll_rw_blk.c | int is_read_only(kdev_t dev) |
dev | 191 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 192 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 197 | drivers/block/ll_rw_blk.c | void set_device_ro(kdev_t dev,int flag) |
dev | 201 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 202 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 233 | drivers/block/ll_rw_blk.c | void add_request(struct blk_dev_struct * dev, struct request * req) |
dev | 261 | drivers/block/ll_rw_blk.c | if (!(tmp = dev->current_request)) { |
dev | 262 | drivers/block/ll_rw_blk.c | dev->current_request = req; |
dev | 264 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 280 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 434 | drivers/block/ll_rw_blk.c | struct request *get_md_request (int max_req, kdev_t dev) |
dev | 436 | drivers/block/ll_rw_blk.c | return (get_request_wait (max_req, dev)); |
dev | 446 | drivers/block/ll_rw_blk.c | void ll_rw_page(int rw, kdev_t dev, unsigned long page, char * buffer) |
dev | 448 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 453 | drivers/block/ll_rw_blk.c | kdevname(dev), page); |
dev | 460 | drivers/block/ll_rw_blk.c | if (is_read_only(dev)) { |
dev | 462 | drivers/block/ll_rw_blk.c | kdevname(dev)); |
dev | 472 | drivers/block/ll_rw_blk.c | brw_page(rw, (unsigned long) buffer, dev, &block, PAGE_SIZE, 0); |
dev | 484 | drivers/block/ll_rw_blk.c | struct blk_dev_struct * dev; |
dev | 494 | drivers/block/ll_rw_blk.c | dev = NULL; |
dev | 496 | drivers/block/ll_rw_blk.c | dev = blk_dev + major; |
dev | 497 | drivers/block/ll_rw_blk.c | if (!dev || !dev->request_fn) { |
dev | 535 | drivers/block/ll_rw_blk.c | plug_device(dev, &plug); |
dev | 546 | drivers/block/ll_rw_blk.c | unplug_device(dev); |
dev | 559 | drivers/block/ll_rw_blk.c | void ll_rw_swap_file(int rw, kdev_t dev, unsigned int *b, int nb, char *buf) |
dev | 564 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 575 | drivers/block/ll_rw_blk.c | if (is_read_only(dev)) { |
dev | 577 | drivers/block/ll_rw_blk.c | kdevname(dev)); |
dev | 591 | drivers/block/ll_rw_blk.c | req[j] = get_request_wait(NR_REQUEST, dev); |
dev | 594 | drivers/block/ll_rw_blk.c | req[j] = get_request(NR_REQUEST, dev); |
dev | 620 | drivers/block/ll_rw_blk.c | struct blk_dev_struct *dev; |
dev | 622 | drivers/block/ll_rw_blk.c | for (dev = blk_dev + MAX_BLKDEV; dev-- != blk_dev;) { |
dev | 623 | drivers/block/ll_rw_blk.c | dev->request_fn = NULL; |
dev | 624 | drivers/block/ll_rw_blk.c | dev->current_request = NULL; |
dev | 267 | drivers/block/loop.c | static int loop_clr_fd(struct loop_device *lo, kdev_t dev) |
dev | 282 | drivers/block/loop.c | invalidate_buffers(dev); |
dev | 359 | drivers/block/loop.c | int dev, err; |
dev | 367 | drivers/block/loop.c | dev = MINOR(inode->i_rdev); |
dev | 368 | drivers/block/loop.c | if (dev >= MAX_LOOP) |
dev | 370 | drivers/block/loop.c | lo = &loop_dev[dev]; |
dev | 398 | drivers/block/loop.c | int dev; |
dev | 406 | drivers/block/loop.c | dev = MINOR(inode->i_rdev); |
dev | 407 | drivers/block/loop.c | if (dev >= MAX_LOOP) |
dev | 409 | drivers/block/loop.c | lo = &loop_dev[dev]; |
dev | 418 | drivers/block/loop.c | int dev; |
dev | 426 | drivers/block/loop.c | dev = MINOR(inode->i_rdev); |
dev | 427 | drivers/block/loop.c | if (dev >= MAX_LOOP) |
dev | 430 | drivers/block/loop.c | lo = &loop_dev[dev]; |
dev | 76 | drivers/block/md.c | static struct gendisk *find_gendisk (kdev_t dev) |
dev | 82 | drivers/block/md.c | if (tmp->major==MAJOR(dev)) |
dev | 93 | drivers/block/md.c | char *partition_name (kdev_t dev) |
dev | 97 | drivers/block/md.c | struct gendisk *hd=find_gendisk (dev); |
dev | 101 | drivers/block/md.c | printk ("No gendisk entry for dev %04x\n", dev); |
dev | 102 | drivers/block/md.c | sprintf (name, "dev %04x", dev); |
dev | 106 | drivers/block/md.c | return disk_name (hd, MINOR(dev), name); /* routine in genhd.c */ |
dev | 120 | drivers/block/md.c | if (read_ahead[MAJOR(devices[i][j].dev)]<minra) |
dev | 121 | drivers/block/md.c | minra=read_ahead[MAJOR(devices[i][j].dev)]; |
dev | 134 | drivers/block/md.c | kdev_t dev; |
dev | 151 | drivers/block/md.c | dev=to_kdev_t ((dev_t) arg); |
dev | 152 | drivers/block/md.c | if (MAJOR(dev)==MD_MAJOR || md_dev[minor].nb_dev==MAX_REAL) |
dev | 155 | drivers/block/md.c | if (!fs_may_mount (dev) || md_dev[minor].pers) |
dev | 158 | drivers/block/md.c | if (!(gen_real=find_gendisk (dev))) |
dev | 162 | drivers/block/md.c | devices[minor][index].dev=dev; |
dev | 170 | drivers/block/md.c | devices[minor][index].inode->i_dev=dev; /* don't care about |
dev | 178 | drivers/block/md.c | devices[minor][index].size=gen_real->sizes[MINOR(dev)] & ~((PAGE_SIZE >> 10)-1); |
dev | 187 | drivers/block/md.c | printk("REGISTER_DEV %s to md%x done\n", partition_name(dev), minor); |
dev | 225 | drivers/block/md.c | if (current_ra>read_ahead[MAJOR(devices[minor][index].dev)]) |
dev | 226 | drivers/block/md.c | current_ra=read_ahead[MAJOR(devices[minor][index].dev)]; |
dev | 266 | drivers/block/md.c | dev=to_kdev_t ((dev_t) arg); |
dev | 267 | drivers/block/md.c | if (!(err=md_valid_device (minor, dev, INVALID_ALWAYS))) |
dev | 268 | drivers/block/md.c | printk ("md%d : %s disabled\n", minor, partition_name (dev)); |
dev | 273 | drivers/block/md.c | dev=to_kdev_t ((dev_t) arg); |
dev | 274 | drivers/block/md.c | if (!(err=md_valid_device (minor, dev, VALID))) |
dev | 275 | drivers/block/md.c | printk ("md%d : %s enabled\n", minor, partition_name (dev)); |
dev | 437 | drivers/block/md.c | kdev_t dev; |
dev | 453 | drivers/block/md.c | major=MAJOR(dev=pending[i].rq_dev); |
dev | 476 | drivers/block/md.c | if (req->rq_dev == dev && |
dev | 490 | drivers/block/md.c | req->rq_dev == dev && |
dev | 514 | drivers/block/md.c | req=get_md_request (max_req, dev); |
dev | 531 | drivers/block/md.c | add_request (blk_dev + MAJOR(dev), req); |
dev | 631 | drivers/block/md.c | partition_name(devices[i][j].dev), |
dev | 665 | drivers/block/md.c | int md_valid_device (int minor, kdev_t dev, int mode) |
dev | 670 | drivers/block/md.c | if (devices[minor][i].dev==dev) |
dev | 675 | drivers/block/md.c | printk ("Oops, dev %04x not found in md_valid_device\n", dev); |
dev | 70 | drivers/block/raid0.c | data->strip_zone[i].dev[c++]=devices[minor]+j; |
dev | 100 | drivers/block/raid0.c | partition_name (devices[minor][i].dev)); |
dev | 212 | drivers/block/raid0.c | tmp_dev=zone->dev[(block >> FACTOR_SHIFT(factor)) % zone->nb_dev]; |
dev | 217 | drivers/block/raid0.c | req->rq_dev=tmp_dev->dev; |
dev | 219 | drivers/block/raid0.c | add_request (blk_dev+MAJOR (tmp_dev->dev), req); |
dev | 235 | drivers/block/raid0.c | bh->b_rdev=tmp_dev->dev; |
dev | 243 | drivers/block/raid0.c | pending[queue].rq_dev=tmp_dev->dev; |
dev | 295 | drivers/block/raid0.c | partition_name(data->strip_zone[j].dev[k]->dev)); |
dev | 195 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev); |
dev | 197 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 198 | drivers/block/xd.c | while (!xd_valid[dev]) |
dev | 201 | drivers/block/xd.c | xd_access[dev]++; |
dev | 243 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev),err; |
dev | 245 | drivers/block/xd.c | if (inode && (dev < xd_drives)) |
dev | 251 | drivers/block/xd.c | put_user(xd_info[dev].heads, &geometry->heads); |
dev | 252 | drivers/block/xd.c | put_user(xd_info[dev].sectors, &geometry->sectors); |
dev | 253 | drivers/block/xd.c | put_user(xd_info[dev].cylinders, &geometry->cylinders); |
dev | 295 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev); |
dev | 297 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 299 | drivers/block/xd.c | xd_access[dev]--; |
dev | 304 | drivers/block/xd.c | static int xd_reread_partitions(kdev_t dev) |
dev | 306 | drivers/block/xd.c | int target = DEVICE_NR(dev); |
dev | 261 | drivers/cdrom/gscd.c | unsigned int block,dev; |
dev | 267 | drivers/cdrom/gscd.c | dev = MINOR(CURRENT->rq_dev); |
dev | 299 | drivers/cdrom/gscd.c | printk ("GSCD: dev %d, block %d, nsect %d\n", dev, block, nsect ); |
dev | 538 | drivers/cdrom/mcdx.c | int dev; |
dev | 554 | drivers/cdrom/mcdx.c | dev = MINOR(CURRENT->rq_dev); |
dev | 556 | drivers/cdrom/mcdx.c | if ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) { |
dev | 1944 | drivers/cdrom/optcd.c | static int opt_media_change(kdev_t dev) |
dev | 1947 | drivers/cdrom/optcd.c | DEBUG((DEBUG_VFS, "dev: 0x%x; disk_changed = %d\n", dev, disk_changed)); |
dev | 785 | drivers/cdrom/sonycd535.c | unsigned int dev; |
dev | 807 | drivers/cdrom/sonycd535.c | dev = MINOR(CURRENT->rq_dev); |
dev | 810 | drivers/cdrom/sonycd535.c | if (dev != 0) { |
dev | 1076 | drivers/cdrom/sonycd535.c | unsigned int dev; |
dev | 1086 | drivers/cdrom/sonycd535.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 1087 | drivers/cdrom/sonycd535.c | if (dev != 0) { |
dev | 77 | drivers/char/ftape/kernel-interface.c | static int ftape_mmap(int dev, unsigned off, int prot); |
dev | 1922 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
dev | 1935 | drivers/char/tpqic02.c | MINOR(dev), buf, count, (unsigned long) filp->f_pos, flags); |
dev | 2097 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
dev | 2109 | drivers/char/tpqic02.c | MINOR(dev), buf, count, (unsigned long) filp->f_pos, flags); |
dev | 2248 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
dev | 2254 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) { |
dev | 2256 | drivers/char/tpqic02.c | kdevname(dev), flags); |
dev | 2259 | drivers/char/tpqic02.c | if (MINOR(dev)==255) /* special case for resetting */ |
dev | 2335 | drivers/char/tpqic02.c | if ((TP_DENS(dev)!=0) && (TP_DENS(current_tape_dev) != TP_DENS(dev))) { |
dev | 2348 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2384 | drivers/char/tpqic02.c | if (TP_DENS(current_tape_dev) == TP_DENS(dev) ) |
dev | 2387 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2390 | drivers/char/tpqic02.c | dens = TP_DENS(dev); |
dev | 2397 | drivers/char/tpqic02.c | switch (TP_DENS(dev)) { |
dev | 2434 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
dev | 2436 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) |
dev | 2438 | drivers/char/tpqic02.c | kdevname(dev)); |
dev | 2454 | drivers/char/tpqic02.c | if ((TP_REWCLOSE(dev)) && (status_bytes_rd | status_bytes_wr)) { |
dev | 179 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "icn_map_channel %d %d\n", dev->channel, channel); |
dev | 181 | drivers/isdn/icn/icn.c | if (channel == dev->channel) |
dev | 186 | drivers/isdn/icn/icn.c | dev->channel = channel; |
dev | 202 | drivers/isdn/icn/icn.c | if (dev->channel == channel) { |
dev | 203 | drivers/isdn/icn/icn.c | dev->chanlock++; |
dev | 211 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "icn_lock_channel %d FAILED, dc=%d\n", channel, dev->channel); |
dev | 223 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "icn_release_channel l=%d\n", dev->chanlock); |
dev | 227 | drivers/isdn/icn/icn.c | if (dev->chanlock) |
dev | 228 | drivers/isdn/icn/icn.c | dev->chanlock--; |
dev | 239 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "trymaplock c=%d dc=%d l=%d\n", channel, dev->channel, |
dev | 240 | drivers/isdn/icn/icn.c | dev->chanlock); |
dev | 242 | drivers/isdn/icn/icn.c | if ((!dev->chanlock) || (dev->channel == channel)) { |
dev | 243 | drivers/isdn/icn/icn.c | dev->chanlock++; |
dev | 265 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "map_release c=%d l=%d\n", channel, dev->chanlock); |
dev | 267 | drivers/isdn/icn/icn.c | if (dev->chanlock) |
dev | 268 | drivers/isdn/icn/icn.c | dev->chanlock--; |
dev | 269 | drivers/isdn/icn/icn.c | if (!dev->chanlock) |
dev | 285 | drivers/isdn/icn/icn.c | static void icn_pollbchan_receive(int channel, icn_dev * dev) |
dev | 287 | drivers/isdn/icn/icn.c | int mch = channel + ((dev->secondhalf) ? 2 : 0); |
dev | 300 | drivers/isdn/icn/icn.c | if ((dev->rcvidx[channel] + cnt) > 4000) { |
dev | 303 | drivers/isdn/icn/icn.c | dev->rcvidx[channel] = 0; |
dev | 306 | drivers/isdn/icn/icn.c | memcpy(&dev->rcvbuf[channel][dev->rcvidx[channel]], rbuf_d, cnt); |
dev | 307 | drivers/isdn/icn/icn.c | dev->rcvidx[channel] += cnt; |
dev | 317 | drivers/isdn/icn/icn.c | (dev->shmem->data_control.ecnr > dev->shmem->data_control.ecns) ? |
dev | 318 | drivers/isdn/icn/icn.c | 0xf - dev->shmem->data_control.ecnr + dev->shmem->data_control.ecns : |
dev | 319 | drivers/isdn/icn/icn.c | dev->shmem->data_control.ecns - dev->shmem->data_control.ecnr; |
dev | 321 | drivers/isdn/icn/icn.c | dev->interface.rcvcallb(dev->myid, channel, dev->rcvbuf[channel], |
dev | 322 | drivers/isdn/icn/icn.c | dev->rcvidx[channel]); |
dev | 323 | drivers/isdn/icn/icn.c | dev->rcvidx[channel] = 0; |
dev | 326 | drivers/isdn/icn/icn.c | (dev->shmem->data_control.ecnr > dev->shmem->data_control.ecns) ? |
dev | 327 | drivers/isdn/icn/icn.c | 0xf - dev->shmem->data_control.ecnr + dev->shmem->data_control.ecns : |
dev | 328 | drivers/isdn/icn/icn.c | dev->shmem->data_control.ecns - dev->shmem->data_control.ecnr; |
dev | 351 | drivers/isdn/icn/icn.c | static void icn_pollbchan_send(int channel, icn_dev * dev) |
dev | 353 | drivers/isdn/icn/icn.c | int mch = channel + ((dev->secondhalf) ? 2 : 0); |
dev | 361 | drivers/isdn/icn/icn.c | if (!dev->sndcount[channel]) |
dev | 364 | drivers/isdn/icn/icn.c | while (sbfree && dev->sndcount[channel]) { |
dev | 365 | drivers/isdn/icn/icn.c | left = dev->spqueue[channel]->length; |
dev | 369 | drivers/isdn/icn/icn.c | memcpy(sbuf_d, dev->spqueue[channel]->rptr, cnt); |
dev | 372 | drivers/isdn/icn/icn.c | dev->spqueue[channel]->rptr += cnt; |
dev | 373 | drivers/isdn/icn/icn.c | eflag = ((dev->spqueue[channel]->length -= cnt) == 0); |
dev | 376 | drivers/isdn/icn/icn.c | p = dev->spqueue[channel]; |
dev | 377 | drivers/isdn/icn/icn.c | dev->sndcount[channel] -= cnt; |
dev | 379 | drivers/isdn/icn/icn.c | dev->spqueue[channel] = (pqueue *) dev->spqueue[channel]->next; |
dev | 384 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 386 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 404 | drivers/isdn/icn/icn.c | dev->flags |= ICN_FLAGS_RBTIMER; |
dev | 405 | drivers/isdn/icn/icn.c | if (dev->flags & ICN_FLAGS_B1ACTIVE) { |
dev | 406 | drivers/isdn/icn/icn.c | icn_pollbchan_receive(0, dev); |
dev | 407 | drivers/isdn/icn/icn.c | icn_pollbchan_send(0, dev); |
dev | 409 | drivers/isdn/icn/icn.c | if (dev->flags & ICN_FLAGS_B2ACTIVE) { |
dev | 410 | drivers/isdn/icn/icn.c | icn_pollbchan_receive(1, dev); |
dev | 411 | drivers/isdn/icn/icn.c | icn_pollbchan_send(1, dev); |
dev | 413 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 423 | drivers/isdn/icn/icn.c | if (dev->flags & (ICN_FLAGS_B1ACTIVE | ICN_FLAGS_B2ACTIVE)) { |
dev | 427 | drivers/isdn/icn/icn.c | del_timer(&dev->rb_timer); |
dev | 428 | drivers/isdn/icn/icn.c | dev->rb_timer.function = icn_pollbchan; |
dev | 429 | drivers/isdn/icn/icn.c | dev->rb_timer.expires = jiffies + ICN_TIMER_BCREAD; |
dev | 430 | drivers/isdn/icn/icn.c | add_timer(&dev->rb_timer); |
dev | 433 | drivers/isdn/icn/icn.c | dev->flags &= ~ICN_FLAGS_RBTIMER; |
dev | 434 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 449 | drivers/isdn/icn/icn.c | static void icn_pollit(icn_dev * dev) |
dev | 451 | drivers/isdn/icn/icn.c | int mch = dev->secondhalf ? 2 : 0; |
dev | 465 | drivers/isdn/icn/icn.c | c = dev->shmem->comm_buffers.iopc_buf[i & 0xff]; |
dev | 468 | drivers/isdn/icn/icn.c | *dev->msg_buf_write++ = (c == 0xff) ? '\n' : c; |
dev | 470 | drivers/isdn/icn/icn.c | if (dev->msg_buf_write > dev->msg_buf_end) |
dev | 471 | drivers/isdn/icn/icn.c | dev->msg_buf_write = dev->msg_buf; |
dev | 474 | drivers/isdn/icn/icn.c | dev->imsg[dev->iptr] = 0; |
dev | 475 | drivers/isdn/icn/icn.c | dev->iptr = 0; |
dev | 476 | drivers/isdn/icn/icn.c | if (dev->imsg[0] == '0' && dev->imsg[1] >= '0' && |
dev | 477 | drivers/isdn/icn/icn.c | dev->imsg[1] <= '2' && dev->imsg[2] == ';') { |
dev | 478 | drivers/isdn/icn/icn.c | ch = dev->imsg[1] - '0'; |
dev | 479 | drivers/isdn/icn/icn.c | p = &dev->imsg[3]; |
dev | 483 | drivers/isdn/icn/icn.c | dev->flags |= ICN_FLAGS_B1ACTIVE; |
dev | 486 | drivers/isdn/icn/icn.c | dev->flags |= ICN_FLAGS_B2ACTIVE; |
dev | 490 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 492 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 497 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 499 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 505 | drivers/isdn/icn/icn.c | dev->flags &= ~ICN_FLAGS_B1ACTIVE; |
dev | 509 | drivers/isdn/icn/icn.c | dev->flags &= ~ICN_FLAGS_B2ACTIVE; |
dev | 515 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 516 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 522 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 523 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 529 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 530 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 536 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 537 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 540 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 541 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 548 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 549 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 556 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 557 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 562 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 565 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 570 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 573 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 578 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 581 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 586 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 589 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 593 | drivers/isdn/icn/icn.c | p = dev->imsg; |
dev | 597 | drivers/isdn/icn/icn.c | dev->ptype = ISDN_PTYPE_1TR6; |
dev | 598 | drivers/isdn/icn/icn.c | dev->interface.features |= ISDN_FEATURE_P_1TR6; |
dev | 602 | drivers/isdn/icn/icn.c | dev->ptype = ISDN_PTYPE_EURO; |
dev | 603 | drivers/isdn/icn/icn.c | dev->interface.features |= ISDN_FEATURE_P_EURO; |
dev | 610 | drivers/isdn/icn/icn.c | dev->imsg[dev->iptr] = c; |
dev | 611 | drivers/isdn/icn/icn.c | if (dev->iptr < 59) |
dev | 612 | drivers/isdn/icn/icn.c | dev->iptr++; |
dev | 620 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 622 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 625 | drivers/isdn/icn/icn.c | dev->interface.rcvcallb(dev->myid, 0, dev->rcvbuf[0], 0); |
dev | 627 | drivers/isdn/icn/icn.c | dev->interface.rcvcallb(dev->myid, 1, dev->rcvbuf[1], 0); |
dev | 628 | drivers/isdn/icn/icn.c | if (dev->flags & (ICN_FLAGS_B1ACTIVE | ICN_FLAGS_B2ACTIVE)) |
dev | 629 | drivers/isdn/icn/icn.c | if (!(dev->flags & ICN_FLAGS_RBTIMER)) { |
dev | 631 | drivers/isdn/icn/icn.c | dev->flags |= ICN_FLAGS_RBTIMER; |
dev | 634 | drivers/isdn/icn/icn.c | del_timer(&dev->rb_timer); |
dev | 635 | drivers/isdn/icn/icn.c | dev->rb_timer.function = icn_pollbchan; |
dev | 636 | drivers/isdn/icn/icn.c | dev->rb_timer.expires = jiffies + ICN_TIMER_BCREAD; |
dev | 637 | drivers/isdn/icn/icn.c | add_timer(&dev->rb_timer); |
dev | 656 | drivers/isdn/icn/icn.c | icn_pollit(dev); |
dev | 657 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 662 | drivers/isdn/icn/icn.c | del_timer(&dev->st_timer); |
dev | 663 | drivers/isdn/icn/icn.c | dev->st_timer.function = icn_pollcard; |
dev | 664 | drivers/isdn/icn/icn.c | dev->st_timer.expires = jiffies + ICN_TIMER_DCREAD; |
dev | 665 | drivers/isdn/icn/icn.c | add_timer(&dev->st_timer); |
dev | 680 | drivers/isdn/icn/icn.c | static int icn_sendbuf(int channel, const u_char * buffer, int len, int user, icn_dev * dev) |
dev | 688 | drivers/isdn/icn/icn.c | if (dev->sndcount[channel] > ICN_MAX_SQUEUE) |
dev | 692 | drivers/isdn/icn/icn.c | p = icn_new_buf(&dev->spqueue[channel], len); |
dev | 702 | drivers/isdn/icn/icn.c | dev->sndcount[channel] += len; |
dev | 703 | drivers/isdn/icn/icn.c | icn_pollbchan_send(channel, dev); |
dev | 718 | drivers/isdn/icn/icn.c | if (dev->shmem->data_control.scns || |
dev | 719 | drivers/isdn/icn/icn.c | dev->shmem->data_control.scnr) { |
dev | 765 | drivers/isdn/icn/icn.c | static int icn_loadboot(u_char * buffer, icn_dev * dev) |
dev | 777 | drivers/isdn/icn/icn.c | if (!dev->rvalid) { |
dev | 778 | drivers/isdn/icn/icn.c | if (check_region(dev->port, ICN_PORTLEN)) { |
dev | 779 | drivers/isdn/icn/icn.c | printk(KERN_WARNING "icn: ports 0x%03x-0x%03x in use.\n", dev->port, |
dev | 780 | drivers/isdn/icn/icn.c | dev->port + ICN_PORTLEN); |
dev | 784 | drivers/isdn/icn/icn.c | request_region(dev->port, ICN_PORTLEN, regname); |
dev | 785 | drivers/isdn/icn/icn.c | dev->rvalid = 1; |
dev | 787 | drivers/isdn/icn/icn.c | if (!dev->mvalid) { |
dev | 788 | drivers/isdn/icn/icn.c | if (check_shmem((ulong) dev->shmem, 0x4000)) { |
dev | 789 | drivers/isdn/icn/icn.c | printk(KERN_WARNING "icn: memory at 0x%08lx in use.\n", (ulong) dev->shmem); |
dev | 793 | drivers/isdn/icn/icn.c | request_shmem((ulong) dev->shmem, 0x4000, regname); |
dev | 794 | drivers/isdn/icn/icn.c | dev->mvalid = 1; |
dev | 800 | drivers/isdn/icn/icn.c | icn_shiftout(ICN_CFG, (unsigned long) dev->shmem, 23, 10); /* Set RAM-Addr. */ |
dev | 802 | drivers/isdn/icn/icn.c | printk(KERN_DEBUG "shmem=%08lx\n", (ulong) dev->shmem); |
dev | 807 | drivers/isdn/icn/icn.c | dev->channel = 1; /* Force Mapping */ |
dev | 815 | drivers/isdn/icn/icn.c | memcpy_fromfs(dev->shmem, buffer, ICN_CODE_STAGE1); /* Copy code */ |
dev | 819 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 831 | drivers/isdn/icn/icn.c | memcpy_fromfs(dev->shmem, buffer, ICN_CODE_STAGE1); /* Copy code */ |
dev | 838 | drivers/isdn/icn/icn.c | if ((ret = icn_check_loader(dev->doubleS0 ? 2 : 1))) |
dev | 840 | drivers/isdn/icn/icn.c | if (!dev->doubleS0) |
dev | 923 | drivers/isdn/icn/icn.c | if ((ldev->secondhalf) || (!dev->doubleS0)) { |
dev | 930 | drivers/isdn/icn/icn.c | init_timer(&dev->st_timer); |
dev | 931 | drivers/isdn/icn/icn.c | dev->st_timer.expires = jiffies + ICN_TIMER_DCREAD; |
dev | 932 | drivers/isdn/icn/icn.c | dev->st_timer.function = icn_pollcard; |
dev | 933 | drivers/isdn/icn/icn.c | add_timer(&dev->st_timer); |
dev | 944 | drivers/isdn/icn/icn.c | static int icn_readstatus(u_char * buf, int len, int user, icn_dev * dev) |
dev | 951 | drivers/isdn/icn/icn.c | put_fs_byte(*dev->msg_buf_read++, p); |
dev | 953 | drivers/isdn/icn/icn.c | *p = *dev->msg_buf_read++; |
dev | 954 | drivers/isdn/icn/icn.c | if (dev->msg_buf_read > dev->msg_buf_end) |
dev | 955 | drivers/isdn/icn/icn.c | dev->msg_buf_read = dev->msg_buf; |
dev | 961 | drivers/isdn/icn/icn.c | static int icn_writecmd(const u_char * buf, int len, int user, icn_dev * dev, int waitflg) |
dev | 963 | drivers/isdn/icn/icn.c | int mch = dev->secondhalf ? 2 : 0; |
dev | 985 | drivers/isdn/icn/icn.c | *dev->msg_buf_write++ = '>'; |
dev | 986 | drivers/isdn/icn/icn.c | if (dev->msg_buf_write > dev->msg_buf_end) |
dev | 987 | drivers/isdn/icn/icn.c | dev->msg_buf_write = dev->msg_buf; |
dev | 989 | drivers/isdn/icn/icn.c | dev->shmem->comm_buffers.pcio_buf[pp & 0xff] = (*p == '\n') ? 0xff : *p; |
dev | 990 | drivers/isdn/icn/icn.c | *dev->msg_buf_write++ = *p; |
dev | 992 | drivers/isdn/icn/icn.c | *dev->msg_buf_write++ = '>'; |
dev | 993 | drivers/isdn/icn/icn.c | if (dev->msg_buf_write > dev->msg_buf_end) |
dev | 994 | drivers/isdn/icn/icn.c | dev->msg_buf_write = dev->msg_buf; |
dev | 998 | drivers/isdn/icn/icn.c | if (dev->msg_buf_write > dev->msg_buf_end) |
dev | 999 | drivers/isdn/icn/icn.c | dev->msg_buf_write = dev->msg_buf; |
dev | 1004 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 1006 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 1027 | drivers/isdn/icn/icn.c | del_timer(&dev->st_timer); |
dev | 1060 | drivers/isdn/icn/icn.c | if ((unsigned long) dev->shmem != (a & 0x0ffc000)) { |
dev | 1066 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1067 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1071 | drivers/isdn/icn/icn.c | if (dev->mvalid) |
dev | 1072 | drivers/isdn/icn/icn.c | release_shmem((ulong) dev->shmem, 0x4000); |
dev | 1073 | drivers/isdn/icn/icn.c | dev->mvalid = 0; |
dev | 1074 | drivers/isdn/icn/icn.c | dev->shmem = (icn_shmem *) (a & 0x0ffc000); |
dev | 1075 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1079 | drivers/isdn/icn/icn.c | (unsigned long) dev->shmem); |
dev | 1083 | drivers/isdn/icn/icn.c | return (int) dev->shmem; |
dev | 1089 | drivers/isdn/icn/icn.c | if (dev->port != (unsigned short) a) { |
dev | 1095 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1096 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1100 | drivers/isdn/icn/icn.c | if (dev->rvalid) |
dev | 1101 | drivers/isdn/icn/icn.c | release_region(dev->port, ICN_PORTLEN); |
dev | 1102 | drivers/isdn/icn/icn.c | dev->port = (unsigned short) a; |
dev | 1103 | drivers/isdn/icn/icn.c | dev->rvalid = 0; |
dev | 1104 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 1109 | drivers/isdn/icn/icn.c | printk(KERN_INFO "icn: port set to 0x%03x\n", dev->port); |
dev | 1115 | drivers/isdn/icn/icn.c | return (int) dev->port; |
dev | 1117 | drivers/isdn/icn/icn.c | return (int) dev->doubleS0; |
dev | 1122 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1123 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1125 | drivers/isdn/icn/icn.c | return (icn_loadboot((u_char *) a, dev)); |
dev | 1127 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1128 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1130 | drivers/isdn/icn/icn.c | if ((i = (icn_loadproto((u_char *) a, dev)))) |
dev | 1132 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1304 | drivers/isdn/icn/icn.c | return (icn_command(c, dev)); |
dev | 1314 | drivers/isdn/icn/icn.c | return (icn_writecmd(buf, len, user, dev, 0)); |
dev | 1324 | drivers/isdn/icn/icn.c | return (icn_readstatus(buf, len, user, dev)); |
dev | 1335 | drivers/isdn/icn/icn.c | return (icn_sendbuf(channel, buffer, len, user, dev)); |
dev | 1378 | drivers/isdn/icn/icn.c | if (!(dev = (icn_devptr) kmalloc(sizeof(icn_dev), GFP_KERNEL))) { |
dev | 1382 | drivers/isdn/icn/icn.c | memset((char *) dev, 0, sizeof(icn_dev)); |
dev | 1383 | drivers/isdn/icn/icn.c | dev->port = portbase; |
dev | 1384 | drivers/isdn/icn/icn.c | dev->shmem = (icn_shmem *) (membase & 0x0ffc000); |
dev | 1386 | drivers/isdn/icn/icn.c | dev->doubleS0 = 1; |
dev | 1387 | drivers/isdn/icn/icn.c | dev->interface.channels = ICN_BCH; |
dev | 1388 | drivers/isdn/icn/icn.c | dev->interface.maxbufsize = 4000; |
dev | 1389 | drivers/isdn/icn/icn.c | dev->interface.command = if_command1; |
dev | 1390 | drivers/isdn/icn/icn.c | dev->interface.writebuf = if_sendbuf1; |
dev | 1391 | drivers/isdn/icn/icn.c | dev->interface.writecmd = if_writecmd1; |
dev | 1392 | drivers/isdn/icn/icn.c | dev->interface.readstat = if_readstatus1; |
dev | 1393 | drivers/isdn/icn/icn.c | dev->interface.features = ISDN_FEATURE_L2_X75I | |
dev | 1397 | drivers/isdn/icn/icn.c | dev->ptype = ISDN_PTYPE_UNKNOWN; |
dev | 1398 | drivers/isdn/icn/icn.c | strncpy(dev->interface.id, icn_id, sizeof(dev->interface.id) - 1); |
dev | 1399 | drivers/isdn/icn/icn.c | dev->msg_buf_write = dev->msg_buf; |
dev | 1400 | drivers/isdn/icn/icn.c | dev->msg_buf_read = dev->msg_buf; |
dev | 1401 | drivers/isdn/icn/icn.c | dev->msg_buf_end = &dev->msg_buf[sizeof(dev->msg_buf) - 1]; |
dev | 1402 | drivers/isdn/icn/icn.c | memset((char *) dev->l2_proto, ISDN_PROTO_L2_X75I, sizeof(dev->l2_proto)); |
dev | 1406 | drivers/isdn/icn/icn.c | kfree(dev); |
dev | 1410 | drivers/isdn/icn/icn.c | memcpy((char *) dev2, (char *) dev, sizeof(icn_dev)); |
dev | 1416 | drivers/isdn/icn/icn.c | sizeof(dev->interface.id) - 1); |
dev | 1422 | drivers/isdn/icn/icn.c | if (!register_isdn(&dev->interface)) { |
dev | 1424 | drivers/isdn/icn/icn.c | kfree(dev); |
dev | 1425 | drivers/isdn/icn/icn.c | if (dev->doubleS0) |
dev | 1429 | drivers/isdn/icn/icn.c | dev->myid = dev->interface.channels; |
dev | 1430 | drivers/isdn/icn/icn.c | sprintf(regname, "icn-isdn (%s)", dev->interface.id); |
dev | 1431 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 1435 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 1436 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1438 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 1439 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 1440 | drivers/isdn/icn/icn.c | kfree(dev); |
dev | 1457 | drivers/isdn/icn/icn.c | rev, dev->port, (uint) dev->shmem, dev->interface.id); |
dev | 1461 | drivers/isdn/icn/icn.c | init_timer(&dev->st_timer); |
dev | 1462 | drivers/isdn/icn/icn.c | dev->st_timer.expires = jiffies + ICN_TIMER_DCREAD; |
dev | 1463 | drivers/isdn/icn/icn.c | dev->st_timer.function = icn_pollcard; |
dev | 1464 | drivers/isdn/icn/icn.c | add_timer(&dev->st_timer); |
dev | 1476 | drivers/isdn/icn/icn.c | icn_stopdriver(dev); |
dev | 1478 | drivers/isdn/icn/icn.c | cmd.driver = dev->myid; |
dev | 1479 | drivers/isdn/icn/icn.c | dev->interface.statcallb(&cmd); |
dev | 1480 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 1486 | drivers/isdn/icn/icn.c | if (dev->rvalid) { |
dev | 1489 | drivers/isdn/icn/icn.c | release_region(dev->port, ICN_PORTLEN); |
dev | 1491 | drivers/isdn/icn/icn.c | if (dev->mvalid) |
dev | 1492 | drivers/isdn/icn/icn.c | release_shmem((ulong) dev->shmem, 0x4000); |
dev | 1493 | drivers/isdn/icn/icn.c | if (dev->doubleS0) { |
dev | 1499 | drivers/isdn/icn/icn.c | icn_free_queue(&dev->spqueue[1]); |
dev | 1500 | drivers/isdn/icn/icn.c | kfree(dev); |
dev | 112 | drivers/isdn/icn/icn.h | #define ICN_CFG (dev->port) |
dev | 113 | drivers/isdn/icn/icn.h | #define ICN_MAPRAM (dev->port+1) |
dev | 114 | drivers/isdn/icn/icn.h | #define ICN_RUN (dev->port+2) |
dev | 115 | drivers/isdn/icn/icn.h | #define ICN_BANK (dev->port+3) |
dev | 223 | drivers/isdn/icn/icn.h | static icn_dev *dev = (icn_dev *) 0; |
dev | 241 | drivers/isdn/icn/icn.h | #define sbfree (((dev->shmem->data_control.scns+1) & 0xf) != \ |
dev | 242 | drivers/isdn/icn/icn.h | dev->shmem->data_control.scnr) |
dev | 245 | drivers/isdn/icn/icn.h | #define sbnext (dev->shmem->data_control.scns = \ |
dev | 246 | drivers/isdn/icn/icn.h | ((dev->shmem->data_control.scns+1) & 0xf)) |
dev | 249 | drivers/isdn/icn/icn.h | #define sbuf_n dev->shmem->data_control.scns |
dev | 250 | drivers/isdn/icn/icn.h | #define sbuf_d dev->shmem->data_buffers.send_buf[sbuf_n].data |
dev | 251 | drivers/isdn/icn/icn.h | #define sbuf_l dev->shmem->data_buffers.send_buf[sbuf_n].length |
dev | 252 | drivers/isdn/icn/icn.h | #define sbuf_f dev->shmem->data_buffers.send_buf[sbuf_n].endflag |
dev | 255 | drivers/isdn/icn/icn.h | #define rbavl (dev->shmem->data_control.ecnr != \ |
dev | 256 | drivers/isdn/icn/icn.h | dev->shmem->data_control.ecns) |
dev | 259 | drivers/isdn/icn/icn.h | #define rbnext (dev->shmem->data_control.ecnr = \ |
dev | 260 | drivers/isdn/icn/icn.h | ((dev->shmem->data_control.ecnr+1) & 0xf)) |
dev | 263 | drivers/isdn/icn/icn.h | #define rbuf_n dev->shmem->data_control.ecnr |
dev | 264 | drivers/isdn/icn/icn.h | #define rbuf_d dev->shmem->data_buffers.receive_buf[rbuf_n].data |
dev | 265 | drivers/isdn/icn/icn.h | #define rbuf_l dev->shmem->data_buffers.receive_buf[rbuf_n].length |
dev | 266 | drivers/isdn/icn/icn.h | #define rbuf_f dev->shmem->data_buffers.receive_buf[rbuf_n].endflag |
dev | 269 | drivers/isdn/icn/icn.h | #define cmd_o (dev->shmem->comm_control.pcio_o) |
dev | 270 | drivers/isdn/icn/icn.h | #define cmd_i (dev->shmem->comm_control.pcio_i) |
dev | 276 | drivers/isdn/icn/icn.h | #define msg_o (dev->shmem->comm_control.iopc_o) |
dev | 277 | drivers/isdn/icn/icn.h | #define msg_i (dev->shmem->comm_control.iopc_i) |
dev | 61 | drivers/isdn/isdn_common.c | isdn_dev *dev = (isdn_dev *) 0; |
dev | 141 | drivers/isdn/isdn_common.c | if (dev->chanmap[i] == ch && dev->drvmap[i] == di) |
dev | 151 | drivers/isdn/isdn_common.c | int tf = dev->tflags; |
dev | 184 | drivers/isdn/isdn_common.c | del_timer(&dev->timer); |
dev | 185 | drivers/isdn/isdn_common.c | dev->timer.function = isdn_timer_funct; |
dev | 186 | drivers/isdn/isdn_common.c | dev->timer.expires = jiffies + ISDN_TIMER_RES; |
dev | 187 | drivers/isdn/isdn_common.c | add_timer(&dev->timer); |
dev | 198 | drivers/isdn/isdn_common.c | if ((tf & ISDN_TIMER_SLOW) && (!(dev->tflags & ISDN_TIMER_SLOW))) { |
dev | 204 | drivers/isdn/isdn_common.c | dev->tflags |= tf; |
dev | 206 | drivers/isdn/isdn_common.c | dev->tflags &= ~tf; |
dev | 207 | drivers/isdn/isdn_common.c | if (dev->tflags) { |
dev | 208 | drivers/isdn/isdn_common.c | del_timer(&dev->timer); |
dev | 209 | drivers/isdn/isdn_common.c | dev->timer.function = isdn_timer_funct; |
dev | 210 | drivers/isdn/isdn_common.c | dev->timer.expires = jiffies + ISDN_TIMER_RES; |
dev | 211 | drivers/isdn/isdn_common.c | add_timer(&dev->timer); |
dev | 232 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 243 | drivers/isdn/isdn_common.c | midx = dev->m_idx[i]; |
dev | 244 | drivers/isdn/isdn_common.c | if (dev->mdm.atmodem[midx].mdmreg[13] & 2) |
dev | 257 | drivers/isdn/isdn_common.c | if (!dev->drv[di]->rpqueue[channel]) |
dev | 265 | drivers/isdn/isdn_common.c | p = isdn_new_buf(&dev->drv[di]->rpqueue[channel], len); |
dev | 268 | drivers/isdn/isdn_common.c | dev->drv[di]->rcverr[channel]++; |
dev | 273 | drivers/isdn/isdn_common.c | dev->drv[di]->rcvcount[channel] += len; |
dev | 276 | drivers/isdn/isdn_common.c | if ((dev->modempoll) && (midx >= 0)) { |
dev | 277 | drivers/isdn/isdn_common.c | if (dev->mdm.rcvsched[midx]) |
dev | 280 | drivers/isdn/isdn_common.c | wake_up_interruptible(&dev->drv[di]->rcv_waitq[channel]); |
dev | 293 | drivers/isdn/isdn_common.c | (void) dev->drv[di]->interface->command(&cmd); |
dev | 311 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 318 | drivers/isdn/isdn_common.c | wake_up_interruptible(&dev->drv[di]->snd_waitq[c->arg]); |
dev | 323 | drivers/isdn/isdn_common.c | dev->drv[di]->stavail += c->arg; |
dev | 325 | drivers/isdn/isdn_common.c | wake_up_interruptible(&dev->drv[di]->st_waitq); |
dev | 328 | drivers/isdn/isdn_common.c | dev->drv[di]->running = 1; |
dev | 330 | drivers/isdn/isdn_common.c | if (dev->drvmap[i] == di) |
dev | 331 | drivers/isdn/isdn_common.c | isdn_all_eaz(di, dev->chanmap[i]); |
dev | 334 | drivers/isdn/isdn_common.c | dev->drv[di]->running = 0; |
dev | 342 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) { |
dev | 346 | drivers/isdn/isdn_common.c | dev->drv[di]->interface->command(&cmd); |
dev | 358 | drivers/isdn/isdn_common.c | dev->mdm.msr[mi] |= UART_MSR_RI; |
dev | 359 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(2, &dev->mdm.info[mi]); |
dev | 361 | drivers/isdn/isdn_common.c | } else if (dev->drv[di]->reject_bus) { |
dev | 365 | drivers/isdn/isdn_common.c | dev->drv[di]->interface->command(&cmd); |
dev | 374 | drivers/isdn/isdn_common.c | dev->drv[di]->interface->command(&cmd); |
dev | 381 | drivers/isdn/isdn_common.c | dev->drv[di]->interface->command(&cmd); |
dev | 395 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 412 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 417 | drivers/isdn/isdn_common.c | if ((mi = dev->m_idx[i]) >= 0) |
dev | 419 | drivers/isdn/isdn_common.c | if (dev->mdm.info[mi].flags & |
dev | 421 | drivers/isdn/isdn_common.c | if (dev->mdm.dialing[mi] == 1) { |
dev | 422 | drivers/isdn/isdn_common.c | dev->mdm.dialing[mi] = 2; |
dev | 426 | drivers/isdn/isdn_common.c | dev->drv[di]->interface->command(&cmd); |
dev | 437 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 439 | drivers/isdn/isdn_common.c | dev->drv[di]->flags &= ~(1 << (c->arg)); |
dev | 444 | drivers/isdn/isdn_common.c | if ((mi = dev->m_idx[i]) >= 0) { |
dev | 446 | drivers/isdn/isdn_common.c | if (dev->mdm.info[mi].flags & |
dev | 448 | drivers/isdn/isdn_common.c | if (dev->mdm.dialing[mi] == 1) { |
dev | 449 | drivers/isdn/isdn_common.c | dev->mdm.dialing[mi] = 0; |
dev | 450 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(7, &dev->mdm.info[mi]); |
dev | 452 | drivers/isdn/isdn_common.c | if (dev->mdm.online[mi]) |
dev | 453 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(3, &dev->mdm.info[mi]); |
dev | 457 | drivers/isdn/isdn_common.c | isdn_tty_modem_hup(&dev->mdm.info[mi]); |
dev | 458 | drivers/isdn/isdn_common.c | dev->mdm.msr[mi] &= ~(UART_MSR_DCD | UART_MSR_RI); |
dev | 470 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 472 | drivers/isdn/isdn_common.c | dev->drv[di]->flags |= (1 << (c->arg)); |
dev | 476 | drivers/isdn/isdn_common.c | if ((mi = dev->m_idx[i]) >= 0) { |
dev | 480 | drivers/isdn/isdn_common.c | if (dev->mdm.info[mi].flags & |
dev | 482 | drivers/isdn/isdn_common.c | dev->mdm.msr[mi] |= UART_MSR_DCD; |
dev | 483 | drivers/isdn/isdn_common.c | if (dev->mdm.dialing[mi]) |
dev | 484 | drivers/isdn/isdn_common.c | dev->mdm.dialing[mi] = 0; |
dev | 485 | drivers/isdn/isdn_common.c | dev->mdm.rcvsched[mi] = 1; |
dev | 486 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(5, &dev->mdm.info[mi]); |
dev | 496 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 498 | drivers/isdn/isdn_common.c | dev->drv[di]->flags &= ~(1 << (c->arg)); |
dev | 500 | drivers/isdn/isdn_common.c | if ((mi = dev->m_idx[i]) >= 0) { |
dev | 502 | drivers/isdn/isdn_common.c | if (dev->mdm.info[mi].flags & |
dev | 504 | drivers/isdn/isdn_common.c | dev->mdm.msr[mi] &= ~(UART_MSR_DCD | UART_MSR_RI); |
dev | 505 | drivers/isdn/isdn_common.c | if (dev->mdm.online[mi]) |
dev | 506 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(3, &dev->mdm.info[mi]); |
dev | 510 | drivers/isdn/isdn_common.c | isdn_tty_modem_hup(&dev->mdm.info[mi]); |
dev | 520 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 524 | drivers/isdn/isdn_common.c | if ((mi = dev->m_idx[i]) >= 0) { |
dev | 525 | drivers/isdn/isdn_common.c | if (dev->mdm.info[mi].flags & |
dev | 527 | drivers/isdn/isdn_common.c | if (dev->mdm.dialing[mi]) { |
dev | 528 | drivers/isdn/isdn_common.c | dev->mdm.dialing[mi] = 0; |
dev | 529 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(6, &dev->mdm.info[mi]); |
dev | 531 | drivers/isdn/isdn_common.c | dev->mdm.msr[mi] &= ~UART_MSR_DCD; |
dev | 532 | drivers/isdn/isdn_common.c | if (dev->mdm.online[mi]) { |
dev | 533 | drivers/isdn/isdn_common.c | isdn_tty_modem_result(3, &dev->mdm.info[mi]); |
dev | 534 | drivers/isdn/isdn_common.c | dev->mdm.online[mi] = 0; |
dev | 545 | drivers/isdn/isdn_common.c | if (dev->drvmap[i] == di) { |
dev | 546 | drivers/isdn/isdn_common.c | dev->drvmap[i] = -1; |
dev | 547 | drivers/isdn/isdn_common.c | dev->chanmap[i] = -1; |
dev | 548 | drivers/isdn/isdn_common.c | dev->mdm.info[i].isdn_driver = -1; |
dev | 549 | drivers/isdn/isdn_common.c | dev->mdm.info[i].isdn_channel = -1; |
dev | 552 | drivers/isdn/isdn_common.c | dev->drivers--; |
dev | 553 | drivers/isdn/isdn_common.c | dev->channels -= dev->drv[di]->channels; |
dev | 554 | drivers/isdn/isdn_common.c | kfree(dev->drv[di]->rcverr); |
dev | 555 | drivers/isdn/isdn_common.c | kfree(dev->drv[di]->rcvcount); |
dev | 556 | drivers/isdn/isdn_common.c | for (i = 0; i < dev->drv[di]->channels; i++) |
dev | 557 | drivers/isdn/isdn_common.c | isdn_free_queue(&dev->drv[di]->rpqueue[i]); |
dev | 558 | drivers/isdn/isdn_common.c | kfree(dev->drv[di]->rcv_waitq); |
dev | 559 | drivers/isdn/isdn_common.c | kfree(dev->drv[di]->snd_waitq); |
dev | 560 | drivers/isdn/isdn_common.c | kfree(dev->drv[di]); |
dev | 561 | drivers/isdn/isdn_common.c | dev->drv[di] = NULL; |
dev | 562 | drivers/isdn/isdn_common.c | dev->drvid[di][0] = '\0'; |
dev | 595 | drivers/isdn/isdn_common.c | if (!dev->drv[di]->rpqueue[channel]) { |
dev | 597 | drivers/isdn/isdn_common.c | interruptible_sleep_on(&dev->drv[di]->rcv_waitq[channel]); |
dev | 601 | drivers/isdn/isdn_common.c | if (!dev->drv[di]) |
dev | 605 | drivers/isdn/isdn_common.c | avail = dev->drv[di]->rcvcount[channel]; |
dev | 611 | drivers/isdn/isdn_common.c | if ((copy_l = dev->drv[di]->rpqueue[channel]->length) > left) { |
dev | 616 | drivers/isdn/isdn_common.c | p = dev->drv[di]->rpqueue[channel]; |
dev | 633 | drivers/isdn/isdn_common.c | dev->drv[di]->rpqueue[channel] = (pqueue *) p->next; |
dev | 642 | drivers/isdn/isdn_common.c | dev->drv[di]->rcvcount[channel] -= copy_l; |
dev | 650 | drivers/isdn/isdn_common.c | return (dev->drvmap[minor]); |
dev | 655 | drivers/isdn/isdn_common.c | return (dev->chanmap[minor]); |
dev | 668 | drivers/isdn/isdn_common.c | sprintf(p, "%s ", (dev->drvmap[i] < 0) ? "-" : dev->drvid[dev->drvmap[i]]); |
dev | 674 | drivers/isdn/isdn_common.c | sprintf(p, "%d ", dev->chanmap[i]); |
dev | 680 | drivers/isdn/isdn_common.c | sprintf(p, "%d ", dev->drvmap[i]); |
dev | 686 | drivers/isdn/isdn_common.c | sprintf(p, "%d ", dev->usage[i]); |
dev | 692 | drivers/isdn/isdn_common.c | if (dev->drv[i]) { |
dev | 693 | drivers/isdn/isdn_common.c | sprintf(p, "%ld ", dev->drv[i]->flags); |
dev | 703 | drivers/isdn/isdn_common.c | sprintf(p, "%s ", dev->num[i]); |
dev | 714 | drivers/isdn/isdn_common.c | infostruct *p = dev->infochain; |
dev | 720 | drivers/isdn/isdn_common.c | wake_up_interruptible(&(dev->info_waitq)); |
dev | 734 | drivers/isdn/isdn_common.c | interruptible_sleep_on(&(dev->info_waitq)); |
dev | 746 | drivers/isdn/isdn_common.c | if (!dev->drivers) |
dev | 752 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]->running) |
dev | 763 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]->stavail) |
dev | 764 | drivers/isdn/isdn_common.c | interruptible_sleep_on(&(dev->drv[drvidx]->st_waitq)); |
dev | 765 | drivers/isdn/isdn_common.c | if (dev->drv[drvidx]->interface->readstat) |
dev | 766 | drivers/isdn/isdn_common.c | len = dev->drv[drvidx]->interface-> |
dev | 767 | drivers/isdn/isdn_common.c | readstat(buf, MIN(count, dev->drv[drvidx]->stavail), 1); |
dev | 772 | drivers/isdn/isdn_common.c | dev->drv[drvidx]->stavail -= len; |
dev | 797 | drivers/isdn/isdn_common.c | if (!dev->drivers) |
dev | 803 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]->running) |
dev | 806 | drivers/isdn/isdn_common.c | while (dev->drv[drvidx]->interface->writebuf(drvidx, chidx, buf, count, 1) != count) |
dev | 807 | drivers/isdn/isdn_common.c | interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); |
dev | 820 | drivers/isdn/isdn_common.c | if (dev->drv[drvidx]->interface->writecmd) |
dev | 821 | drivers/isdn/isdn_common.c | return (dev->drv[drvidx]->interface->writecmd(buf, count, 1)); |
dev | 841 | drivers/isdn/isdn_common.c | select_wait(&(dev->info_waitq), st); |
dev | 951 | drivers/isdn/isdn_common.c | p = dev->netdev; |
dev | 960 | drivers/isdn/isdn_common.c | sprintf(cfg.drvid, "%s,%d", dev->drvid[p->local.pre_device], |
dev | 1013 | drivers/isdn/isdn_common.c | if (!dev->drivers) |
dev | 1020 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]->running) |
dev | 1153 | drivers/isdn/isdn_common.c | dev->net_verbose = arg; |
dev | 1154 | drivers/isdn/isdn_common.c | printk(KERN_INFO "isdn: Verbose-Level is %d\n", dev->net_verbose); |
dev | 1158 | drivers/isdn/isdn_common.c | dev->global_flags |= ISDN_GLOBAL_STOPPED; |
dev | 1160 | drivers/isdn/isdn_common.c | dev->global_flags &= ~ISDN_GLOBAL_STOPPED; |
dev | 1162 | drivers/isdn/isdn_common.c | (dev->global_flags & ISDN_GLOBAL_STOPPED) ? "stopped" : "running"); |
dev | 1178 | drivers/isdn/isdn_common.c | if (!(strcmp(dev->drvid[i], iocts.drvid))) { |
dev | 1186 | drivers/isdn/isdn_common.c | dev->drv[drvidx]->reject_bus = iocts.arg; |
dev | 1205 | drivers/isdn/isdn_common.c | dev->profd = current; |
dev | 1220 | drivers/isdn/isdn_common.c | memcpy_tofs(p, dev->mdm.atmodem[i].profile, ISDN_MODEM_ANZREG); |
dev | 1222 | drivers/isdn/isdn_common.c | memcpy_tofs(p, dev->mdm.atmodem[i].pmsn, ISDN_MSNLEN); |
dev | 1241 | drivers/isdn/isdn_common.c | memcpy_fromfs(dev->mdm.atmodem[i].profile, p, ISDN_MODEM_ANZREG); |
dev | 1243 | drivers/isdn/isdn_common.c | memcpy_fromfs(dev->mdm.atmodem[i].pmsn, p, ISDN_MSNLEN); |
dev | 1265 | drivers/isdn/isdn_common.c | if (!(strcmp(dev->drvid[i], iocts.drvid))) { |
dev | 1277 | drivers/isdn/isdn_common.c | memset(dev->drv[drvidx]->msn2eaz, 0, |
dev | 1278 | drivers/isdn/isdn_common.c | sizeof(dev->drv[drvidx]->msn2eaz)); |
dev | 1282 | drivers/isdn/isdn_common.c | strcpy(dev->drv[drvidx]->msn2eaz[i++], p); |
dev | 1289 | drivers/isdn/isdn_common.c | strlen(dev->drv[drvidx]->msn2eaz[i]) ? |
dev | 1290 | drivers/isdn/isdn_common.c | dev->drv[drvidx]->msn2eaz[i] : "-", |
dev | 1304 | drivers/isdn/isdn_common.c | memcpy_tofs((char *) arg, (char *) &dev, sizeof(ulong)); |
dev | 1326 | drivers/isdn/isdn_common.c | if (!(strcmp(dev->drvid[i], iocts.drvid))) { |
dev | 1341 | drivers/isdn/isdn_common.c | ret = dev->drv[drvidx]->interface->command(&c); |
dev | 1373 | drivers/isdn/isdn_common.c | p->next = (char *) dev->infochain; |
dev | 1375 | drivers/isdn/isdn_common.c | dev->infochain = p; |
dev | 1382 | drivers/isdn/isdn_common.c | if (!dev->channels) |
dev | 1389 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]->running) |
dev | 1391 | drivers/isdn/isdn_common.c | if (!(dev->drv[drvidx]->flags & (1 << chidx))) |
dev | 1395 | drivers/isdn/isdn_common.c | (void) dev->drv[drvidx]->interface->command(&c); |
dev | 1406 | drivers/isdn/isdn_common.c | (void) dev->drv[drvidx]->interface->command(&c); |
dev | 1426 | drivers/isdn/isdn_common.c | if (!dev->channels) |
dev | 1430 | drivers/isdn/isdn_common.c | infostruct *p = dev->infochain; |
dev | 1437 | drivers/isdn/isdn_common.c | dev->infochain = (infostruct *) (p->next); |
dev | 1451 | drivers/isdn/isdn_common.c | (void) dev->drv[drvidx]->interface->command(&c); |
dev | 1458 | drivers/isdn/isdn_common.c | if (dev->profd == current) |
dev | 1459 | drivers/isdn/isdn_common.c | dev->profd = NULL; |
dev | 1462 | drivers/isdn/isdn_common.c | (void) dev->drv[drvidx]->interface->command(&c); |
dev | 1489 | drivers/isdn/isdn_common.c | driver *this = dev->drv[di]; |
dev | 1516 | drivers/isdn/isdn_common.c | if (USG_NONE(dev->usage[i]) && |
dev | 1517 | drivers/isdn/isdn_common.c | (dev->drvmap[i] != -1)) { |
dev | 1518 | drivers/isdn/isdn_common.c | int d = dev->drvmap[i]; |
dev | 1519 | drivers/isdn/isdn_common.c | if ((dev->usage[i] & ISDN_USAGE_EXCLUSIVE) && |
dev | 1520 | drivers/isdn/isdn_common.c | ((pre_dev != d) || (pre_chan != dev->chanmap[i]))) |
dev | 1522 | drivers/isdn/isdn_common.c | if ((dev->drv[d]->running)) { |
dev | 1523 | drivers/isdn/isdn_common.c | if ((dev->drv[d]->interface->features & features) == features) { |
dev | 1525 | drivers/isdn/isdn_common.c | dev->usage[i] &= ISDN_USAGE_EXCLUSIVE; |
dev | 1526 | drivers/isdn/isdn_common.c | dev->usage[i] |= usage; |
dev | 1531 | drivers/isdn/isdn_common.c | if ((pre_dev == d) && (pre_chan == dev->chanmap[i])) { |
dev | 1532 | drivers/isdn/isdn_common.c | dev->usage[i] &= ISDN_USAGE_EXCLUSIVE; |
dev | 1533 | drivers/isdn/isdn_common.c | dev->usage[i] |= usage; |
dev | 1557 | drivers/isdn/isdn_common.c | if (((dev->usage[i] & ISDN_USAGE_MASK) == usage) && |
dev | 1558 | drivers/isdn/isdn_common.c | (dev->drvmap[i] == di) && |
dev | 1559 | drivers/isdn/isdn_common.c | (dev->chanmap[i] == ch)) { |
dev | 1560 | drivers/isdn/isdn_common.c | dev->usage[i] &= (ISDN_USAGE_NONE | ISDN_USAGE_EXCLUSIVE); |
dev | 1561 | drivers/isdn/isdn_common.c | strcpy(dev->num[i], "???"); |
dev | 1580 | drivers/isdn/isdn_common.c | if ((dev->drvmap[i] == di) && |
dev | 1581 | drivers/isdn/isdn_common.c | (dev->chanmap[i] == ch)) { |
dev | 1582 | drivers/isdn/isdn_common.c | dev->usage[i] &= ~ISDN_USAGE_EXCLUSIVE; |
dev | 1598 | drivers/isdn/isdn_common.c | if (dev->global_flags & ISDN_GLOBAL_STOPPED) |
dev | 1618 | drivers/isdn/isdn_common.c | skb = alloc_skb(dev->drv[drvidx]->interface->hl_hdrlen + len, GFP_ATOMIC); |
dev | 1622 | drivers/isdn/isdn_common.c | skb_reserve(skb, dev->drv[drvidx]->interface->hl_hdrlen); |
dev | 1630 | drivers/isdn/isdn_common.c | return dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, skb); |
dev | 1645 | drivers/isdn/isdn_common.c | if (dev->drivers >= ISDN_MAX_DRIVERS) { |
dev | 1651 | drivers/isdn/isdn_common.c | if (dev->channels + n >= ISDN_MAX_CHANNELS) { |
dev | 1712 | drivers/isdn/isdn_common.c | if (!dev->drv[drvidx]) |
dev | 1728 | drivers/isdn/isdn_common.c | if (dev->chanmap[k] < 0) { |
dev | 1729 | drivers/isdn/isdn_common.c | dev->chanmap[k] = j; |
dev | 1730 | drivers/isdn/isdn_common.c | dev->drvmap[k] = drvidx; |
dev | 1733 | drivers/isdn/isdn_common.c | dev->drv[drvidx] = d; |
dev | 1734 | drivers/isdn/isdn_common.c | dev->channels += n; |
dev | 1735 | drivers/isdn/isdn_common.c | strcpy(dev->drvid[drvidx], i->id); |
dev | 1737 | drivers/isdn/isdn_common.c | dev->drivers++; |
dev | 1788 | drivers/isdn/isdn_common.c | if (!(dev = (isdn_dev *) kmalloc(sizeof(isdn_dev), GFP_KERNEL))) { |
dev | 1792 | drivers/isdn/isdn_common.c | memset((char *) dev, 0, sizeof(isdn_dev)); |
dev | 1794 | drivers/isdn/isdn_common.c | dev->drvmap[i] = -1; |
dev | 1796 | drivers/isdn/isdn_common.c | dev->chanmap[i] = -1; |
dev | 1797 | drivers/isdn/isdn_common.c | dev->m_idx[i] = -1; |
dev | 1798 | drivers/isdn/isdn_common.c | strcpy(dev->num[i], "???"); |
dev | 1802 | drivers/isdn/isdn_common.c | kfree(dev); |
dev | 1808 | drivers/isdn/isdn_common.c | tty_unregister_driver(&dev->mdm.cua_modem); |
dev | 1810 | drivers/isdn/isdn_common.c | tty_unregister_driver(&dev->mdm.tty_modem); |
dev | 1811 | drivers/isdn/isdn_common.c | kfree(dev); |
dev | 1818 | drivers/isdn/isdn_common.c | tty_unregister_driver(&dev->mdm.tty_modem); |
dev | 1819 | drivers/isdn/isdn_common.c | tty_unregister_driver(&dev->mdm.cua_modem); |
dev | 1821 | drivers/isdn/isdn_common.c | kfree(dev->mdm.info[i].xmit_buf); |
dev | 1823 | drivers/isdn/isdn_common.c | kfree(dev); |
dev | 1866 | drivers/isdn/isdn_common.c | if (tty_unregister_driver(&dev->mdm.tty_modem)) { |
dev | 1871 | drivers/isdn/isdn_common.c | if (tty_unregister_driver(&dev->mdm.cua_modem)) { |
dev | 1877 | drivers/isdn/isdn_common.c | kfree(dev->mdm.info[i].xmit_buf - 4); |
dev | 1881 | drivers/isdn/isdn_common.c | del_timer(&dev->timer); |
dev | 1882 | drivers/isdn/isdn_common.c | kfree(dev); |
dev | 80 | drivers/isdn/isdn_net.c | isdn_net_reset(struct device *dev) |
dev | 86 | drivers/isdn/isdn_net.c | dev->interrupt = 0; |
dev | 87 | drivers/isdn/isdn_net.c | dev->tbusy = 0; |
dev | 93 | drivers/isdn/isdn_net.c | isdn_net_open(struct device *dev) |
dev | 98 | drivers/isdn/isdn_net.c | isdn_net_reset(dev); |
dev | 99 | drivers/isdn/isdn_net.c | dev->start = 1; |
dev | 102 | drivers/isdn/isdn_net.c | dev->dev_addr[i] = 0xfc; |
dev | 103 | drivers/isdn/isdn_net.c | memcpy(&(dev->dev_addr[i]), &dev->pa_addr, sizeof(ulong)); |
dev | 107 | drivers/isdn/isdn_net.c | if ((p = (((isdn_net_local *) dev->priv)->slave))) { |
dev | 129 | drivers/isdn/isdn_net.c | lp->isdn_device = dev->drvmap[idx]; |
dev | 130 | drivers/isdn/isdn_net.c | lp->isdn_channel = dev->chanmap[idx]; |
dev | 131 | drivers/isdn/isdn_net.c | dev->rx_netdev[idx] = lp->netdev; |
dev | 132 | drivers/isdn/isdn_net.c | dev->st_netdev[idx] = lp->netdev; |
dev | 152 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->netdev; |
dev | 163 | drivers/isdn/isdn_net.c | if (dev->net_verbose > 3) |
dev | 172 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 174 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 176 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 178 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 195 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->st_netdev[idx]; |
dev | 205 | drivers/isdn/isdn_net.c | if (clear_bit(0,(void*)&(p->dev.tbusy))) |
dev | 232 | drivers/isdn/isdn_net.c | dev->st_netdev[idx] = NULL; |
dev | 233 | drivers/isdn/isdn_net.c | dev->rx_netdev[idx] = NULL; |
dev | 241 | drivers/isdn/isdn_net.c | dev->usage[idx] |= ISDN_USAGE_OUTGOING; |
dev | 244 | drivers/isdn/isdn_net.c | dev->rx_netdev[idx] = p; |
dev | 254 | drivers/isdn/isdn_net.c | if (!(isdn_net_xmit(&p->dev,lp,lp->first_skb))) |
dev | 313 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->netdev; |
dev | 336 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 339 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 352 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 356 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 371 | drivers/isdn/isdn_net.c | strcpy(dev->num[i], p->local.dial->num); |
dev | 388 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 402 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 413 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 436 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 440 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 442 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 453 | drivers/isdn/isdn_net.c | dev->drv[p->local.isdn_device]->interface->command(&cmd); |
dev | 465 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 486 | drivers/isdn/isdn_net.c | if ((l = dev->drv[di]->interface->writebuf(di, ch, buf, len, 0)) == len) |
dev | 511 | drivers/isdn/isdn_net.c | dev->rx_netdev[isdn_dc2minor(lp->isdn_device,lp->isdn_channel)] = NULL; |
dev | 512 | drivers/isdn/isdn_net.c | dev->st_netdev[isdn_dc2minor(lp->isdn_device,lp->isdn_channel)] = NULL; |
dev | 521 | drivers/isdn/isdn_net.c | (void) dev->drv[cmd.driver]->interface->command(&cmd); |
dev | 637 | drivers/isdn/isdn_net.c | if (dev->drv[lp->isdn_device]->interface->writebuf_skb) |
dev | 638 | drivers/isdn/isdn_net.c | ret = dev->drv[lp->isdn_device]->interface-> |
dev | 773 | drivers/isdn/isdn_net.c | if (dev->net_verbose) |
dev | 839 | drivers/isdn/isdn_net.c | isdn_net_close(struct device *dev) |
dev | 843 | drivers/isdn/isdn_net.c | dev->tbusy = 1; |
dev | 844 | drivers/isdn/isdn_net.c | dev->start = 0; |
dev | 845 | drivers/isdn/isdn_net.c | isdn_net_hangup(dev); |
dev | 846 | drivers/isdn/isdn_net.c | if ((p = (((isdn_net_local *) dev->priv)->slave))) { |
dev | 863 | drivers/isdn/isdn_net.c | isdn_net_get_stats(struct device *dev) |
dev | 865 | drivers/isdn/isdn_net.c | isdn_net_local *lp = (isdn_net_local *) dev->priv; |
dev | 878 | drivers/isdn/isdn_net.c | unsigned short isdn_net_type_trans(struct sk_buff *skb, struct device *dev) |
dev | 887 | drivers/isdn/isdn_net.c | if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) |
dev | 898 | drivers/isdn/isdn_net.c | else if (dev->flags&(IFF_PROMISC|IFF_ALLMULTI)) { |
dev | 899 | drivers/isdn/isdn_net.c | if (memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN)) |
dev | 947 | drivers/isdn/isdn_net.c | skb->dev = ndev; |
dev | 996 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->rx_netdev[idx]; |
dev | 1009 | drivers/isdn/isdn_net.c | isdn_net_receive(&p->dev, skb); |
dev | 1023 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->rx_netdev[idx]; |
dev | 1029 | drivers/isdn/isdn_net.c | isdn_net_receive(&p->dev, skb); |
dev | 1037 | drivers/isdn/isdn_net.c | my_eth_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 1057 | drivers/isdn/isdn_net.c | memcpy(eth->h_source,saddr,dev->addr_len); |
dev | 1059 | drivers/isdn/isdn_net.c | memcpy(eth->h_source,dev->dev_addr,dev->addr_len); |
dev | 1065 | drivers/isdn/isdn_net.c | if (dev->flags & IFF_LOOPBACK) { |
dev | 1066 | drivers/isdn/isdn_net.c | memset(eth->h_dest, 0, dev->addr_len); |
dev | 1067 | drivers/isdn/isdn_net.c | return(dev->hard_header_len); |
dev | 1071 | drivers/isdn/isdn_net.c | memcpy(eth->h_dest,daddr,dev->addr_len); |
dev | 1072 | drivers/isdn/isdn_net.c | return dev->hard_header_len; |
dev | 1075 | drivers/isdn/isdn_net.c | return -dev->hard_header_len; |
dev | 1084 | drivers/isdn/isdn_net.c | isdn_net_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 1087 | drivers/isdn/isdn_net.c | isdn_net_local *lp = dev->priv; |
dev | 1092 | drivers/isdn/isdn_net.c | len = my_eth_header(skb, dev, type, daddr, saddr, plen); |
dev | 1140 | drivers/isdn/isdn_net.c | isdn_net_rebuild_header(void *buff, struct device *dev, ulong dst, |
dev | 1143 | drivers/isdn/isdn_net.c | isdn_net_local *lp = dev->priv; |
dev | 1157 | drivers/isdn/isdn_net.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 1164 | drivers/isdn/isdn_net.c | ret = arp_find((unsigned char *)&(eth->h_dest), dst, dev, dev->pa_addr,skb)? 1 : 0; |
dev | 1224 | drivers/isdn/isdn_net.c | if (dev->drv[drvidx]) |
dev | 1225 | drivers/isdn/isdn_net.c | if (max_hlhdr_len < dev->drv[drvidx]->interface->hl_hdrlen) |
dev | 1226 | drivers/isdn/isdn_net.c | max_hlhdr_len = dev->drv[drvidx]->interface->hl_hdrlen; |
dev | 1317 | drivers/isdn/isdn_net.c | p = dev->netdev; |
dev | 1335 | drivers/isdn/isdn_net.c | int u1 = dev->usage[i1] & ISDN_USAGE_EXCLUSIVE; |
dev | 1336 | drivers/isdn/isdn_net.c | int u2 = dev->usage[i2] & ISDN_USAGE_EXCLUSIVE; |
dev | 1341 | drivers/isdn/isdn_net.c | dev->usage[i1] &= ~ISDN_USAGE_EXCLUSIVE; |
dev | 1342 | drivers/isdn/isdn_net.c | dev->usage[i1] |= u2; |
dev | 1343 | drivers/isdn/isdn_net.c | dev->usage[i2] &= ~ISDN_USAGE_EXCLUSIVE; |
dev | 1344 | drivers/isdn/isdn_net.c | dev->usage[i2] |= u1; |
dev | 1406 | drivers/isdn/isdn_net.c | if (dev->net_verbose > 1) |
dev | 1410 | drivers/isdn/isdn_net.c | if (dev->net_verbose > 1) |
dev | 1415 | drivers/isdn/isdn_net.c | p = dev->netdev; |
dev | 1419 | drivers/isdn/isdn_net.c | dev->usage[idx]); |
dev | 1441 | drivers/isdn/isdn_net.c | (USG_NONE(dev->usage[idx]))) || /* and ch. unused or */ |
dev | 1449 | drivers/isdn/isdn_net.c | if (dev->usage[idx] & ISDN_USAGE_EXCLUSIVE) { |
dev | 1466 | drivers/isdn/isdn_net.c | if (USG_NONE(dev->usage[sidx])) { |
dev | 1469 | drivers/isdn/isdn_net.c | if (dev->usage[sidx] & ISDN_USAGE_EXCLUSIVE) { |
dev | 1497 | drivers/isdn/isdn_net.c | if ((dev->usage[idx] & ISDN_USAGE_EXCLUSIVE) && |
dev | 1536 | drivers/isdn/isdn_net.c | if (!p->dev.start) { |
dev | 1619 | drivers/isdn/isdn_net.c | dev->usage[idx] &= ISDN_USAGE_EXCLUSIVE; |
dev | 1620 | drivers/isdn/isdn_net.c | dev->usage[idx] |= ISDN_USAGE_NET; |
dev | 1621 | drivers/isdn/isdn_net.c | strcpy(dev->num[idx], nr); |
dev | 1623 | drivers/isdn/isdn_net.c | dev->st_netdev[idx] = lp->netdev; |
dev | 1651 | drivers/isdn/isdn_net.c | if (ematch || dev->net_verbose) |
dev | 1663 | drivers/isdn/isdn_net.c | isdn_net_dev *p = dev->netdev; |
dev | 1753 | drivers/isdn/isdn_net.c | netdev->dev.name = netdev->local.name; |
dev | 1754 | drivers/isdn/isdn_net.c | netdev->dev.priv = &netdev->local; |
dev | 1755 | drivers/isdn/isdn_net.c | netdev->dev.init = isdn_net_init; |
dev | 1768 | drivers/isdn/isdn_net.c | ((isdn_net_local *) q->priv)->slave = &(netdev->dev); |
dev | 1774 | drivers/isdn/isdn_net.c | if (register_netdev(&netdev->dev) != 0) { |
dev | 1801 | drivers/isdn/isdn_net.c | netdev->local.srobin = &netdev->dev; |
dev | 1808 | drivers/isdn/isdn_net.c | netdev->next = (void *) dev->netdev; |
dev | 1809 | drivers/isdn/isdn_net.c | dev->netdev = netdev; |
dev | 1810 | drivers/isdn/isdn_net.c | return netdev->dev.name; |
dev | 1832 | drivers/isdn/isdn_net.c | return (isdn_net_new(newname, &(n->dev))); |
dev | 1856 | drivers/isdn/isdn_net.c | if (dev->drv[i]) |
dev | 1857 | drivers/isdn/isdn_net.c | if ((dev->drv[i]->interface->features & features) == features) |
dev | 1866 | drivers/isdn/isdn_net.c | if (p->dev.start) { |
dev | 1895 | drivers/isdn/isdn_net.c | if (!(strcmp(dev->drvid[i], drvid))) { |
dev | 1922 | drivers/isdn/isdn_net.c | dev->usage[i] = ISDN_USAGE_EXCLUSIVE; |
dev | 1961 | drivers/isdn/isdn_net.c | p->dev.hard_header = NULL; |
dev | 1962 | drivers/isdn/isdn_net.c | p->dev.header_cache_bind = NULL; |
dev | 1963 | drivers/isdn/isdn_net.c | p->dev.header_cache_update = NULL; |
dev | 1964 | drivers/isdn/isdn_net.c | p->dev.flags = IFF_NOARP; |
dev | 1966 | drivers/isdn/isdn_net.c | p->dev.hard_header = isdn_net_header; |
dev | 1968 | drivers/isdn/isdn_net.c | p->dev.header_cache_bind = p->local.org_hcb; |
dev | 1969 | drivers/isdn/isdn_net.c | p->dev.header_cache_update = p->local.org_hcu; |
dev | 1970 | drivers/isdn/isdn_net.c | p->dev.flags = IFF_BROADCAST | IFF_MULTICAST; |
dev | 1972 | drivers/isdn/isdn_net.c | p->dev.header_cache_bind = NULL; |
dev | 1973 | drivers/isdn/isdn_net.c | p->dev.header_cache_update = NULL; |
dev | 1974 | drivers/isdn/isdn_net.c | p->dev.flags = IFF_NOARP; |
dev | 1993 | drivers/isdn/isdn_net.c | sprintf(cfg->drvid, "%s,%d", dev->drvid[p->local.pre_device], |
dev | 2153 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 2179 | drivers/isdn/isdn_net.c | isdn_net_hangup(&p->dev); |
dev | 2180 | drivers/isdn/isdn_net.c | p->dev.start = 0; |
dev | 2182 | drivers/isdn/isdn_net.c | if (p->dev.start) { |
dev | 2193 | drivers/isdn/isdn_net.c | if (((isdn_net_local *) (p->local.master->priv))->slave == &p->dev) |
dev | 2197 | drivers/isdn/isdn_net.c | unregister_netdev(&p->dev); |
dev | 2202 | drivers/isdn/isdn_net.c | dev->netdev = p->next; |
dev | 2206 | drivers/isdn/isdn_net.c | isdn_net_dev *n = dev->netdev; |
dev | 2218 | drivers/isdn/isdn_net.c | if (dev->netdev == NULL) |
dev | 2239 | drivers/isdn/isdn_net.c | p = dev->netdev; |
dev | 2248 | drivers/isdn/isdn_net.c | if (dev->netdev == NULL) |
dev | 2264 | drivers/isdn/isdn_net.c | while (dev->netdev) { |
dev | 2265 | drivers/isdn/isdn_net.c | if (!dev->netdev->local.master) { |
dev | 2267 | drivers/isdn/isdn_net.c | if ((ret = isdn_net_realrm(dev->netdev, NULL))) { |
dev | 2273 | drivers/isdn/isdn_net.c | dev->netdev = NULL; |
dev | 65 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_mask_queue(isdn_net_dev * dev, long mask); |
dev | 66 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_cleanup_queue(isdn_net_dev * dev, long min); |
dev | 84 | drivers/isdn/isdn_ppp.c | isdn_net_dev *p = dev->netdev; |
dev | 230 | drivers/isdn/isdn_ppp.c | isdn_net_dev *p = dev->netdev; |
dev | 241 | drivers/isdn/isdn_ppp.c | isdn_net_hangup(&p->dev); /* lp->ppp_minor==-1 => no calling of isdn_ppp_hangup() */ |
dev | 327 | drivers/isdn/isdn_ppp.c | ippp_table[minor].lp->netdev->dev.tbusy = 0; |
dev | 504 | drivers/isdn/isdn_ppp.c | if (dev->drv[lp->isdn_device]->running && lp->dialstate == 0 && |
dev | 506 | drivers/isdn/isdn_ppp.c | dev->drv[lp->isdn_device]->interface->writebuf( |
dev | 708 | drivers/isdn/isdn_ppp.c | struct device *dev = &net_dev->dev; |
dev | 726 | drivers/isdn/isdn_ppp.c | skb->dev = dev; |
dev | 735 | drivers/isdn/isdn_ppp.c | skb->dev = dev; |
dev | 747 | drivers/isdn/isdn_ppp.c | printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 751 | drivers/isdn/isdn_ppp.c | skb->dev = dev; |
dev | 790 | drivers/isdn/isdn_ppp.c | int isdn_ppp_xmit(struct sk_buff *skb, struct device *dev) |
dev | 792 | drivers/isdn/isdn_ppp.c | isdn_net_dev *nd = ((isdn_net_local *) dev->priv)->netdev; |
dev | 803 | drivers/isdn/isdn_ppp.c | return (isdn_net_send_skb(dev , lp , skb)); |
dev | 881 | drivers/isdn/isdn_ppp.c | return (isdn_net_send_skb(dev , lp , skb)); |
dev | 945 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_mask_queue(isdn_net_dev * dev, long mask) |
dev | 947 | drivers/isdn/isdn_ppp.c | struct mpqueue *q = dev->mp_last; |
dev | 955 | drivers/isdn/isdn_ppp.c | static int isdn_ppp_fill_mpqueue(isdn_net_dev * dev, struct sk_buff ** skb, int BEbyte, int *sqnop, int min_sqno) |
dev | 967 | drivers/isdn/isdn_ppp.c | isdn_ppp_cleanup_queue(dev, min_sqno); |
dev | 979 | drivers/isdn/isdn_ppp.c | if (!(q = dev->mp_last)) { |
dev | 980 | drivers/isdn/isdn_ppp.c | dev->mp_last = q1; |
dev | 983 | drivers/isdn/isdn_ppp.c | isdn_ppp_cleanup_queue(dev, min_sqno); /* not necessary */ |
dev | 1005 | drivers/isdn/isdn_ppp.c | dev->mp_last = q1; |
dev | 1017 | drivers/isdn/isdn_ppp.c | isdn_ppp_cleanup_queue(dev, min_sqno); |
dev | 1032 | drivers/isdn/isdn_ppp.c | isdn_ppp_cleanup_queue(dev, min_sqno); |
dev | 1044 | drivers/isdn/isdn_ppp.c | dev->mp_last = qe->next; |
dev | 1052 | drivers/isdn/isdn_ppp.c | isdn_ppp_cleanup_queue(dev, min_sqno); |
dev | 1084 | drivers/isdn/isdn_ppp.c | static void isdn_ppp_cleanup_queue(isdn_net_dev * dev, long min_sqno) |
dev | 1093 | drivers/isdn/isdn_ppp.c | struct mpqueue *ql, *q = dev->mp_last; |
dev | 1098 | drivers/isdn/isdn_ppp.c | if ((dev->mp_last = q->next)) |
dev | 1106 | drivers/isdn/isdn_ppp.c | q = dev->mp_last; |
dev | 1123 | drivers/isdn/isdn_ppp.c | isdn_net_dev *net_dev = dev->netdev; |
dev | 1155 | drivers/isdn/isdn_ppp.c | int isdn_ppp_dev_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 1160 | drivers/isdn/isdn_ppp.c | isdn_net_local *lp = (isdn_net_local *) dev->priv; |
dev | 61 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[i]) { |
dev | 62 | drivers/isdn/isdn_tty.c | if ((tty = dev->mdm.info[i].tty)) { |
dev | 63 | drivers/isdn/isdn_tty.c | if (dev->mdm.info[i].MCR & UART_MCR_RTS) { |
dev | 70 | drivers/isdn/isdn_tty.c | if (dev->mdm.atmodem[i].mdmreg[12] & 128) |
dev | 97 | drivers/isdn/isdn_tty.c | if ((midx = dev->m_idx[i]) >= 0) |
dev | 98 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[midx]) { |
dev | 102 | drivers/isdn/isdn_tty.c | info = &dev->mdm.info[midx]; |
dev | 110 | drivers/isdn/isdn_tty.c | if (!(dev->mdm.atmodem[midx].mdmreg[12] & 128)) |
dev | 124 | drivers/isdn/isdn_tty.c | dev->mdm.rcvsched[midx] = 0; |
dev | 127 | drivers/isdn/isdn_tty.c | dev->mdm.rcvsched[midx] = 1; |
dev | 156 | drivers/isdn/isdn_tty.c | info->isdn_driver = dev->drvmap[i]; |
dev | 157 | drivers/isdn/isdn_tty.c | info->isdn_channel = dev->chanmap[i]; |
dev | 159 | drivers/isdn/isdn_tty.c | dev->m_idx[i] = info->line; |
dev | 160 | drivers/isdn/isdn_tty.c | dev->usage[i] |= ISDN_USAGE_OUTGOING; |
dev | 166 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 170 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 174 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 178 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 184 | drivers/isdn/isdn_tty.c | dev->mdm.dialing[info->line] = 1; |
dev | 185 | drivers/isdn/isdn_tty.c | strcpy(dev->num[i], n); |
dev | 187 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 197 | drivers/isdn/isdn_tty.c | dev->mdm.rcvsched[info->line] = 0; |
dev | 198 | drivers/isdn/isdn_tty.c | dev->mdm.online[info->line] = 0; |
dev | 203 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 207 | drivers/isdn/isdn_tty.c | dev->m_idx[info->drv_index] = -1; |
dev | 255 | drivers/isdn/isdn_tty.c | isdn_tty_modem_reset_regs(&dev->mdm.atmodem[info->line], 0); |
dev | 256 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[info->line]) { |
dev | 315 | drivers/isdn/isdn_tty.c | dev->mdm.msr[info->line] |= UART_MSR_DSR; |
dev | 340 | drivers/isdn/isdn_tty.c | isdn_tty_modem_reset_regs(&dev->mdm.atmodem[info->line], 0); |
dev | 341 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[info->line]) { |
dev | 377 | drivers/isdn/isdn_tty.c | driver *driv = dev->drv[drvidx]; |
dev | 380 | drivers/isdn/isdn_tty.c | i = dev->drv[info->isdn_driver]->maxbufsize; |
dev | 387 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[i]) { |
dev | 388 | drivers/isdn/isdn_tty.c | isdn_tty_check_esc(buf, dev->mdm.atmodem[i].mdmreg[2], c, |
dev | 389 | drivers/isdn/isdn_tty.c | &(dev->mdm.atmodem[i].pluscount), |
dev | 390 | drivers/isdn/isdn_tty.c | &(dev->mdm.atmodem[i].lastplus), from_user); |
dev | 396 | drivers/isdn/isdn_tty.c | if (dev->mdm.atmodem[i].mdmreg[13] & 1) { |
dev | 404 | drivers/isdn/isdn_tty.c | if (dev->mdm.atmodem[i].mdmreg[13] & 2) { |
dev | 417 | drivers/isdn/isdn_tty.c | if (dev->drv[info->isdn_driver]->interface-> |
dev | 420 | drivers/isdn/isdn_tty.c | info->xmit_size = dev->mdm.atmodem[i].mdmreg[16] * 16; |
dev | 423 | drivers/isdn/isdn_tty.c | dev->mdm.msr[i] &= ~UART_MSR_CTS; |
dev | 432 | drivers/isdn/isdn_tty.c | if (dev->mdm.dialing[i]) { |
dev | 433 | drivers/isdn/isdn_tty.c | dev->mdm.dialing[i] = 0; |
dev | 459 | drivers/isdn/isdn_tty.c | if (!dev->mdm.online[info->line]) |
dev | 471 | drivers/isdn/isdn_tty.c | if (!dev->mdm.online[info->line]) |
dev | 561 | drivers/isdn/isdn_tty.c | status = dev->mdm.msr[info->line]; |
dev | 578 | drivers/isdn/isdn_tty.c | status = dev->mdm.msr[info->line]; |
dev | 609 | drivers/isdn/isdn_tty.c | isdn_tty_modem_reset_regs(&dev->mdm.atmodem[info->line], 0); |
dev | 610 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[info->line]) { |
dev | 624 | drivers/isdn/isdn_tty.c | isdn_tty_modem_reset_regs(&dev->mdm.atmodem[info->line], 0); |
dev | 625 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[info->line]) { |
dev | 865 | drivers/isdn/isdn_tty.c | dev->mdm.msr[info->line] & |
dev | 908 | drivers/isdn/isdn_tty.c | info = &dev->mdm.info[line]; |
dev | 947 | drivers/isdn/isdn_tty.c | dev->modempoll++; |
dev | 971 | drivers/isdn/isdn_tty.c | dev->modempoll--; |
dev | 1022 | drivers/isdn/isdn_tty.c | while (!(dev->mdm.mlr[info->line] |
dev | 1119 | drivers/isdn/isdn_tty.c | if (dev->profd) |
dev | 1120 | drivers/isdn/isdn_tty.c | send_sig(SIGIO, dev->profd, 1); |
dev | 1129 | drivers/isdn/isdn_tty.c | m = &dev->mdm; |
dev | 1262 | drivers/isdn/isdn_tty.c | dev->mdm.atmodem[i].msn, isdn_map_eaz2msn(dev->mdm.atmodem[i].msn, di), |
dev | 1263 | drivers/isdn/isdn_tty.c | dev->mdm.atmodem[i].mdmreg[18], dev->mdm.atmodem[i].mdmreg[19]); |
dev | 1265 | drivers/isdn/isdn_tty.c | if ((!strcmp(isdn_map_eaz2msn(dev->mdm.atmodem[i].msn, di) |
dev | 1267 | drivers/isdn/isdn_tty.c | (dev->mdm.atmodem[i].mdmreg[18] == si1) && /* SI1 is matching */ |
dev | 1268 | drivers/isdn/isdn_tty.c | (dev->mdm.atmodem[i].mdmreg[19] == si2)) { /* SI2 is matching */ |
dev | 1269 | drivers/isdn/isdn_tty.c | modem_info *info = &dev->mdm.info[i]; |
dev | 1275 | drivers/isdn/isdn_tty.c | dev->usage[idx]); |
dev | 1280 | drivers/isdn/isdn_tty.c | (USG_NONE(dev->usage[idx]))) { |
dev | 1284 | drivers/isdn/isdn_tty.c | dev->m_idx[idx] = info->line; |
dev | 1285 | drivers/isdn/isdn_tty.c | dev->usage[idx] &= ISDN_USAGE_EXCLUSIVE; |
dev | 1286 | drivers/isdn/isdn_tty.c | dev->usage[idx] |= ISDN_USAGE_MODEM; |
dev | 1287 | drivers/isdn/isdn_tty.c | strcpy(dev->num[idx], nr); |
dev | 1297 | drivers/isdn/isdn_tty.c | dev->drv[di]->reject_bus ? "rejected" : "ignored"); |
dev | 1315 | drivers/isdn/isdn_tty.c | atemu *m = &(dev->mdm.atmodem[info->line]); |
dev | 1432 | drivers/isdn/isdn_tty.c | atemu *m = &dev->mdm.atmodem[info->line]; |
dev | 1447 | drivers/isdn/isdn_tty.c | dev->mdm.msr[info->line] &= ~UART_MSR_RI; |
dev | 1451 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 1458 | drivers/isdn/isdn_tty.c | dev->mdm.msr[info->line] &= ~(UART_MSR_DCD | UART_MSR_RI); |
dev | 1467 | drivers/isdn/isdn_tty.c | dev->mdm.online[info->line] = 1; |
dev | 1480 | drivers/isdn/isdn_tty.c | isdn_tty_at_cout(dev->num[info->drv_index], info); |
dev | 1515 | drivers/isdn/isdn_tty.c | sprintf(v, "%d\r\n", dev->mdm.atmodem[info->line].mdmreg[ridx]); |
dev | 1553 | drivers/isdn/isdn_tty.c | atemu *m = &dev->mdm.atmodem[info->line]; |
dev | 1582 | drivers/isdn/isdn_tty.c | dev->mdm.msr[info->line] &= ~UART_MSR_RI; |
dev | 1586 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 1590 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 1597 | drivers/isdn/isdn_tty.c | fido_drv = dev->drv[fido_isdn_driver]; |
dev | 1602 | drivers/isdn/isdn_tty.c | dev->drv[info->isdn_driver]->interface->command(&cmd); |
dev | 1669 | drivers/isdn/isdn_tty.c | if (dev->mdm.msr[info->line] & UART_MSR_DCD) /* if B-Channel is up */ |
dev | 1876 | drivers/isdn/isdn_tty.c | atemu *m = &dev->mdm.atmodem[info->line]; |
dev | 1950 | drivers/isdn/isdn_tty.c | if (USG_MODEM(dev->usage[i])) |
dev | 1951 | drivers/isdn/isdn_tty.c | if ((midx = dev->m_idx[i]) >= 0) |
dev | 1952 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[midx]) { |
dev | 1954 | drivers/isdn/isdn_tty.c | if ((dev->mdm.atmodem[midx].pluscount == 3) && |
dev | 1955 | drivers/isdn/isdn_tty.c | ((jiffies - dev->mdm.atmodem[midx].lastplus) > PLUSWAIT2)) { |
dev | 1956 | drivers/isdn/isdn_tty.c | dev->mdm.atmodem[midx].pluscount = 0; |
dev | 1957 | drivers/isdn/isdn_tty.c | dev->mdm.online[midx] = 0; |
dev | 1958 | drivers/isdn/isdn_tty.c | isdn_tty_modem_result(0, &dev->mdm.info[midx]); |
dev | 1976 | drivers/isdn/isdn_tty.c | if (USG_MODEM(dev->usage[i])) |
dev | 1977 | drivers/isdn/isdn_tty.c | if ((midx = dev->m_idx[i]) >= 0) |
dev | 1978 | drivers/isdn/isdn_tty.c | if (dev->mdm.msr[midx] & UART_MSR_RI) { |
dev | 1980 | drivers/isdn/isdn_tty.c | isdn_tty_modem_result(2, &dev->mdm.info[midx]); |
dev | 1994 | drivers/isdn/isdn_tty.c | if (USG_MODEM(dev->usage[i])) |
dev | 1995 | drivers/isdn/isdn_tty.c | if ((midx = dev->m_idx[i]) >= 0) |
dev | 1996 | drivers/isdn/isdn_tty.c | if (dev->mdm.online[midx]) { |
dev | 1997 | drivers/isdn/isdn_tty.c | modem_info *info = &(dev->mdm.info[midx]); |
dev | 2010 | drivers/isdn/isdn_tty.c | if (dev->mdm.atmodem[midx].mdmreg[13] & 2) { |
dev | 2022 | drivers/isdn/isdn_tty.c | if (dev->drv[info->isdn_driver]->interface-> |
dev | 2025 | drivers/isdn/isdn_tty.c | info->xmit_size = dev->mdm.atmodem[midx].mdmreg[16] * 16; |
dev | 2028 | drivers/isdn/isdn_tty.c | dev->mdm.msr[midx] &= ~UART_MSR_CTS; |
dev | 2055 | drivers/isdn/isdn_tty.c | modem_info *info = &dev->mdm.info[i]; |
dev | 2060 | drivers/isdn/isdn_tty.c | dev->mdm.msr[i] |= UART_MSR_CTS; |
dev | 118 | drivers/net/3c501.c | int el1_probe(struct device *dev); |
dev | 119 | drivers/net/3c501.c | static int el1_probe1(struct device *dev, int ioaddr); |
dev | 120 | drivers/net/3c501.c | static int el_open(struct device *dev); |
dev | 121 | drivers/net/3c501.c | static int el_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 123 | drivers/net/3c501.c | static void el_receive(struct device *dev); |
dev | 124 | drivers/net/3c501.c | static void el_reset(struct device *dev); |
dev | 125 | drivers/net/3c501.c | static int el1_close(struct device *dev); |
dev | 126 | drivers/net/3c501.c | static struct enet_statistics *el1_get_stats(struct device *dev); |
dev | 127 | drivers/net/3c501.c | static void set_multicast_list(struct device *dev); |
dev | 211 | drivers/net/3c501.c | int el1_probe(struct device *dev) |
dev | 214 | drivers/net/3c501.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 217 | drivers/net/3c501.c | return el1_probe1(dev, base_addr); |
dev | 226 | drivers/net/3c501.c | if (el1_probe1(dev, ioaddr) == 0) |
dev | 238 | drivers/net/3c501.c | static int el1_probe1(struct device *dev, int ioaddr) |
dev | 284 | drivers/net/3c501.c | if (dev->irq < 2) |
dev | 304 | drivers/net/3c501.c | dev->base_addr = ioaddr; |
dev | 305 | drivers/net/3c501.c | memcpy(dev->dev_addr, station_addr, ETH_ALEN); |
dev | 307 | drivers/net/3c501.c | if (dev->mem_start & 0xf) |
dev | 308 | drivers/net/3c501.c | el_debug = dev->mem_start & 0x7; |
dev | 310 | drivers/net/3c501.c | dev->irq = autoirq; |
dev | 312 | drivers/net/3c501.c | printk("%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, mname, dev->base_addr, |
dev | 313 | drivers/net/3c501.c | autoirq ? "auto":"assigned ", dev->irq); |
dev | 326 | drivers/net/3c501.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 327 | drivers/net/3c501.c | if (dev->priv == NULL) |
dev | 329 | drivers/net/3c501.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 335 | drivers/net/3c501.c | dev->open = &el_open; |
dev | 336 | drivers/net/3c501.c | dev->hard_start_xmit = &el_start_xmit; |
dev | 337 | drivers/net/3c501.c | dev->stop = &el1_close; |
dev | 338 | drivers/net/3c501.c | dev->get_stats = &el1_get_stats; |
dev | 339 | drivers/net/3c501.c | dev->set_multicast_list = &set_multicast_list; |
dev | 345 | drivers/net/3c501.c | ether_setup(dev); |
dev | 356 | drivers/net/3c501.c | static int el_open(struct device *dev) |
dev | 358 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 361 | drivers/net/3c501.c | printk("%s: Doing el_open()...", dev->name); |
dev | 363 | drivers/net/3c501.c | if (request_irq(dev->irq, &el_interrupt, 0, "3c501", NULL)) |
dev | 366 | drivers/net/3c501.c | irq2dev_map[dev->irq] = dev; |
dev | 367 | drivers/net/3c501.c | el_reset(dev); |
dev | 369 | drivers/net/3c501.c | dev->start = 1; |
dev | 376 | drivers/net/3c501.c | static int el_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 378 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 379 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 382 | drivers/net/3c501.c | if(dev->interrupt) /* May be unloading, don't stamp on */ |
dev | 385 | drivers/net/3c501.c | if (dev->tbusy) |
dev | 387 | drivers/net/3c501.c | if (jiffies - dev->trans_start < 20) |
dev | 395 | drivers/net/3c501.c | dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS)); |
dev | 401 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 402 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 407 | drivers/net/3c501.c | dev_tint(dev); |
dev | 425 | drivers/net/3c501.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 428 | drivers/net/3c501.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 445 | drivers/net/3c501.c | disable_irq(dev->irq); |
dev | 467 | drivers/net/3c501.c | printk("%s: burped during tx load.\n", dev->name); |
dev | 474 | drivers/net/3c501.c | enable_irq(dev->irq); |
dev | 476 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 493 | drivers/net/3c501.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 498 | drivers/net/3c501.c | if (dev == NULL || dev->irq != irq) |
dev | 504 | drivers/net/3c501.c | ioaddr = dev->base_addr; |
dev | 505 | drivers/net/3c501.c | lp = (struct net_local *)dev->priv; |
dev | 518 | drivers/net/3c501.c | printk("%s: el_interrupt() aux=%#02x", dev->name, axsr); |
dev | 519 | drivers/net/3c501.c | if (dev->interrupt) |
dev | 520 | drivers/net/3c501.c | printk("%s: Reentering the interrupt driver!\n", dev->name); |
dev | 521 | drivers/net/3c501.c | dev->interrupt = 1; |
dev | 523 | drivers/net/3c501.c | if(lp->loading==1 && !dev->tbusy) |
dev | 525 | drivers/net/3c501.c | dev->name); |
dev | 531 | drivers/net/3c501.c | if (dev->tbusy) |
dev | 545 | drivers/net/3c501.c | printk("%s: Interrupt while loading [", dev->name); |
dev | 549 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 563 | drivers/net/3c501.c | " gp=%03x rp=%03x.\n", dev->name, txsr, axsr, |
dev | 565 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 574 | drivers/net/3c501.c | printk("%s: Transmit failed 16 times, ethernet jammed?\n",dev->name); |
dev | 594 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 610 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 639 | drivers/net/3c501.c | el_receive(dev); |
dev | 648 | drivers/net/3c501.c | dev->name, rxsr); |
dev | 649 | drivers/net/3c501.c | el_reset(dev); |
dev | 663 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 673 | drivers/net/3c501.c | static void el_receive(struct device *dev) |
dev | 675 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 676 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 688 | drivers/net/3c501.c | printk("%s: bogus packet, length=%d\n", dev->name, pkt_len); |
dev | 707 | drivers/net/3c501.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 714 | drivers/net/3c501.c | skb->dev = dev; |
dev | 721 | drivers/net/3c501.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 728 | drivers/net/3c501.c | static void el_reset(struct device *dev) |
dev | 730 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 739 | drivers/net/3c501.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 748 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 749 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 753 | drivers/net/3c501.c | static int el1_close(struct device *dev) |
dev | 755 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 758 | drivers/net/3c501.c | printk("%s: Shutting down ethercard at %#x.\n", dev->name, ioaddr); |
dev | 760 | drivers/net/3c501.c | dev->tbusy = 1; |
dev | 761 | drivers/net/3c501.c | dev->start = 0; |
dev | 767 | drivers/net/3c501.c | free_irq(dev->irq, NULL); |
dev | 769 | drivers/net/3c501.c | irq2dev_map[dev->irq] = 0; |
dev | 775 | drivers/net/3c501.c | static struct enet_statistics *el1_get_stats(struct device *dev) |
dev | 777 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 786 | drivers/net/3c501.c | static void set_multicast_list(struct device *dev) |
dev | 788 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 790 | drivers/net/3c501.c | if(dev->flags&IFF_PROMISC) |
dev | 795 | drivers/net/3c501.c | else if (dev->mc_list || dev->flags&IFF_ALLMULTI) |
dev | 54 | drivers/net/3c503.c | int el2_probe(struct device *dev); |
dev | 55 | drivers/net/3c503.c | int el2_pio_probe(struct device *dev); |
dev | 56 | drivers/net/3c503.c | int el2_probe1(struct device *dev, int ioaddr); |
dev | 73 | drivers/net/3c503.c | static int el2_open(struct device *dev); |
dev | 74 | drivers/net/3c503.c | static int el2_close(struct device *dev); |
dev | 75 | drivers/net/3c503.c | static void el2_reset_8390(struct device *dev); |
dev | 76 | drivers/net/3c503.c | static void el2_init_card(struct device *dev); |
dev | 77 | drivers/net/3c503.c | static void el2_block_output(struct device *dev, int count, |
dev | 79 | drivers/net/3c503.c | static void el2_block_input(struct device *dev, int count, struct sk_buff *skb, |
dev | 81 | drivers/net/3c503.c | static void el2_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 93 | drivers/net/3c503.c | el2_probe(struct device *dev) |
dev | 96 | drivers/net/3c503.c | int base_addr = dev->base_addr; |
dev | 99 | drivers/net/3c503.c | return el2_probe1(dev, base_addr); |
dev | 114 | drivers/net/3c503.c | if (el2_probe1(dev, netcard_portlist[i]) == 0) |
dev | 118 | drivers/net/3c503.c | return el2_pio_probe(dev); |
dev | 128 | drivers/net/3c503.c | el2_pio_probe(struct device *dev) |
dev | 131 | drivers/net/3c503.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 134 | drivers/net/3c503.c | return el2_probe1(dev, base_addr); |
dev | 142 | drivers/net/3c503.c | if (el2_probe1(dev, ioaddr) == 0) |
dev | 154 | drivers/net/3c503.c | el2_probe1(struct device *dev, int ioaddr) |
dev | 189 | drivers/net/3c503.c | if (dev == NULL) { |
dev | 191 | drivers/net/3c503.c | dev = init_etherdev(0, 0); |
dev | 197 | drivers/net/3c503.c | dev->base_addr = ioaddr; |
dev | 199 | drivers/net/3c503.c | if (ethdev_init(dev)) { |
dev | 204 | drivers/net/3c503.c | printk("%s: 3c503 at i/o base %#3x, node ", dev->name, ioaddr); |
dev | 208 | drivers/net/3c503.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 231 | drivers/net/3c503.c | ei_status.interface_num = dev->mem_end & 0xf; |
dev | 236 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 239 | drivers/net/3c503.c | dev->mem_start = ((membase_reg & 0xc0) ? 0xD8000 : 0xC8000) + |
dev | 248 | drivers/net/3c503.c | unsigned long mem_base = dev->mem_start; |
dev | 256 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 266 | drivers/net/3c503.c | dev->mem_end = dev->rmem_end = dev->mem_start + EL2_MEMSIZE; |
dev | 269 | drivers/net/3c503.c | dev->rmem_start = dev->mem_start; |
dev | 272 | drivers/net/3c503.c | dev->rmem_start = TX_PAGES*256 + dev->mem_start; |
dev | 303 | drivers/net/3c503.c | if (dev->irq == 2) |
dev | 304 | drivers/net/3c503.c | dev->irq = 9; |
dev | 305 | drivers/net/3c503.c | else if (dev->irq > 5 && dev->irq != 9) { |
dev | 307 | drivers/net/3c503.c | dev->irq); |
dev | 308 | drivers/net/3c503.c | dev->irq = 0; |
dev | 311 | drivers/net/3c503.c | ei_status.saved_irq = dev->irq; |
dev | 313 | drivers/net/3c503.c | dev->start = 0; |
dev | 314 | drivers/net/3c503.c | dev->open = &el2_open; |
dev | 315 | drivers/net/3c503.c | dev->stop = &el2_close; |
dev | 317 | drivers/net/3c503.c | if (dev->mem_start) |
dev | 319 | drivers/net/3c503.c | dev->name, ei_status.name, (wordlength+1)<<3, |
dev | 320 | drivers/net/3c503.c | dev->mem_start, dev->mem_end-1); |
dev | 327 | drivers/net/3c503.c | dev->name, ei_status.name, (wordlength+1)<<3); |
dev | 333 | drivers/net/3c503.c | el2_open(struct device *dev) |
dev | 336 | drivers/net/3c503.c | if (dev->irq < 2) { |
dev | 348 | drivers/net/3c503.c | && request_irq (dev->irq = *irqp, &ei_interrupt, 0, ei_status.name, NULL) == 0) |
dev | 357 | drivers/net/3c503.c | if (request_irq(dev->irq, &ei_interrupt, 0, ei_status.name, NULL)) { |
dev | 362 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 363 | drivers/net/3c503.c | ei_open(dev); |
dev | 369 | drivers/net/3c503.c | el2_close(struct device *dev) |
dev | 371 | drivers/net/3c503.c | free_irq(dev->irq, NULL); |
dev | 372 | drivers/net/3c503.c | dev->irq = ei_status.saved_irq; |
dev | 373 | drivers/net/3c503.c | irq2dev_map[dev->irq] = NULL; |
dev | 376 | drivers/net/3c503.c | ei_close(dev); |
dev | 386 | drivers/net/3c503.c | el2_reset_8390(struct device *dev) |
dev | 389 | drivers/net/3c503.c | printk("%s: Resetting the 3c503 board...", dev->name); |
dev | 396 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 402 | drivers/net/3c503.c | el2_init_card(struct device *dev) |
dev | 417 | drivers/net/3c503.c | outb_p(0x00, dev->base_addr + EN0_IMR); |
dev | 422 | drivers/net/3c503.c | outb_p((0x04 << (dev->irq == 9 ? 2 : dev->irq)), E33G_IDCFR); |
dev | 434 | drivers/net/3c503.c | el2_block_output(struct device *dev, int count, |
dev | 446 | drivers/net/3c503.c | if (dev->mem_start) { /* Shared memory transfer */ |
dev | 447 | drivers/net/3c503.c | unsigned long dest_addr = dev->mem_start + |
dev | 483 | drivers/net/3c503.c | printk("%s: FIFO blocked in el2_block_output.\n", dev->name); |
dev | 484 | drivers/net/3c503.c | el2_reset_8390(dev); |
dev | 507 | drivers/net/3c503.c | el2_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 510 | drivers/net/3c503.c | unsigned long hdr_start = dev->mem_start + ((ring_page - EL2_MB1_START_PG)<<8); |
dev | 513 | drivers/net/3c503.c | if (dev->mem_start) { /* Use the shared memory. */ |
dev | 533 | drivers/net/3c503.c | printk("%s: FIFO blocked in el2_get_8390_hdr.\n", dev->name); |
dev | 535 | drivers/net/3c503.c | el2_reset_8390(dev); |
dev | 546 | drivers/net/3c503.c | el2_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 552 | drivers/net/3c503.c | int end_of_ring = dev->rmem_end; |
dev | 555 | drivers/net/3c503.c | if (dev->mem_start) { /* Use the shared memory. */ |
dev | 557 | drivers/net/3c503.c | if (dev->mem_start + ring_offset + count > end_of_ring) { |
dev | 559 | drivers/net/3c503.c | int semi_count = end_of_ring - (dev->mem_start + ring_offset); |
dev | 560 | drivers/net/3c503.c | memcpy_fromio(skb->data, dev->mem_start + ring_offset, semi_count); |
dev | 562 | drivers/net/3c503.c | memcpy_fromio(skb->data + semi_count, dev->rmem_start, count); |
dev | 565 | drivers/net/3c503.c | eth_io_copy_and_sum(skb, dev->mem_start + ring_offset, count, 0); |
dev | 599 | drivers/net/3c503.c | printk("%s: FIFO blocked in el2_block_input.\n", dev->name); |
dev | 600 | drivers/net/3c503.c | el2_reset_8390(dev); |
dev | 646 | drivers/net/3c503.c | struct device *dev = &dev_el2[this_dev]; |
dev | 647 | drivers/net/3c503.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 648 | drivers/net/3c503.c | dev->irq = irq[this_dev]; |
dev | 649 | drivers/net/3c503.c | dev->base_addr = io[this_dev]; |
dev | 650 | drivers/net/3c503.c | dev->mem_end = xcvr[this_dev]; /* low 4bits = xcvr sel. */ |
dev | 651 | drivers/net/3c503.c | dev->init = el2_probe; |
dev | 656 | drivers/net/3c503.c | if (register_netdev(dev) != 0) { |
dev | 672 | drivers/net/3c503.c | struct device *dev = &dev_el2[this_dev]; |
dev | 673 | drivers/net/3c503.c | if (dev->priv != NULL) { |
dev | 675 | drivers/net/3c503.c | kfree(dev->priv); |
dev | 676 | drivers/net/3c503.c | dev->priv = NULL; |
dev | 677 | drivers/net/3c503.c | release_region(dev->base_addr, EL2_IO_EXTENT); |
dev | 678 | drivers/net/3c503.c | unregister_netdev(dev); |
dev | 6 | drivers/net/3c503.h | #define EL2H (dev->base_addr + 0x400) |
dev | 7 | drivers/net/3c503.h | #define EL2L (dev->base_addr) |
dev | 265 | drivers/net/3c505.c | adapter_reset (struct device * dev) |
dev | 268 | drivers/net/3c505.c | unsigned char orig_hcr=inb_control(dev->base_addr); |
dev | 270 | drivers/net/3c505.c | elp_device * adapter=dev->priv; |
dev | 272 | drivers/net/3c505.c | outb_control(0,dev->base_addr); |
dev | 274 | drivers/net/3c505.c | if (inb_status(dev->base_addr)&ACRF) { |
dev | 276 | drivers/net/3c505.c | inb_command(dev->base_addr); |
dev | 278 | drivers/net/3c505.c | while ((jiffies<=timeout) && !(inb_status(dev->base_addr)&ACRF)) |
dev | 280 | drivers/net/3c505.c | } while (inb_status(dev->base_addr)&ACRF); |
dev | 281 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_NAK); |
dev | 284 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|ATTN|DIR,dev->base_addr); |
dev | 288 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~ATTN,dev->base_addr); |
dev | 292 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|FLSH,dev->base_addr); |
dev | 296 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~FLSH,dev->base_addr); |
dev | 301 | drivers/net/3c505.c | outb_control(orig_hcr, dev->base_addr); |
dev | 302 | drivers/net/3c505.c | if (!start_receive(dev, &adapter->tx_pcb)) |
dev | 303 | drivers/net/3c505.c | printk("%s: start receive command failed \n", dev->name); |
dev | 322 | drivers/net/3c505.c | send_pcb (struct device * dev, pcb_struct * pcb) |
dev | 333 | drivers/net/3c505.c | set_hsf(dev->base_addr,0); |
dev | 334 | drivers/net/3c505.c | if ((cont = WAIT_HCRE(dev->base_addr,5))) { |
dev | 337 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~DIR,dev->base_addr); |
dev | 338 | drivers/net/3c505.c | outb_command(pcb->command, dev->base_addr); |
dev | 340 | drivers/net/3c505.c | cont = WAIT_HCRE(dev->base_addr,5); |
dev | 344 | drivers/net/3c505.c | outb_command(pcb->length, dev->base_addr); |
dev | 345 | drivers/net/3c505.c | cont = WAIT_HCRE(dev->base_addr,5); |
dev | 350 | drivers/net/3c505.c | outb_command(pcb->data.raw[i], dev->base_addr); |
dev | 351 | drivers/net/3c505.c | cont = wait_fast_hcre(dev->base_addr,20000,__LINE__); |
dev | 358 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_END); |
dev | 359 | drivers/net/3c505.c | outb_command(2+pcb->length, dev->base_addr); |
dev | 363 | drivers/net/3c505.c | i = GET_ASF(dev->base_addr); |
dev | 373 | drivers/net/3c505.c | printk("%s: PCB send was NAKed\n", dev->name); |
dev | 375 | drivers/net/3c505.c | printk("%s: timeout after sending PCB\n", dev->name); |
dev | 379 | drivers/net/3c505.c | printk("%s: timeout in middle of sending PCB\n", dev->name); |
dev | 382 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 400 | drivers/net/3c505.c | receive_pcb (struct device * dev, pcb_struct * pcb) |
dev | 408 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 410 | drivers/net/3c505.c | set_hsf(dev->base_addr,0); |
dev | 414 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr))&ACRF) == 0 && jiffies < timeout) |
dev | 421 | drivers/net/3c505.c | pcb->command = inb_command(dev->base_addr); |
dev | 425 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && jiffies < timeout) |
dev | 431 | drivers/net/3c505.c | pcb->length = inb_command(dev->base_addr); |
dev | 435 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 444 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr))&ACRF) == 0 && j++ < 20000) |
dev | 446 | drivers/net/3c505.c | pcb->data.raw[i++] = inb_command(dev->base_addr); |
dev | 462 | drivers/net/3c505.c | printk("%s: mangled PCB received\n", dev->name); |
dev | 463 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_NAK); |
dev | 467 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_ACK); |
dev | 473 | drivers/net/3c505.c | adapter_hard_reset (struct device * dev) |
dev | 478 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 485 | drivers/net/3c505.c | dev->name); |
dev | 489 | drivers/net/3c505.c | outb_control(ATTN|FLSH, dev->base_addr); |
dev | 500 | drivers/net/3c505.c | outb_control(0, dev->base_addr); |
dev | 512 | drivers/net/3c505.c | if (GET_ASF(dev->base_addr) != ASF_PCB_END) |
dev | 525 | drivers/net/3c505.c | start_receive (struct device * dev, pcb_struct * tx_pcb) |
dev | 527 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 531 | drivers/net/3c505.c | printk("%s: restarting receiver\n", dev->name); |
dev | 538 | drivers/net/3c505.c | return send_pcb(dev, tx_pcb); |
dev | 551 | drivers/net/3c505.c | receive_packet (struct device * dev, int len) |
dev | 560 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 561 | drivers/net/3c505.c | adapter=dev->priv; |
dev | 578 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|DIR, dev->base_addr); |
dev | 586 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) |
dev | 594 | drivers/net/3c505.c | inw_data(dev->base_addr); |
dev | 600 | drivers/net/3c505.c | skb->dev = dev; |
dev | 608 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) |
dev | 618 | drivers/net/3c505.c | *ptr = inw_data(dev->base_addr); |
dev | 623 | drivers/net/3c505.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 627 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~DIR, dev->base_addr); |
dev | 642 | drivers/net/3c505.c | struct device *dev; |
dev | 651 | drivers/net/3c505.c | dev = irq2dev_map[irq]; |
dev | 653 | drivers/net/3c505.c | if (dev == NULL) { |
dev | 658 | drivers/net/3c505.c | adapter = (elp_device *) dev->priv; |
dev | 662 | drivers/net/3c505.c | if (dev->interrupt) |
dev | 664 | drivers/net/3c505.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 665 | drivers/net/3c505.c | dev->interrupt = 1; |
dev | 676 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&ACRF) != 0 && jiffies < timeout) { |
dev | 678 | drivers/net/3c505.c | if (receive_pcb(dev, &adapter->irx_pcb)) { |
dev | 687 | drivers/net/3c505.c | if (dev->start == 0) |
dev | 691 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|DIR, |
dev | 692 | drivers/net/3c505.c | dev->base_addr); |
dev | 696 | drivers/net/3c505.c | printk("%s: interrupt - packet not received correctly\n", dev->name); |
dev | 701 | drivers/net/3c505.c | printk("%s: interrupt - packet received of length %i (%i)\n", dev->name, len, dlen); |
dev | 704 | drivers/net/3c505.c | receive_packet(dev, dlen); |
dev | 707 | drivers/net/3c505.c | printk("%s: packet received\n", dev->name); |
dev | 709 | drivers/net/3c505.c | if (dev->start && !start_receive(dev, &adapter->itx_pcb)) |
dev | 711 | drivers/net/3c505.c | printk("%s: interrupt - failed to send receive start PCB\n", dev->name); |
dev | 713 | drivers/net/3c505.c | printk("%s: receive procedure complete\n", dev->name); |
dev | 723 | drivers/net/3c505.c | printk("%s: interrupt - configure response received\n", dev->name); |
dev | 732 | drivers/net/3c505.c | printk("%s: Adapter memory configuration %s.\n",dev->name, |
dev | 742 | drivers/net/3c505.c | printk("%s: Multicast address list loading %s.\n",dev->name, |
dev | 752 | drivers/net/3c505.c | printk("%s: Ethernet address setting %s.\n",dev->name, |
dev | 768 | drivers/net/3c505.c | printk("%s: interrupt - statistics response received\n", dev->name); |
dev | 776 | drivers/net/3c505.c | printk("%s: interrupt - packet sent\n", dev->name); |
dev | 777 | drivers/net/3c505.c | if (dev->start == 0) |
dev | 782 | drivers/net/3c505.c | dev->name, adapter->irx_pcb.data.xmit_resp.c_stat); |
dev | 783 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 791 | drivers/net/3c505.c | printk("%s: unknown PCB received - %2.2x\n", dev->name, adapter->irx_pcb.command); |
dev | 795 | drivers/net/3c505.c | printk("%s: failed to read PCB on interrupt\n", dev->name); |
dev | 796 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 803 | drivers/net/3c505.c | dev->interrupt = 0; |
dev | 814 | drivers/net/3c505.c | elp_open (struct device *dev) |
dev | 818 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 820 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 823 | drivers/net/3c505.c | printk("%s: request to open device\n", dev->name); |
dev | 829 | drivers/net/3c505.c | printk("%s: Opening a non-existent physical device\n", dev->name); |
dev | 836 | drivers/net/3c505.c | outb_control(0x00, dev->base_addr); |
dev | 841 | drivers/net/3c505.c | inb_command(dev->base_addr); |
dev | 842 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 847 | drivers/net/3c505.c | dev->interrupt = 0; |
dev | 852 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 857 | drivers/net/3c505.c | irq2dev_map[dev->irq] = dev; |
dev | 862 | drivers/net/3c505.c | if (request_irq(dev->irq, &elp_interrupt, 0, "3c505", NULL)) { |
dev | 863 | drivers/net/3c505.c | irq2dev_map[dev->irq] = NULL; |
dev | 870 | drivers/net/3c505.c | outb_control(CMDE, dev->base_addr); |
dev | 875 | drivers/net/3c505.c | dev->start = 1; |
dev | 881 | drivers/net/3c505.c | printk("%s: sending 3c505 memory configuration command\n", dev->name); |
dev | 891 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 892 | drivers/net/3c505.c | printk("%s: couldn't send memory configuration command\n", dev->name); |
dev | 906 | drivers/net/3c505.c | printk("%s: sending 82586 configure command\n", dev->name); |
dev | 911 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 912 | drivers/net/3c505.c | printk("%s: couldn't send 82586 configure command\n", dev->name); |
dev | 924 | drivers/net/3c505.c | if (!start_receive(dev, &adapter->tx_pcb)) |
dev | 925 | drivers/net/3c505.c | printk("%s: start receive command failed \n", dev->name); |
dev | 927 | drivers/net/3c505.c | printk("%s: start receive command sent\n", dev->name); |
dev | 942 | drivers/net/3c505.c | send_packet (struct device * dev, unsigned char * ptr, int len) |
dev | 953 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 956 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 970 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) { |
dev | 979 | drivers/net/3c505.c | while (((inb_status(dev->base_addr)&HRDY) == 0) |
dev | 985 | drivers/net/3c505.c | dev->name,filename,__LINE__, i, nlen/2); |
dev | 989 | drivers/net/3c505.c | outw_data(*(short *)ptr, dev->base_addr); |
dev | 1005 | drivers/net/3c505.c | elp_start_xmit (struct sk_buff *skb, struct device *dev) |
dev | 1007 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1013 | drivers/net/3c505.c | dev_tint(dev); |
dev | 1024 | drivers/net/3c505.c | printk("%s: request to send packet of length %d\n", dev->name, (int)skb->len); |
dev | 1029 | drivers/net/3c505.c | if (dev->tbusy) { |
dev | 1030 | drivers/net/3c505.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1034 | drivers/net/3c505.c | printk("%s: transmit timed out, not resetting adapter\n", dev->name); |
dev | 1035 | drivers/net/3c505.c | if (((stat=inb_status(dev->base_addr))&ACRF) != 0) |
dev | 1036 | drivers/net/3c505.c | printk("%s: hmmm...seemed to have missed an interrupt!\n", dev->name); |
dev | 1037 | drivers/net/3c505.c | printk("%s: status %#02x\n", dev->name, stat); |
dev | 1038 | drivers/net/3c505.c | dev->trans_start = jiffies; |
dev | 1039 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 1045 | drivers/net/3c505.c | if (!send_packet(dev, skb->data, skb->len)) { |
dev | 1046 | drivers/net/3c505.c | printk("%s: send packet PCB failed\n", dev->name); |
dev | 1051 | drivers/net/3c505.c | printk("%s: packet of length %d sent\n", dev->name, (int)skb->len); |
dev | 1057 | drivers/net/3c505.c | dev->trans_start = jiffies; |
dev | 1062 | drivers/net/3c505.c | dev->tbusy = 1; |
dev | 1079 | drivers/net/3c505.c | elp_get_stats (struct device *dev) |
dev | 1081 | drivers/net/3c505.c | elp_device *adapter = (elp_device *) dev->priv; |
dev | 1084 | drivers/net/3c505.c | printk("%s: request for stats\n", dev->name); |
dev | 1088 | drivers/net/3c505.c | if (!dev->start) |
dev | 1095 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1096 | drivers/net/3c505.c | printk("%s: couldn't send get statistics command\n", dev->name); |
dev | 1118 | drivers/net/3c505.c | elp_close (struct device *dev) |
dev | 1122 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1123 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 1127 | drivers/net/3c505.c | printk("%s: request to close device\n", dev->name); |
dev | 1133 | drivers/net/3c505.c | (void) elp_get_stats(dev); |
dev | 1138 | drivers/net/3c505.c | outb_control(0x00, dev->base_addr); |
dev | 1143 | drivers/net/3c505.c | dev->tbusy = 1; |
dev | 1148 | drivers/net/3c505.c | dev->start = 0; |
dev | 1153 | drivers/net/3c505.c | free_irq(dev->irq, NULL); |
dev | 1158 | drivers/net/3c505.c | irq2dev_map[dev->irq] = 0; |
dev | 1176 | drivers/net/3c505.c | elp_set_mc_list (struct device *dev) |
dev | 1178 | drivers/net/3c505.c | elp_device *adapter = (elp_device *) dev->priv; |
dev | 1179 | drivers/net/3c505.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 1183 | drivers/net/3c505.c | printk("%s: request to set multicast list\n", dev->name); |
dev | 1185 | drivers/net/3c505.c | if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) |
dev | 1190 | drivers/net/3c505.c | adapter->tx_pcb.length = 6*dev->mc_count; |
dev | 1191 | drivers/net/3c505.c | for (i=0;i<dev->mc_count;i++) |
dev | 1197 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1198 | drivers/net/3c505.c | printk("%s: couldn't send set_multicast command\n", dev->name); |
dev | 1207 | drivers/net/3c505.c | if (dev->mc_count) |
dev | 1219 | drivers/net/3c505.c | printk("%s: sending 82586 configure command\n", dev->name); |
dev | 1223 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1224 | drivers/net/3c505.c | printk("%s: couldn't send 82586 configure command\n", dev->name); |
dev | 1241 | drivers/net/3c505.c | elp_init (struct device *dev) |
dev | 1245 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1250 | drivers/net/3c505.c | dev->open = elp_open; /* local */ |
dev | 1251 | drivers/net/3c505.c | dev->stop = elp_close; /* local */ |
dev | 1252 | drivers/net/3c505.c | dev->get_stats = elp_get_stats; /* local */ |
dev | 1253 | drivers/net/3c505.c | dev->hard_start_xmit = elp_start_xmit; /* local */ |
dev | 1254 | drivers/net/3c505.c | dev->set_multicast_list = elp_set_mc_list; /* local */ |
dev | 1257 | drivers/net/3c505.c | ether_setup(dev); |
dev | 1262 | drivers/net/3c505.c | adapter = (elp_device *)(dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL)); |
dev | 1271 | drivers/net/3c505.c | dev->mem_start = dev->mem_end = dev->rmem_end = dev->rmem_start = 0; |
dev | 1281 | drivers/net/3c505.c | elp_sense (struct device * dev) |
dev | 1284 | drivers/net/3c505.c | int addr=dev->base_addr; |
dev | 1285 | drivers/net/3c505.c | const char *name=dev->name; |
dev | 1351 | drivers/net/3c505.c | adapter_hard_reset(dev); |
dev | 1362 | drivers/net/3c505.c | elp_autodetect (struct device * dev) |
dev | 1368 | drivers/net/3c505.c | if (dev->base_addr != 0) { /* dev->base_addr == 0 ==> plain autodetect */ |
dev | 1369 | drivers/net/3c505.c | if (elp_sense(dev) == 0) |
dev | 1370 | drivers/net/3c505.c | return dev->base_addr; |
dev | 1371 | drivers/net/3c505.c | } else while ( (dev->base_addr=addr_list[idx++]) ) { |
dev | 1372 | drivers/net/3c505.c | if (elp_sense(dev) == 0) |
dev | 1373 | drivers/net/3c505.c | return dev->base_addr; |
dev | 1378 | drivers/net/3c505.c | printk(couldnot_msg, dev->name); |
dev | 1390 | drivers/net/3c505.c | elplus_probe (struct device *dev) |
dev | 1395 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1401 | drivers/net/3c505.c | dev->base_addr = elp_autodetect(dev); |
dev | 1402 | drivers/net/3c505.c | if ( !(dev->base_addr) ) |
dev | 1409 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr) | CMDE, dev->base_addr); |
dev | 1418 | drivers/net/3c505.c | if (!send_pcb (dev, &adapter.tx_pcb) || |
dev | 1419 | drivers/net/3c505.c | !receive_pcb(dev, &adapter.rx_pcb) || |
dev | 1422 | drivers/net/3c505.c | printk("%s: not responding to first PCB\n", dev->name); |
dev | 1426 | drivers/net/3c505.c | if (dev->irq) { /* Is there a preset IRQ? */ |
dev | 1427 | drivers/net/3c505.c | if (dev->irq != autoirq_report(0)) { |
dev | 1428 | drivers/net/3c505.c | printk("%s: Detected IRQ doesn't match user-defined one.\n",dev->name); |
dev | 1433 | drivers/net/3c505.c | dev->irq=autoirq_report(0); |
dev | 1434 | drivers/net/3c505.c | switch (dev->irq) { /* Legal, sane? */ |
dev | 1436 | drivers/net/3c505.c | printk("%s: No IRQ reported by autoirq_report().\n",dev->name); |
dev | 1437 | drivers/net/3c505.c | printk("%s: Check the jumpers of your 3c505 board.\n",dev->name); |
dev | 1444 | drivers/net/3c505.c | dev->name, dev->irq); |
dev | 1451 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr) & ~CMDE, dev->base_addr); |
dev | 1457 | drivers/net/3c505.c | dev->dev_addr[i] = adapter.rx_pcb.data.eth_addr[i]; |
dev | 1464 | drivers/net/3c505.c | dev->name, dev->base_addr, dev->irq, |
dev | 1465 | drivers/net/3c505.c | dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], |
dev | 1466 | drivers/net/3c505.c | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); |
dev | 1471 | drivers/net/3c505.c | request_region(dev->base_addr, ELP_IO_EXTENT, "3c505"); |
dev | 1476 | drivers/net/3c505.c | elp_init(dev); |
dev | 162 | drivers/net/3c507.c | #define SCB_BASE ((unsigned)64*1024 - (dev->mem_end - dev->mem_start)) |
dev | 197 | drivers/net/3c507.c | #define RX_BUF_END (dev->mem_end - dev->mem_start) |
dev | 278 | drivers/net/3c507.c | extern int el16_probe(struct device *dev); /* Called from Space.c */ |
dev | 280 | drivers/net/3c507.c | static int el16_probe1(struct device *dev, int ioaddr); |
dev | 281 | drivers/net/3c507.c | static int el16_open(struct device *dev); |
dev | 282 | drivers/net/3c507.c | static int el16_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 284 | drivers/net/3c507.c | static void el16_rx(struct device *dev); |
dev | 285 | drivers/net/3c507.c | static int el16_close(struct device *dev); |
dev | 286 | drivers/net/3c507.c | static struct enet_statistics *el16_get_stats(struct device *dev); |
dev | 288 | drivers/net/3c507.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 289 | drivers/net/3c507.c | void init_82586_mem(struct device *dev); |
dev | 304 | drivers/net/3c507.c | el16_probe(struct device *dev) |
dev | 306 | drivers/net/3c507.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 310 | drivers/net/3c507.c | return el16_probe1(dev, base_addr); |
dev | 318 | drivers/net/3c507.c | if (el16_probe1(dev, ioaddr) == 0) |
dev | 325 | drivers/net/3c507.c | int el16_probe1(struct device *dev, int ioaddr) |
dev | 351 | drivers/net/3c507.c | if (dev == NULL) |
dev | 352 | drivers/net/3c507.c | dev = init_etherdev(0, sizeof(struct net_local)); |
dev | 357 | drivers/net/3c507.c | printk("%s: 3c507 at %#x,", dev->name, ioaddr); |
dev | 372 | drivers/net/3c507.c | dev->base_addr = ioaddr; |
dev | 376 | drivers/net/3c507.c | dev->dev_addr[i] = inb(ioaddr + i); |
dev | 377 | drivers/net/3c507.c | printk(" %02x", dev->dev_addr[i]); |
dev | 380 | drivers/net/3c507.c | if ((dev->mem_start & 0xf) > 0) |
dev | 381 | drivers/net/3c507.c | net_debug = dev->mem_start & 7; |
dev | 384 | drivers/net/3c507.c | dev->mem_start = MEM_BASE; |
dev | 385 | drivers/net/3c507.c | dev->mem_end = dev->mem_start + 0x10000; |
dev | 399 | drivers/net/3c507.c | dev->mem_start = base; |
dev | 400 | drivers/net/3c507.c | dev->mem_end = base + size; |
dev | 404 | drivers/net/3c507.c | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; |
dev | 405 | drivers/net/3c507.c | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; |
dev | 407 | drivers/net/3c507.c | printk(", IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->irq, |
dev | 408 | drivers/net/3c507.c | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); |
dev | 414 | drivers/net/3c507.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 415 | drivers/net/3c507.c | if (dev->priv == NULL) |
dev | 417 | drivers/net/3c507.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 419 | drivers/net/3c507.c | dev->open = el16_open; |
dev | 420 | drivers/net/3c507.c | dev->stop = el16_close; |
dev | 421 | drivers/net/3c507.c | dev->hard_start_xmit = el16_send_packet; |
dev | 422 | drivers/net/3c507.c | dev->get_stats = el16_get_stats; |
dev | 424 | drivers/net/3c507.c | ether_setup(dev); /* Generic ethernet behaviour */ |
dev | 426 | drivers/net/3c507.c | dev->flags&=~IFF_MULTICAST; /* Multicast doesn't work */ |
dev | 434 | drivers/net/3c507.c | el16_open(struct device *dev) |
dev | 436 | drivers/net/3c507.c | irq2dev_map[dev->irq] = dev; |
dev | 439 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 441 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 442 | drivers/net/3c507.c | dev->interrupt = 0; |
dev | 443 | drivers/net/3c507.c | dev->start = 1; |
dev | 451 | drivers/net/3c507.c | el16_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 453 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 454 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 455 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 457 | drivers/net/3c507.c | if (dev->tbusy) { |
dev | 460 | drivers/net/3c507.c | int tickssofar = jiffies - dev->trans_start; |
dev | 464 | drivers/net/3c507.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 471 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 479 | drivers/net/3c507.c | dev->tbusy=0; |
dev | 480 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 487 | drivers/net/3c507.c | dev_tint(dev); |
dev | 492 | drivers/net/3c507.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 493 | drivers/net/3c507.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 500 | drivers/net/3c507.c | hardware_send_packet(dev, buf, length); |
dev | 501 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 518 | drivers/net/3c507.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 524 | drivers/net/3c507.c | if (dev == NULL) { |
dev | 528 | drivers/net/3c507.c | dev->interrupt = 1; |
dev | 530 | drivers/net/3c507.c | ioaddr = dev->base_addr; |
dev | 531 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
dev | 532 | drivers/net/3c507.c | shmem = ((ushort*)dev->mem_start); |
dev | 537 | drivers/net/3c507.c | printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); |
dev | 554 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 575 | drivers/net/3c507.c | el16_rx(dev); |
dev | 581 | drivers/net/3c507.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 584 | drivers/net/3c507.c | dev->name, status); |
dev | 591 | drivers/net/3c507.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 597 | drivers/net/3c507.c | dev->name, status); |
dev | 598 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 616 | drivers/net/3c507.c | el16_close(struct device *dev) |
dev | 618 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 619 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 621 | drivers/net/3c507.c | dev->tbusy = 1; |
dev | 622 | drivers/net/3c507.c | dev->start = 0; |
dev | 634 | drivers/net/3c507.c | irq2dev_map[dev->irq] = 0; |
dev | 646 | drivers/net/3c507.c | el16_get_stats(struct device *dev) |
dev | 648 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 657 | drivers/net/3c507.c | init_rx_bufs(struct device *dev) |
dev | 659 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 668 | drivers/net/3c507.c | write_ptr = (unsigned short *)(dev->mem_start + cur_rxbuf); |
dev | 696 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
dev | 703 | drivers/net/3c507.c | init_82586_mem(struct device *dev) |
dev | 705 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 706 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 707 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 718 | drivers/net/3c507.c | memcpy((void*)dev->mem_end-10, init_words, 10); |
dev | 721 | drivers/net/3c507.c | memcpy((char*)dev->mem_start, init_words + 5, sizeof(init_words) - 10); |
dev | 724 | drivers/net/3c507.c | memcpy((char*)dev->mem_start+SA_OFFSET, dev->dev_addr, |
dev | 725 | drivers/net/3c507.c | sizeof(dev->dev_addr)); |
dev | 731 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 745 | drivers/net/3c507.c | "cmd %04x.\n", dev->name, |
dev | 756 | drivers/net/3c507.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 762 | drivers/net/3c507.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 764 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 765 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 767 | drivers/net/3c507.c | ushort *write_ptr = (ushort *)(dev->mem_start + tx_block); |
dev | 790 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
dev | 800 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
dev | 804 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 808 | drivers/net/3c507.c | el16_rx(struct device *dev) |
dev | 810 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 811 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 818 | drivers/net/3c507.c | ushort *read_frame = (short *)(dev->mem_start + rx_head); |
dev | 822 | drivers/net/3c507.c | ushort *data_frame = (short *)(dev->mem_start + data_buffer_addr); |
dev | 828 | drivers/net/3c507.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 846 | drivers/net/3c507.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 852 | drivers/net/3c507.c | skb->dev = dev; |
dev | 857 | drivers/net/3c507.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 866 | drivers/net/3c507.c | *(short*)(dev->mem_start + rx_tail + 2) = 0x0000; |
dev | 103 | drivers/net/3c509.c | static int el3_open(struct device *dev); |
dev | 104 | drivers/net/3c509.c | static int el3_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 106 | drivers/net/3c509.c | static void update_stats(int addr, struct device *dev); |
dev | 107 | drivers/net/3c509.c | static struct enet_statistics *el3_get_stats(struct device *dev); |
dev | 108 | drivers/net/3c509.c | static int el3_rx(struct device *dev); |
dev | 109 | drivers/net/3c509.c | static int el3_close(struct device *dev); |
dev | 110 | drivers/net/3c509.c | static void set_multicast_list(struct device *dev); |
dev | 114 | drivers/net/3c509.c | int el3_probe(struct device *dev) |
dev | 118 | drivers/net/3c509.c | short *phys_addr = (short *)dev->dev_addr; |
dev | 212 | drivers/net/3c509.c | if (dev->base_addr != 0 |
dev | 213 | drivers/net/3c509.c | && dev->base_addr != (unsigned short)ioaddr) { |
dev | 230 | drivers/net/3c509.c | dev->base_addr = ioaddr; |
dev | 231 | drivers/net/3c509.c | dev->irq = irq; |
dev | 232 | drivers/net/3c509.c | dev->if_port = if_port; |
dev | 233 | drivers/net/3c509.c | request_region(dev->base_addr, EL3_IO_EXTENT, "3c509"); |
dev | 238 | drivers/net/3c509.c | dev->name, dev->base_addr, current_tag, if_names[dev->if_port]); |
dev | 243 | drivers/net/3c509.c | printk(" %2.2x", dev->dev_addr[i]); |
dev | 244 | drivers/net/3c509.c | printk(", IRQ %d.\n", dev->irq); |
dev | 247 | drivers/net/3c509.c | dev->priv = kmalloc(sizeof(struct el3_private), GFP_KERNEL); |
dev | 248 | drivers/net/3c509.c | if (dev->priv == NULL) |
dev | 250 | drivers/net/3c509.c | memset(dev->priv, 0, sizeof(struct el3_private)); |
dev | 256 | drivers/net/3c509.c | dev->open = &el3_open; |
dev | 257 | drivers/net/3c509.c | dev->hard_start_xmit = &el3_start_xmit; |
dev | 258 | drivers/net/3c509.c | dev->stop = &el3_close; |
dev | 259 | drivers/net/3c509.c | dev->get_stats = &el3_get_stats; |
dev | 260 | drivers/net/3c509.c | dev->set_multicast_list = &set_multicast_list; |
dev | 263 | drivers/net/3c509.c | ether_setup(dev); |
dev | 306 | drivers/net/3c509.c | el3_open(struct device *dev) |
dev | 308 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 315 | drivers/net/3c509.c | if (request_irq(dev->irq, &el3_interrupt, 0, "3c509", NULL)) { |
dev | 321 | drivers/net/3c509.c | printk("%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, |
dev | 322 | drivers/net/3c509.c | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); |
dev | 327 | drivers/net/3c509.c | irq2dev_map[dev->irq] = dev; |
dev | 330 | drivers/net/3c509.c | outw((dev->irq << 12) | 0x0f00, ioaddr + WN0_IRQ); |
dev | 336 | drivers/net/3c509.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 338 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 341 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 362 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 363 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 364 | drivers/net/3c509.c | dev->start = 1; |
dev | 375 | drivers/net/3c509.c | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); |
dev | 382 | drivers/net/3c509.c | el3_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 384 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 385 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 388 | drivers/net/3c509.c | if (dev->tbusy) { |
dev | 389 | drivers/net/3c509.c | int tickssofar = jiffies - dev->trans_start; |
dev | 393 | drivers/net/3c509.c | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS)); |
dev | 394 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 398 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 402 | drivers/net/3c509.c | dev_tint(dev); |
dev | 411 | drivers/net/3c509.c | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); |
dev | 419 | drivers/net/3c509.c | " Tx %2.2x Rx %4.4x.\n", dev->name, status, |
dev | 431 | drivers/net/3c509.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 432 | drivers/net/3c509.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 440 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 442 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 469 | drivers/net/3c509.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 473 | drivers/net/3c509.c | if (dev == NULL) { |
dev | 478 | drivers/net/3c509.c | if (dev->interrupt) |
dev | 479 | drivers/net/3c509.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 480 | drivers/net/3c509.c | dev->interrupt = 1; |
dev | 482 | drivers/net/3c509.c | ioaddr = dev->base_addr; |
dev | 486 | drivers/net/3c509.c | printk("%s: interrupt, status %4.4x.\n", dev->name, status); |
dev | 491 | drivers/net/3c509.c | el3_rx(dev); |
dev | 498 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 502 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 506 | drivers/net/3c509.c | dev->name, status); |
dev | 517 | drivers/net/3c509.c | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, |
dev | 521 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 527 | drivers/net/3c509.c | el3_get_stats(struct device *dev) |
dev | 529 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 534 | drivers/net/3c509.c | update_stats(dev->base_addr, dev); |
dev | 544 | drivers/net/3c509.c | static void update_stats(int ioaddr, struct device *dev) |
dev | 546 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 573 | drivers/net/3c509.c | el3_rx(struct device *dev) |
dev | 575 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 576 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 603 | drivers/net/3c509.c | skb->dev = dev; |
dev | 610 | drivers/net/3c509.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 617 | drivers/net/3c509.c | dev->name, pkt_len); |
dev | 633 | drivers/net/3c509.c | static void set_multicast_list(struct device *dev) |
dev | 635 | drivers/net/3c509.c | short ioaddr = dev->base_addr; |
dev | 638 | drivers/net/3c509.c | if (old != dev->mc_count) { |
dev | 639 | drivers/net/3c509.c | old = dev->mc_count; |
dev | 640 | drivers/net/3c509.c | printk("%s: Setting Rx mode to %d addresses.\n", dev->name, dev->mc_count); |
dev | 643 | drivers/net/3c509.c | if (dev->flags&IFF_PROMISC) |
dev | 648 | drivers/net/3c509.c | else if (dev->mc_count || (dev->flags&IFF_ALLMULTI)) |
dev | 657 | drivers/net/3c509.c | el3_close(struct device *dev) |
dev | 659 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 662 | drivers/net/3c509.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 664 | drivers/net/3c509.c | dev->tbusy = 1; |
dev | 665 | drivers/net/3c509.c | dev->start = 0; |
dev | 674 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 677 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 683 | drivers/net/3c509.c | free_irq(dev->irq, NULL); |
dev | 690 | drivers/net/3c509.c | irq2dev_map[dev->irq] = 0; |
dev | 692 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 232 | drivers/net/3c59x.c | static int vortex_scan(struct device *dev); |
dev | 233 | drivers/net/3c59x.c | static int vortex_found_device(struct device *dev, int ioaddr, int irq, |
dev | 235 | drivers/net/3c59x.c | static int vortex_probe1(struct device *dev); |
dev | 236 | drivers/net/3c59x.c | static int vortex_open(struct device *dev); |
dev | 238 | drivers/net/3c59x.c | static int vortex_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 239 | drivers/net/3c59x.c | static int vortex_rx(struct device *dev); |
dev | 241 | drivers/net/3c59x.c | static int vortex_close(struct device *dev); |
dev | 242 | drivers/net/3c59x.c | static void update_stats(int addr, struct device *dev); |
dev | 243 | drivers/net/3c59x.c | static struct enet_statistics *vortex_get_stats(struct device *dev); |
dev | 244 | drivers/net/3c59x.c | static void set_multicast_list(struct device *dev); |
dev | 286 | drivers/net/3c59x.c | unsigned long tc59x_probe(struct device *dev) |
dev | 290 | drivers/net/3c59x.c | cards_found = vortex_scan(dev); |
dev | 299 | drivers/net/3c59x.c | static int vortex_scan(struct device *dev) |
dev | 349 | drivers/net/3c59x.c | vortex_found_device(dev, pci_ioaddr, pci_irq_line, index, |
dev | 350 | drivers/net/3c59x.c | dev && dev->mem_start ? dev->mem_start |
dev | 352 | drivers/net/3c59x.c | dev = 0; |
dev | 368 | drivers/net/3c59x.c | vortex_found_device(dev, ioaddr, inw(ioaddr + 0xC88) >> 12, |
dev | 369 | drivers/net/3c59x.c | DEMON_INDEX, dev && dev->mem_start |
dev | 370 | drivers/net/3c59x.c | ? dev->mem_start : options[cards_found]); |
dev | 371 | drivers/net/3c59x.c | dev = 0; |
dev | 379 | drivers/net/3c59x.c | static int vortex_found_device(struct device *dev, int ioaddr, int irq, |
dev | 389 | drivers/net/3c59x.c | dev = (struct device *) kmalloc(dev_size, GFP_KERNEL); |
dev | 390 | drivers/net/3c59x.c | memset(dev, 0, dev_size); |
dev | 391 | drivers/net/3c59x.c | dev->priv = ((void *)dev) + sizeof(struct device); |
dev | 392 | drivers/net/3c59x.c | vp = (struct vortex_private *)dev->priv; |
dev | 393 | drivers/net/3c59x.c | dev->name = vp->devname; /* An empty string. */ |
dev | 394 | drivers/net/3c59x.c | dev->base_addr = ioaddr; |
dev | 395 | drivers/net/3c59x.c | dev->irq = irq; |
dev | 396 | drivers/net/3c59x.c | dev->init = vortex_probe1; |
dev | 408 | drivers/net/3c59x.c | ether_setup(dev); |
dev | 410 | drivers/net/3c59x.c | root_vortex_dev = dev; |
dev | 411 | drivers/net/3c59x.c | if (register_netdev(dev) != 0) |
dev | 414 | drivers/net/3c59x.c | if (dev) { |
dev | 415 | drivers/net/3c59x.c | dev->priv = kmalloc(sizeof (struct vortex_private), GFP_KERNEL); |
dev | 416 | drivers/net/3c59x.c | memset(dev->priv, 0, sizeof (struct vortex_private)); |
dev | 418 | drivers/net/3c59x.c | dev = init_etherdev(dev, sizeof(struct vortex_private)); |
dev | 419 | drivers/net/3c59x.c | dev->base_addr = ioaddr; |
dev | 420 | drivers/net/3c59x.c | dev->irq = irq; |
dev | 421 | drivers/net/3c59x.c | vp = (struct vortex_private *)dev->priv; |
dev | 434 | drivers/net/3c59x.c | vortex_probe1(dev); |
dev | 439 | drivers/net/3c59x.c | static int vortex_probe1(struct device *dev) |
dev | 441 | drivers/net/3c59x.c | int ioaddr = dev->base_addr; |
dev | 442 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 445 | drivers/net/3c59x.c | printk("%s: 3Com %s at %#3x,", dev->name, |
dev | 451 | drivers/net/3c59x.c | short *phys_addr = (short *)dev->dev_addr; |
dev | 463 | drivers/net/3c59x.c | printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); |
dev | 464 | drivers/net/3c59x.c | printk(", IRQ %d\n", dev->irq); |
dev | 466 | drivers/net/3c59x.c | if (vortex_debug && (dev->irq <= 0 || dev->irq > 15)) |
dev | 483 | drivers/net/3c59x.c | dev->if_port = config.u.xcvr; |
dev | 491 | drivers/net/3c59x.c | dev->open = &vortex_open; |
dev | 492 | drivers/net/3c59x.c | dev->hard_start_xmit = &vortex_start_xmit; |
dev | 493 | drivers/net/3c59x.c | dev->stop = &vortex_close; |
dev | 494 | drivers/net/3c59x.c | dev->get_stats = &vortex_get_stats; |
dev | 495 | drivers/net/3c59x.c | dev->set_multicast_list = &set_multicast_list; |
dev | 497 | drivers/net/3c59x.c | dev->set_mac_address = &set_mac_address; |
dev | 505 | drivers/net/3c59x.c | vortex_open(struct device *dev) |
dev | 507 | drivers/net/3c59x.c | int ioaddr = dev->base_addr; |
dev | 508 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 521 | drivers/net/3c59x.c | dev->name, vp->media_override, if_names[vp->media_override]); |
dev | 523 | drivers/net/3c59x.c | dev->if_port = vp->media_override; |
dev | 529 | drivers/net/3c59x.c | dev->name, config.i); |
dev | 546 | drivers/net/3c59x.c | i = request_shared_irq(dev->irq, &vortex_interrupt, dev, vp->product_name); |
dev | 550 | drivers/net/3c59x.c | if (dev->irq == 0 || irq2dev_map[dev->irq] != NULL) |
dev | 552 | drivers/net/3c59x.c | irq2dev_map[dev->irq] = dev; |
dev | 553 | drivers/net/3c59x.c | if (request_irq(dev->irq, &vortex_interrupt, 0, vp->product_name, NULL)) { |
dev | 554 | drivers/net/3c59x.c | irq2dev_map[dev->irq] = NULL; |
dev | 562 | drivers/net/3c59x.c | dev->name, dev->irq, inw(ioaddr + Wn4_Media)); |
dev | 568 | drivers/net/3c59x.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 572 | drivers/net/3c59x.c | if (dev->if_port == 3) |
dev | 575 | drivers/net/3c59x.c | else if (dev->if_port == 0) { |
dev | 599 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 600 | drivers/net/3c59x.c | dev->interrupt = 0; |
dev | 601 | drivers/net/3c59x.c | dev->start = 1; |
dev | 620 | drivers/net/3c59x.c | vp->timer.data = (unsigned long)dev; |
dev | 629 | drivers/net/3c59x.c | struct device *dev = (struct device *)data; |
dev | 631 | drivers/net/3c59x.c | printk("%s: Media selection timer tick happened.\n", dev->name); |
dev | 636 | drivers/net/3c59x.c | vortex_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 638 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 639 | drivers/net/3c59x.c | int ioaddr = dev->base_addr; |
dev | 642 | drivers/net/3c59x.c | if (dev->tbusy) { |
dev | 643 | drivers/net/3c59x.c | int tickssofar = jiffies - dev->trans_start; |
dev | 647 | drivers/net/3c59x.c | dev->name, inb(ioaddr + TxStatus), inw(ioaddr + EL3_STATUS)); |
dev | 658 | drivers/net/3c59x.c | dev->trans_start = jiffies; |
dev | 659 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 665 | drivers/net/3c59x.c | dev->name); |
dev | 666 | drivers/net/3c59x.c | dev_tint(dev); |
dev | 673 | drivers/net/3c59x.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 674 | drivers/net/3c59x.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 692 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 702 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 708 | drivers/net/3c59x.c | dev->trans_start = jiffies; |
dev | 719 | drivers/net/3c59x.c | dev->name, tx_status); |
dev | 742 | drivers/net/3c59x.c | struct device *dev = (struct device *)(irq == 0 ? regs : irq2dev_map[irq]); |
dev | 744 | drivers/net/3c59x.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 751 | drivers/net/3c59x.c | if (dev == NULL) { |
dev | 756 | drivers/net/3c59x.c | if (dev->interrupt) |
dev | 757 | drivers/net/3c59x.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 758 | drivers/net/3c59x.c | dev->interrupt = 1; |
dev | 760 | drivers/net/3c59x.c | ioaddr = dev->base_addr; |
dev | 762 | drivers/net/3c59x.c | lp = (struct vortex_private *)dev->priv; |
dev | 767 | drivers/net/3c59x.c | printk("%s: interrupt, status %4.4x, timer %d.\n", dev->name, |
dev | 776 | drivers/net/3c59x.c | dev->name, status, dev->start); |
dev | 777 | drivers/net/3c59x.c | free_irq(dev->irq, NULL); |
dev | 784 | drivers/net/3c59x.c | dev->name, status); |
dev | 786 | drivers/net/3c59x.c | vortex_rx(dev); |
dev | 793 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 799 | drivers/net/3c59x.c | dev->tbusy = 0; |
dev | 806 | drivers/net/3c59x.c | vortex_rx(dev); |
dev | 812 | drivers/net/3c59x.c | printk("%s: Updating stats.\n", dev->name); |
dev | 813 | drivers/net/3c59x.c | update_stats(ioaddr, dev); |
dev | 820 | drivers/net/3c59x.c | " interrupt source.\n", dev->name); |
dev | 837 | drivers/net/3c59x.c | | (dev->flags & IFF_ALLMULTI ? RxMulticast : 0) |
dev | 838 | drivers/net/3c59x.c | | (dev->flags & IFF_PROMISC ? RxProm : 0), |
dev | 848 | drivers/net/3c59x.c | dev->name, status, SetStatusEnb | ((~status) & 0xFE)); |
dev | 860 | drivers/net/3c59x.c | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, status); |
dev | 862 | drivers/net/3c59x.c | dev->interrupt = 0; |
dev | 867 | drivers/net/3c59x.c | vortex_rx(struct device *dev) |
dev | 869 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 870 | drivers/net/3c59x.c | int ioaddr = dev->base_addr; |
dev | 898 | drivers/net/3c59x.c | skb->dev = dev; |
dev | 903 | drivers/net/3c59x.c | skb->protocol = eth_type_trans(skb, dev); |
dev | 914 | drivers/net/3c59x.c | dev->name, pkt_len); |
dev | 928 | drivers/net/3c59x.c | vortex_close(struct device *dev) |
dev | 930 | drivers/net/3c59x.c | int ioaddr = dev->base_addr; |
dev | 932 | drivers/net/3c59x.c | dev->start = 0; |
dev | 933 | drivers/net/3c59x.c | dev->tbusy = 1; |
dev | 937 | drivers/net/3c59x.c | dev->name, inw(ioaddr + EL3_STATUS), inb(ioaddr + TxStatus)); |
dev | 946 | drivers/net/3c59x.c | if (dev->if_port == 3) |
dev | 949 | drivers/net/3c59x.c | else if (dev->if_port == 0) { |
dev | 956 | drivers/net/3c59x.c | free_shared_irq(dev->irq, dev); |
dev | 958 | drivers/net/3c59x.c | free_irq(dev->irq, NULL); |
dev | 960 | drivers/net/3c59x.c | irq2dev_map[dev->irq] = 0; |
dev | 963 | drivers/net/3c59x.c | update_stats(ioaddr, dev); |
dev | 972 | drivers/net/3c59x.c | vortex_get_stats(struct device *dev) |
dev | 974 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 979 | drivers/net/3c59x.c | update_stats(dev->base_addr, dev); |
dev | 991 | drivers/net/3c59x.c | static void update_stats(int ioaddr, struct device *dev) |
dev | 993 | drivers/net/3c59x.c | struct vortex_private *vp = (struct vortex_private *)dev->priv; |
dev | 1025 | drivers/net/3c59x.c | set_multicast_list(struct device *dev) |
dev | 1027 | drivers/net/3c59x.c | short ioaddr = dev->base_addr; |
dev | 1029 | drivers/net/3c59x.c | if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { |
dev | 1033 | drivers/net/3c59x.c | dev->name, dev->mc_count); |
dev | 1035 | drivers/net/3c59x.c | } else if (dev->flags & IFF_PROMISC) { |
dev | 101 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev); |
dev | 102 | drivers/net/8390.c | static void ei_receive(struct device *dev); |
dev | 103 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev); |
dev | 106 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 108 | drivers/net/8390.c | static void set_multicast_list(struct device *dev); |
dev | 115 | drivers/net/8390.c | int ei_open(struct device *dev) |
dev | 117 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 121 | drivers/net/8390.c | printk(KERN_EMERG "%s: ei_open passed a non-existent device!\n", dev->name); |
dev | 125 | drivers/net/8390.c | irq2dev_map[dev->irq] = dev; |
dev | 126 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 127 | drivers/net/8390.c | dev->start = 1; |
dev | 133 | drivers/net/8390.c | int ei_close(struct device *dev) |
dev | 135 | drivers/net/8390.c | NS8390_init(dev, 0); |
dev | 136 | drivers/net/8390.c | dev->start = 0; |
dev | 140 | drivers/net/8390.c | static int ei_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 142 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 143 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 152 | drivers/net/8390.c | if (dev->tbusy) { /* Do timeouts, just like the 8003 driver. */ |
dev | 154 | drivers/net/8390.c | int tickssofar = jiffies - dev->trans_start; |
dev | 159 | drivers/net/8390.c | if (dev->start == 0) { |
dev | 160 | drivers/net/8390.c | printk("%s: xmit on stopped card\n", dev->name); |
dev | 165 | drivers/net/8390.c | dev->name, (txsr & ENTSR_ABT) ? "excess collisions." : |
dev | 174 | drivers/net/8390.c | ei_reset_8390(dev); |
dev | 175 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 176 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 183 | drivers/net/8390.c | dev_tint(dev); |
dev | 193 | drivers/net/8390.c | if (dev->interrupt) { |
dev | 194 | drivers/net/8390.c | printk("%s: Tx request while isr active.\n",dev->name); |
dev | 209 | drivers/net/8390.c | dev->name, ei_local->tx2, ei_local->lasttx, |
dev | 216 | drivers/net/8390.c | dev->name, ei_local->tx1, ei_local->lasttx, |
dev | 221 | drivers/net/8390.c | dev->name, dev->interrupt, ei_local->tx1, |
dev | 224 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 228 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, output_page); |
dev | 231 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, output_page); |
dev | 232 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 240 | drivers/net/8390.c | dev->tbusy = (ei_local->tx1 && ei_local->tx2); |
dev | 242 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, ei_local->tx_start_page); |
dev | 244 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, ei_local->tx_start_page); |
dev | 245 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 246 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 262 | drivers/net/8390.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 267 | drivers/net/8390.c | if (dev == NULL) { |
dev | 271 | drivers/net/8390.c | e8390_base = dev->base_addr; |
dev | 272 | drivers/net/8390.c | ei_local = (struct ei_device *) dev->priv; |
dev | 273 | drivers/net/8390.c | if (dev->interrupt || ei_local->irqlock) { |
dev | 278 | drivers/net/8390.c | dev->name, inb_p(e8390_base + EN0_ISR), |
dev | 283 | drivers/net/8390.c | dev->interrupt = 1; |
dev | 288 | drivers/net/8390.c | printk("%s: interrupt(isr=%#2.2x).\n", dev->name, |
dev | 294 | drivers/net/8390.c | if (dev->start == 0) { |
dev | 295 | drivers/net/8390.c | printk("%s: interrupt from stopped card\n", dev->name); |
dev | 300 | drivers/net/8390.c | ei_rx_overrun(dev); |
dev | 303 | drivers/net/8390.c | ei_receive(dev); |
dev | 307 | drivers/net/8390.c | ei_tx_intr(dev); |
dev | 332 | drivers/net/8390.c | dev->name, interrupts); |
dev | 335 | drivers/net/8390.c | printk("%s: unknown interrupt %#2x\n", dev->name, interrupts); |
dev | 339 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 345 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev) |
dev | 347 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 349 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 360 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 363 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6); |
dev | 364 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 374 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 377 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page); |
dev | 378 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 385 | drivers/net/8390.c | dev->name, ei_local->lasttx); |
dev | 388 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 409 | drivers/net/8390.c | static void ei_receive(struct device *dev) |
dev | 411 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 412 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 435 | drivers/net/8390.c | dev->name, this_frame, ei_local->current_page); |
dev | 441 | drivers/net/8390.c | ei_get_8390_hdr(dev, &rx_frame, this_frame); |
dev | 463 | drivers/net/8390.c | dev->name, rx_frame.count, rx_frame.status, |
dev | 473 | drivers/net/8390.c | dev->name, pkt_len); |
dev | 478 | drivers/net/8390.c | skb->dev = dev; |
dev | 480 | drivers/net/8390.c | ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame)); |
dev | 481 | drivers/net/8390.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 489 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, |
dev | 498 | drivers/net/8390.c | printk("%s: next frame inconsistency, %#2x\n", dev->name, |
dev | 521 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev) |
dev | 523 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 525 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 531 | drivers/net/8390.c | printk("%s: Receiver overrun.\n", dev->name); |
dev | 544 | drivers/net/8390.c | dev->name); |
dev | 545 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 550 | drivers/net/8390.c | ei_receive(dev); |
dev | 558 | drivers/net/8390.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 560 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 561 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 564 | drivers/net/8390.c | if (dev->start == 0) return &ei_local->stat; |
dev | 578 | drivers/net/8390.c | static void set_multicast_list(struct device *dev) |
dev | 580 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 582 | drivers/net/8390.c | if(dev->flags&IFF_PROMISC) |
dev | 586 | drivers/net/8390.c | else if((dev->flags&IFF_ALLMULTI)||dev->mc_list) |
dev | 597 | drivers/net/8390.c | int ethdev_init(struct device *dev) |
dev | 602 | drivers/net/8390.c | if (dev->priv == NULL) { |
dev | 605 | drivers/net/8390.c | dev->priv = kmalloc(sizeof(struct ei_device), GFP_KERNEL); |
dev | 606 | drivers/net/8390.c | if (dev->priv == NULL) |
dev | 608 | drivers/net/8390.c | memset(dev->priv, 0, sizeof(struct ei_device)); |
dev | 609 | drivers/net/8390.c | ei_local = (struct ei_device *)dev->priv; |
dev | 613 | drivers/net/8390.c | dev->hard_start_xmit = &ei_start_xmit; |
dev | 614 | drivers/net/8390.c | dev->get_stats = get_stats; |
dev | 615 | drivers/net/8390.c | dev->set_multicast_list = &set_multicast_list; |
dev | 617 | drivers/net/8390.c | ether_setup(dev); |
dev | 625 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp) |
dev | 627 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 628 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 659 | drivers/net/8390.c | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS + i); |
dev | 669 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 670 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 680 | drivers/net/8390.c | dev->set_multicast_list(dev); /* Get the multicast status right if this |
dev | 687 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 690 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 696 | drivers/net/8390.c | dev->name); |
dev | 31 | drivers/net/8390.h | extern int ethif_init(struct device *dev); |
dev | 32 | drivers/net/8390.h | extern int ethdev_init(struct device *dev); |
dev | 33 | drivers/net/8390.h | extern void NS8390_init(struct device *dev, int startp); |
dev | 34 | drivers/net/8390.h | extern int ei_open(struct device *dev); |
dev | 35 | drivers/net/8390.h | extern int ei_close(struct device *dev); |
dev | 79 | drivers/net/8390.h | #define ei_status (*(struct ei_device *)(dev->priv)) |
dev | 41 | drivers/net/Space.c | extern int hp100_probe(struct device *dev); |
dev | 42 | drivers/net/Space.c | extern int ultra_probe(struct device *dev); |
dev | 43 | drivers/net/Space.c | extern int wd_probe(struct device *dev); |
dev | 44 | drivers/net/Space.c | extern int el2_probe(struct device *dev); |
dev | 45 | drivers/net/Space.c | extern int ne_probe(struct device *dev); |
dev | 46 | drivers/net/Space.c | extern int hp_probe(struct device *dev); |
dev | 47 | drivers/net/Space.c | extern int hp_plus_probe(struct device *dev); |
dev | 80 | drivers/net/Space.c | ethif_probe(struct device *dev) |
dev | 82 | drivers/net/Space.c | u_long base_addr = dev->base_addr; |
dev | 89 | drivers/net/Space.c | && tc59x_probe(dev) |
dev | 92 | drivers/net/Space.c | && seeq8005_probe(dev) |
dev | 95 | drivers/net/Space.c | && hp100_probe(dev) |
dev | 98 | drivers/net/Space.c | && ultra_probe(dev) |
dev | 101 | drivers/net/Space.c | && smc9_init(dev) |
dev | 104 | drivers/net/Space.c | && wd_probe(dev) |
dev | 107 | drivers/net/Space.c | && el2_probe(dev) |
dev | 110 | drivers/net/Space.c | && hp_probe(dev) |
dev | 113 | drivers/net/Space.c | && hp_plus_probe(dev) |
dev | 116 | drivers/net/Space.c | && ac3200_probe(dev) |
dev | 119 | drivers/net/Space.c | && e2100_probe(dev) |
dev | 122 | drivers/net/Space.c | && ne_probe(dev) |
dev | 125 | drivers/net/Space.c | && at1500_probe(dev) |
dev | 128 | drivers/net/Space.c | && at1700_probe(dev) |
dev | 131 | drivers/net/Space.c | && eth16i_probe(dev) /* ICL EtherTeam 16i/32 */ |
dev | 134 | drivers/net/Space.c | && el3_probe(dev) |
dev | 137 | drivers/net/Space.c | && znet_probe(dev) |
dev | 140 | drivers/net/Space.c | && express_probe(dev) |
dev | 143 | drivers/net/Space.c | && eepro_probe(dev) |
dev | 146 | drivers/net/Space.c | && depca_probe(dev) |
dev | 149 | drivers/net/Space.c | && ewrk3_probe(dev) |
dev | 152 | drivers/net/Space.c | && de4x5_probe(dev) |
dev | 155 | drivers/net/Space.c | && apricot_probe(dev) |
dev | 158 | drivers/net/Space.c | && el1_probe(dev) |
dev | 161 | drivers/net/Space.c | && wavelan_probe(dev) |
dev | 164 | drivers/net/Space.c | && el16_probe(dev) |
dev | 167 | drivers/net/Space.c | && elplus_probe(dev) |
dev | 170 | drivers/net/Space.c | && de600_probe(dev) |
dev | 173 | drivers/net/Space.c | && de620_probe(dev) |
dev | 176 | drivers/net/Space.c | && SK_init(dev) |
dev | 179 | drivers/net/Space.c | && ni52_probe(dev) |
dev | 209 | drivers/net/Space.c | extern int arcnet_probe(struct device *dev); |
dev | 271 | drivers/net/Space.c | extern int dummy_init(struct device *dev); |
dev | 279 | drivers/net/Space.c | extern int eql_init(struct device *dev); |
dev | 296 | drivers/net/Space.c | extern int tok_probe(struct device *dev); |
dev | 366 | drivers/net/Space.c | extern int loopback_init(struct device *dev); |
dev | 70 | drivers/net/ac3200.c | int ac3200_probe(struct device *dev); |
dev | 71 | drivers/net/ac3200.c | static int ac_probe1(int ioaddr, struct device *dev); |
dev | 73 | drivers/net/ac3200.c | static int ac_open(struct device *dev); |
dev | 74 | drivers/net/ac3200.c | static void ac_reset_8390(struct device *dev); |
dev | 75 | drivers/net/ac3200.c | static void ac_block_input(struct device *dev, int count, |
dev | 77 | drivers/net/ac3200.c | static void ac_block_output(struct device *dev, const int count, |
dev | 79 | drivers/net/ac3200.c | static void ac_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 82 | drivers/net/ac3200.c | static int ac_close_card(struct device *dev); |
dev | 91 | drivers/net/ac3200.c | int ac3200_probe(struct device *dev) |
dev | 93 | drivers/net/ac3200.c | unsigned short ioaddr = dev->base_addr; |
dev | 96 | drivers/net/ac3200.c | return ac_probe1(ioaddr, dev); |
dev | 107 | drivers/net/ac3200.c | if (ac_probe1(ioaddr, dev) == 0) |
dev | 114 | drivers/net/ac3200.c | static int ac_probe1(int ioaddr, struct device *dev) |
dev | 146 | drivers/net/ac3200.c | if (dev == NULL) { |
dev | 148 | drivers/net/ac3200.c | dev = init_etherdev(0, 0); |
dev | 152 | drivers/net/ac3200.c | dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i); |
dev | 162 | drivers/net/ac3200.c | if (dev->irq == 0) |
dev | 163 | drivers/net/ac3200.c | dev->irq = config2irq(inb(ioaddr + AC_CONFIG)); |
dev | 164 | drivers/net/ac3200.c | else if (dev->irq == 2) |
dev | 165 | drivers/net/ac3200.c | dev->irq = 9; |
dev | 167 | drivers/net/ac3200.c | if (request_irq(dev->irq, ei_interrupt, 0, "ac3200", NULL)) { |
dev | 168 | drivers/net/ac3200.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 173 | drivers/net/ac3200.c | if (ethdev_init(dev)) { |
dev | 175 | drivers/net/ac3200.c | free_irq(dev->irq, NULL); |
dev | 181 | drivers/net/ac3200.c | dev->base_addr = ioaddr; |
dev | 184 | drivers/net/ac3200.c | if (dev->mem_start) { /* Override the value from the board. */ |
dev | 186 | drivers/net/ac3200.c | if (addrmap[i] == dev->mem_start) |
dev | 194 | drivers/net/ac3200.c | dev->if_port = inb(ioaddr + AC_CONFIG) >> 6; |
dev | 195 | drivers/net/ac3200.c | dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG)); |
dev | 196 | drivers/net/ac3200.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 197 | drivers/net/ac3200.c | dev->mem_end = dev->rmem_end = dev->mem_start |
dev | 207 | drivers/net/ac3200.c | dev->name, ioaddr, dev->irq, port_name[dev->if_port], |
dev | 208 | drivers/net/ac3200.c | dev->mem_start, dev->mem_end-1); |
dev | 218 | drivers/net/ac3200.c | dev->open = &ac_open; |
dev | 219 | drivers/net/ac3200.c | dev->stop = &ac_close_card; |
dev | 220 | drivers/net/ac3200.c | NS8390_init(dev, 0); |
dev | 224 | drivers/net/ac3200.c | static int ac_open(struct device *dev) |
dev | 228 | drivers/net/ac3200.c | int ioaddr = dev->base_addr; |
dev | 230 | drivers/net/ac3200.c | if (request_irq(dev->irq, ei_interrupt, 0, "ac3200", NULL)) |
dev | 234 | drivers/net/ac3200.c | ei_open(dev); |
dev | 241 | drivers/net/ac3200.c | static void ac_reset_8390(struct device *dev) |
dev | 243 | drivers/net/ac3200.c | ushort ioaddr = dev->base_addr; |
dev | 260 | drivers/net/ac3200.c | ac_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 262 | drivers/net/ac3200.c | unsigned long hdr_start = dev->mem_start + ((ring_page - AC_START_PG)<<8); |
dev | 269 | drivers/net/ac3200.c | static void ac_block_input(struct device *dev, int count, struct sk_buff *skb, |
dev | 272 | drivers/net/ac3200.c | unsigned long xfer_start = dev->mem_start + ring_offset - (AC_START_PG<<8); |
dev | 274 | drivers/net/ac3200.c | if (xfer_start + count > dev->rmem_end) { |
dev | 276 | drivers/net/ac3200.c | int semi_count = dev->rmem_end - xfer_start; |
dev | 279 | drivers/net/ac3200.c | memcpy_fromio(skb->data + semi_count, dev->rmem_start, count); |
dev | 286 | drivers/net/ac3200.c | static void ac_block_output(struct device *dev, int count, |
dev | 289 | drivers/net/ac3200.c | unsigned long shmem = dev->mem_start + ((start_page - AC_START_PG)<<8); |
dev | 294 | drivers/net/ac3200.c | static int ac_close_card(struct device *dev) |
dev | 296 | drivers/net/ac3200.c | dev->start = 0; |
dev | 297 | drivers/net/ac3200.c | dev->tbusy = 1; |
dev | 300 | drivers/net/ac3200.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 305 | drivers/net/ac3200.c | free_irq(dev->irq, NULL); |
dev | 306 | drivers/net/ac3200.c | irq2dev_map[dev->irq] = 0; |
dev | 309 | drivers/net/ac3200.c | ei_close(dev); |
dev | 339 | drivers/net/ac3200.c | struct device *dev = &dev_ac32[this_dev]; |
dev | 340 | drivers/net/ac3200.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 341 | drivers/net/ac3200.c | dev->irq = irq[this_dev]; |
dev | 342 | drivers/net/ac3200.c | dev->base_addr = io[this_dev]; |
dev | 343 | drivers/net/ac3200.c | dev->mem_start = mem[this_dev]; /* Currently ignored by driver */ |
dev | 344 | drivers/net/ac3200.c | dev->init = ac3200_probe; |
dev | 347 | drivers/net/ac3200.c | if (register_netdev(dev) != 0) { |
dev | 364 | drivers/net/ac3200.c | struct device *dev = &dev_ac32[this_dev]; |
dev | 365 | drivers/net/ac3200.c | if (dev->priv != NULL) { |
dev | 366 | drivers/net/ac3200.c | kfree(dev->priv); |
dev | 367 | drivers/net/ac3200.c | dev->priv = NULL; |
dev | 369 | drivers/net/ac3200.c | free_irq(dev->irq, NULL); |
dev | 370 | drivers/net/ac3200.c | irq2dev_map[dev->irq] = NULL; |
dev | 371 | drivers/net/ac3200.c | release_region(dev->base_addr, AC_IO_EXTENT); |
dev | 372 | drivers/net/ac3200.c | unregister_netdev(dev); |
dev | 184 | drivers/net/apricot.c | static int i596_open(struct device *dev); |
dev | 185 | drivers/net/apricot.c | static int i596_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 187 | drivers/net/apricot.c | static int i596_close(struct device *dev); |
dev | 188 | drivers/net/apricot.c | static struct enet_statistics *i596_get_stats(struct device *dev); |
dev | 189 | drivers/net/apricot.c | static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd); |
dev | 191 | drivers/net/apricot.c | static void set_multicast_list(struct device *dev); |
dev | 195 | drivers/net/apricot.c | init_rx_bufs(struct device *dev, int num) |
dev | 197 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 203 | drivers/net/apricot.c | if (i596_debug > 1) printk ("%s: init_rx_bufs %d.\n", dev->name, num); |
dev | 233 | drivers/net/apricot.c | remove_rx_bufs(struct device *dev) |
dev | 235 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 250 | drivers/net/apricot.c | init_i596_mem(struct device *dev) |
dev | 252 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 253 | drivers/net/apricot.c | short ioaddr = dev->base_addr; |
dev | 273 | drivers/net/apricot.c | if (i596_debug > 2) printk("%s: starting i82596.\n", dev->name); |
dev | 283 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 291 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
dev | 293 | drivers/net/apricot.c | memcpy (lp->eth_addr, dev->dev_addr, 6); |
dev | 295 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_add); |
dev | 298 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->tdr); |
dev | 305 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 325 | drivers/net/apricot.c | i596_rx(struct device *dev) |
dev | 327 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 346 | drivers/net/apricot.c | printk ("%s: i596_rx Memory squeeze, dropping packet.\n", dev->name); |
dev | 351 | drivers/net/apricot.c | skb->dev = dev; |
dev | 354 | drivers/net/apricot.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 442 | drivers/net/apricot.c | i596_reset(struct device *dev, struct i596_private *lp, int ioaddr) |
dev | 456 | drivers/net/apricot.c | dev->start = 0; |
dev | 457 | drivers/net/apricot.c | dev->tbusy = 1; |
dev | 474 | drivers/net/apricot.c | i596_rx(dev); |
dev | 476 | drivers/net/apricot.c | dev->start = 1; |
dev | 477 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 478 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 479 | drivers/net/apricot.c | init_i596_mem(dev); |
dev | 482 | drivers/net/apricot.c | static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd) |
dev | 484 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 485 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 526 | drivers/net/apricot.c | printk("%s: command unit timed out, status resetting.\n", dev->name); |
dev | 528 | drivers/net/apricot.c | i596_reset(dev, lp, ioaddr); |
dev | 533 | drivers/net/apricot.c | i596_open(struct device *dev) |
dev | 538 | drivers/net/apricot.c | printk("%s: i596_open() irq %d.\n", dev->name, dev->irq); |
dev | 540 | drivers/net/apricot.c | if (request_irq(dev->irq, &i596_interrupt, 0, "apricot", NULL)) |
dev | 543 | drivers/net/apricot.c | irq2dev_map[dev->irq] = dev; |
dev | 545 | drivers/net/apricot.c | i = init_rx_bufs(dev, RX_RING_SIZE); |
dev | 547 | drivers/net/apricot.c | if ((i = init_rx_bufs(dev, RX_RING_SIZE)) < RX_RING_SIZE) |
dev | 548 | drivers/net/apricot.c | printk("%s: only able to allocate %d receive buffers\n", dev->name, i); |
dev | 552 | drivers/net/apricot.c | free_irq(dev->irq, NULL); |
dev | 553 | drivers/net/apricot.c | irq2dev_map[dev->irq] = 0; |
dev | 557 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 558 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 559 | drivers/net/apricot.c | dev->start = 1; |
dev | 563 | drivers/net/apricot.c | init_i596_mem(dev); |
dev | 569 | drivers/net/apricot.c | i596_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 571 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 572 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 575 | drivers/net/apricot.c | if (i596_debug > 2) printk ("%s: Apricot start xmit\n", dev->name); |
dev | 578 | drivers/net/apricot.c | if (dev->tbusy) { |
dev | 579 | drivers/net/apricot.c | int tickssofar = jiffies - dev->trans_start; |
dev | 583 | drivers/net/apricot.c | dev->name); |
dev | 590 | drivers/net/apricot.c | i596_reset(dev,lp, ioaddr); |
dev | 600 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 601 | drivers/net/apricot.c | dev->trans_start = jiffies; |
dev | 608 | drivers/net/apricot.c | dev_tint(dev); |
dev | 615 | drivers/net/apricot.c | if (i596_debug > 3) printk("%s: i596_start_xmit() called\n", dev->name); |
dev | 619 | drivers/net/apricot.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 620 | drivers/net/apricot.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 624 | drivers/net/apricot.c | dev->trans_start = jiffies; |
dev | 629 | drivers/net/apricot.c | printk ("%s: i596_xmit Memory squeeze, dropping packet.\n", dev->name); |
dev | 650 | drivers/net/apricot.c | i596_add_cmd(dev, (struct i596_cmd *)tx_cmd); |
dev | 656 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 678 | drivers/net/apricot.c | int apricot_probe(struct device *dev) |
dev | 712 | drivers/net/apricot.c | dev->base_addr = ioaddr; |
dev | 713 | drivers/net/apricot.c | ether_setup(dev); |
dev | 714 | drivers/net/apricot.c | printk("%s: Apricot 82596 at %#3x,", dev->name, ioaddr); |
dev | 717 | drivers/net/apricot.c | printk(" %2.2X", dev->dev_addr[i] = eth_addr[i]); |
dev | 719 | drivers/net/apricot.c | dev->base_addr = ioaddr; |
dev | 720 | drivers/net/apricot.c | dev->irq = 10; |
dev | 721 | drivers/net/apricot.c | printk(" IRQ %d.\n", dev->irq); |
dev | 726 | drivers/net/apricot.c | dev->open = &i596_open; |
dev | 727 | drivers/net/apricot.c | dev->stop = &i596_close; |
dev | 728 | drivers/net/apricot.c | dev->hard_start_xmit = &i596_start_xmit; |
dev | 729 | drivers/net/apricot.c | dev->get_stats = &i596_get_stats; |
dev | 730 | drivers/net/apricot.c | dev->set_multicast_list = &set_multicast_list; |
dev | 732 | drivers/net/apricot.c | dev->mem_start = (int)kmalloc(sizeof(struct i596_private)+ 0x0f, GFP_KERNEL); |
dev | 734 | drivers/net/apricot.c | dev->priv = (void *)((dev->mem_start + 0xf) & 0xfffffff0); |
dev | 736 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
dev | 748 | drivers/net/apricot.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 754 | drivers/net/apricot.c | if (dev == NULL) { |
dev | 759 | drivers/net/apricot.c | if (i596_debug > 3) printk ("%s: i596_interrupt(): irq %d\n",dev->name, irq); |
dev | 761 | drivers/net/apricot.c | if (dev->interrupt) |
dev | 762 | drivers/net/apricot.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 764 | drivers/net/apricot.c | dev->interrupt = 1; |
dev | 766 | drivers/net/apricot.c | ioaddr = dev->base_addr; |
dev | 768 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
dev | 773 | drivers/net/apricot.c | printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command); |
dev | 779 | drivers/net/apricot.c | printk("%s: i596 interrupt, status %4.4x.\n", dev->name, status); |
dev | 788 | drivers/net/apricot.c | printk("%s: i596 interrupt completed command.\n", dev->name); |
dev | 790 | drivers/net/apricot.c | printk("%s: i596 interrupt command unit inactive %x.\n", dev->name, status & 0x0700); |
dev | 842 | drivers/net/apricot.c | printk("%s: link ok.\n", dev->name); |
dev | 847 | drivers/net/apricot.c | printk("%s: Transceiver problem.\n", dev->name); |
dev | 849 | drivers/net/apricot.c | printk("%s: Termination problem.\n", dev->name); |
dev | 851 | drivers/net/apricot.c | printk("%s: Short circuit.\n", dev->name); |
dev | 853 | drivers/net/apricot.c | printk("%s: Time %ld.\n", dev->name, status & 0x07ff); |
dev | 870 | drivers/net/apricot.c | if ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (dev->start)) ack_cmd |= CUC_START; |
dev | 877 | drivers/net/apricot.c | printk("%s: i596 interrupt received a frame.\n", dev->name); |
dev | 879 | drivers/net/apricot.c | printk("%s: i596 interrupt receive unit inactive %x.\n", dev->name, status & 0x0070); |
dev | 881 | drivers/net/apricot.c | i596_rx(dev); |
dev | 883 | drivers/net/apricot.c | if (dev->start) ack_cmd |= RX_START; |
dev | 895 | drivers/net/apricot.c | printk("%s: i596 interrupt, timeout status %4.4x command %4.4x.\n", dev->name, lp->scb.status, lp->scb.command); |
dev | 905 | drivers/net/apricot.c | printk("%s: exiting interrupt.\n", dev->name); |
dev | 907 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 912 | drivers/net/apricot.c | i596_close(struct device *dev) |
dev | 914 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 915 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 918 | drivers/net/apricot.c | dev->start = 0; |
dev | 919 | drivers/net/apricot.c | dev->tbusy = 1; |
dev | 923 | drivers/net/apricot.c | dev->name, lp->scb.status); |
dev | 934 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 937 | drivers/net/apricot.c | free_irq(dev->irq, NULL); |
dev | 938 | drivers/net/apricot.c | irq2dev_map[dev->irq] = 0; |
dev | 939 | drivers/net/apricot.c | remove_rx_bufs(dev); |
dev | 946 | drivers/net/apricot.c | i596_get_stats(struct device *dev) |
dev | 948 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 957 | drivers/net/apricot.c | static void set_multicast_list(struct device *dev) |
dev | 959 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 963 | drivers/net/apricot.c | printk ("%s: set multicast list %d\n", dev->name, dev->mc_count); |
dev | 965 | drivers/net/apricot.c | if (dev->mc_count > 0) |
dev | 969 | drivers/net/apricot.c | cmd = (struct i596_cmd *) kmalloc(sizeof(struct i596_cmd)+2+dev->mc_count*6, GFP_ATOMIC); |
dev | 972 | drivers/net/apricot.c | printk ("%s: set_multicast Memory squeeze.\n", dev->name); |
dev | 976 | drivers/net/apricot.c | *((unsigned short *) (cmd + 1)) = dev->mc_count * 6; |
dev | 978 | drivers/net/apricot.c | for(dmi=dev->mc_list;dmi!=NULL;dmi=dmi->next) |
dev | 984 | drivers/net/apricot.c | i596_add_cmd(dev, cmd); |
dev | 990 | drivers/net/apricot.c | if (dev->mc_count == 0 && !(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) |
dev | 992 | drivers/net/apricot.c | if(dev->flags&IFF_ALLMULTI) |
dev | 993 | drivers/net/apricot.c | dev->flags|=IFF_PROMISC; |
dev | 999 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
dev | 344 | drivers/net/arcnet.c | dev->name , ## args) |
dev | 586 | drivers/net/arcnet.c | static void arcnet_dump_skb(struct device *dev,struct sk_buff *skb, |
dev | 589 | drivers/net/arcnet.c | # define arcnet_dump_skb(dev,skb,desc) ; |
dev | 593 | drivers/net/arcnet.c | static void arcnet_dump_packet(struct device *dev,u_char *buffer,int ext, |
dev | 596 | drivers/net/arcnet.c | # define arcnet_dump_packet(dev,buffer,ext,desc) ; |
dev | 599 | drivers/net/arcnet.c | extern int arcnet_probe(struct device *dev); |
dev | 600 | drivers/net/arcnet.c | static int arcnet_found(struct device *dev,int port,int airq,u_long shmem); |
dev | 602 | drivers/net/arcnet.c | static void arcnet_setup(struct device *dev); |
dev | 603 | drivers/net/arcnet.c | static int arcnet_open(struct device *dev); |
dev | 604 | drivers/net/arcnet.c | static int arcnet_close(struct device *dev); |
dev | 605 | drivers/net/arcnet.c | static int arcnet_reset(struct device *dev,int reset_delay); |
dev | 607 | drivers/net/arcnet.c | static int arcnet_send_packet_bad(struct sk_buff *skb,struct device *dev); |
dev | 608 | drivers/net/arcnet.c | static int arcnetA_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 609 | drivers/net/arcnet.c | static void arcnetA_continue_tx(struct device *dev); |
dev | 610 | drivers/net/arcnet.c | static void arcnetAS_prepare_tx(struct device *dev,u_char *hdr,int hdrlen, |
dev | 612 | drivers/net/arcnet.c | static int arcnet_go_tx(struct device *dev,int enable_irq); |
dev | 615 | drivers/net/arcnet.c | static void arcnet_inthandler(struct device *dev); |
dev | 617 | drivers/net/arcnet.c | static void arcnet_rx(struct device *dev,int recbuf); |
dev | 618 | drivers/net/arcnet.c | static void arcnetA_rx(struct device *dev,u_char *buf, |
dev | 621 | drivers/net/arcnet.c | static struct enet_statistics *arcnet_get_stats(struct device *dev); |
dev | 623 | drivers/net/arcnet.c | int arcnetA_header(struct sk_buff *skb,struct device *dev, |
dev | 625 | drivers/net/arcnet.c | int arcnetA_rebuild_header(void *eth,struct device *dev,unsigned long raddr, |
dev | 627 | drivers/net/arcnet.c | unsigned short arcnetA_type_trans(struct sk_buff *skb,struct device *dev); |
dev | 631 | drivers/net/arcnet.c | static int arcnetE_init(struct device *dev); |
dev | 632 | drivers/net/arcnet.c | static int arcnetE_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 633 | drivers/net/arcnet.c | static void arcnetE_rx(struct device *dev,u_char *arcsoft, |
dev | 639 | drivers/net/arcnet.c | static int arcnetS_init(struct device *dev); |
dev | 640 | drivers/net/arcnet.c | static int arcnetS_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 641 | drivers/net/arcnet.c | static void arcnetS_rx(struct device *dev,u_char *buf, |
dev | 643 | drivers/net/arcnet.c | int arcnetS_header(struct sk_buff *skb,struct device *dev, |
dev | 645 | drivers/net/arcnet.c | int arcnetS_rebuild_header(void *eth,struct device *dev,unsigned long raddr, |
dev | 647 | drivers/net/arcnet.c | unsigned short arcnetS_type_trans(struct sk_buff *skb,struct device *dev); |
dev | 655 | drivers/net/arcnet.c | #define tx_done(dev) 1 |
dev | 669 | drivers/net/arcnet.c | void arcnet_dump_skb(struct device *dev,struct sk_buff *skb,char *desc) |
dev | 676 | drivers/net/arcnet.c | printk(KERN_DEBUG "%6s: skb dump (%s) follows:",dev->name,desc); |
dev | 692 | drivers/net/arcnet.c | void arcnet_dump_packet(struct device *dev,u_char *buffer,int ext,char *desc) |
dev | 699 | drivers/net/arcnet.c | printk(KERN_DEBUG "%6s: packet dump (%s) follows:",dev->name,desc); |
dev | 728 | drivers/net/arcnet.c | int arcnet_probe(struct device *dev) |
dev | 772 | drivers/net/arcnet.c | dev->base_addr,dev->irq,dev->mem_start); |
dev | 774 | drivers/net/arcnet.c | if (dev->base_addr > 0x1ff) /* Check a single specified port */ |
dev | 776 | drivers/net/arcnet.c | ports[0]=dev->base_addr; |
dev | 779 | drivers/net/arcnet.c | else if (dev->base_addr > 0) /* Don't probe at all. */ |
dev | 782 | drivers/net/arcnet.c | if (dev->mem_start) |
dev | 784 | drivers/net/arcnet.c | shmems[0]=dev->mem_start; |
dev | 996 | drivers/net/arcnet.c | if (!dev->irq) |
dev | 1021 | drivers/net/arcnet.c | airq=dev->irq; |
dev | 1060 | drivers/net/arcnet.c | retval=arcnet_found(dev,*port,airq,*shmem); |
dev | 1101 | drivers/net/arcnet.c | int arcnet_found(struct device *dev,int port,int airq, u_long shmem) |
dev | 1108 | drivers/net/arcnet.c | dev->base_addr=port; |
dev | 1117 | drivers/net/arcnet.c | irq2dev_map[airq]=dev; |
dev | 1118 | drivers/net/arcnet.c | dev->irq=airq; |
dev | 1132 | drivers/net/arcnet.c | dev->mem_start=(u_long)first_mirror; |
dev | 1133 | drivers/net/arcnet.c | dev->mem_end=(u_long)last_mirror+MIRROR_SIZE-1; |
dev | 1134 | drivers/net/arcnet.c | dev->rmem_start=dev->mem_start+BUFFER_SIZE*0; |
dev | 1135 | drivers/net/arcnet.c | dev->rmem_end=dev->mem_start+BUFFER_SIZE*2-1; |
dev | 1139 | drivers/net/arcnet.c | dev->priv = kmalloc(sizeof(struct arcnet_local), GFP_KERNEL); |
dev | 1140 | drivers/net/arcnet.c | if (dev->priv == NULL) |
dev | 1147 | drivers/net/arcnet.c | memset(dev->priv,0,sizeof(struct arcnet_local)); |
dev | 1148 | drivers/net/arcnet.c | lp=(struct arcnet_local *)(dev->priv); |
dev | 1150 | drivers/net/arcnet.c | dev->open=arcnet_open; |
dev | 1151 | drivers/net/arcnet.c | dev->stop=arcnet_close; |
dev | 1152 | drivers/net/arcnet.c | dev->hard_start_xmit=arcnetA_send_packet; |
dev | 1153 | drivers/net/arcnet.c | dev->get_stats=arcnet_get_stats; |
dev | 1159 | drivers/net/arcnet.c | arcnet_setup(dev); |
dev | 1162 | drivers/net/arcnet.c | dev->mtu=1500; /* completely arbitrary - agrees with ether, though */ |
dev | 1163 | drivers/net/arcnet.c | dev->hard_header_len=sizeof(struct ClientData); |
dev | 1164 | drivers/net/arcnet.c | dev->hard_header=arcnetA_header; |
dev | 1165 | drivers/net/arcnet.c | dev->rebuild_header=arcnetA_rebuild_header; |
dev | 1182 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->stationid; |
dev | 1187 | drivers/net/arcnet.c | dev->base_addr,dev->irq,dev->mem_start, |
dev | 1188 | drivers/net/arcnet.c | dev->mem_end-dev->mem_start+1); |
dev | 1201 | drivers/net/arcnet.c | int arcnet_reset(struct device *dev,int reset_delay) |
dev | 1203 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
dev | 1204 | drivers/net/arcnet.c | short ioaddr=dev->base_addr; |
dev | 1213 | drivers/net/arcnet.c | dev->name,inb(STATUS)); |
dev | 1226 | drivers/net/arcnet.c | cardmem = (u_char *) dev->mem_start; |
dev | 1243 | drivers/net/arcnet.c | memset((void *)dev->mem_start,0x42,2048); |
dev | 1269 | drivers/net/arcnet.c | void arcnet_setup(struct device *dev) |
dev | 1273 | drivers/net/arcnet.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 1275 | drivers/net/arcnet.c | dev->broadcast[0] = 0x00; /* for us, broadcasts are address 0 */ |
dev | 1276 | drivers/net/arcnet.c | dev->addr_len = 1; |
dev | 1277 | drivers/net/arcnet.c | dev->type = ARPHRD_ARCNET; |
dev | 1278 | drivers/net/arcnet.c | dev->tx_queue_len = 30; /* fairly long queue - arcnet is |
dev | 1283 | drivers/net/arcnet.c | dev->flags = IFF_BROADCAST; |
dev | 1284 | drivers/net/arcnet.c | dev->family = AF_INET; |
dev | 1285 | drivers/net/arcnet.c | dev->pa_addr = 0; |
dev | 1286 | drivers/net/arcnet.c | dev->pa_brdaddr = 0; |
dev | 1287 | drivers/net/arcnet.c | dev->pa_mask = 0; |
dev | 1288 | drivers/net/arcnet.c | dev->pa_alen = 4; |
dev | 1307 | drivers/net/arcnet.c | arcnet_open(struct device *dev) |
dev | 1309 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1310 | drivers/net/arcnet.c | int ioaddr=dev->base_addr; |
dev | 1312 | drivers/net/arcnet.c | if (dev->metric>=1000) |
dev | 1314 | drivers/net/arcnet.c | arcnet_debug=dev->metric-1000; |
dev | 1315 | drivers/net/arcnet.c | printk(KERN_INFO "%6s: debug level set to %d\n",dev->name,arcnet_debug); |
dev | 1316 | drivers/net/arcnet.c | dev->metric=1; |
dev | 1325 | drivers/net/arcnet.c | if (arcnet_reset(dev,0) && arcnet_reset(dev,1)) |
dev | 1330 | drivers/net/arcnet.c | if (arcnet_reset(dev,1) && arcnet_reset(dev,1)) |
dev | 1334 | drivers/net/arcnet.c | dev->tbusy=0; |
dev | 1335 | drivers/net/arcnet.c | dev->interrupt=0; |
dev | 1340 | drivers/net/arcnet.c | lp->adev=dev; |
dev | 1348 | drivers/net/arcnet.c | memcpy(lp->edev,dev,sizeof(struct device)); |
dev | 1355 | drivers/net/arcnet.c | sprintf(lp->edev->name,"%se",dev->name); |
dev | 1365 | drivers/net/arcnet.c | memcpy(lp->sdev,dev,sizeof(struct device)); |
dev | 1367 | drivers/net/arcnet.c | sprintf(lp->sdev->name,"%ss",dev->name); |
dev | 1397 | drivers/net/arcnet.c | arcnet_close(struct device *dev) |
dev | 1399 | drivers/net/arcnet.c | int ioaddr = dev->base_addr; |
dev | 1400 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1458 | drivers/net/arcnet.c | arcnet_send_packet_bad(struct sk_buff *skb, struct device *dev) |
dev | 1460 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1461 | drivers/net/arcnet.c | int ioaddr=dev->base_addr; |
dev | 1484 | drivers/net/arcnet.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1535 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
dev | 1537 | drivers/net/arcnet.c | dev_tint(dev); |
dev | 1548 | drivers/net/arcnet.c | arcnet_inthandler(dev); /* fake an interrupt */ |
dev | 1558 | drivers/net/arcnet.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 1561 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
dev | 1574 | drivers/net/arcnet.c | arcnetA_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1576 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1577 | drivers/net/arcnet.c | int ioaddr=dev->base_addr,bad; |
dev | 1582 | drivers/net/arcnet.c | bad=arcnet_send_packet_bad(skb,dev); |
dev | 1595 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"tx"); |
dev | 1609 | drivers/net/arcnet.c | arcnetAS_prepare_tx(dev, |
dev | 1620 | drivers/net/arcnet.c | if (arcnet_go_tx(dev,1)) |
dev | 1641 | drivers/net/arcnet.c | arcnet_go_tx(dev,1); |
dev | 1648 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 1649 | drivers/net/arcnet.c | if (arcnet_go_tx(dev,1)) |
dev | 1651 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 1652 | drivers/net/arcnet.c | arcnet_go_tx(dev,1); |
dev | 1669 | drivers/net/arcnet.c | dev->trans_start=jiffies; |
dev | 1684 | drivers/net/arcnet.c | static void arcnetA_continue_tx(struct device *dev) |
dev | 1686 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1687 | drivers/net/arcnet.c | int ioaddr=dev->base_addr,maxsegsize=XMTU-4; |
dev | 1717 | drivers/net/arcnet.c | arcnetAS_prepare_tx(dev,((char *)out->hdr)+EXTRA_CLIENTDATA, |
dev | 1731 | drivers/net/arcnet.c | arcnetAS_prepare_tx(struct device *dev,u_char *hdr,int hdrlen, |
dev | 1734 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1737 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
dev | 1754 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
dev | 1822 | drivers/net/arcnet.c | BUGLVL(D_TX) arcnet_dump_packet(dev,arcpacket->raw,length>MTU,"tx"); |
dev | 1838 | drivers/net/arcnet.c | arcnet_go_tx(struct device *dev,int enable_irq) |
dev | 1840 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
dev | 1841 | drivers/net/arcnet.c | int ioaddr=dev->base_addr; |
dev | 1889 | drivers/net/arcnet.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 1892 | drivers/net/arcnet.c | if (dev==NULL) |
dev | 1904 | drivers/net/arcnet.c | ioaddr=dev->base_addr; |
dev | 1905 | drivers/net/arcnet.c | if (!dev->start) |
dev | 1913 | drivers/net/arcnet.c | arcnet_inthandler(dev); |
dev | 1921 | drivers/net/arcnet.c | arcnet_inthandler(struct device *dev) |
dev | 1923 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
dev | 1924 | drivers/net/arcnet.c | int ioaddr=dev->base_addr, status, boguscount = 3, didsomething; |
dev | 1951 | drivers/net/arcnet.c | arcnet_reset(dev,0); |
dev | 1970 | drivers/net/arcnet.c | arcnet_rx(dev,!recbuf); |
dev | 2007 | drivers/net/arcnet.c | arcnet_go_tx(dev,0); |
dev | 2036 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 2037 | drivers/net/arcnet.c | arcnet_go_tx(dev,0); |
dev | 2065 | drivers/net/arcnet.c | arcnet_go_tx(dev,0); |
dev | 2164 | drivers/net/arcnet.c | arcnet_rx(struct device *dev,int recbuf) |
dev | 2166 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2167 | drivers/net/arcnet.c | int ioaddr = dev->base_addr; |
dev | 2169 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+recbuf*512); |
dev | 2236 | drivers/net/arcnet.c | BUGLVL(D_RX) arcnet_dump_packet(dev,arcpacket->raw,length>240,"rx"); |
dev | 2256 | drivers/net/arcnet.c | arcnetA_rx(struct device *dev,u_char *buf, |
dev | 2259 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2311 | drivers/net/arcnet.c | skb->dev = dev; |
dev | 2356 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"rx"); |
dev | 2358 | drivers/net/arcnet.c | skb->protocol=arcnetA_type_trans(skb,dev); |
dev | 2442 | drivers/net/arcnet.c | skb->dev=dev; |
dev | 2517 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"rx"); |
dev | 2519 | drivers/net/arcnet.c | skb->protocol=arcnetA_type_trans(skb,dev); |
dev | 2542 | drivers/net/arcnet.c | arcnet_get_stats(struct device *dev) |
dev | 2544 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2557 | drivers/net/arcnet.c | set_multicast_list(struct device *dev) |
dev | 2560 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 2562 | drivers/net/arcnet.c | short ioaddr = dev->base_addr; |
dev | 2576 | drivers/net/arcnet.c | int arcnetA_header(struct sk_buff *skb,struct device *dev, |
dev | 2580 | drivers/net/arcnet.c | skb_push(skb,dev->hard_header_len); |
dev | 2581 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 2627 | drivers/net/arcnet.c | head->saddr=((u_char*)(dev->dev_addr))[0]; |
dev | 2636 | drivers/net/arcnet.c | return dev->hard_header_len; |
dev | 2641 | drivers/net/arcnet.c | return -dev->hard_header_len; |
dev | 2650 | drivers/net/arcnet.c | int arcnetA_rebuild_header(void *buff,struct device *dev,unsigned long dst, |
dev | 2654 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 2678 | drivers/net/arcnet.c | status=arp_find(&(head->daddr), dst, dev, dev->pa_addr, skb)? 1 : 0; |
dev | 2692 | drivers/net/arcnet.c | unsigned short arcnetA_type_trans(struct sk_buff *skb,struct device *dev) |
dev | 2695 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
dev | 2699 | drivers/net/arcnet.c | skb_pull(skb,dev->hard_header_len); |
dev | 2704 | drivers/net/arcnet.c | else if (dev->flags&IFF_PROMISC) |
dev | 2707 | drivers/net/arcnet.c | if (head->daddr != dev->dev_addr[0]) |
dev | 2742 | drivers/net/arcnet.c | static int arcnetE_init(struct device *dev) |
dev | 2744 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2746 | drivers/net/arcnet.c | ether_setup(dev); /* we're emulating ether here, not ARCnet */ |
dev | 2747 | drivers/net/arcnet.c | dev->dev_addr[0]=0; |
dev | 2748 | drivers/net/arcnet.c | dev->dev_addr[5]=lp->stationid; |
dev | 2749 | drivers/net/arcnet.c | dev->mtu=512-sizeof(struct HardHeader)-dev->hard_header_len-1; |
dev | 2750 | drivers/net/arcnet.c | dev->open=NULL; |
dev | 2751 | drivers/net/arcnet.c | dev->stop=NULL; |
dev | 2752 | drivers/net/arcnet.c | dev->hard_start_xmit=arcnetE_send_packet; |
dev | 2763 | drivers/net/arcnet.c | arcnetE_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 2765 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2766 | drivers/net/arcnet.c | int ioaddr=dev->base_addr,bad; |
dev | 2768 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
dev | 2774 | drivers/net/arcnet.c | bad=arcnet_send_packet_bad(skb,dev); |
dev | 2801 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
dev | 2842 | drivers/net/arcnet.c | BUGLVL(D_TX) arcnet_dump_packet(dev,arcpacket->raw,length>=240,"tx"); |
dev | 2849 | drivers/net/arcnet.c | if (arcnet_go_tx(dev,1)) |
dev | 2856 | drivers/net/arcnet.c | dev->trans_start=jiffies; |
dev | 2870 | drivers/net/arcnet.c | arcnetE_rx(struct device *dev,u_char *arcsoft, |
dev | 2873 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2887 | drivers/net/arcnet.c | skb->dev = dev; |
dev | 2891 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"rx"); |
dev | 2893 | drivers/net/arcnet.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 2909 | drivers/net/arcnet.c | static int arcnetS_init(struct device *dev) |
dev | 2911 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2913 | drivers/net/arcnet.c | arcnet_setup(dev); |
dev | 2916 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->stationid; |
dev | 2917 | drivers/net/arcnet.c | dev->hard_header_len=sizeof(struct S_ClientData); |
dev | 2918 | drivers/net/arcnet.c | dev->mtu=512-sizeof(struct HardHeader)-dev->hard_header_len |
dev | 2920 | drivers/net/arcnet.c | dev->open=NULL; |
dev | 2921 | drivers/net/arcnet.c | dev->stop=NULL; |
dev | 2922 | drivers/net/arcnet.c | dev->hard_start_xmit=arcnetS_send_packet; |
dev | 2923 | drivers/net/arcnet.c | dev->hard_header=arcnetS_header; |
dev | 2924 | drivers/net/arcnet.c | dev->rebuild_header=arcnetS_rebuild_header; |
dev | 2934 | drivers/net/arcnet.c | arcnetS_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 2936 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2937 | drivers/net/arcnet.c | int ioaddr=dev->base_addr,bad,length; |
dev | 2942 | drivers/net/arcnet.c | bad=arcnet_send_packet_bad(skb,dev); |
dev | 2953 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"tx"); |
dev | 2958 | drivers/net/arcnet.c | arcnetAS_prepare_tx(dev, |
dev | 2968 | drivers/net/arcnet.c | if (arcnet_go_tx(dev,1)) |
dev | 2985 | drivers/net/arcnet.c | dev->trans_start=jiffies; |
dev | 2999 | drivers/net/arcnet.c | arcnetS_rx(struct device *dev,u_char *buf, |
dev | 3002 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 3033 | drivers/net/arcnet.c | skb->dev = dev; /* is already lp->sdev */ |
dev | 3035 | drivers/net/arcnet.c | BUGLVL(D_SKB) arcnet_dump_skb(dev,skb,"rx"); |
dev | 3037 | drivers/net/arcnet.c | skb->protocol=arcnetS_type_trans(skb,dev); |
dev | 3049 | drivers/net/arcnet.c | int arcnetS_header(struct sk_buff *skb,struct device *dev, |
dev | 3053 | drivers/net/arcnet.c | skb_push(skb,dev->hard_header_len); |
dev | 3054 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 3086 | drivers/net/arcnet.c | head->saddr=((u_char*)(dev->dev_addr))[0]; |
dev | 3092 | drivers/net/arcnet.c | return dev->hard_header_len; |
dev | 3097 | drivers/net/arcnet.c | return -dev->hard_header_len; |
dev | 3105 | drivers/net/arcnet.c | int arcnetS_rebuild_header(void *buff,struct device *dev,unsigned long dst, |
dev | 3109 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 3130 | drivers/net/arcnet.c | return arp_find(&(head->daddr), dst, dev, dev->pa_addr, skb)? 1 : 0; |
dev | 3141 | drivers/net/arcnet.c | unsigned short arcnetS_type_trans(struct sk_buff *skb,struct device *dev) |
dev | 3144 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
dev | 3148 | drivers/net/arcnet.c | skb_pull(skb,dev->hard_header_len); |
dev | 3153 | drivers/net/arcnet.c | else if (dev->flags&IFF_PROMISC) |
dev | 3156 | drivers/net/arcnet.c | if (head->daddr != dev->dev_addr[0]) |
dev | 114 | drivers/net/at1700.c | extern int at1700_probe(struct device *dev); |
dev | 116 | drivers/net/at1700.c | static int at1700_probe1(struct device *dev, short ioaddr); |
dev | 118 | drivers/net/at1700.c | static int net_open(struct device *dev); |
dev | 119 | drivers/net/at1700.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 121 | drivers/net/at1700.c | static void net_rx(struct device *dev); |
dev | 122 | drivers/net/at1700.c | static int net_close(struct device *dev); |
dev | 123 | drivers/net/at1700.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 124 | drivers/net/at1700.c | static void set_multicast_list(struct device *dev); |
dev | 140 | drivers/net/at1700.c | at1700_probe(struct device *dev) |
dev | 143 | drivers/net/at1700.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 146 | drivers/net/at1700.c | return at1700_probe1(dev, base_addr); |
dev | 154 | drivers/net/at1700.c | if (at1700_probe1(dev, ioaddr) == 0) |
dev | 170 | drivers/net/at1700.c | int at1700_probe1(struct device *dev, short ioaddr) |
dev | 202 | drivers/net/at1700.c | if (dev == NULL) |
dev | 203 | drivers/net/at1700.c | dev = init_etherdev(0, sizeof(struct net_local)); |
dev | 209 | drivers/net/at1700.c | printk("%s: AT1700 found at %#3x, IRQ %d, address ", dev->name, |
dev | 212 | drivers/net/at1700.c | dev->base_addr = ioaddr; |
dev | 213 | drivers/net/at1700.c | dev->irq = irq; |
dev | 214 | drivers/net/at1700.c | irq2dev_map[irq] = dev; |
dev | 219 | drivers/net/at1700.c | ((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val); |
dev | 232 | drivers/net/at1700.c | dev->if_port = setup_value >> 8; |
dev | 233 | drivers/net/at1700.c | printk(" %s interface.\n", porttype[(dev->if_port>>3) & 3]); |
dev | 239 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 252 | drivers/net/at1700.c | outb(dev->if_port, MODE13); |
dev | 261 | drivers/net/at1700.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 262 | drivers/net/at1700.c | if (dev->priv == NULL) |
dev | 264 | drivers/net/at1700.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 266 | drivers/net/at1700.c | dev->open = net_open; |
dev | 267 | drivers/net/at1700.c | dev->stop = net_close; |
dev | 268 | drivers/net/at1700.c | dev->hard_start_xmit = net_send_packet; |
dev | 269 | drivers/net/at1700.c | dev->get_stats = net_get_stats; |
dev | 270 | drivers/net/at1700.c | dev->set_multicast_list = &set_multicast_list; |
dev | 274 | drivers/net/at1700.c | ether_setup(dev); |
dev | 319 | drivers/net/at1700.c | static int net_open(struct device *dev) |
dev | 321 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 322 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 330 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 354 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 355 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 356 | drivers/net/at1700.c | dev->start = 1; |
dev | 364 | drivers/net/at1700.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 366 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 367 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 369 | drivers/net/at1700.c | if (dev->tbusy) { |
dev | 372 | drivers/net/at1700.c | int tickssofar = jiffies - dev->trans_start; |
dev | 375 | drivers/net/at1700.c | printk("%s: transmit timed out with status %04x, %s?\n", dev->name, |
dev | 379 | drivers/net/at1700.c | dev->name, inw(ioaddr + 0), inw(ioaddr + 2), inw(ioaddr + 4), |
dev | 388 | drivers/net/at1700.c | dev->tbusy=0; |
dev | 389 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 399 | drivers/net/at1700.c | dev_tint(dev); |
dev | 405 | drivers/net/at1700.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 406 | drivers/net/at1700.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 425 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 427 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 430 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 445 | drivers/net/at1700.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 449 | drivers/net/at1700.c | if (dev == NULL) { |
dev | 453 | drivers/net/at1700.c | dev->interrupt = 1; |
dev | 455 | drivers/net/at1700.c | ioaddr = dev->base_addr; |
dev | 456 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
dev | 461 | drivers/net/at1700.c | printk("%s: Interrupt with status %04x.\n", dev->name, status); |
dev | 464 | drivers/net/at1700.c | net_rx(dev); |
dev | 473 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 474 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 480 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 486 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 492 | drivers/net/at1700.c | net_rx(struct device *dev) |
dev | 494 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 495 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 504 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), status); |
dev | 524 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 534 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 541 | drivers/net/at1700.c | skb->dev = dev; |
dev | 545 | drivers/net/at1700.c | skb->protocol=eth_type_trans(skb, dev); |
dev | 567 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), i); |
dev | 573 | drivers/net/at1700.c | static int net_close(struct device *dev) |
dev | 575 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 577 | drivers/net/at1700.c | dev->tbusy = 1; |
dev | 578 | drivers/net/at1700.c | dev->start = 0; |
dev | 596 | drivers/net/at1700.c | net_get_stats(struct device *dev) |
dev | 598 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 614 | drivers/net/at1700.c | set_multicast_list(struct device *dev) |
dev | 616 | drivers/net/at1700.c | short ioaddr = dev->base_addr; |
dev | 617 | drivers/net/at1700.c | if (dev->mc_count || dev->flags&(IFF_PROMISC|IFF_ALLMULTI)) |
dev | 624 | drivers/net/at1700.c | dev->flags|=IFF_PROMISC; |
dev | 128 | drivers/net/atp.c | extern int atp_probe(struct device *dev); |
dev | 130 | drivers/net/atp.c | static int atp_probe1(struct device *dev, short ioaddr); |
dev | 131 | drivers/net/atp.c | static void get_node_ID(struct device *dev); |
dev | 133 | drivers/net/atp.c | static int net_open(struct device *dev); |
dev | 134 | drivers/net/atp.c | static void hardware_init(struct device *dev); |
dev | 137 | drivers/net/atp.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 139 | drivers/net/atp.c | static void net_rx(struct device *dev); |
dev | 141 | drivers/net/atp.c | static int net_close(struct device *dev); |
dev | 142 | drivers/net/atp.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 143 | drivers/net/atp.c | static void set_multicast_list(struct device *dev); |
dev | 153 | drivers/net/atp.c | atp_init(struct device *dev) |
dev | 156 | drivers/net/atp.c | int base_addr = dev->base_addr; |
dev | 159 | drivers/net/atp.c | return atp_probe1(dev, base_addr); |
dev | 168 | drivers/net/atp.c | if (atp_probe1(dev, ioaddr) == 0) |
dev | 175 | drivers/net/atp.c | static int atp_probe1(struct device *dev, short ioaddr) |
dev | 205 | drivers/net/atp.c | dev->irq = 7; |
dev | 207 | drivers/net/atp.c | dev->irq = 5; |
dev | 211 | drivers/net/atp.c | dev->base_addr = ioaddr; |
dev | 214 | drivers/net/atp.c | get_node_ID(dev); |
dev | 217 | drivers/net/atp.c | "%02X:%02X:%02X:%02X:%02X:%02X.\n", dev->name, dev->base_addr, |
dev | 218 | drivers/net/atp.c | dev->irq, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], |
dev | 219 | drivers/net/atp.c | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); |
dev | 228 | drivers/net/atp.c | ether_setup(dev); |
dev | 229 | drivers/net/atp.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 230 | drivers/net/atp.c | if (dev->priv == NULL) |
dev | 232 | drivers/net/atp.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 236 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 241 | drivers/net/atp.c | dev->if_port = (dev->mem_start & 0xf) ? dev->mem_start & 0x7 : 4; |
dev | 242 | drivers/net/atp.c | if (dev->mem_end & 0xf) |
dev | 243 | drivers/net/atp.c | net_debug = dev->mem_end & 7; |
dev | 245 | drivers/net/atp.c | dev->open = net_open; |
dev | 246 | drivers/net/atp.c | dev->stop = net_close; |
dev | 247 | drivers/net/atp.c | dev->hard_start_xmit = net_send_packet; |
dev | 248 | drivers/net/atp.c | dev->get_stats = net_get_stats; |
dev | 249 | drivers/net/atp.c | dev->set_multicast_list = &set_multicast_list; |
dev | 254 | drivers/net/atp.c | atp_timed_dev = dev; |
dev | 261 | drivers/net/atp.c | static void get_node_ID(struct device *dev) |
dev | 263 | drivers/net/atp.c | short ioaddr = dev->base_addr; |
dev | 275 | drivers/net/atp.c | ((unsigned short *)dev->dev_addr)[i] = |
dev | 323 | drivers/net/atp.c | static int net_open(struct device *dev) |
dev | 329 | drivers/net/atp.c | if (irq2dev_map[dev->irq] != 0 |
dev | 330 | drivers/net/atp.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 331 | drivers/net/atp.c | || request_irq(dev->irq, &net_interrupt, 0, "ATP", NULL)) { |
dev | 335 | drivers/net/atp.c | hardware_init(dev); |
dev | 336 | drivers/net/atp.c | dev->start = 1; |
dev | 342 | drivers/net/atp.c | static void hardware_init(struct device *dev) |
dev | 344 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 345 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 351 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 356 | drivers/net/atp.c | printk("%s: Reset: current Rx mode %d.\n", dev->name, |
dev | 374 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 375 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 416 | drivers/net/atp.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 418 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 419 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 421 | drivers/net/atp.c | if (dev->tbusy) { |
dev | 424 | drivers/net/atp.c | int tickssofar = jiffies - dev->trans_start; |
dev | 427 | drivers/net/atp.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 432 | drivers/net/atp.c | hardware_init(dev); |
dev | 433 | drivers/net/atp.c | dev->tbusy=0; |
dev | 434 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 441 | drivers/net/atp.c | dev_tint(dev); |
dev | 447 | drivers/net/atp.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 448 | drivers/net/atp.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 462 | drivers/net/atp.c | write_packet(ioaddr, length, buf, dev->if_port); |
dev | 473 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 489 | drivers/net/atp.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 494 | drivers/net/atp.c | if (dev == NULL) { |
dev | 498 | drivers/net/atp.c | dev->interrupt = 1; |
dev | 500 | drivers/net/atp.c | ioaddr = dev->base_addr; |
dev | 501 | drivers/net/atp.c | lp = (struct net_local *)dev->priv; |
dev | 510 | drivers/net/atp.c | if (net_debug > 5) printk("%s: In interrupt ", dev->name); |
dev | 527 | drivers/net/atp.c | net_rx(dev); |
dev | 532 | drivers/net/atp.c | net_rx(dev); |
dev | 533 | drivers/net/atp.c | dev->last_rx = jiffies; |
dev | 547 | drivers/net/atp.c | hardware_init(dev); |
dev | 563 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 568 | drivers/net/atp.c | && jiffies > dev->last_rx + 100) { |
dev | 571 | drivers/net/atp.c | " status %02x CMR1 %02x.\n", dev->name, |
dev | 572 | drivers/net/atp.c | num_tx_since_rx, jiffies - dev->last_rx, status, |
dev | 575 | drivers/net/atp.c | hardware_init(dev); |
dev | 587 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 605 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 646 | drivers/net/atp.c | static void net_rx(struct device *dev) |
dev | 648 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 649 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 658 | drivers/net/atp.c | read_block(ioaddr, 8, (unsigned char*)&rx_head, dev->if_port); |
dev | 667 | drivers/net/atp.c | dev->name, rx_head.rx_status); |
dev | 668 | drivers/net/atp.c | hardware_init(dev); |
dev | 677 | drivers/net/atp.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 681 | drivers/net/atp.c | skb->dev = dev; |
dev | 683 | drivers/net/atp.c | read_block(ioaddr, pkt_len, skb_put(skb,pkt_len), dev->if_port); |
dev | 694 | drivers/net/atp.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 725 | drivers/net/atp.c | net_close(struct device *dev) |
dev | 727 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 728 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 730 | drivers/net/atp.c | dev->tbusy = 1; |
dev | 731 | drivers/net/atp.c | dev->start = 0; |
dev | 739 | drivers/net/atp.c | free_irq(dev->irq, NULL); |
dev | 740 | drivers/net/atp.c | irq2dev_map[dev->irq] = 0; |
dev | 751 | drivers/net/atp.c | net_get_stats(struct device *dev) |
dev | 753 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 761 | drivers/net/atp.c | static void set_multicast_list(struct device *dev) |
dev | 763 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 764 | drivers/net/atp.c | short ioaddr = dev->base_addr; |
dev | 765 | drivers/net/atp.c | int num_addrs=dev->mc_list; |
dev | 767 | drivers/net/atp.c | if(dev->flags&(IFF_ALLMULTI|IFF_PROMISC)) |
dev | 775 | drivers/net/atp.c | dev->flags|=IFF_PROMISC; |
dev | 531 | drivers/net/de4x5.c | static int de4x5_open(struct device *dev); |
dev | 532 | drivers/net/de4x5.c | static int de4x5_queue_pkt(struct sk_buff *skb, struct device *dev); |
dev | 534 | drivers/net/de4x5.c | static int de4x5_close(struct device *dev); |
dev | 535 | drivers/net/de4x5.c | static struct enet_statistics *de4x5_get_stats(struct device *dev); |
dev | 536 | drivers/net/de4x5.c | static void set_multicast_list(struct device *dev); |
dev | 537 | drivers/net/de4x5.c | static int de4x5_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 542 | drivers/net/de4x5.c | static int de4x5_hw_init(struct device *dev, u_long iobase); |
dev | 543 | drivers/net/de4x5.c | static int de4x5_init(struct device *dev); |
dev | 544 | drivers/net/de4x5.c | static int de4x5_sw_reset(struct device *dev); |
dev | 545 | drivers/net/de4x5.c | static int de4x5_rx(struct device *dev); |
dev | 546 | drivers/net/de4x5.c | static int de4x5_tx(struct device *dev); |
dev | 547 | drivers/net/de4x5.c | static int de4x5_ast(struct device *dev); |
dev | 549 | drivers/net/de4x5.c | static int autoconf_media(struct device *dev); |
dev | 550 | drivers/net/de4x5.c | static void create_packet(struct device *dev, char *frame, int len); |
dev | 553 | drivers/net/de4x5.c | static void load_packet(struct device *dev, char *buf, u32 flags, struct sk_buff *skb); |
dev | 554 | drivers/net/de4x5.c | static int dc21040_autoconf(struct device *dev); |
dev | 555 | drivers/net/de4x5.c | static int dc21041_autoconf(struct device *dev); |
dev | 556 | drivers/net/de4x5.c | static int dc21140m_autoconf(struct device *dev); |
dev | 557 | drivers/net/de4x5.c | static int de4x5_suspect_state(struct device *dev, int timeout, int prev_state, int (*fn)(struct device *, int), int (*asfn)(struct device *)); |
dev | 558 | drivers/net/de4x5.c | static int dc21040_state(struct device *dev, int csr13, int csr14, int csr15, int timeout, int next_state, int suspect_state, int (*fn)(struct device *, int)); |
dev | 559 | drivers/net/de4x5.c | static int test_media(struct device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec); |
dev | 561 | drivers/net/de4x5.c | static int test_mii_reg(struct device *dev, int reg, int mask, int pol, long msec); |
dev | 562 | drivers/net/de4x5.c | static int is_spd_100(struct device *dev); |
dev | 563 | drivers/net/de4x5.c | static int is_100_up(struct device *dev); |
dev | 564 | drivers/net/de4x5.c | static int is_10_up(struct device *dev); |
dev | 565 | drivers/net/de4x5.c | static int is_anc_capable(struct device *dev); |
dev | 566 | drivers/net/de4x5.c | static int ping_media(struct device *dev, int msec); |
dev | 567 | drivers/net/de4x5.c | static void de4x5_save_skbs(struct device *dev); |
dev | 568 | drivers/net/de4x5.c | static void de4x5_restore_skbs(struct device *dev); |
dev | 569 | drivers/net/de4x5.c | static void de4x5_cache_state(struct device *dev, int flag); |
dev | 570 | drivers/net/de4x5.c | static void de4x5_put_cache(struct device *dev, struct sk_buff *skb); |
dev | 571 | drivers/net/de4x5.c | static void de4x5_putb_cache(struct device *dev, struct sk_buff *skb); |
dev | 572 | drivers/net/de4x5.c | static struct sk_buff *de4x5_get_cache(struct device *dev); |
dev | 573 | drivers/net/de4x5.c | static void de4x5_setup_intr(struct device *dev); |
dev | 574 | drivers/net/de4x5.c | static void de4x5_init_connection(struct device *dev); |
dev | 575 | drivers/net/de4x5.c | static int de4x5_reset_phy(struct device *dev); |
dev | 576 | drivers/net/de4x5.c | static void reset_init_sia(struct device *dev, s32 sicr, s32 strr, s32 sigr); |
dev | 577 | drivers/net/de4x5.c | static int test_ans(struct device *dev, s32 irqs, s32 irq_mask, s32 msec); |
dev | 578 | drivers/net/de4x5.c | static int test_tp(struct device *dev, s32 msec); |
dev | 601 | drivers/net/de4x5.c | static int mii_get_phy(struct device *dev); |
dev | 602 | drivers/net/de4x5.c | static void SetMulticastFilter(struct device *dev); |
dev | 603 | drivers/net/de4x5.c | static int get_hw_addr(struct device *dev); |
dev | 605 | drivers/net/de4x5.c | static void eisa_probe(struct device *dev, u_long iobase); |
dev | 606 | drivers/net/de4x5.c | static void pci_probe(struct device *dev, u_long iobase); |
dev | 607 | drivers/net/de4x5.c | static struct device *alloc_device(struct device *dev, u_long iobase); |
dev | 608 | drivers/net/de4x5.c | static char *build_setup_frame(struct device *dev, int mode); |
dev | 609 | drivers/net/de4x5.c | static void disable_ast(struct device *dev); |
dev | 610 | drivers/net/de4x5.c | static void enable_ast(struct device *dev, u32 time_out); |
dev | 611 | drivers/net/de4x5.c | static long de4x5_switch_to_srl(struct device *dev); |
dev | 612 | drivers/net/de4x5.c | static long de4x5_switch_to_mii(struct device *dev); |
dev | 613 | drivers/net/de4x5.c | static void timeout(struct device *dev, void (*fn)(u_long data), u_long data, u_long msec); |
dev | 614 | drivers/net/de4x5.c | static void de4x5_dbg_open(struct device *dev); |
dev | 615 | drivers/net/de4x5.c | static void de4x5_dbg_mii(struct device *dev, int k); |
dev | 616 | drivers/net/de4x5.c | static void de4x5_dbg_media(struct device *dev); |
dev | 652 | drivers/net/de4x5.c | int de4x5_probe(struct device *dev) |
dev | 655 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 657 | drivers/net/de4x5.c | eisa_probe(dev, iobase); |
dev | 658 | drivers/net/de4x5.c | pci_probe(dev, iobase); |
dev | 661 | drivers/net/de4x5.c | printk("%s: de4x5_probe() cannot find device at 0x%04lx.\n", dev->name, |
dev | 669 | drivers/net/de4x5.c | for (; (dev->priv == NULL) && (dev->next != NULL); dev = dev->next); |
dev | 671 | drivers/net/de4x5.c | if (dev->priv) status = 0; |
dev | 678 | drivers/net/de4x5.c | de4x5_hw_init(struct device *dev, u_long iobase) |
dev | 710 | drivers/net/de4x5.c | dev->base_addr = iobase; |
dev | 713 | drivers/net/de4x5.c | dev->name, name, iobase, ((iobase>>12)&0x0f)); |
dev | 715 | drivers/net/de4x5.c | printk("%s: %s at %04lx (PCI bus %d, device %d)", dev->name, name, |
dev | 720 | drivers/net/de4x5.c | status = get_hw_addr(dev); |
dev | 722 | drivers/net/de4x5.c | printk("%2.2x:", dev->dev_addr[i]); |
dev | 724 | drivers/net/de4x5.c | printk("%2.2x,\n", dev->dev_addr[i]); |
dev | 739 | drivers/net/de4x5.c | dev->priv = (void *) kmalloc(sizeof(struct de4x5_private) + ALIGN, |
dev | 741 | drivers/net/de4x5.c | if (dev->priv == NULL) { |
dev | 748 | drivers/net/de4x5.c | tmp = dev->priv; |
dev | 749 | drivers/net/de4x5.c | dev->priv = (void *)(((u_long)dev->priv + ALIGN) & ~ALIGN); |
dev | 750 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
dev | 751 | drivers/net/de4x5.c | memset(dev->priv, 0, sizeof(struct de4x5_private)); |
dev | 760 | drivers/net/de4x5.c | if (!mii_get_phy(dev)) { |
dev | 761 | drivers/net/de4x5.c | printk("%s: MII search failed, no device found when one was expected\n", dev->name); |
dev | 765 | drivers/net/de4x5.c | mii_get_phy(dev); /* Search the MII anyway! */ |
dev | 787 | drivers/net/de4x5.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
dev | 824 | drivers/net/de4x5.c | create_packet(dev, lp->frame, sizeof(lp->frame)); |
dev | 829 | drivers/net/de4x5.c | printk(" and requires IRQ%d (provided by %s).\n", dev->irq, |
dev | 832 | drivers/net/de4x5.c | printk("%s: Kernel could not allocate RX buffer memory.\n", dev->name); |
dev | 841 | drivers/net/de4x5.c | kfree(dev->priv); |
dev | 842 | drivers/net/de4x5.c | dev->priv = NULL; |
dev | 853 | drivers/net/de4x5.c | dev->open = &de4x5_open; |
dev | 854 | drivers/net/de4x5.c | dev->hard_start_xmit = &de4x5_queue_pkt; |
dev | 855 | drivers/net/de4x5.c | dev->stop = &de4x5_close; |
dev | 856 | drivers/net/de4x5.c | dev->get_stats = &de4x5_get_stats; |
dev | 857 | drivers/net/de4x5.c | dev->set_multicast_list = &set_multicast_list; |
dev | 858 | drivers/net/de4x5.c | dev->do_ioctl = &de4x5_ioctl; |
dev | 860 | drivers/net/de4x5.c | dev->mem_start = 0; |
dev | 863 | drivers/net/de4x5.c | ether_setup(dev); |
dev | 876 | drivers/net/de4x5.c | de4x5_open(struct device *dev) |
dev | 878 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 879 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 896 | drivers/net/de4x5.c | status = de4x5_init(dev); |
dev | 898 | drivers/net/de4x5.c | de4x5_dbg_open(dev); |
dev | 900 | drivers/net/de4x5.c | if (request_irq(dev->irq, (void *)de4x5_interrupt, 0, lp->adapter_name, dev)) { |
dev | 901 | drivers/net/de4x5.c | printk("de4x5_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 904 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 905 | drivers/net/de4x5.c | dev->start = 1; |
dev | 906 | drivers/net/de4x5.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 907 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 911 | drivers/net/de4x5.c | de4x5_setup_intr(dev); |
dev | 939 | drivers/net/de4x5.c | de4x5_init(struct device *dev) |
dev | 942 | drivers/net/de4x5.c | set_bit(0, (void *)&dev->tbusy); |
dev | 944 | drivers/net/de4x5.c | de4x5_sw_reset(dev); |
dev | 947 | drivers/net/de4x5.c | autoconf_media(dev); |
dev | 952 | drivers/net/de4x5.c | static int de4x5_sw_reset(struct device *dev) |
dev | 954 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 955 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 961 | drivers/net/de4x5.c | de4x5_switch_to_srl(dev); |
dev | 963 | drivers/net/de4x5.c | de4x5_switch_to_mii(dev); |
dev | 999 | drivers/net/de4x5.c | SetMulticastFilter(dev); |
dev | 1002 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, HASH_F|TD_SET|SETUP_FRAME_LEN, NULL); |
dev | 1004 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, PERFECT_F|TD_SET|SETUP_FRAME_LEN, NULL); |
dev | 1017 | drivers/net/de4x5.c | printk("%s: Setup frame timed out, status %08x\n", dev->name, |
dev | 1032 | drivers/net/de4x5.c | de4x5_queue_pkt(struct sk_buff *skb, struct device *dev) |
dev | 1034 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1035 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1039 | drivers/net/de4x5.c | dev_tint(dev); |
dev | 1044 | drivers/net/de4x5.c | de4x5_put_cache(dev, skb); /* Queue the buffer locally */ |
dev | 1053 | drivers/net/de4x5.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1055 | drivers/net/de4x5.c | de4x5_tx(dev); |
dev | 1059 | drivers/net/de4x5.c | if (dev->tbusy || lp->skb[lp->tx_new]) { |
dev | 1060 | drivers/net/de4x5.c | if (dev->interrupt) { |
dev | 1061 | drivers/net/de4x5.c | de4x5_putb_cache(dev, skb); /* Requeue the buffer */ |
dev | 1063 | drivers/net/de4x5.c | de4x5_put_cache(dev, skb); |
dev | 1066 | drivers/net/de4x5.c | printk("%s: transmit busy, lost media or stale skb found:\n STS:%08x\n tbusy:%ld\n lostMedia:%d\n IMR:%08x\n OMR:%08x\n Stale skb: %s\n",dev->name, inl(DE4X5_STS), dev->tbusy, lp->lostMedia, inl(DE4X5_IMR), inl(DE4X5_OMR), (lp->skb[lp->tx_new] ? "YES" : "NO")); |
dev | 1070 | drivers/net/de4x5.c | if (lp->cache.skb && !dev->interrupt) { |
dev | 1071 | drivers/net/de4x5.c | de4x5_put_cache(dev, skb); |
dev | 1072 | drivers/net/de4x5.c | skb = de4x5_get_cache(dev); |
dev | 1075 | drivers/net/de4x5.c | while (skb && !dev->tbusy && !lp->skb[lp->tx_new]) { |
dev | 1076 | drivers/net/de4x5.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1079 | drivers/net/de4x5.c | load_packet(dev, skb->data, |
dev | 1084 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 1087 | drivers/net/de4x5.c | dev->tbusy = 0; /* Another pkt may be queued */ |
dev | 1089 | drivers/net/de4x5.c | skb = de4x5_get_cache(dev); |
dev | 1093 | drivers/net/de4x5.c | if (skb && (dev->tbusy || lp->skb[lp->tx_new])) { |
dev | 1094 | drivers/net/de4x5.c | de4x5_putb_cache(dev, skb); |
dev | 1115 | drivers/net/de4x5.c | struct device *dev = (struct device *)dev_id; |
dev | 1120 | drivers/net/de4x5.c | if (dev == NULL) { |
dev | 1124 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
dev | 1125 | drivers/net/de4x5.c | iobase = dev->base_addr; |
dev | 1127 | drivers/net/de4x5.c | if (dev->interrupt) |
dev | 1128 | drivers/net/de4x5.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 1131 | drivers/net/de4x5.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 1140 | drivers/net/de4x5.c | de4x5_rx(dev); |
dev | 1143 | drivers/net/de4x5.c | de4x5_tx(dev); |
dev | 1153 | drivers/net/de4x5.c | dev->name, sts); |
dev | 1159 | drivers/net/de4x5.c | while (lp->cache.skb && !dev->tbusy && lp->tx_enable) { |
dev | 1160 | drivers/net/de4x5.c | de4x5_queue_pkt(de4x5_get_cache(dev), dev); |
dev | 1163 | drivers/net/de4x5.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 1170 | drivers/net/de4x5.c | de4x5_rx(struct device *dev) |
dev | 1172 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1202 | drivers/net/de4x5.c | dev->name); |
dev | 1207 | drivers/net/de4x5.c | skb->dev = dev; |
dev | 1218 | drivers/net/de4x5.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1236 | drivers/net/de4x5.c | } else if ((*(s32 *)&buf[0] == *(s32 *)&dev->dev_addr[0]) && |
dev | 1237 | drivers/net/de4x5.c | (*(s16 *)&buf[4] == *(s16 *)&dev->dev_addr[4])) { |
dev | 1269 | drivers/net/de4x5.c | de4x5_tx(struct device *dev) |
dev | 1271 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1272 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1309 | drivers/net/de4x5.c | if (TX_BUFFS_AVAIL && dev->tbusy) { /* Any resources available? */ |
dev | 1310 | drivers/net/de4x5.c | dev->tbusy = 0; /* Clear TX busy flag */ |
dev | 1311 | drivers/net/de4x5.c | if (dev->interrupt) mark_bh(NET_BH); |
dev | 1318 | drivers/net/de4x5.c | de4x5_ast(struct device *dev) |
dev | 1320 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1323 | drivers/net/de4x5.c | disable_ast(dev); |
dev | 1326 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 1328 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 1330 | drivers/net/de4x5.c | next_tick = dc21040_autoconf(dev); |
dev | 1333 | drivers/net/de4x5.c | enable_ast(dev, next_tick); |
dev | 1339 | drivers/net/de4x5.c | de4x5_close(struct device *dev) |
dev | 1341 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1342 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1345 | drivers/net/de4x5.c | disable_ast(dev); |
dev | 1346 | drivers/net/de4x5.c | dev->start = 0; |
dev | 1347 | drivers/net/de4x5.c | dev->tbusy = 1; |
dev | 1351 | drivers/net/de4x5.c | dev->name, inl(DE4X5_STS)); |
dev | 1364 | drivers/net/de4x5.c | free_irq(dev->irq, dev); |
dev | 1379 | drivers/net/de4x5.c | de4x5_get_stats(struct device *dev) |
dev | 1381 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1382 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1389 | drivers/net/de4x5.c | static void load_packet(struct device *dev, char *buf, u32 flags, struct sk_buff *skb) |
dev | 1391 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1408 | drivers/net/de4x5.c | set_multicast_list(struct device *dev) |
dev | 1410 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1411 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1415 | drivers/net/de4x5.c | if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */ |
dev | 1421 | drivers/net/de4x5.c | SetMulticastFilter(dev); |
dev | 1423 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
dev | 1426 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
dev | 1432 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 1444 | drivers/net/de4x5.c | static void SetMulticastFilter(struct device *dev) |
dev | 1446 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1447 | drivers/net/de4x5.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 1448 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1457 | drivers/net/de4x5.c | pa = build_setup_frame(dev, ALL); /* Build the basic frame */ |
dev | 1459 | drivers/net/de4x5.c | if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 14)) { |
dev | 1462 | drivers/net/de4x5.c | for (i=0;i<dev->mc_count;i++) { /* for each address in the list */ |
dev | 1486 | drivers/net/de4x5.c | for (j=0; j<dev->mc_count; j++) { |
dev | 1504 | drivers/net/de4x5.c | static void eisa_probe(struct device *dev, u_long ioaddr) |
dev | 1527 | drivers/net/de4x5.c | for (status = -ENODEV; (i<maxSlots) && (dev!=NULL); i++, iobase+=EISA_SLOT_INC) { |
dev | 1541 | drivers/net/de4x5.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1542 | drivers/net/de4x5.c | if ((status = de4x5_hw_init(dev, iobase)) == 0) { |
dev | 1548 | drivers/net/de4x5.c | printk("%s: region already allocated at 0x%04lx.\n", dev->name,iobase); |
dev | 1571 | drivers/net/de4x5.c | static void pci_probe(struct device *dev, u_long ioaddr) |
dev | 1632 | drivers/net/de4x5.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1633 | drivers/net/de4x5.c | dev->irq = irq; |
dev | 1634 | drivers/net/de4x5.c | if ((status = de4x5_hw_init(dev, iobase)) == 0) { |
dev | 1640 | drivers/net/de4x5.c | printk("%s: region already allocated at 0x%04x.\n", dev->name, |
dev | 1653 | drivers/net/de4x5.c | static struct device *alloc_device(struct device *dev, u_long iobase) |
dev | 1659 | drivers/net/de4x5.c | if (loading_module) return dev; |
dev | 1664 | drivers/net/de4x5.c | while (dev->next != NULL) { |
dev | 1665 | drivers/net/de4x5.c | if ((dev->base_addr == DE4X5_NDA) || (dev->base_addr == 0)) break; |
dev | 1666 | drivers/net/de4x5.c | dev = dev->next; /* walk through eth device list */ |
dev | 1674 | drivers/net/de4x5.c | if ((dev->base_addr == 0) && (num_de4x5s > 0)) { |
dev | 1676 | drivers/net/de4x5.c | tmp = dev->next; /* point to the next device */ |
dev | 1677 | drivers/net/de4x5.c | init = dev->init; /* remember the probe function */ |
dev | 1684 | drivers/net/de4x5.c | if ((dev->next == NULL) && |
dev | 1685 | drivers/net/de4x5.c | !((dev->base_addr == DE4X5_NDA) || (dev->base_addr == 0))) { |
dev | 1686 | drivers/net/de4x5.c | dev->next = (struct device *)kmalloc(sizeof(struct device)+8, GFP_KERNEL); |
dev | 1687 | drivers/net/de4x5.c | dev = dev->next; /* point to the new device */ |
dev | 1688 | drivers/net/de4x5.c | if (dev == NULL) { |
dev | 1696 | drivers/net/de4x5.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1698 | drivers/net/de4x5.c | sprintf(dev->name,"eth????");/* New device name */ |
dev | 1700 | drivers/net/de4x5.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1702 | drivers/net/de4x5.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1703 | drivers/net/de4x5.c | dev->next = NULL; /* mark the end of list */ |
dev | 1704 | drivers/net/de4x5.c | dev->init = &de4x5_probe; /* initialisation routine */ |
dev | 1708 | drivers/net/de4x5.c | ret = dev; /* return current struct, or NULL */ |
dev | 1728 | drivers/net/de4x5.c | dev->name); |
dev | 1761 | drivers/net/de4x5.c | static int autoconf_media(struct device *dev) |
dev | 1763 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1764 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1769 | drivers/net/de4x5.c | disable_ast(dev); |
dev | 1773 | drivers/net/de4x5.c | next_tick = dc21040_autoconf(dev); |
dev | 1775 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 1777 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 1779 | drivers/net/de4x5.c | if (lp->autosense == AUTO) enable_ast(dev, next_tick); |
dev | 1796 | drivers/net/de4x5.c | static int dc21040_autoconf(struct device *dev) |
dev | 1798 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1799 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1808 | drivers/net/de4x5.c | de4x5_save_skbs(dev); |
dev | 1819 | drivers/net/de4x5.c | next_tick = dc21040_autoconf(dev); |
dev | 1823 | drivers/net/de4x5.c | dc21040_state(dev, 0x8f01, 0xffff, 0x0000, 3000, BNC_AUI, |
dev | 1828 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, TP, test_tp, dc21040_autoconf); |
dev | 1834 | drivers/net/de4x5.c | dc21040_state(dev, 0x8f09, 0x0705, 0x0006, 3000, EXT_SIA, |
dev | 1839 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, BNC_AUI, ping_media, dc21040_autoconf); |
dev | 1843 | drivers/net/de4x5.c | dc21040_state(dev, 0x3041, 0x0000, 0x0006, 3000, |
dev | 1848 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, EXT_SIA, ping_media, dc21040_autoconf); |
dev | 1853 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f01, 0xffff, 0x0000); |
dev | 1856 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f09, 0x0705, 0x0006); |
dev | 1858 | drivers/net/de4x5.c | de4x5_dbg_media(dev); |
dev | 1868 | drivers/net/de4x5.c | dc21040_state(struct device *dev, int csr13, int csr14, int csr15, int timeout, |
dev | 1872 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1878 | drivers/net/de4x5.c | reset_init_sia(dev, csr13, csr14, csr15); |
dev | 1885 | drivers/net/de4x5.c | linkBad = fn(dev, timeout); |
dev | 1893 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 1907 | drivers/net/de4x5.c | de4x5_suspect_state(struct device *dev, int timeout, int prev_state, |
dev | 1911 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1921 | drivers/net/de4x5.c | next_tick = asfn(dev); |
dev | 1926 | drivers/net/de4x5.c | linkBad = fn(dev, timeout); |
dev | 1949 | drivers/net/de4x5.c | static int dc21041_autoconf(struct device *dev) |
dev | 1951 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1952 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1961 | drivers/net/de4x5.c | de4x5_save_skbs(dev); /* Save non transmitted skb's */ |
dev | 1974 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 1984 | drivers/net/de4x5.c | sts = test_media(dev, irqs, irq_mask, 0xef01, 0xffff, 0x0008, 2400); |
dev | 1993 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 2001 | drivers/net/de4x5.c | sts = test_ans(dev, irqs, irq_mask, 3000); |
dev | 2007 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 2009 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2019 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, ANS, test_tp, dc21041_autoconf); |
dev | 2030 | drivers/net/de4x5.c | sts = test_media(dev,irqs, irq_mask, 0xef01, 0xff3f, 0x0008, 2400); |
dev | 2040 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 2042 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2052 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, TP, test_tp, dc21041_autoconf); |
dev | 2063 | drivers/net/de4x5.c | sts = test_media(dev,irqs, irq_mask, 0xef09, 0xf7fd, 0x000e, 1000); |
dev | 2069 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 2071 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2081 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, AUI, ping_media, dc21041_autoconf); |
dev | 2093 | drivers/net/de4x5.c | sts = test_media(dev,irqs, irq_mask, 0xef09, 0xf7fd, 0x0006, 1000); |
dev | 2101 | drivers/net/de4x5.c | next_tick = dc21041_autoconf(dev); |
dev | 2108 | drivers/net/de4x5.c | if ((sts = ping_media(dev, 3000)) < 0) { |
dev | 2115 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2127 | drivers/net/de4x5.c | de4x5_suspect_state(dev, 1000, BNC, ping_media, dc21041_autoconf); |
dev | 2133 | drivers/net/de4x5.c | reset_init_sia(dev, 0xef01, 0xffff, 0x0008);/* Initialise the SIA */ |
dev | 2134 | drivers/net/de4x5.c | de4x5_dbg_media(dev); |
dev | 2143 | drivers/net/de4x5.c | static int dc21140m_autoconf(struct device *dev) |
dev | 2145 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2146 | drivers/net/de4x5.c | int ana, anlpa, cap, cr, sr, iobase = dev->base_addr; |
dev | 2155 | drivers/net/de4x5.c | if ((next_tick = de4x5_reset_phy(dev)) < 0) { |
dev | 2158 | drivers/net/de4x5.c | de4x5_save_skbs(dev); /* Save non transmitted skb's */ |
dev | 2164 | drivers/net/de4x5.c | } else if ((lp->autosense == AUTO) && (sr=is_anc_capable(dev))) { |
dev | 2171 | drivers/net/de4x5.c | } else if (is_spd_100(dev) && is_100_up(dev)) { |
dev | 2177 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 2187 | drivers/net/de4x5.c | cr = test_mii_reg(dev, MII_CR, MII_CR_RAN, FALSE, 500); |
dev | 2197 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 2202 | drivers/net/de4x5.c | if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, TRUE, 3000)) < 0) { |
dev | 2221 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 2231 | drivers/net/de4x5.c | if (is_spd_100(dev) && is_100_up(dev)) { |
dev | 2233 | drivers/net/de4x5.c | } else if (!is_spd_100(dev) && is_10_up(dev)) { |
dev | 2238 | drivers/net/de4x5.c | next_tick = dc21140m_autoconf(dev); |
dev | 2245 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2248 | drivers/net/de4x5.c | if (!(is_spd_100(dev) && is_100_up(dev))) { |
dev | 2260 | drivers/net/de4x5.c | de4x5_init_connection(dev); |
dev | 2263 | drivers/net/de4x5.c | if (!(!is_spd_100(dev) && is_10_up(dev))) { |
dev | 2273 | drivers/net/de4x5.c | de4x5_dbg_media(dev); |
dev | 2282 | drivers/net/de4x5.c | static void de4x5_init_connection(struct device *dev) |
dev | 2284 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2285 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2287 | drivers/net/de4x5.c | de4x5_dbg_media(dev); |
dev | 2288 | drivers/net/de4x5.c | de4x5_restore_skbs(dev); |
dev | 2290 | drivers/net/de4x5.c | de4x5_rx(dev); |
dev | 2291 | drivers/net/de4x5.c | de4x5_setup_intr(dev); |
dev | 2300 | drivers/net/de4x5.c | static int de4x5_reset_phy(struct device *dev) |
dev | 2302 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2303 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2314 | drivers/net/de4x5.c | next_tick = test_mii_reg(dev, MII_CR, MII_CR_RST, FALSE, 500); |
dev | 2321 | drivers/net/de4x5.c | test_media(struct device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec) |
dev | 2323 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2324 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2329 | drivers/net/de4x5.c | reset_init_sia(dev, csr13, csr14, csr15); |
dev | 2356 | drivers/net/de4x5.c | static int test_tp(struct device *dev, s32 msec) |
dev | 2358 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2359 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2381 | drivers/net/de4x5.c | static int test_mii_reg(struct device *dev, int reg, int mask, int pol, long msec) |
dev | 2383 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2384 | drivers/net/de4x5.c | int test, iobase = dev->base_addr; |
dev | 2403 | drivers/net/de4x5.c | static int is_spd_100(struct device *dev) |
dev | 2405 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2406 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2420 | drivers/net/de4x5.c | static int is_100_up(struct device *dev) |
dev | 2422 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2423 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2434 | drivers/net/de4x5.c | static int is_10_up(struct device *dev) |
dev | 2436 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2437 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2448 | drivers/net/de4x5.c | static int is_anc_capable(struct device *dev) |
dev | 2450 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2451 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2464 | drivers/net/de4x5.c | static int ping_media(struct device *dev, int msec) |
dev | 2466 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2467 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2474 | drivers/net/de4x5.c | load_packet(dev, lp->frame, TD_LS | TD_FS | sizeof(lp->frame), NULL); |
dev | 2503 | drivers/net/de4x5.c | static void de4x5_save_skbs(struct device *dev) |
dev | 2505 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2506 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2512 | drivers/net/de4x5.c | de4x5_tx(dev); /* Flush any sent skb's */ |
dev | 2515 | drivers/net/de4x5.c | de4x5_putb_cache(dev, lp->skb[i]); |
dev | 2521 | drivers/net/de4x5.c | de4x5_putb_cache(dev, lp->skb[i]); |
dev | 2525 | drivers/net/de4x5.c | de4x5_cache_state(dev, DE4X5_SAVE_STATE); |
dev | 2526 | drivers/net/de4x5.c | de4x5_sw_reset(dev); |
dev | 2527 | drivers/net/de4x5.c | de4x5_cache_state(dev, DE4X5_RESTORE_STATE); |
dev | 2528 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 2536 | drivers/net/de4x5.c | static void de4x5_restore_skbs(struct device *dev) |
dev | 2538 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2539 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2546 | drivers/net/de4x5.c | de4x5_cache_state(dev, DE4X5_SAVE_STATE); |
dev | 2547 | drivers/net/de4x5.c | de4x5_sw_reset(dev); |
dev | 2548 | drivers/net/de4x5.c | de4x5_cache_state(dev, DE4X5_RESTORE_STATE); |
dev | 2549 | drivers/net/de4x5.c | dev->tbusy = 1; |
dev | 2552 | drivers/net/de4x5.c | skb = de4x5_get_cache(dev); |
dev | 2553 | drivers/net/de4x5.c | load_packet(dev, skb->data, TD_IC | TD_LS | TD_FS | skb->len, skb); |
dev | 2557 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 2566 | drivers/net/de4x5.c | static void de4x5_cache_state(struct device *dev, int flag) |
dev | 2568 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2569 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2596 | drivers/net/de4x5.c | reset_init_sia(dev, lp->cache.csr13, lp->cache.csr14, |
dev | 2605 | drivers/net/de4x5.c | static void de4x5_put_cache(struct device *dev, struct sk_buff *skb) |
dev | 2607 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2621 | drivers/net/de4x5.c | static void de4x5_putb_cache(struct device *dev, struct sk_buff *skb) |
dev | 2623 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2632 | drivers/net/de4x5.c | static struct sk_buff *de4x5_get_cache(struct device *dev) |
dev | 2634 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2649 | drivers/net/de4x5.c | static int test_ans(struct device *dev, s32 irqs, s32 irq_mask, s32 msec) |
dev | 2651 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2652 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2676 | drivers/net/de4x5.c | static void de4x5_setup_intr(struct device *dev) |
dev | 2678 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2679 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2696 | drivers/net/de4x5.c | static void reset_init_sia(struct device *dev, s32 sicr, s32 strr, s32 sigr) |
dev | 2698 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2699 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2712 | drivers/net/de4x5.c | static void create_packet(struct device *dev, char *frame, int len) |
dev | 2718 | drivers/net/de4x5.c | *buf++ = dev->dev_addr[i]; |
dev | 2721 | drivers/net/de4x5.c | *buf++ = dev->dev_addr[i]; |
dev | 2844 | drivers/net/de4x5.c | static int get_hw_addr(struct device *dev) |
dev | 2846 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2860 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2863 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2865 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
dev | 2866 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
dev | 2868 | drivers/net/de4x5.c | dev->dev_addr[i] = *((u_char *)&lp->srom + i); i++; |
dev | 2869 | drivers/net/de4x5.c | dev->dev_addr[i] = *((u_char *)&lp->srom + i); i++; |
dev | 2873 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2875 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 3195 | drivers/net/de4x5.c | static int mii_get_phy(struct device *dev) |
dev | 3197 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3198 | drivers/net/de4x5.c | int iobase = dev->base_addr; |
dev | 3232 | drivers/net/de4x5.c | de4x5_dbg_mii(dev, k); |
dev | 3239 | drivers/net/de4x5.c | static char *build_setup_frame(struct device *dev, int mode) |
dev | 3241 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3252 | drivers/net/de4x5.c | *(pa + i) = dev->dev_addr[i]; /* Host address */ |
dev | 3258 | drivers/net/de4x5.c | *(pa + (i&1)) = dev->dev_addr[i]; |
dev | 3270 | drivers/net/de4x5.c | static void enable_ast(struct device *dev, u32 time_out) |
dev | 3272 | drivers/net/de4x5.c | timeout(dev, (void *)&de4x5_ast, (u_long)dev, time_out); |
dev | 3277 | drivers/net/de4x5.c | static void disable_ast(struct device *dev) |
dev | 3279 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3286 | drivers/net/de4x5.c | static long de4x5_switch_to_mii(struct device *dev) |
dev | 3288 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3289 | drivers/net/de4x5.c | int iobase = dev->base_addr; |
dev | 3312 | drivers/net/de4x5.c | static long de4x5_switch_to_srl(struct device *dev) |
dev | 3314 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3315 | drivers/net/de4x5.c | int iobase = dev->base_addr; |
dev | 3338 | drivers/net/de4x5.c | static void timeout(struct device *dev, void (*fn)(u_long data), u_long data, u_long msec) |
dev | 3340 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3359 | drivers/net/de4x5.c | static void de4x5_dbg_open(struct device *dev) |
dev | 3361 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3365 | drivers/net/de4x5.c | printk("%s: de4x5 opening with irq %d\n",dev->name,dev->irq); |
dev | 3368 | drivers/net/de4x5.c | printk("%2.2x:",(short)dev->dev_addr[i]); |
dev | 3409 | drivers/net/de4x5.c | static void de4x5_dbg_mii(struct device *dev, int k) |
dev | 3411 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3412 | drivers/net/de4x5.c | int iobase = dev->base_addr; |
dev | 3435 | drivers/net/de4x5.c | static void de4x5_dbg_media(struct device *dev) |
dev | 3437 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3442 | drivers/net/de4x5.c | printk("%s: media is %s\n", dev->name, |
dev | 3452 | drivers/net/de4x5.c | printk("%s: mode is %s\n", dev->name, |
dev | 3493 | drivers/net/de4x5.c | static int de4x5_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 3495 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 3497 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 3513 | drivers/net/de4x5.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 3528 | drivers/net/de4x5.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 3530 | drivers/net/de4x5.c | build_setup_frame(dev, PHYS_ADDR_ONLY); |
dev | 3532 | drivers/net/de4x5.c | while (set_bit(0, (void *)&dev->tbusy) != 0);/* Wait for lock to free*/ |
dev | 3534 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
dev | 3537 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
dev | 3542 | drivers/net/de4x5.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 3566 | drivers/net/de4x5.c | printk("%s: Boo!\n", dev->name); |
dev | 3583 | drivers/net/de4x5.c | set_multicast_list(dev); |
dev | 3586 | drivers/net/de4x5.c | set_multicast_list(dev); |
dev | 3596 | drivers/net/de4x5.c | set_multicast_list(dev); |
dev | 3671 | drivers/net/de4x5.c | tmp.addr[j++] = dev->irq; |
dev | 3673 | drivers/net/de4x5.c | tmp.addr[j++] = dev->dev_addr[i]; |
dev | 3750 | drivers/net/de4x5.c | tmp.addr[j++] = dev->tbusy; |
dev | 240 | drivers/net/de600.c | static byte de600_read_status(struct device *dev); |
dev | 241 | drivers/net/de600.c | static byte de600_read_byte(unsigned char type, struct device *dev); |
dev | 244 | drivers/net/de600.c | static int de600_open(struct device *dev); |
dev | 245 | drivers/net/de600.c | static int de600_close(struct device *dev); |
dev | 246 | drivers/net/de600.c | static struct netstats *get_stats(struct device *dev); |
dev | 247 | drivers/net/de600.c | static int de600_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 251 | drivers/net/de600.c | static int de600_tx_intr(struct device *dev, int irq_status); |
dev | 252 | drivers/net/de600.c | static void de600_rx_intr(struct device *dev); |
dev | 255 | drivers/net/de600.c | static void trigger_interrupt(struct device *dev); |
dev | 256 | drivers/net/de600.c | int de600_probe(struct device *dev); |
dev | 257 | drivers/net/de600.c | static int adapter_init(struct device *dev); |
dev | 307 | drivers/net/de600.c | de600_read_status(struct device *dev) |
dev | 319 | drivers/net/de600.c | de600_read_byte(unsigned char type, struct device *dev) { /* dev used by macros */ |
dev | 337 | drivers/net/de600.c | de600_open(struct device *dev) |
dev | 340 | drivers/net/de600.c | printk ("%s: unable to get IRQ %d\n", dev->name, DE600_IRQ); |
dev | 343 | drivers/net/de600.c | irq2dev_map[DE600_IRQ] = dev; |
dev | 346 | drivers/net/de600.c | dev->start = 1; |
dev | 347 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 358 | drivers/net/de600.c | de600_close(struct device *dev) |
dev | 367 | drivers/net/de600.c | if (dev->start) { |
dev | 370 | drivers/net/de600.c | dev->start = 0; |
dev | 377 | drivers/net/de600.c | get_stats(struct device *dev) |
dev | 379 | drivers/net/de600.c | return (struct netstats *)(dev->priv); |
dev | 383 | drivers/net/de600.c | trigger_interrupt(struct device *dev) |
dev | 397 | drivers/net/de600.c | de600_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 411 | drivers/net/de600.c | dev_tint(dev); |
dev | 416 | drivers/net/de600.c | tickssofar = jiffies - dev->trans_start; |
dev | 423 | drivers/net/de600.c | dev->name, |
dev | 428 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 447 | drivers/net/de600.c | de600_read_byte(READ_DATA, dev); |
dev | 448 | drivers/net/de600.c | if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) { |
dev | 449 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 461 | drivers/net/de600.c | dev->trans_start = jiffies; |
dev | 462 | drivers/net/de600.c | dev->tbusy = 0; /* allow more packets into adapter */ |
dev | 468 | drivers/net/de600.c | dev->tbusy = !free_tx_pages; |
dev | 493 | drivers/net/de600.c | struct device *dev = irq2dev_map[irq]; |
dev | 499 | drivers/net/de600.c | if ((dev == NULL) || (dev->start == 0) || (DE600_IRQ != irq)) { |
dev | 500 | drivers/net/de600.c | printk("%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); |
dev | 504 | drivers/net/de600.c | dev->interrupt = 1; |
dev | 506 | drivers/net/de600.c | irq_status = de600_read_status(dev); |
dev | 512 | drivers/net/de600.c | de600_rx_intr(dev); |
dev | 518 | drivers/net/de600.c | retrig = de600_tx_intr(dev, irq_status); |
dev | 522 | drivers/net/de600.c | irq_status = de600_read_status(dev); |
dev | 531 | drivers/net/de600.c | dev->interrupt = 0; |
dev | 535 | drivers/net/de600.c | trigger_interrupt(dev); |
dev | 542 | drivers/net/de600.c | de600_tx_intr(struct device *dev, int irq_status) |
dev | 558 | drivers/net/de600.c | ((struct netstats *)(dev->priv))->tx_packets++; |
dev | 559 | drivers/net/de600.c | dev->tbusy = 0; |
dev | 564 | drivers/net/de600.c | dev->trans_start = jiffies; |
dev | 578 | drivers/net/de600.c | de600_rx_intr(struct device *dev) |
dev | 588 | drivers/net/de600.c | size = de600_read_byte(RX_LEN, dev); /* low byte */ |
dev | 589 | drivers/net/de600.c | size += (de600_read_byte(RX_LEN, dev) << 8); /* high byte */ |
dev | 599 | drivers/net/de600.c | printk("%s: Bogus packet size %d.\n", dev->name, size); |
dev | 601 | drivers/net/de600.c | adapter_init(dev); |
dev | 609 | drivers/net/de600.c | dev->name, size); |
dev | 614 | drivers/net/de600.c | skb->dev = dev; |
dev | 623 | drivers/net/de600.c | *buffer = de600_read_byte(READ_DATA, dev); |
dev | 625 | drivers/net/de600.c | ((struct netstats *)(dev->priv))->rx_packets++; /* count all receives */ |
dev | 627 | drivers/net/de600.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 638 | drivers/net/de600.c | de600_probe(struct device *dev) |
dev | 644 | drivers/net/de600.c | printk("%s: D-Link DE-600 pocket adapter", dev->name); |
dev | 652 | drivers/net/de600.c | (void)de600_read_status(dev); |
dev | 655 | drivers/net/de600.c | if (de600_read_status(dev) & 0xf0) { |
dev | 668 | drivers/net/de600.c | dev->dev_addr[i] = de600_read_byte(READ_DATA, dev); |
dev | 669 | drivers/net/de600.c | dev->broadcast[i] = 0xff; |
dev | 673 | drivers/net/de600.c | if ((dev->dev_addr[1] == 0xde) && (dev->dev_addr[2] == 0x15)) { |
dev | 675 | drivers/net/de600.c | dev->dev_addr[0] = 0x00; |
dev | 676 | drivers/net/de600.c | dev->dev_addr[1] = 0x80; |
dev | 677 | drivers/net/de600.c | dev->dev_addr[2] = 0xc8; |
dev | 678 | drivers/net/de600.c | dev->dev_addr[3] &= 0x0f; |
dev | 679 | drivers/net/de600.c | dev->dev_addr[3] |= 0x70; |
dev | 693 | drivers/net/de600.c | printk(", Ethernet Address: %02X", dev->dev_addr[0]); |
dev | 695 | drivers/net/de600.c | printk(":%02X",dev->dev_addr[i]); |
dev | 700 | drivers/net/de600.c | dev->priv = &de600_netstats; |
dev | 702 | drivers/net/de600.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 703 | drivers/net/de600.c | dev->get_stats = get_stats; |
dev | 705 | drivers/net/de600.c | dev->open = de600_open; |
dev | 706 | drivers/net/de600.c | dev->stop = de600_close; |
dev | 707 | drivers/net/de600.c | dev->hard_start_xmit = &de600_start_xmit; |
dev | 709 | drivers/net/de600.c | ether_setup(dev); |
dev | 711 | drivers/net/de600.c | dev->flags&=~IFF_MULTICAST; |
dev | 718 | drivers/net/de600.c | adapter_init(struct device *dev) |
dev | 734 | drivers/net/de600.c | de600_read_byte(READ_DATA, dev); |
dev | 735 | drivers/net/de600.c | if ((de600_read_byte(READ_DATA, dev) != 0xde) || |
dev | 736 | drivers/net/de600.c | (de600_read_byte(READ_DATA, dev) != 0x15)) { |
dev | 745 | drivers/net/de600.c | dev->flags &= ~IFF_UP; |
dev | 746 | drivers/net/de600.c | de600_close(dev); |
dev | 749 | drivers/net/de600.c | dev->tbusy = 1; /* Transmit busy... */ |
dev | 759 | drivers/net/de600.c | dev->tbusy = 0; /* Transmit busy... */ |
dev | 760 | drivers/net/de600.c | dev->interrupt = 0; |
dev | 768 | drivers/net/de600.c | de600_put_byte(dev->dev_addr[i]); |
dev | 160 | drivers/net/de620.c | #define DATA_PORT (dev->base_addr) |
dev | 161 | drivers/net/de620.c | #define STATUS_PORT (dev->base_addr + 1) |
dev | 162 | drivers/net/de620.c | #define COMMAND_PORT (dev->base_addr + 2) |
dev | 257 | drivers/net/de620.c | de620_ready(struct device *dev) |
dev | 272 | drivers/net/de620.c | de620_send_command(struct device *dev, byte cmd) |
dev | 274 | drivers/net/de620.c | de620_ready(dev); |
dev | 281 | drivers/net/de620.c | de620_ready(dev); |
dev | 286 | drivers/net/de620.c | de620_put_byte(struct device *dev, byte value) |
dev | 289 | drivers/net/de620.c | de620_ready(dev); |
dev | 291 | drivers/net/de620.c | de620_flip_ds(dev); |
dev | 295 | drivers/net/de620.c | de620_read_byte(struct device *dev) |
dev | 300 | drivers/net/de620.c | value = de620_ready(dev); /* High nibble */ |
dev | 301 | drivers/net/de620.c | de620_flip_ds(dev); |
dev | 302 | drivers/net/de620.c | value |= de620_ready(dev) >> 4; /* Low nibble */ |
dev | 307 | drivers/net/de620.c | de620_write_block(struct device *dev, byte *buffer, int count) |
dev | 324 | drivers/net/de620.c | de620_put_byte(dev,*buffer); |
dev | 326 | drivers/net/de620.c | de620_send_command(dev,W_DUMMY); |
dev | 338 | drivers/net/de620.c | de620_send_command(dev,W_DUMMY); |
dev | 343 | drivers/net/de620.c | de620_read_block(struct device *dev, byte *data, int count) |
dev | 360 | drivers/net/de620.c | *data++ = de620_read_byte(dev); |
dev | 361 | drivers/net/de620.c | de620_flip_ds(dev); |
dev | 378 | drivers/net/de620.c | de620_set_delay(struct device *dev) |
dev | 380 | drivers/net/de620.c | de620_ready(dev); |
dev | 384 | drivers/net/de620.c | de620_ready(dev); |
dev | 390 | drivers/net/de620.c | de620_flip_ds(dev); |
dev | 392 | drivers/net/de620.c | de620_ready(dev); |
dev | 398 | drivers/net/de620.c | de620_flip_ds(dev); |
dev | 402 | drivers/net/de620.c | de620_set_register(struct device *dev, byte reg, byte value) |
dev | 404 | drivers/net/de620.c | de620_ready(dev); |
dev | 408 | drivers/net/de620.c | de620_put_byte(dev, value); |
dev | 412 | drivers/net/de620.c | de620_get_register(struct device *dev, byte reg) |
dev | 416 | drivers/net/de620.c | de620_send_command(dev,reg); |
dev | 417 | drivers/net/de620.c | value = de620_read_byte(dev); |
dev | 418 | drivers/net/de620.c | de620_send_command(dev,W_DUMMY); |
dev | 433 | drivers/net/de620.c | de620_open(struct device *dev) |
dev | 435 | drivers/net/de620.c | if (request_irq(dev->irq, de620_interrupt, 0, "de620", NULL)) { |
dev | 436 | drivers/net/de620.c | printk ("%s: unable to get IRQ %d\n", dev->name, dev->irq); |
dev | 439 | drivers/net/de620.c | irq2dev_map[dev->irq] = dev; |
dev | 442 | drivers/net/de620.c | if (adapter_init(dev)) { |
dev | 445 | drivers/net/de620.c | dev->start = 1; |
dev | 455 | drivers/net/de620.c | de620_close(struct device *dev) |
dev | 458 | drivers/net/de620.c | de620_set_register(dev, W_TCR, RXOFF); |
dev | 460 | drivers/net/de620.c | free_irq(dev->irq, NULL); |
dev | 461 | drivers/net/de620.c | irq2dev_map[dev->irq] = NULL; |
dev | 463 | drivers/net/de620.c | dev->start = 0; |
dev | 474 | drivers/net/de620.c | get_stats(struct device *dev) |
dev | 476 | drivers/net/de620.c | return (struct netstats *)(dev->priv); |
dev | 486 | drivers/net/de620.c | static void de620_set_multicast_list(struct device *dev) |
dev | 488 | drivers/net/de620.c | if (dev->mc_count || dev->flags&(IFF_ALLMULTI|IFF_PROMISC)) |
dev | 495 | drivers/net/de620.c | dev->flags|=IFF_PROMISC; |
dev | 497 | drivers/net/de620.c | de620_set_register(dev, W_TCR, (TCR_DEF & ~RXPBM) | RXALL); |
dev | 501 | drivers/net/de620.c | de620_set_register(dev, W_TCR, TCR_DEF); |
dev | 511 | drivers/net/de620.c | de620_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 526 | drivers/net/de620.c | dev_tint(dev); |
dev | 530 | drivers/net/de620.c | using_txbuf = de620_tx_buffs(dev); /* Peek at the adapter */ |
dev | 531 | drivers/net/de620.c | dev->tbusy = (using_txbuf == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 533 | drivers/net/de620.c | if (dev->tbusy) { /* Do timeouts, to avoid hangs. */ |
dev | 534 | drivers/net/de620.c | tickssofar = jiffies - dev->trans_start; |
dev | 541 | drivers/net/de620.c | dev->name, |
dev | 546 | drivers/net/de620.c | if (adapter_init(dev)) /* maybe close it */ |
dev | 566 | drivers/net/de620.c | de620_send_command(dev,W_CR | RW0); |
dev | 571 | drivers/net/de620.c | de620_send_command(dev,W_CR | RW1); |
dev | 581 | drivers/net/de620.c | de620_write_block(dev, buffer, len); |
dev | 583 | drivers/net/de620.c | dev->trans_start = jiffies; |
dev | 584 | drivers/net/de620.c | dev->tbusy = (using_txbuf == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 586 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->tx_packets++; |
dev | 603 | drivers/net/de620.c | struct device *dev = irq2dev_map[irq_in]; |
dev | 609 | drivers/net/de620.c | if ((dev == NULL) || (irq != irq_in)) { |
dev | 610 | drivers/net/de620.c | printk("%s: bogus interrupt %d\n", dev?dev->name:"de620", irq_in); |
dev | 615 | drivers/net/de620.c | dev->interrupt = 1; |
dev | 618 | drivers/net/de620.c | irq_status = de620_get_register(dev, R_STS); |
dev | 624 | drivers/net/de620.c | again = de620_rx_intr(dev); |
dev | 630 | drivers/net/de620.c | dev->tbusy = (de620_tx_buffs(dev) == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 632 | drivers/net/de620.c | dev->interrupt = 0; |
dev | 645 | drivers/net/de620.c | de620_rx_intr(struct device *dev) |
dev | 661 | drivers/net/de620.c | de620_send_command(dev, W_CR | RRN); |
dev | 662 | drivers/net/de620.c | de620_set_register(dev, W_RSA1, next_rx_page); |
dev | 663 | drivers/net/de620.c | de620_set_register(dev, W_RSA0, 0); |
dev | 666 | drivers/net/de620.c | de620_read_block(dev, (byte *)&header_buf, sizeof(struct header_buf)); |
dev | 674 | drivers/net/de620.c | printk("%s: Ring overrun? Restoring...\n", dev->name); |
dev | 676 | drivers/net/de620.c | adapter_init(dev); |
dev | 677 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_over_errors++; |
dev | 693 | drivers/net/de620.c | printk("%s: Page link out of sync! Restoring...\n", dev->name); |
dev | 695 | drivers/net/de620.c | de620_send_command(dev, W_DUMMY); |
dev | 696 | drivers/net/de620.c | de620_set_register(dev, W_NPRF, next_rx_page); |
dev | 697 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_over_errors++; |
dev | 704 | drivers/net/de620.c | printk("%s: Illegal packet size: %d!\n", dev->name, size); |
dev | 710 | drivers/net/de620.c | dev->name, size); |
dev | 711 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_dropped++; |
dev | 715 | drivers/net/de620.c | skb->dev = dev; |
dev | 720 | drivers/net/de620.c | de620_read_block(dev, buffer, size); |
dev | 722 | drivers/net/de620.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 725 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_packets++; |
dev | 731 | drivers/net/de620.c | curr_page = de620_get_register(dev, R_CPR); |
dev | 732 | drivers/net/de620.c | de620_set_register(dev, W_NPRF, next_rx_page); |
dev | 744 | drivers/net/de620.c | adapter_init(struct device *dev) |
dev | 763 | drivers/net/de620.c | de620_send_command(dev, W_CR | RNOP | CLEAR); |
dev | 764 | drivers/net/de620.c | de620_send_command(dev, W_CR | RNOP); |
dev | 766 | drivers/net/de620.c | de620_set_register(dev, W_SCR, SCR_DEF); |
dev | 768 | drivers/net/de620.c | de620_set_register(dev, W_TCR, RXOFF); |
dev | 772 | drivers/net/de620.c | de620_set_register(dev, W_PAR0 + i, dev->dev_addr[i]); |
dev | 775 | drivers/net/de620.c | de620_set_register(dev, W_EIP, EIPRegister); |
dev | 783 | drivers/net/de620.c | de620_set_register(dev, W_SPR, first_rx_page); /* Start Page Register*/ |
dev | 784 | drivers/net/de620.c | de620_set_register(dev, W_EPR, last_rx_page); /* End Page Register */ |
dev | 785 | drivers/net/de620.c | de620_set_register(dev, W_CPR, first_rx_page);/*Current Page Register*/ |
dev | 786 | drivers/net/de620.c | de620_send_command(dev, W_NPR | first_rx_page); /* Next Page Register*/ |
dev | 787 | drivers/net/de620.c | de620_send_command(dev, W_DUMMY); |
dev | 788 | drivers/net/de620.c | de620_set_delay(dev); |
dev | 797 | drivers/net/de620.c | if (((i = de620_get_register(dev, R_STS)) & CHECK_MASK) != CHECK_OK) { |
dev | 805 | drivers/net/de620.c | dev->flags &= ~IFF_UP; |
dev | 806 | drivers/net/de620.c | de620_close(dev); |
dev | 817 | drivers/net/de620.c | de620_set_register(dev, W_TCR, TCR_DEF); |
dev | 832 | drivers/net/de620.c | de620_probe(struct device *dev) |
dev | 842 | drivers/net/de620.c | dev->base_addr = io; |
dev | 843 | drivers/net/de620.c | dev->irq = irq; |
dev | 852 | drivers/net/de620.c | de620_set_register(dev, W_EIP, EIPRegister); |
dev | 855 | drivers/net/de620.c | de620_set_register(dev, W_CPR, checkbyte); |
dev | 856 | drivers/net/de620.c | checkbyte = de620_get_register(dev, R_CPR); |
dev | 858 | drivers/net/de620.c | if ((checkbyte != 0xa5) || (read_eeprom(dev) != 0)) { |
dev | 864 | drivers/net/de620.c | if (check_region(dev->base_addr, 3)) { |
dev | 865 | drivers/net/de620.c | printk(", port 0x%x busy\n", dev->base_addr); |
dev | 869 | drivers/net/de620.c | request_region(dev->base_addr, 3, "de620"); |
dev | 873 | drivers/net/de620.c | dev->dev_addr[0] = nic_data.NodeID[0]); |
dev | 875 | drivers/net/de620.c | printk(":%2.2X", dev->dev_addr[i] = nic_data.NodeID[i]); |
dev | 876 | drivers/net/de620.c | dev->broadcast[i] = 0xff; |
dev | 889 | drivers/net/de620.c | dev->priv = &de620_netstats; |
dev | 891 | drivers/net/de620.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 892 | drivers/net/de620.c | dev->get_stats = get_stats; |
dev | 893 | drivers/net/de620.c | dev->open = de620_open; |
dev | 894 | drivers/net/de620.c | dev->stop = de620_close; |
dev | 895 | drivers/net/de620.c | dev->hard_start_xmit = &de620_start_xmit; |
dev | 896 | drivers/net/de620.c | dev->set_multicast_list = &de620_set_multicast_list; |
dev | 899 | drivers/net/de620.c | ether_setup(dev); |
dev | 923 | drivers/net/de620.c | #define sendit(dev,data) de620_set_register(dev, W_EIP, data | EIPRegister); |
dev | 926 | drivers/net/de620.c | ReadAWord(struct device *dev, int from) |
dev | 934 | drivers/net/de620.c | sendit(dev, 0); sendit(dev, 1); sendit(dev, 5); sendit(dev, 4); |
dev | 942 | drivers/net/de620.c | sendit(dev, 6); sendit(dev, 7); sendit(dev, 7); sendit(dev, 6); |
dev | 948 | drivers/net/de620.c | sendit(dev, 4); sendit(dev, 5); sendit(dev, 5); sendit(dev, 4); |
dev | 957 | drivers/net/de620.c | sendit(dev, 4); sendit(dev, 5); sendit(dev, 5); sendit(dev, 4); |
dev | 958 | drivers/net/de620.c | data = (data << 1) | ((de620_get_register(dev, R_STS) & EEDI) >> 7); |
dev | 963 | drivers/net/de620.c | sendit(dev, 0); sendit(dev, 1); sendit(dev, 1); sendit(dev, 0); |
dev | 969 | drivers/net/de620.c | read_eeprom(struct device *dev) |
dev | 974 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1aa); /* bytes 0 + 1 of NodeID */ |
dev | 980 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1ab); /* bytes 2 + 3 of NodeID */ |
dev | 986 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1ac); /* bytes 4 + 5 of NodeID */ |
dev | 990 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1ad); /* RAM size in pages (256 bytes). 0 = 64k */ |
dev | 993 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1ae); /* hardware model (CT = 3) */ |
dev | 996 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1af); /* media (indicates BNC/UTP) */ |
dev | 999 | drivers/net/de620.c | wrd = ReadAWord(dev, 0x1a8); /* System Configuration Register */ |
dev | 382 | drivers/net/depca.c | static int depca_open(struct device *dev); |
dev | 383 | drivers/net/depca.c | static int depca_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 385 | drivers/net/depca.c | static int depca_close(struct device *dev); |
dev | 386 | drivers/net/depca.c | static int depca_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 387 | drivers/net/depca.c | static struct enet_statistics *depca_get_stats(struct device *dev); |
dev | 388 | drivers/net/depca.c | static void set_multicast_list(struct device *dev); |
dev | 393 | drivers/net/depca.c | static int depca_hw_init(struct device *dev, u_long ioaddr); |
dev | 394 | drivers/net/depca.c | static void depca_init_ring(struct device *dev); |
dev | 395 | drivers/net/depca.c | static int depca_rx(struct device *dev); |
dev | 396 | drivers/net/depca.c | static int depca_tx(struct device *dev); |
dev | 398 | drivers/net/depca.c | static void LoadCSRs(struct device *dev); |
dev | 399 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev); |
dev | 402 | drivers/net/depca.c | static int get_hw_addr(struct device *dev); |
dev | 404 | drivers/net/depca.c | static void SetMulticastFilter(struct device *dev); |
dev | 405 | drivers/net/depca.c | static void isa_probe(struct device *dev, u_long iobase); |
dev | 406 | drivers/net/depca.c | static void eisa_probe(struct device *dev, u_long iobase); |
dev | 407 | drivers/net/depca.c | static struct device *alloc_device(struct device *dev, u_long iobase); |
dev | 408 | drivers/net/depca.c | static int load_packet(struct device *dev, struct sk_buff *skb); |
dev | 409 | drivers/net/depca.c | static void depca_dbg_open(struct device *dev); |
dev | 439 | drivers/net/depca.c | int depca_probe(struct device *dev) |
dev | 442 | drivers/net/depca.c | u_long iobase = dev->base_addr; |
dev | 448 | drivers/net/depca.c | isa_probe(dev, iobase); |
dev | 449 | drivers/net/depca.c | eisa_probe(dev, iobase); |
dev | 452 | drivers/net/depca.c | printk("%s: depca_probe() cannot find device at 0x%04lx.\n", dev->name, |
dev | 460 | drivers/net/depca.c | for (; (dev->priv == NULL) && (dev->next != NULL); dev = dev->next); |
dev | 462 | drivers/net/depca.c | if (dev->priv) status = 0; |
dev | 470 | drivers/net/depca.c | depca_hw_init(struct device *dev, u_long ioaddr) |
dev | 500 | drivers/net/depca.c | dev->base_addr = ioaddr; |
dev | 504 | drivers/net/depca.c | dev->name, name, ioaddr, (int)((ioaddr>>12)&0x0f)); |
dev | 506 | drivers/net/depca.c | printk("%s: %s at 0x%04lx", dev->name, name, ioaddr); |
dev | 510 | drivers/net/depca.c | status = get_hw_addr(dev); |
dev | 512 | drivers/net/depca.c | printk("%2.2x:", dev->dev_addr[i]); |
dev | 514 | drivers/net/depca.c | printk("%2.2x", dev->dev_addr[i]); |
dev | 542 | drivers/net/depca.c | dev->priv = (void *) kmalloc(sizeof(struct depca_private), GFP_KERNEL); |
dev | 543 | drivers/net/depca.c | if (dev->priv == NULL) |
dev | 545 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 546 | drivers/net/depca.c | memset((char *)dev->priv, 0, sizeof(struct depca_private)); |
dev | 548 | drivers/net/depca.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
dev | 583 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 586 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 594 | drivers/net/depca.c | if (dev->irq < 2) { |
dev | 625 | drivers/net/depca.c | for (dev->irq=0,i=0; (depca_irq[i]) && (!dev->irq); i++) { |
dev | 627 | drivers/net/depca.c | dev->irq = irqnum; |
dev | 628 | drivers/net/depca.c | printk(" and uses IRQ%d.\n", dev->irq); |
dev | 632 | drivers/net/depca.c | if (!dev->irq) { |
dev | 639 | drivers/net/depca.c | printk(" and assigned IRQ%d.\n", dev->irq); |
dev | 658 | drivers/net/depca.c | dev->open = &depca_open; |
dev | 659 | drivers/net/depca.c | dev->hard_start_xmit = &depca_start_xmit; |
dev | 660 | drivers/net/depca.c | dev->stop = &depca_close; |
dev | 661 | drivers/net/depca.c | dev->get_stats = &depca_get_stats; |
dev | 662 | drivers/net/depca.c | dev->set_multicast_list = &set_multicast_list; |
dev | 663 | drivers/net/depca.c | dev->do_ioctl = &depca_ioctl; |
dev | 665 | drivers/net/depca.c | dev->mem_start = 0; |
dev | 668 | drivers/net/depca.c | ether_setup(dev); |
dev | 670 | drivers/net/depca.c | if (dev->priv) { |
dev | 671 | drivers/net/depca.c | kfree_s(dev->priv, sizeof(struct depca_private)); |
dev | 672 | drivers/net/depca.c | dev->priv = NULL; |
dev | 684 | drivers/net/depca.c | depca_open(struct device *dev) |
dev | 686 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 687 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 691 | drivers/net/depca.c | irq2dev_map[dev->irq] = dev; |
dev | 702 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 703 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 705 | drivers/net/depca.c | depca_dbg_open(dev); |
dev | 707 | drivers/net/depca.c | if (request_irq(dev->irq, &depca_interrupt, 0, lp->adapter_name, NULL)) { |
dev | 708 | drivers/net/depca.c | printk("depca_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 717 | drivers/net/depca.c | dev->tbusy = 0; |
dev | 718 | drivers/net/depca.c | dev->interrupt = 0; |
dev | 719 | drivers/net/depca.c | dev->start = 1; |
dev | 721 | drivers/net/depca.c | status = InitRestartDepca(dev); |
dev | 736 | drivers/net/depca.c | depca_init_ring(struct device *dev) |
dev | 738 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 743 | drivers/net/depca.c | set_bit(0, (void *)&dev->tbusy); |
dev | 764 | drivers/net/depca.c | SetMulticastFilter(dev); |
dev | 767 | drivers/net/depca.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 779 | drivers/net/depca.c | depca_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 781 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 782 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 786 | drivers/net/depca.c | if (dev->tbusy) { |
dev | 787 | drivers/net/depca.c | int tickssofar = jiffies - dev->trans_start; |
dev | 792 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 795 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 796 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 797 | drivers/net/depca.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 798 | drivers/net/depca.c | dev->start = 1; |
dev | 799 | drivers/net/depca.c | dev->tbusy=0; |
dev | 800 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 801 | drivers/net/depca.c | InitRestartDepca(dev); |
dev | 805 | drivers/net/depca.c | dev_tint(dev); |
dev | 808 | drivers/net/depca.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 809 | drivers/net/depca.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 813 | drivers/net/depca.c | status = load_packet(dev, skb); |
dev | 820 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 824 | drivers/net/depca.c | dev->tbusy=0; |
dev | 841 | drivers/net/depca.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 846 | drivers/net/depca.c | if (dev == NULL) { |
dev | 849 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 850 | drivers/net/depca.c | ioaddr = dev->base_addr; |
dev | 852 | drivers/net/depca.c | if (dev->interrupt) |
dev | 853 | drivers/net/depca.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 855 | drivers/net/depca.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 869 | drivers/net/depca.c | depca_rx(dev); |
dev | 872 | drivers/net/depca.c | depca_tx(dev); |
dev | 874 | drivers/net/depca.c | if ((TX_BUFFS_AVAIL >= 0) && dev->tbusy) { /* any resources available? */ |
dev | 875 | drivers/net/depca.c | dev->tbusy = 0; /* clear TX busy flag */ |
dev | 883 | drivers/net/depca.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 890 | drivers/net/depca.c | depca_rx(struct device *dev) |
dev | 892 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 919 | drivers/net/depca.c | skb->dev = dev; |
dev | 932 | drivers/net/depca.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 953 | drivers/net/depca.c | } else if ((*(s16 *)&buf[0] == *(s16 *)&dev->dev_addr[0]) && |
dev | 954 | drivers/net/depca.c | (*(s16 *)&buf[2] == *(s16 *)&dev->dev_addr[2]) && |
dev | 955 | drivers/net/depca.c | (*(s16 *)&buf[4] == *(s16 *)&dev->dev_addr[4])) { |
dev | 964 | drivers/net/depca.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 990 | drivers/net/depca.c | depca_tx(struct device *dev) |
dev | 992 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 995 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1028 | drivers/net/depca.c | depca_close(struct device *dev) |
dev | 1030 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1032 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1034 | drivers/net/depca.c | dev->start = 0; |
dev | 1035 | drivers/net/depca.c | dev->tbusy = 1; |
dev | 1041 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 1062 | drivers/net/depca.c | free_irq(dev->irq, NULL); |
dev | 1063 | drivers/net/depca.c | irq2dev_map[dev->irq] = NULL; |
dev | 1070 | drivers/net/depca.c | static void LoadCSRs(struct device *dev) |
dev | 1072 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1073 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1087 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev) |
dev | 1089 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1090 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1107 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
dev | 1111 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
dev | 1119 | drivers/net/depca.c | depca_get_stats(struct device *dev) |
dev | 1121 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1132 | drivers/net/depca.c | set_multicast_list(struct device *dev) |
dev | 1134 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1135 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1137 | drivers/net/depca.c | if (irq2dev_map[dev->irq] != NULL) { |
dev | 1138 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1139 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1143 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1145 | drivers/net/depca.c | if (dev->flags & IFF_PROMISC) { /* Set promiscuous mode */ |
dev | 1148 | drivers/net/depca.c | SetMulticastFilter(dev); |
dev | 1152 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1153 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1154 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1164 | drivers/net/depca.c | static void SetMulticastFilter(struct device *dev) |
dev | 1166 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1167 | drivers/net/depca.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 1173 | drivers/net/depca.c | if (dev->flags & IFF_ALLMULTI) { /* Set all multicast bits */ |
dev | 1182 | drivers/net/depca.c | for (i=0;i<dev->mc_count;i++) { /* for each address in the list */ |
dev | 1212 | drivers/net/depca.c | static void isa_probe(struct device *dev, u_long ioaddr) |
dev | 1228 | drivers/net/depca.c | for (; (i<maxSlots) && (dev!=NULL) && ports[i]; i++) { |
dev | 1231 | drivers/net/depca.c | if ((dev = alloc_device(dev, ports[i])) != NULL) { |
dev | 1232 | drivers/net/depca.c | if (depca_hw_init(dev, ports[i]) == 0) { |
dev | 1238 | drivers/net/depca.c | printk("%s: region already allocated at 0x%04x.\n", dev->name,ports[i]); |
dev | 1250 | drivers/net/depca.c | static void eisa_probe(struct device *dev, u_long ioaddr) |
dev | 1270 | drivers/net/depca.c | for (; (i<maxSlots) && (dev!=NULL); i++, iobase+=EISA_SLOT_INC) { |
dev | 1274 | drivers/net/depca.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1275 | drivers/net/depca.c | if (depca_hw_init(dev, iobase) == 0) { |
dev | 1281 | drivers/net/depca.c | printk("%s: region already allocated at 0x%04lx.\n",dev->name,iobase); |
dev | 1294 | drivers/net/depca.c | static struct device *alloc_device(struct device *dev, u_long iobase) |
dev | 1304 | drivers/net/depca.c | while (dev->next != NULL) { |
dev | 1305 | drivers/net/depca.c | if ((dev->base_addr == DEPCA_NDA) || (dev->base_addr == 0)) break; |
dev | 1306 | drivers/net/depca.c | dev = dev->next; /* walk through eth device list */ |
dev | 1314 | drivers/net/depca.c | if ((dev->base_addr == 0) && (num_depcas > 0)) { |
dev | 1316 | drivers/net/depca.c | tmp = dev->next; /* point to the next device */ |
dev | 1317 | drivers/net/depca.c | init = dev->init; /* remember the probe function */ |
dev | 1324 | drivers/net/depca.c | if ((dev->next == NULL) && |
dev | 1325 | drivers/net/depca.c | !((dev->base_addr == DEPCA_NDA) || (dev->base_addr == 0))){ |
dev | 1326 | drivers/net/depca.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 1329 | drivers/net/depca.c | dev = dev->next; /* point to the new device */ |
dev | 1330 | drivers/net/depca.c | if (dev == NULL) { |
dev | 1339 | drivers/net/depca.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1341 | drivers/net/depca.c | sprintf(dev->name,"eth????"); /* New device name */ |
dev | 1343 | drivers/net/depca.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1345 | drivers/net/depca.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1346 | drivers/net/depca.c | dev->next = NULL; /* mark the end of list */ |
dev | 1347 | drivers/net/depca.c | dev->init = &depca_probe; /* initialisation routine */ |
dev | 1351 | drivers/net/depca.c | ret = dev; /* return current struct, or NULL */ |
dev | 1371 | drivers/net/depca.c | dev->name); |
dev | 1394 | drivers/net/depca.c | ret = dev; |
dev | 1457 | drivers/net/depca.c | } dev; |
dev | 1472 | drivers/net/depca.c | dev.llsig.a = ETH_PROM_SIG; |
dev | 1473 | drivers/net/depca.c | dev.llsig.b = ETH_PROM_SIG; |
dev | 1478 | drivers/net/depca.c | if (dev.Sig[j] == data) { /* track signature */ |
dev | 1481 | drivers/net/depca.c | if (data == dev.Sig[0]) { /* rare case.... */ |
dev | 1501 | drivers/net/depca.c | static int get_hw_addr(struct device *dev) |
dev | 1503 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1514 | drivers/net/depca.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 1516 | drivers/net/depca.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 1532 | drivers/net/depca.c | static int load_packet(struct device *dev, struct sk_buff *skb) |
dev | 1534 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1620 | drivers/net/depca.c | static void depca_dbg_open(struct device *dev) |
dev | 1622 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1623 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1631 | drivers/net/depca.c | printk("%s: depca open with irq %d\n",dev->name,dev->irq); |
dev | 1699 | drivers/net/depca.c | static int depca_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 1701 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1704 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1714 | drivers/net/depca.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 1727 | drivers/net/depca.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 1729 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1730 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1734 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1735 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1736 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1737 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1746 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1747 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1751 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1754 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1755 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1756 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1764 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1765 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1769 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1772 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1773 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1774 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1781 | drivers/net/depca.c | printk("%s: Boo!\n", dev->name); |
dev | 1795 | drivers/net/depca.c | set_multicast_list(dev); |
dev | 1804 | drivers/net/depca.c | set_multicast_list(dev); |
dev | 1812 | drivers/net/depca.c | set_multicast_list(dev); |
dev | 56 | drivers/net/dummy.c | static int dummy_xmit(struct sk_buff *skb, struct device *dev); |
dev | 58 | drivers/net/dummy.c | static struct enet_statistics *dummy_get_stats(struct device *dev); |
dev | 62 | drivers/net/dummy.c | static int dummy_open(struct device *dev) |
dev | 68 | drivers/net/dummy.c | static int dummy_close(struct device *dev) |
dev | 76 | drivers/net/dummy.c | int dummy_init(struct device *dev) |
dev | 83 | drivers/net/dummy.c | dev->hard_start_xmit = dummy_xmit; |
dev | 86 | drivers/net/dummy.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 87 | drivers/net/dummy.c | if (dev->priv == NULL) |
dev | 89 | drivers/net/dummy.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 90 | drivers/net/dummy.c | dev->get_stats = dummy_get_stats; |
dev | 93 | drivers/net/dummy.c | dev->open = &dummy_open; |
dev | 94 | drivers/net/dummy.c | dev->stop = &dummy_close; |
dev | 98 | drivers/net/dummy.c | ether_setup(dev); |
dev | 99 | drivers/net/dummy.c | dev->flags |= IFF_NOARP; |
dev | 105 | drivers/net/dummy.c | dummy_xmit(struct sk_buff *skb, struct device *dev) |
dev | 111 | drivers/net/dummy.c | if (skb == NULL || dev == NULL) |
dev | 117 | drivers/net/dummy.c | stats = (struct enet_statistics *)dev->priv; |
dev | 126 | drivers/net/dummy.c | dummy_get_stats(struct device *dev) |
dev | 128 | drivers/net/dummy.c | struct enet_statistics *stats = (struct enet_statistics*) dev->priv; |
dev | 135 | drivers/net/dummy.c | static int dummy_probe(struct device *dev) |
dev | 137 | drivers/net/dummy.c | dummy_init(dev); |
dev | 96 | drivers/net/e2100.c | int e2100_probe(struct device *dev); |
dev | 97 | drivers/net/e2100.c | int e21_probe1(struct device *dev, int ioaddr); |
dev | 99 | drivers/net/e2100.c | static int e21_open(struct device *dev); |
dev | 100 | drivers/net/e2100.c | static void e21_reset_8390(struct device *dev); |
dev | 101 | drivers/net/e2100.c | static void e21_block_input(struct device *dev, int count, |
dev | 103 | drivers/net/e2100.c | static void e21_block_output(struct device *dev, int count, |
dev | 105 | drivers/net/e2100.c | static void e21_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 108 | drivers/net/e2100.c | static int e21_close(struct device *dev); |
dev | 118 | drivers/net/e2100.c | int e2100_probe(struct device *dev) |
dev | 121 | drivers/net/e2100.c | int base_addr = dev->base_addr; |
dev | 124 | drivers/net/e2100.c | return e21_probe1(dev, base_addr); |
dev | 131 | drivers/net/e2100.c | if (e21_probe1(dev, *port) == 0) |
dev | 138 | drivers/net/e2100.c | int e21_probe1(struct device *dev, int ioaddr) |
dev | 141 | drivers/net/e2100.c | unsigned char *station_addr = dev->dev_addr; |
dev | 168 | drivers/net/e2100.c | if (dev == NULL) { |
dev | 170 | drivers/net/e2100.c | dev = init_etherdev(0, 0); |
dev | 173 | drivers/net/e2100.c | printk("%s: E21** at %#3x,", dev->name, ioaddr); |
dev | 177 | drivers/net/e2100.c | if (dev->irq < 2) { |
dev | 181 | drivers/net/e2100.c | dev->irq = irqlist[i]; |
dev | 185 | drivers/net/e2100.c | printk(" unable to get IRQ %d.\n", dev->irq); |
dev | 188 | drivers/net/e2100.c | } else if (dev->irq == 2) /* Fixup luser bogosity: IRQ2 is really IRQ9 */ |
dev | 189 | drivers/net/e2100.c | dev->irq = 9; |
dev | 192 | drivers/net/e2100.c | if (ethdev_init(dev)) { |
dev | 201 | drivers/net/e2100.c | dev->base_addr = ioaddr; |
dev | 208 | drivers/net/e2100.c | ei_status.saved_irq = dev->irq; |
dev | 212 | drivers/net/e2100.c | if (dev->mem_end & 15) |
dev | 213 | drivers/net/e2100.c | dev->if_port = dev->mem_end & 7; |
dev | 215 | drivers/net/e2100.c | dev->if_port = 0; |
dev | 219 | drivers/net/e2100.c | dev->if_port = 1; |
dev | 227 | drivers/net/e2100.c | if (dev->mem_start == 0) |
dev | 228 | drivers/net/e2100.c | dev->mem_start = 0xd0000; |
dev | 233 | drivers/net/e2100.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 234 | drivers/net/e2100.c | dev->mem_end = dev->rmem_end = dev->mem_start + 2*1024; |
dev | 237 | drivers/net/e2100.c | printk(", IRQ %d, %s media, memory @ %#lx.\n", dev->irq, |
dev | 238 | drivers/net/e2100.c | dev->if_port ? "secondary" : "primary", dev->mem_start); |
dev | 244 | drivers/net/e2100.c | dev->open = &e21_open; |
dev | 245 | drivers/net/e2100.c | dev->stop = &e21_close; |
dev | 246 | drivers/net/e2100.c | NS8390_init(dev, 0); |
dev | 252 | drivers/net/e2100.c | e21_open(struct device *dev) |
dev | 254 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 256 | drivers/net/e2100.c | if (request_irq(dev->irq, ei_interrupt, 0, "e2100", NULL)) { |
dev | 259 | drivers/net/e2100.c | irq2dev_map[dev->irq] = dev; |
dev | 263 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + (dev->irq & 7)); |
dev | 265 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + (dev->irq > 7 ? 1:0) |
dev | 266 | drivers/net/e2100.c | + (dev->if_port ? E21_ALT_IFPORT : 0)); |
dev | 268 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + ((dev->mem_start >> 17) & 7)); |
dev | 270 | drivers/net/e2100.c | ei_open(dev); |
dev | 276 | drivers/net/e2100.c | e21_reset_8390(struct device *dev) |
dev | 278 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 294 | drivers/net/e2100.c | e21_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 297 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 298 | drivers/net/e2100.c | char *shared_mem = (char *)dev->mem_start; |
dev | 318 | drivers/net/e2100.c | e21_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 320 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 321 | drivers/net/e2100.c | char *shared_mem = (char *)dev->mem_start; |
dev | 326 | drivers/net/e2100.c | eth_io_copy_and_sum(skb, dev->mem_start + (ring_offset & 0xff), count, 0); |
dev | 332 | drivers/net/e2100.c | e21_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 335 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 336 | drivers/net/e2100.c | volatile char *shared_mem = (char *)dev->mem_start; |
dev | 348 | drivers/net/e2100.c | e21_close(struct device *dev) |
dev | 350 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 353 | drivers/net/e2100.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 355 | drivers/net/e2100.c | free_irq(dev->irq, NULL); |
dev | 356 | drivers/net/e2100.c | dev->irq = ei_status.saved_irq; |
dev | 364 | drivers/net/e2100.c | irq2dev_map[dev->irq] = NULL; |
dev | 366 | drivers/net/e2100.c | ei_close(dev); |
dev | 409 | drivers/net/e2100.c | struct device *dev = &dev_e21[this_dev]; |
dev | 410 | drivers/net/e2100.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 411 | drivers/net/e2100.c | dev->irq = irq[this_dev]; |
dev | 412 | drivers/net/e2100.c | dev->base_addr = io[this_dev]; |
dev | 413 | drivers/net/e2100.c | dev->mem_start = mem[this_dev]; |
dev | 414 | drivers/net/e2100.c | dev->mem_end = xcvr[this_dev]; /* low 4bits = xcvr sel. */ |
dev | 415 | drivers/net/e2100.c | dev->init = e2100_probe; |
dev | 420 | drivers/net/e2100.c | if (register_netdev(dev) != 0) { |
dev | 437 | drivers/net/e2100.c | struct device *dev = &dev_e21[this_dev]; |
dev | 438 | drivers/net/e2100.c | if (dev->priv != NULL) { |
dev | 440 | drivers/net/e2100.c | kfree(dev->priv); |
dev | 441 | drivers/net/e2100.c | dev->priv = NULL; |
dev | 442 | drivers/net/e2100.c | release_region(dev->base_addr, E21_IO_EXTENT); |
dev | 443 | drivers/net/e2100.c | unregister_netdev(dev); |
dev | 133 | drivers/net/eepro.c | extern int eepro_probe(struct device *dev); |
dev | 135 | drivers/net/eepro.c | static int eepro_probe1(struct device *dev, short ioaddr); |
dev | 136 | drivers/net/eepro.c | static int eepro_open(struct device *dev); |
dev | 137 | drivers/net/eepro.c | static int eepro_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 139 | drivers/net/eepro.c | static void eepro_rx(struct device *dev); |
dev | 140 | drivers/net/eepro.c | static void eepro_transmit_interrupt(struct device *dev); |
dev | 141 | drivers/net/eepro.c | static int eepro_close(struct device *dev); |
dev | 142 | drivers/net/eepro.c | static struct enet_statistics *eepro_get_stats(struct device *dev); |
dev | 143 | drivers/net/eepro.c | static void set_multicast_list(struct device *dev); |
dev | 146 | drivers/net/eepro.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 147 | drivers/net/eepro.c | static int eepro_grab_irq(struct device *dev); |
dev | 276 | drivers/net/eepro.c | eepro_probe(struct device *dev) |
dev | 279 | drivers/net/eepro.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 282 | drivers/net/eepro.c | return eepro_probe1(dev, base_addr); |
dev | 290 | drivers/net/eepro.c | if (eepro_probe1(dev, ioaddr) == 0) |
dev | 302 | drivers/net/eepro.c | int eepro_probe1(struct device *dev, short ioaddr) |
dev | 338 | drivers/net/eepro.c | dev->name, ioaddr); |
dev | 343 | drivers/net/eepro.c | dev->name, ioaddr); |
dev | 347 | drivers/net/eepro.c | dev->base_addr = ioaddr; |
dev | 350 | drivers/net/eepro.c | dev->dev_addr[i] = ((unsigned char *) station_addr)[5-i]; |
dev | 351 | drivers/net/eepro.c | printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); |
dev | 357 | drivers/net/eepro.c | dev->if_port = TPE; |
dev | 358 | drivers/net/eepro.c | else dev->if_port = BNC; |
dev | 360 | drivers/net/eepro.c | if (dev->irq < 2 && eepro) { |
dev | 363 | drivers/net/eepro.c | case 0: dev->irq = 9; break; |
dev | 364 | drivers/net/eepro.c | case 1: dev->irq = 3; break; |
dev | 365 | drivers/net/eepro.c | case 2: dev->irq = 5; break; |
dev | 366 | drivers/net/eepro.c | case 3: dev->irq = 10; break; |
dev | 367 | drivers/net/eepro.c | case 4: dev->irq = 11; break; |
dev | 373 | drivers/net/eepro.c | else if (dev->irq == 2) |
dev | 374 | drivers/net/eepro.c | dev->irq = 9; |
dev | 376 | drivers/net/eepro.c | if (dev->irq > 2) { |
dev | 377 | drivers/net/eepro.c | printk(", IRQ %d, %s.\n", dev->irq, |
dev | 378 | drivers/net/eepro.c | ifmap[dev->if_port]); |
dev | 379 | drivers/net/eepro.c | if (request_irq(dev->irq, &eepro_interrupt, 0, "eepro", NULL)) { |
dev | 380 | drivers/net/eepro.c | printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq); |
dev | 384 | drivers/net/eepro.c | else printk(", %s.\n", ifmap[dev->if_port]); |
dev | 386 | drivers/net/eepro.c | if ((dev->mem_start & 0xf) > 0) |
dev | 387 | drivers/net/eepro.c | net_debug = dev->mem_start & 7; |
dev | 393 | drivers/net/eepro.c | dev->name); |
dev | 403 | drivers/net/eepro.c | dev->priv = kmalloc(sizeof(struct eepro_local), GFP_KERNEL); |
dev | 404 | drivers/net/eepro.c | if (dev->priv == NULL) |
dev | 406 | drivers/net/eepro.c | memset(dev->priv, 0, sizeof(struct eepro_local)); |
dev | 408 | drivers/net/eepro.c | dev->open = eepro_open; |
dev | 409 | drivers/net/eepro.c | dev->stop = eepro_close; |
dev | 410 | drivers/net/eepro.c | dev->hard_start_xmit = eepro_send_packet; |
dev | 411 | drivers/net/eepro.c | dev->get_stats = eepro_get_stats; |
dev | 412 | drivers/net/eepro.c | dev->set_multicast_list = &set_multicast_list; |
dev | 417 | drivers/net/eepro.c | ether_setup(dev); |
dev | 439 | drivers/net/eepro.c | static int eepro_grab_irq(struct device *dev) |
dev | 442 | drivers/net/eepro.c | int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr; |
dev | 472 | drivers/net/eepro.c | (request_irq(dev->irq = *irqp, &eepro_interrupt, 0, "eepro", NULL) == 0)) |
dev | 494 | drivers/net/eepro.c | return dev->irq; |
dev | 498 | drivers/net/eepro.c | eepro_open(struct device *dev) |
dev | 501 | drivers/net/eepro.c | int i, ioaddr = dev->base_addr; |
dev | 502 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 507 | drivers/net/eepro.c | if (dev->dev_addr[0] == SA_ADDR0 && |
dev | 508 | drivers/net/eepro.c | dev->dev_addr[1] == SA_ADDR1 && |
dev | 509 | drivers/net/eepro.c | dev->dev_addr[2] == SA_ADDR2) |
dev | 514 | drivers/net/eepro.c | if (dev->irq < 2 && eepro_grab_irq(dev) == 0) { |
dev | 515 | drivers/net/eepro.c | printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq); |
dev | 519 | drivers/net/eepro.c | if (irq2dev_map[dev->irq] != 0 |
dev | 520 | drivers/net/eepro.c | || (irq2dev_map[dev->irq] = dev) == 0) |
dev | 530 | drivers/net/eepro.c | outb(dev->dev_addr[i] , ioaddr + I_ADD_REG0 + i); |
dev | 546 | drivers/net/eepro.c | outb((temp_reg & 0xf8) | irqrmap[dev->irq], ioaddr + INT_NO_REG); |
dev | 581 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 582 | drivers/net/eepro.c | dev->interrupt = 0; |
dev | 583 | drivers/net/eepro.c | dev->start = 1; |
dev | 595 | drivers/net/eepro.c | eepro_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 597 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 598 | drivers/net/eepro.c | int ioaddr = dev->base_addr; |
dev | 603 | drivers/net/eepro.c | if (dev->tbusy) { |
dev | 606 | drivers/net/eepro.c | int tickssofar = jiffies - dev->trans_start; |
dev | 610 | drivers/net/eepro.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 623 | drivers/net/eepro.c | dev->tbusy=0; |
dev | 624 | drivers/net/eepro.c | dev->trans_start = jiffies; |
dev | 634 | drivers/net/eepro.c | dev_tint(dev); |
dev | 639 | drivers/net/eepro.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 640 | drivers/net/eepro.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 645 | drivers/net/eepro.c | hardware_send_packet(dev, buf, length); |
dev | 646 | drivers/net/eepro.c | dev->trans_start = jiffies; |
dev | 666 | drivers/net/eepro.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 672 | drivers/net/eepro.c | if (dev == NULL) { |
dev | 676 | drivers/net/eepro.c | dev->interrupt = 1; |
dev | 678 | drivers/net/eepro.c | ioaddr = dev->base_addr; |
dev | 691 | drivers/net/eepro.c | eepro_rx(dev); |
dev | 701 | drivers/net/eepro.c | eepro_transmit_interrupt(dev); |
dev | 702 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 707 | drivers/net/eepro.c | dev->interrupt = 0; |
dev | 715 | drivers/net/eepro.c | eepro_close(struct device *dev) |
dev | 717 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 718 | drivers/net/eepro.c | int ioaddr = dev->base_addr; |
dev | 721 | drivers/net/eepro.c | dev->tbusy = 1; |
dev | 722 | drivers/net/eepro.c | dev->start = 0; |
dev | 747 | drivers/net/eepro.c | free_irq(dev->irq, NULL); |
dev | 749 | drivers/net/eepro.c | irq2dev_map[dev->irq] = 0; |
dev | 764 | drivers/net/eepro.c | eepro_get_stats(struct device *dev) |
dev | 766 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 774 | drivers/net/eepro.c | set_multicast_list(struct device *dev) |
dev | 776 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 777 | drivers/net/eepro.c | short ioaddr = dev->base_addr; |
dev | 779 | drivers/net/eepro.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 781 | drivers/net/eepro.c | if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || dev->mc_count > 63) |
dev | 789 | drivers/net/eepro.c | dev->flags|=IFF_PROMISC; |
dev | 797 | drivers/net/eepro.c | printk("%s: promiscuous mode enabled.\n", dev->name); |
dev | 799 | drivers/net/eepro.c | else if (dev->mc_count==0 ) |
dev | 828 | drivers/net/eepro.c | outw(6*(dev->mc_count + 1), ioaddr + IO_PORT); |
dev | 829 | drivers/net/eepro.c | for (i = 0; i < dev->mc_count; i++) |
dev | 837 | drivers/net/eepro.c | eaddrs = (unsigned short *) dev->dev_addr; |
dev | 845 | drivers/net/eepro.c | i = lp->tx_end + XMT_HEADER + 6*(dev->mc_count + 1); |
dev | 869 | drivers/net/eepro.c | dev->name); |
dev | 873 | drivers/net/eepro.c | dev->name, dev->mc_count); |
dev | 934 | drivers/net/eepro.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 936 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 937 | drivers/net/eepro.c | short ioaddr = dev->base_addr; |
dev | 1009 | drivers/net/eepro.c | if (dev->tbusy) { |
dev | 1010 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 1018 | drivers/net/eepro.c | dev->tbusy = 1; |
dev | 1024 | drivers/net/eepro.c | eepro_rx(struct device *dev) |
dev | 1026 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 1027 | drivers/net/eepro.c | short ioaddr = dev->base_addr; |
dev | 1051 | drivers/net/eepro.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 1055 | drivers/net/eepro.c | skb->dev = dev; |
dev | 1060 | drivers/net/eepro.c | skb->protocol = eth_type_trans(skb,dev); |
dev | 1074 | drivers/net/eepro.c | dev->name, rcv_event, rcv_status, rcv_next_frame, rcv_size); |
dev | 1096 | drivers/net/eepro.c | eepro_transmit_interrupt(struct device *dev) |
dev | 1098 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 1099 | drivers/net/eepro.c | short ioaddr = dev->base_addr; |
dev | 1111 | drivers/net/eepro.c | if (dev->tbusy) { |
dev | 1112 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 1123 | drivers/net/eepro.c | dev->name, xmt_status); |
dev | 217 | drivers/net/eexpress.c | extern int express_probe(struct device *dev); |
dev | 218 | drivers/net/eexpress.c | static int eexp_open (struct device *dev); |
dev | 219 | drivers/net/eexpress.c | static int eexp_close(struct device *dev); |
dev | 220 | drivers/net/eexpress.c | static struct enet_statistics *eexp_stats(struct device *dev); |
dev | 221 | drivers/net/eexpress.c | static int eexp_xmit (struct sk_buff *buf, struct device *dev); |
dev | 229 | drivers/net/eexpress.c | static void eexp_hw_rx (struct device *dev); |
dev | 230 | drivers/net/eexpress.c | static void eexp_hw_tx (struct device *dev, unsigned short *buf, unsigned short len); |
dev | 231 | drivers/net/eexpress.c | static int eexp_hw_probe (struct device *dev,unsigned short ioaddr); |
dev | 234 | drivers/net/eexpress.c | static unsigned short eexp_hw_lasttxstat(struct device *dev); |
dev | 235 | drivers/net/eexpress.c | static void eexp_hw_txrestart (struct device *dev); |
dev | 237 | drivers/net/eexpress.c | static void eexp_hw_txinit (struct device *dev); |
dev | 238 | drivers/net/eexpress.c | static void eexp_hw_rxinit (struct device *dev); |
dev | 239 | drivers/net/eexpress.c | static void eexp_hw_rxmap (struct device *dev,unsigned short rx_buf); |
dev | 241 | drivers/net/eexpress.c | static void eexp_hw_init586 (struct device *dev); |
dev | 242 | drivers/net/eexpress.c | static void eexp_hw_ASICrst (struct device *dev); |
dev | 252 | drivers/net/eexpress.c | int express_probe(struct device *dev) |
dev | 255 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 258 | drivers/net/eexpress.c | return eexp_hw_probe(dev,ioaddr); |
dev | 272 | drivers/net/eexpress.c | if (sum==0xbaba && !eexp_hw_probe(dev,*port)) |
dev | 282 | drivers/net/eexpress.c | static int eexp_open(struct device *dev) |
dev | 284 | drivers/net/eexpress.c | int irq = dev->irq; |
dev | 285 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 288 | drivers/net/eexpress.c | printk("%s: eexp_open()\n", dev->name); |
dev | 296 | drivers/net/eexpress.c | ((irq2dev_map[irq]=dev),0) || |
dev | 301 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 302 | drivers/net/eexpress.c | dev->interrupt = 0; |
dev | 303 | drivers/net/eexpress.c | eexp_hw_init586(dev); |
dev | 304 | drivers/net/eexpress.c | dev->start = 1; |
dev | 312 | drivers/net/eexpress.c | static int eexp_close(struct device *dev) |
dev | 314 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 315 | drivers/net/eexpress.c | int irq = dev->irq; |
dev | 317 | drivers/net/eexpress.c | dev->tbusy = 1; |
dev | 318 | drivers/net/eexpress.c | dev->start = 0; |
dev | 335 | drivers/net/eexpress.c | static struct enet_statistics *eexp_stats(struct device *dev) |
dev | 337 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 353 | drivers/net/eexpress.c | static int eexp_xmit(struct sk_buff *buf, struct device *dev) |
dev | 355 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 356 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 359 | drivers/net/eexpress.c | printk("%s: eexp_xmit()\n", dev->name); |
dev | 362 | drivers/net/eexpress.c | outb(SIRQ_dis|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 363 | drivers/net/eexpress.c | if (dev->tbusy) |
dev | 371 | drivers/net/eexpress.c | if ((jiffies - dev->trans_start)>5) |
dev | 377 | drivers/net/eexpress.c | dev->name,inw(ioaddr+SCB_STATUS)); |
dev | 378 | drivers/net/eexpress.c | eexp_hw_txinit(dev); |
dev | 390 | drivers/net/eexpress.c | dev->name,rsst); |
dev | 397 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 405 | drivers/net/eexpress.c | unsigned short txstatus = eexp_hw_lasttxstat(dev); |
dev | 407 | drivers/net/eexpress.c | dev->name, status, txstatus); |
dev | 408 | drivers/net/eexpress.c | eexp_hw_txrestart(dev); |
dev | 412 | drivers/net/eexpress.c | unsigned short txstatus = eexp_hw_lasttxstat(dev); |
dev | 413 | drivers/net/eexpress.c | if (dev->tbusy && !txstatus) |
dev | 416 | drivers/net/eexpress.c | dev->name,status,txstatus); |
dev | 417 | drivers/net/eexpress.c | eexp_hw_init586(dev); |
dev | 418 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 431 | drivers/net/eexpress.c | dev->name, status); |
dev | 432 | drivers/net/eexpress.c | eexp_hw_init586(dev); |
dev | 433 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 442 | drivers/net/eexpress.c | unsigned short txstatus = eexp_hw_lasttxstat(dev); |
dev | 446 | drivers/net/eexpress.c | dev->name, status, txstatus); |
dev | 448 | drivers/net/eexpress.c | eexp_hw_txrestart(dev); |
dev | 450 | drivers/net/eexpress.c | dev_tint(dev); |
dev | 451 | drivers/net/eexpress.c | outb(SIRQ_en|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 455 | drivers/net/eexpress.c | if (set_bit(0,(void *)&dev->tbusy)) |
dev | 465 | drivers/net/eexpress.c | outb(SIRQ_dis|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 466 | drivers/net/eexpress.c | eexp_hw_tx(dev,data,length); |
dev | 467 | drivers/net/eexpress.c | outb(SIRQ_en|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 470 | drivers/net/eexpress.c | outb(SIRQ_en|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 483 | drivers/net/eexpress.c | struct device *dev = irq2dev_map[irq]; |
dev | 488 | drivers/net/eexpress.c | if (dev==NULL) |
dev | 495 | drivers/net/eexpress.c | printk("%s: interrupt\n", dev->name); |
dev | 498 | drivers/net/eexpress.c | dev->interrupt = 1; /* should this be reset on exit? */ |
dev | 500 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
dev | 501 | drivers/net/eexpress.c | ioaddr = dev->base_addr; |
dev | 521 | drivers/net/eexpress.c | txstatus = eexp_hw_lasttxstat(dev); |
dev | 526 | drivers/net/eexpress.c | eexp_hw_rx(dev); |
dev | 532 | drivers/net/eexpress.c | dev->name,status); |
dev | 534 | drivers/net/eexpress.c | eexp_hw_rxinit(dev); |
dev | 559 | drivers/net/eexpress.c | static void eexp_hw_rx(struct device *dev) |
dev | 561 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 562 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 569 | drivers/net/eexpress.c | printk("%s: eexp_hw_rx()\n", dev->name); |
dev | 589 | drivers/net/eexpress.c | "next %04x, pbuf %04x, len %04x\n",dev->name,rx_block, |
dev | 591 | drivers/net/eexpress.c | eexp_hw_rxmap(dev,rx_block); |
dev | 616 | drivers/net/eexpress.c | printk("%s: Memory squeeze, dropping packet\n",dev->name); |
dev | 620 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 624 | drivers/net/eexpress.c | skb->protocol = eth_type_trans(skb,dev); |
dev | 645 | drivers/net/eexpress.c | static void eexp_hw_tx(struct device *dev, unsigned short *buf, unsigned short len) |
dev | 647 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 648 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 666 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 673 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 685 | drivers/net/eexpress.c | static int eexp_hw_probe(struct device *dev, unsigned short ioaddr) |
dev | 691 | drivers/net/eexpress.c | printk("%s: EtherExpress at %#x, ",dev->name,ioaddr); |
dev | 704 | drivers/net/eexpress.c | dev->base_addr = ioaddr; |
dev | 706 | drivers/net/eexpress.c | dev->dev_addr[i] = chw_addr[5-i]; |
dev | 714 | drivers/net/eexpress.c | dev->irq = irqmap[setupval>>13]; |
dev | 715 | drivers/net/eexpress.c | dev->if_port = !(setupval & 0x1000) ? AUI : |
dev | 718 | drivers/net/eexpress.c | printk("IRQ %d, Interface %s, ",dev->irq,ifmap[dev->if_port]); |
dev | 720 | drivers/net/eexpress.c | outb(SIRQ_dis|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 724 | drivers/net/eexpress.c | eexp_hw_ASICrst(dev); |
dev | 777 | drivers/net/eexpress.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 778 | drivers/net/eexpress.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 779 | drivers/net/eexpress.c | dev->open = eexp_open; |
dev | 780 | drivers/net/eexpress.c | dev->stop = eexp_close; |
dev | 781 | drivers/net/eexpress.c | dev->hard_start_xmit = eexp_xmit; |
dev | 782 | drivers/net/eexpress.c | dev->get_stats = eexp_stats; |
dev | 783 | drivers/net/eexpress.c | ether_setup(dev); |
dev | 839 | drivers/net/eexpress.c | static unsigned short eexp_hw_lasttxstat(struct device *dev) |
dev | 841 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 842 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 848 | drivers/net/eexpress.c | if (!test_bit(0,(void *)&dev->tbusy) && lp->tx_head==lp->tx_reap) |
dev | 882 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 901 | drivers/net/eexpress.c | static void eexp_hw_txrestart(struct device *dev) |
dev | 903 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 904 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 921 | drivers/net/eexpress.c | dev->name, inw(ioaddr+SCB_STATUS), inw(ioaddr+SCB_CMD)); |
dev | 930 | drivers/net/eexpress.c | printk("%s: Failed to restart CU, resetting board...\n",dev->name); |
dev | 931 | drivers/net/eexpress.c | eexp_hw_init586(dev); |
dev | 932 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 954 | drivers/net/eexpress.c | static void eexp_hw_txinit(struct device *dev) |
dev | 956 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 957 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 1002 | drivers/net/eexpress.c | static void eexp_hw_rxinit(struct device *dev) |
dev | 1004 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 1005 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 1041 | drivers/net/eexpress.c | static void eexp_hw_rxmap(struct device *dev, unsigned short rx_buf) |
dev | 1043 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 1044 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 1070 | drivers/net/eexpress.c | static void eexp_hw_init586(struct device *dev) |
dev | 1072 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 1073 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 1078 | drivers/net/eexpress.c | outb(SIRQ_dis|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 1092 | drivers/net/eexpress.c | outsw(ioaddr,dev->dev_addr,3); |
dev | 1093 | drivers/net/eexpress.c | eexp_hw_txinit(dev); |
dev | 1094 | drivers/net/eexpress.c | eexp_hw_rxinit(dev); |
dev | 1107 | drivers/net/eexpress.c | dev->name); |
dev | 1114 | drivers/net/eexpress.c | dev->name); |
dev | 1134 | drivers/net/eexpress.c | dev->name, inw(ioaddr+SCB_STATUS), inw(ioaddr+SCB_CMD)); |
dev | 1143 | drivers/net/eexpress.c | printk("%s: Failed to initialize i82586, giving up.\n",dev->name); |
dev | 1150 | drivers/net/eexpress.c | outb(SIRQ_en|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 1154 | drivers/net/eexpress.c | printk("%s: Uh? We haven't started yet\n",dev->name); |
dev | 1164 | drivers/net/eexpress.c | static void eexp_hw_ASICrst(struct device *dev) |
dev | 1166 | drivers/net/eexpress.c | unsigned short ioaddr = dev->base_addr; |
dev | 1169 | drivers/net/eexpress.c | outb(SIRQ_dis|irqrmap[dev->irq],ioaddr+SET_IRQ); |
dev | 1192 | drivers/net/eexpress.c | dev->name); |
dev | 145 | drivers/net/eql.c | int eql_init(struct device *dev); /* */ |
dev | 146 | drivers/net/eql.c | static int eql_open(struct device *dev); /* */ |
dev | 147 | drivers/net/eql.c | static int eql_close(struct device *dev); /* */ |
dev | 148 | drivers/net/eql.c | static int eql_ioctl(struct device *dev, struct ifreq *ifr, int cmd); /* */ |
dev | 149 | drivers/net/eql.c | static int eql_slave_xmit(struct sk_buff *skb, struct device *dev); /* */ |
dev | 151 | drivers/net/eql.c | static struct enet_statistics *eql_get_stats(struct device *dev); /* */ |
dev | 152 | drivers/net/eql.c | static int eql_header(struct sk_buff *skb, struct device *dev, |
dev | 155 | drivers/net/eql.c | static int eql_rebuild_header(void *buff, struct device *dev, |
dev | 160 | drivers/net/eql.c | static int eql_enslave(struct device *dev, slaving_request_t *srq); /* */ |
dev | 161 | drivers/net/eql.c | static int eql_emancipate(struct device *dev, slaving_request_t *srq); /* */ |
dev | 163 | drivers/net/eql.c | static int eql_g_slave_cfg(struct device *dev, slave_config_t *sc); /* */ |
dev | 164 | drivers/net/eql.c | static int eql_s_slave_cfg(struct device *dev, slave_config_t *sc); /* */ |
dev | 166 | drivers/net/eql.c | static int eql_g_master_cfg(struct device *dev, master_config_t *mc); /* */ |
dev | 167 | drivers/net/eql.c | static int eql_s_master_cfg(struct device *dev, master_config_t *mc); /* */ |
dev | 169 | drivers/net/eql.c | static inline int eql_is_slave(struct device *dev); /* */ |
dev | 170 | drivers/net/eql.c | static inline int eql_is_master(struct device *dev); /* */ |
dev | 181 | drivers/net/eql.c | static slave_queue_t *eql_new_slave_queue(struct device *dev); /* */ |
dev | 188 | drivers/net/eql.c | static int eql_remove_slave_dev(slave_queue_t *queue, struct device *dev); /* */ |
dev | 198 | drivers/net/eql.c | static slave_t *eql_find_slave_dev(slave_queue_t *queue, struct device *dev); /* */ |
dev | 209 | drivers/net/eql.c | int eql_init(struct device *dev) |
dev | 221 | drivers/net/eql.c | dev->priv = kmalloc (sizeof (equalizer_t), GFP_KERNEL); |
dev | 222 | drivers/net/eql.c | if (dev->priv == NULL) |
dev | 224 | drivers/net/eql.c | memset (dev->priv, 0, sizeof (equalizer_t)); |
dev | 225 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 230 | drivers/net/eql.c | kfree(dev->priv); |
dev | 231 | drivers/net/eql.c | dev->priv = NULL; |
dev | 237 | drivers/net/eql.c | eql->timer.data = (unsigned long) dev->priv; |
dev | 242 | drivers/net/eql.c | dev->open = eql_open; |
dev | 243 | drivers/net/eql.c | dev->stop = eql_close; |
dev | 244 | drivers/net/eql.c | dev->do_ioctl = eql_ioctl; |
dev | 245 | drivers/net/eql.c | dev->hard_start_xmit = eql_slave_xmit; |
dev | 246 | drivers/net/eql.c | dev->get_stats = eql_get_stats; |
dev | 255 | drivers/net/eql.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 257 | drivers/net/eql.c | dev->hard_header = eql_header; |
dev | 258 | drivers/net/eql.c | dev->rebuild_header = eql_rebuild_header; |
dev | 265 | drivers/net/eql.c | dev->mtu = EQL_DEFAULT_MTU; /* set to 576 in eql.h */ |
dev | 266 | drivers/net/eql.c | dev->flags = IFF_MASTER; |
dev | 268 | drivers/net/eql.c | dev->family = AF_INET; |
dev | 269 | drivers/net/eql.c | dev->pa_addr = 0; |
dev | 270 | drivers/net/eql.c | dev->pa_brdaddr = 0; |
dev | 271 | drivers/net/eql.c | dev->pa_mask = 0; |
dev | 272 | drivers/net/eql.c | dev->pa_alen = 4; |
dev | 274 | drivers/net/eql.c | dev->type = ARPHRD_SLIP; |
dev | 275 | drivers/net/eql.c | dev->tx_queue_len = 5; /* Hands them off fast */ |
dev | 280 | drivers/net/eql.c | static int eql_open(struct device *dev) |
dev | 282 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 287 | drivers/net/eql.c | printk ("%s: open\n", dev->name); |
dev | 290 | drivers/net/eql.c | new_queue = eql_new_slave_queue (dev); |
dev | 294 | drivers/net/eql.c | new_queue->master_dev = dev; |
dev | 300 | drivers/net/eql.c | printk ("%s: adding timer\n", dev->name); |
dev | 311 | drivers/net/eql.c | static int eql_close(struct device *dev) |
dev | 313 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 317 | drivers/net/eql.c | printk ("%s: close\n", dev->name); |
dev | 325 | drivers/net/eql.c | printk ("%s: stopping timer\n", dev->name); |
dev | 337 | drivers/net/eql.c | static int eql_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 344 | drivers/net/eql.c | return eql_enslave (dev, (slaving_request_t *) ifr->ifr_data); |
dev | 346 | drivers/net/eql.c | return eql_emancipate (dev, (slaving_request_t *) ifr->ifr_data); |
dev | 348 | drivers/net/eql.c | return eql_g_slave_cfg (dev, (slave_config_t *) ifr->ifr_data); |
dev | 350 | drivers/net/eql.c | return eql_s_slave_cfg (dev, (slave_config_t *) ifr->ifr_data); |
dev | 352 | drivers/net/eql.c | return eql_g_master_cfg (dev, (master_config_t *) ifr->ifr_data); |
dev | 354 | drivers/net/eql.c | return eql_s_master_cfg (dev, (master_config_t *) ifr->ifr_data); |
dev | 361 | drivers/net/eql.c | static int eql_slave_xmit(struct sk_buff *skb, struct device *dev) |
dev | 363 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 380 | drivers/net/eql.c | dev->name, eql_number_slaves (eql->queue), skb->len, |
dev | 401 | drivers/net/eql.c | static struct enet_statistics * eql_get_stats(struct device *dev) |
dev | 403 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 408 | drivers/net/eql.c | static int eql_header(struct sk_buff *skb, struct device *dev, |
dev | 416 | drivers/net/eql.c | static int eql_rebuild_header(void *buff, struct device *dev, |
dev | 426 | drivers/net/eql.c | static int eql_enslave(struct device *dev, slaving_request_t *srqp) |
dev | 440 | drivers/net/eql.c | printk ("%s: enslave '%s' %ld bps\n", dev->name, |
dev | 443 | drivers/net/eql.c | master_dev = dev; /* for "clarity" */ |
dev | 453 | drivers/net/eql.c | s->dev = slave_dev; |
dev | 466 | drivers/net/eql.c | static int eql_emancipate(struct device *dev, slaving_request_t *srqp) |
dev | 480 | drivers/net/eql.c | printk ("%s: emancipate `%s`\n", dev->name, srq.slave_name); |
dev | 482 | drivers/net/eql.c | master_dev = dev; /* for "clarity" */ |
dev | 496 | drivers/net/eql.c | static int eql_g_slave_cfg(struct device *dev, slave_config_t *scp) |
dev | 511 | drivers/net/eql.c | printk ("%s: get config for slave `%s'\n", dev->name, sc.slave_name); |
dev | 513 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 533 | drivers/net/eql.c | static int eql_s_slave_cfg(struct device *dev, slave_config_t *scp) |
dev | 547 | drivers/net/eql.c | printk ("%s: set config for slave `%s'\n", dev->name, sc.slave_name); |
dev | 552 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 570 | drivers/net/eql.c | static int eql_g_master_cfg(struct device *dev, master_config_t *mcp) |
dev | 577 | drivers/net/eql.c | printk ("%s: get master config\n", dev->name); |
dev | 580 | drivers/net/eql.c | if ( eql_is_master (dev) ) |
dev | 586 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 596 | drivers/net/eql.c | static int eql_s_master_cfg(struct device *dev, master_config_t *mcp) |
dev | 607 | drivers/net/eql.c | printk ("%s: set master config\n", dev->name); |
dev | 610 | drivers/net/eql.c | if ( eql_is_master (dev) ) |
dev | 612 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 624 | drivers/net/eql.c | static inline int eql_is_slave(struct device *dev) |
dev | 626 | drivers/net/eql.c | if (dev) |
dev | 628 | drivers/net/eql.c | if ((dev->flags & IFF_SLAVE) == IFF_SLAVE) |
dev | 635 | drivers/net/eql.c | static inline int eql_is_master(struct device *dev) |
dev | 637 | drivers/net/eql.c | if (dev) |
dev | 639 | drivers/net/eql.c | if ((dev->flags & IFF_MASTER) == IFF_MASTER) |
dev | 701 | drivers/net/eql.c | static slave_queue_t *eql_new_slave_queue(struct device *dev) |
dev | 721 | drivers/net/eql.c | queue->master_dev = dev; |
dev | 762 | drivers/net/eql.c | duplicate_slave = eql_find_slave_dev (queue, slave->dev); |
dev | 790 | drivers/net/eql.c | curr->dev != 0 ) |
dev | 810 | drivers/net/eql.c | static int eql_insert_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 818 | drivers/net/eql.c | slave->dev = dev; |
dev | 833 | drivers/net/eql.c | static int eql_remove_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 839 | drivers/net/eql.c | target = eql_find_slave_dev (queue, dev); |
dev | 865 | drivers/net/eql.c | if (queue->best_slave->dev != 0) |
dev | 866 | drivers/net/eql.c | return queue->best_slave->dev; |
dev | 928 | drivers/net/eql.c | if ( slave->dev != 0) |
dev | 930 | drivers/net/eql.c | if ((slave->dev->flags & IFF_UP) == IFF_UP ) |
dev | 965 | drivers/net/eql.c | static slave_t * eql_find_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 970 | drivers/net/eql.c | while (slave != 0 && slave->dev != dev && slave != 0) |
dev | 973 | drivers/net/eql.c | if (slave->dev != 0) |
dev | 974 | drivers/net/eql.c | printk ("eql: find_slave_dev; looked at '%s'...\n", slave->dev->name); |
dev | 1052 | drivers/net/eql.c | if ((slave->dev->flags & IFF_UP) == IFF_UP ) |
dev | 313 | drivers/net/eth16i.c | extern int eth16i_probe(struct device *dev); |
dev | 315 | drivers/net/eth16i.c | static int eth16i_probe1(struct device *dev, short ioaddr); |
dev | 325 | drivers/net/eth16i.c | static int eth16i_open(struct device *dev); |
dev | 326 | drivers/net/eth16i.c | static int eth16i_close(struct device *dev); |
dev | 327 | drivers/net/eth16i.c | static int eth16i_tx(struct sk_buff *skb, struct device *dev); |
dev | 328 | drivers/net/eth16i.c | static void eth16i_rx(struct device *dev); |
dev | 330 | drivers/net/eth16i.c | static void eth16i_multicast(struct device *dev, int num_addrs, void *addrs); |
dev | 332 | drivers/net/eth16i.c | static void eth16i_initialize(struct device *dev); |
dev | 333 | drivers/net/eth16i.c | static struct enet_statistics *eth16i_get_stats(struct device *dev); |
dev | 343 | drivers/net/eth16i.c | int eth16i_probe(struct device *dev) |
dev | 347 | drivers/net/eth16i.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 353 | drivers/net/eth16i.c | return eth16i_probe1(dev, base_addr); |
dev | 361 | drivers/net/eth16i.c | if(eth16i_probe1(dev, ioaddr) == 0) |
dev | 369 | drivers/net/eth16i.c | if(eth16i_probe1(dev, ioaddr) == 0) |
dev | 377 | drivers/net/eth16i.c | static int eth16i_probe1(struct device *dev, short ioaddr) |
dev | 414 | drivers/net/eth16i.c | if(dev == NULL) |
dev | 415 | drivers/net/eth16i.c | dev = init_etherdev(0, sizeof(struct eth16i_local)); |
dev | 420 | drivers/net/eth16i.c | dev->base_addr = ioaddr; |
dev | 423 | drivers/net/eth16i.c | dev->irq = irq; |
dev | 426 | drivers/net/eth16i.c | if(request_irq(dev->irq, ð16i_interrupt, 0, "eth16i", NULL)) { |
dev | 428 | drivers/net/eth16i.c | conflict on IRQ %d.\n", dev->name, cardname, ioaddr, irq); |
dev | 433 | drivers/net/eth16i.c | dev->name, cardname, ioaddr, dev->irq); |
dev | 442 | drivers/net/eth16i.c | eth16i_initialize(dev); /* Initialize rest of the chip's registers */ |
dev | 448 | drivers/net/eth16i.c | if(dev->priv == NULL) |
dev | 449 | drivers/net/eth16i.c | dev->priv = kmalloc(sizeof(struct eth16i_local), GFP_KERNEL); |
dev | 450 | drivers/net/eth16i.c | memset(dev->priv, 0, sizeof(struct eth16i_local)); |
dev | 452 | drivers/net/eth16i.c | dev->open = eth16i_open; |
dev | 453 | drivers/net/eth16i.c | dev->stop = eth16i_close; |
dev | 454 | drivers/net/eth16i.c | dev->hard_start_xmit = eth16i_tx; |
dev | 455 | drivers/net/eth16i.c | dev->get_stats = eth16i_get_stats; |
dev | 456 | drivers/net/eth16i.c | dev->set_multicast_list = ð16i_multicast; |
dev | 459 | drivers/net/eth16i.c | ether_setup(dev); |
dev | 467 | drivers/net/eth16i.c | static void eth16i_initialize(struct device *dev) |
dev | 469 | drivers/net/eth16i.c | short ioaddr = dev->base_addr; |
dev | 477 | drivers/net/eth16i.c | ((unsigned short *)dev->dev_addr)[i] = ntohs(node_val); |
dev | 481 | drivers/net/eth16i.c | outb( ((unsigned char *)dev->dev_addr)[i], ioaddr + NODE_ID_0 + i); |
dev | 525 | drivers/net/eth16i.c | dev->if_port = (ptype & 0x00FF); |
dev | 527 | drivers/net/eth16i.c | printk(" %s interface.\n", porttype[dev->if_port]); |
dev | 789 | drivers/net/eth16i.c | static int eth16i_open(struct device *dev) |
dev | 791 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
dev | 792 | drivers/net/eth16i.c | int ioaddr = dev->base_addr; |
dev | 794 | drivers/net/eth16i.c | irq2dev_map[dev->irq] = dev; |
dev | 800 | drivers/net/eth16i.c | eth16i_initialize(dev); |
dev | 806 | drivers/net/eth16i.c | printk("%s: transmit buffer size %d\n", dev->name, lp->tx_buf_size); |
dev | 822 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 823 | drivers/net/eth16i.c | dev->interrupt = 0; |
dev | 824 | drivers/net/eth16i.c | dev->start = 1; |
dev | 833 | drivers/net/eth16i.c | static int eth16i_close(struct device *dev) |
dev | 835 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
dev | 836 | drivers/net/eth16i.c | int ioaddr = dev->base_addr; |
dev | 840 | drivers/net/eth16i.c | dev->tbusy = 1; |
dev | 841 | drivers/net/eth16i.c | dev->start = 0; |
dev | 859 | drivers/net/eth16i.c | static int eth16i_tx(struct sk_buff *skb, struct device *dev) |
dev | 861 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
dev | 862 | drivers/net/eth16i.c | int ioaddr = dev->base_addr; |
dev | 864 | drivers/net/eth16i.c | if(dev->tbusy) { |
dev | 870 | drivers/net/eth16i.c | int tickssofar = jiffies - dev->trans_start; |
dev | 874 | drivers/net/eth16i.c | printk("%s: transmit timed out with status %04x, %s ?\n", dev->name, |
dev | 882 | drivers/net/eth16i.c | dev->name, inb(ioaddr + 0), inb(ioaddr + 1), inb(ioaddr + 2), |
dev | 899 | drivers/net/eth16i.c | eth16i_initialize(dev); |
dev | 909 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 910 | drivers/net/eth16i.c | dev->trans_start = jiffies; |
dev | 919 | drivers/net/eth16i.c | dev_tint(dev); |
dev | 929 | drivers/net/eth16i.c | if(set_bit(0, (void *)&dev->tbusy) != 0) |
dev | 930 | drivers/net/eth16i.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 959 | drivers/net/eth16i.c | dev->trans_start = jiffies; |
dev | 961 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 965 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 978 | drivers/net/eth16i.c | static void eth16i_rx(struct device *dev) |
dev | 980 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
dev | 981 | drivers/net/eth16i.c | int ioaddr = dev->base_addr; |
dev | 992 | drivers/net/eth16i.c | dev->name, inb(ioaddr + RECEIVE_MODE_REG), status); |
dev | 1010 | drivers/net/eth16i.c | dev->name, cardname, pkt_len); |
dev | 1019 | drivers/net/eth16i.c | dev->name, pkt_len); |
dev | 1025 | drivers/net/eth16i.c | skb->dev = dev; |
dev | 1051 | drivers/net/eth16i.c | skb->protocol=eth_type_trans(skb, dev); |
dev | 1057 | drivers/net/eth16i.c | printk("%s: Received packet of length %d.\n", dev->name, pkt_len); |
dev | 1082 | drivers/net/eth16i.c | printk("%s: Flushed receive buffer.\n", dev->name); |
dev | 1091 | drivers/net/eth16i.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 1096 | drivers/net/eth16i.c | if(dev == NULL) { |
dev | 1104 | drivers/net/eth16i.c | dev->interrupt = 1; |
dev | 1106 | drivers/net/eth16i.c | ioaddr = dev->base_addr; |
dev | 1107 | drivers/net/eth16i.c | lp = (struct eth16i_local *)dev->priv; |
dev | 1112 | drivers/net/eth16i.c | printk("%s: Interrupt with status %04x.\n", dev->name, status); |
dev | 1125 | drivers/net/eth16i.c | dev->trans_start = jiffies; |
dev | 1126 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 1131 | drivers/net/eth16i.c | dev->tbusy = 0; |
dev | 1139 | drivers/net/eth16i.c | eth16i_rx(dev); /* We have packet in receive buffer */ |
dev | 1142 | drivers/net/eth16i.c | dev->interrupt = 0; |
dev | 1150 | drivers/net/eth16i.c | static void eth16i_multicast(struct device *dev, int num_addrs, void *addrs) |
dev | 1152 | drivers/net/eth16i.c | short ioaddr = dev->base_addr; |
dev | 1154 | drivers/net/eth16i.c | if(dev->mc_count || dev->flags&(IFF_ALLMULTI|IFF_PROMISC)) |
dev | 1156 | drivers/net/eth16i.c | dev->flags|=IFF_PROMISC; /* Must do this */ |
dev | 1163 | drivers/net/eth16i.c | static struct enet_statistics *eth16i_get_stats(struct device *dev) |
dev | 1165 | drivers/net/eth16i.c | struct eth16i_local *lp = (struct eth16i_local *)dev->priv; |
dev | 289 | drivers/net/ewrk3.c | static int ewrk3_open(struct device *dev); |
dev | 290 | drivers/net/ewrk3.c | static int ewrk3_queue_pkt(struct sk_buff *skb, struct device *dev); |
dev | 292 | drivers/net/ewrk3.c | static int ewrk3_close(struct device *dev); |
dev | 293 | drivers/net/ewrk3.c | static struct enet_statistics *ewrk3_get_stats(struct device *dev); |
dev | 294 | drivers/net/ewrk3.c | static void set_multicast_list(struct device *dev); |
dev | 295 | drivers/net/ewrk3.c | static int ewrk3_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 300 | drivers/net/ewrk3.c | static int ewrk3_hw_init(struct device *dev, u_long iobase); |
dev | 301 | drivers/net/ewrk3.c | static void ewrk3_init(struct device *dev); |
dev | 302 | drivers/net/ewrk3.c | static int ewrk3_rx(struct device *dev); |
dev | 303 | drivers/net/ewrk3.c | static int ewrk3_tx(struct device *dev); |
dev | 307 | drivers/net/ewrk3.c | static void SetMulticastFilter(struct device *dev); |
dev | 312 | drivers/net/ewrk3.c | static u_char get_hw_addr (struct device *dev, u_char *eeprom_image, char chipType); |
dev | 314 | drivers/net/ewrk3.c | static void isa_probe(struct device *dev, u_long iobase); |
dev | 315 | drivers/net/ewrk3.c | static void eisa_probe(struct device *dev, u_long iobase); |
dev | 316 | drivers/net/ewrk3.c | static struct device *alloc_device(struct device *dev, u_long iobase); |
dev | 344 | drivers/net/ewrk3.c | int ewrk3_probe(struct device *dev) |
dev | 347 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 354 | drivers/net/ewrk3.c | isa_probe(dev, iobase); |
dev | 355 | drivers/net/ewrk3.c | eisa_probe(dev, iobase); |
dev | 358 | drivers/net/ewrk3.c | printk("%s: ewrk3_probe() cannot find device at 0x%04lx.\n", dev->name, |
dev | 366 | drivers/net/ewrk3.c | for (; (dev->priv == NULL) && (dev->next != NULL); dev = dev->next); |
dev | 368 | drivers/net/ewrk3.c | if (dev->priv) status = 0; |
dev | 376 | drivers/net/ewrk3.c | ewrk3_hw_init(struct device *dev, u_long iobase) |
dev | 413 | drivers/net/ewrk3.c | printk("%s: Device has a bad on-board EEPROM.\n", dev->name); |
dev | 418 | drivers/net/ewrk3.c | dev->base_addr = iobase; |
dev | 429 | drivers/net/ewrk3.c | printk("%s: %s at %#4lx", dev->name, name, iobase); |
dev | 434 | drivers/net/ewrk3.c | dev->name, name, iobase, ((iobase>>12)&0x0f)); |
dev | 436 | drivers/net/ewrk3.c | printk("%s: %s at %#4lx", dev->name, name, iobase); |
dev | 442 | drivers/net/ewrk3.c | status = get_hw_addr(dev, eeprom_image, lemac); |
dev | 444 | drivers/net/ewrk3.c | printk("%2.2x:", dev->dev_addr[i]); |
dev | 446 | drivers/net/ewrk3.c | printk("%2.2x,\n", dev->dev_addr[i]); |
dev | 508 | drivers/net/ewrk3.c | dev->priv = (void *) kmalloc(sizeof(struct ewrk3_private), |
dev | 510 | drivers/net/ewrk3.c | if (dev->priv == NULL) { |
dev | 513 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
dev | 514 | drivers/net/ewrk3.c | memset(dev->priv, 0, sizeof(struct ewrk3_private)); |
dev | 523 | drivers/net/ewrk3.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
dev | 536 | drivers/net/ewrk3.c | dev->dma = 0; |
dev | 540 | drivers/net/ewrk3.c | if (dev->irq < 2) { |
dev | 555 | drivers/net/ewrk3.c | dev->irq = autoirq_report(1); |
dev | 556 | drivers/net/ewrk3.c | if ((dev->irq) && (irqnum == dev->irq)) { |
dev | 557 | drivers/net/ewrk3.c | printk(" and uses IRQ%d.\n", dev->irq); |
dev | 559 | drivers/net/ewrk3.c | if (!dev->irq) { |
dev | 573 | drivers/net/ewrk3.c | printk(" and requires IRQ%d.\n", dev->irq); |
dev | 593 | drivers/net/ewrk3.c | dev->open = &ewrk3_open; |
dev | 594 | drivers/net/ewrk3.c | dev->hard_start_xmit = &ewrk3_queue_pkt; |
dev | 595 | drivers/net/ewrk3.c | dev->stop = &ewrk3_close; |
dev | 596 | drivers/net/ewrk3.c | dev->get_stats = &ewrk3_get_stats; |
dev | 597 | drivers/net/ewrk3.c | dev->set_multicast_list = &set_multicast_list; |
dev | 598 | drivers/net/ewrk3.c | dev->do_ioctl = &ewrk3_ioctl; |
dev | 600 | drivers/net/ewrk3.c | dev->mem_start = 0; |
dev | 603 | drivers/net/ewrk3.c | ether_setup(dev); |
dev | 614 | drivers/net/ewrk3.c | ewrk3_open(struct device *dev) |
dev | 616 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 617 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 627 | drivers/net/ewrk3.c | irq2dev_map[dev->irq] = dev; /* For latched interrupts */ |
dev | 629 | drivers/net/ewrk3.c | if (request_irq(dev->irq, (void *)ewrk3_interrupt, 0, "ewrk3", NULL)) { |
dev | 630 | drivers/net/ewrk3.c | printk("ewrk3_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 637 | drivers/net/ewrk3.c | ewrk3_init(dev); |
dev | 640 | drivers/net/ewrk3.c | printk("%s: ewrk3 open with irq %d\n",dev->name,dev->irq); |
dev | 643 | drivers/net/ewrk3.c | printk("%2.2x:",(u_char)dev->dev_addr[i]); |
dev | 645 | drivers/net/ewrk3.c | printk("%2.2x\n",(u_char)dev->dev_addr[i]); |
dev | 660 | drivers/net/ewrk3.c | dev->tbusy = 0; |
dev | 661 | drivers/net/ewrk3.c | dev->start = 1; |
dev | 662 | drivers/net/ewrk3.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 672 | drivers/net/ewrk3.c | dev->start = 0; |
dev | 673 | drivers/net/ewrk3.c | dev->tbusy = 1; |
dev | 674 | drivers/net/ewrk3.c | printk("%s: ewrk3 available for hard strapped set up only.\n", dev->name); |
dev | 687 | drivers/net/ewrk3.c | ewrk3_init(struct device *dev) |
dev | 689 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 691 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 696 | drivers/net/ewrk3.c | set_multicast_list(dev); |
dev | 722 | drivers/net/ewrk3.c | ewrk3_queue_pkt(struct sk_buff *skb, struct device *dev) |
dev | 724 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 725 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 730 | drivers/net/ewrk3.c | if (dev->tbusy || lp->lock) { |
dev | 731 | drivers/net/ewrk3.c | int tickssofar = jiffies - dev->trans_start; |
dev | 736 | drivers/net/ewrk3.c | dev->name, inb(EWRK3_CSR)); |
dev | 748 | drivers/net/ewrk3.c | ewrk3_init(dev); |
dev | 755 | drivers/net/ewrk3.c | dev->tbusy=0; |
dev | 756 | drivers/net/ewrk3.c | dev->trans_start = jiffies; |
dev | 759 | drivers/net/ewrk3.c | dev_tint(dev); |
dev | 766 | drivers/net/ewrk3.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 767 | drivers/net/ewrk3.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 796 | drivers/net/ewrk3.c | printk("%s: Oops - your private data area is hosed!\n",dev->name); |
dev | 843 | drivers/net/ewrk3.c | dev->trans_start = jiffies; |
dev | 861 | drivers/net/ewrk3.c | dev->tbusy = 0; |
dev | 876 | drivers/net/ewrk3.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 881 | drivers/net/ewrk3.c | if (dev == NULL) { |
dev | 884 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
dev | 885 | drivers/net/ewrk3.c | iobase = dev->base_addr; |
dev | 887 | drivers/net/ewrk3.c | if (dev->interrupt) |
dev | 888 | drivers/net/ewrk3.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 890 | drivers/net/ewrk3.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 905 | drivers/net/ewrk3.c | ewrk3_rx(dev); |
dev | 908 | drivers/net/ewrk3.c | ewrk3_tx(dev); |
dev | 920 | drivers/net/ewrk3.c | dev->tbusy = 0; /* clear TX busy flag */ |
dev | 930 | drivers/net/ewrk3.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 938 | drivers/net/ewrk3.c | ewrk3_rx(struct device *dev) |
dev | 940 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 941 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 976 | drivers/net/ewrk3.c | printk("%s: Oops - your private data area is hosed!\n",dev->name); |
dev | 1004 | drivers/net/ewrk3.c | skb->dev = dev; |
dev | 1021 | drivers/net/ewrk3.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1041 | drivers/net/ewrk3.c | } else if ((*(s32 *)&p[0] == *(s32 *)&dev->dev_addr[0]) && |
dev | 1042 | drivers/net/ewrk3.c | (*(s16 *)&p[4] == *(s16 *)&dev->dev_addr[4])) { |
dev | 1051 | drivers/net/ewrk3.c | printk("%s: Insufficient memory; nuking packet.\n", dev->name); |
dev | 1082 | drivers/net/ewrk3.c | ewrk3_tx(struct device *dev) |
dev | 1084 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1085 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1117 | drivers/net/ewrk3.c | ewrk3_close(struct device *dev) |
dev | 1119 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1120 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1123 | drivers/net/ewrk3.c | dev->start = 0; |
dev | 1124 | drivers/net/ewrk3.c | dev->tbusy = 1; |
dev | 1128 | drivers/net/ewrk3.c | dev->name, inb(EWRK3_CSR)); |
dev | 1149 | drivers/net/ewrk3.c | free_irq(dev->irq, NULL); |
dev | 1151 | drivers/net/ewrk3.c | irq2dev_map[dev->irq] = 0; |
dev | 1160 | drivers/net/ewrk3.c | ewrk3_get_stats(struct device *dev) |
dev | 1162 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1173 | drivers/net/ewrk3.c | set_multicast_list(struct device *dev) |
dev | 1175 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1176 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1179 | drivers/net/ewrk3.c | if (irq2dev_map[dev->irq] != NULL) { |
dev | 1189 | drivers/net/ewrk3.c | if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */ |
dev | 1193 | drivers/net/ewrk3.c | SetMulticastFilter(dev); |
dev | 1208 | drivers/net/ewrk3.c | static void SetMulticastFilter(struct device *dev) |
dev | 1210 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1211 | drivers/net/ewrk3.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 1212 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1228 | drivers/net/ewrk3.c | if (dev->flags & IFF_ALLMULTI) { |
dev | 1253 | drivers/net/ewrk3.c | for (i=0;i<dev->mc_count;i++) { /* for each address in the list */ |
dev | 1292 | drivers/net/ewrk3.c | static void isa_probe(struct device *dev, u_long ioaddr) |
dev | 1308 | drivers/net/ewrk3.c | for (; (i<maxSlots) && (dev!=NULL);iobase+=EWRK3_IOP_INC, i++) { |
dev | 1311 | drivers/net/ewrk3.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1312 | drivers/net/ewrk3.c | if (ewrk3_hw_init(dev, iobase) == 0) { |
dev | 1319 | drivers/net/ewrk3.c | printk("%s: region already allocated at 0x%04lx.\n", dev->name, iobase); |
dev | 1330 | drivers/net/ewrk3.c | static void eisa_probe(struct device *dev, u_long ioaddr) |
dev | 1349 | drivers/net/ewrk3.c | for (i=1; (i<maxSlots) && (dev!=NULL); i++, iobase+=EISA_SLOT_INC) { |
dev | 1353 | drivers/net/ewrk3.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1354 | drivers/net/ewrk3.c | if (ewrk3_hw_init(dev, iobase) == 0) { |
dev | 1361 | drivers/net/ewrk3.c | printk("%s: region already allocated at 0x%04lx.\n", dev->name, iobase); |
dev | 1373 | drivers/net/ewrk3.c | static struct device *alloc_device(struct device *dev, u_long iobase) |
dev | 1383 | drivers/net/ewrk3.c | while (dev->next != NULL) { |
dev | 1384 | drivers/net/ewrk3.c | if ((dev->base_addr == EWRK3_NDA) || (dev->base_addr == 0)) break; |
dev | 1385 | drivers/net/ewrk3.c | dev = dev->next; /* walk through eth device list */ |
dev | 1393 | drivers/net/ewrk3.c | if ((dev->base_addr == 0) && (num_ewrk3s > 0)) { |
dev | 1395 | drivers/net/ewrk3.c | tmp = dev->next; /* point to the next device */ |
dev | 1396 | drivers/net/ewrk3.c | init = dev->init; /* remember the probe function */ |
dev | 1403 | drivers/net/ewrk3.c | if ((dev->next == NULL) && |
dev | 1404 | drivers/net/ewrk3.c | !((dev->base_addr == EWRK3_NDA) || (dev->base_addr == 0))){ |
dev | 1405 | drivers/net/ewrk3.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 1408 | drivers/net/ewrk3.c | dev = dev->next; /* point to the new device */ |
dev | 1409 | drivers/net/ewrk3.c | if (dev == NULL) { |
dev | 1418 | drivers/net/ewrk3.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1420 | drivers/net/ewrk3.c | sprintf(dev->name,"eth????"); /* New device name */ |
dev | 1422 | drivers/net/ewrk3.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1424 | drivers/net/ewrk3.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1425 | drivers/net/ewrk3.c | dev->next = NULL; /* mark the end of list */ |
dev | 1426 | drivers/net/ewrk3.c | dev->init = &ewrk3_probe; /* initialisation routine */ |
dev | 1430 | drivers/net/ewrk3.c | ret = dev; /* return current struct, or NULL */ |
dev | 1450 | drivers/net/ewrk3.c | dev->name); |
dev | 1473 | drivers/net/ewrk3.c | ret = dev; |
dev | 1560 | drivers/net/ewrk3.c | } dev; |
dev | 1565 | drivers/net/ewrk3.c | dev.llsig.a = ETH_PROM_SIG; |
dev | 1566 | drivers/net/ewrk3.c | dev.llsig.b = ETH_PROM_SIG; |
dev | 1571 | drivers/net/ewrk3.c | if (dev.Sig[j] == data) { /* track signature */ |
dev | 1574 | drivers/net/ewrk3.c | if (data == dev.Sig[0]) { |
dev | 1589 | drivers/net/ewrk3.c | static u_char get_hw_addr(struct device *dev, u_char *eeprom_image, char chipType) |
dev | 1594 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1599 | drivers/net/ewrk3.c | sd = dev->dev_addr[j] = eeprom_image[EEPROM_PADDR0 + j]; |
dev | 1600 | drivers/net/ewrk3.c | outb(dev->dev_addr[j], EWRK3_PAR0 + j); |
dev | 1613 | drivers/net/ewrk3.c | dev->dev_addr[i] = (u_char) tmp; |
dev | 1614 | drivers/net/ewrk3.c | outb(dev->dev_addr[i], EWRK3_PAR0 + i); |
dev | 1617 | drivers/net/ewrk3.c | dev->dev_addr[i] = (u_char) tmp; |
dev | 1618 | drivers/net/ewrk3.c | outb(dev->dev_addr[i], EWRK3_PAR0 + i); |
dev | 1672 | drivers/net/ewrk3.c | static int ewrk3_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 1674 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1676 | drivers/net/ewrk3.c | u_long iobase = dev->base_addr; |
dev | 1687 | drivers/net/ewrk3.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 1704 | drivers/net/ewrk3.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 1738 | drivers/net/ewrk3.c | printk("%s: Boo!\n", dev->name); |
dev | 1764 | drivers/net/ewrk3.c | set_multicast_list(dev); |
dev | 1773 | drivers/net/ewrk3.c | set_multicast_list(dev); |
dev | 95 | drivers/net/hp-plus.c | int hp_plus_probe(struct device *dev); |
dev | 96 | drivers/net/hp-plus.c | int hpp_probe1(struct device *dev, int ioaddr); |
dev | 98 | drivers/net/hp-plus.c | static void hpp_reset_8390(struct device *dev); |
dev | 99 | drivers/net/hp-plus.c | static int hpp_open(struct device *dev); |
dev | 100 | drivers/net/hp-plus.c | static int hpp_close(struct device *dev); |
dev | 101 | drivers/net/hp-plus.c | static void hpp_mem_block_input(struct device *dev, int count, |
dev | 103 | drivers/net/hp-plus.c | static void hpp_mem_block_output(struct device *dev, int count, |
dev | 105 | drivers/net/hp-plus.c | static void hpp_mem_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 107 | drivers/net/hp-plus.c | static void hpp_io_block_input(struct device *dev, int count, |
dev | 109 | drivers/net/hp-plus.c | static void hpp_io_block_output(struct device *dev, int count, |
dev | 111 | drivers/net/hp-plus.c | static void hpp_io_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 124 | drivers/net/hp-plus.c | int hp_plus_probe(struct device *dev) |
dev | 127 | drivers/net/hp-plus.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 130 | drivers/net/hp-plus.c | return hpp_probe1(dev, base_addr); |
dev | 138 | drivers/net/hp-plus.c | if (hpp_probe1(dev, ioaddr) == 0) |
dev | 147 | drivers/net/hp-plus.c | int hpp_probe1(struct device *dev, int ioaddr) |
dev | 161 | drivers/net/hp-plus.c | if (dev == NULL) { |
dev | 163 | drivers/net/hp-plus.c | dev = init_etherdev(0, 0); |
dev | 169 | drivers/net/hp-plus.c | printk("%s: %s at %#3x,", dev->name, name, ioaddr); |
dev | 176 | drivers/net/hp-plus.c | dev->dev_addr[i] = inval; |
dev | 192 | drivers/net/hp-plus.c | if (ethdev_init(dev)) { |
dev | 206 | drivers/net/hp-plus.c | dev->irq = irq; |
dev | 220 | drivers/net/hp-plus.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 222 | drivers/net/hp-plus.c | dev->open = &hpp_open; |
dev | 223 | drivers/net/hp-plus.c | dev->stop = &hpp_close; |
dev | 241 | drivers/net/hp-plus.c | dev->mem_start = mem_start; |
dev | 242 | drivers/net/hp-plus.c | dev->rmem_start = dev->mem_start + TX_2X_PAGES*256; |
dev | 243 | drivers/net/hp-plus.c | dev->mem_end = dev->rmem_end |
dev | 244 | drivers/net/hp-plus.c | = dev->mem_start + (HP_STOP_PG - HP_START_PG)*256; |
dev | 248 | drivers/net/hp-plus.c | NS8390_init(dev, 0); |
dev | 256 | drivers/net/hp-plus.c | hpp_open(struct device *dev) |
dev | 258 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 261 | drivers/net/hp-plus.c | if (request_irq(dev->irq, &ei_interrupt, 0, "hp-plus", NULL)) { |
dev | 279 | drivers/net/hp-plus.c | ei_open(dev); |
dev | 285 | drivers/net/hp-plus.c | hpp_close(struct device *dev) |
dev | 287 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 290 | drivers/net/hp-plus.c | free_irq(dev->irq, NULL); |
dev | 291 | drivers/net/hp-plus.c | irq2dev_map[dev->irq] = NULL; |
dev | 292 | drivers/net/hp-plus.c | ei_close(dev); |
dev | 301 | drivers/net/hp-plus.c | hpp_reset_8390(struct device *dev) |
dev | 303 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 319 | drivers/net/hp-plus.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 329 | drivers/net/hp-plus.c | hpp_io_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 331 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 340 | drivers/net/hp-plus.c | hpp_io_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 342 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 354 | drivers/net/hp-plus.c | hpp_mem_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 356 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 361 | drivers/net/hp-plus.c | memcpy_fromio(hdr, dev->mem_start, sizeof(struct e8390_pkt_hdr)); |
dev | 367 | drivers/net/hp-plus.c | hpp_mem_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 369 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 380 | drivers/net/hp-plus.c | memcpy_fromio(skb->data, dev->mem_start, count); |
dev | 387 | drivers/net/hp-plus.c | hpp_io_block_output(struct device *dev, int count, |
dev | 390 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 397 | drivers/net/hp-plus.c | hpp_mem_block_output(struct device *dev, int count, |
dev | 400 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 405 | drivers/net/hp-plus.c | memcpy_toio(dev->mem_start, buf, (count + 3) & ~3); |
dev | 436 | drivers/net/hp-plus.c | struct device *dev = &dev_hpp[this_dev]; |
dev | 437 | drivers/net/hp-plus.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 438 | drivers/net/hp-plus.c | dev->irq = irq[this_dev]; |
dev | 439 | drivers/net/hp-plus.c | dev->base_addr = io[this_dev]; |
dev | 440 | drivers/net/hp-plus.c | dev->init = hp_plus_probe; |
dev | 445 | drivers/net/hp-plus.c | if (register_netdev(dev) != 0) { |
dev | 462 | drivers/net/hp-plus.c | struct device *dev = &dev_hpp[this_dev]; |
dev | 463 | drivers/net/hp-plus.c | if (dev->priv != NULL) { |
dev | 465 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 466 | drivers/net/hp-plus.c | kfree(dev->priv); |
dev | 467 | drivers/net/hp-plus.c | dev->priv = NULL; |
dev | 469 | drivers/net/hp-plus.c | unregister_netdev(dev); |
dev | 57 | drivers/net/hp.c | int hp_probe(struct device *dev); |
dev | 58 | drivers/net/hp.c | int hp_probe1(struct device *dev, int ioaddr); |
dev | 60 | drivers/net/hp.c | static int hp_open(struct device *dev); |
dev | 61 | drivers/net/hp.c | static int hp_close(struct device *dev); |
dev | 62 | drivers/net/hp.c | static void hp_reset_8390(struct device *dev); |
dev | 63 | drivers/net/hp.c | static void hp_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 65 | drivers/net/hp.c | static void hp_block_input(struct device *dev, int count, |
dev | 67 | drivers/net/hp.c | static void hp_block_output(struct device *dev, int count, |
dev | 70 | drivers/net/hp.c | static void hp_init_card(struct device *dev); |
dev | 85 | drivers/net/hp.c | int hp_probe(struct device *dev) |
dev | 88 | drivers/net/hp.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 91 | drivers/net/hp.c | return hp_probe1(dev, base_addr); |
dev | 99 | drivers/net/hp.c | if (hp_probe1(dev, ioaddr) == 0) |
dev | 107 | drivers/net/hp.c | int hp_probe1(struct device *dev, int ioaddr) |
dev | 133 | drivers/net/hp.c | if (dev == NULL) { |
dev | 135 | drivers/net/hp.c | dev = init_etherdev(0, 0); |
dev | 141 | drivers/net/hp.c | printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); |
dev | 144 | drivers/net/hp.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 147 | drivers/net/hp.c | if (dev->irq < 2) { |
dev | 161 | drivers/net/hp.c | dev->irq = *irqp; |
dev | 171 | drivers/net/hp.c | if (dev->irq == 2) |
dev | 172 | drivers/net/hp.c | dev->irq = 9; |
dev | 173 | drivers/net/hp.c | if (request_irq(dev->irq, ei_interrupt, 0, "hp", NULL)) { |
dev | 174 | drivers/net/hp.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 180 | drivers/net/hp.c | if (ethdev_init(dev)) { |
dev | 182 | drivers/net/hp.c | free_irq(dev->irq, NULL); |
dev | 190 | drivers/net/hp.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 191 | drivers/net/hp.c | dev->open = &hp_open; |
dev | 192 | drivers/net/hp.c | dev->stop = &hp_close; |
dev | 204 | drivers/net/hp.c | hp_init_card(dev); |
dev | 210 | drivers/net/hp.c | hp_open(struct device *dev) |
dev | 212 | drivers/net/hp.c | ei_open(dev); |
dev | 218 | drivers/net/hp.c | hp_close(struct device *dev) |
dev | 220 | drivers/net/hp.c | ei_close(dev); |
dev | 226 | drivers/net/hp.c | hp_reset_8390(struct device *dev) |
dev | 228 | drivers/net/hp.c | int hp_base = dev->base_addr - NIC_OFFSET; |
dev | 242 | drivers/net/hp.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 249 | drivers/net/hp.c | hp_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 251 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 276 | drivers/net/hp.c | hp_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 278 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 305 | drivers/net/hp.c | dev->name, ring_offset + xfer_count, addr); |
dev | 311 | drivers/net/hp.c | hp_block_output(struct device *dev, int count, |
dev | 314 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 362 | drivers/net/hp.c | dev->name, (start_page << 8) + count, addr); |
dev | 370 | drivers/net/hp.c | hp_init_card(struct device *dev) |
dev | 372 | drivers/net/hp.c | int irq = dev->irq; |
dev | 373 | drivers/net/hp.c | NS8390_init(dev, 0); |
dev | 375 | drivers/net/hp.c | dev->base_addr - NIC_OFFSET + HP_CONFIGURE); |
dev | 403 | drivers/net/hp.c | struct device *dev = &dev_hp[this_dev]; |
dev | 404 | drivers/net/hp.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 405 | drivers/net/hp.c | dev->irq = irq[this_dev]; |
dev | 406 | drivers/net/hp.c | dev->base_addr = io[this_dev]; |
dev | 407 | drivers/net/hp.c | dev->init = hp_probe; |
dev | 412 | drivers/net/hp.c | if (register_netdev(dev) != 0) { |
dev | 429 | drivers/net/hp.c | struct device *dev = &dev_hp[this_dev]; |
dev | 430 | drivers/net/hp.c | if (dev->priv != NULL) { |
dev | 431 | drivers/net/hp.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 432 | drivers/net/hp.c | kfree(dev->priv); |
dev | 433 | drivers/net/hp.c | dev->priv = NULL; |
dev | 434 | drivers/net/hp.c | free_irq(dev->irq, NULL); |
dev | 435 | drivers/net/hp.c | irq2dev_map[dev->irq] = NULL; |
dev | 437 | drivers/net/hp.c | unregister_netdev(dev); |
dev | 190 | drivers/net/hp100.c | static int hp100_probe1( struct device *dev, int ioaddr, int bus ); |
dev | 191 | drivers/net/hp100.c | static int hp100_open( struct device *dev ); |
dev | 192 | drivers/net/hp100.c | static int hp100_close( struct device *dev ); |
dev | 193 | drivers/net/hp100.c | static int hp100_start_xmit( struct sk_buff *skb, struct device *dev ); |
dev | 194 | drivers/net/hp100.c | static void hp100_rx( struct device *dev ); |
dev | 195 | drivers/net/hp100.c | static struct enet_statistics *hp100_get_stats( struct device *dev ); |
dev | 196 | drivers/net/hp100.c | static void hp100_update_stats( struct device *dev ); |
dev | 198 | drivers/net/hp100.c | static void hp100_set_multicast_list( struct device *dev); |
dev | 201 | drivers/net/hp100.c | static void hp100_start_interface( struct device *dev ); |
dev | 202 | drivers/net/hp100.c | static void hp100_stop_interface( struct device *dev ); |
dev | 203 | drivers/net/hp100.c | static void hp100_load_eeprom( struct device *dev ); |
dev | 204 | drivers/net/hp100.c | static int hp100_sense_lan( struct device *dev ); |
dev | 205 | drivers/net/hp100.c | static int hp100_login_to_vg_hub( struct device *dev ); |
dev | 206 | drivers/net/hp100.c | static int hp100_down_vg_link( struct device *dev ); |
dev | 212 | drivers/net/hp100.c | int hp100_probe( struct device *dev ) |
dev | 214 | drivers/net/hp100.c | int base_addr = dev ? dev -> base_addr : 0; |
dev | 224 | drivers/net/hp100.c | return hp100_probe1( dev, base_addr, HP100_BUS_ISA ); |
dev | 226 | drivers/net/hp100.c | return hp100_probe1( dev, base_addr, HP100_BUS_EISA ); |
dev | 275 | drivers/net/hp100.c | if ( hp100_probe1( dev, ioaddr, HP100_BUS_PCI ) == 0 ) return 0; |
dev | 286 | drivers/net/hp100.c | if ( hp100_probe1( dev, ioaddr, HP100_BUS_EISA ) == 0 ) return 0; |
dev | 294 | drivers/net/hp100.c | if ( hp100_probe1( dev, ioaddr, HP100_BUS_ISA ) == 0 ) return 0; |
dev | 300 | drivers/net/hp100.c | static int hp100_probe1( struct device *dev, int ioaddr, int bus ) |
dev | 310 | drivers/net/hp100.c | if ( dev == NULL ) |
dev | 325 | drivers/net/hp100.c | dev -> base_addr = ioaddr; |
dev | 406 | drivers/net/hp100.c | if ( ( dev -> priv = kmalloc( sizeof( struct hp100_private ), GFP_KERNEL ) ) == NULL ) |
dev | 408 | drivers/net/hp100.c | memset( dev -> priv, 0, sizeof( struct hp100_private ) ); |
dev | 410 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
dev | 420 | drivers/net/hp100.c | dev -> base_addr = ioaddr; |
dev | 422 | drivers/net/hp100.c | dev -> irq = hp100_inb( IRQ_CHANNEL ) & HP100_IRQ_MASK; |
dev | 423 | drivers/net/hp100.c | if ( dev -> irq == 2 ) dev -> irq = 9; |
dev | 427 | drivers/net/hp100.c | dev -> open = hp100_open; |
dev | 428 | drivers/net/hp100.c | dev -> stop = hp100_close; |
dev | 429 | drivers/net/hp100.c | dev -> hard_start_xmit = hp100_start_xmit; |
dev | 430 | drivers/net/hp100.c | dev -> get_stats = hp100_get_stats; |
dev | 431 | drivers/net/hp100.c | dev -> set_multicast_list = &hp100_set_multicast_list; |
dev | 433 | drivers/net/hp100.c | request_region( dev -> base_addr, HP100_REGION_SIZE, eid -> name ); |
dev | 437 | drivers/net/hp100.c | dev -> dev_addr[ i ] = hp100_inb( LAN_ADDR + i ); |
dev | 441 | drivers/net/hp100.c | ether_setup( dev ); |
dev | 443 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
dev | 446 | drivers/net/hp100.c | dev -> name, lp -> id -> name, ioaddr, dev -> irq ); |
dev | 457 | drivers/net/hp100.c | dev -> name, (u_long)mem_ptr_phys, (u_long)mem_ptr_phys + 0x1fff ); |
dev | 462 | drivers/net/hp100.c | printk( "%s: ", dev -> name ); |
dev | 476 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 485 | drivers/net/hp100.c | static int hp100_open( struct device *dev ) |
dev | 488 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 489 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 491 | drivers/net/hp100.c | if ( request_irq( dev -> irq, hp100_interrupt, SA_INTERRUPT, lp -> id -> name, NULL ) ) |
dev | 493 | drivers/net/hp100.c | printk( "%s: unable to get IRQ %d\n", dev -> name, dev -> irq ); |
dev | 496 | drivers/net/hp100.c | irq2dev_map[ dev -> irq ] = dev; |
dev | 500 | drivers/net/hp100.c | dev -> tbusy = 0; |
dev | 501 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 502 | drivers/net/hp100.c | dev -> interrupt = 0; |
dev | 503 | drivers/net/hp100.c | dev -> start = 1; |
dev | 505 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
dev | 512 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 513 | drivers/net/hp100.c | hp100_load_eeprom( dev ); |
dev | 525 | drivers/net/hp100.c | hp100_outb( dev -> dev_addr[ i ], MAC_ADDR + i ); |
dev | 541 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 543 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 548 | drivers/net/hp100.c | static int hp100_close( struct device *dev ) |
dev | 550 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 551 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 556 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 559 | drivers/net/hp100.c | hp100_login_to_vg_hub( dev ); |
dev | 561 | drivers/net/hp100.c | dev -> tbusy = 1; |
dev | 562 | drivers/net/hp100.c | dev -> start = 0; |
dev | 564 | drivers/net/hp100.c | free_irq( dev -> irq, NULL ); |
dev | 565 | drivers/net/hp100.c | irq2dev_map[ dev -> irq ] = NULL; |
dev | 574 | drivers/net/hp100.c | static int hp100_start_xmit( struct sk_buff *skb, struct device *dev ) |
dev | 577 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 579 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 583 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 584 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) < 0 ) |
dev | 586 | drivers/net/hp100.c | printk( "%s: no connection found - check wire\n", dev -> name ); |
dev | 587 | drivers/net/hp100.c | hp100_start_interface( dev ); /* 10Mb/s RX packets maybe handled */ |
dev | 591 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 592 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 600 | drivers/net/hp100.c | if ( jiffies - dev -> trans_start < 2 * HZ ) return -EAGAIN; |
dev | 604 | drivers/net/hp100.c | printk( "%s: login to 100Mb/s hub retry\n", dev -> name ); |
dev | 605 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 606 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 607 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 612 | drivers/net/hp100.c | i = hp100_sense_lan( dev ); |
dev | 616 | drivers/net/hp100.c | printk( "%s: link down detected\n", dev -> name ); |
dev | 621 | drivers/net/hp100.c | printk( "%s: cable change 10Mb/s <-> 100Mb/s detected\n", dev -> name ); |
dev | 623 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 625 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 626 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 630 | drivers/net/hp100.c | printk( "%s: interface reset\n", dev -> name ); |
dev | 631 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 632 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 635 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 641 | drivers/net/hp100.c | dev_tint( dev ); |
dev | 688 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 704 | drivers/net/hp100.c | static void hp100_rx( struct device *dev ) |
dev | 707 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 708 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 715 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) == HP100_LAN_100 ) |
dev | 716 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 765 | drivers/net/hp100.c | skb -> dev = dev; |
dev | 776 | drivers/net/hp100.c | skb -> protocol = eth_type_trans( skb, dev ); |
dev | 801 | drivers/net/hp100.c | static struct enet_statistics *hp100_get_stats( struct device *dev ) |
dev | 803 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 806 | drivers/net/hp100.c | hp100_update_stats( dev ); |
dev | 808 | drivers/net/hp100.c | return &((struct hp100_private *)dev -> priv) -> stats; |
dev | 811 | drivers/net/hp100.c | static void hp100_update_stats( struct device *dev ) |
dev | 813 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 815 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 849 | drivers/net/hp100.c | static void hp100_set_multicast_list( struct device *dev) |
dev | 851 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 852 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 855 | drivers/net/hp100.c | printk( "hp100_set_multicast_list: num_addrs = %d\n", dev->mc_count); |
dev | 862 | drivers/net/hp100.c | if ( dev->flags&IFF_PROMISC) |
dev | 868 | drivers/net/hp100.c | if ( dev->mc_count || dev->flags&IFF_ALLMULTI ) |
dev | 895 | drivers/net/hp100.c | struct device *dev = (struct device *)irq2dev_map[ irq ]; |
dev | 900 | drivers/net/hp100.c | if ( dev == NULL ) return; |
dev | 901 | drivers/net/hp100.c | ioaddr = dev -> base_addr; |
dev | 902 | drivers/net/hp100.c | if ( dev -> interrupt ) |
dev | 903 | drivers/net/hp100.c | printk( "%s: re-entering the interrupt handler\n", dev -> name ); |
dev | 905 | drivers/net/hp100.c | dev -> interrupt = 1; |
dev | 913 | drivers/net/hp100.c | hp100_rx( dev ); |
dev | 922 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
dev | 923 | drivers/net/hp100.c | hp100_update_stats( dev ); |
dev | 929 | drivers/net/hp100.c | dev -> interrupt = 0; |
dev | 937 | drivers/net/hp100.c | static void hp100_start_interface( struct device *dev ) |
dev | 939 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 940 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 961 | drivers/net/hp100.c | static void hp100_stop_interface( struct device *dev ) |
dev | 963 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 978 | drivers/net/hp100.c | printk( "%s: hp100_stop_interface - timeout\n", dev -> name ); |
dev | 981 | drivers/net/hp100.c | static void hp100_load_eeprom( struct device *dev ) |
dev | 984 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 991 | drivers/net/hp100.c | printk( "%s: hp100_load_eeprom - timeout\n", dev -> name ); |
dev | 996 | drivers/net/hp100.c | static int hp100_sense_lan( struct device *dev ) |
dev | 999 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 1001 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 1021 | drivers/net/hp100.c | static int hp100_down_vg_link( struct device *dev ) |
dev | 1023 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 1045 | drivers/net/hp100.c | static int hp100_login_to_vg_hub( struct device *dev ) |
dev | 1048 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 1066 | drivers/net/hp100.c | if ( hp100_down_vg_link( dev ) < 0 ) /* if fail, try reset VG link */ |
dev | 1091 | drivers/net/hp100.c | printk( "%s: 100Mb cable training failed, check cable.\n", dev -> name ); |
dev | 1093 | drivers/net/hp100.c | printk( "%s: 100Mb node not accepted by hub, check frame type or security.\n", dev -> name ); |
dev | 1096 | drivers/net/hp100.c | hp100_down_vg_link( dev ); |
dev | 114 | drivers/net/ibmtr.c | #define DPRINTK(format, args...) printk("%s: " format, dev->name , ## args) |
dev | 115 | drivers/net/ibmtr.c | #define DPRINTD(format, args...) DummyCall("%s: " format, dev->name , ## args) |
dev | 136 | drivers/net/ibmtr.c | void (*do_tok_int)(struct device *dev)=NULL; |
dev | 152 | drivers/net/ibmtr.c | int tok_probe(struct device *dev); |
dev | 155 | drivers/net/ibmtr.c | static int tok_init_card(struct device *dev); |
dev | 156 | drivers/net/ibmtr.c | int trdev_init(struct device *dev); |
dev | 159 | drivers/net/ibmtr.c | static void initial_tok_int(struct device *dev); |
dev | 161 | drivers/net/ibmtr.c | static void open_sap(unsigned char type,struct device *dev); |
dev | 163 | drivers/net/ibmtr.c | static void tr_rx(struct device *dev); |
dev | 164 | drivers/net/ibmtr.c | static void tr_tx(struct device *dev); |
dev | 166 | drivers/net/ibmtr.c | static int tok_open(struct device *dev); |
dev | 167 | drivers/net/ibmtr.c | static int tok_close(struct device *dev); |
dev | 168 | drivers/net/ibmtr.c | static int tok_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 169 | drivers/net/ibmtr.c | static struct enet_statistics * tok_get_stats(struct device *dev); |
dev | 197 | drivers/net/ibmtr.c | int tok_probe(struct device *dev) |
dev | 315 | drivers/net/ibmtr.c | dev->priv = ti; /* this seems like the logical use of the |
dev | 376 | drivers/net/ibmtr.c | dev->dev_addr[(j/2)]=ti->hw_address[j]+(ti->hw_address[j-1]<<4); |
dev | 504 | drivers/net/ibmtr.c | if (request_irq (dev->irq = irq, &tok_interrupt,0,"IBM TR", NULL) != 0) { |
dev | 509 | drivers/net/ibmtr.c | irq2dev_map[irq]=dev; |
dev | 523 | drivers/net/ibmtr.c | dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], |
dev | 524 | drivers/net/ibmtr.c | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); |
dev | 527 | drivers/net/ibmtr.c | dev->base_addr=PIOaddr; /* set the value for device */ |
dev | 529 | drivers/net/ibmtr.c | trdev_init(dev); |
dev | 530 | drivers/net/ibmtr.c | tok_init_card(dev); |
dev | 559 | drivers/net/ibmtr.c | int trdev_init(struct device *dev) |
dev | 561 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *)dev->priv; |
dev | 565 | drivers/net/ibmtr.c | dev->init=tok_init_card; |
dev | 566 | drivers/net/ibmtr.c | dev->open=tok_open; |
dev | 567 | drivers/net/ibmtr.c | dev->stop=tok_close; |
dev | 568 | drivers/net/ibmtr.c | dev->hard_start_xmit=tok_send_packet; |
dev | 569 | drivers/net/ibmtr.c | dev->get_stats = NULL; |
dev | 570 | drivers/net/ibmtr.c | dev->get_stats = tok_get_stats; |
dev | 571 | drivers/net/ibmtr.c | dev->set_multicast_list = NULL; |
dev | 572 | drivers/net/ibmtr.c | tr_setup(dev); |
dev | 578 | drivers/net/ibmtr.c | static int tok_open(struct device *dev) { |
dev | 580 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *)dev->priv; |
dev | 583 | drivers/net/ibmtr.c | tok_init_card(dev); |
dev | 591 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 592 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 593 | drivers/net/ibmtr.c | dev->start=1; |
dev | 606 | drivers/net/ibmtr.c | static int tok_close(struct device *dev) { |
dev | 608 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 633 | drivers/net/ibmtr.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 635 | drivers/net/ibmtr.c | DPRINTK("Int from tok_driver, dev : %p\n",dev); |
dev | 637 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 647 | drivers/net/ibmtr.c | dev->interrupt=1; |
dev | 663 | drivers/net/ibmtr.c | dev->interrupt = 0; |
dev | 671 | drivers/net/ibmtr.c | dev->interrupt = 0; |
dev | 689 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 699 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 714 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 727 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 762 | drivers/net/ibmtr.c | open_sap(EXTENDED_SAP,dev); |
dev | 771 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 786 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 822 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 857 | drivers/net/ibmtr.c | tr_rx(dev); |
dev | 868 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 879 | drivers/net/ibmtr.c | dev->tbusy=1; /* really srb busy... */ |
dev | 885 | drivers/net/ibmtr.c | tr_tx(dev); |
dev | 917 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 924 | drivers/net/ibmtr.c | initial_tok_int(dev); |
dev | 932 | drivers/net/ibmtr.c | static void initial_tok_int(struct device *dev) { |
dev | 940 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 988 | drivers/net/ibmtr.c | printk("%02X%s",dev->dev_addr[i]=encoded_addr[i],(i==TR_ALEN-1) ? "" : ":" ); |
dev | 992 | drivers/net/ibmtr.c | tok_open_adapter((unsigned long)dev); |
dev | 996 | drivers/net/ibmtr.c | static int tok_init_card(struct device *dev) { |
dev | 1000 | drivers/net/ibmtr.c | PIOaddr = dev->base_addr; |
dev | 1001 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 1008 | drivers/net/ibmtr.c | dev->tbusy=1; /* nothing can be done before reset and open completed */ |
dev | 1033 | drivers/net/ibmtr.c | static void open_sap(unsigned char type,struct device *dev) { |
dev | 1035 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1053 | drivers/net/ibmtr.c | struct device *dev=(struct device *)dev_addr; |
dev | 1056 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 1084 | drivers/net/ibmtr.c | static void tr_tx(struct device *dev) { |
dev | 1086 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1173 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 1179 | drivers/net/ibmtr.c | static void tr_rx(struct device *dev) { |
dev | 1181 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1242 | drivers/net/ibmtr.c | skb->dev=dev; |
dev | 1279 | drivers/net/ibmtr.c | skb->protocol=tr_type_trans(skb,dev); |
dev | 1285 | drivers/net/ibmtr.c | static int tok_send_packet(struct sk_buff *skb, struct device *dev) { |
dev | 1287 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1293 | drivers/net/ibmtr.c | if (dev->tbusy) { |
dev | 1294 | drivers/net/ibmtr.c | int ticks_waited=jiffies - dev->trans_start; |
dev | 1300 | drivers/net/ibmtr.c | dev->trans_start+=5; /* we fake the transmission start time... */ |
dev | 1307 | drivers/net/ibmtr.c | dev_tint(dev); |
dev | 1311 | drivers/net/ibmtr.c | if(set_bit(0,(void *)&dev->tbusy)!=0) |
dev | 1321 | drivers/net/ibmtr.c | dev->trans_start=jiffies; |
dev | 1332 | drivers/net/ibmtr.c | static struct enet_statistics * tok_get_stats(struct device *dev) { |
dev | 1335 | drivers/net/ibmtr.c | toki=(struct tok_info *) dev->priv; |
dev | 253 | drivers/net/lance.c | static int lance_open(struct device *dev); |
dev | 254 | drivers/net/lance.c | static void lance_init_ring(struct device *dev); |
dev | 255 | drivers/net/lance.c | static int lance_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 256 | drivers/net/lance.c | static int lance_rx(struct device *dev); |
dev | 258 | drivers/net/lance.c | static int lance_close(struct device *dev); |
dev | 259 | drivers/net/lance.c | static struct enet_statistics *lance_get_stats(struct device *dev); |
dev | 260 | drivers/net/lance.c | static void set_multicast_list(struct device *dev); |
dev | 335 | drivers/net/lance.c | struct device *dev; |
dev | 393 | drivers/net/lance.c | dev = init_etherdev(0, 0); |
dev | 395 | drivers/net/lance.c | printk("%s: %s at %#3x,", dev->name, chipname, ioaddr); |
dev | 400 | drivers/net/lance.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 402 | drivers/net/lance.c | dev->base_addr = ioaddr; |
dev | 408 | drivers/net/lance.c | dev->priv = lp; |
dev | 419 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 435 | drivers/net/lance.c | dev->dma = 4; /* Native bus-master, no DMA channel needed. */ |
dev | 436 | drivers/net/lance.c | dev->irq = pci_irq_line; |
dev | 441 | drivers/net/lance.c | dev->dma = dma_tbl[(port_val >> 4) & 3]; |
dev | 442 | drivers/net/lance.c | dev->irq = irq_tbl[(port_val >> 2) & 3]; |
dev | 443 | drivers/net/lance.c | printk(" HP Vectra IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 448 | drivers/net/lance.c | dev->dma = dma_tbl[(reset_val >> 2) & 3]; |
dev | 449 | drivers/net/lance.c | dev->irq = irq_tbl[(reset_val >> 4) & 7]; |
dev | 450 | drivers/net/lance.c | printk(" HP J2405A IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 455 | drivers/net/lance.c | dev->dma = bus_info & 0x07; |
dev | 456 | drivers/net/lance.c | dev->irq = (bus_info >> 4) & 0x0F; |
dev | 459 | drivers/net/lance.c | if (dev->mem_start & 0x07) |
dev | 460 | drivers/net/lance.c | dev->dma = dev->mem_start & 0x07; |
dev | 463 | drivers/net/lance.c | if (dev->dma == 0) { |
dev | 469 | drivers/net/lance.c | if (dev->irq >= 2) |
dev | 470 | drivers/net/lance.c | printk(" assigned IRQ %d", dev->irq); |
dev | 480 | drivers/net/lance.c | dev->irq = autoirq_report(1); |
dev | 481 | drivers/net/lance.c | if (dev->irq) |
dev | 482 | drivers/net/lance.c | printk(", probed IRQ %d", dev->irq); |
dev | 491 | drivers/net/lance.c | dev->dma = 4; |
dev | 494 | drivers/net/lance.c | if (dev->dma == 4) { |
dev | 496 | drivers/net/lance.c | } else if (dev->dma) { |
dev | 497 | drivers/net/lance.c | if (request_dma(dev->dma, chipname)) { |
dev | 498 | drivers/net/lance.c | printk("DMA %d allocation failed.\n", dev->dma); |
dev | 501 | drivers/net/lance.c | printk(", assigned DMA %d.\n", dev->dma); |
dev | 524 | drivers/net/lance.c | dev->dma = dma; |
dev | 525 | drivers/net/lance.c | printk(", DMA %d.\n", dev->dma); |
dev | 549 | drivers/net/lance.c | dev->open = &lance_open; |
dev | 550 | drivers/net/lance.c | dev->hard_start_xmit = &lance_start_xmit; |
dev | 551 | drivers/net/lance.c | dev->stop = &lance_close; |
dev | 552 | drivers/net/lance.c | dev->get_stats = &lance_get_stats; |
dev | 553 | drivers/net/lance.c | dev->set_multicast_list = &set_multicast_list; |
dev | 560 | drivers/net/lance.c | lance_open(struct device *dev) |
dev | 562 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 563 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 566 | drivers/net/lance.c | if (dev->irq == 0 || |
dev | 567 | drivers/net/lance.c | request_irq(dev->irq, &lance_interrupt, 0, lp->name, NULL)) { |
dev | 574 | drivers/net/lance.c | irq2dev_map[dev->irq] = dev; |
dev | 580 | drivers/net/lance.c | if (dev->dma != 4) { |
dev | 581 | drivers/net/lance.c | enable_dma(dev->dma); |
dev | 582 | drivers/net/lance.c | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
dev | 597 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
dev | 600 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 613 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 614 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 615 | drivers/net/lance.c | dev->start = 1; |
dev | 628 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
dev | 646 | drivers/net/lance.c | lance_purge_tx_ring(struct device *dev) |
dev | 648 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 662 | drivers/net/lance.c | lance_init_ring(struct device *dev) |
dev | 664 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 683 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 691 | drivers/net/lance.c | lance_restart(struct device *dev, unsigned int csr0_bits, int must_reinit) |
dev | 693 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 697 | drivers/net/lance.c | lance_purge_tx_ring(dev); |
dev | 698 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 700 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 701 | drivers/net/lance.c | outw(csr0_bits, dev->base_addr + LANCE_DATA); |
dev | 705 | drivers/net/lance.c | lance_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 707 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 708 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 713 | drivers/net/lance.c | if (dev->tbusy) { |
dev | 714 | drivers/net/lance.c | int tickssofar = jiffies - dev->trans_start; |
dev | 719 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 739 | drivers/net/lance.c | lance_restart(dev, 0x0043, 1); |
dev | 741 | drivers/net/lance.c | dev->tbusy=0; |
dev | 742 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 748 | drivers/net/lance.c | dev_tint(dev); |
dev | 757 | drivers/net/lance.c | printk("%s: lance_start_xmit() called, csr0 %4.4x.\n", dev->name, |
dev | 764 | drivers/net/lance.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 765 | drivers/net/lance.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 771 | drivers/net/lance.c | printk("%s: tx queue lock!.\n", dev->name); |
dev | 798 | drivers/net/lance.c | dev->name, (int)(skb->data)); |
dev | 813 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 819 | drivers/net/lance.c | dev->tbusy=0; |
dev | 831 | drivers/net/lance.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 836 | drivers/net/lance.c | if (dev == NULL) { |
dev | 841 | drivers/net/lance.c | ioaddr = dev->base_addr; |
dev | 842 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 843 | drivers/net/lance.c | if (dev->interrupt) |
dev | 844 | drivers/net/lance.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 846 | drivers/net/lance.c | dev->interrupt = 1; |
dev | 848 | drivers/net/lance.c | outw(0x00, dev->base_addr + LANCE_ADDR); |
dev | 849 | drivers/net/lance.c | while ((csr0 = inw(dev->base_addr + LANCE_DATA)) & 0x8600 |
dev | 852 | drivers/net/lance.c | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); |
dev | 858 | drivers/net/lance.c | dev->name, csr0, inw(dev->base_addr + LANCE_DATA)); |
dev | 861 | drivers/net/lance.c | lance_rx(dev); |
dev | 887 | drivers/net/lance.c | dev->name, csr0); |
dev | 914 | drivers/net/lance.c | if (lp->tx_full && dev->tbusy |
dev | 918 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 930 | drivers/net/lance.c | dev->name, csr0); |
dev | 937 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 938 | drivers/net/lance.c | outw(0x0004, dev->base_addr + LANCE_DATA); |
dev | 939 | drivers/net/lance.c | lance_restart(dev, 0x0002, 0); |
dev | 944 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 945 | drivers/net/lance.c | outw(0x7940, dev->base_addr + LANCE_DATA); |
dev | 949 | drivers/net/lance.c | dev->name, inw(ioaddr + LANCE_ADDR), |
dev | 950 | drivers/net/lance.c | inw(dev->base_addr + LANCE_DATA)); |
dev | 952 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 957 | drivers/net/lance.c | lance_rx(struct device *dev) |
dev | 959 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 988 | drivers/net/lance.c | printk("%s: Runt packet!\n",dev->name); |
dev | 996 | drivers/net/lance.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 1009 | drivers/net/lance.c | skb->dev = dev; |
dev | 1015 | drivers/net/lance.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1034 | drivers/net/lance.c | lance_close(struct device *dev) |
dev | 1036 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 1037 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 1039 | drivers/net/lance.c | dev->start = 0; |
dev | 1040 | drivers/net/lance.c | dev->tbusy = 1; |
dev | 1050 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 1056 | drivers/net/lance.c | if (dev->dma != 4) |
dev | 1057 | drivers/net/lance.c | disable_dma(dev->dma); |
dev | 1059 | drivers/net/lance.c | free_irq(dev->irq, NULL); |
dev | 1061 | drivers/net/lance.c | irq2dev_map[dev->irq] = 0; |
dev | 1067 | drivers/net/lance.c | lance_get_stats(struct device *dev) |
dev | 1069 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 1070 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 1090 | drivers/net/lance.c | static void set_multicast_list(struct device *dev) |
dev | 1092 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 1097 | drivers/net/lance.c | if (dev->flags&IFF_PROMISC) { |
dev | 1099 | drivers/net/lance.c | printk("%s: Promiscuous mode enabled.\n", dev->name); |
dev | 1105 | drivers/net/lance.c | int num_addrs=dev->mc_count; |
dev | 1106 | drivers/net/lance.c | if(dev->flags&IFF_ALLMULTI) |
dev | 1118 | drivers/net/lance.c | lance_restart(dev, 0x0142, 0); /* Resume normal operation */ |
dev | 56 | drivers/net/loopback.c | static int loopback_xmit(struct sk_buff *skb, struct device *dev) |
dev | 58 | drivers/net/loopback.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 61 | drivers/net/loopback.c | if (skb == NULL || dev == NULL) |
dev | 88 | drivers/net/loopback.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 89 | drivers/net/loopback.c | skb->dev=dev; |
dev | 103 | drivers/net/loopback.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 105 | drivers/net/loopback.c | return (struct enet_statistics *)dev->priv; |
dev | 108 | drivers/net/loopback.c | static int loopback_open(struct device *dev) |
dev | 110 | drivers/net/loopback.c | dev->flags|=IFF_LOOPBACK; |
dev | 115 | drivers/net/loopback.c | int loopback_init(struct device *dev) |
dev | 119 | drivers/net/loopback.c | dev->mtu = LOOPBACK_MTU; |
dev | 120 | drivers/net/loopback.c | dev->tbusy = 0; |
dev | 121 | drivers/net/loopback.c | dev->hard_start_xmit = loopback_xmit; |
dev | 122 | drivers/net/loopback.c | dev->open = NULL; |
dev | 123 | drivers/net/loopback.c | dev->hard_header = eth_header; |
dev | 124 | drivers/net/loopback.c | dev->hard_header_len = ETH_HLEN; /* 14 */ |
dev | 125 | drivers/net/loopback.c | dev->addr_len = ETH_ALEN; /* 6 */ |
dev | 126 | drivers/net/loopback.c | dev->tx_queue_len = 50000; /* No limit on loopback */ |
dev | 127 | drivers/net/loopback.c | dev->type = ARPHRD_LOOPBACK; /* 0x0001 */ |
dev | 128 | drivers/net/loopback.c | dev->rebuild_header = eth_rebuild_header; |
dev | 129 | drivers/net/loopback.c | dev->open = loopback_open; |
dev | 130 | drivers/net/loopback.c | dev->flags = IFF_LOOPBACK|IFF_BROADCAST; |
dev | 131 | drivers/net/loopback.c | dev->family = AF_INET; |
dev | 133 | drivers/net/loopback.c | dev->pa_addr = in_aton("127.0.0.1"); |
dev | 134 | drivers/net/loopback.c | dev->pa_brdaddr = in_aton("127.255.255.255"); |
dev | 135 | drivers/net/loopback.c | dev->pa_mask = in_aton("255.0.0.0"); |
dev | 136 | drivers/net/loopback.c | dev->pa_alen = 4; |
dev | 138 | drivers/net/loopback.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 139 | drivers/net/loopback.c | if (dev->priv == NULL) |
dev | 141 | drivers/net/loopback.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 142 | drivers/net/loopback.c | dev->get_stats = get_stats; |
dev | 149 | drivers/net/loopback.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 85 | drivers/net/ne.c | #define NE_BASE (dev->base_addr) |
dev | 99 | drivers/net/ne.c | int ne_probe(struct device *dev); |
dev | 100 | drivers/net/ne.c | static int ne_probe1(struct device *dev, int ioaddr); |
dev | 102 | drivers/net/ne.c | static int ne_open(struct device *dev); |
dev | 103 | drivers/net/ne.c | static int ne_close(struct device *dev); |
dev | 105 | drivers/net/ne.c | static void ne_reset_8390(struct device *dev); |
dev | 106 | drivers/net/ne.c | static void ne_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 108 | drivers/net/ne.c | static void ne_block_input(struct device *dev, int count, |
dev | 110 | drivers/net/ne.c | static void ne_block_output(struct device *dev, const int count, |
dev | 144 | drivers/net/ne.c | int ne_probe(struct device *dev) |
dev | 147 | drivers/net/ne.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 151 | drivers/net/ne.c | return ne_probe1(dev, base_addr); |
dev | 179 | drivers/net/ne.c | if (ne_probe1(dev, pci_ioaddr) != 0) { /* Shouldn't happen. */ |
dev | 194 | drivers/net/ne.c | if (ne_probe1(dev, ioaddr) == 0) |
dev | 202 | drivers/net/ne.c | static int ne_probe1(struct device *dev, int ioaddr) |
dev | 335 | drivers/net/ne.c | if (dev == NULL) { |
dev | 337 | drivers/net/ne.c | dev = init_etherdev(0, 0); |
dev | 341 | drivers/net/ne.c | dev->irq = pci_irq_line; |
dev | 344 | drivers/net/ne.c | if (dev->irq < 2) { |
dev | 351 | drivers/net/ne.c | dev->irq = autoirq_report(0); |
dev | 353 | drivers/net/ne.c | printk(" autoirq is %d\n", dev->irq); |
dev | 354 | drivers/net/ne.c | } else if (dev->irq == 2) |
dev | 357 | drivers/net/ne.c | dev->irq = 9; |
dev | 359 | drivers/net/ne.c | if (! dev->irq) { |
dev | 367 | drivers/net/ne.c | int irqval = request_irq(dev->irq, ei_interrupt, 0, name, NULL); |
dev | 369 | drivers/net/ne.c | printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval); |
dev | 374 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 377 | drivers/net/ne.c | if (ethdev_init(dev)) { |
dev | 379 | drivers/net/ne.c | free_irq(dev->irq, NULL); |
dev | 387 | drivers/net/ne.c | dev->dev_addr[i] = SA_prom[i]; |
dev | 391 | drivers/net/ne.c | dev->name, name, ioaddr, dev->irq); |
dev | 408 | drivers/net/ne.c | dev->open = &ne_open; |
dev | 409 | drivers/net/ne.c | dev->stop = &ne_close; |
dev | 410 | drivers/net/ne.c | NS8390_init(dev, 0); |
dev | 415 | drivers/net/ne.c | ne_open(struct device *dev) |
dev | 417 | drivers/net/ne.c | ei_open(dev); |
dev | 423 | drivers/net/ne.c | ne_close(struct device *dev) |
dev | 426 | drivers/net/ne.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 427 | drivers/net/ne.c | ei_close(dev); |
dev | 435 | drivers/net/ne.c | ne_reset_8390(struct device *dev) |
dev | 450 | drivers/net/ne.c | printk("%s: ne_reset_8390() did not complete.\n", dev->name); |
dev | 461 | drivers/net/ne.c | ne_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 464 | drivers/net/ne.c | int nic_base = dev->base_addr; |
dev | 470 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock, |
dev | 471 | drivers/net/ne.c | dev->interrupt); |
dev | 498 | drivers/net/ne.c | ne_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 503 | drivers/net/ne.c | int nic_base = dev->base_addr; |
dev | 510 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock, |
dev | 511 | drivers/net/ne.c | dev->interrupt); |
dev | 552 | drivers/net/ne.c | dev->name, ring_offset + xfer_count, addr); |
dev | 560 | drivers/net/ne.c | ne_block_output(struct device *dev, int count, |
dev | 579 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock, |
dev | 580 | drivers/net/ne.c | dev->interrupt); |
dev | 639 | drivers/net/ne.c | dev->name, (start_page << 8) + count, addr); |
dev | 648 | drivers/net/ne.c | printk("%s: timeout waiting for Tx RDC.\n", dev->name); |
dev | 649 | drivers/net/ne.c | ne_reset_8390(dev); |
dev | 650 | drivers/net/ne.c | NS8390_init(dev,1); |
dev | 687 | drivers/net/ne.c | struct device *dev = &dev_ne[this_dev]; |
dev | 688 | drivers/net/ne.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 689 | drivers/net/ne.c | dev->irq = irq[this_dev]; |
dev | 690 | drivers/net/ne.c | dev->base_addr = io[this_dev]; |
dev | 691 | drivers/net/ne.c | dev->init = ne_probe; |
dev | 697 | drivers/net/ne.c | if (register_netdev(dev) != 0) { |
dev | 714 | drivers/net/ne.c | struct device *dev = &dev_ne[this_dev]; |
dev | 715 | drivers/net/ne.c | if (dev->priv != NULL) { |
dev | 716 | drivers/net/ne.c | kfree(dev->priv); |
dev | 717 | drivers/net/ne.c | dev->priv = NULL; |
dev | 718 | drivers/net/ne.c | free_irq(dev->irq, NULL); |
dev | 719 | drivers/net/ne.c | irq2dev_map[dev->irq] = NULL; |
dev | 720 | drivers/net/ne.c | release_region(dev->base_addr, NE_IO_EXTENT); |
dev | 721 | drivers/net/ne.c | unregister_netdev(dev); |
dev | 74 | drivers/net/net_init.c | init_etherdev(struct device *dev, int sizeof_priv) |
dev | 80 | drivers/net/net_init.c | if (dev == NULL) { |
dev | 91 | drivers/net/net_init.c | dev = cur_dev; |
dev | 92 | drivers/net/net_init.c | dev->init = NULL; |
dev | 94 | drivers/net/net_init.c | dev->priv = sizeof_priv |
dev | 97 | drivers/net/net_init.c | if (dev->priv) memset(dev->priv, 0, sizeof_priv); |
dev | 104 | drivers/net/net_init.c | dev = (struct device *)kmalloc(alloc_size, GFP_KERNEL); |
dev | 105 | drivers/net/net_init.c | memset(dev, 0, alloc_size); |
dev | 107 | drivers/net/net_init.c | dev->priv = (void *) (dev + 1); |
dev | 108 | drivers/net/net_init.c | dev->name = sizeof_priv + (char *)(dev + 1); |
dev | 114 | drivers/net/net_init.c | if (dev->name && |
dev | 115 | drivers/net/net_init.c | ((dev->name[0] == '\0') || (dev->name[0] == ' '))) { |
dev | 118 | drivers/net/net_init.c | sprintf(dev->name, "eth%d", i); |
dev | 119 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 124 | drivers/net/net_init.c | ether_setup(dev); /* Hmmm, should this be called here? */ |
dev | 131 | drivers/net/net_init.c | (*old_devp)->next = dev; |
dev | 132 | drivers/net/net_init.c | dev->next = 0; |
dev | 134 | drivers/net/net_init.c | return dev; |
dev | 138 | drivers/net/net_init.c | static int eth_mac_addr(struct device *dev, void *p) |
dev | 141 | drivers/net/net_init.c | if(dev->start) |
dev | 143 | drivers/net/net_init.c | memcpy(dev->dev_addr, addr->sa_data,dev->addr_len); |
dev | 147 | drivers/net/net_init.c | void ether_setup(struct device *dev) |
dev | 153 | drivers/net/net_init.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 156 | drivers/net/net_init.c | if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) { |
dev | 157 | drivers/net/net_init.c | i = simple_strtoul(dev->name + 3, NULL, 0); |
dev | 159 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 161 | drivers/net/net_init.c | else if (dev != ethdev_index[i]) { |
dev | 164 | drivers/net/net_init.c | dev->name); |
dev | 168 | drivers/net/net_init.c | dev->hard_header = eth_header; |
dev | 169 | drivers/net/net_init.c | dev->rebuild_header = eth_rebuild_header; |
dev | 170 | drivers/net/net_init.c | dev->set_mac_address = eth_mac_addr; |
dev | 171 | drivers/net/net_init.c | dev->header_cache_bind = eth_header_cache_bind; |
dev | 172 | drivers/net/net_init.c | dev->header_cache_update= eth_header_cache_update; |
dev | 174 | drivers/net/net_init.c | dev->type = ARPHRD_ETHER; |
dev | 175 | drivers/net/net_init.c | dev->hard_header_len = ETH_HLEN; |
dev | 176 | drivers/net/net_init.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 177 | drivers/net/net_init.c | dev->addr_len = ETH_ALEN; |
dev | 178 | drivers/net/net_init.c | dev->tx_queue_len = 100; /* Ethernet wants good queues */ |
dev | 180 | drivers/net/net_init.c | memset(dev->broadcast,0xFF, ETH_ALEN); |
dev | 183 | drivers/net/net_init.c | dev->flags = IFF_BROADCAST|IFF_MULTICAST; |
dev | 184 | drivers/net/net_init.c | dev->family = AF_INET; |
dev | 185 | drivers/net/net_init.c | dev->pa_addr = 0; |
dev | 186 | drivers/net/net_init.c | dev->pa_brdaddr = 0; |
dev | 187 | drivers/net/net_init.c | dev->pa_mask = 0; |
dev | 188 | drivers/net/net_init.c | dev->pa_alen = 4; |
dev | 193 | drivers/net/net_init.c | void tr_setup(struct device *dev) |
dev | 199 | drivers/net/net_init.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 201 | drivers/net/net_init.c | dev->hard_header = tr_header; |
dev | 202 | drivers/net/net_init.c | dev->rebuild_header = tr_rebuild_header; |
dev | 204 | drivers/net/net_init.c | dev->type = ARPHRD_IEEE802; |
dev | 205 | drivers/net/net_init.c | dev->hard_header_len = TR_HLEN; |
dev | 206 | drivers/net/net_init.c | dev->mtu = 2000; /* bug in fragmenter...*/ |
dev | 207 | drivers/net/net_init.c | dev->addr_len = TR_ALEN; |
dev | 208 | drivers/net/net_init.c | dev->tx_queue_len = 100; /* Long queues on tr */ |
dev | 210 | drivers/net/net_init.c | memset(dev->broadcast,0xFF, TR_ALEN); |
dev | 213 | drivers/net/net_init.c | dev->flags = IFF_BROADCAST; |
dev | 214 | drivers/net/net_init.c | dev->family = AF_INET; |
dev | 215 | drivers/net/net_init.c | dev->pa_addr = 0; |
dev | 216 | drivers/net/net_init.c | dev->pa_brdaddr = 0; |
dev | 217 | drivers/net/net_init.c | dev->pa_mask = 0; |
dev | 218 | drivers/net/net_init.c | dev->pa_alen = 4; |
dev | 223 | drivers/net/net_init.c | int ether_config(struct device *dev, struct ifmap *map) |
dev | 226 | drivers/net/net_init.c | dev->mem_start = map->mem_start; |
dev | 228 | drivers/net/net_init.c | dev->mem_end = map->mem_end; |
dev | 230 | drivers/net/net_init.c | dev->base_addr = map->base_addr; |
dev | 232 | drivers/net/net_init.c | dev->irq = map->irq; |
dev | 234 | drivers/net/net_init.c | dev->dma = map->dma; |
dev | 236 | drivers/net/net_init.c | dev->if_port = map->port; |
dev | 240 | drivers/net/net_init.c | int register_netdev(struct device *dev) |
dev | 249 | drivers/net/net_init.c | if (dev && dev->init) { |
dev | 250 | drivers/net/net_init.c | if (dev->name && |
dev | 251 | drivers/net/net_init.c | ((dev->name[0] == '\0') || (dev->name[0] == ' '))) { |
dev | 254 | drivers/net/net_init.c | sprintf(dev->name, "eth%d", i); |
dev | 255 | drivers/net/net_init.c | printk("loading device '%s'...\n", dev->name); |
dev | 256 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 262 | drivers/net/net_init.c | if (dev->init(dev) != 0) { |
dev | 273 | drivers/net/net_init.c | d->next = dev; |
dev | 276 | drivers/net/net_init.c | dev_base = dev; |
dev | 277 | drivers/net/net_init.c | dev->next = NULL; |
dev | 283 | drivers/net/net_init.c | void unregister_netdev(struct device *dev) |
dev | 292 | drivers/net/net_init.c | if (dev == NULL) |
dev | 299 | drivers/net/net_init.c | if (dev->start) |
dev | 300 | drivers/net/net_init.c | printk("ERROR '%s' busy and not MOD_IN_USE.\n", dev->name); |
dev | 308 | drivers/net/net_init.c | if (dev_base == dev) |
dev | 309 | drivers/net/net_init.c | dev_base = net_alias_nextdev(dev); |
dev | 312 | drivers/net/net_init.c | while(d && (net_alias_nextdev(d) != dev)) /* skip aliases */ |
dev | 315 | drivers/net/net_init.c | if (d && (net_alias_nextdev(d) == dev)) |
dev | 320 | drivers/net/net_init.c | net_alias_nextdev_set(d, net_alias_nextdev(dev)); |
dev | 323 | drivers/net/net_init.c | if (dev_base == dev) |
dev | 324 | drivers/net/net_init.c | dev_base = dev->next; |
dev | 327 | drivers/net/net_init.c | while (d && (d->next != dev)) |
dev | 330 | drivers/net/net_init.c | if (d && (d->next == dev)) |
dev | 332 | drivers/net/net_init.c | d->next = dev->next; |
dev | 337 | drivers/net/net_init.c | printk("unregister_netdev: '%s' not found\n", dev->name); |
dev | 344 | drivers/net/net_init.c | if (ethdev_index[i] == dev) |
dev | 362 | drivers/net/net_init.c | dev_close(dev); |
dev | 88 | drivers/net/new_tunnel.c | static int tunnel_open(struct device *dev) |
dev | 94 | drivers/net/new_tunnel.c | static int tunnel_close(struct device *dev) |
dev | 126 | drivers/net/new_tunnel.c | static int tunnel_xmit(struct sk_buff *skb, struct device *dev) |
dev | 138 | drivers/net/new_tunnel.c | if (skb == NULL || dev == NULL) { |
dev | 149 | drivers/net/new_tunnel.c | stats = (struct enet_statistics *)dev->priv; |
dev | 151 | drivers/net/new_tunnel.c | if (dev->tbusy != 0) |
dev | 157 | drivers/net/new_tunnel.c | dev->tbusy = 1; |
dev | 171 | drivers/net/new_tunnel.c | printk ( KERN_INFO "%s: Packet with no route!\n", dev->name ); |
dev | 172 | drivers/net/new_tunnel.c | dev->tbusy=0; |
dev | 182 | drivers/net/new_tunnel.c | printk ( KERN_INFO "%s: Packet with no target gateway!\n", dev->name); |
dev | 184 | drivers/net/new_tunnel.c | dev->tbusy=0; |
dev | 196 | drivers/net/new_tunnel.c | printk ( KERN_INFO "%s: Can't reach target gateway!\n", dev->name); |
dev | 197 | drivers/net/new_tunnel.c | dev->tbusy=0; |
dev | 203 | drivers/net/new_tunnel.c | if (tdev == dev) |
dev | 206 | drivers/net/new_tunnel.c | printk ( KERN_INFO "%s: Packet targetted at myself!\n" ,dev->name); |
dev | 208 | drivers/net/new_tunnel.c | dev->tbusy=0; |
dev | 235 | drivers/net/new_tunnel.c | dev->name); |
dev | 237 | drivers/net/new_tunnel.c | dev->tbusy = 0; |
dev | 291 | drivers/net/new_tunnel.c | if (ip_forward(skb, dev, 0, target) == 1) |
dev | 306 | drivers/net/new_tunnel.c | dev->tbusy=0; |
dev | 311 | drivers/net/new_tunnel.c | tunnel_get_stats(struct device *dev) |
dev | 313 | drivers/net/new_tunnel.c | return((struct enet_statistics*) dev->priv); |
dev | 321 | drivers/net/new_tunnel.c | int tunnel_init(struct device *dev) |
dev | 335 | drivers/net/new_tunnel.c | dev->open = tunnel_open; |
dev | 336 | drivers/net/new_tunnel.c | dev->stop = tunnel_close; |
dev | 338 | drivers/net/new_tunnel.c | dev->hard_start_xmit = tunnel_xmit; |
dev | 339 | drivers/net/new_tunnel.c | dev->get_stats = tunnel_get_stats; |
dev | 340 | drivers/net/new_tunnel.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 341 | drivers/net/new_tunnel.c | if (dev->priv == NULL) |
dev | 343 | drivers/net/new_tunnel.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 347 | drivers/net/new_tunnel.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 349 | drivers/net/new_tunnel.c | dev->hard_header = NULL; |
dev | 350 | drivers/net/new_tunnel.c | dev->rebuild_header = NULL; |
dev | 351 | drivers/net/new_tunnel.c | dev->set_mac_address = NULL; |
dev | 352 | drivers/net/new_tunnel.c | dev->header_cache_bind = NULL; |
dev | 353 | drivers/net/new_tunnel.c | dev->header_cache_update= NULL; |
dev | 355 | drivers/net/new_tunnel.c | dev->type = ARPHRD_TUNNEL; |
dev | 356 | drivers/net/new_tunnel.c | dev->hard_header_len = (tunnel_hlen+ETH_HLEN); |
dev | 357 | drivers/net/new_tunnel.c | dev->mtu = 1500-tunnel_hlen; /* eth_mtu */ |
dev | 358 | drivers/net/new_tunnel.c | dev->addr_len = 0; /* Is this only for ARP? */ |
dev | 359 | drivers/net/new_tunnel.c | dev->tx_queue_len = 2; /* Small queue */ |
dev | 362 | drivers/net/new_tunnel.c | memset(dev->broadcast,0xFF, ETH_ALEN); |
dev | 365 | drivers/net/new_tunnel.c | dev->flags = IFF_NOARP; /* Don't use ARP on this device */ |
dev | 367 | drivers/net/new_tunnel.c | dev->family = AF_INET; |
dev | 368 | drivers/net/new_tunnel.c | dev->pa_addr = 0; |
dev | 369 | drivers/net/new_tunnel.c | dev->pa_brdaddr = 0; |
dev | 370 | drivers/net/new_tunnel.c | dev->pa_mask = 0; |
dev | 371 | drivers/net/new_tunnel.c | dev->pa_alen = 4; |
dev | 382 | drivers/net/new_tunnel.c | static int tunnel_probe(struct device *dev) |
dev | 384 | drivers/net/new_tunnel.c | tunnel_init(dev); |
dev | 126 | drivers/net/ni52.c | #define ni_attn586() {outb(0,dev->base_addr+NI52_ATTENTION);} |
dev | 127 | drivers/net/ni52.c | #define ni_reset586() {outb(0,dev->base_addr+NI52_RESET);} |
dev | 128 | drivers/net/ni52.c | #define ni_disint() {outb(0,dev->base_addr+NI52_INTDIS);} |
dev | 129 | drivers/net/ni52.c | #define ni_enaint() {outb(0,dev->base_addr+NI52_INTENA);} |
dev | 169 | drivers/net/ni52.c | printk("%s: scb_cmd timed out: %04x,%04x .. disabeling i82586!!\n",dev->name,p->scb->cmd_cuc,p->scb->cus); \ |
dev | 177 | drivers/net/ni52.c | printk("%s: scb_cmd (ruc) timed out: %04x,%04x .. disabeling i82586!!\n",dev->name,p->scb->cmd_ruc,p->scb->rus); \ |
dev | 190 | drivers/net/ni52.c | static int ni52_probe1(struct device *dev,int ioaddr); |
dev | 192 | drivers/net/ni52.c | static int ni52_open(struct device *dev); |
dev | 193 | drivers/net/ni52.c | static int ni52_close(struct device *dev); |
dev | 195 | drivers/net/ni52.c | static struct enet_statistics *ni52_get_stats(struct device *dev); |
dev | 196 | drivers/net/ni52.c | static void set_multicast_list(struct device *dev); |
dev | 202 | drivers/net/ni52.c | static int init586(struct device *dev); |
dev | 203 | drivers/net/ni52.c | static int check586(struct device *dev,char *where,unsigned size); |
dev | 204 | drivers/net/ni52.c | static void alloc586(struct device *dev); |
dev | 205 | drivers/net/ni52.c | static void startrecv586(struct device *dev); |
dev | 206 | drivers/net/ni52.c | static void *alloc_rfa(struct device *dev,void *ptr); |
dev | 207 | drivers/net/ni52.c | static void ni52_rcv_int(struct device *dev); |
dev | 208 | drivers/net/ni52.c | static void ni52_xmt_int(struct device *dev); |
dev | 209 | drivers/net/ni52.c | static void ni52_rnr_int(struct device *dev); |
dev | 236 | drivers/net/ni52.c | static int ni52_close(struct device *dev) |
dev | 238 | drivers/net/ni52.c | free_irq(dev->irq, NULL); |
dev | 239 | drivers/net/ni52.c | irq2dev_map[dev->irq] = NULL; |
dev | 243 | drivers/net/ni52.c | dev->start = 0; |
dev | 244 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 254 | drivers/net/ni52.c | static int ni52_open(struct device *dev) |
dev | 257 | drivers/net/ni52.c | alloc586(dev); |
dev | 258 | drivers/net/ni52.c | init586(dev); |
dev | 259 | drivers/net/ni52.c | startrecv586(dev); |
dev | 262 | drivers/net/ni52.c | if(request_irq(dev->irq, &ni52_interrupt,0,"ni5210",NULL)) |
dev | 267 | drivers/net/ni52.c | irq2dev_map[dev->irq] = dev; |
dev | 269 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 270 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 271 | drivers/net/ni52.c | dev->start = 1; |
dev | 281 | drivers/net/ni52.c | static int check586(struct device *dev,char *where,unsigned size) |
dev | 323 | drivers/net/ni52.c | void alloc586(struct device *dev) |
dev | 325 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 331 | drivers/net/ni52.c | p->scb = (struct scb_struct *) (dev->mem_start); |
dev | 348 | drivers/net/ni52.c | printk("%s: Init-Problems (alloc).\n",dev->name); |
dev | 358 | drivers/net/ni52.c | int ni52_probe(struct device *dev) |
dev | 364 | drivers/net/ni52.c | int base_addr = dev->base_addr; |
dev | 369 | drivers/net/ni52.c | return ni52_probe1(dev, base_addr); |
dev | 374 | drivers/net/ni52.c | printk("%s: no autoprobing allowed for modules.\n",dev->name); |
dev | 384 | drivers/net/ni52.c | dev->base_addr = ioaddr; |
dev | 385 | drivers/net/ni52.c | if (ni52_probe1(dev, ioaddr) == 0) |
dev | 390 | drivers/net/ni52.c | for(dev->base_addr=0x200;dev->base_addr<0x400;dev->base_addr+=8) |
dev | 392 | drivers/net/ni52.c | int ioaddr = dev->base_addr; |
dev | 398 | drivers/net/ni52.c | if (ni52_probe1(dev, ioaddr) == 0) |
dev | 405 | drivers/net/ni52.c | dev->base_addr = base_addr; |
dev | 409 | drivers/net/ni52.c | static int ni52_probe1(struct device *dev,int ioaddr) |
dev | 414 | drivers/net/ni52.c | dev->dev_addr[i] = inb(dev->base_addr+i); |
dev | 416 | drivers/net/ni52.c | if(dev->dev_addr[0] != NI52_ADDR0 || dev->dev_addr[1] != NI52_ADDR1 |
dev | 417 | drivers/net/ni52.c | || dev->dev_addr[2] != NI52_ADDR2) |
dev | 420 | drivers/net/ni52.c | printk("%s: NI5210 found at %#3lx, ",dev->name,dev->base_addr); |
dev | 428 | drivers/net/ni52.c | size = dev->mem_end - dev->mem_start; |
dev | 431 | drivers/net/ni52.c | printk("\n%s: Illegal memory size %d. Allowed is 0x2000 or 0x4000 bytes.\n",dev->name,size); |
dev | 434 | drivers/net/ni52.c | if(!check586(dev,(char *) dev->mem_start,size)) |
dev | 436 | drivers/net/ni52.c | printk("?memcheck, Can't find memory at 0x%lx with size %d!\n",dev->mem_start,size); |
dev | 440 | drivers/net/ni52.c | if(dev->mem_start != 0) /* no auto-mem-probe */ |
dev | 443 | drivers/net/ni52.c | if(!check586(dev,(char *) dev->mem_start,size)) { |
dev | 445 | drivers/net/ni52.c | if(!check586(dev,(char *) dev->mem_start,size)) { |
dev | 446 | drivers/net/ni52.c | printk("?memprobe, Can't find memory at 0x%lx!\n",dev->mem_start); |
dev | 461 | drivers/net/ni52.c | dev->mem_start = memaddrs[i]; |
dev | 463 | drivers/net/ni52.c | if(check586(dev,(char *)dev->mem_start,size)) /* 8K-check */ |
dev | 466 | drivers/net/ni52.c | if(check586(dev,(char *)dev->mem_start,size)) /* 16K-check */ |
dev | 470 | drivers/net/ni52.c | dev->mem_end = dev->mem_start + size; /* set mem_end showed by 'ifconfig' */ |
dev | 473 | drivers/net/ni52.c | dev->priv = (void *) kmalloc(sizeof(struct priv),GFP_KERNEL); |
dev | 474 | drivers/net/ni52.c | if(dev->priv == NULL) |
dev | 476 | drivers/net/ni52.c | printk("%s: Ooops .. can't allocate private driver memory.\n",dev->name); |
dev | 480 | drivers/net/ni52.c | memset((char *) dev->priv,0,sizeof(struct priv)); |
dev | 482 | drivers/net/ni52.c | ((struct priv *) (dev->priv))->memtop = (char *) dev->mem_start + size; |
dev | 483 | drivers/net/ni52.c | ((struct priv *) (dev->priv))->base = dev->mem_start + size - 0x01000000; |
dev | 484 | drivers/net/ni52.c | alloc586(dev); |
dev | 488 | drivers/net/ni52.c | ((struct priv *) dev->priv)->num_recv_buffs = NUM_RECV_BUFFS_8; |
dev | 490 | drivers/net/ni52.c | ((struct priv *) dev->priv)->num_recv_buffs = NUM_RECV_BUFFS_16; |
dev | 492 | drivers/net/ni52.c | printk("Memaddr: 0x%lx, Memsize: %d, ",dev->mem_start,size); |
dev | 494 | drivers/net/ni52.c | if(dev->irq < 2) |
dev | 499 | drivers/net/ni52.c | if(!(dev->irq = autoirq_report(2))) |
dev | 504 | drivers/net/ni52.c | printk("IRQ %d (autodetected).\n",dev->irq); |
dev | 507 | drivers/net/ni52.c | if(dev->irq == 2) |
dev | 508 | drivers/net/ni52.c | dev->irq = 9; |
dev | 509 | drivers/net/ni52.c | printk("IRQ %d (assigned and not checked!).\n",dev->irq); |
dev | 512 | drivers/net/ni52.c | dev->open = &ni52_open; |
dev | 513 | drivers/net/ni52.c | dev->stop = &ni52_close; |
dev | 514 | drivers/net/ni52.c | dev->get_stats = &ni52_get_stats; |
dev | 515 | drivers/net/ni52.c | dev->hard_start_xmit = &ni52_send_packet; |
dev | 516 | drivers/net/ni52.c | dev->set_multicast_list = &set_multicast_list; |
dev | 518 | drivers/net/ni52.c | dev->if_port = 0; |
dev | 520 | drivers/net/ni52.c | ether_setup(dev); |
dev | 522 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 523 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 524 | drivers/net/ni52.c | dev->start = 0; |
dev | 534 | drivers/net/ni52.c | static int init586(struct device *dev) |
dev | 538 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 543 | drivers/net/ni52.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 544 | drivers/net/ni52.c | int num_addrs=dev->mc_count; |
dev | 562 | drivers/net/ni52.c | if(dev->flags & IFF_ALLMULTI) { |
dev | 565 | drivers/net/ni52.c | printk("%s: switching to promisc. mode\n",dev->name); |
dev | 566 | drivers/net/ni52.c | dev->flags|=IFF_PROMISC; |
dev | 569 | drivers/net/ni52.c | if(dev->flags&IFF_PROMISC) |
dev | 572 | drivers/net/ni52.c | dev->flags|=IFF_PROMISC; |
dev | 586 | drivers/net/ni52.c | printk("%s: configure command failed: %x\n",dev->name,cfg_cmd->cmd_status); |
dev | 599 | drivers/net/ni52.c | memcpy((char *)&ias_cmd->iaddr,(char *) dev->dev_addr,ETH_ALEN); |
dev | 609 | drivers/net/ni52.c | printk("%s (ni52): individual address setup command failed: %04x\n",dev->name,ias_cmd->cmd_status); |
dev | 631 | drivers/net/ni52.c | printk("%s: Problems while running the TDR.\n",dev->name); |
dev | 644 | drivers/net/ni52.c | printk("%s: TDR: Transceiver problem. Check the cable(s)!\n",dev->name); |
dev | 646 | drivers/net/ni52.c | printk("%s: TDR: No correct termination %d clocks away.\n",dev->name,result & TDR_TIMEMASK); |
dev | 650 | drivers/net/ni52.c | printk("%s: TDR: Detected a short circuit %d clocks away.\n",dev->name,result & TDR_TIMEMASK); |
dev | 653 | drivers/net/ni52.c | printk("%s: TDR: Unknown status %04x\n",dev->name,result); |
dev | 659 | drivers/net/ni52.c | if(num_addrs && !(dev->flags & IFF_PROMISC) ) |
dev | 677 | drivers/net/ni52.c | printk("%s: Can't apply multicast-address-list.\n",dev->name); |
dev | 703 | drivers/net/ni52.c | ptr = alloc_rfa(dev,(void *)ptr); /* init receive-frame-area */ |
dev | 718 | drivers/net/ni52.c | printk("%s: not enough shared-mem for your configuration!\n",dev->name); |
dev | 767 | drivers/net/ni52.c | static void *alloc_rfa(struct device *dev,void *ptr) |
dev | 772 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 815 | drivers/net/ni52.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 820 | drivers/net/ni52.c | if (!dev) { |
dev | 824 | drivers/net/ni52.c | p = (struct priv *) dev->priv; |
dev | 829 | drivers/net/ni52.c | dev->interrupt = 1; |
dev | 839 | drivers/net/ni52.c | ni52_rcv_int(dev); |
dev | 853 | drivers/net/ni52.c | printk("%s: Receiver-Unit went 'NOT READY': %04x/%02x.\n",dev->name,(int) stat,(int) p->scb->rus); |
dev | 854 | drivers/net/ni52.c | ni52_rnr_int(dev); |
dev | 859 | drivers/net/ni52.c | ni52_xmt_int(dev); |
dev | 864 | drivers/net/ni52.c | if(dev->start) |
dev | 865 | drivers/net/ni52.c | printk("%s: oops! CU has left active state. stat: %04x/%02x.\n",dev->name,(int) stat,(int) p->scb->cus); |
dev | 875 | drivers/net/ni52.c | printk("%s: Acknowledge timed out.\n",dev->name); |
dev | 884 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 891 | drivers/net/ni52.c | static void ni52_rcv_int(struct device *dev) |
dev | 897 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 915 | drivers/net/ni52.c | skb->dev = dev; |
dev | 919 | drivers/net/ni52.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 936 | drivers/net/ni52.c | printk("%s: Whoops .. no end mark in RBD list\n",dev->name); |
dev | 944 | drivers/net/ni52.c | printk("%s: received oversized frame! length: %d\n",dev->name,totlen); |
dev | 950 | drivers/net/ni52.c | printk("%s: oops! rfd-error-status: %04x\n",dev->name,status); |
dev | 982 | drivers/net/ni52.c | printk("%s: RU hasn't fetched next RFD (not busy/complete)\n",dev->name); |
dev | 993 | drivers/net/ni52.c | printk("%s: received a FC intr. without having a frame: %04x %d\n",dev->name,status,old_at_least); |
dev | 1014 | drivers/net/ni52.c | static void ni52_rnr_int(struct device *dev) |
dev | 1016 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1025 | drivers/net/ni52.c | alloc_rfa(dev,(char *)p->rfd_first); |
dev | 1027 | drivers/net/ni52.c | startrecv586(dev); /* restart RU */ |
dev | 1029 | drivers/net/ni52.c | printk("%s: Receive-Unit restarted. Status: %04x\n",dev->name,p->scb->rus); |
dev | 1037 | drivers/net/ni52.c | static void ni52_xmt_int(struct device *dev) |
dev | 1040 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1047 | drivers/net/ni52.c | printk("%s: strange .. xmit-int without a 'COMPLETE'\n",dev->name); |
dev | 1058 | drivers/net/ni52.c | printk("%s: late collision detected.\n",dev->name); |
dev | 1063 | drivers/net/ni52.c | printk("%s: no carrier detected.\n",dev->name); |
dev | 1066 | drivers/net/ni52.c | printk("%s: loss of CTS detected.\n",dev->name); |
dev | 1069 | drivers/net/ni52.c | printk("%s: DMA underrun detected.\n",dev->name); |
dev | 1072 | drivers/net/ni52.c | printk("%s: Max. collisions exceeded.\n",dev->name); |
dev | 1082 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 1090 | drivers/net/ni52.c | static void startrecv586(struct device *dev) |
dev | 1092 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1106 | drivers/net/ni52.c | static int ni52_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1112 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1114 | drivers/net/ni52.c | if(dev->tbusy) |
dev | 1116 | drivers/net/ni52.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1123 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 1125 | drivers/net/ni52.c | printk("%s: strange ... timeout with CU active?!?\n",dev->name); |
dev | 1126 | drivers/net/ni52.c | printk("%s: X0: %04x N0: %04x N1: %04x %d\n",dev->name,(int)p->xmit_cmds[0]->cmd_status,(int)p->nop_cmds[0]->cmd_status,(int)p->nop_cmds[1]->cmd_status,(int)p->nop_point); |
dev | 1135 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1142 | drivers/net/ni52.c | printk("%s: xmitter timed out, try to restart! stat: %02x\n",dev->name,p->scb->cus); |
dev | 1143 | drivers/net/ni52.c | printk("%s: command-stats: %04x %04x\n",dev->name,p->xmit_cmds[0]->cmd_status,p->xmit_cmds[1]->cmd_status); |
dev | 1144 | drivers/net/ni52.c | printk("%s: check, whether you set the right interrupt number!\n",dev->name); |
dev | 1146 | drivers/net/ni52.c | ni52_close(dev); |
dev | 1147 | drivers/net/ni52.c | ni52_open(dev); |
dev | 1149 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1155 | drivers/net/ni52.c | dev_tint(dev); |
dev | 1163 | drivers/net/ni52.c | printk("%s: Sorry, max. framelength is %d bytes. The length of your frame is %ld bytes.\n",dev->name,XMIT_BUFF_SIZE,skb->len); |
dev | 1167 | drivers/net/ni52.c | if (set_bit(0, (void*)&dev->tbusy)) { |
dev | 1168 | drivers/net/ni52.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1173 | drivers/net/ni52.c | printk("%s: Queue was locked\n",dev->name); |
dev | 1188 | drivers/net/ni52.c | printk("%s: Hmmm .. CU is still running and we wanna send a new packet.\n",dev->name); |
dev | 1189 | drivers/net/ni52.c | printk("%s: stat: %04x %04x\n",dev->name,p->scb->cus,p->xmit_cmds[0]->cmd_status); |
dev | 1207 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1216 | drivers/net/ni52.c | printk("%s: Can't start transmit-command.\n",dev->name); |
dev | 1227 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1242 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1250 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 1264 | drivers/net/ni52.c | static struct enet_statistics *ni52_get_stats(struct device *dev) |
dev | 1266 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1289 | drivers/net/ni52.c | static void set_multicast_list(struct device *dev) |
dev | 1291 | drivers/net/ni52.c | if(!dev->start) |
dev | 1293 | drivers/net/ni52.c | printk("%s: Can't apply promiscuous/multicastmode to a not running interface.\n",dev->name); |
dev | 1297 | drivers/net/ni52.c | dev->start = 0; |
dev | 1300 | drivers/net/ni52.c | alloc586(dev); |
dev | 1301 | drivers/net/ni52.c | init586(dev); |
dev | 1302 | drivers/net/ni52.c | startrecv586(dev); |
dev | 1305 | drivers/net/ni52.c | dev->start = 1; |
dev | 1349 | drivers/net/ni52.c | void ni52_dump(struct device *dev,void *ptr) |
dev | 1351 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1371 | drivers/net/ni52.c | printk("%s: Can't get dump information.\n",dev->name); |
dev | 80 | drivers/net/ni65.c | #define PORT dev->base_addr |
dev | 118 | drivers/net/ni65.c | static int ni65_probe1(struct device **dev,int); |
dev | 120 | drivers/net/ni65.c | static void ni65_recv_intr(struct device *dev,int); |
dev | 121 | drivers/net/ni65.c | static void ni65_xmit_intr(struct device *dev,int); |
dev | 122 | drivers/net/ni65.c | static int ni65_open(struct device *dev); |
dev | 123 | drivers/net/ni65.c | static int ni65_am7990_reinit(struct device *dev); |
dev | 124 | drivers/net/ni65.c | static int ni65_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 125 | drivers/net/ni65.c | static int ni65_close(struct device *dev); |
dev | 127 | drivers/net/ni65.c | static void set_multicast_list(struct device *dev); |
dev | 156 | drivers/net/ni65.c | static int ni65_open(struct device *dev) |
dev | 158 | drivers/net/ni65.c | if(ni65_am7990_reinit(dev)) |
dev | 160 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 161 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 162 | drivers/net/ni65.c | dev->start = 1; |
dev | 167 | drivers/net/ni65.c | dev->start = 0; |
dev | 172 | drivers/net/ni65.c | static int ni65_close(struct device *dev) |
dev | 175 | drivers/net/ni65.c | dev->tbusy = 1; |
dev | 176 | drivers/net/ni65.c | dev->start = 0; |
dev | 184 | drivers/net/ni65.c | int ni65_probe(struct device *dev) |
dev | 189 | drivers/net/ni65.c | if(dev) { |
dev | 190 | drivers/net/ni65.c | int base_addr = dev->base_addr; |
dev | 192 | drivers/net/ni65.c | return ni65_probe1(&dev, base_addr); |
dev | 195 | drivers/net/ni65.c | dev->base_addr = base_addr; |
dev | 207 | drivers/net/ni65.c | if (ni65_probe1(&dev, ioaddr) == 0) |
dev | 225 | drivers/net/ni65.c | struct device *dev = *dev1; |
dev | 230 | drivers/net/ni65.c | printk("%s: wrong Hardaddress \n",dev ? dev->name : "ni6510" ); |
dev | 234 | drivers/net/ni65.c | if(!dev) { |
dev | 235 | drivers/net/ni65.c | dev = init_etherdev(0,0); |
dev | 236 | drivers/net/ni65.c | *dev1 = dev; |
dev | 238 | drivers/net/ni65.c | dev->base_addr = ioaddr; |
dev | 241 | drivers/net/ni65.c | dev->dev_addr[i] = inb(PORT+L_EBASE+i); |
dev | 243 | drivers/net/ni65.c | if(dev->irq == 0) |
dev | 244 | drivers/net/ni65.c | dev->irq = irqtab[(inw(PORT+L_CONFIG)>>2)&3]; |
dev | 245 | drivers/net/ni65.c | if(dev->dma == 0) |
dev | 246 | drivers/net/ni65.c | dev->dma = dmatab[inw(PORT+L_CONFIG)&3]; |
dev | 248 | drivers/net/ni65.c | printk("%s: %s found at %#3lx, IRQ %d DMA %d.\n", dev->name, |
dev | 249 | drivers/net/ni65.c | "ni6510", dev->base_addr, dev->irq,dev->dma); |
dev | 252 | drivers/net/ni65.c | int irqval = request_irq(dev->irq, &ni65_interrupt,0,"ni6510",NULL); |
dev | 255 | drivers/net/ni65.c | dev->name,dev->irq, irqval); |
dev | 258 | drivers/net/ni65.c | if(request_dma(dev->dma, "ni6510") != 0) |
dev | 260 | drivers/net/ni65.c | printk("%s: Can't request dma-channel %d\n",dev->name,(int) dev->dma); |
dev | 261 | drivers/net/ni65.c | free_irq(dev->irq,NULL); |
dev | 265 | drivers/net/ni65.c | irq2dev_map[dev->irq] = dev; |
dev | 272 | drivers/net/ni65.c | dev->open = ni65_open; |
dev | 273 | drivers/net/ni65.c | dev->stop = ni65_close; |
dev | 274 | drivers/net/ni65.c | dev->hard_start_xmit = ni65_send_packet; |
dev | 275 | drivers/net/ni65.c | dev->get_stats = ni65_get_stats; |
dev | 276 | drivers/net/ni65.c | dev->set_multicast_list = set_multicast_list; |
dev | 278 | drivers/net/ni65.c | ether_setup(dev); |
dev | 280 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 281 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 282 | drivers/net/ni65.c | dev->start = 0; |
dev | 292 | drivers/net/ni65.c | printk("%s: Can't alloc buffer in lower 16MB!\n",dev->name); |
dev | 295 | drivers/net/ni65.c | p = dev->priv = (struct priv *) ptr; |
dev | 296 | drivers/net/ni65.c | memset((char *) dev->priv,0,sizeof(struct priv)); |
dev | 301 | drivers/net/ni65.c | printk("%s: Can't alloc Xmit-Mem.\n",dev->name); |
dev | 305 | drivers/net/ni65.c | printk("%s: Can't alloc Xmit-Mem in lower 16MB!\n",dev->name); |
dev | 319 | drivers/net/ni65.c | printk("%s: unable to alloc recv-mem\n",dev->name); |
dev | 322 | drivers/net/ni65.c | skb->dev = dev; |
dev | 326 | drivers/net/ni65.c | printk("%s: unable to alloc receive-memory in lower 16MB!\n",dev->name); |
dev | 335 | drivers/net/ni65.c | printk("%s: unable to alloc recv-mem\n",dev->name); |
dev | 339 | drivers/net/ni65.c | printk("%s: unable to alloc receive-memory in lower 16MB!\n",dev->name); |
dev | 352 | drivers/net/ni65.c | static int ni65_am7990_reinit(struct device *dev) |
dev | 355 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 360 | drivers/net/ni65.c | disable_dma(dev->dma); /* I've never worked with dma, but we do it like the packetdriver */ |
dev | 361 | drivers/net/ni65.c | set_dma_mode(dev->dma,DMA_MODE_CASCADE); |
dev | 362 | drivers/net/ni65.c | enable_dma(dev->dma); |
dev | 367 | drivers/net/ni65.c | printk(KERN_ERR "%s: can't RESET ni6510 card: %04x\n",dev->name,(int) inw(PORT+L_DATAREG)); |
dev | 368 | drivers/net/ni65.c | disable_dma(dev->dma); |
dev | 369 | drivers/net/ni65.c | free_dma(dev->dma); |
dev | 370 | drivers/net/ni65.c | free_irq(dev->irq, NULL); |
dev | 404 | drivers/net/ni65.c | p->ib.eaddr[i] = dev->dev_addr[i]; |
dev | 410 | drivers/net/ni65.c | if(dev->flags & IFF_PROMISC) { |
dev | 413 | drivers/net/ni65.c | else if(dev->mc_count || dev->flags & IFF_ALLMULTI) { |
dev | 439 | drivers/net/ni65.c | printk(KERN_ERR "%s: can't init am7990/lance, status: %04x\n",dev->name,(int) inw(PORT+L_DATAREG)); |
dev | 440 | drivers/net/ni65.c | disable_dma(dev->dma); |
dev | 441 | drivers/net/ni65.c | free_dma(dev->dma); |
dev | 442 | drivers/net/ni65.c | free_irq(dev->irq, NULL); |
dev | 457 | drivers/net/ni65.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 460 | drivers/net/ni65.c | if (dev == NULL) { |
dev | 465 | drivers/net/ni65.c | dev->interrupt = 1; |
dev | 477 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 489 | drivers/net/ni65.c | ni65_recv_intr(dev,csr0); |
dev | 491 | drivers/net/ni65.c | ni65_xmit_intr(dev,csr0); |
dev | 496 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 508 | drivers/net/ni65.c | printk(KERN_ERR "%s: Ooops, receive ring currupted\n",dev->name); |
dev | 510 | drivers/net/ni65.c | ni65_recv_intr(dev,csr0); |
dev | 521 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 530 | drivers/net/ni65.c | static void ni65_xmit_intr(struct device *dev,int csr0) |
dev | 532 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 553 | drivers/net/ni65.c | printk(KERN_ERR "%s: tdr-problems (e.g. no resistor)\n",dev->name); |
dev | 565 | drivers/net/ni65.c | printk(KERN_ERR "%s: Xmit FIFO/BUFF error\n",dev->name); |
dev | 568 | drivers/net/ni65.c | printk(KERN_ERR "%s: xmit-error: %04x %02x-%04x\n",dev->name,csr0,(int) tmdstat,(int) tmdp->status2); |
dev | 579 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 587 | drivers/net/ni65.c | static void ni65_recv_intr(struct device *dev,int csr0) |
dev | 591 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 602 | drivers/net/ni65.c | printk(KERN_ERR "%s: recv, packet too long: %d\n",dev->name,rmdp->mlen & 0x0fff); |
dev | 607 | drivers/net/ni65.c | dev->name,(int) rmdstat,csr0,(int) inw(PORT+L_DATAREG) ); |
dev | 616 | drivers/net/ni65.c | printk(KERN_ERR "%s: Rcv FIFO/BUFF error.\n",dev->name); |
dev | 633 | drivers/net/ni65.c | skb->dev = dev; |
dev | 653 | drivers/net/ni65.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 659 | drivers/net/ni65.c | printk(KERN_ERR "%s: can't alloc new sk_buff\n",dev->name); |
dev | 665 | drivers/net/ni65.c | printk(KERN_INFO "%s: received runt packet\n",dev->name); |
dev | 676 | drivers/net/ni65.c | static int ni65_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 678 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 680 | drivers/net/ni65.c | if(dev->tbusy) |
dev | 682 | drivers/net/ni65.c | int tickssofar = jiffies - dev->trans_start; |
dev | 686 | drivers/net/ni65.c | printk(KERN_ERR "%s: xmitter timed out, try to restart!\n",dev->name); |
dev | 687 | drivers/net/ni65.c | ni65_am7990_reinit(dev); |
dev | 688 | drivers/net/ni65.c | dev->tbusy=0; |
dev | 689 | drivers/net/ni65.c | dev->trans_start = jiffies; |
dev | 693 | drivers/net/ni65.c | dev_tint(dev); |
dev | 700 | drivers/net/ni65.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 701 | drivers/net/ni65.c | printk(KERN_ERR "%s: Transmitter access conflict.\n", dev->name); |
dev | 705 | drivers/net/ni65.c | printk(KERN_ERR "%s: Queue was locked.\n", dev->name); |
dev | 739 | drivers/net/ni65.c | dev->tbusy = (p->tmdnum == p->tmdlast) ? 1 : 0; |
dev | 741 | drivers/net/ni65.c | dev->trans_start = jiffies; |
dev | 749 | drivers/net/ni65.c | static struct enet_statistics *ni65_get_stats(struct device *dev) |
dev | 751 | drivers/net/ni65.c | return &((struct priv *) dev->priv)->stats; |
dev | 754 | drivers/net/ni65.c | static void set_multicast_list(struct device *dev) |
dev | 756 | drivers/net/ni65.c | if(!ni65_am7990_reinit(dev)) |
dev | 757 | drivers/net/ni65.c | printk(KERN_ERR "%s: Can't switch card into MC mode!\n",dev->name); |
dev | 758 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 138 | drivers/net/pi2.c | static int pi0_preprobe(struct device *dev){return 0;} /* Dummy probe function */ |
dev | 149 | drivers/net/pi2.c | static int pi_probe(struct device *dev, int card_type); |
dev | 150 | drivers/net/pi2.c | static int pi_open(struct device *dev); |
dev | 151 | drivers/net/pi2.c | static int pi_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 153 | drivers/net/pi2.c | static int pi_close(struct device *dev); |
dev | 154 | drivers/net/pi2.c | static int pi_ioctl(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 155 | drivers/net/pi2.c | static struct enet_statistics *pi_get_stats(struct device *dev); |
dev | 157 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp); |
dev | 160 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp); |
dev | 504 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp) |
dev | 556 | drivers/net/pi2.c | printk("PI: %s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 561 | drivers/net/pi2.c | skb->dev = dev; |
dev | 580 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp) |
dev | 645 | drivers/net/pi2.c | printk("PI: %s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 650 | drivers/net/pi2.c | skb->dev = dev; |
dev | 1077 | drivers/net/pi2.c | static int pi_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 1080 | drivers/net/pi2.c | return ax25_encapsulate(skb, dev, type, daddr, saddr, len); |
dev | 1084 | drivers/net/pi2.c | static int pi_rebuild_header(void *buff, struct device *dev, unsigned long raddr, |
dev | 1087 | drivers/net/pi2.c | return ax25_rebuild_header(buff, dev, raddr, skb); |
dev | 1090 | drivers/net/pi2.c | static void scc_init(struct device *dev) |
dev | 1093 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1192 | drivers/net/pi2.c | static void chipset_init(struct device *dev) |
dev | 1197 | drivers/net/pi2.c | cardbase = dev->base_addr & 0x3f0; |
dev | 1201 | drivers/net/pi2.c | wrtscc(cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
dev | 1203 | drivers/net/pi2.c | wrtscc(cardbase, dev->base_addr + CTL, R9, 0); |
dev | 1278 | drivers/net/pi2.c | static int pi_set_mac_address(struct device *dev, struct sockaddr *sa) |
dev | 1280 | drivers/net/pi2.c | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); /* addr is an AX.25 shifted ASCII */ |
dev | 1300 | drivers/net/pi2.c | static int pi_probe(struct device *dev, int card_type) |
dev | 1308 | drivers/net/pi2.c | ioaddr = dev->base_addr; |
dev | 1313 | drivers/net/pi2.c | dev->priv = (void *) (((int) dev->priv + 7) & ~7); |
dev | 1314 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
dev | 1316 | drivers/net/pi2.c | memset(dev->priv, 0, sizeof(struct pi_local)); |
dev | 1319 | drivers/net/pi2.c | mem_ptr = (unsigned long) dev->priv + sizeof(struct pi_local); |
dev | 1337 | drivers/net/pi2.c | lp->base = dev->base_addr; |
dev | 1338 | drivers/net/pi2.c | lp->cardbase = dev->base_addr & 0x3f0; |
dev | 1339 | drivers/net/pi2.c | if (dev->base_addr & CHANA) { |
dev | 1360 | drivers/net/pi2.c | chipset_init(dev); |
dev | 1362 | drivers/net/pi2.c | if (dev->base_addr & CHANA) { /* Do these things only for the A port */ |
dev | 1365 | drivers/net/pi2.c | lp->dmachan = dev->dma; |
dev | 1371 | drivers/net/pi2.c | if (dev->irq < 2) { |
dev | 1382 | drivers/net/pi2.c | dev->irq = autoirq_report(20); |
dev | 1383 | drivers/net/pi2.c | if (!dev->irq) { |
dev | 1388 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
dev | 1390 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, 0); |
dev | 1395 | drivers/net/pi2.c | dev->irq, dev->dma); |
dev | 1401 | drivers/net/pi2.c | int irqval = request_irq(dev->irq, &pi_interrupt,0, "pi2", NULL); |
dev | 1404 | drivers/net/pi2.c | dev->irq, irqval); |
dev | 1414 | drivers/net/pi2.c | dev->open = pi_open; |
dev | 1415 | drivers/net/pi2.c | dev->stop = pi_close; |
dev | 1416 | drivers/net/pi2.c | dev->do_ioctl = pi_ioctl; |
dev | 1417 | drivers/net/pi2.c | dev->hard_start_xmit = pi_send_packet; |
dev | 1418 | drivers/net/pi2.c | dev->get_stats = pi_get_stats; |
dev | 1422 | drivers/net/pi2.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 1425 | drivers/net/pi2.c | dev->hard_header = pi_header; |
dev | 1426 | drivers/net/pi2.c | dev->rebuild_header = pi_rebuild_header; |
dev | 1427 | drivers/net/pi2.c | dev->set_mac_address = pi_set_mac_address; |
dev | 1429 | drivers/net/pi2.c | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
dev | 1430 | drivers/net/pi2.c | dev->hard_header_len = 73; /* We do digipeaters now */ |
dev | 1431 | drivers/net/pi2.c | dev->mtu = 1500; /* eth_mtu is the default */ |
dev | 1432 | drivers/net/pi2.c | dev->addr_len = 7; /* sizeof an ax.25 address */ |
dev | 1433 | drivers/net/pi2.c | memcpy(dev->broadcast, ax25_bcast, 7); |
dev | 1434 | drivers/net/pi2.c | memcpy(dev->dev_addr, ax25_test, 7); |
dev | 1437 | drivers/net/pi2.c | dev->flags = 0; |
dev | 1438 | drivers/net/pi2.c | dev->family = AF_INET; |
dev | 1439 | drivers/net/pi2.c | dev->pa_addr = 0; |
dev | 1440 | drivers/net/pi2.c | dev->pa_brdaddr = 0; |
dev | 1441 | drivers/net/pi2.c | dev->pa_mask = 0; |
dev | 1442 | drivers/net/pi2.c | dev->pa_alen = 4; |
dev | 1454 | drivers/net/pi2.c | static int pi_open(struct device *dev) |
dev | 1459 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1461 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1463 | drivers/net/pi2.c | if (request_dma(dev->dma,"pi2")) { |
dev | 1464 | drivers/net/pi2.c | free_irq(dev->irq, NULL); |
dev | 1467 | drivers/net/pi2.c | irq2dev_map[dev->irq] = dev; |
dev | 1470 | drivers/net/pi2.c | chipset_init(dev); |
dev | 1474 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1475 | drivers/net/pi2.c | scc_init(dev); /* Called once for each channel */ |
dev | 1476 | drivers/net/pi2.c | scc_init(dev->next); |
dev | 1486 | drivers/net/pi2.c | dev->tbusy = 0; |
dev | 1487 | drivers/net/pi2.c | dev->interrupt = 0; |
dev | 1488 | drivers/net/pi2.c | dev->start = 1; |
dev | 1493 | drivers/net/pi2.c | static int pi_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1495 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1501 | drivers/net/pi2.c | dev_tint(dev); |
dev | 1505 | drivers/net/pi2.c | dev->trans_start = jiffies; |
dev | 1567 | drivers/net/pi2.c | static int pi_close(struct device *dev) |
dev | 1576 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
dev | 1579 | drivers/net/pi2.c | chipset_init(dev); /* reset the scc */ |
dev | 1584 | drivers/net/pi2.c | dev->tbusy = 1; |
dev | 1585 | drivers/net/pi2.c | dev->start = 0; |
dev | 1595 | drivers/net/pi2.c | static int pi_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 1599 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1633 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1638 | drivers/net/pi2.c | pi_close(dev); |
dev | 1640 | drivers/net/pi2.c | dev->dma = lp->dmachan = rq.dmachan; |
dev | 1643 | drivers/net/pi2.c | pi_open(dev); |
dev | 1663 | drivers/net/pi2.c | rq.irq = dev->irq; |
dev | 1677 | drivers/net/pi2.c | pi_get_stats(struct device *dev) |
dev | 1679 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 118 | drivers/net/pi2.h | int dev; /* Device number */ |
dev | 133 | drivers/net/plip.c | #define PAR_DATA(dev) ((dev)->base_addr+0) |
dev | 134 | drivers/net/plip.c | #define PAR_STATUS(dev) ((dev)->base_addr+1) |
dev | 135 | drivers/net/plip.c | #define PAR_CONTROL(dev) ((dev)->base_addr+2) |
dev | 138 | drivers/net/plip.c | static void plip_kick_bh(struct device *dev); |
dev | 139 | drivers/net/plip.c | static void plip_bh(struct device *dev); |
dev | 145 | drivers/net/plip.c | static int plip_rebuild_header(void *buff, struct device *dev, |
dev | 147 | drivers/net/plip.c | static int plip_tx_packet(struct sk_buff *skb, struct device *dev); |
dev | 148 | drivers/net/plip.c | static int plip_open(struct device *dev); |
dev | 149 | drivers/net/plip.c | static int plip_close(struct device *dev); |
dev | 150 | drivers/net/plip.c | static struct enet_statistics *plip_get_stats(struct device *dev); |
dev | 151 | drivers/net/plip.c | static int plip_config(struct device *dev, struct ifmap *map); |
dev | 152 | drivers/net/plip.c | static int plip_ioctl(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 211 | drivers/net/plip.c | int (*orig_rebuild_header)(void *eth, struct device *dev, |
dev | 218 | drivers/net/plip.c | plip_init(struct device *dev) |
dev | 221 | drivers/net/plip.c | int iosize = (PAR_DATA(dev) == 0x3bc) ? 3 : 8; |
dev | 224 | drivers/net/plip.c | if (check_region(PAR_DATA(dev), iosize) < 0) |
dev | 228 | drivers/net/plip.c | outb(0, PAR_DATA(dev)); |
dev | 230 | drivers/net/plip.c | if (inb(PAR_DATA(dev)) != 0) |
dev | 234 | drivers/net/plip.c | printk("%s: Parallel port at %#3lx, ", dev->name, dev->base_addr); |
dev | 235 | drivers/net/plip.c | if (dev->irq) { |
dev | 236 | drivers/net/plip.c | printk("using assigned IRQ %d.\n", dev->irq); |
dev | 245 | drivers/net/plip.c | outb(0x00, PAR_CONTROL(dev)); |
dev | 247 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 248 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 249 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 254 | drivers/net/plip.c | dev->irq = irq; |
dev | 255 | drivers/net/plip.c | printk("using probed IRQ %d.\n", dev->irq); |
dev | 261 | drivers/net/plip.c | request_region(PAR_DATA(dev), iosize, dev->name); |
dev | 264 | drivers/net/plip.c | ether_setup(dev); |
dev | 267 | drivers/net/plip.c | dev->hard_start_xmit = plip_tx_packet; |
dev | 268 | drivers/net/plip.c | dev->open = plip_open; |
dev | 269 | drivers/net/plip.c | dev->stop = plip_close; |
dev | 270 | drivers/net/plip.c | dev->get_stats = plip_get_stats; |
dev | 271 | drivers/net/plip.c | dev->set_config = plip_config; |
dev | 272 | drivers/net/plip.c | dev->do_ioctl = plip_ioctl; |
dev | 273 | drivers/net/plip.c | dev->flags = IFF_POINTOPOINT|IFF_NOARP; |
dev | 276 | drivers/net/plip.c | dev->priv = kmalloc(sizeof (struct net_local), GFP_KERNEL); |
dev | 277 | drivers/net/plip.c | if (dev->priv == NULL) { |
dev | 278 | drivers/net/plip.c | printk(KERN_ERR "%s: out of memory\n", dev->name); |
dev | 279 | drivers/net/plip.c | release_region(PAR_DATA(dev), iosize); |
dev | 282 | drivers/net/plip.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 283 | drivers/net/plip.c | nl = (struct net_local *) dev->priv; |
dev | 285 | drivers/net/plip.c | nl->orig_rebuild_header = dev->rebuild_header; |
dev | 286 | drivers/net/plip.c | dev->rebuild_header = plip_rebuild_header; |
dev | 296 | drivers/net/plip.c | nl->immediate.data = dev; |
dev | 301 | drivers/net/plip.c | nl->deferred.data = dev; |
dev | 310 | drivers/net/plip.c | plip_kick_bh(struct device *dev) |
dev | 312 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 331 | drivers/net/plip.c | static int plip_bh_timeout_error(struct device *dev, struct net_local *nl, |
dev | 340 | drivers/net/plip.c | typedef int (*plip_func)(struct device *dev, struct net_local *nl, |
dev | 354 | drivers/net/plip.c | plip_bh(struct device *dev) |
dev | 356 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 364 | drivers/net/plip.c | if ((r = (*f)(dev, nl, snd, rcv)) != OK |
dev | 365 | drivers/net/plip.c | && (r = plip_bh_timeout_error(dev, nl, snd, rcv, r)) != OK) { |
dev | 372 | drivers/net/plip.c | plip_bh_timeout_error(struct device *dev, struct net_local *nl, |
dev | 390 | drivers/net/plip.c | c0 = inb(PAR_STATUS(dev)); |
dev | 392 | drivers/net/plip.c | dev->name, snd->state, c0); |
dev | 408 | drivers/net/plip.c | c0 = inb(PAR_STATUS(dev)); |
dev | 410 | drivers/net/plip.c | dev->name, rcv->state, c0); |
dev | 425 | drivers/net/plip.c | disable_irq(dev->irq); |
dev | 426 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 427 | drivers/net/plip.c | dev->tbusy = 1; |
dev | 429 | drivers/net/plip.c | outb(0x00, PAR_DATA(dev)); |
dev | 436 | drivers/net/plip.c | plip_none(struct device *dev, struct net_local *nl, |
dev | 495 | drivers/net/plip.c | plip_receive_packet(struct device *dev, struct net_local *nl, |
dev | 498 | drivers/net/plip.c | unsigned short status_addr = PAR_STATUS(dev); |
dev | 504 | drivers/net/plip.c | disable_irq(dev->irq); |
dev | 505 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 506 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 507 | drivers/net/plip.c | outb(0x01, PAR_DATA(dev)); /* send ACK */ |
dev | 509 | drivers/net/plip.c | printk("%s: receive start\n", dev->name); |
dev | 522 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 523 | drivers/net/plip.c | enable_irq(dev->irq); |
dev | 537 | drivers/net/plip.c | if (rcv->length.h > dev->mtu + dev->hard_header_len |
dev | 539 | drivers/net/plip.c | printk("%s: bogus packet size %d.\n", dev->name, rcv->length.h); |
dev | 545 | drivers/net/plip.c | printk("%s: Memory squeeze.\n", dev->name); |
dev | 549 | drivers/net/plip.c | rcv->skb->dev = dev; |
dev | 573 | drivers/net/plip.c | printk("%s: checksum error\n", dev->name); |
dev | 580 | drivers/net/plip.c | rcv->skb->protocol=eth_type_trans(rcv->skb, dev); |
dev | 585 | drivers/net/plip.c | printk("%s: receive end\n", dev->name); |
dev | 588 | drivers/net/plip.c | outb (0x00, PAR_DATA(dev)); |
dev | 594 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 595 | drivers/net/plip.c | enable_irq(dev->irq); |
dev | 600 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 601 | drivers/net/plip.c | enable_irq(dev->irq); |
dev | 658 | drivers/net/plip.c | plip_send_packet(struct device *dev, struct net_local *nl, |
dev | 661 | drivers/net/plip.c | unsigned short data_addr = PAR_DATA(dev); |
dev | 668 | drivers/net/plip.c | printk("%s: send skb lost\n", dev->name); |
dev | 676 | drivers/net/plip.c | if ((inb(PAR_STATUS(dev)) & 0xf8) != 0x80) |
dev | 690 | drivers/net/plip.c | printk("%s: collision.\n", dev->name); |
dev | 693 | drivers/net/plip.c | c0 = inb(PAR_STATUS(dev)); |
dev | 695 | drivers/net/plip.c | disable_irq(dev->irq); |
dev | 696 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 698 | drivers/net/plip.c | printk("%s: send start\n", dev->name); |
dev | 751 | drivers/net/plip.c | printk("%s: send end\n", dev->name); |
dev | 755 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 756 | drivers/net/plip.c | enable_irq(dev->irq); |
dev | 763 | drivers/net/plip.c | plip_connection_close(struct device *dev, struct net_local *nl, |
dev | 769 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 778 | drivers/net/plip.c | plip_error(struct device *dev, struct net_local *nl, |
dev | 783 | drivers/net/plip.c | status = inb(PAR_STATUS(dev)); |
dev | 786 | drivers/net/plip.c | printk("%s: reset interface.\n", dev->name); |
dev | 788 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 789 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 790 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 791 | drivers/net/plip.c | enable_irq(dev->irq); |
dev | 805 | drivers/net/plip.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 806 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 810 | drivers/net/plip.c | if (dev == NULL) { |
dev | 815 | drivers/net/plip.c | if (dev->interrupt) |
dev | 818 | drivers/net/plip.c | c0 = inb(PAR_STATUS(dev)); |
dev | 821 | drivers/net/plip.c | printk("%s: spurious interrupt\n", dev->name); |
dev | 824 | drivers/net/plip.c | dev->interrupt = 1; |
dev | 826 | drivers/net/plip.c | printk("%s: interrupt.\n", dev->name); |
dev | 831 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 834 | drivers/net/plip.c | dev->last_rx = jiffies; |
dev | 845 | drivers/net/plip.c | printk("%s: receive interrupt when receiving packet\n", dev->name); |
dev | 850 | drivers/net/plip.c | printk("%s: receive interrupt in error state\n", dev->name); |
dev | 857 | drivers/net/plip.c | plip_rebuild_header(void *buff, struct device *dev, unsigned long dst, |
dev | 860 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 864 | drivers/net/plip.c | if ((dev->flags & IFF_NOARP)==0) |
dev | 865 | drivers/net/plip.c | return nl->orig_rebuild_header(buff, dev, dst, skb); |
dev | 869 | drivers/net/plip.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 880 | drivers/net/plip.c | plip_tx_packet(struct sk_buff *skb, struct device *dev) |
dev | 882 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 885 | drivers/net/plip.c | if (dev->tbusy) |
dev | 892 | drivers/net/plip.c | dev_tint(dev); |
dev | 896 | drivers/net/plip.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 897 | drivers/net/plip.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 901 | drivers/net/plip.c | if (skb->len > dev->mtu + dev->hard_header_len) { |
dev | 902 | drivers/net/plip.c | printk("%s: packet too big, %d.\n", dev->name, (int)skb->len); |
dev | 903 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 908 | drivers/net/plip.c | printk("%s: send request\n", dev->name); |
dev | 911 | drivers/net/plip.c | dev->trans_start = jiffies; |
dev | 933 | drivers/net/plip.c | plip_open(struct device *dev) |
dev | 935 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 938 | drivers/net/plip.c | if (dev->irq == 0) { |
dev | 939 | drivers/net/plip.c | printk("%s: IRQ is not set. Please set it by ifconfig.\n", dev->name); |
dev | 943 | drivers/net/plip.c | if (request_irq(dev->irq , plip_interrupt, 0, dev->name, NULL) != 0) { |
dev | 945 | drivers/net/plip.c | printk("%s: couldn't get IRQ %d.\n", dev->name, dev->irq); |
dev | 948 | drivers/net/plip.c | irq2dev_map[dev->irq] = dev; |
dev | 952 | drivers/net/plip.c | outb (0x00, PAR_DATA(dev)); |
dev | 955 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 965 | drivers/net/plip.c | dev->dev_addr[i] = 0xfc; |
dev | 966 | drivers/net/plip.c | memcpy(&(dev->dev_addr[i]), &dev->pa_addr, sizeof(unsigned long)); |
dev | 968 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 969 | drivers/net/plip.c | dev->start = 1; |
dev | 970 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 977 | drivers/net/plip.c | plip_close(struct device *dev) |
dev | 979 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 983 | drivers/net/plip.c | dev->tbusy = 1; |
dev | 984 | drivers/net/plip.c | dev->start = 0; |
dev | 986 | drivers/net/plip.c | free_irq(dev->irq, NULL); |
dev | 987 | drivers/net/plip.c | irq2dev_map[dev->irq] = NULL; |
dev | 991 | drivers/net/plip.c | outb(0x00, PAR_DATA(dev)); |
dev | 1006 | drivers/net/plip.c | outb(0x00, PAR_CONTROL(dev)); |
dev | 1012 | drivers/net/plip.c | plip_get_stats(struct device *dev) |
dev | 1014 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 1021 | drivers/net/plip.c | plip_config(struct device *dev, struct ifmap *map) |
dev | 1023 | drivers/net/plip.c | if (dev->flags & IFF_UP) |
dev | 1027 | drivers/net/plip.c | && map->base_addr != dev->base_addr) |
dev | 1028 | drivers/net/plip.c | printk("%s: You cannot change base_addr of this interface (ignored).\n", dev->name); |
dev | 1031 | drivers/net/plip.c | dev->irq = map->irq; |
dev | 1036 | drivers/net/plip.c | plip_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 1038 | drivers/net/plip.c | struct net_local *nl = (struct net_local *) dev->priv; |
dev | 179 | drivers/net/ppp.c | static int ppp_dev_ioctl (struct device *dev, struct ifreq *ifr, int cmd); |
dev | 185 | drivers/net/ppp.c | static int ppp_dev_rebuild (void *eth, struct device *dev, |
dev | 216 | drivers/net/ppp.c | #define dev2ppp(dev) ((struct ppp *) (dev->priv)) |
dev | 218 | drivers/net/ppp.c | #define ppp2dev(ppp) ((struct device *) ppp->dev) |
dev | 232 | drivers/net/ppp.c | struct device dev; /* Device information table */ |
dev | 238 | drivers/net/ppp.c | #define ctl2dev(ctl) (struct device *) &ctl->dev |
dev | 387 | drivers/net/ppp.c | ppp_init_dev (struct device *dev) |
dev | 391 | drivers/net/ppp.c | dev->hard_header = ppp_dev_header; |
dev | 392 | drivers/net/ppp.c | dev->rebuild_header = ppp_dev_rebuild; |
dev | 393 | drivers/net/ppp.c | dev->hard_header_len = PPP_HARD_HDR_LEN; |
dev | 396 | drivers/net/ppp.c | dev->mtu = PPP_MTU; |
dev | 397 | drivers/net/ppp.c | dev->hard_start_xmit = ppp_dev_xmit; |
dev | 398 | drivers/net/ppp.c | dev->open = ppp_dev_open; |
dev | 399 | drivers/net/ppp.c | dev->stop = ppp_dev_close; |
dev | 400 | drivers/net/ppp.c | dev->get_stats = ppp_dev_stats; |
dev | 401 | drivers/net/ppp.c | dev->do_ioctl = ppp_dev_ioctl; |
dev | 402 | drivers/net/ppp.c | dev->addr_len = 0; |
dev | 403 | drivers/net/ppp.c | dev->type = ARPHRD_PPP; |
dev | 406 | drivers/net/ppp.c | skb_queue_head_init (&dev->buffs[indx]); |
dev | 409 | drivers/net/ppp.c | dev->flags = IFF_POINTOPOINT; |
dev | 410 | drivers/net/ppp.c | dev->family = AF_INET; |
dev | 411 | drivers/net/ppp.c | dev->pa_addr = 0; |
dev | 412 | drivers/net/ppp.c | dev->pa_brdaddr = 0; |
dev | 413 | drivers/net/ppp.c | dev->pa_mask = 0; |
dev | 414 | drivers/net/ppp.c | dev->pa_alen = 4; /* sizeof (__u32) */ |
dev | 472 | drivers/net/ppp.c | ppp_init (struct device *dev) |
dev | 556 | drivers/net/ppp.c | struct device *dev; |
dev | 572 | drivers/net/ppp.c | dev = ppp2dev (ppp); |
dev | 585 | drivers/net/ppp.c | dev->name, new_mtu, new_mru); |
dev | 623 | drivers/net/ppp.c | dev->mem_start = (__u32) buf_base (new_wbuf); |
dev | 624 | drivers/net/ppp.c | dev->mem_end = (__u32) (dev->mem_start + mtu); |
dev | 625 | drivers/net/ppp.c | dev->rmem_start = (__u32) buf_base (new_rbuf); |
dev | 626 | drivers/net/ppp.c | dev->rmem_end = (__u32) (dev->rmem_start + mru); |
dev | 633 | drivers/net/ppp.c | dev->mtu = |
dev | 684 | drivers/net/ppp.c | struct device *dev; |
dev | 687 | drivers/net/ppp.c | dev = ppp2dev (ppp); |
dev | 698 | drivers/net/ppp.c | if (dev && dev->flags & IFF_UP) { |
dev | 699 | drivers/net/ppp.c | dev_close (dev); /* close the device properly */ |
dev | 700 | drivers/net/ppp.c | dev->flags = 0; /* prevent recursion */ |
dev | 1203 | drivers/net/ppp.c | skb->dev = ppp2dev (ppp); /* We are the device */ |
dev | 2652 | drivers/net/ppp.c | ppp_dev_open (struct device *dev) |
dev | 2654 | drivers/net/ppp.c | struct ppp *ppp = dev2ppp (dev); |
dev | 2657 | drivers/net/ppp.c | dev->flags |= IFF_POINTOPOINT; |
dev | 2663 | drivers/net/ppp.c | dev->name); |
dev | 2670 | drivers/net/ppp.c | dev->name); |
dev | 2681 | drivers/net/ppp.c | ppp_dev_close (struct device *dev) |
dev | 2683 | drivers/net/ppp.c | struct ppp *ppp = dev2ppp (dev); |
dev | 2689 | drivers/net/ppp.c | dev->name); |
dev | 2699 | drivers/net/ppp.c | dev->name); |
dev | 2734 | drivers/net/ppp.c | ppp_dev_ioctl_stats (struct ppp *ppp, struct ifreq *ifr, struct device *dev) |
dev | 2750 | drivers/net/ppp.c | if (error == 0 && dev->flags & IFF_UP) { |
dev | 2775 | drivers/net/ppp.c | ppp_dev_ioctl_comp_stats (struct ppp *ppp, struct ifreq *ifr, struct device *dev) |
dev | 2790 | drivers/net/ppp.c | if (error == 0 && dev->flags & IFF_UP) { |
dev | 2812 | drivers/net/ppp.c | ppp_dev_ioctl (struct device *dev, struct ifreq *ifr, int cmd) |
dev | 2814 | drivers/net/ppp.c | struct ppp *ppp = dev2ppp (dev); |
dev | 2821 | drivers/net/ppp.c | error = ppp_dev_ioctl_stats (ppp, ifr, dev); |
dev | 2825 | drivers/net/ppp.c | error = ppp_dev_ioctl_comp_stats (ppp, ifr, dev); |
dev | 2847 | drivers/net/ppp.c | ppp_dev_xmit_ip (struct device *dev, struct ppp *ppp, __u8 *data) |
dev | 2865 | drivers/net/ppp.c | dev->name); |
dev | 2871 | drivers/net/ppp.c | if (!(dev->flags & IFF_UP)) { |
dev | 2876 | drivers/net/ppp.c | dev->name); |
dev | 2890 | drivers/net/ppp.c | dev->name); |
dev | 2897 | drivers/net/ppp.c | dev->name); |
dev | 2908 | drivers/net/ppp.c | dev->name); |
dev | 2924 | drivers/net/ppp.c | dev->tbusy = 1; |
dev | 2973 | drivers/net/ppp.c | ppp_dev_xmit_ipx (struct device *dev, struct ppp *ppp, |
dev | 2985 | drivers/net/ppp.c | dev->name); |
dev | 2991 | drivers/net/ppp.c | if (!(dev->flags & IFF_UP)) { |
dev | 2996 | drivers/net/ppp.c | dev->name); |
dev | 3012 | drivers/net/ppp.c | dev->tbusy = 1; |
dev | 3039 | drivers/net/ppp.c | ppp_dev_xmit (sk_buff *skb, struct device *dev) |
dev | 3043 | drivers/net/ppp.c | struct ppp *ppp = dev2ppp (dev); |
dev | 3058 | drivers/net/ppp.c | dev_close (dev); |
dev | 3066 | drivers/net/ppp.c | dev->name, skb); |
dev | 3074 | drivers/net/ppp.c | dev->name); |
dev | 3089 | drivers/net/ppp.c | answer = ppp_dev_xmit_ipx (dev, ppp, data, len, PPP_IPX); |
dev | 3093 | drivers/net/ppp.c | answer = ppp_dev_xmit_ip (dev, ppp, data); |
dev | 3115 | drivers/net/ppp.c | ppp_dev_stats (struct device *dev) |
dev | 3117 | drivers/net/ppp.c | struct ppp *ppp = dev2ppp (dev); |
dev | 3143 | drivers/net/ppp.c | static int ppp_dev_header (sk_buff *skb, struct device *dev, |
dev | 3151 | drivers/net/ppp.c | ppp_dev_rebuild (void *eth, struct device *dev, |
dev | 3197 | drivers/net/ppp.c | struct device *dev; |
dev | 3219 | drivers/net/ppp.c | dev = ctl2dev (ctl); |
dev | 3226 | drivers/net/ppp.c | ppp->dev = dev; |
dev | 3228 | drivers/net/ppp.c | dev->next = NULL; |
dev | 3229 | drivers/net/ppp.c | dev->init = ppp_init_dev; |
dev | 3230 | drivers/net/ppp.c | dev->name = ctl->name; |
dev | 3231 | drivers/net/ppp.c | dev->base_addr = (__u32) if_num; |
dev | 3232 | drivers/net/ppp.c | dev->priv = (void *) ppp; |
dev | 3234 | drivers/net/ppp.c | sprintf (dev->name, "ppp%d", if_num); |
dev | 3243 | drivers/net/ppp.c | status = register_netdev (dev); |
dev | 3245 | drivers/net/ppp.c | printk (KERN_INFO "registered device %s\n", dev->name); |
dev | 3251 | drivers/net/ppp.c | dev->name, status); |
dev | 3428 | drivers/net/ppp.c | struct device *dev; |
dev | 3442 | drivers/net/ppp.c | dev = ctl2dev (ctl); |
dev | 3443 | drivers/net/ppp.c | if (dev->start || dev->flags & IFF_UP) { |
dev | 3480 | drivers/net/ppp.c | dev = ctl2dev (ctl); |
dev | 3483 | drivers/net/ppp.c | unregister_netdev (dev); |
dev | 106 | drivers/net/pt.c | static int pt0_preprobe(struct device *dev) {return 0;} /* Dummy probe function */ |
dev | 120 | drivers/net/pt.c | static int pt_probe(struct device *dev); |
dev | 121 | drivers/net/pt.c | static int pt_open(struct device *dev); |
dev | 122 | drivers/net/pt.c | static int pt_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 124 | drivers/net/pt.c | static int pt_close(struct device *dev); |
dev | 125 | drivers/net/pt.c | static int pt_ioctl(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 126 | drivers/net/pt.c | static struct enet_statistics *pt_get_stats(struct device *dev); |
dev | 128 | drivers/net/pt.c | static void pt_rxisr(struct device *dev); |
dev | 137 | drivers/net/pt.c | static void chipset_init(struct device *dev); |
dev | 138 | drivers/net/pt.c | static void send_kiss(struct device *dev, unsigned char arg, unsigned char val); |
dev | 182 | drivers/net/pt.c | struct device *dev; |
dev | 191 | drivers/net/pt.c | dev = &pt0b; |
dev | 193 | drivers/net/pt.c | dev = &pt0a; |
dev | 200 | drivers/net/pt.c | send_kiss(dev, PARAM_TXDELAY, (u_char)(lp->txdelay/10)); |
dev | 204 | drivers/net/pt.c | send_kiss(dev, PARAM_PERSIST, (u_char)(lp->persist)); |
dev | 208 | drivers/net/pt.c | send_kiss(dev, PARAM_SLOTTIME, (u_char)(lp->slotime/10)); |
dev | 214 | drivers/net/pt.c | send_kiss(dev, PARAM_FULLDUP, 0); |
dev | 339 | drivers/net/pt.c | static int pt_header (struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 342 | drivers/net/pt.c | return ax25_encapsulate(skb, dev, type, daddr, saddr, len); |
dev | 347 | drivers/net/pt.c | static int pt_rebuild_header(void *buff, struct device *dev, unsigned long raddr, |
dev | 350 | drivers/net/pt.c | return ax25_rebuild_header(buff, dev, raddr, skb); |
dev | 361 | drivers/net/pt.c | static void scc_init(struct device *dev) |
dev | 364 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
dev | 484 | drivers/net/pt.c | static void chipset_init(struct device *dev) |
dev | 487 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
dev | 741 | drivers/net/pt.c | static int pt_set_mac_address(struct device *dev, struct sockaddr *sa) |
dev | 743 | drivers/net/pt.c | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); /* addr is an AX.25 shifted ASCII */ |
dev | 767 | drivers/net/pt.c | static int pt_probe(struct device *dev) |
dev | 775 | drivers/net/pt.c | ioaddr = dev->base_addr; |
dev | 782 | drivers/net/pt.c | dev->priv = (void *) (((int) dev->priv + 7) & ~7); |
dev | 783 | drivers/net/pt.c | lp = (struct pt_local*) dev->priv; |
dev | 785 | drivers/net/pt.c | memset(dev->priv, 0, sizeof(struct pt_local)); |
dev | 788 | drivers/net/pt.c | mem_ptr = (unsigned long) dev->priv + sizeof(struct pt_local); |
dev | 801 | drivers/net/pt.c | lp->base = dev->base_addr; |
dev | 802 | drivers/net/pt.c | lp->cardbase = dev->base_addr & 0x3f0; |
dev | 808 | drivers/net/pt.c | if (dev->base_addr & CHANA) { |
dev | 828 | drivers/net/pt.c | chipset_init(dev); |
dev | 830 | drivers/net/pt.c | if (dev->base_addr & CHANA) { |
dev | 840 | drivers/net/pt.c | if (dev->irq < 2) { |
dev | 851 | drivers/net/pt.c | dev->irq = autoirq_report(20); |
dev | 859 | drivers/net/pt.c | if (!dev->irq) { |
dev | 864 | drivers/net/pt.c | printk("PT: Autodetected IRQ %d, assuming DMA %d\n", dev->irq, dev->dma); |
dev | 871 | drivers/net/pt.c | int irqval = request_irq(dev->irq, &pt_interrupt,0, "pt", NULL); |
dev | 874 | drivers/net/pt.c | dev->irq, irqval); |
dev | 882 | drivers/net/pt.c | dev->open = pt_open; |
dev | 883 | drivers/net/pt.c | dev->stop = pt_close; |
dev | 884 | drivers/net/pt.c | dev->do_ioctl = pt_ioctl; |
dev | 885 | drivers/net/pt.c | dev->hard_start_xmit = pt_send_packet; |
dev | 886 | drivers/net/pt.c | dev->get_stats = pt_get_stats; |
dev | 890 | drivers/net/pt.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 892 | drivers/net/pt.c | dev->hard_header = pt_header; |
dev | 893 | drivers/net/pt.c | dev->rebuild_header = pt_rebuild_header; |
dev | 894 | drivers/net/pt.c | dev->set_mac_address = pt_set_mac_address; |
dev | 896 | drivers/net/pt.c | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
dev | 897 | drivers/net/pt.c | dev->hard_header_len = 73; /* We do digipeaters now */ |
dev | 898 | drivers/net/pt.c | dev->mtu = 1500; /* eth_mtu is default */ |
dev | 899 | drivers/net/pt.c | dev->addr_len = 7; /* sizeof an ax.25 address */ |
dev | 900 | drivers/net/pt.c | memcpy(dev->broadcast, ax25_bcast, 7); |
dev | 901 | drivers/net/pt.c | memcpy(dev->dev_addr, ax25_test, 7); |
dev | 904 | drivers/net/pt.c | dev->flags = 0; |
dev | 905 | drivers/net/pt.c | dev->family = AF_INET; |
dev | 906 | drivers/net/pt.c | dev->pa_addr = 0; |
dev | 907 | drivers/net/pt.c | dev->pa_brdaddr = 0; |
dev | 908 | drivers/net/pt.c | dev->pa_mask = 0; |
dev | 909 | drivers/net/pt.c | dev->pa_alen = sizeof(unsigned long); |
dev | 923 | drivers/net/pt.c | static int pt_open(struct device *dev) |
dev | 926 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
dev | 929 | drivers/net/pt.c | if (dev->base_addr & CHANA) |
dev | 933 | drivers/net/pt.c | if (request_dma(dev->dma, "pt")) |
dev | 935 | drivers/net/pt.c | free_irq(dev->irq, NULL); |
dev | 939 | drivers/net/pt.c | irq2dev_map[dev->irq] = dev; |
dev | 942 | drivers/net/pt.c | chipset_init(dev); |
dev | 946 | drivers/net/pt.c | if (dev->base_addr & CHANA) |
dev | 948 | drivers/net/pt.c | scc_init(dev); |
dev | 949 | drivers/net/pt.c | scc_init(dev->next); |
dev | 964 | drivers/net/pt.c | dev->tbusy = 0; |
dev | 965 | drivers/net/pt.c | dev->interrupt = 0; |
dev | 966 | drivers/net/pt.c | dev->start = 1; |
dev | 972 | drivers/net/pt.c | static int pt_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 974 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
dev | 983 | drivers/net/pt.c | dev_tint(dev); |
dev | 987 | drivers/net/pt.c | dev->trans_start = jiffies; |
dev | 995 | drivers/net/pt.c | static int pt_close(struct device *dev) |
dev | 998 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
dev | 1008 | drivers/net/pt.c | chipset_init(dev); |
dev | 1012 | drivers/net/pt.c | dev->tbusy = 1; |
dev | 1013 | drivers/net/pt.c | dev->start = 0; |
dev | 1029 | drivers/net/pt.c | static int pt_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 1033 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
dev | 1067 | drivers/net/pt.c | if (dev->base_addr & CHANA) { /* if A channel */ |
dev | 1072 | drivers/net/pt.c | pt_close(dev); |
dev | 1074 | drivers/net/pt.c | dev->dma = lp->dmachan = rq.dmachan; |
dev | 1077 | drivers/net/pt.c | pt_open(dev); |
dev | 1097 | drivers/net/pt.c | rq.irq = dev->irq; |
dev | 1111 | drivers/net/pt.c | pt_get_stats(struct device *dev) |
dev | 1113 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local *) dev->priv; |
dev | 1264 | drivers/net/pt.c | static void pt_rxisr(struct device *dev) |
dev | 1266 | drivers/net/pt.c | struct pt_local *lp = (struct pt_local*) dev->priv; |
dev | 1395 | drivers/net/pt.c | printk("PT: %s: Memory squeze, dropping packet.\n", dev->name); |
dev | 1400 | drivers/net/pt.c | skb->dev = dev; |
dev | 1486 | drivers/net/pt.c | struct device *dev = &pt0a; |
dev | 1487 | drivers/net/pt.c | struct pt_local *lp = dev->priv; |
dev | 1490 | drivers/net/pt.c | register int cbase = dev->base_addr & 0x3f0; |
dev | 1808 | drivers/net/pt.c | static void send_kiss(struct device *dev, unsigned char arg, unsigned char val) |
dev | 1821 | drivers/net/pt.c | skb->dev = dev; |
dev | 159 | drivers/net/pt.h | int dev; /* Device number */ |
dev | 79 | drivers/net/seeq8005.c | extern int seeq8005_probe(struct device *dev); |
dev | 81 | drivers/net/seeq8005.c | static int seeq8005_probe1(struct device *dev, int ioaddr); |
dev | 82 | drivers/net/seeq8005.c | static int seeq8005_open(struct device *dev); |
dev | 83 | drivers/net/seeq8005.c | static int seeq8005_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 85 | drivers/net/seeq8005.c | static void seeq8005_rx(struct device *dev); |
dev | 86 | drivers/net/seeq8005.c | static int seeq8005_close(struct device *dev); |
dev | 87 | drivers/net/seeq8005.c | static struct enet_statistics *seeq8005_get_stats(struct device *dev); |
dev | 88 | drivers/net/seeq8005.c | static void set_multicast_list(struct device *dev); |
dev | 91 | drivers/net/seeq8005.c | #define tx_done(dev) (inw(SEEQ_STATUS) & SEEQSTAT_TX_ON) |
dev | 92 | drivers/net/seeq8005.c | extern void hardware_send_packet(struct device *dev, char *buf, int length); |
dev | 93 | drivers/net/seeq8005.c | extern void seeq8005_init(struct device *dev, int startp); |
dev | 94 | drivers/net/seeq8005.c | inline void wait_for_buffer(struct device *dev); |
dev | 110 | drivers/net/seeq8005.c | seeq8005_probe(struct device *dev) |
dev | 113 | drivers/net/seeq8005.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 116 | drivers/net/seeq8005.c | return seeq8005_probe1(dev, base_addr); |
dev | 124 | drivers/net/seeq8005.c | if (seeq8005_probe1(dev, ioaddr) == 0) |
dev | 136 | drivers/net/seeq8005.c | static int seeq8005_probe1(struct device *dev, int ioaddr) |
dev | 273 | drivers/net/seeq8005.c | if (dev == NULL) |
dev | 274 | drivers/net/seeq8005.c | dev = init_etherdev(0, sizeof(struct net_local)); |
dev | 279 | drivers/net/seeq8005.c | printk("%s: %s found at %#3x, ", dev->name, "seeq8005", ioaddr); |
dev | 282 | drivers/net/seeq8005.c | dev->base_addr = ioaddr; |
dev | 286 | drivers/net/seeq8005.c | printk(" %2.2x", dev->dev_addr[i] = SA_prom[i+6]); |
dev | 288 | drivers/net/seeq8005.c | if (dev->irq == 0xff) |
dev | 290 | drivers/net/seeq8005.c | else if (dev->irq < 2) { /* "Auto-IRQ" */ |
dev | 295 | drivers/net/seeq8005.c | dev->irq = autoirq_report(0); |
dev | 298 | drivers/net/seeq8005.c | printk(" autoirq is %d\n", dev->irq); |
dev | 299 | drivers/net/seeq8005.c | } else if (dev->irq == 2) |
dev | 303 | drivers/net/seeq8005.c | dev->irq = 9; |
dev | 307 | drivers/net/seeq8005.c | int irqval = request_irq(dev->irq, &seeq8005_interrupt, 0, "seeq8005", NULL); |
dev | 309 | drivers/net/seeq8005.c | printk ("%s: unable to get IRQ %d (irqval=%d).\n", dev->name, |
dev | 310 | drivers/net/seeq8005.c | dev->irq, irqval); |
dev | 320 | drivers/net/seeq8005.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 321 | drivers/net/seeq8005.c | if (dev->priv == NULL) |
dev | 323 | drivers/net/seeq8005.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 325 | drivers/net/seeq8005.c | dev->open = seeq8005_open; |
dev | 326 | drivers/net/seeq8005.c | dev->stop = seeq8005_close; |
dev | 327 | drivers/net/seeq8005.c | dev->hard_start_xmit = seeq8005_send_packet; |
dev | 328 | drivers/net/seeq8005.c | dev->get_stats = seeq8005_get_stats; |
dev | 329 | drivers/net/seeq8005.c | dev->set_multicast_list = &set_multicast_list; |
dev | 332 | drivers/net/seeq8005.c | ether_setup(dev); |
dev | 334 | drivers/net/seeq8005.c | dev->flags &= ~IFF_MULTICAST; |
dev | 348 | drivers/net/seeq8005.c | seeq8005_open(struct device *dev) |
dev | 350 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 353 | drivers/net/seeq8005.c | int irqval = request_irq(dev->irq, &seeq8005_interrupt, 0, "seeq8005", NULL); |
dev | 355 | drivers/net/seeq8005.c | printk ("%s: unable to get IRQ %d (irqval=%d).\n", dev->name, |
dev | 356 | drivers/net/seeq8005.c | dev->irq, irqval); |
dev | 360 | drivers/net/seeq8005.c | irq2dev_map[dev->irq] = dev; |
dev | 363 | drivers/net/seeq8005.c | seeq8005_init(dev, 1); |
dev | 367 | drivers/net/seeq8005.c | dev->tbusy = 0; |
dev | 368 | drivers/net/seeq8005.c | dev->interrupt = 0; |
dev | 369 | drivers/net/seeq8005.c | dev->start = 1; |
dev | 374 | drivers/net/seeq8005.c | seeq8005_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 376 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 378 | drivers/net/seeq8005.c | if (dev->tbusy) { |
dev | 381 | drivers/net/seeq8005.c | int tickssofar = jiffies - dev->trans_start; |
dev | 384 | drivers/net/seeq8005.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 385 | drivers/net/seeq8005.c | tx_done(dev) ? "IRQ conflict" : "network cable problem"); |
dev | 387 | drivers/net/seeq8005.c | seeq8005_init(dev, 1); |
dev | 388 | drivers/net/seeq8005.c | dev->tbusy=0; |
dev | 389 | drivers/net/seeq8005.c | dev->trans_start = jiffies; |
dev | 396 | drivers/net/seeq8005.c | dev_tint(dev); |
dev | 402 | drivers/net/seeq8005.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 403 | drivers/net/seeq8005.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 408 | drivers/net/seeq8005.c | hardware_send_packet(dev, buf, length); |
dev | 409 | drivers/net/seeq8005.c | dev->trans_start = jiffies; |
dev | 423 | drivers/net/seeq8005.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 427 | drivers/net/seeq8005.c | if (dev == NULL) { |
dev | 432 | drivers/net/seeq8005.c | if (dev->interrupt) |
dev | 433 | drivers/net/seeq8005.c | printk ("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 434 | drivers/net/seeq8005.c | dev->interrupt = 1; |
dev | 436 | drivers/net/seeq8005.c | ioaddr = dev->base_addr; |
dev | 437 | drivers/net/seeq8005.c | lp = (struct net_local *)dev->priv; |
dev | 442 | drivers/net/seeq8005.c | printk("%s: int, status=0x%04x\n",dev->name,status); |
dev | 448 | drivers/net/seeq8005.c | printk("%s: window int!\n",dev->name); |
dev | 454 | drivers/net/seeq8005.c | dev->tbusy = 0; |
dev | 459 | drivers/net/seeq8005.c | seeq8005_rx(dev); |
dev | 465 | drivers/net/seeq8005.c | printk("%s: eoi\n",dev->name); |
dev | 467 | drivers/net/seeq8005.c | dev->interrupt = 0; |
dev | 473 | drivers/net/seeq8005.c | seeq8005_rx(struct device *dev) |
dev | 475 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 478 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 489 | drivers/net/seeq8005.c | wait_for_buffer(dev); |
dev | 494 | drivers/net/seeq8005.c | printk("%s: 0x%04x recv next=0x%04x, hdr=0x%04x\n",dev->name,lp->receive_ptr,next_packet,pkt_hdr); |
dev | 511 | drivers/net/seeq8005.c | printk("%s: recv packet ring corrupt, resetting board\n",dev->name); |
dev | 512 | drivers/net/seeq8005.c | seeq8005_init(dev,1); |
dev | 519 | drivers/net/seeq8005.c | printk("%s: recv len=0x%04x\n",dev->name,pkt_len); |
dev | 538 | drivers/net/seeq8005.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 542 | drivers/net/seeq8005.c | skb->dev = dev; |
dev | 550 | drivers/net/seeq8005.c | printk("%s: recv ",dev->name); |
dev | 557 | drivers/net/seeq8005.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 571 | drivers/net/seeq8005.c | seeq8005_close(struct device *dev) |
dev | 573 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 574 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 578 | drivers/net/seeq8005.c | dev->tbusy = 1; |
dev | 579 | drivers/net/seeq8005.c | dev->start = 0; |
dev | 584 | drivers/net/seeq8005.c | free_irq(dev->irq, NULL); |
dev | 586 | drivers/net/seeq8005.c | irq2dev_map[dev->irq] = 0; |
dev | 597 | drivers/net/seeq8005.c | seeq8005_get_stats(struct device *dev) |
dev | 599 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 611 | drivers/net/seeq8005.c | set_multicast_list(struct device *dev) |
dev | 618 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 626 | drivers/net/seeq8005.c | dev->flags|=IFF_PROMISC; |
dev | 633 | drivers/net/seeq8005.c | void seeq8005_init(struct device *dev, int startp) |
dev | 635 | drivers/net/seeq8005.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 636 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 651 | drivers/net/seeq8005.c | outb(dev->dev_addr[i], SEEQ_BUFFER); |
dev | 664 | drivers/net/seeq8005.c | printk("%s: SA0 = ",dev->name); |
dev | 683 | drivers/net/seeq8005.c | printk("%s: stat = 0x%04x\n",dev->name,inw(SEEQ_STATUS)); |
dev | 684 | drivers/net/seeq8005.c | printk("%s: cfg1 = 0x%04x\n",dev->name,old_cfg1); |
dev | 685 | drivers/net/seeq8005.c | printk("%s: cfg2 = 0x%04x\n",dev->name,inw(SEEQ_CFG2)); |
dev | 686 | drivers/net/seeq8005.c | printk("%s: raer = 0x%04x\n",dev->name,inw(SEEQ_REA)); |
dev | 687 | drivers/net/seeq8005.c | printk("%s: dmaar= 0x%04x\n",dev->name,inw(SEEQ_DMAAR)); |
dev | 693 | drivers/net/seeq8005.c | void hardware_send_packet(struct device * dev, char *buf, int length) |
dev | 695 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 701 | drivers/net/seeq8005.c | printk("%s: send 0x%04x\n",dev->name,length); |
dev | 738 | drivers/net/seeq8005.c | inline void wait_for_buffer(struct device * dev) |
dev | 740 | drivers/net/seeq8005.c | int ioaddr = dev->base_addr; |
dev | 484 | drivers/net/sk_g16.c | int SK_init(struct device *dev); |
dev | 485 | drivers/net/sk_g16.c | static int SK_probe(struct device *dev, short ioaddr); |
dev | 487 | drivers/net/sk_g16.c | static int SK_open(struct device *dev); |
dev | 488 | drivers/net/sk_g16.c | static int SK_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 490 | drivers/net/sk_g16.c | static void SK_rxintr(struct device *dev); |
dev | 491 | drivers/net/sk_g16.c | static void SK_txintr(struct device *dev); |
dev | 492 | drivers/net/sk_g16.c | static int SK_close(struct device *dev); |
dev | 494 | drivers/net/sk_g16.c | static struct enet_statistics *SK_get_stats(struct device *dev); |
dev | 498 | drivers/net/sk_g16.c | static void set_multicast_list(struct device *dev); |
dev | 505 | drivers/net/sk_g16.c | static int SK_lance_init(struct device *dev, unsigned short mode); |
dev | 517 | drivers/net/sk_g16.c | void SK_print_pos(struct device *dev, char *text); |
dev | 518 | drivers/net/sk_g16.c | void SK_print_dev(struct device *dev, char *text); |
dev | 519 | drivers/net/sk_g16.c | void SK_print_ram(struct device *dev); |
dev | 549 | drivers/net/sk_g16.c | int SK_init(struct device *dev) |
dev | 555 | drivers/net/sk_g16.c | int base_addr = dev->base_addr; |
dev | 567 | drivers/net/sk_g16.c | return SK_probe(dev, base_addr); |
dev | 598 | drivers/net/sk_g16.c | dev->base_addr = ioaddr; /* Set I/O Port Address */ |
dev | 600 | drivers/net/sk_g16.c | if (SK_probe(dev, ioaddr) == 0) |
dev | 606 | drivers/net/sk_g16.c | dev->base_addr = base_addr; /* Write back original base_addr */ |
dev | 633 | drivers/net/sk_g16.c | int SK_probe(struct device *dev, short ioaddr) |
dev | 663 | drivers/net/sk_g16.c | dev->name, SK_ADDR); |
dev | 693 | drivers/net/sk_g16.c | dev->name, SK_ADDR); |
dev | 711 | drivers/net/sk_g16.c | dev->name, SK_ADDR); |
dev | 737 | drivers/net/sk_g16.c | dev->name, SK_ADDR); |
dev | 749 | drivers/net/sk_g16.c | SK_print_pos(dev, "POS registers after ROM, RAM config"); |
dev | 757 | drivers/net/sk_g16.c | dev->dev_addr[i] = board->rom[j]; |
dev | 761 | drivers/net/sk_g16.c | if (!(dev->dev_addr[0] == SK_MAC0 && |
dev | 762 | drivers/net/sk_g16.c | dev->dev_addr[1] == SK_MAC1 && |
dev | 763 | drivers/net/sk_g16.c | dev->dev_addr[2] == SK_MAC2) ) |
dev | 771 | drivers/net/sk_g16.c | dev->name, |
dev | 773 | drivers/net/sk_g16.c | (unsigned int) dev->base_addr, |
dev | 774 | drivers/net/sk_g16.c | dev->dev_addr[0], |
dev | 775 | drivers/net/sk_g16.c | dev->dev_addr[1], |
dev | 776 | drivers/net/sk_g16.c | dev->dev_addr[2], |
dev | 777 | drivers/net/sk_g16.c | dev->dev_addr[3], |
dev | 778 | drivers/net/sk_g16.c | dev->dev_addr[4], |
dev | 779 | drivers/net/sk_g16.c | dev->dev_addr[5]); |
dev | 787 | drivers/net/sk_g16.c | p = dev->priv = (void *) kmalloc(sizeof(struct priv), GFP_KERNEL); |
dev | 790 | drivers/net/sk_g16.c | memset((char *) dev->priv, 0, sizeof(struct priv)); /* clear memory */ |
dev | 794 | drivers/net/sk_g16.c | dev->open = &SK_open; |
dev | 795 | drivers/net/sk_g16.c | dev->stop = &SK_close; |
dev | 796 | drivers/net/sk_g16.c | dev->hard_start_xmit = &SK_send_packet; |
dev | 797 | drivers/net/sk_g16.c | dev->get_stats = &SK_get_stats; |
dev | 798 | drivers/net/sk_g16.c | dev->set_multicast_list = &set_multicast_list; |
dev | 803 | drivers/net/sk_g16.c | ether_setup(dev); |
dev | 805 | drivers/net/sk_g16.c | dev->flags &= ~IFF_MULTICAST; |
dev | 826 | drivers/net/sk_g16.c | SK_print_pos(dev, "End of SK_probe"); |
dev | 827 | drivers/net/sk_g16.c | SK_print_ram(dev); |
dev | 860 | drivers/net/sk_g16.c | static int SK_open(struct device *dev) |
dev | 864 | drivers/net/sk_g16.c | int ioaddr = dev->base_addr; |
dev | 868 | drivers/net/sk_g16.c | struct priv *p = (struct priv *)dev->priv; |
dev | 873 | drivers/net/sk_g16.c | if (dev->irq == 0) /* Autoirq */ |
dev | 894 | drivers/net/sk_g16.c | printk("%s: unable to get an IRQ\n", dev->name); |
dev | 898 | drivers/net/sk_g16.c | dev->irq = irqtab[--i]; |
dev | 903 | drivers/net/sk_g16.c | else if (dev->irq == 2) /* IRQ2 is always IRQ9 */ |
dev | 907 | drivers/net/sk_g16.c | printk("%s: unable to get IRQ 9\n", dev->name); |
dev | 910 | drivers/net/sk_g16.c | dev->irq = 9; |
dev | 926 | drivers/net/sk_g16.c | if (request_irq(dev->irq, &SK_interrupt, 0, "sk_g16", NULL)) |
dev | 928 | drivers/net/sk_g16.c | printk("%s: unable to get selected IRQ\n", dev->name); |
dev | 932 | drivers/net/sk_g16.c | switch(dev->irq) |
dev | 944 | drivers/net/sk_g16.c | dev->name, |
dev | 945 | drivers/net/sk_g16.c | dev->irq, |
dev | 953 | drivers/net/sk_g16.c | irq2dev_map[dev->irq] = dev; /* Set IRQ as used by us */ |
dev | 956 | drivers/net/sk_g16.c | dev->name, (unsigned int)dev->base_addr, |
dev | 957 | drivers/net/sk_g16.c | (int) dev->irq, (unsigned int) p->ram); |
dev | 959 | drivers/net/sk_g16.c | if (!(i = SK_lance_init(dev, 0))) /* LANCE init OK? */ |
dev | 963 | drivers/net/sk_g16.c | dev->tbusy = 0; |
dev | 964 | drivers/net/sk_g16.c | dev->interrupt = 0; |
dev | 965 | drivers/net/sk_g16.c | dev->start = 1; |
dev | 980 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_DTX | MODE_DRX); |
dev | 986 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_NORMAL); |
dev | 989 | drivers/net/sk_g16.c | SK_print_pos(dev, "POS regs before returning OK"); |
dev | 1001 | drivers/net/sk_g16.c | dev->start = 0; /* Device not ready */ |
dev | 1025 | drivers/net/sk_g16.c | static int SK_lance_init(struct device *dev, unsigned short mode) |
dev | 1028 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1083 | drivers/net/sk_g16.c | (p->ram)->ib.paddr[i] = dev->dev_addr[i]; |
dev | 1146 | drivers/net/sk_g16.c | dev->name, (int) SK_read_reg(CSR0), |
dev | 1150 | drivers/net/sk_g16.c | SK_print_pos(dev, "LANCE INIT failed"); |
dev | 1151 | drivers/net/sk_g16.c | SK_print_dev(dev,"Device Structure:"); |
dev | 1191 | drivers/net/sk_g16.c | static int SK_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1193 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1196 | drivers/net/sk_g16.c | if (dev->tbusy) |
dev | 1200 | drivers/net/sk_g16.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1206 | drivers/net/sk_g16.c | printk("%s: xmitter timed out, try to restart!\n", dev->name); |
dev | 1208 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_NORMAL); /* Reinit LANCE */ |
dev | 1210 | drivers/net/sk_g16.c | dev->tbusy = 0; /* Clear Transmitter flag */ |
dev | 1212 | drivers/net/sk_g16.c | dev->trans_start = jiffies; /* Mark Start of transmission */ |
dev | 1227 | drivers/net/sk_g16.c | dev_tint(dev); |
dev | 1241 | drivers/net/sk_g16.c | if (set_bit(0, (void *) &dev->tbusy) != 0) /* dev->tbusy already set ? */ |
dev | 1243 | drivers/net/sk_g16.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1272 | drivers/net/sk_g16.c | dev->trans_start = jiffies; /* Mark start of transmission */ |
dev | 1285 | drivers/net/sk_g16.c | dev->tbusy = 0; |
dev | 1313 | drivers/net/sk_g16.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 1314 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1320 | drivers/net/sk_g16.c | if (dev == NULL) |
dev | 1326 | drivers/net/sk_g16.c | if (dev->interrupt) |
dev | 1328 | drivers/net/sk_g16.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 1333 | drivers/net/sk_g16.c | dev->interrupt = 1; /* We are handling an interrupt */ |
dev | 1344 | drivers/net/sk_g16.c | printk("%s: error: %04x\n", dev->name, csr0); |
dev | 1354 | drivers/net/sk_g16.c | SK_rxintr(dev); |
dev | 1359 | drivers/net/sk_g16.c | SK_txintr(dev); |
dev | 1364 | drivers/net/sk_g16.c | dev->interrupt = 0; /* We are out */ |
dev | 1385 | drivers/net/sk_g16.c | static void SK_txintr(struct device *dev) |
dev | 1389 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1409 | drivers/net/sk_g16.c | printk("%s: TX error: %04x %04x\n", dev->name, (int) tmdstat, |
dev | 1414 | drivers/net/sk_g16.c | printk("%s: tdr-problems \n", dev->name); |
dev | 1432 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_NORMAL); |
dev | 1466 | drivers/net/sk_g16.c | dev->tbusy = 0; |
dev | 1504 | drivers/net/sk_g16.c | static void SK_rxintr(struct device *dev) |
dev | 1509 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1539 | drivers/net/sk_g16.c | printk("%s: packet too long\n", dev->name); |
dev | 1555 | drivers/net/sk_g16.c | printk("%s: RX error: %04x\n", dev->name, (int) rmdstat); |
dev | 1583 | drivers/net/sk_g16.c | dev->name); |
dev | 1591 | drivers/net/sk_g16.c | skb->dev = dev; |
dev | 1612 | drivers/net/sk_g16.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1653 | drivers/net/sk_g16.c | static int SK_close(struct device *dev) |
dev | 1659 | drivers/net/sk_g16.c | dev->tbusy = 1; /* Transmitter busy */ |
dev | 1660 | drivers/net/sk_g16.c | dev->start = 0; /* Card down */ |
dev | 1662 | drivers/net/sk_g16.c | printk("%s: Shutting %s down CSR0 %#06x\n", dev->name, SK_NAME, |
dev | 1667 | drivers/net/sk_g16.c | free_irq(dev->irq, NULL); /* Free IRQ */ |
dev | 1668 | drivers/net/sk_g16.c | irq2dev_map[dev->irq] = 0; /* Mark IRQ as unused */ |
dev | 1691 | drivers/net/sk_g16.c | static struct enet_statistics *SK_get_stats(struct device *dev) |
dev | 1694 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1732 | drivers/net/sk_g16.c | static void set_multicast_list(struct device *dev) |
dev | 1735 | drivers/net/sk_g16.c | if (dev->flags&IFF_PROMISC) |
dev | 1738 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_PROM); |
dev | 1740 | drivers/net/sk_g16.c | else if (dev->mc_count==0 && !(dev->flags&IFF_ALLMULTI)) |
dev | 1743 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_NORMAL); |
dev | 1749 | drivers/net/sk_g16.c | SK_lance_init(dev, MODE_NORMAL); |
dev | 1995 | drivers/net/sk_g16.c | void SK_print_pos(struct device *dev, char *text) |
dev | 1997 | drivers/net/sk_g16.c | int ioaddr = dev->base_addr; |
dev | 2030 | drivers/net/sk_g16.c | void SK_print_dev(struct device *dev, char *text) |
dev | 2032 | drivers/net/sk_g16.c | if (dev == NULL) |
dev | 2041 | drivers/net/sk_g16.c | dev->name, dev->base_addr, dev->irq); |
dev | 2044 | drivers/net/sk_g16.c | dev->start, dev->tbusy, dev->interrupt); |
dev | 2047 | drivers/net/sk_g16.c | (int) dev->next, (int) dev->init); |
dev | 2073 | drivers/net/sk_g16.c | void SK_print_ram(struct device *dev) |
dev | 2077 | drivers/net/sk_g16.c | struct priv *p = (struct priv *) dev->priv; |
dev | 98 | drivers/net/skeleton.c | extern int netcard_probe(struct device *dev); |
dev | 100 | drivers/net/skeleton.c | static int netcard_probe1(struct device *dev, int ioaddr); |
dev | 101 | drivers/net/skeleton.c | static int net_open(struct device *dev); |
dev | 102 | drivers/net/skeleton.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 104 | drivers/net/skeleton.c | static void net_rx(struct device *dev); |
dev | 105 | drivers/net/skeleton.c | static int net_close(struct device *dev); |
dev | 106 | drivers/net/skeleton.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 107 | drivers/net/skeleton.c | static void set_multicast_list(struct device *dev); |
dev | 110 | drivers/net/skeleton.c | #define tx_done(dev) 1 |
dev | 112 | drivers/net/skeleton.c | extern void chipset_init(struct device *dev, int startp); |
dev | 130 | drivers/net/skeleton.c | netcard_probe(struct device *dev) |
dev | 133 | drivers/net/skeleton.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 136 | drivers/net/skeleton.c | return netcard_probe1(dev, base_addr); |
dev | 144 | drivers/net/skeleton.c | if (netcard_probe1(dev, ioaddr) == 0) |
dev | 157 | drivers/net/skeleton.c | static int netcard_probe1(struct device *dev, int ioaddr) |
dev | 174 | drivers/net/skeleton.c | if (dev == NULL) { |
dev | 180 | drivers/net/skeleton.c | dev = init_etherdev(0, 0); |
dev | 181 | drivers/net/skeleton.c | if (dev == NULL) |
dev | 188 | drivers/net/skeleton.c | printk(KERN_INFO "%s: %s found at %#3x, ", dev->name, cardname, ioaddr); |
dev | 191 | drivers/net/skeleton.c | dev->base_addr = ioaddr; |
dev | 195 | drivers/net/skeleton.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 206 | drivers/net/skeleton.c | if (dev->irq == -1) |
dev | 208 | drivers/net/skeleton.c | else if (dev->irq < 2) { /* "Auto-IRQ" */ |
dev | 212 | drivers/net/skeleton.c | dev->irq = autoirq_report(0); |
dev | 214 | drivers/net/skeleton.c | printk(" autoirq is %d", dev->irq); |
dev | 215 | drivers/net/skeleton.c | } else if (dev->irq == 2) |
dev | 220 | drivers/net/skeleton.c | dev->irq = 9; |
dev | 223 | drivers/net/skeleton.c | int irqval = request_irq(dev->irq, &net_interrupt, 0, cardname, NULL); |
dev | 226 | drivers/net/skeleton.c | dev->name, dev->irq, irqval); |
dev | 236 | drivers/net/skeleton.c | if (dev->dma == 0) { |
dev | 237 | drivers/net/skeleton.c | if (request_dma(dev->dma, cardname)) { |
dev | 238 | drivers/net/skeleton.c | printk("DMA %d allocation failed.\n", dev->dma); |
dev | 241 | drivers/net/skeleton.c | printk(", assigned DMA %d.\n", dev->dma); |
dev | 261 | drivers/net/skeleton.c | dev->dma = i; |
dev | 268 | drivers/net/skeleton.c | if (request_dma(dev->dma, cardname)) { |
dev | 269 | drivers/net/skeleton.c | printk("probed DMA %d allocation failed.\n", dev->dma); |
dev | 276 | drivers/net/skeleton.c | if (dev->priv == NULL) { |
dev | 277 | drivers/net/skeleton.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 278 | drivers/net/skeleton.c | if (dev->priv == NULL) |
dev | 282 | drivers/net/skeleton.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 287 | drivers/net/skeleton.c | dev->open = net_open; |
dev | 288 | drivers/net/skeleton.c | dev->stop = net_close; |
dev | 289 | drivers/net/skeleton.c | dev->hard_start_xmit = net_send_packet; |
dev | 290 | drivers/net/skeleton.c | dev->get_stats = net_get_stats; |
dev | 291 | drivers/net/skeleton.c | dev->set_multicast_list = &set_multicast_list; |
dev | 294 | drivers/net/skeleton.c | ether_setup(dev); |
dev | 308 | drivers/net/skeleton.c | net_open(struct device *dev) |
dev | 310 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 311 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 316 | drivers/net/skeleton.c | if (request_irq(dev->irq, &net_interrupt, 0, cardname, NULL)) { |
dev | 323 | drivers/net/skeleton.c | if (request_dma(dev->dma, cardname)) { |
dev | 324 | drivers/net/skeleton.c | free_irq(dev->irq, NULL); |
dev | 327 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = dev; |
dev | 334 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 335 | drivers/net/skeleton.c | dev->interrupt = 0; |
dev | 336 | drivers/net/skeleton.c | dev->start = 1; |
dev | 344 | drivers/net/skeleton.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 346 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 347 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 349 | drivers/net/skeleton.c | if (dev->tbusy) { |
dev | 354 | drivers/net/skeleton.c | int tickssofar = jiffies - dev->trans_start; |
dev | 357 | drivers/net/skeleton.c | printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name, |
dev | 358 | drivers/net/skeleton.c | tx_done(dev) ? "IRQ conflict" : "network cable problem"); |
dev | 360 | drivers/net/skeleton.c | chipset_init(dev, 1); |
dev | 361 | drivers/net/skeleton.c | dev->tbusy=0; |
dev | 362 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 370 | drivers/net/skeleton.c | dev_tint(dev); |
dev | 377 | drivers/net/skeleton.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 378 | drivers/net/skeleton.c | printk(KERN_WARNING "%s: Transmitter access conflict.\n", dev->name); |
dev | 384 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 402 | drivers/net/skeleton.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 406 | drivers/net/skeleton.c | if (dev == NULL) { |
dev | 410 | drivers/net/skeleton.c | dev->interrupt = 1; |
dev | 412 | drivers/net/skeleton.c | ioaddr = dev->base_addr; |
dev | 413 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
dev | 419 | drivers/net/skeleton.c | net_rx(dev); |
dev | 423 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 432 | drivers/net/skeleton.c | dev->interrupt = 0; |
dev | 438 | drivers/net/skeleton.c | net_rx(struct device *dev) |
dev | 440 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 441 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 464 | drivers/net/skeleton.c | dev->name); |
dev | 468 | drivers/net/skeleton.c | skb->dev = dev; |
dev | 471 | drivers/net/skeleton.c | memcpy(skb_put(skb,pkt_len), (void*)dev->rmem_start, |
dev | 491 | drivers/net/skeleton.c | net_close(struct device *dev) |
dev | 493 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 494 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 498 | drivers/net/skeleton.c | dev->tbusy = 1; |
dev | 499 | drivers/net/skeleton.c | dev->start = 0; |
dev | 503 | drivers/net/skeleton.c | disable_dma(dev->dma); |
dev | 508 | drivers/net/skeleton.c | free_irq(dev->irq, NULL); |
dev | 509 | drivers/net/skeleton.c | free_dma(dev->dma); |
dev | 511 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = 0; |
dev | 526 | drivers/net/skeleton.c | net_get_stats(struct device *dev) |
dev | 528 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 529 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 547 | drivers/net/skeleton.c | set_multicast_list(struct device *dev) |
dev | 549 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 550 | drivers/net/skeleton.c | if (dev->flags&IFF_PROMISC) |
dev | 555 | drivers/net/skeleton.c | else if((dev->flags&IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) |
dev | 562 | drivers/net/skeleton.c | else if(dev->mc_count) |
dev | 565 | drivers/net/skeleton.c | hardware_set_filter(dev->mc_list); |
dev | 97 | drivers/net/slip.c | struct device dev; /* the device */ |
dev | 149 | drivers/net/slip.c | slp->dev.name = slp->if_name; |
dev | 150 | drivers/net/slip.c | slp->dev.base_addr = i; |
dev | 151 | drivers/net/slip.c | slp->dev.priv = (void*)&(slp->ctrl); |
dev | 152 | drivers/net/slip.c | slp->dev.next = NULL; |
dev | 153 | drivers/net/slip.c | slp->dev.init = slip_init; |
dev | 163 | drivers/net/slip.c | if (register_netdev(&(slp->dev)) == 0) { |
dev | 166 | drivers/net/slip.c | slp->ctrl.dev = &(slp->dev); |
dev | 167 | drivers/net/slip.c | slp->dev.priv = (void*)&(slp->ctrl); |
dev | 215 | drivers/net/slip.c | printk("%s: sl_free for already free unit.\n", sl->dev->name); |
dev | 225 | drivers/net/slip.c | struct device *dev = sl->dev; |
dev | 233 | drivers/net/slip.c | len = dev->mtu * 2; |
dev | 255 | drivers/net/slip.c | sl->dev->name); |
dev | 256 | drivers/net/slip.c | dev->mtu = sl->mtu; |
dev | 301 | drivers/net/slip.c | sl->mtu = dev->mtu + 73; |
dev | 303 | drivers/net/slip.c | sl->mtu = dev->mtu; |
dev | 327 | drivers/net/slip.c | if (set_bit(0, (void *) &sl->dev->tbusy)) { |
dev | 328 | drivers/net/slip.c | printk("%s: trying to lock already locked device!\n", sl->dev->name); |
dev | 337 | drivers/net/slip.c | if (!clear_bit(0, (void *)&sl->dev->tbusy)) { |
dev | 338 | drivers/net/slip.c | printk("%s: trying to unlock already unlocked device!\n", sl->dev->name); |
dev | 356 | drivers/net/slip.c | printk("%s: compressed packet ignored\n", sl->dev->name); |
dev | 373 | drivers/net/slip.c | printk("%s: header compression turned on\n", sl->dev->name); |
dev | 385 | drivers/net/slip.c | printk("%s: memory squeeze, dropping packet.\n", sl->dev->name); |
dev | 389 | drivers/net/slip.c | skb->dev = sl->dev; |
dev | 409 | drivers/net/slip.c | if (sl->mtu != sl->dev->mtu + 73) { /* Someone has been ifconfigging */ |
dev | 411 | drivers/net/slip.c | if (sl->mtu != sl->dev->mtu) { /* Someone has been ifconfigging */ |
dev | 418 | drivers/net/slip.c | printk ("%s: truncating oversized transmit packet!\n", sl->dev->name); |
dev | 448 | drivers/net/slip.c | sl->dev->trans_start = jiffies; |
dev | 466 | drivers/net/slip.c | if (!sl || sl->magic != SLIP_MAGIC || !sl->dev->start) { |
dev | 486 | drivers/net/slip.c | sl_xmit(struct sk_buff *skb, struct device *dev) |
dev | 488 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 490 | drivers/net/slip.c | if (!dev->start) { |
dev | 491 | drivers/net/slip.c | printk("%s: xmit call when iface is down\n", dev->name); |
dev | 504 | drivers/net/slip.c | if (dev->tbusy) { |
dev | 509 | drivers/net/slip.c | if (jiffies - dev->trans_start < 20 * HZ) { |
dev | 513 | drivers/net/slip.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 538 | drivers/net/slip.c | sl_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 543 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 546 | drivers/net/slip.c | return ax25_encapsulate(skb, dev, type, daddr, saddr, len); |
dev | 556 | drivers/net/slip.c | sl_rebuild_header(void *buff, struct device *dev, unsigned long raddr, |
dev | 561 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 564 | drivers/net/slip.c | return ax25_rebuild_header(buff, dev, raddr, skb); |
dev | 574 | drivers/net/slip.c | sl_open(struct device *dev) |
dev | 576 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 590 | drivers/net/slip.c | len = dev->mtu * 2; |
dev | 619 | drivers/net/slip.c | sl->mtu = dev->mtu + 73; |
dev | 621 | drivers/net/slip.c | sl->mtu = dev->mtu; |
dev | 642 | drivers/net/slip.c | if (dev->pa_addr == 0) { |
dev | 643 | drivers/net/slip.c | dev->pa_addr=ntohl(0xC0A80001); |
dev | 645 | drivers/net/slip.c | dev->tbusy = 0; |
dev | 647 | drivers/net/slip.c | dev->start = 1; |
dev | 667 | drivers/net/slip.c | sl_close(struct device *dev) |
dev | 669 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 675 | drivers/net/slip.c | dev->tbusy = 1; |
dev | 676 | drivers/net/slip.c | dev->start = 0; |
dev | 700 | drivers/net/slip.c | if (!sl || sl->magic != SLIP_MAGIC || !sl->dev->start) |
dev | 708 | drivers/net/slip.c | if (sl->mtu != sl->dev->mtu + 73) { |
dev | 710 | drivers/net/slip.c | if (sl->mtu != sl->dev->mtu) { |
dev | 767 | drivers/net/slip.c | sl->dev->type = ARPHRD_SLIP + sl->mode; |
dev | 769 | drivers/net/slip.c | if (sl->dev->type == 260) { /* KISS */ |
dev | 770 | drivers/net/slip.c | sl->dev->type = ARPHRD_AX25; |
dev | 774 | drivers/net/slip.c | if ((err = sl_open(sl->dev))) { |
dev | 781 | drivers/net/slip.c | return sl->dev->base_addr; |
dev | 801 | drivers/net/slip.c | (void) dev_close(sl->dev); |
dev | 813 | drivers/net/slip.c | unregister_netdev(sl->dev); |
dev | 819 | drivers/net/slip.c | sl_get_stats(struct device *dev) |
dev | 822 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 1016 | drivers/net/slip.c | sl_set_mac_address(struct device *dev, void *addr) |
dev | 1025 | drivers/net/slip.c | memcpy_fromfs(dev->dev_addr, addr, AX25_ADDR_LEN); /* addr is an AX.25 shifted ASCII mac address */ |
dev | 1031 | drivers/net/slip.c | sl_set_dev_mac_address(struct device *dev, void *addr) |
dev | 1034 | drivers/net/slip.c | memcpy(dev->dev_addr, sa->sa_data, AX25_ADDR_LEN); |
dev | 1055 | drivers/net/slip.c | err = verify_area(VERIFY_WRITE, arg, strlen(sl->dev->name) + 1); |
dev | 1059 | drivers/net/slip.c | memcpy_tofs(arg, sl->dev->name, strlen(sl->dev->name) + 1); |
dev | 1098 | drivers/net/slip.c | sl->dev->addr_len=AX25_ADDR_LEN; /* sizeof an AX.25 addr */ |
dev | 1099 | drivers/net/slip.c | sl->dev->hard_header_len=AX25_KISS_HEADER_LEN + AX25_MAX_HEADER_LEN + 3; |
dev | 1101 | drivers/net/slip.c | sl->dev->addr_len=0; /* No mac addr in slip mode */ |
dev | 1102 | drivers/net/slip.c | sl->dev->hard_header_len=0; |
dev | 1106 | drivers/net/slip.c | sl->dev->type = ARPHRD_SLIP+sl->mode; |
dev | 1108 | drivers/net/slip.c | if (sl->dev->type == 260) { |
dev | 1109 | drivers/net/slip.c | sl->dev->type = ARPHRD_AX25; |
dev | 1116 | drivers/net/slip.c | return sl_set_mac_address(sl->dev, arg); |
dev | 1185 | drivers/net/slip.c | static int sl_open_dev(struct device *dev) |
dev | 1187 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 1262 | drivers/net/slip.c | slip_init(struct device *dev) |
dev | 1264 | drivers/net/slip.c | struct slip *sl = (struct slip*)(dev->priv); |
dev | 1280 | drivers/net/slip.c | sl->dev = dev; |
dev | 1283 | drivers/net/slip.c | dev->mtu = SL_MTU; |
dev | 1284 | drivers/net/slip.c | dev->hard_start_xmit = sl_xmit; |
dev | 1285 | drivers/net/slip.c | dev->open = sl_open_dev; |
dev | 1286 | drivers/net/slip.c | dev->stop = sl_close; |
dev | 1287 | drivers/net/slip.c | dev->hard_header = sl_header; |
dev | 1288 | drivers/net/slip.c | dev->get_stats = sl_get_stats; |
dev | 1291 | drivers/net/slip.c | dev->set_mac_address = sl_set_dev_mac_address; |
dev | 1294 | drivers/net/slip.c | dev->hard_header_len = 0; |
dev | 1295 | drivers/net/slip.c | dev->addr_len = 0; |
dev | 1296 | drivers/net/slip.c | dev->type = ARPHRD_SLIP + SL_MODE_DEFAULT; |
dev | 1297 | drivers/net/slip.c | dev->tx_queue_len = 10; |
dev | 1299 | drivers/net/slip.c | if (sl->dev->type == 260) { |
dev | 1300 | drivers/net/slip.c | sl->dev->type = ARPHRD_AX25; |
dev | 1302 | drivers/net/slip.c | memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); /* Only activated in AX.25 mode */ |
dev | 1303 | drivers/net/slip.c | memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); /* "" "" "" "" */ |
dev | 1305 | drivers/net/slip.c | dev->rebuild_header = sl_rebuild_header; |
dev | 1308 | drivers/net/slip.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 1312 | drivers/net/slip.c | dev->flags = 0; |
dev | 1313 | drivers/net/slip.c | dev->family = AF_INET; |
dev | 1314 | drivers/net/slip.c | dev->pa_addr = 0; |
dev | 1315 | drivers/net/slip.c | dev->pa_brdaddr = 0; |
dev | 1316 | drivers/net/slip.c | dev->pa_mask = 0; |
dev | 1317 | drivers/net/slip.c | dev->pa_alen = 4; |
dev | 1344 | drivers/net/slip.c | if (slip_ctrls[i]->dev.start) |
dev | 1345 | drivers/net/slip.c | unregister_netdev(&(slip_ctrls[i]->dev)); |
dev | 1385 | drivers/net/slip.c | if (!test_bit(0, (void *) &sl->dev->tbusy)) |
dev | 1416 | drivers/net/slip.c | printk("%s: no packets received during keepalive timeout, hangup.\n", sl->dev->name); |
dev | 55 | drivers/net/slip.h | struct device *dev; /* easy for intr handling */ |
dev | 116 | drivers/net/slip.h | extern int slip_init(struct device *dev); |
dev | 65 | drivers/net/smc-ultra.c | int ultra_probe(struct device *dev); |
dev | 66 | drivers/net/smc-ultra.c | int ultra_probe1(struct device *dev, int ioaddr); |
dev | 68 | drivers/net/smc-ultra.c | static int ultra_open(struct device *dev); |
dev | 69 | drivers/net/smc-ultra.c | static void ultra_reset_8390(struct device *dev); |
dev | 70 | drivers/net/smc-ultra.c | static void ultra_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 72 | drivers/net/smc-ultra.c | static void ultra_block_input(struct device *dev, int count, |
dev | 74 | drivers/net/smc-ultra.c | static void ultra_block_output(struct device *dev, int count, |
dev | 76 | drivers/net/smc-ultra.c | static int ultra_close_card(struct device *dev); |
dev | 96 | drivers/net/smc-ultra.c | int ultra_probe(struct device *dev) |
dev | 99 | drivers/net/smc-ultra.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 102 | drivers/net/smc-ultra.c | return ultra_probe1(dev, base_addr); |
dev | 110 | drivers/net/smc-ultra.c | if (ultra_probe1(dev, ioaddr) == 0) |
dev | 118 | drivers/net/smc-ultra.c | int ultra_probe1(struct device *dev, int ioaddr) |
dev | 144 | drivers/net/smc-ultra.c | if (dev == NULL) { |
dev | 146 | drivers/net/smc-ultra.c | dev = init_etherdev(0, 0); |
dev | 154 | drivers/net/smc-ultra.c | printk("%s: %s at %#3x,", dev->name, model_name, ioaddr); |
dev | 157 | drivers/net/smc-ultra.c | printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); |
dev | 172 | drivers/net/smc-ultra.c | if (dev->irq < 2) { |
dev | 183 | drivers/net/smc-ultra.c | dev->irq = irq; |
dev | 188 | drivers/net/smc-ultra.c | if (ethdev_init(dev)) { |
dev | 197 | drivers/net/smc-ultra.c | dev->base_addr = ioaddr+ULTRA_NIC_OFFSET; |
dev | 203 | drivers/net/smc-ultra.c | dev->mem_start = ((addr & 0x0f) << 13) + addr_tbl[(addr >> 6) & 3] ; |
dev | 213 | drivers/net/smc-ultra.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 214 | drivers/net/smc-ultra.c | dev->mem_end = dev->rmem_end |
dev | 215 | drivers/net/smc-ultra.c | = dev->mem_start + (ei_status.stop_page - START_PG)*256; |
dev | 218 | drivers/net/smc-ultra.c | dev->irq, dev->mem_start, dev->mem_end-1); |
dev | 224 | drivers/net/smc-ultra.c | dev->open = &ultra_open; |
dev | 225 | drivers/net/smc-ultra.c | dev->stop = &ultra_close_card; |
dev | 226 | drivers/net/smc-ultra.c | NS8390_init(dev, 0); |
dev | 232 | drivers/net/smc-ultra.c | ultra_open(struct device *dev) |
dev | 234 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */ |
dev | 236 | drivers/net/smc-ultra.c | if (request_irq(dev->irq, ei_interrupt, 0, ei_status.name, NULL)) |
dev | 242 | drivers/net/smc-ultra.c | ei_open(dev); |
dev | 248 | drivers/net/smc-ultra.c | ultra_reset_8390(struct device *dev) |
dev | 250 | drivers/net/smc-ultra.c | int cmd_port = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC base addr */ |
dev | 267 | drivers/net/smc-ultra.c | ultra_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 270 | drivers/net/smc-ultra.c | unsigned long hdr_start = dev->mem_start + ((ring_page - START_PG)<<8); |
dev | 272 | drivers/net/smc-ultra.c | outb(ULTRA_MEMENB, dev->base_addr - ULTRA_NIC_OFFSET); /* shmem on */ |
dev | 279 | drivers/net/smc-ultra.c | outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET); /* shmem off */ |
dev | 286 | drivers/net/smc-ultra.c | ultra_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 288 | drivers/net/smc-ultra.c | unsigned long xfer_start = dev->mem_start + ring_offset - (START_PG<<8); |
dev | 291 | drivers/net/smc-ultra.c | outb(ULTRA_MEMENB, dev->base_addr - ULTRA_NIC_OFFSET); |
dev | 293 | drivers/net/smc-ultra.c | if (xfer_start + count > dev->rmem_end) { |
dev | 295 | drivers/net/smc-ultra.c | int semi_count = dev->rmem_end - xfer_start; |
dev | 298 | drivers/net/smc-ultra.c | memcpy_fromio(skb->data + semi_count, dev->rmem_start, count); |
dev | 304 | drivers/net/smc-ultra.c | outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET); /* Disable memory. */ |
dev | 308 | drivers/net/smc-ultra.c | ultra_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 311 | drivers/net/smc-ultra.c | unsigned long shmem = dev->mem_start + ((start_page - START_PG)<<8); |
dev | 314 | drivers/net/smc-ultra.c | outb(ULTRA_MEMENB, dev->base_addr - ULTRA_NIC_OFFSET); |
dev | 318 | drivers/net/smc-ultra.c | outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET); /* Disable memory. */ |
dev | 322 | drivers/net/smc-ultra.c | ultra_close_card(struct device *dev) |
dev | 324 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* CMDREG */ |
dev | 326 | drivers/net/smc-ultra.c | dev->start = 0; |
dev | 327 | drivers/net/smc-ultra.c | dev->tbusy = 1; |
dev | 330 | drivers/net/smc-ultra.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 333 | drivers/net/smc-ultra.c | free_irq(dev->irq, NULL); |
dev | 334 | drivers/net/smc-ultra.c | irq2dev_map[dev->irq] = 0; |
dev | 336 | drivers/net/smc-ultra.c | NS8390_init(dev, 0); |
dev | 371 | drivers/net/smc-ultra.c | struct device *dev = &dev_ultra[this_dev]; |
dev | 372 | drivers/net/smc-ultra.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 373 | drivers/net/smc-ultra.c | dev->irq = irq[this_dev]; |
dev | 374 | drivers/net/smc-ultra.c | dev->base_addr = io[this_dev]; |
dev | 375 | drivers/net/smc-ultra.c | dev->init = ultra_probe; |
dev | 380 | drivers/net/smc-ultra.c | if (register_netdev(dev) != 0) { |
dev | 397 | drivers/net/smc-ultra.c | struct device *dev = &dev_ultra[this_dev]; |
dev | 398 | drivers/net/smc-ultra.c | if (dev->priv != NULL) { |
dev | 400 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; |
dev | 401 | drivers/net/smc-ultra.c | kfree(dev->priv); |
dev | 402 | drivers/net/smc-ultra.c | dev->priv = NULL; |
dev | 404 | drivers/net/smc-ultra.c | unregister_netdev(dev); |
dev | 211 | drivers/net/smc9194.c | int smc_init(struct device *dev); |
dev | 217 | drivers/net/smc9194.c | static int smc_open(struct device *dev); |
dev | 224 | drivers/net/smc9194.c | static int smc_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 231 | drivers/net/smc9194.c | static int smc_close(struct device *dev); |
dev | 237 | drivers/net/smc9194.c | static struct enet_statistics * smc_query_statistics( struct device *dev); |
dev | 244 | drivers/net/smc9194.c | static void smc_set_multicast_list(struct device *dev, int num_addrs, |
dev | 247 | drivers/net/smc9194.c | static void smc_set_multicast_list(struct device *dev); |
dev | 268 | drivers/net/smc9194.c | inline static void smc_rcv( struct device *dev ); |
dev | 273 | drivers/net/smc9194.c | inline static void smc_tx( struct device * dev ); |
dev | 304 | drivers/net/smc9194.c | #define tx_done(dev) 1 |
dev | 307 | drivers/net/smc9194.c | static void smc_hardware_send_packet( struct device * dev ); |
dev | 313 | drivers/net/smc9194.c | static int smc_wait_to_send_packet( struct sk_buff * skb, struct device *dev ); |
dev | 340 | drivers/net/smc9194.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 547 | drivers/net/smc9194.c | static int smc_wait_to_send_packet( struct sk_buff * skb, struct device * dev ) |
dev | 549 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 550 | drivers/net/smc9194.c | unsigned short ioaddr = dev->base_addr; |
dev | 618 | drivers/net/smc9194.c | smc_hardware_send_packet(dev); |
dev | 641 | drivers/net/smc9194.c | static void smc_hardware_send_packet( struct device * dev ) |
dev | 643 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 650 | drivers/net/smc9194.c | ioaddr = dev->base_addr; |
dev | 666 | drivers/net/smc9194.c | dev->tbusy = 0; |
dev | 729 | drivers/net/smc9194.c | dev->trans_start = jiffies; |
dev | 732 | drivers/net/smc9194.c | dev->tbusy = 0; |
dev | 753 | drivers/net/smc9194.c | int smc_init(struct device *dev) |
dev | 756 | drivers/net/smc9194.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 763 | drivers/net/smc9194.c | return smc_initcard( dev, base_addr ); |
dev | 782 | drivers/net/smc9194.c | return smc_initcard( dev, ioaddr ); |
dev | 945 | drivers/net/smc9194.c | static int smc_initcard(struct device *dev, int ioaddr) |
dev | 964 | drivers/net/smc9194.c | if (dev == NULL) { |
dev | 968 | drivers/net/smc9194.c | dev = init_etherdev( 0, sizeof( struct smc_local ), 0 ); |
dev | 971 | drivers/net/smc9194.c | dev = init_etherdev(0, 0); |
dev | 973 | drivers/net/smc9194.c | if (dev == NULL) |
dev | 981 | drivers/net/smc9194.c | dev->base_addr = ioaddr; |
dev | 991 | drivers/net/smc9194.c | dev->dev_addr[ i + 1] = address >> 8; |
dev | 992 | drivers/net/smc9194.c | dev->dev_addr[ i ] = address & 0xFF; |
dev | 1017 | drivers/net/smc9194.c | if ( dev->if_port == 0 ) { |
dev | 1021 | drivers/net/smc9194.c | dev->if_port = 2; |
dev | 1023 | drivers/net/smc9194.c | dev->if_port = 1; |
dev | 1025 | drivers/net/smc9194.c | if_string = interfaces[ dev->if_port - 1 ]; |
dev | 1047 | drivers/net/smc9194.c | if ( dev->irq < 2 ) { |
dev | 1052 | drivers/net/smc9194.c | dev->irq = smc_findirq( ioaddr ); |
dev | 1053 | drivers/net/smc9194.c | if ( dev->irq ) |
dev | 1059 | drivers/net/smc9194.c | if (dev->irq == 0 ) { |
dev | 1064 | drivers/net/smc9194.c | if (dev->irq == 0 ) { |
dev | 1070 | drivers/net/smc9194.c | if (dev->irq == 2) { |
dev | 1074 | drivers/net/smc9194.c | dev->irq = 9; |
dev | 1080 | drivers/net/smc9194.c | version_string, revision_register & 0xF, ioaddr, dev->irq, |
dev | 1087 | drivers/net/smc9194.c | printk("%2.2x:", dev->dev_addr[i] ); |
dev | 1088 | drivers/net/smc9194.c | printk("%2.2x \n", dev->dev_addr[5] ); |
dev | 1092 | drivers/net/smc9194.c | if (dev->priv == NULL) { |
dev | 1093 | drivers/net/smc9194.c | dev->priv = kmalloc(sizeof(struct smc_local), GFP_KERNEL); |
dev | 1094 | drivers/net/smc9194.c | if (dev->priv == NULL) |
dev | 1098 | drivers/net/smc9194.c | memset(dev->priv, 0, sizeof(struct smc_local)); |
dev | 1101 | drivers/net/smc9194.c | ether_setup(dev); |
dev | 1104 | drivers/net/smc9194.c | irqval = request_irq(dev->irq, &smc_interrupt, 0, CARDNAME, NULL); |
dev | 1107 | drivers/net/smc9194.c | dev->irq, irqval); |
dev | 1110 | drivers/net/smc9194.c | irq2dev_map[dev->irq] = dev; |
dev | 1115 | drivers/net/smc9194.c | dev->open = smc_open; |
dev | 1116 | drivers/net/smc9194.c | dev->stop = smc_close; |
dev | 1117 | drivers/net/smc9194.c | dev->hard_start_xmit = smc_send_packet; |
dev | 1118 | drivers/net/smc9194.c | dev->get_stats = smc_query_statistics; |
dev | 1120 | drivers/net/smc9194.c | dev->set_multicast_list = &smc_set_multicast_list; |
dev | 1169 | drivers/net/smc9194.c | static int smc_open(struct device *dev) |
dev | 1171 | drivers/net/smc9194.c | int ioaddr = dev->base_addr; |
dev | 1176 | drivers/net/smc9194.c | memset(dev->priv, 0, sizeof(struct smc_local)); |
dev | 1178 | drivers/net/smc9194.c | dev->tbusy = 0; |
dev | 1179 | drivers/net/smc9194.c | dev->interrupt = 0; |
dev | 1180 | drivers/net/smc9194.c | dev->start = 1; |
dev | 1193 | drivers/net/smc9194.c | if ( dev->if_port == 1 ) { |
dev | 1197 | drivers/net/smc9194.c | else if ( dev->if_port == 2 ) { |
dev | 1211 | drivers/net/smc9194.c | address = dev->dev_addr[ i + 1 ] << 8 ; |
dev | 1212 | drivers/net/smc9194.c | address |= dev->dev_addr[ i ]; |
dev | 1224 | drivers/net/smc9194.c | static int smc_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1226 | drivers/net/smc9194.c | if (dev->tbusy) { |
dev | 1229 | drivers/net/smc9194.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1233 | drivers/net/smc9194.c | tx_done(dev) ? "IRQ conflict" : |
dev | 1236 | drivers/net/smc9194.c | smc_reset( dev->base_addr ); |
dev | 1237 | drivers/net/smc9194.c | smc_enable( dev->base_addr ); |
dev | 1239 | drivers/net/smc9194.c | dev->tbusy = 0; |
dev | 1240 | drivers/net/smc9194.c | dev->trans_start = jiffies; |
dev | 1242 | drivers/net/smc9194.c | ((struct smc_local *)dev->priv)->saved_skb = NULL; |
dev | 1249 | drivers/net/smc9194.c | dev_tint(dev); |
dev | 1255 | drivers/net/smc9194.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 1261 | drivers/net/smc9194.c | return smc_wait_to_send_packet( skb, dev ); |
dev | 1284 | drivers/net/smc9194.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 1285 | drivers/net/smc9194.c | int ioaddr = dev->base_addr; |
dev | 1286 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 1300 | drivers/net/smc9194.c | if (dev == NULL) { |
dev | 1307 | drivers/net/smc9194.c | if ( dev->interrupt ) { |
dev | 1312 | drivers/net/smc9194.c | dev->interrupt = 1; |
dev | 1341 | drivers/net/smc9194.c | smc_rcv(dev); |
dev | 1345 | drivers/net/smc9194.c | smc_tx(dev); |
dev | 1378 | drivers/net/smc9194.c | smc_hardware_send_packet( dev ); |
dev | 1409 | drivers/net/smc9194.c | dev->interrupt = 0; |
dev | 1426 | drivers/net/smc9194.c | static void smc_rcv(struct device *dev) |
dev | 1428 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 1429 | drivers/net/smc9194.c | int ioaddr = dev->base_addr; |
dev | 1495 | drivers/net/smc9194.c | skb->dev = dev; |
dev | 1529 | drivers/net/smc9194.c | skb->protocol = eth_type_trans(skb, dev ); |
dev | 1565 | drivers/net/smc9194.c | static void smc_tx( struct device * dev ) |
dev | 1567 | drivers/net/smc9194.c | int ioaddr = dev->base_addr; |
dev | 1568 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 1626 | drivers/net/smc9194.c | static int smc_close(struct device *dev) |
dev | 1628 | drivers/net/smc9194.c | dev->tbusy = 1; |
dev | 1629 | drivers/net/smc9194.c | dev->start = 0; |
dev | 1632 | drivers/net/smc9194.c | smc_shutdown( dev->base_addr ); |
dev | 1646 | drivers/net/smc9194.c | static struct enet_statistics * smc_query_statistics(struct device *dev) { |
dev | 1647 | drivers/net/smc9194.c | struct smc_local *lp = (struct smc_local *)dev->priv; |
dev | 1661 | drivers/net/smc9194.c | static void smc_set_multicast_list( struct device * dev, |
dev | 1664 | drivers/net/smc9194.c | static void smc_set_multicast_list(struct device *dev) |
dev | 1667 | drivers/net/smc9194.c | short ioaddr = dev->base_addr; |
dev | 1673 | drivers/net/smc9194.c | if ( dev->flags & IFF_PROMISC ) |
dev | 1689 | drivers/net/smc9194.c | else if (dev->flags & IFF_ALLMULTI) |
dev | 1707 | drivers/net/smc9194.c | else if (dev->mc_count ) { |
dev | 1715 | drivers/net/smc9194.c | smc_setmulticast( ioaddr, dev->mc_count, dev->mc_list ); |
dev | 212 | drivers/net/sunlance.c | lance_init_ring (struct device *dev) |
dev | 214 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 220 | drivers/net/sunlance.c | dev->tbusy = 1; |
dev | 229 | drivers/net/sunlance.c | ib->phys_addr [0] = dev->dev_addr [1]; |
dev | 230 | drivers/net/sunlance.c | ib->phys_addr [1] = dev->dev_addr [0]; |
dev | 231 | drivers/net/sunlance.c | ib->phys_addr [2] = dev->dev_addr [3]; |
dev | 232 | drivers/net/sunlance.c | ib->phys_addr [3] = dev->dev_addr [2]; |
dev | 233 | drivers/net/sunlance.c | ib->phys_addr [4] = dev->dev_addr [5]; |
dev | 234 | drivers/net/sunlance.c | ib->phys_addr [5] = dev->dev_addr [4]; |
dev | 315 | drivers/net/sunlance.c | lance_rx (struct device *dev) |
dev | 317 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 358 | drivers/net/sunlance.c | printk ("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 365 | drivers/net/sunlance.c | skb->dev = dev; |
dev | 369 | drivers/net/sunlance.c | skb->protocol = eth_type_trans (skb,dev); |
dev | 382 | drivers/net/sunlance.c | lance_tx (struct device *dev) |
dev | 384 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 410 | drivers/net/sunlance.c | printk ("%s: Tx: ERR_BUF|ERR_UFL, restarting\n", dev->name); |
dev | 414 | drivers/net/sunlance.c | lance_init_ring (dev); |
dev | 433 | drivers/net/sunlance.c | struct device *dev = (struct device *) (irq2dev_map [irq]); |
dev | 438 | drivers/net/sunlance.c | lp = (struct lance_private *) dev->priv; |
dev | 443 | drivers/net/sunlance.c | printk ("%s: should reset my ledma (dmacsr=%8.8x, csr=%4.4x\n", dev->name, |
dev | 447 | drivers/net/sunlance.c | if (dev->interrupt) |
dev | 448 | drivers/net/sunlance.c | printk ("%s: again", dev->name); |
dev | 450 | drivers/net/sunlance.c | dev->interrupt = 1; |
dev | 463 | drivers/net/sunlance.c | lance_rx (dev); |
dev | 467 | drivers/net/sunlance.c | lance_tx (dev); |
dev | 470 | drivers/net/sunlance.c | if ((TX_BUFFS_AVAIL >= 0) && dev->tbusy){ |
dev | 471 | drivers/net/sunlance.c | dev->tbusy = 0; |
dev | 477 | drivers/net/sunlance.c | dev->interrupt = 0; |
dev | 483 | drivers/net/sunlance.c | lance_open (struct device *dev) |
dev | 485 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 489 | drivers/net/sunlance.c | last_dev = dev; |
dev | 491 | drivers/net/sunlance.c | if (request_irq (dev->irq, &lance_interrupt, 0, lancestr, NULL)){ |
dev | 492 | drivers/net/sunlance.c | printk ("Lance: Can't get irq %d\n", dev->irq); |
dev | 499 | drivers/net/sunlance.c | irq2dev_map [dev->irq] = dev; |
dev | 505 | drivers/net/sunlance.c | lance_init_ring (dev); |
dev | 508 | drivers/net/sunlance.c | dev->tbusy = 0; |
dev | 509 | drivers/net/sunlance.c | dev->interrupt = 0; |
dev | 510 | drivers/net/sunlance.c | dev->start = 1; |
dev | 518 | drivers/net/sunlance.c | dev->pa_addr & ip_get_mask (dev->pa_addr), |
dev | 519 | drivers/net/sunlance.c | ip_get_mask (dev->pa_addr), |
dev | 520 | drivers/net/sunlance.c | 0, dev, dev->mtu, 0, 0); |
dev | 526 | drivers/net/sunlance.c | lance_close (struct device *dev) |
dev | 528 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 531 | drivers/net/sunlance.c | dev->start = 0; |
dev | 532 | drivers/net/sunlance.c | dev->tbusy = 1; |
dev | 538 | drivers/net/sunlance.c | free_irq (dev->irq, NULL); |
dev | 539 | drivers/net/sunlance.c | irq2dev_map [dev->irq] = NULL; |
dev | 545 | drivers/net/sunlance.c | lance_reset (struct device *dev) |
dev | 547 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 563 | drivers/net/sunlance.c | lance_init_ring (dev); |
dev | 565 | drivers/net/sunlance.c | dev->trans_start = jiffies; |
dev | 566 | drivers/net/sunlance.c | dev->interrupt = 0; |
dev | 567 | drivers/net/sunlance.c | dev->start = 1; |
dev | 568 | drivers/net/sunlance.c | dev->tbusy = 0; |
dev | 577 | drivers/net/sunlance.c | lance_start_xmit (struct sk_buff *skb, struct device *dev) |
dev | 579 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 587 | drivers/net/sunlance.c | if (dev->tbusy){ |
dev | 588 | drivers/net/sunlance.c | int tickssofar = jiffies - dev->trans_start; |
dev | 594 | drivers/net/sunlance.c | dev->name, ll->rdp); |
dev | 595 | drivers/net/sunlance.c | lance_reset (dev); |
dev | 601 | drivers/net/sunlance.c | dev_tint (dev); |
dev | 612 | drivers/net/sunlance.c | dev->tbusy = 1; |
dev | 614 | drivers/net/sunlance.c | if (set_bit (0, (void *) &dev->tbusy) != 0){ |
dev | 656 | drivers/net/sunlance.c | dev->trans_start = jiffies; |
dev | 660 | drivers/net/sunlance.c | dev->tbusy = 0; |
dev | 666 | drivers/net/sunlance.c | lance_get_stats (struct device *dev) |
dev | 668 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 674 | drivers/net/sunlance.c | lance_set_multicast (struct device *dev, int num_addrs, void *addrs) |
dev | 677 | drivers/net/sunlance.c | struct lance_private *lp = (struct lance_private *) dev->priv; |
dev | 683 | drivers/net/sunlance.c | lance_init_ring (dev); |
dev | 689 | drivers/net/sunlance.c | lance_init_ring (dev); |
dev | 692 | drivers/net/sunlance.c | dev->tbusy = 0; |
dev | 698 | drivers/net/sunlance.c | find_ledma (struct linux_sbus_device *dev) |
dev | 703 | drivers/net/sunlance.c | if (p->SBus_dev == dev) |
dev | 709 | drivers/net/sunlance.c | int sparc_lance_probe (struct device *dev) |
dev | 740 | drivers/net/sunlance.c | if (dev == NULL){ |
dev | 742 | drivers/net/sunlance.c | dev = init_etherdev (0, sizeof (struct lance_private)); |
dev | 744 | drivers/net/sunlance.c | dev->priv = kmalloc (sizeof (struct lance_private), GFP_KERNEL); |
dev | 745 | drivers/net/sunlance.c | if (dev->priv == NULL) |
dev | 751 | drivers/net/sunlance.c | printk ("%s: LANCE ", dev->name); |
dev | 753 | drivers/net/sunlance.c | dev->base_addr = (long) sdev; |
dev | 760 | drivers/net/sunlance.c | printk ("%2.2x%c", dev->dev_addr [i] = idprom->id_eaddr [i], i == 5 ? ' ': ':'); |
dev | 769 | drivers/net/sunlance.c | dev->priv = (void *)(((int)dev->priv + 7) & ~7); |
dev | 770 | drivers/net/sunlance.c | lp = (struct lance_private *) dev->priv; |
dev | 771 | drivers/net/sunlance.c | memset ((char *)dev->priv, 0, sizeof (struct lance_private)); |
dev | 786 | drivers/net/sunlance.c | dev->open = &lance_open; |
dev | 787 | drivers/net/sunlance.c | dev->stop = &lance_close; |
dev | 788 | drivers/net/sunlance.c | dev->hard_start_xmit = &lance_start_xmit; |
dev | 789 | drivers/net/sunlance.c | dev->get_stats = &lance_get_stats; |
dev | 790 | drivers/net/sunlance.c | dev->set_multicast_list = &lance_set_multicast; |
dev | 792 | drivers/net/sunlance.c | dev->irq = (unsigned char) sdev->irqs [0].pri; |
dev | 793 | drivers/net/sunlance.c | dev->dma = 0; |
dev | 794 | drivers/net/sunlance.c | ether_setup (dev); |
dev | 154 | drivers/net/tulip.c | static int tulip_open(struct device *dev); |
dev | 155 | drivers/net/tulip.c | static void tulip_init_ring(struct device *dev); |
dev | 156 | drivers/net/tulip.c | static int tulip_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 157 | drivers/net/tulip.c | static int tulip_rx(struct device *dev); |
dev | 159 | drivers/net/tulip.c | static int tulip_close(struct device *dev); |
dev | 160 | drivers/net/tulip.c | static struct enet_statistics *tulip_get_stats(struct device *dev); |
dev | 161 | drivers/net/tulip.c | static void set_multicast_list(struct device *dev); |
dev | 162 | drivers/net/tulip.c | static int set_mac_address(struct device *dev, void *addr); |
dev | 201 | drivers/net/tulip.c | static int tulip_probe(struct device *dev) |
dev | 211 | drivers/net/tulip.c | struct device *dev; |
dev | 218 | drivers/net/tulip.c | dev = init_etherdev(0, 0); |
dev | 220 | drivers/net/tulip.c | printk("%s: DEC 21040 Tulip at %#3x,", dev->name, ioaddr); |
dev | 237 | drivers/net/tulip.c | printk(" %2.2x", dev->dev_addr[i] = value); |
dev | 244 | drivers/net/tulip.c | dev->base_addr = ioaddr; |
dev | 245 | drivers/net/tulip.c | dev->irq = irq; |
dev | 249 | drivers/net/tulip.c | dev->priv = tp; |
dev | 253 | drivers/net/tulip.c | dev->open = &tulip_open; |
dev | 254 | drivers/net/tulip.c | dev->hard_start_xmit = &tulip_start_xmit; |
dev | 255 | drivers/net/tulip.c | dev->stop = &tulip_close; |
dev | 256 | drivers/net/tulip.c | dev->get_stats = &tulip_get_stats; |
dev | 257 | drivers/net/tulip.c | dev->set_multicast_list = &set_multicast_list; |
dev | 258 | drivers/net/tulip.c | dev->set_mac_address = &set_mac_address; |
dev | 265 | drivers/net/tulip.c | tulip_open(struct device *dev) |
dev | 267 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 268 | drivers/net/tulip.c | int ioaddr = dev->base_addr; |
dev | 283 | drivers/net/tulip.c | if (irq2dev_map[dev->irq] != NULL |
dev | 284 | drivers/net/tulip.c | || (irq2dev_map[dev->irq] = dev) == NULL |
dev | 285 | drivers/net/tulip.c | || dev->irq == 0 |
dev | 286 | drivers/net/tulip.c | || request_irq(dev->irq, &tulip_interrupt, 0, "DEC 21040 Tulip", NULL)) { |
dev | 291 | drivers/net/tulip.c | printk("%s: tulip_open() irq %d.\n", dev->name, dev->irq); |
dev | 293 | drivers/net/tulip.c | tulip_init_ring(dev); |
dev | 297 | drivers/net/tulip.c | unsigned short *eaddrs = (unsigned short *)dev->dev_addr; |
dev | 332 | drivers/net/tulip.c | dev->tbusy = 0; |
dev | 333 | drivers/net/tulip.c | dev->interrupt = 0; |
dev | 334 | drivers/net/tulip.c | dev->start = 1; |
dev | 341 | drivers/net/tulip.c | dev->name, inl(ioaddr + CSR0), inl(ioaddr + CSR13)); |
dev | 349 | drivers/net/tulip.c | tulip_init_ring(struct device *dev) |
dev | 351 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 376 | drivers/net/tulip.c | tulip_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 378 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 379 | drivers/net/tulip.c | int ioaddr = dev->base_addr; |
dev | 383 | drivers/net/tulip.c | if (dev->tbusy) { |
dev | 384 | drivers/net/tulip.c | int tickssofar = jiffies - dev->trans_start; |
dev | 389 | drivers/net/tulip.c | dev->name, inl(ioaddr + CSR5), inl(ioaddr + CSR12), |
dev | 401 | drivers/net/tulip.c | dev->tbusy=0; |
dev | 402 | drivers/net/tulip.c | dev->trans_start = jiffies; |
dev | 408 | drivers/net/tulip.c | dev->name); |
dev | 409 | drivers/net/tulip.c | dev_tint(dev); |
dev | 416 | drivers/net/tulip.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 417 | drivers/net/tulip.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 440 | drivers/net/tulip.c | dev->trans_start = jiffies; |
dev | 449 | drivers/net/tulip.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 453 | drivers/net/tulip.c | if (dev == NULL) { |
dev | 458 | drivers/net/tulip.c | ioaddr = dev->base_addr; |
dev | 459 | drivers/net/tulip.c | lp = (struct tulip_private *)dev->priv; |
dev | 460 | drivers/net/tulip.c | if (dev->interrupt) |
dev | 461 | drivers/net/tulip.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 463 | drivers/net/tulip.c | dev->interrupt = 1; |
dev | 472 | drivers/net/tulip.c | dev->name, csr5, inl(dev->base_addr + CSR5)); |
dev | 478 | drivers/net/tulip.c | tulip_rx(dev); |
dev | 522 | drivers/net/tulip.c | if (lp->tx_full && dev->tbusy |
dev | 526 | drivers/net/tulip.c | dev->tbusy = 0; |
dev | 542 | drivers/net/tulip.c | dev->name, csr5); |
dev | 548 | drivers/net/tulip.c | dev->name, csr5); |
dev | 557 | drivers/net/tulip.c | dev->name, inl(ioaddr + CSR5)); |
dev | 562 | drivers/net/tulip.c | if (dev->start == 0 && --stopit < 0) { |
dev | 564 | drivers/net/tulip.c | dev->name); |
dev | 569 | drivers/net/tulip.c | dev->interrupt = 0; |
dev | 574 | drivers/net/tulip.c | tulip_rx(struct device *dev) |
dev | 576 | drivers/net/tulip.c | struct tulip_private *lp = (struct tulip_private *)dev->priv; |
dev | 590 | drivers/net/tulip.c | dev->name, status); |
dev | 605 | drivers/net/tulip.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 619 | drivers/net/tulip.c | skb->dev = dev; |
dev | 622 | drivers/net/tulip.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 635 | drivers/net/tulip.c | tulip_close(struct device *dev) |
dev | 637 | drivers/net/tulip.c | int ioaddr = dev->base_addr; |
dev | 638 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 640 | drivers/net/tulip.c | dev->start = 0; |
dev | 641 | drivers/net/tulip.c | dev->tbusy = 1; |
dev | 645 | drivers/net/tulip.c | dev->name, inl(ioaddr + CSR5)); |
dev | 654 | drivers/net/tulip.c | free_irq(dev->irq, NULL); |
dev | 655 | drivers/net/tulip.c | irq2dev_map[dev->irq] = 0; |
dev | 662 | drivers/net/tulip.c | tulip_get_stats(struct device *dev) |
dev | 664 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 665 | drivers/net/tulip.c | short ioaddr = dev->base_addr; |
dev | 676 | drivers/net/tulip.c | static void set_multicast_list(struct device *dev) |
dev | 678 | drivers/net/tulip.c | short ioaddr = dev->base_addr; |
dev | 681 | drivers/net/tulip.c | if (dev->flags&IFF_PROMISC) |
dev | 685 | drivers/net/tulip.c | printk("%s: Promiscuous mode enabled.\n", dev->name); |
dev | 687 | drivers/net/tulip.c | else if (dev->mc_count > 15 || (dev->flags&IFF_ALLMULTI)) |
dev | 694 | drivers/net/tulip.c | struct tulip_private *tp = (struct tulip_private *)dev->priv; |
dev | 695 | drivers/net/tulip.c | struct dev_mc_list *dmi=dev->mc_list; |
dev | 715 | drivers/net/tulip.c | eaddrs = (unsigned short *)dev->dev_addr; |
dev | 727 | drivers/net/tulip.c | set_mac_address(struct device *dev, void *addr) |
dev | 731 | drivers/net/tulip.c | if (dev->start) |
dev | 733 | drivers/net/tulip.c | printk("%s: Setting MAC address to ", dev->name); |
dev | 735 | drivers/net/tulip.c | printk(" %2.2x", dev->dev_addr[i] = sa->sa_data[i]); |
dev | 65 | drivers/net/wavelan.c | device *dev; |
dev | 189 | drivers/net/wavelan.c | wavelan_ints_off(device *dev) |
dev | 195 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 196 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 208 | drivers/net/wavelan.c | wavelan_ints_on(device *dev) |
dev | 214 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 215 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 379 | drivers/net/wavelan.c | wavelan_mmc_init(device *dev, psa_t *psa) |
dev | 386 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 387 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 456 | drivers/net/wavelan.c | wavelan_ack(device *dev) |
dev | 463 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 464 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 486 | drivers/net/wavelan.c | printk("%s: wavelan_ack(): board not accepting command.\n", dev->name); |
dev | 495 | drivers/net/wavelan.c | wavelan_synchronous_cmd(device *dev, const char *str) |
dev | 503 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 504 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 522 | drivers/net/wavelan.c | printk("%s: %s failed; status = 0x%x\n", dev->name, str, cb.ac_status); |
dev | 527 | drivers/net/wavelan.c | wavelan_ack(dev); |
dev | 534 | drivers/net/wavelan.c | wavelan_hardware_reset(device *dev) |
dev | 548 | drivers/net/wavelan.c | printk("%s: ->wavelan_hardware_reset(dev=0x%x)\n", dev->name, (unsigned int)dev); |
dev | 550 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 551 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 572 | drivers/net/wavelan.c | wavelan_mmc_init(dev, &psa); |
dev | 608 | drivers/net/wavelan.c | printk("%s: wavelan_hardware_reset(): iscp_busy timeout.\n", dev->name); |
dev | 610 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 626 | drivers/net/wavelan.c | printk("%s: wavelan_hardware_reset(): status: expected 0x%02x, got 0x%02x.\n", dev->name, SCB_ST_CX | SCB_ST_CNA, scb.scb_status); |
dev | 628 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 632 | drivers/net/wavelan.c | wavelan_ack(dev); |
dev | 639 | drivers/net/wavelan.c | if (wavelan_synchronous_cmd(dev, "diag()") == -1) |
dev | 642 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 649 | drivers/net/wavelan.c | printk("%s: wavelan_hardware_reset(): i82586 Self Test failed.\n", dev->name); |
dev | 651 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 711 | drivers/net/wavelan.c | if (wavelan_synchronous_cmd(dev, "reset()-configure") == -1) |
dev | 714 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 722 | drivers/net/wavelan.c | memcpy(&ias.ias_addr[0], (unsigned char *)&dev->dev_addr[0], sizeof(ias.ias_addr)); |
dev | 725 | drivers/net/wavelan.c | if (wavelan_synchronous_cmd(dev, "reset()-address") == -1) |
dev | 728 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): -1\n", dev->name); |
dev | 733 | drivers/net/wavelan.c | wavelan_ints_on(dev); |
dev | 738 | drivers/net/wavelan.c | wavelan_ru_start(dev); |
dev | 739 | drivers/net/wavelan.c | wavelan_cu_start(dev); |
dev | 742 | drivers/net/wavelan.c | printk("%s: <-wavelan_hardware_reset(): 0\n", dev->name); |
dev | 773 | drivers/net/wavelan.c | wavelan_probe(device *dev) |
dev | 791 | drivers/net/wavelan.c | printk("%s: ->wavelan_probe(dev=0x%x (base_addr=0x%x))\n", dev->name, (unsigned int)dev, (unsigned int)dev->base_addr); |
dev | 796 | drivers/net/wavelan.c | printk("%s: structure/compiler botch: \"%s\"\n", dev->name, wavelan_struct_check()); |
dev | 799 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe(): ENODEV\n", dev->name); |
dev | 805 | drivers/net/wavelan.c | base_addr = dev->base_addr; |
dev | 813 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe(): ENXIO\n", dev->name); |
dev | 822 | drivers/net/wavelan.c | r = wavelan_probe1(dev, base_addr); |
dev | 824 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe(): %d\n", dev->name, r); |
dev | 833 | drivers/net/wavelan.c | if (wavelan_probe1(dev, iobase[i]) == 0) |
dev | 836 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe(): 0\n", dev->name); |
dev | 849 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe(): ENODEV\n", dev->name); |
dev | 856 | drivers/net/wavelan.c | wavelan_probe1(device *dev, unsigned short ioaddr) |
dev | 865 | drivers/net/wavelan.c | printk("%s: ->wavelan_probe1(dev=0x%x, ioaddr=0x%x)\n", dev->name, (unsigned int)dev, ioaddr); |
dev | 885 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe1(): ENODEV\n", dev->name); |
dev | 889 | drivers/net/wavelan.c | printk("%s: WaveLAN at %#x,", dev->name, ioaddr); |
dev | 891 | drivers/net/wavelan.c | if (dev->irq != 0) |
dev | 893 | drivers/net/wavelan.c | printk("[WARNING: explicit IRQ value %d ignored: using PSA value instead]", dev->irq); |
dev | 896 | drivers/net/wavelan.c | if (wavelan_unmap_irq(dev->irq, &psa.psa_int_req_no) == -1) |
dev | 898 | drivers/net/wavelan.c | printk(" could not wavelan_unmap_irq(%d, ..) -- ignored.\n", dev->irq); |
dev | 899 | drivers/net/wavelan.c | dev->irq = 0; |
dev | 913 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe1(): EAGAIN\n", dev->name); |
dev | 917 | drivers/net/wavelan.c | dev->irq = irq; |
dev | 920 | drivers/net/wavelan.c | dev->base_addr = ioaddr; |
dev | 933 | drivers/net/wavelan.c | enable_full_promiscuous = (dev->mem_start & ENABLE_FULL_PROMISCUOUS) == ENABLE_FULL_PROMISCUOUS; |
dev | 934 | drivers/net/wavelan.c | dev->mem_start &= ~ENABLE_FULL_PROMISCUOUS; |
dev | 936 | drivers/net/wavelan.c | if (dev->mem_start != 0) |
dev | 938 | drivers/net/wavelan.c | psa.psa_nwid[0] = (dev->mem_start >> 8) & 0xFF; |
dev | 939 | drivers/net/wavelan.c | psa.psa_nwid[1] = (dev->mem_start >> 0) & 0xFF; |
dev | 942 | drivers/net/wavelan.c | dev->mem_start = 0x0000; |
dev | 943 | drivers/net/wavelan.c | dev->mem_end = 0x0000; |
dev | 944 | drivers/net/wavelan.c | dev->if_port = 0; |
dev | 946 | drivers/net/wavelan.c | memcpy(&dev->dev_addr[0], &psa.psa_univ_mac_addr[0], WAVELAN_ADDR_SIZE); |
dev | 949 | drivers/net/wavelan.c | printk("%s%02x", (i == 0) ? " " : ":", dev->dev_addr[i]); |
dev | 951 | drivers/net/wavelan.c | printk(", IRQ %d", dev->irq); |
dev | 1012 | drivers/net/wavelan.c | dev->priv = kmalloc(sizeof(net_local), GFP_KERNEL); |
dev | 1013 | drivers/net/wavelan.c | if (dev->priv == NULL) |
dev | 1015 | drivers/net/wavelan.c | memset(dev->priv, 0x00, sizeof(net_local)); |
dev | 1016 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1031 | drivers/net/wavelan.c | lp->dev = dev; |
dev | 1040 | drivers/net/wavelan.c | lp->watchdog.data = (unsigned long)dev; |
dev | 1042 | drivers/net/wavelan.c | dev->open = wavelan_open; |
dev | 1043 | drivers/net/wavelan.c | dev->stop = wavelan_close; |
dev | 1044 | drivers/net/wavelan.c | dev->hard_start_xmit = wavelan_send_packet; |
dev | 1045 | drivers/net/wavelan.c | dev->get_stats = wavelan_get_stats; |
dev | 1046 | drivers/net/wavelan.c | dev->set_multicast_list = &wavelan_set_multicast_list; |
dev | 1052 | drivers/net/wavelan.c | ether_setup(dev); |
dev | 1054 | drivers/net/wavelan.c | dev->flags &= ~IFF_MULTICAST; /* Not yet supported */ |
dev | 1056 | drivers/net/wavelan.c | dev->mtu = WAVELAN_MTU; |
dev | 1059 | drivers/net/wavelan.c | printk("%s: <-wavelan_probe1(): 0\n", dev->name); |
dev | 1070 | drivers/net/wavelan.c | wavelan_ru_start(device *dev) |
dev | 1081 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1082 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1127 | drivers/net/wavelan.c | printk("%s: wavelan_ru_start(): board not accepting command.\n", dev->name); |
dev | 1137 | drivers/net/wavelan.c | wavelan_cu_start(device *dev) |
dev | 1146 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1147 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1208 | drivers/net/wavelan.c | printk("%s: wavelan_cu_start(): board not accepting command.\n", dev->name); |
dev | 1211 | drivers/net/wavelan.c | dev->tbusy = 0; |
dev | 1216 | drivers/net/wavelan.c | wavelan_open(device *dev) |
dev | 1224 | drivers/net/wavelan.c | printk("%s: ->wavelan_open(dev=0x%x)\n", dev->name, (unsigned int)dev); |
dev | 1226 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1227 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1229 | drivers/net/wavelan.c | if (dev->irq == 0) |
dev | 1232 | drivers/net/wavelan.c | printk("%s: <-wavelan_open(): -ENXIO\n", dev->name); |
dev | 1238 | drivers/net/wavelan.c | irq2dev_map[dev->irq] != (device *)0 |
dev | 1241 | drivers/net/wavelan.c | (irq2dev_map[dev->irq] = dev) == (device *)0 |
dev | 1243 | drivers/net/wavelan.c | request_irq(dev->irq, &wavelan_interrupt, 0, "WaveLAN", NULL) != 0 |
dev | 1246 | drivers/net/wavelan.c | irq2dev_map[dev->irq] = (device *)0; |
dev | 1248 | drivers/net/wavelan.c | printk("%s: <-wavelan_open(): -EAGAIN\n", dev->name); |
dev | 1253 | drivers/net/wavelan.c | if ((r = wavelan_hardware_reset(dev)) != -1) |
dev | 1255 | drivers/net/wavelan.c | dev->interrupt = 0; |
dev | 1256 | drivers/net/wavelan.c | dev->start = 1; |
dev | 1262 | drivers/net/wavelan.c | free_irq(dev->irq, NULL); |
dev | 1263 | drivers/net/wavelan.c | irq2dev_map[dev->irq] = (device *)0; |
dev | 1265 | drivers/net/wavelan.c | printk("%s: <-wavelan_open(): -EAGAIN(2)\n", dev->name); |
dev | 1272 | drivers/net/wavelan.c | printk("%s: <-wavelan_open(): 0\n", dev->name); |
dev | 1279 | drivers/net/wavelan.c | hardware_send_packet(device *dev, void *buf, short length) |
dev | 1294 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1295 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1361 | drivers/net/wavelan.c | dev->tbusy = 0; |
dev | 1363 | drivers/net/wavelan.c | dev->trans_start = jiffies; |
dev | 1366 | drivers/net/wavelan.c | wavelan_watchdog((unsigned long)dev); |
dev | 1379 | drivers/net/wavelan.c | dev->name, |
dev | 1389 | drivers/net/wavelan.c | wavelan_send_packet(struct sk_buff *skb, device *dev) |
dev | 1393 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1395 | drivers/net/wavelan.c | if (dev->tbusy) |
dev | 1403 | drivers/net/wavelan.c | tickssofar = jiffies - dev->trans_start; |
dev | 1415 | drivers/net/wavelan.c | wavelan_ru_show(dev); |
dev | 1416 | drivers/net/wavelan.c | wavelan_cu_show(dev); |
dev | 1417 | drivers/net/wavelan.c | wavelan_dev_show(dev); |
dev | 1418 | drivers/net/wavelan.c | wavelan_local_show(dev); |
dev | 1420 | drivers/net/wavelan.c | printk("%s: transmit timed out -- resetting board.\n", dev->name); |
dev | 1422 | drivers/net/wavelan.c | (void)wavelan_hardware_reset(dev); |
dev | 1432 | drivers/net/wavelan.c | dev_tint(dev); |
dev | 1439 | drivers/net/wavelan.c | if (set_bit(0, (void *)&dev->tbusy) == 0) |
dev | 1447 | drivers/net/wavelan.c | hardware_send_packet(dev, buf, length); |
dev | 1450 | drivers/net/wavelan.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1481 | drivers/net/wavelan.c | wavelan_receive(device *dev) |
dev | 1487 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1488 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1521 | drivers/net/wavelan.c | printk("%s: frame not received successfully.\n", dev->name); |
dev | 1529 | drivers/net/wavelan.c | printk("%s: no EOF flag.\n", dev->name); |
dev | 1534 | drivers/net/wavelan.c | printk("%s: frame too short.\n", dev->name); |
dev | 1540 | drivers/net/wavelan.c | printk("%s: rx DMA overrun.\n", dev->name); |
dev | 1546 | drivers/net/wavelan.c | printk("%s: ran out of resources.\n", dev->name); |
dev | 1552 | drivers/net/wavelan.c | printk("%s: alignment error.\n", dev->name); |
dev | 1558 | drivers/net/wavelan.c | printk("%s: CRC error.\n", dev->name); |
dev | 1563 | drivers/net/wavelan.c | printk("%s: frame has no data.\n", dev->name); |
dev | 1569 | drivers/net/wavelan.c | printk("%s: missing EOF flag.\n", dev->name); |
dev | 1572 | drivers/net/wavelan.c | printk("%s: missing F flag.\n", dev->name); |
dev | 1595 | drivers/net/wavelan.c | printk("%s: foreign MAC source addr=", dev->name); |
dev | 1610 | drivers/net/wavelan.c | printk("%s: fd_dest=", dev->name); |
dev | 1615 | drivers/net/wavelan.c | printk("%s: fd_src=", dev->name); |
dev | 1619 | drivers/net/wavelan.c | printk("%s: fd_length=%d\n", dev->name, fd.fd_length); |
dev | 1623 | drivers/net/wavelan.c | printk("%s: dest=", dev->name); |
dev | 1629 | drivers/net/wavelan.c | printk("%s: src=", dev->name); |
dev | 1635 | drivers/net/wavelan.c | printk("%s: ntohs(length/type)=0x%04x\n", dev->name, ntohs(ltype)); |
dev | 1642 | drivers/net/wavelan.c | printk("%s: could not alloc_skb(%d, GFP_ATOMIC).\n", dev->name, sksize); |
dev | 1647 | drivers/net/wavelan.c | skb->dev = dev; |
dev | 1656 | drivers/net/wavelan.c | printk("%s: pkt_len=%d, data=\"", dev->name, pkt_len); |
dev | 1678 | drivers/net/wavelan.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1710 | drivers/net/wavelan.c | wavelan_complete(device *dev, unsigned short ioaddr, net_local *lp) |
dev | 1765 | drivers/net/wavelan.c | printk("%s: tx error: no CS.\n", dev->name); |
dev | 1770 | drivers/net/wavelan.c | printk("%s: tx error: lost CTS.\n", dev->name); |
dev | 1775 | drivers/net/wavelan.c | printk("%s: tx error: slow DMA.\n", dev->name); |
dev | 1781 | drivers/net/wavelan.c | printk("%s: tx error: heart beat.\n", dev->name); |
dev | 1787 | drivers/net/wavelan.c | printk("%s: tx error: too many collisions.\n", dev->name); |
dev | 1792 | drivers/net/wavelan.c | printk("%s: tx completed, tx_status 0x%04x.\n", dev->name, tx_status); |
dev | 1805 | drivers/net/wavelan.c | dev->tbusy = 0; |
dev | 1816 | drivers/net/wavelan.c | device *dev; |
dev | 1824 | drivers/net/wavelan.c | dev = (device *)a; |
dev | 1825 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1826 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1837 | drivers/net/wavelan.c | if (jiffies - dev->trans_start < WATCHDOG_JIFFIES) |
dev | 1843 | drivers/net/wavelan.c | nreaped = wavelan_complete(dev, ioaddr, lp); |
dev | 1845 | drivers/net/wavelan.c | printk("%s: warning: wavelan_watchdog(): %d reaped, %d remain.\n", dev->name, nreaped, lp->tx_n_in_use); |
dev | 1861 | drivers/net/wavelan.c | device *dev; |
dev | 1868 | drivers/net/wavelan.c | if ((dev = (device *)(irq2dev_map[irq])) == (device *)0) |
dev | 1874 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1875 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1877 | drivers/net/wavelan.c | dev->interrupt = 1; |
dev | 1889 | drivers/net/wavelan.c | printk("%s: warning: wavelan_interrupt(): unexpected mmc interrupt: status 0x%04x.\n", dev->name, dce_status); |
dev | 1894 | drivers/net/wavelan.c | dev->interrupt = 0; |
dev | 1896 | drivers/net/wavelan.c | printk("%s: warning: wavelan_interrupt() but (hasr & HASR_82586_INTR) == 0.\n", dev->name); |
dev | 1912 | drivers/net/wavelan.c | printk("%s: interrupt, status 0x%04x.\n", dev->name, status); |
dev | 1920 | drivers/net/wavelan.c | printk("%s: command completed.\n", dev->name); |
dev | 1921 | drivers/net/wavelan.c | (void)wavelan_complete(dev, ioaddr, lp); |
dev | 1930 | drivers/net/wavelan.c | printk("%s: received packet.\n", dev->name); |
dev | 1931 | drivers/net/wavelan.c | wavelan_receive(dev); |
dev | 1938 | drivers/net/wavelan.c | (((status & SCB_ST_CUS) != SCB_ST_CUS_ACTV) && dev->start) |
dev | 1941 | drivers/net/wavelan.c | printk("%s: warning: CU inactive -- restarting.\n", dev->name); |
dev | 1943 | drivers/net/wavelan.c | (void)wavelan_hardware_reset(dev); |
dev | 1950 | drivers/net/wavelan.c | (((status & SCB_ST_RUS) != SCB_ST_RUS_RDY) && dev->start) |
dev | 1953 | drivers/net/wavelan.c | printk("%s: warning: RU not ready -- restarting.\n", dev->name); |
dev | 1955 | drivers/net/wavelan.c | (void)wavelan_hardware_reset(dev); |
dev | 1958 | drivers/net/wavelan.c | dev->interrupt = 0; |
dev | 1963 | drivers/net/wavelan.c | wavelan_close(device *dev) |
dev | 1970 | drivers/net/wavelan.c | printk("%s: ->wavelan_close(dev=0x%x)\n", dev->name, (unsigned int)dev); |
dev | 1972 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 1973 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 1975 | drivers/net/wavelan.c | dev->tbusy = 1; |
dev | 1976 | drivers/net/wavelan.c | dev->start = 0; |
dev | 1985 | drivers/net/wavelan.c | wavelan_ints_off(dev); |
dev | 1987 | drivers/net/wavelan.c | free_irq(dev->irq, NULL); |
dev | 1988 | drivers/net/wavelan.c | irq2dev_map[dev->irq] = (device *)0; |
dev | 1998 | drivers/net/wavelan.c | printk("%s: <-wavelan_close(): 0\n", dev->name); |
dev | 2009 | drivers/net/wavelan.c | wavelan_get_stats(device *dev) |
dev | 2013 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 2020 | drivers/net/wavelan.c | wavelan_set_multicast_list(device *dev) |
dev | 2026 | drivers/net/wavelan.c | printk("%s: ->wavelan_set_multicast_list(dev=%p)", dev->name, dev); |
dev | 2028 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 2030 | drivers/net/wavelan.c | if(dev->flags&IFF_PROMISC) |
dev | 2037 | drivers/net/wavelan.c | (void)wavelan_hardware_reset(dev); |
dev | 2041 | drivers/net/wavelan.c | else if((dev->flags&IFF_ALLMULTI)||dev->mc_list) |
dev | 2055 | drivers/net/wavelan.c | (void)wavelan_hardware_reset(dev); |
dev | 2060 | drivers/net/wavelan.c | printk("%s: <-wavelan_set_multicast_list()\n", dev->name); |
dev | 2069 | drivers/net/wavelan.c | sprintf_stats(char *buffer, device *dev) |
dev | 2075 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 2078 | drivers/net/wavelan.c | return sprintf(buffer, "%6s: No statistics available.\n", dev->name); |
dev | 2081 | drivers/net/wavelan.c | mmc_write(dev->base_addr, mmwoff(0, mmw_freeze), &v, sizeof(v)); |
dev | 2083 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_dce_status), &m.mmr_dce_status, sizeof(m.mmr_dce_status)); |
dev | 2084 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_correct_nwid_h), &m.mmr_correct_nwid_h, sizeof(m.mmr_correct_nwid_h)); |
dev | 2085 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_correct_nwid_l), &m.mmr_correct_nwid_l, sizeof(m.mmr_correct_nwid_l)); |
dev | 2086 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_wrong_nwid_h), &m.mmr_wrong_nwid_h, sizeof(m.mmr_wrong_nwid_h)); |
dev | 2087 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_wrong_nwid_l), &m.mmr_wrong_nwid_l, sizeof(m.mmr_wrong_nwid_l)); |
dev | 2088 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_signal_lvl), &m.mmr_signal_lvl, sizeof(m.mmr_signal_lvl)); |
dev | 2089 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_silence_lvl), &m.mmr_silence_lvl, sizeof(m.mmr_silence_lvl)); |
dev | 2090 | drivers/net/wavelan.c | mmc_read(dev->base_addr, mmroff(0, mmr_sgnl_qual), &m.mmr_sgnl_qual, sizeof(m.mmr_sgnl_qual)); |
dev | 2093 | drivers/net/wavelan.c | mmc_write(dev->base_addr, mmwoff(0, mmw_freeze), &v, sizeof(v)); |
dev | 2102 | drivers/net/wavelan.c | dev->name, |
dev | 2141 | drivers/net/wavelan.c | size = sprintf_stats(buffer + len, lp->dev); |
dev | 2204 | drivers/net/wavelan.c | wavelan_cu_show_one(device *dev, net_local *lp, int i, unsigned short p) |
dev | 2209 | drivers/net/wavelan.c | ioaddr = dev->base_addr; |
dev | 2415 | drivers/net/wavelan.c | wavelan_ru_show(device *dev) |
dev | 2419 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 2430 | drivers/net/wavelan.c | wavelan_cu_show(device *dev) |
dev | 2436 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 2443 | drivers/net/wavelan.c | wavelan_cu_show_one(dev, lp, i, p); |
dev | 2453 | drivers/net/wavelan.c | wavelan_dev_show(device *dev) |
dev | 2456 | drivers/net/wavelan.c | printk(" start=%d,", dev->start); |
dev | 2457 | drivers/net/wavelan.c | printk(" tbusy=%ld,", dev->tbusy); |
dev | 2458 | drivers/net/wavelan.c | printk(" interrupt=%d,", dev->interrupt); |
dev | 2459 | drivers/net/wavelan.c | printk(" trans_start=%ld,", dev->trans_start); |
dev | 2460 | drivers/net/wavelan.c | printk(" flags=0x%x,", dev->flags); |
dev | 2466 | drivers/net/wavelan.c | wavelan_local_show(device *dev) |
dev | 2470 | drivers/net/wavelan.c | lp = (net_local *)dev->priv; |
dev | 47 | drivers/net/wd.c | int wd_probe(struct device *dev); |
dev | 48 | drivers/net/wd.c | int wd_probe1(struct device *dev, int ioaddr); |
dev | 50 | drivers/net/wd.c | static int wd_open(struct device *dev); |
dev | 51 | drivers/net/wd.c | static void wd_reset_8390(struct device *dev); |
dev | 52 | drivers/net/wd.c | static void wd_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, |
dev | 54 | drivers/net/wd.c | static void wd_block_input(struct device *dev, int count, |
dev | 56 | drivers/net/wd.c | static void wd_block_output(struct device *dev, int count, |
dev | 58 | drivers/net/wd.c | static int wd_close_card(struct device *dev); |
dev | 88 | drivers/net/wd.c | int wd_probe(struct device *dev) |
dev | 91 | drivers/net/wd.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 94 | drivers/net/wd.c | return wd_probe1(dev, base_addr); |
dev | 102 | drivers/net/wd.c | if (wd_probe1(dev, ioaddr) == 0) |
dev | 110 | drivers/net/wd.c | int wd_probe1(struct device *dev, int ioaddr) |
dev | 127 | drivers/net/wd.c | if (dev == NULL) { |
dev | 129 | drivers/net/wd.c | dev = init_etherdev(0, 0); |
dev | 133 | drivers/net/wd.c | if ((dev->mem_start % 0x2000) || (dev->mem_end % 0x2000)) { |
dev | 135 | drivers/net/wd.c | dev->mem_start = 0; |
dev | 136 | drivers/net/wd.c | dev->mem_end = 0; |
dev | 142 | drivers/net/wd.c | printk("%s: WD80x3 at %#3x, ", dev->name, ioaddr); |
dev | 144 | drivers/net/wd.c | printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); |
dev | 161 | drivers/net/wd.c | dev->mem_start = ((reg5 & 0x1c) + 0xc0) << 12; |
dev | 162 | drivers/net/wd.c | dev->irq = (reg5 & 0xe0) == 0xe0 ? 10 : (reg5 >> 5) + 1; |
dev | 203 | drivers/net/wd.c | dev->mem_start = WD_SHMEM; |
dev | 205 | drivers/net/wd.c | if (dev->mem_start == 0) { |
dev | 210 | drivers/net/wd.c | dev->mem_start = 0xd0000; |
dev | 211 | drivers/net/wd.c | printk(" assigning address %#lx", dev->mem_start); |
dev | 217 | drivers/net/wd.c | dev->mem_start = ((reg0&0x3f) << 13) + (high_addr_bits << 19); |
dev | 223 | drivers/net/wd.c | dev->base_addr = ioaddr+WD_NIC_OFFSET; |
dev | 225 | drivers/net/wd.c | if (dev->irq < 2) { |
dev | 242 | drivers/net/wd.c | dev->irq = autoirq_report(2); |
dev | 246 | drivers/net/wd.c | printk(" autoirq is %d", dev->irq); |
dev | 247 | drivers/net/wd.c | if (dev->irq < 2) |
dev | 248 | drivers/net/wd.c | dev->irq = word16 ? 10 : 5; |
dev | 250 | drivers/net/wd.c | dev->irq = irqmap[((reg4 >> 5) & 0x03) + (reg1 & 0x04)]; |
dev | 251 | drivers/net/wd.c | } else if (dev->irq == 2) /* Fixup bogosity: IRQ2 is really IRQ9 */ |
dev | 252 | drivers/net/wd.c | dev->irq = 9; |
dev | 256 | drivers/net/wd.c | if (request_irq(dev->irq, ei_interrupt, 0, model_name, NULL)) { |
dev | 257 | drivers/net/wd.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 262 | drivers/net/wd.c | if (ethdev_init(dev)) { |
dev | 264 | drivers/net/wd.c | free_irq(dev->irq, NULL); |
dev | 277 | drivers/net/wd.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 280 | drivers/net/wd.c | if (dev->mem_end != 0) { |
dev | 281 | drivers/net/wd.c | ei_status.stop_page = (dev->mem_end - dev->mem_start)/256; |
dev | 284 | drivers/net/wd.c | dev->mem_end = dev->mem_start + (ei_status.stop_page - WD_START_PG)*256; |
dev | 286 | drivers/net/wd.c | dev->rmem_end = dev->mem_end; |
dev | 289 | drivers/net/wd.c | model_name, dev->irq, dev->mem_start, dev->mem_end-1); |
dev | 295 | drivers/net/wd.c | dev->open = &wd_open; |
dev | 296 | drivers/net/wd.c | dev->stop = &wd_close_card; |
dev | 297 | drivers/net/wd.c | NS8390_init(dev, 0); |
dev | 310 | drivers/net/wd.c | wd_open(struct device *dev) |
dev | 312 | drivers/net/wd.c | int ioaddr = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 316 | drivers/net/wd.c | ei_status.reg0 = ((dev->mem_start>>13) & 0x3f) | WD_MEMENB; |
dev | 317 | drivers/net/wd.c | ei_status.reg5 = ((dev->mem_start>>19) & 0x1f) | NIC16; |
dev | 323 | drivers/net/wd.c | ei_open(dev); |
dev | 329 | drivers/net/wd.c | wd_reset_8390(struct device *dev) |
dev | 331 | drivers/net/wd.c | int wd_cmd_port = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 338 | drivers/net/wd.c | outb((((dev->mem_start>>13) & 0x3f)|WD_MEMENB), wd_cmd_port); |
dev | 340 | drivers/net/wd.c | outb(NIC16 | ((dev->mem_start>>19) & 0x1f), wd_cmd_port+WD_CMDREG5); |
dev | 351 | drivers/net/wd.c | wd_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
dev | 354 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 355 | drivers/net/wd.c | unsigned long hdr_start = dev->mem_start + ((ring_page - WD_START_PG)<<8); |
dev | 376 | drivers/net/wd.c | wd_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset) |
dev | 378 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 379 | drivers/net/wd.c | unsigned long xfer_start = dev->mem_start + ring_offset - (WD_START_PG<<8); |
dev | 381 | drivers/net/wd.c | if (xfer_start + count > dev->rmem_end) { |
dev | 383 | drivers/net/wd.c | int semi_count = dev->rmem_end - xfer_start; |
dev | 386 | drivers/net/wd.c | memcpy_fromio(skb->data + semi_count, dev->rmem_start, count); |
dev | 398 | drivers/net/wd.c | wd_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 401 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 402 | drivers/net/wd.c | long shmem = dev->mem_start + ((start_page - WD_START_PG)<<8); |
dev | 416 | drivers/net/wd.c | wd_close_card(struct device *dev) |
dev | 418 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 421 | drivers/net/wd.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 422 | drivers/net/wd.c | ei_close(dev); |
dev | 463 | drivers/net/wd.c | struct device *dev = &dev_wd[this_dev]; |
dev | 464 | drivers/net/wd.c | dev->name = namelist+(NAMELEN*this_dev); |
dev | 465 | drivers/net/wd.c | dev->irq = irq[this_dev]; |
dev | 466 | drivers/net/wd.c | dev->base_addr = io[this_dev]; |
dev | 467 | drivers/net/wd.c | dev->mem_start = mem[this_dev]; |
dev | 468 | drivers/net/wd.c | dev->mem_end = mem_end[this_dev]; |
dev | 469 | drivers/net/wd.c | dev->init = wd_probe; |
dev | 474 | drivers/net/wd.c | if (register_netdev(dev) != 0) { |
dev | 491 | drivers/net/wd.c | struct device *dev = &dev_wd[this_dev]; |
dev | 492 | drivers/net/wd.c | if (dev->priv != NULL) { |
dev | 493 | drivers/net/wd.c | int ioaddr = dev->base_addr - WD_NIC_OFFSET; |
dev | 494 | drivers/net/wd.c | kfree(dev->priv); |
dev | 495 | drivers/net/wd.c | dev->priv = NULL; |
dev | 496 | drivers/net/wd.c | free_irq(dev->irq, NULL); |
dev | 497 | drivers/net/wd.c | irq2dev_map[dev->irq] = NULL; |
dev | 499 | drivers/net/wd.c | unregister_netdev(dev); |
dev | 182 | drivers/net/znet.c | int znet_probe(struct device *dev); |
dev | 183 | drivers/net/znet.c | static int znet_open(struct device *dev); |
dev | 184 | drivers/net/znet.c | static int znet_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 186 | drivers/net/znet.c | static void znet_rx(struct device *dev); |
dev | 187 | drivers/net/znet.c | static int znet_close(struct device *dev); |
dev | 188 | drivers/net/znet.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 189 | drivers/net/znet.c | static void set_multicast_list(struct device *dev); |
dev | 190 | drivers/net/znet.c | static void hardware_init(struct device *dev); |
dev | 202 | drivers/net/znet.c | int znet_probe(struct device *dev) |
dev | 219 | drivers/net/znet.c | dev->base_addr = netinfo->iobase1; |
dev | 220 | drivers/net/znet.c | dev->irq = netinfo->irq1; |
dev | 222 | drivers/net/znet.c | printk(KERN_INFO "%s: ZNET at %#3lx,", dev->name, dev->base_addr); |
dev | 226 | drivers/net/znet.c | printk(" %2.2x", dev->dev_addr[i] = netinfo->netid[i]); |
dev | 228 | drivers/net/znet.c | printk(", using IRQ %d DMA %d and %d.\n", dev->irq, netinfo->dma1, |
dev | 233 | drivers/net/znet.c | dev->name, netinfo->vendor, |
dev | 237 | drivers/net/znet.c | dev->name, netinfo->iobase1, netinfo->iosize1, |
dev | 244 | drivers/net/znet.c | dev->priv = (void *) &zn; |
dev | 249 | drivers/net/znet.c | if (request_irq(dev->irq, &znet_interrupt, 0, "ZNet", NULL) |
dev | 252 | drivers/net/znet.c | printk(KERN_WARNING "%s: Not opened -- resource busy?!?\n", dev->name); |
dev | 255 | drivers/net/znet.c | irq2dev_map[dev->irq] = dev; |
dev | 273 | drivers/net/znet.c | dev->open = &znet_open; |
dev | 274 | drivers/net/znet.c | dev->hard_start_xmit = &znet_send_packet; |
dev | 275 | drivers/net/znet.c | dev->stop = &znet_close; |
dev | 276 | drivers/net/znet.c | dev->get_stats = net_get_stats; |
dev | 277 | drivers/net/znet.c | dev->set_multicast_list = &set_multicast_list; |
dev | 280 | drivers/net/znet.c | ether_setup(dev); |
dev | 286 | drivers/net/znet.c | static int znet_open(struct device *dev) |
dev | 288 | drivers/net/znet.c | int ioaddr = dev->base_addr; |
dev | 291 | drivers/net/znet.c | printk(KERN_DEBUG "%s: znet_open() called.\n", dev->name); |
dev | 307 | drivers/net/znet.c | dev->name); |
dev | 309 | drivers/net/znet.c | dev->tbusy = 0; |
dev | 310 | drivers/net/znet.c | dev->interrupt = 0; |
dev | 311 | drivers/net/znet.c | hardware_init(dev); |
dev | 312 | drivers/net/znet.c | dev->start = 1; |
dev | 317 | drivers/net/znet.c | static int znet_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 319 | drivers/net/znet.c | int ioaddr = dev->base_addr; |
dev | 322 | drivers/net/znet.c | printk(KERN_DEBUG "%s: ZNet_send_packet(%ld).\n", dev->name, dev->tbusy); |
dev | 325 | drivers/net/znet.c | if (dev->tbusy) { |
dev | 327 | drivers/net/znet.c | int tickssofar = jiffies - dev->trans_start; |
dev | 335 | drivers/net/znet.c | " resetting.\n", dev->name, event, tx_status, rx_offset, state); |
dev | 338 | drivers/net/znet.c | dev->name); |
dev | 340 | drivers/net/znet.c | hardware_init(dev); |
dev | 344 | drivers/net/znet.c | dev_tint(dev); |
dev | 353 | drivers/net/znet.c | hardware_init(dev); |
dev | 357 | drivers/net/znet.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 358 | drivers/net/znet.c | printk(KERN_WARNING "%s: Transmitter access conflict.\n", dev->name); |
dev | 396 | drivers/net/znet.c | dev->trans_start = jiffies; |
dev | 398 | drivers/net/znet.c | printk(KERN_DEBUG "%s: Transmitter queued, length %d.\n", dev->name, length); |
dev | 407 | drivers/net/znet.c | struct device *dev = irq2dev_map[irq]; |
dev | 411 | drivers/net/znet.c | if (dev == NULL) { |
dev | 416 | drivers/net/znet.c | dev->interrupt = 1; |
dev | 417 | drivers/net/znet.c | ioaddr = dev->base_addr; |
dev | 431 | drivers/net/znet.c | dev->name, status, result, rx_ptr, running, boguscnt); |
dev | 437 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 454 | drivers/net/znet.c | dev->tbusy = 0; |
dev | 460 | drivers/net/znet.c | znet_rx(dev); |
dev | 466 | drivers/net/znet.c | dev->interrupt = 0; |
dev | 470 | drivers/net/znet.c | static void znet_rx(struct device *dev) |
dev | 472 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 473 | drivers/net/znet.c | int ioaddr = dev->base_addr; |
dev | 484 | drivers/net/znet.c | dev->name, cur_frame_end_offset); |
dev | 554 | drivers/net/znet.c | printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 558 | drivers/net/znet.c | skb->dev = dev; |
dev | 573 | drivers/net/znet.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 594 | drivers/net/znet.c | static int znet_close(struct device *dev) |
dev | 596 | drivers/net/znet.c | int ioaddr = dev->base_addr; |
dev | 598 | drivers/net/znet.c | dev->tbusy = 1; |
dev | 599 | drivers/net/znet.c | dev->start = 0; |
dev | 606 | drivers/net/znet.c | free_irq(dev->irq, NULL); |
dev | 609 | drivers/net/znet.c | printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); |
dev | 619 | drivers/net/znet.c | static struct enet_statistics *net_get_stats(struct device *dev) |
dev | 621 | drivers/net/znet.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 634 | drivers/net/znet.c | static void set_multicast_list(struct device *dev) |
dev | 636 | drivers/net/znet.c | short ioaddr = dev->base_addr; |
dev | 638 | drivers/net/znet.c | if (dev->flags&IFF_PROMISC) { |
dev | 642 | drivers/net/znet.c | } else if (dev->mc_list || (dev->flags&IFF_ALLMULTI)) { |
dev | 675 | drivers/net/znet.c | static void hardware_init(struct device *dev) |
dev | 677 | drivers/net/znet.c | short ioaddr = dev->base_addr; |
dev | 702 | drivers/net/znet.c | printk(KERN_DEBUG "%s: Initializing the i82593, tx buf %p... ", dev->name, |
dev | 716 | drivers/net/znet.c | memcpy(zn.tx_cur, dev->dev_addr, 6); |
dev | 725 | drivers/net/znet.c | dev->tbusy = 0; |
dev | 305 | drivers/pci/pci.c | struct pci_dev_info *pci_lookup_dev(unsigned int vendor, unsigned int dev) |
dev | 317 | drivers/pci/pci.c | order = dev_info[i].device - (long) dev; |
dev | 558 | drivers/pci/pci.c | static int sprint_dev_config(struct pci_dev *dev, char *buf, int size) |
dev | 567 | drivers/pci/pci.c | bus = dev->bus->number; |
dev | 568 | drivers/pci/pci.c | devfn = dev->devfn; |
dev | 626 | drivers/pci/pci.c | if (dev->irq) { |
dev | 630 | drivers/pci/pci.c | len += sprintf(buf + len, "IRQ %d. ", dev->irq); |
dev | 633 | drivers/pci/pci.c | if (dev->master) { |
dev | 702 | drivers/pci/pci.c | struct pci_dev *dev; |
dev | 709 | drivers/pci/pci.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 710 | drivers/pci/pci.c | nprinted = sprint_dev_config(dev, buf + len, size - len); |
dev | 743 | drivers/pci/pci.c | struct pci_dev *dev; |
dev | 768 | drivers/pci/pci.c | dev = pci_malloc(sizeof(*dev), mem_startp); |
dev | 769 | drivers/pci/pci.c | dev->bus = bus; |
dev | 775 | drivers/pci/pci.c | dev->next = pci_devices; |
dev | 776 | drivers/pci/pci.c | pci_devices = dev; |
dev | 778 | drivers/pci/pci.c | dev->devfn = devfn; |
dev | 779 | drivers/pci/pci.c | dev->vendor = l & 0xffff; |
dev | 780 | drivers/pci/pci.c | dev->device = (l >> 16) & 0xffff; |
dev | 787 | drivers/pci/pci.c | info = pci_lookup_dev(dev->vendor, dev->device); |
dev | 790 | drivers/pci/pci.c | dev->vendor, dev->device); |
dev | 806 | drivers/pci/pci.c | dev->master = ((tmp & PCI_COMMAND_MASTER) != 0); |
dev | 812 | drivers/pci/pci.c | PCI_INTERRUPT_LINE, &dev->irq); |
dev | 818 | drivers/pci/pci.c | dev->class = l; |
dev | 823 | drivers/pci/pci.c | dev->sibling = bus->devices; |
dev | 824 | drivers/pci/pci.c | bus->devices = dev; |
dev | 826 | drivers/pci/pci.c | if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI) { |
dev | 836 | drivers/pci/pci.c | child->self = dev; |
dev | 3183 | drivers/scsi/53c7,8xx.c | int dev; |
dev | 3185 | drivers/scsi/53c7,8xx.c | for (dev = MINOR(inode->rdev), host = first_host; |
dev | 3186 | drivers/scsi/53c7,8xx.c | (host->hostt == the_template); --dev, host = host->next) |
dev | 3187 | drivers/scsi/53c7,8xx.c | if (!dev) return host; |
dev | 288 | drivers/scsi/AM53C974.h | int AM53C974_biosparm(Disk *disk, int dev, int *info_array); |
dev | 748 | drivers/scsi/NCR53c406a.c | NCR53c406a_biosparm(Scsi_Disk *disk, kdev_t dev, int* info_array){ |
dev | 1206 | drivers/scsi/aha152x.c | int aha152x_biosparam(Scsi_Disk * disk, kdev_t dev, int *info_array) |
dev | 1212 | drivers/scsi/aha152x.c | printk("aha152x_biosparam: dev=%s, size=%d, ", kdevname(dev), size); |
dev | 1295 | drivers/scsi/aha1542.c | int aha1542_biosparam(Scsi_Disk * disk, kdev_t dev, int * ip) |
dev | 508 | drivers/scsi/aha1740.c | int aha1740_biosparam(Disk * disk, kdev_t dev, int* ip) |
dev | 4584 | drivers/scsi/aic7xxx.c | aic7xxx_biosparam(Disk *disk, kdev_t dev, int geom[]) |
dev | 1866 | drivers/scsi/fdomain.c | int fdomain_16x0_biosparam( Scsi_Disk *disk, kdev_t dev, int *info_array ) |
dev | 1924 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
dev | 278 | drivers/scsi/g_NCR5380.c | int generic_NCR5380_biosparam(Disk * disk, kdev_t dev, int *ip) |
dev | 695 | drivers/scsi/in2000.c | int in2000_biosparam(Disk * disk, kdev_t dev, int* iinfo) |
dev | 459 | drivers/scsi/pas16.c | int pas16_biosparam(Disk * disk, kdev_t dev, int * ip) |
dev | 632 | drivers/scsi/qlogic.c | int qlogic_biosparam(Disk * disk, kdev_t dev, int ip[]) |
dev | 80 | drivers/scsi/scsi.c | static int scan_scsis_single (int channel,int dev,int lun,int * max_scsi_dev , |
dev | 392 | drivers/scsi/scsi.c | int dev, lun, channel; |
dev | 426 | drivers/scsi/scsi.c | dev = hid; |
dev | 427 | drivers/scsi/scsi.c | if(dev >= shpnt->max_id) goto leave; |
dev | 430 | drivers/scsi/scsi.c | scan_scsis_single (channel, dev, lun, &max_dev_lun, |
dev | 454 | drivers/scsi/scsi.c | for (dev = 0; dev < shpnt->max_id; ++dev) { |
dev | 455 | drivers/scsi/scsi.c | if (shpnt->this_id != dev) { |
dev | 465 | drivers/scsi/scsi.c | if (!scan_scsis_single (channel, dev, lun, &max_dev_lun, |
dev | 508 | drivers/scsi/scsi.c | int scan_scsis_single (int channel, int dev, int lun, int *max_dev_lun, |
dev | 524 | drivers/scsi/scsi.c | SDpnt->id = dev; |
dev | 560 | drivers/scsi/scsi.c | dev, lun, SCpnt->result); |
dev | 969 | drivers/scsi/scsi.c | kdev_t dev; |
dev | 987 | drivers/scsi/scsi.c | dev = req->rq_dev; |
dev | 989 | drivers/scsi/scsi.c | dev = 0; /* unused */ |
dev | 1036 | drivers/scsi/scsi.c | if (req && (req->rq_status == RQ_INACTIVE || req->rq_dev != dev)) { |
dev | 588 | drivers/scsi/scsi_debug.c | int scsi_debug_biosparam(Disk * disk, kdev_t dev, int* info){ |
dev | 104 | drivers/scsi/scsi_ioctl.c | static int ioctl_internal_command(Scsi_Device *dev, char * cmd) |
dev | 109 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
dev | 122 | drivers/scsi/scsi_ioctl.c | if(cmd[0] == ALLOW_MEDIUM_REMOVAL) dev->lockable = 0; |
dev | 126 | drivers/scsi/scsi_ioctl.c | if(dev->removable){ |
dev | 131 | drivers/scsi/scsi_ioctl.c | if (dev->removable){ |
dev | 132 | drivers/scsi/scsi_ioctl.c | dev->changed = 1; |
dev | 139 | drivers/scsi/scsi_ioctl.c | dev->host->host_no, |
dev | 140 | drivers/scsi/scsi_ioctl.c | dev->id, |
dev | 141 | drivers/scsi/scsi_ioctl.c | dev->lun, |
dev | 161 | drivers/scsi/scsi_ioctl.c | static int ioctl_command(Scsi_Device *dev, void *buffer) |
dev | 236 | drivers/scsi/scsi_ioctl.c | cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5); |
dev | 240 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev, 1); |
dev | 280 | drivers/scsi/scsi_ioctl.c | printk("scsi_ioctl : device %d. command = ", dev->id); |
dev | 300 | drivers/scsi/scsi_ioctl.c | int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) |
dev | 306 | drivers/scsi/scsi_ioctl.c | if (!dev) return -ENXIO; |
dev | 313 | drivers/scsi/scsi_ioctl.c | put_user(dev->id |
dev | 314 | drivers/scsi/scsi_ioctl.c | + (dev->lun << 8) |
dev | 315 | drivers/scsi/scsi_ioctl.c | + (dev->channel << 16) |
dev | 316 | drivers/scsi/scsi_ioctl.c | + ((dev->host->hostt->proc_dir->low_ino & 0xff) << 24), |
dev | 318 | drivers/scsi/scsi_ioctl.c | put_user( dev->host->unique_id, (unsigned long *) arg+1); |
dev | 322 | drivers/scsi/scsi_ioctl.c | if(!dev->tagged_supported) return -EINVAL; |
dev | 323 | drivers/scsi/scsi_ioctl.c | dev->tagged_queue = 1; |
dev | 324 | drivers/scsi/scsi_ioctl.c | dev->current_tag = 1; |
dev | 328 | drivers/scsi/scsi_ioctl.c | if(!dev->tagged_supported) return -EINVAL; |
dev | 329 | drivers/scsi/scsi_ioctl.c | dev->tagged_queue = 0; |
dev | 330 | drivers/scsi/scsi_ioctl.c | dev->current_tag = 0; |
dev | 333 | drivers/scsi/scsi_ioctl.c | return ioctl_probe(dev->host, arg); |
dev | 336 | drivers/scsi/scsi_ioctl.c | return ioctl_command((Scsi_Device *) dev, arg); |
dev | 338 | drivers/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 340 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 343 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 346 | drivers/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 348 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 351 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 354 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 357 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 370 | drivers/scsi/scsi_ioctl.c | int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) { |
dev | 375 | drivers/scsi/scsi_ioctl.c | tmp = scsi_ioctl (dev, cmd, arg); |
dev | 16 | drivers/scsi/scsi_ioctl.h | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 17 | drivers/scsi/scsi_ioctl.h | extern int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 34 | drivers/scsi/scsi_syms.c | int dev, int *ip ); |
dev | 46 | drivers/scsi/scsicam.c | kdev_t dev, /* Device major, minor */ |
dev | 53 | drivers/scsi/scsicam.c | if (!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024))) |
dev | 508 | drivers/scsi/sd.c | int dev, devm, block, this_count; |
dev | 523 | drivers/scsi/sd.c | dev = DEVICE_NR(SCpnt->request.rq_dev); |
dev | 533 | drivers/scsi/sd.c | !rscsi_disks[dev].device || |
dev | 542 | drivers/scsi/sd.c | if (rscsi_disks[dev].device->changed) |
dev | 555 | drivers/scsi/sd.c | 'a' + devm, dev, block); |
dev | 569 | drivers/scsi/sd.c | if (rscsi_disks[dev].sector_size == 1024) |
dev | 579 | drivers/scsi/sd.c | if (!rscsi_disks[dev].device->writeable) |
dev | 659 | drivers/scsi/sd.c | this_count_max = (rscsi_disks[dev].ten ? 0xffff : 0xff); |
dev | 843 | drivers/scsi/sd.c | if (rscsi_disks[dev].sector_size == 1024){ |
dev | 850 | drivers/scsi/sd.c | if (rscsi_disks[dev].sector_size == 256){ |
dev | 855 | drivers/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
dev | 887 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
dev | 890 | drivers/scsi/sd.c | this_count * rscsi_disks[dev].sector_size, |
dev | 1377 | drivers/scsi/sd.c | int revalidate_scsidisk(kdev_t dev, int maxusage){ |
dev | 1385 | drivers/scsi/sd.c | target = DEVICE_NR(dev); |
dev | 1427 | drivers/scsi/sd.c | static int fop_revalidate_scsidisk(kdev_t dev){ |
dev | 1428 | drivers/scsi/sd.c | return revalidate_scsidisk(dev, 0); |
dev | 43 | drivers/scsi/sd.h | extern int revalidate_scsidisk(kdev_t dev, int maxusage); |
dev | 25 | drivers/scsi/sd_ioctl.c | kdev_t dev = inode->i_rdev; |
dev | 37 | drivers/scsi/sd_ioctl.c | host = rscsi_disks[MINOR(dev) >> 4].device->host; |
dev | 43 | drivers/scsi/sd_ioctl.c | diskinfo[2] = rscsi_disks[MINOR(dev) >> 4].capacity >> 11; |
dev | 48 | drivers/scsi/sd_ioctl.c | scsicam_bios_param(&rscsi_disks[MINOR(dev) >> 4], |
dev | 49 | drivers/scsi/sd_ioctl.c | dev, &diskinfo[0]); |
dev | 52 | drivers/scsi/sd_ioctl.c | host->hostt->bios_param(&rscsi_disks[MINOR(dev) >> 4], |
dev | 53 | drivers/scsi/sd_ioctl.c | dev, |
dev | 96 | drivers/scsi/sd_ioctl.c | return revalidate_scsidisk(dev, 1); |
dev | 98 | drivers/scsi/sd_ioctl.c | return scsi_ioctl(rscsi_disks[MINOR(dev) >> 4].device , cmd, (void *) arg); |
dev | 1637 | drivers/scsi/seagate.c | int seagate_st0x_biosparam(Disk * disk, kdev_t dev, int* ip) { |
dev | 70 | drivers/scsi/sg.c | int dev = MINOR(inode->i_rdev); |
dev | 71 | drivers/scsi/sg.c | if ((dev<0) || (dev>=sg_template.dev_max)) |
dev | 79 | drivers/scsi/sg.c | scsi_generics[dev].timeout=get_user((int *) arg); |
dev | 82 | drivers/scsi/sg.c | return scsi_generics[dev].timeout; |
dev | 84 | drivers/scsi/sg.c | return scsi_ioctl(scsi_generics[dev].device, cmd_in, (void *) arg); |
dev | 90 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 92 | drivers/scsi/sg.c | if (dev>=sg_template.dev_max || !scsi_generics[dev].device) |
dev | 103 | drivers/scsi/sg.c | while(scsi_generics[dev].users) |
dev | 107 | drivers/scsi/sg.c | interruptible_sleep_on(&scsi_generics[dev].generic_wait); |
dev | 111 | drivers/scsi/sg.c | scsi_generics[dev].exclude=1; |
dev | 118 | drivers/scsi/sg.c | while(scsi_generics[dev].exclude) |
dev | 122 | drivers/scsi/sg.c | interruptible_sleep_on(&scsi_generics[dev].generic_wait); |
dev | 132 | drivers/scsi/sg.c | if (!scsi_generics[dev].users |
dev | 133 | drivers/scsi/sg.c | && scsi_generics[dev].pending |
dev | 134 | drivers/scsi/sg.c | && scsi_generics[dev].complete) |
dev | 136 | drivers/scsi/sg.c | if (scsi_generics[dev].buff != NULL) |
dev | 137 | drivers/scsi/sg.c | sg_free(scsi_generics[dev].buff,scsi_generics[dev].buff_len); |
dev | 138 | drivers/scsi/sg.c | scsi_generics[dev].buff=NULL; |
dev | 139 | drivers/scsi/sg.c | scsi_generics[dev].pending=0; |
dev | 141 | drivers/scsi/sg.c | if (!scsi_generics[dev].users) |
dev | 142 | drivers/scsi/sg.c | scsi_generics[dev].timeout=SG_DEFAULT_TIMEOUT; |
dev | 143 | drivers/scsi/sg.c | if (scsi_generics[dev].device->host->hostt->usage_count) |
dev | 144 | drivers/scsi/sg.c | (*scsi_generics[dev].device->host->hostt->usage_count)++; |
dev | 146 | drivers/scsi/sg.c | scsi_generics[dev].users++; |
dev | 152 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 153 | drivers/scsi/sg.c | scsi_generics[dev].users--; |
dev | 154 | drivers/scsi/sg.c | if (scsi_generics[dev].device->host->hostt->usage_count) |
dev | 155 | drivers/scsi/sg.c | (*scsi_generics[dev].device->host->hostt->usage_count)--; |
dev | 157 | drivers/scsi/sg.c | scsi_generics[dev].exclude=0; |
dev | 158 | drivers/scsi/sg.c | wake_up(&scsi_generics[dev].generic_wait); |
dev | 201 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 204 | drivers/scsi/sg.c | struct scsi_generic *device=&scsi_generics[dev]; |
dev | 265 | drivers/scsi/sg.c | int dev = MINOR(SCpnt->request.rq_dev); |
dev | 266 | drivers/scsi/sg.c | struct scsi_generic *device = &scsi_generics[dev]; |
dev | 269 | drivers/scsi/sg.c | printk("unexpected done for sg %d\n",dev); |
dev | 292 | drivers/scsi/sg.c | wake_up(&scsi_generics[dev].read_wait); |
dev | 300 | drivers/scsi/sg.c | int dev = MINOR(devt); |
dev | 301 | drivers/scsi/sg.c | struct scsi_generic * device=&scsi_generics[dev]; |
dev | 461 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 463 | drivers/scsi/sg.c | struct scsi_generic *device=&scsi_generics[dev]; |
dev | 470 | drivers/scsi/sg.c | select_wait(&scsi_generics[dev].read_wait, wait); |
dev | 479 | drivers/scsi/sg.c | select_wait(&scsi_generics[dev].write_wait, wait); |
dev | 642 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
dev | 654 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.rq_dev); |
dev | 659 | drivers/scsi/sr.c | if (dev >= sr_template.nr_dev) { |
dev | 666 | drivers/scsi/sr.c | if (!scsi_CDs[dev].use) { |
dev | 673 | drivers/scsi/sr.c | if (scsi_CDs[dev].device->changed) { |
dev | 727 | drivers/scsi/sr.c | this_count_max = (scsi_CDs[dev].ten ? 0xffff : 0xff) << 4; |
dev | 855 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 2048) |
dev | 862 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 512) realcount = realcount << 2; |
dev | 864 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
dev | 869 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 886 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 917 | drivers/scsi/sr.c | SCpnt->transfersize = (scsi_CDs[dev].sector_size > 1024) ? |
dev | 918 | drivers/scsi/sr.c | 1024 : scsi_CDs[dev].sector_size; |
dev | 922 | drivers/scsi/sr.c | realcount * scsi_CDs[dev].sector_size, |
dev | 91 | drivers/scsi/sr_ioctl.c | kdev_t dev = inode->i_rdev; |
dev | 94 | drivers/scsi/sr_ioctl.c | target = MINOR(dev); |
dev | 466 | drivers/scsi/sr_ioctl.c | RO_IOCTLS(dev,arg); |
dev | 111 | drivers/scsi/st.c | int dev = TAPE_NR(SCpnt->request.rq_dev); |
dev | 123 | drivers/scsi/st.c | dev, result, |
dev | 145 | drivers/scsi/st.c | printk(KERN_WARNING "st%d: Error with sense data: ", dev); |
dev | 149 | drivers/scsi/st.c | printk(KERN_WARNING "st%d: Error %x.\n", dev, result); |
dev | 160 | drivers/scsi/st.c | scsi_tapes[dev].recover_count++; |
dev | 161 | drivers/scsi/st.c | scsi_tapes[dev].mt_status->mt_erreg += (1 << MT_ST_SOFTERR_SHIFT); |
dev | 170 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Recovered %s error (%d).\n", dev, stp, |
dev | 171 | drivers/scsi/st.c | scsi_tapes[dev].recover_count); |
dev | 402 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 404 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 460 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 462 | drivers/scsi/st.c | if (dev >= st_template.dev_max || !scsi_tapes[dev].device) |
dev | 464 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 467 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Device already in use.\n", dev); |
dev | 480 | drivers/scsi/st.c | printk(KERN_WARNING "st%d: No free buffers.\n", dev); |
dev | 528 | drivers/scsi/st.c | printk(KERN_NOTICE "st%d: No tape.\n", dev); |
dev | 541 | drivers/scsi/st.c | if (scsi_tapes[dev].device->host->hostt->usage_count) |
dev | 542 | drivers/scsi/st.c | (*scsi_tapes[dev].device->host->hostt->usage_count)++; |
dev | 559 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Block limits %d - %d bytes.\n", dev, STp->min_block, |
dev | 567 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Can't read block limits.\n", dev); |
dev | 580 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: No Mode Sense.\n", dev); |
dev | 591 | drivers/scsi/st.c | dev, |
dev | 604 | drivers/scsi/st.c | dev, STp->density, (STp->buffer)->b_data[5] * 65536 + |
dev | 612 | drivers/scsi/st.c | printk(KERN_NOTICE "st%d: Blocksize %d too large for buffer.\n", dev, |
dev | 630 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Block size: %d, buffer size: %d (%d blocks).\n", dev, |
dev | 639 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Write protected\n", dev); |
dev | 649 | drivers/scsi/st.c | if (scsi_tapes[dev].device->host->hostt->usage_count) |
dev | 650 | drivers/scsi/st.c | (*scsi_tapes[dev].device->host->hostt->usage_count)++; |
dev | 666 | drivers/scsi/st.c | int dev; |
dev | 668 | drivers/scsi/st.c | dev = TAPE_NR(devt); |
dev | 669 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 678 | drivers/scsi/st.c | dev, (long)(filp->f_pos)); |
dev | 680 | drivers/scsi/st.c | dev, STp->nbr_waits, STp->nbr_finished); |
dev | 697 | drivers/scsi/st.c | printk(KERN_ERR "st%d: Error on write filemark.\n", dev); |
dev | 710 | drivers/scsi/st.c | dev, cmd[4]); |
dev | 734 | drivers/scsi/st.c | if (scsi_tapes[dev].device->host->hostt->usage_count) |
dev | 735 | drivers/scsi/st.c | (*scsi_tapes[dev].device->host->hostt->usage_count)--; |
dev | 753 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 755 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 768 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Incorrect device.\n", dev); |
dev | 800 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Async write error (write) %x.\n", dev, |
dev | 870 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Error on write:\n", dev); |
dev | 899 | drivers/scsi/st.c | dev, transfer); |
dev | 908 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: EOM with lost data.\n", dev); |
dev | 1005 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 1007 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1012 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Incorrect device.\n", dev); |
dev | 1041 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: EOF flag up. Bytes %d\n", dev, |
dev | 1089 | drivers/scsi/st.c | dev, |
dev | 1116 | drivers/scsi/st.c | printk(KERN_NOTICE "st%d: Incorrect block size.\n", dev); |
dev | 1130 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: EOM detected (%d bytes read).\n", dev, |
dev | 1145 | drivers/scsi/st.c | dev, (STp->buffer)->buffer_bytes, total); |
dev | 1152 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Tape error while reading.\n", dev); |
dev | 1164 | drivers/scsi/st.c | dev); |
dev | 1195 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: EOF up. Left %d, needed %d.\n", dev, |
dev | 1244 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 1246 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1258 | drivers/scsi/st.c | dev, STp->do_buffer_writes, STp->do_async_writes, STp->do_read_ahead); |
dev | 1261 | drivers/scsi/st.c | dev, STp->two_fm, STp->fast_mteom, STp->do_auto_lock, debugging); |
dev | 1273 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Write threshold set to %d bytes.\n", dev, |
dev | 1296 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 1298 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1318 | drivers/scsi/st.c | dev, cmd[2] * 65536 + cmd[3] * 256 + cmd[4]); |
dev | 1339 | drivers/scsi/st.c | dev, (-ltmp)); |
dev | 1355 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Spacing tape forward %d blocks.\n", dev, |
dev | 1374 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Spacing tape backward %ld blocks.\n", dev, (-ltmp)); |
dev | 1389 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Spacing tape forward %d setmarks.\n", dev, |
dev | 1410 | drivers/scsi/st.c | dev, (-ltmp)); |
dev | 1432 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Writing %d filemarks.\n", dev, |
dev | 1435 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Writing %d setmarks.\n", dev, |
dev | 1452 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Rewinding tape.\n", dev); |
dev | 1470 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Unloading tape.\n", dev); |
dev | 1477 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: No op on tape.\n", dev); |
dev | 1490 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Retensioning tape.\n", dev); |
dev | 1512 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Spacing to end of recorded medium.\n", dev); |
dev | 1530 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Erasing tape.\n", dev); |
dev | 1539 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Locking drive door.\n", dev); |
dev | 1547 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Unlocking drive door.\n", dev); |
dev | 1572 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Seeking tape to block %ld.\n", dev, arg); |
dev | 1586 | drivers/scsi/st.c | printk(KERN_WARNING "st%d: Illegal block size.\n", dev); |
dev | 1614 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Setting block size to %d bytes.\n", dev, |
dev | 1619 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Setting density code to %x.\n", dev, |
dev | 1622 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Setting drive buffer code to %d.\n", dev, |
dev | 1760 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
dev | 1762 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1765 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Incorrect device.\n", dev); |
dev | 1829 | drivers/scsi/st.c | dev); |
dev | 1911 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: get tape position.\n", dev); |
dev | 1941 | drivers/scsi/st.c | printk(ST_DEB_MSG "st%d: Can't read tape position.\n", dev); |
dev | 300 | drivers/scsi/t128.c | int t128_biosparam(Disk * disk, kdev_t dev, int * ip) |
dev | 831 | drivers/scsi/u14-34f.c | int u14_34f_biosparam(Disk * disk, kdev_t dev, int * dkinfo) { |
dev | 1013 | drivers/scsi/ultrastor.c | int ultrastor_biosparam(Disk * disk, kdev_t dev, int * dkinfo) |
dev | 1222 | drivers/scsi/wd7000.c | int wd7000_biosparam(Disk * disk, kdev_t dev, int* ip) |
dev | 119 | drivers/sound/ad1848.c | static int ad1848_open (int dev, int mode); |
dev | 120 | drivers/sound/ad1848.c | static void ad1848_close (int dev); |
dev | 121 | drivers/sound/ad1848.c | static int ad1848_ioctl (int dev, unsigned int cmd, caddr_t arg, int local); |
dev | 122 | drivers/sound/ad1848.c | static void ad1848_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart); |
dev | 123 | drivers/sound/ad1848.c | static void ad1848_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart); |
dev | 124 | drivers/sound/ad1848.c | static int ad1848_prepare_for_IO (int dev, int bsize, int bcount); |
dev | 125 | drivers/sound/ad1848.c | static void ad1848_reset (int dev); |
dev | 126 | drivers/sound/ad1848.c | static void ad1848_halt (int dev); |
dev | 127 | drivers/sound/ad1848.c | static void ad1848_halt_input (int dev); |
dev | 128 | drivers/sound/ad1848.c | static void ad1848_halt_output (int dev); |
dev | 129 | drivers/sound/ad1848.c | static void ad1848_trigger (int dev, int bits); |
dev | 130 | drivers/sound/ad1848.c | static int ad1848_tmr_install (int dev); |
dev | 131 | drivers/sound/ad1848.c | static void ad1848_tmr_reprogram (int dev); |
dev | 328 | drivers/sound/ad1848.c | change_bits (unsigned char *regval, int dev, int chn, int newval) |
dev | 333 | drivers/sound/ad1848.c | if (mix_devices[dev][chn].polarity == 1) /* Reverse */ |
dev | 336 | drivers/sound/ad1848.c | mask = (1 << mix_devices[dev][chn].nbits) - 1; |
dev | 337 | drivers/sound/ad1848.c | shift = mix_devices[dev][chn].bitpos; |
dev | 345 | drivers/sound/ad1848.c | ad1848_mixer_get (ad1848_info * devc, int dev) |
dev | 347 | drivers/sound/ad1848.c | if (!((1 << dev) & devc->supported_devices)) |
dev | 350 | drivers/sound/ad1848.c | return devc->levels[dev]; |
dev | 354 | drivers/sound/ad1848.c | ad1848_mixer_set (ad1848_info * devc, int dev, int value) |
dev | 368 | drivers/sound/ad1848.c | if (mix_devices[dev][RIGHT_CHN].nbits == 0) /* Mono control */ |
dev | 381 | drivers/sound/ad1848.c | if (dev > 31) |
dev | 384 | drivers/sound/ad1848.c | if (!(devc->supported_devices & (1 << dev))) |
dev | 387 | drivers/sound/ad1848.c | if (mix_devices[dev][LEFT_CHN].nbits == 0) |
dev | 390 | drivers/sound/ad1848.c | devc->levels[dev] = retvol; |
dev | 396 | drivers/sound/ad1848.c | regoffs = mix_devices[dev][LEFT_CHN].regno; |
dev | 398 | drivers/sound/ad1848.c | change_bits (&val, dev, LEFT_CHN, left); |
dev | 406 | drivers/sound/ad1848.c | if (mix_devices[dev][RIGHT_CHN].nbits == 0) |
dev | 409 | drivers/sound/ad1848.c | regoffs = mix_devices[dev][RIGHT_CHN].regno; |
dev | 411 | drivers/sound/ad1848.c | change_bits (&val, dev, RIGHT_CHN, right); |
dev | 448 | drivers/sound/ad1848.c | ad1848_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg) |
dev | 452 | drivers/sound/ad1848.c | int codec_dev = mixer2codec[dev]; |
dev | 538 | drivers/sound/ad1848.c | ad1848_open (int dev, int mode) |
dev | 543 | drivers/sound/ad1848.c | if (dev < 0 || dev >= num_audiodevs) |
dev | 546 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 561 | drivers/sound/ad1848.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 569 | drivers/sound/ad1848.c | ad1848_trigger (dev, 0); |
dev | 580 | drivers/sound/ad1848.c | ad1848_close (int dev) |
dev | 583 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 591 | drivers/sound/ad1848.c | ad1848_reset (dev); |
dev | 769 | drivers/sound/ad1848.c | ad1848_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 771 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 816 | drivers/sound/ad1848.c | ad1848_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 819 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 836 | drivers/sound/ad1848.c | if (devc->irq_mode & PCM_ENABLE_OUTPUT && audio_devs[dev]->flags & DMA_AUTOMODE && |
dev | 853 | drivers/sound/ad1848.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 868 | drivers/sound/ad1848.c | ad1848_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 871 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 887 | drivers/sound/ad1848.c | if (devc->irq_mode & PCM_ENABLE_INPUT && audio_devs[dev]->flags & DMA_AUTOMODE && |
dev | 904 | drivers/sound/ad1848.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 928 | drivers/sound/ad1848.c | ad1848_prepare_for_IO (int dev, int bsize, int bcount) |
dev | 933 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 995 | drivers/sound/ad1848.c | if (dev == timer_installed && devc->timer_running) |
dev | 998 | drivers/sound/ad1848.c | ad1848_tmr_reprogram (dev); |
dev | 1005 | drivers/sound/ad1848.c | ad1848_reset (int dev) |
dev | 1007 | drivers/sound/ad1848.c | ad1848_halt (dev); |
dev | 1011 | drivers/sound/ad1848.c | ad1848_halt (int dev) |
dev | 1013 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1049 | drivers/sound/ad1848.c | ad1848_halt_input (int dev) |
dev | 1051 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1056 | drivers/sound/ad1848.c | ad1848_halt (dev); |
dev | 1076 | drivers/sound/ad1848.c | ad1848_halt_output (int dev) |
dev | 1078 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1083 | drivers/sound/ad1848.c | ad1848_halt (dev); |
dev | 1103 | drivers/sound/ad1848.c | ad1848_trigger (int dev, int state) |
dev | 1105 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1542 | drivers/sound/ad1848.c | int i, dev = 0; |
dev | 1549 | drivers/sound/ad1848.c | dev = devc->dev_no; |
dev | 1561 | drivers/sound/ad1848.c | sound_free_dma (audio_devs[dev]->dmachan1); |
dev | 1563 | drivers/sound/ad1848.c | if (audio_devs[dev]->dmachan2 != audio_devs[dev]->dmachan1) |
dev | 1564 | drivers/sound/ad1848.c | sound_free_dma (audio_devs[dev]->dmachan2); |
dev | 1577 | drivers/sound/ad1848.c | int dev; |
dev | 1582 | drivers/sound/ad1848.c | dev = -1; |
dev | 1585 | drivers/sound/ad1848.c | dev = irq2dev[irq]; |
dev | 1587 | drivers/sound/ad1848.c | if (dev < 0 || dev >= num_audiodevs) |
dev | 1599 | drivers/sound/ad1848.c | dev = irq2dev[irq]; |
dev | 1600 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1603 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1618 | drivers/sound/ad1848.c | DMAbuf_inputintr (dev); |
dev | 1624 | drivers/sound/ad1848.c | DMAbuf_outputintr (dev, 1); |
dev | 1631 | drivers/sound/ad1848.c | if (timer_installed == dev && devc->timer_running) |
dev | 1847 | drivers/sound/ad1848.c | ad1848_tmr_start (int dev, unsigned int usecs) |
dev | 1850 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1893 | drivers/sound/ad1848.c | ad1848_tmr_reprogram (int dev) |
dev | 1900 | drivers/sound/ad1848.c | ad1848_tmr_start (dev, current_interval); |
dev | 1905 | drivers/sound/ad1848.c | ad1848_tmr_disable (int dev) |
dev | 1908 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1918 | drivers/sound/ad1848.c | ad1848_tmr_restart (int dev) |
dev | 1921 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
dev | 1942 | drivers/sound/ad1848.c | ad1848_tmr_install (int dev) |
dev | 1948 | drivers/sound/ad1848.c | timer_installed = ad1848_tmr.dev = dev; |
dev | 1949 | drivers/sound/ad1848.c | sound_timer_init (&ad1848_tmr, audio_devs[dev]->name); |
dev | 54 | drivers/sound/audio.c | set_format (int dev, int fmt) |
dev | 59 | drivers/sound/audio.c | local_conversion[dev] = 0; |
dev | 61 | drivers/sound/audio.c | if (!(audio_devs[dev]->format_mask & fmt)) /* Not supported */ |
dev | 65 | drivers/sound/audio.c | local_conversion[dev] = AFMT_MU_LAW; |
dev | 70 | drivers/sound/audio.c | audio_format[dev] = DMAbuf_ioctl (dev, SNDCTL_DSP_SETFMT, (caddr_t) fmt, 1); |
dev | 73 | drivers/sound/audio.c | if (local_conversion[dev]) /* This shadows the HW format */ |
dev | 74 | drivers/sound/audio.c | return local_conversion[dev]; |
dev | 76 | drivers/sound/audio.c | return audio_format[dev]; |
dev | 80 | drivers/sound/audio.c | audio_open (int dev, struct fileinfo *file) |
dev | 84 | drivers/sound/audio.c | int dev_type = dev & 0x0f; |
dev | 87 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 94 | drivers/sound/audio.c | if ((ret = DMAbuf_open (dev, mode)) < 0) |
dev | 97 | drivers/sound/audio.c | if (audio_devs[dev]->coproc) |
dev | 98 | drivers/sound/audio.c | if ((ret = audio_devs[dev]->coproc-> |
dev | 99 | drivers/sound/audio.c | open (audio_devs[dev]->coproc->devc, COPR_PCM)) < 0) |
dev | 101 | drivers/sound/audio.c | audio_release (dev, file); |
dev | 107 | drivers/sound/audio.c | local_conversion[dev] = 0; |
dev | 109 | drivers/sound/audio.c | if (DMAbuf_ioctl (dev, SNDCTL_DSP_SETFMT, (caddr_t) bits, 1) != bits) |
dev | 111 | drivers/sound/audio.c | audio_release (dev, file); |
dev | 117 | drivers/sound/audio.c | set_format (dev, AFMT_MU_LAW); |
dev | 120 | drivers/sound/audio.c | set_format (dev, bits); |
dev | 122 | drivers/sound/audio.c | audio_mode[dev] = AM_NONE; |
dev | 123 | drivers/sound/audio.c | dev_nblock[dev] = 0; |
dev | 129 | drivers/sound/audio.c | sync_output (int dev) |
dev | 134 | drivers/sound/audio.c | if (DMAbuf_get_curr_buffer (dev, &buf_no, &dma_buf, &buf_ptr, &buf_size) >= 0) |
dev | 136 | drivers/sound/audio.c | DMAbuf_start_output (dev, buf_no, buf_ptr); |
dev | 141 | drivers/sound/audio.c | audio_release (int dev, struct fileinfo *file) |
dev | 145 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 148 | drivers/sound/audio.c | audio_devs[dev]->dmap_out->closing = 1; |
dev | 149 | drivers/sound/audio.c | audio_devs[dev]->dmap_in->closing = 1; |
dev | 151 | drivers/sound/audio.c | sync_output (dev); |
dev | 153 | drivers/sound/audio.c | if (audio_devs[dev]->coproc) |
dev | 154 | drivers/sound/audio.c | audio_devs[dev]->coproc->close (audio_devs[dev]->coproc->devc, COPR_PCM); |
dev | 155 | drivers/sound/audio.c | DMAbuf_release (dev, mode); |
dev | 190 | drivers/sound/audio.c | audio_write (int dev, struct fileinfo *file, const char *buf, int count) |
dev | 196 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 201 | drivers/sound/audio.c | if ((audio_mode[dev] & AM_READ) && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 205 | drivers/sound/audio.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 206 | drivers/sound/audio.c | audio_mode[dev] |= AM_WRITE; |
dev | 208 | drivers/sound/audio.c | audio_mode[dev] = AM_WRITE; |
dev | 212 | drivers/sound/audio.c | sync_output (dev); |
dev | 218 | drivers/sound/audio.c | if (DMAbuf_get_curr_buffer (dev, &buf_no, &dma_buf, &buf_ptr, &buf_size) < 0) |
dev | 220 | drivers/sound/audio.c | if ((buf_no = DMAbuf_getwrbuffer (dev, &dma_buf, |
dev | 222 | drivers/sound/audio.c | dev_nblock[dev])) < 0) |
dev | 225 | drivers/sound/audio.c | if (dev_nblock[dev] && buf_no == -EAGAIN) |
dev | 236 | drivers/sound/audio.c | if (!audio_devs[dev]->copy_from_user) |
dev | 243 | drivers/sound/audio.c | audio_devs[dev]->copy_from_user (dev, |
dev | 246 | drivers/sound/audio.c | if (local_conversion[dev] == AFMT_MU_LAW) |
dev | 261 | drivers/sound/audio.c | if ((err = DMAbuf_start_output (dev, buf_no, buf_ptr)) < 0) |
dev | 268 | drivers/sound/audio.c | DMAbuf_set_count (dev, buf_no, buf_ptr); |
dev | 276 | drivers/sound/audio.c | audio_read (int dev, struct fileinfo *file, char *buf, int count) |
dev | 282 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 286 | drivers/sound/audio.c | if ((audio_mode[dev] & AM_WRITE) && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 288 | drivers/sound/audio.c | sync_output (dev); |
dev | 291 | drivers/sound/audio.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 292 | drivers/sound/audio.c | audio_mode[dev] |= AM_READ; |
dev | 294 | drivers/sound/audio.c | audio_mode[dev] = AM_READ; |
dev | 298 | drivers/sound/audio.c | if ((buf_no = DMAbuf_getrdbuffer (dev, &dmabuf, &l, |
dev | 299 | drivers/sound/audio.c | dev_nblock[dev])) < 0) |
dev | 303 | drivers/sound/audio.c | if (dev_nblock[dev] && buf_no == -EAGAIN) |
dev | 316 | drivers/sound/audio.c | if (local_conversion[dev] == AFMT_MU_LAW) |
dev | 328 | drivers/sound/audio.c | DMAbuf_rmchars (dev, buf_no, l); |
dev | 338 | drivers/sound/audio.c | audio_ioctl (int dev, struct fileinfo *file, |
dev | 342 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 346 | drivers/sound/audio.c | if (audio_devs[dev]->coproc) /* Coprocessor ioctl */ |
dev | 347 | drivers/sound/audio.c | return audio_devs[dev]->coproc->ioctl (audio_devs[dev]->coproc->devc, cmd, arg, 0); |
dev | 349 | drivers/sound/audio.c | printk ("/dev/dsp%d: No coprocessor for this device\n", dev); |
dev | 357 | drivers/sound/audio.c | sync_output (dev); |
dev | 358 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 362 | drivers/sound/audio.c | sync_output (dev); |
dev | 367 | drivers/sound/audio.c | audio_mode[dev] = AM_NONE; |
dev | 368 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 372 | drivers/sound/audio.c | return snd_ioctl_return ((int *) arg, audio_devs[dev]->format_mask | AFMT_MU_LAW); |
dev | 376 | drivers/sound/audio.c | return snd_ioctl_return ((int *) arg, set_format (dev, get_fs_long ((long *) arg))); |
dev | 379 | drivers/sound/audio.c | if ((audio_mode[dev] & AM_WRITE) && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 385 | drivers/sound/audio.c | int err = DMAbuf_ioctl (dev, cmd, (caddr_t) & info, 1); |
dev | 395 | drivers/sound/audio.c | if ((audio_mode[dev] & AM_READ) && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 403 | drivers/sound/audio.c | int err = DMAbuf_ioctl (dev, cmd, (caddr_t) & info, 1); |
dev | 408 | drivers/sound/audio.c | if (DMAbuf_get_curr_buffer (dev, &buf_no, &dma_buf, &buf_ptr, &buf_size) >= 0) |
dev | 416 | drivers/sound/audio.c | dev_nblock[dev] = 1; |
dev | 424 | drivers/sound/audio.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 427 | drivers/sound/audio.c | if (audio_devs[dev]->coproc) |
dev | 430 | drivers/sound/audio.c | if (audio_devs[dev]->local_qlen) /* Device has hidden buffers */ |
dev | 433 | drivers/sound/audio.c | if (audio_devs[dev]->trigger) /* Supports SETTRIGGER */ |
dev | 444 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 458 | drivers/sound/audio.c | audio_select (int dev, struct fileinfo *file, int sel_type, select_table_handle * wait) |
dev | 463 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 468 | drivers/sound/audio.c | if (audio_mode[dev] & AM_WRITE && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 473 | drivers/sound/audio.c | return DMAbuf_select (dev, file, sel_type, wait); |
dev | 477 | drivers/sound/audio.c | if (audio_mode[dev] & AM_READ && !(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 482 | drivers/sound/audio.c | if (DMAbuf_get_curr_buffer (dev, &buf_no, &dma_buf, &buf_ptr, &buf_size) >= 0) |
dev | 487 | drivers/sound/audio.c | return DMAbuf_select (dev, file, sel_type, wait); |
dev | 64 | drivers/sound/dev_table.h | void (*setup)(void *dev); |
dev | 154 | drivers/sound/dev_table.h | int (*open) (int dev, int mode); |
dev | 155 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 156 | drivers/sound/dev_table.h | void (*output_block) (int dev, unsigned long buf, |
dev | 158 | drivers/sound/dev_table.h | void (*start_input) (int dev, unsigned long buf, |
dev | 160 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, caddr_t arg, int local); |
dev | 161 | drivers/sound/dev_table.h | int (*prepare_for_input) (int dev, int bufsize, int nbufs); |
dev | 162 | drivers/sound/dev_table.h | int (*prepare_for_output) (int dev, int bufsize, int nbufs); |
dev | 163 | drivers/sound/dev_table.h | void (*reset) (int dev); |
dev | 164 | drivers/sound/dev_table.h | void (*halt_xfer) (int dev); |
dev | 165 | drivers/sound/dev_table.h | int (*local_qlen)(int dev); |
dev | 166 | drivers/sound/dev_table.h | void (*copy_from_user)(int dev, char *localbuf, int localoffs, |
dev | 168 | drivers/sound/dev_table.h | void (*halt_input) (int dev); |
dev | 169 | drivers/sound/dev_table.h | void (*halt_output) (int dev); |
dev | 170 | drivers/sound/dev_table.h | void (*trigger) (int dev, int bits); |
dev | 183 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, caddr_t arg); |
dev | 192 | drivers/sound/dev_table.h | int (*open) (int dev, int mode); |
dev | 193 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 194 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, caddr_t arg); |
dev | 195 | drivers/sound/dev_table.h | int (*kill_note) (int dev, int voice, int note, int velocity); |
dev | 196 | drivers/sound/dev_table.h | int (*start_note) (int dev, int voice, int note, int velocity); |
dev | 197 | drivers/sound/dev_table.h | int (*set_instr) (int dev, int voice, int instr); |
dev | 198 | drivers/sound/dev_table.h | void (*reset) (int dev); |
dev | 199 | drivers/sound/dev_table.h | void (*hw_control) (int dev, unsigned char *event); |
dev | 200 | drivers/sound/dev_table.h | int (*load_patch) (int dev, int format, const char *addr, |
dev | 202 | drivers/sound/dev_table.h | void (*aftertouch) (int dev, int voice, int pressure); |
dev | 203 | drivers/sound/dev_table.h | void (*controller) (int dev, int voice, int ctrl_num, int value); |
dev | 204 | drivers/sound/dev_table.h | void (*panning) (int dev, int voice, int value); |
dev | 205 | drivers/sound/dev_table.h | void (*volume_method) (int dev, int mode); |
dev | 206 | drivers/sound/dev_table.h | int (*pmgr_interface) (int dev, struct patmgr_info *info); |
dev | 207 | drivers/sound/dev_table.h | void (*bender) (int dev, int chn, int value); |
dev | 208 | drivers/sound/dev_table.h | int (*alloc_voice) (int dev, int chn, int note, struct voice_alloc_info *alloc); |
dev | 209 | drivers/sound/dev_table.h | void (*setup_voice) (int dev, int voice, int chn); |
dev | 210 | drivers/sound/dev_table.h | int (*send_sysex)(int dev, unsigned char *bytes, int len); |
dev | 233 | drivers/sound/dev_table.h | int (*open) (int dev, int mode, |
dev | 234 | drivers/sound/dev_table.h | void (*inputintr)(int dev, unsigned char data), |
dev | 235 | drivers/sound/dev_table.h | void (*outputintr)(int dev) |
dev | 237 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 238 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, caddr_t arg); |
dev | 239 | drivers/sound/dev_table.h | int (*putc) (int dev, unsigned char data); |
dev | 240 | drivers/sound/dev_table.h | int (*start_read) (int dev); |
dev | 241 | drivers/sound/dev_table.h | int (*end_read) (int dev); |
dev | 242 | drivers/sound/dev_table.h | void (*kick)(int dev); |
dev | 243 | drivers/sound/dev_table.h | int (*command) (int dev, unsigned char *data); |
dev | 244 | drivers/sound/dev_table.h | int (*buffer_status) (int dev); |
dev | 245 | drivers/sound/dev_table.h | int (*prefix_cmd) (int dev, unsigned char status); |
dev | 250 | drivers/sound/dev_table.h | int dev; |
dev | 251 | drivers/sound/dev_table.h | unsigned int (*tmr_start)(int dev, unsigned int usecs); |
dev | 252 | drivers/sound/dev_table.h | void (*tmr_disable)(int dev); |
dev | 253 | drivers/sound/dev_table.h | void (*tmr_restart)(int dev); |
dev | 260 | drivers/sound/dev_table.h | int (*open)(int dev, int mode); |
dev | 261 | drivers/sound/dev_table.h | void (*close)(int dev); |
dev | 262 | drivers/sound/dev_table.h | int (*event)(int dev, unsigned char *ev); |
dev | 263 | drivers/sound/dev_table.h | unsigned long (*get_time)(int dev); |
dev | 264 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, caddr_t arg); |
dev | 265 | drivers/sound/dev_table.h | void (*arm_timer)(int dev, long time); |
dev | 519 | drivers/sound/dev_table.h | int sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan); |
dev | 520 | drivers/sound/dev_table.h | void sound_free_dmap (int dev, struct dma_buffparms *dmap); |
dev | 521 | drivers/sound/dev_table.h | extern int soud_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info); |
dev | 526 | drivers/sound/dev_table.h | int sound_start_dma ( int dev, struct dma_buffparms *dmap, int chan, |
dev | 529 | drivers/sound/dev_table.h | void sound_dma_intr (int dev, struct dma_buffparms *dmap, int chan); |
dev | 58 | drivers/sound/dmabuf.c | static int space_in_queue (int dev); |
dev | 60 | drivers/sound/dmabuf.c | static void dma_reset_output (int dev); |
dev | 61 | drivers/sound/dmabuf.c | static void dma_reset_input (int dev); |
dev | 64 | drivers/sound/dmabuf.c | reorganize_buffers (int dev, struct dma_buffparms *dmap, int recording) |
dev | 70 | drivers/sound/dmabuf.c | struct audio_operations *dsp_dev = audio_devs[dev]; |
dev | 78 | drivers/sound/dmabuf.c | sr = dsp_dev->ioctl (dev, SOUND_PCM_READ_RATE, 0, 1); |
dev | 79 | drivers/sound/dmabuf.c | nc = dsp_dev->ioctl (dev, SOUND_PCM_READ_CHANNELS, 0, 1); |
dev | 80 | drivers/sound/dmabuf.c | sz = dsp_dev->ioctl (dev, SOUND_PCM_READ_BITS, 0, 1); |
dev | 90 | drivers/sound/dmabuf.c | dev, sr, nc, sz); |
dev | 141 | drivers/sound/dmabuf.c | if (dmap->fragment_size > (audio_devs[dev]->buffsize / 2)) |
dev | 142 | drivers/sound/dmabuf.c | dmap->fragment_size = (audio_devs[dev]->buffsize / 2); |
dev | 172 | drivers/sound/dmabuf.c | dma_init_buffers (int dev, struct dma_buffparms *dmap) |
dev | 174 | drivers/sound/dmabuf.c | if (dmap == audio_devs[dev]->dmap_out) |
dev | 176 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_NONE; |
dev | 180 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_NONE; |
dev | 186 | drivers/sound/dmabuf.c | dmap->bytes_in_use = audio_devs[dev]->buffsize; |
dev | 196 | drivers/sound/dmabuf.c | open_dmap (int dev, int mode, struct dma_buffparms *dmap, int chan) |
dev | 204 | drivers/sound/dmabuf.c | if ((err = sound_alloc_dmap (dev, dmap, chan)) < 0) |
dev | 211 | drivers/sound/dmabuf.c | if (sound_open_dma (chan, audio_devs[dev]->name)) |
dev | 223 | drivers/sound/dmabuf.c | dma_init_buffers (dev, dmap); |
dev | 229 | drivers/sound/dmabuf.c | close_dmap (int dev, struct dma_buffparms *dmap, int chan) |
dev | 237 | drivers/sound/dmabuf.c | sound_free_dmap (dev, dmap); |
dev | 241 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 247 | drivers/sound/dmabuf.c | if (dev >= num_audiodevs) |
dev | 249 | drivers/sound/dmabuf.c | printk ("PCM device %d not installed.\n", dev); |
dev | 253 | drivers/sound/dmabuf.c | if (!audio_devs[dev]) |
dev | 255 | drivers/sound/dmabuf.c | printk ("PCM device %d not initialized\n", dev); |
dev | 259 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 261 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in = audio_devs[dev]->dmap_out; |
dev | 262 | drivers/sound/dmabuf.c | audio_devs[dev]->dmachan2 = audio_devs[dev]->dmachan1; |
dev | 265 | drivers/sound/dmabuf.c | if ((retval = audio_devs[dev]->open (dev, mode)) < 0) |
dev | 268 | drivers/sound/dmabuf.c | dmap_out = audio_devs[dev]->dmap_out; |
dev | 269 | drivers/sound/dmabuf.c | dmap_in = audio_devs[dev]->dmap_in; |
dev | 271 | drivers/sound/dmabuf.c | if ((retval = open_dmap (dev, mode, dmap_out, audio_devs[dev]->dmachan1)) < 0) |
dev | 273 | drivers/sound/dmabuf.c | audio_devs[dev]->close (dev); |
dev | 277 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits = mode; |
dev | 278 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX && dmap_out != dmap_in) |
dev | 279 | drivers/sound/dmabuf.c | if ((retval = open_dmap (dev, mode, dmap_in, audio_devs[dev]->dmachan2)) < 0) |
dev | 281 | drivers/sound/dmabuf.c | audio_devs[dev]->close (dev); |
dev | 282 | drivers/sound/dmabuf.c | close_dmap (dev, dmap_out, audio_devs[dev]->dmachan1); |
dev | 285 | drivers/sound/dmabuf.c | audio_devs[dev]->open_mode = mode; |
dev | 286 | drivers/sound/dmabuf.c | audio_devs[dev]->go = 1; |
dev | 287 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_NONE; |
dev | 288 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_NONE; |
dev | 290 | drivers/sound/dmabuf.c | audio_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_BITS, (caddr_t) 8, 1); |
dev | 291 | drivers/sound/dmabuf.c | audio_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_CHANNELS, (caddr_t) 1, 1); |
dev | 292 | drivers/sound/dmabuf.c | audio_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_RATE, (caddr_t) DSP_DEFAULT_SPEED, 1); |
dev | 298 | drivers/sound/dmabuf.c | dma_reset (int dev) |
dev | 304 | drivers/sound/dmabuf.c | audio_devs[dev]->reset (dev); |
dev | 307 | drivers/sound/dmabuf.c | dma_reset_output (dev); |
dev | 309 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 310 | drivers/sound/dmabuf.c | dma_reset_input (dev); |
dev | 314 | drivers/sound/dmabuf.c | dma_reset_output (int dev) |
dev | 320 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_DUPLEX) || |
dev | 321 | drivers/sound/dmabuf.c | !audio_devs[dev]->halt_output) |
dev | 322 | drivers/sound/dmabuf.c | audio_devs[dev]->reset (dev); |
dev | 324 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_output (dev); |
dev | 327 | drivers/sound/dmabuf.c | dma_init_buffers (dev, audio_devs[dev]->dmap_out); |
dev | 328 | drivers/sound/dmabuf.c | reorganize_buffers (dev, audio_devs[dev]->dmap_out, 0); |
dev | 332 | drivers/sound/dmabuf.c | dma_reset_input (int dev) |
dev | 338 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_DUPLEX) || |
dev | 339 | drivers/sound/dmabuf.c | !audio_devs[dev]->halt_input) |
dev | 340 | drivers/sound/dmabuf.c | audio_devs[dev]->reset (dev); |
dev | 342 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_input (dev); |
dev | 345 | drivers/sound/dmabuf.c | dma_init_buffers (dev, audio_devs[dev]->dmap_in); |
dev | 346 | drivers/sound/dmabuf.c | reorganize_buffers (dev, audio_devs[dev]->dmap_in, 1); |
dev | 350 | drivers/sound/dmabuf.c | dma_sync (int dev) |
dev | 354 | drivers/sound/dmabuf.c | if (!audio_devs[dev]->go && (!audio_devs[dev]->enable_bits & PCM_ENABLE_OUTPUT)) |
dev | 357 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_out->dma_mode == DMODE_OUTPUT) |
dev | 362 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->underrun_count = 0; |
dev | 364 | drivers/sound/dmabuf.c | && audio_devs[dev]->dmap_out->qlen |
dev | 365 | drivers/sound/dmabuf.c | && audio_devs[dev]->dmap_out->underrun_count == 0) |
dev | 375 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_SLEEP; |
dev | 376 | drivers/sound/dmabuf.c | module_interruptible_sleep_on (&out_sleeper[dev]); |
dev | 377 | drivers/sound/dmabuf.c | if (!(out_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 380 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 382 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 384 | drivers/sound/dmabuf.c | if ((out_sleep_flag[dev].mode & WK_TIMEOUT)) |
dev | 387 | drivers/sound/dmabuf.c | return audio_devs[dev]->dmap_out->qlen; |
dev | 399 | drivers/sound/dmabuf.c | if (audio_devs[dev]->local_qlen) /* Device has hidden buffers */ |
dev | 402 | drivers/sound/dmabuf.c | && audio_devs[dev]->local_qlen (dev)) |
dev | 412 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_SLEEP; |
dev | 413 | drivers/sound/dmabuf.c | module_interruptible_sleep_on (&out_sleeper[dev]); |
dev | 414 | drivers/sound/dmabuf.c | if (!(out_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 417 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 419 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 425 | drivers/sound/dmabuf.c | return audio_devs[dev]->dmap_out->qlen; |
dev | 429 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 433 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->closing = 1; |
dev | 434 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in->closing = 1; |
dev | 437 | drivers/sound/dmabuf.c | && (audio_devs[dev]->dmap_out->dma_mode == DMODE_OUTPUT)) |
dev | 439 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 441 | drivers/sound/dmabuf.c | memset (audio_devs[dev]->dmap_out->raw_buf, |
dev | 442 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->neutral_byte, |
dev | 443 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->bytes_in_use); |
dev | 449 | drivers/sound/dmabuf.c | audio_devs[dev]->close (dev); |
dev | 451 | drivers/sound/dmabuf.c | close_dmap (dev, audio_devs[dev]->dmap_out, audio_devs[dev]->dmachan1); |
dev | 453 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 454 | drivers/sound/dmabuf.c | close_dmap (dev, audio_devs[dev]->dmap_in, audio_devs[dev]->dmachan2); |
dev | 455 | drivers/sound/dmabuf.c | audio_devs[dev]->open_mode = 0; |
dev | 463 | drivers/sound/dmabuf.c | activate_recording (int dev, struct dma_buffparms *dmap) |
dev | 465 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->enable_bits & PCM_ENABLE_INPUT)) |
dev | 470 | drivers/sound/dmabuf.c | dma_reset_input (dev); |
dev | 476 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 477 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 482 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap, 1); |
dev | 488 | drivers/sound/dmabuf.c | if ((err = audio_devs[dev]->prepare_for_input (dev, |
dev | 498 | drivers/sound/dmabuf.c | audio_devs[dev]->start_input (dev, dmap->raw_buf_phys + |
dev | 501 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE) || |
dev | 504 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 505 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 506 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 512 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len, int dontblock) |
dev | 516 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_in; |
dev | 520 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_in->mapping_flags & DMA_MAP_MAPPED) |
dev | 529 | drivers/sound/dmabuf.c | if ((err = activate_recording (dev, dmap)) < 0) |
dev | 543 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->enable_bits & PCM_ENABLE_INPUT) & |
dev | 544 | drivers/sound/dmabuf.c | audio_devs[dev]->go) |
dev | 550 | drivers/sound/dmabuf.c | if (!audio_devs[dev]->go) |
dev | 563 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_SLEEP; |
dev | 564 | drivers/sound/dmabuf.c | module_interruptible_sleep_on (&in_sleeper[dev]); |
dev | 565 | drivers/sound/dmabuf.c | if (!(in_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 568 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 570 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 572 | drivers/sound/dmabuf.c | if ((in_sleep_flag[dev].mode & WK_TIMEOUT)) |
dev | 576 | drivers/sound/dmabuf.c | audio_devs[dev]->reset (dev); |
dev | 594 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 596 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_in; |
dev | 600 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_in->mapping_flags & DMA_MAP_MAPPED) |
dev | 610 | drivers/sound/dmabuf.c | dev, dmap->qlen, dmap->nbufs); |
dev | 621 | drivers/sound/dmabuf.c | dma_subdivide (int dev, struct dma_buffparms *dmap, caddr_t arg, int fact) |
dev | 646 | drivers/sound/dmabuf.c | dma_set_fragment (int dev, struct dma_buffparms *dmap, caddr_t arg, int fact) |
dev | 677 | drivers/sound/dmabuf.c | if (dmap->fragment_size > audio_devs[dev]->buffsize) |
dev | 678 | drivers/sound/dmabuf.c | dmap->fragment_size = audio_devs[dev]->buffsize; |
dev | 680 | drivers/sound/dmabuf.c | if (dmap->fragment_size == audio_devs[dev]->buffsize && |
dev | 681 | drivers/sound/dmabuf.c | audio_devs[dev]->flags & DMA_AUTOMODE) |
dev | 689 | drivers/sound/dmabuf.c | get_buffer_pointer (int dev, int chan, struct dma_buffparms *dmap) |
dev | 708 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_AUTOMODE) |
dev | 721 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 723 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap_out = audio_devs[dev]->dmap_out; |
dev | 724 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap_in = audio_devs[dev]->dmap_in; |
dev | 729 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 734 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 735 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 742 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap_out, |
dev | 743 | drivers/sound/dmabuf.c | (audio_devs[dev]->open_mode == OPEN_READ)); |
dev | 744 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 745 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap_in, |
dev | 746 | drivers/sound/dmabuf.c | (audio_devs[dev]->open_mode == OPEN_READ)); |
dev | 757 | drivers/sound/dmabuf.c | ret = dma_subdivide (dev, dmap_out, arg, fact); |
dev | 761 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 762 | drivers/sound/dmabuf.c | ret = dma_subdivide (dev, dmap_in, arg, fact); |
dev | 773 | drivers/sound/dmabuf.c | ret = dma_set_fragment (dev, dmap_out, arg, fact); |
dev | 777 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 778 | drivers/sound/dmabuf.c | ret = dma_set_fragment (dev, dmap_in, arg, fact); |
dev | 794 | drivers/sound/dmabuf.c | if (cmd == SNDCTL_DSP_GETISPACE && audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 801 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap, (cmd == SNDCTL_DSP_GETISPACE)); |
dev | 809 | drivers/sound/dmabuf.c | if (!space_in_queue (dev)) |
dev | 814 | drivers/sound/dmabuf.c | if (audio_devs[dev]->local_qlen) |
dev | 816 | drivers/sound/dmabuf.c | int tmp = audio_devs[dev]->local_qlen (dev); |
dev | 844 | drivers/sound/dmabuf.c | int bits = get_fs_long ((long *) arg) & audio_devs[dev]->open_mode; |
dev | 847 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger == NULL) |
dev | 850 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_DUPLEX)) |
dev | 859 | drivers/sound/dmabuf.c | changed = audio_devs[dev]->enable_bits ^ bits; |
dev | 861 | drivers/sound/dmabuf.c | if ((changed & bits) & PCM_ENABLE_INPUT && audio_devs[dev]->go) |
dev | 867 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap_in, 1); |
dev | 870 | drivers/sound/dmabuf.c | if ((err = audio_devs[dev]->prepare_for_input (dev, |
dev | 874 | drivers/sound/dmabuf.c | activate_recording (dev, dmap_in); |
dev | 879 | drivers/sound/dmabuf.c | audio_devs[dev]->go) |
dev | 885 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap_out, 0); |
dev | 888 | drivers/sound/dmabuf.c | if ((err = audio_devs[dev]->prepare_for_output (dev, |
dev | 893 | drivers/sound/dmabuf.c | DMAbuf_start_output (dev, 0, dmap_out->fragment_size); |
dev | 896 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits = bits; |
dev | 897 | drivers/sound/dmabuf.c | if (changed && audio_devs[dev]->trigger) |
dev | 898 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, bits * audio_devs[dev]->go); |
dev | 902 | drivers/sound/dmabuf.c | return snd_ioctl_return ((int *) arg, audio_devs[dev]->enable_bits); |
dev | 907 | drivers/sound/dmabuf.c | if (!audio_devs[dev]->trigger) |
dev | 910 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, 0); |
dev | 911 | drivers/sound/dmabuf.c | audio_devs[dev]->go = 0; |
dev | 922 | drivers/sound/dmabuf.c | info.bytes = audio_devs[dev]->dmap_in->byte_counter; |
dev | 923 | drivers/sound/dmabuf.c | info.ptr = get_buffer_pointer (dev, audio_devs[dev]->dmachan2, audio_devs[dev]->dmap_in); |
dev | 924 | drivers/sound/dmabuf.c | info.blocks = audio_devs[dev]->dmap_in->qlen; |
dev | 928 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_in->mapping_flags & DMA_MAP_MAPPED) |
dev | 929 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in->qlen = 0; /* Acknowledge interrupts */ |
dev | 942 | drivers/sound/dmabuf.c | info.bytes = audio_devs[dev]->dmap_out->byte_counter; |
dev | 943 | drivers/sound/dmabuf.c | info.ptr = get_buffer_pointer (dev, audio_devs[dev]->dmachan1, audio_devs[dev]->dmap_out); |
dev | 944 | drivers/sound/dmabuf.c | info.blocks = audio_devs[dev]->dmap_out->qlen; |
dev | 948 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_out->mapping_flags & DMA_MAP_MAPPED) |
dev | 949 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->qlen = 0; /* Acknowledge interrupts */ |
dev | 957 | drivers/sound/dmabuf.c | return audio_devs[dev]->ioctl (dev, cmd, arg, local); |
dev | 970 | drivers/sound/dmabuf.c | int dev; |
dev | 972 | drivers/sound/dmabuf.c | for (dev = 0; dev < num_audiodevs; dev++) |
dev | 973 | drivers/sound/dmabuf.c | if (devmask & (1 << dev)) |
dev | 974 | drivers/sound/dmabuf.c | if (audio_devs[dev]->open_mode != 0) |
dev | 975 | drivers/sound/dmabuf.c | if (!audio_devs[dev]->go) |
dev | 978 | drivers/sound/dmabuf.c | audio_devs[dev]->go = 1; |
dev | 980 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 981 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 982 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 987 | drivers/sound/dmabuf.c | space_in_queue (int dev) |
dev | 990 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1003 | drivers/sound/dmabuf.c | if (audio_devs[dev]->local_qlen) |
dev | 1005 | drivers/sound/dmabuf.c | tmp = audio_devs[dev]->local_qlen (dev); |
dev | 1019 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size, int dontblock) |
dev | 1023 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1025 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_out->mapping_flags & DMA_MAP_MAPPED) |
dev | 1033 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 1038 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 1039 | drivers/sound/dmabuf.c | dma_reset_output (dev); |
dev | 1045 | drivers/sound/dmabuf.c | reorganize_buffers (dev, dmap, 0); |
dev | 1052 | drivers/sound/dmabuf.c | if ((err = audio_devs[dev]->prepare_for_output (dev, |
dev | 1061 | drivers/sound/dmabuf.c | while (!space_in_queue (dev) && |
dev | 1072 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->enable_bits & PCM_ENABLE_OUTPUT) && |
dev | 1073 | drivers/sound/dmabuf.c | audio_devs[dev]->go) |
dev | 1082 | drivers/sound/dmabuf.c | if (!audio_devs[dev]->go) |
dev | 1095 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_SLEEP; |
dev | 1096 | drivers/sound/dmabuf.c | module_interruptible_sleep_on (&out_sleeper[dev]); |
dev | 1097 | drivers/sound/dmabuf.c | if (!(out_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 1100 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 1102 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 1104 | drivers/sound/dmabuf.c | if ((out_sleep_flag[dev].mode & WK_TIMEOUT)) |
dev | 1110 | drivers/sound/dmabuf.c | audio_devs[dev]->reset (dev); |
dev | 1120 | drivers/sound/dmabuf.c | if (!space_in_queue (dev)) |
dev | 1133 | drivers/sound/dmabuf.c | DMAbuf_get_curr_buffer (int dev, int *buf_no, char **dma_buf, int *buf_ptr, int *buf_size) |
dev | 1135 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1147 | drivers/sound/dmabuf.c | DMAbuf_set_count (int dev, int buff_no, int l) |
dev | 1149 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1162 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 1164 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1171 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_out->mapping_flags & DMA_MAP_MAPPED) |
dev | 1185 | drivers/sound/dmabuf.c | dev, dmap->qlen, dmap->nbufs); |
dev | 1198 | drivers/sound/dmabuf.c | ((audio_devs[dev]->flags & DMA_AUTOMODE) && |
dev | 1199 | drivers/sound/dmabuf.c | audio_devs[dev]->flags & NEEDS_RESTART)) |
dev | 1210 | drivers/sound/dmabuf.c | audio_devs[dev]->output_block (dev, dmap->raw_buf_phys + |
dev | 1213 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE) || |
dev | 1216 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 1217 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 1218 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 1225 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 1233 | drivers/sound/dmabuf.c | chan = audio_devs[dev]->dmachan1; |
dev | 1234 | drivers/sound/dmabuf.c | dmap = audio_devs[dev]->dmap_out; |
dev | 1238 | drivers/sound/dmabuf.c | chan = audio_devs[dev]->dmachan2; |
dev | 1239 | drivers/sound/dmabuf.c | dmap = audio_devs[dev]->dmap_in; |
dev | 1247 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_AUTOMODE) |
dev | 1281 | drivers/sound/dmabuf.c | int dev; |
dev | 1288 | drivers/sound/dmabuf.c | for (dev = 0; dev < num_audiodevs; dev++) |
dev | 1289 | drivers/sound/dmabuf.c | if (audio_devs[dev]->dmap_out == NULL) |
dev | 1291 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out = |
dev | 1292 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in = |
dev | 1295 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 1296 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in = |
dev | 1338 | drivers/sound/dmabuf.c | DMAbuf_outputintr (int dev, int event_type) |
dev | 1351 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_out; |
dev | 1356 | drivers/sound/dmabuf.c | sound_dma_intr (dev, audio_devs[dev]->dmap_out, audio_devs[dev]->dmachan1); |
dev | 1368 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_AUTOMODE)) |
dev | 1370 | drivers/sound/dmabuf.c | audio_devs[dev]->output_block (dev, dmap->raw_buf_phys + |
dev | 1373 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE)); |
dev | 1374 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 1375 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 1376 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 1385 | drivers/sound/dmabuf.c | dev, dmap->qlen, dmap->nbufs); |
dev | 1400 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_xfer (dev); |
dev | 1418 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_AUTOMODE)) |
dev | 1424 | drivers/sound/dmabuf.c | audio_devs[dev]->output_block (dev, dmap->raw_buf_phys + |
dev | 1427 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE)); |
dev | 1428 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 1429 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 1430 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 1438 | drivers/sound/dmabuf.c | if ((out_sleep_flag[dev].mode & WK_SLEEP)) |
dev | 1441 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_WAKEUP; |
dev | 1442 | drivers/sound/dmabuf.c | module_wake_up (&out_sleeper[dev]); |
dev | 1449 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 1452 | drivers/sound/dmabuf.c | struct dma_buffparms *dmap = audio_devs[dev]->dmap_in; |
dev | 1457 | drivers/sound/dmabuf.c | sound_dma_intr (dev, audio_devs[dev]->dmap_in, audio_devs[dev]->dmachan2); |
dev | 1465 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_AUTOMODE)) |
dev | 1467 | drivers/sound/dmabuf.c | audio_devs[dev]->start_input (dev, dmap->raw_buf_phys + |
dev | 1470 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE)); |
dev | 1471 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 1472 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 1473 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 1483 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_AUTOMODE) |
dev | 1486 | drivers/sound/dmabuf.c | if ((audio_devs[dev]->flags & DMA_DUPLEX) && |
dev | 1487 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_input) |
dev | 1488 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_input (dev); |
dev | 1490 | drivers/sound/dmabuf.c | audio_devs[dev]->halt_xfer (dev); |
dev | 1493 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_AUTOMODE) |
dev | 1504 | drivers/sound/dmabuf.c | dev, dmap->qlen, dmap->nbufs); |
dev | 1508 | drivers/sound/dmabuf.c | if (!(audio_devs[dev]->flags & DMA_AUTOMODE)) |
dev | 1510 | drivers/sound/dmabuf.c | audio_devs[dev]->start_input (dev, dmap->raw_buf_phys + |
dev | 1513 | drivers/sound/dmabuf.c | !(audio_devs[dev]->flags & DMA_AUTOMODE)); |
dev | 1514 | drivers/sound/dmabuf.c | if (audio_devs[dev]->trigger) |
dev | 1515 | drivers/sound/dmabuf.c | audio_devs[dev]->trigger (dev, |
dev | 1516 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits * audio_devs[dev]->go); |
dev | 1523 | drivers/sound/dmabuf.c | if ((in_sleep_flag[dev].mode & WK_SLEEP)) |
dev | 1526 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_WAKEUP; |
dev | 1527 | drivers/sound/dmabuf.c | module_wake_up (&in_sleeper[dev]); |
dev | 1534 | drivers/sound/dmabuf.c | DMAbuf_open_dma (int dev) |
dev | 1536 | drivers/sound/dmabuf.c | int chan = audio_devs[dev]->dmachan1; |
dev | 1540 | drivers/sound/dmabuf.c | if ((err = open_dmap (dev, OPEN_READWRITE, audio_devs[dev]->dmap_out, audio_devs[dev]->dmachan1)) < 0) |
dev | 1544 | drivers/sound/dmabuf.c | dma_init_buffers (dev, audio_devs[dev]->dmap_out); |
dev | 1545 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->flags |= DMA_ALLOC_DONE; |
dev | 1546 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_out->fragment_size = audio_devs[dev]->buffsize; |
dev | 1549 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 1551 | drivers/sound/dmabuf.c | if ((err = open_dmap (dev, OPEN_READWRITE, audio_devs[dev]->dmap_in, audio_devs[dev]->dmachan2)) < 0) |
dev | 1554 | drivers/sound/dmabuf.c | audio_devs[dev]->dmachan2); |
dev | 1555 | drivers/sound/dmabuf.c | close_dmap (dev, audio_devs[dev]->dmap_out, audio_devs[dev]->dmachan1); |
dev | 1558 | drivers/sound/dmabuf.c | dma_init_buffers (dev, audio_devs[dev]->dmap_in); |
dev | 1559 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in->flags |= DMA_ALLOC_DONE; |
dev | 1560 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in->fragment_size = audio_devs[dev]->buffsize; |
dev | 1565 | drivers/sound/dmabuf.c | audio_devs[dev]->dmap_in = audio_devs[dev]->dmap_out; |
dev | 1566 | drivers/sound/dmabuf.c | audio_devs[dev]->dmachan2 = audio_devs[dev]->dmachan1; |
dev | 1580 | drivers/sound/dmabuf.c | DMAbuf_close_dma (int dev) |
dev | 1582 | drivers/sound/dmabuf.c | DMAbuf_reset_dma (dev); |
dev | 1583 | drivers/sound/dmabuf.c | close_dmap (dev, audio_devs[dev]->dmap_out, audio_devs[dev]->dmachan1); |
dev | 1585 | drivers/sound/dmabuf.c | if (audio_devs[dev]->flags & DMA_DUPLEX) |
dev | 1586 | drivers/sound/dmabuf.c | close_dmap (dev, audio_devs[dev]->dmap_in, audio_devs[dev]->dmachan2); |
dev | 1591 | drivers/sound/dmabuf.c | DMAbuf_reset_dma (int dev) |
dev | 1596 | drivers/sound/dmabuf.c | DMAbuf_select (int dev, struct fileinfo *file, int sel_type, select_table_handle * wait) |
dev | 1604 | drivers/sound/dmabuf.c | dmap = audio_devs[dev]->dmap_in; |
dev | 1613 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_SLEEP; |
dev | 1614 | drivers/sound/dmabuf.c | module_select_wait (&in_sleeper[dev], wait); |
dev | 1621 | drivers/sound/dmabuf.c | if ((audio_devs[dev]->flags & DMA_DUPLEX) && !dmap->qlen && |
dev | 1622 | drivers/sound/dmabuf.c | audio_devs[dev]->enable_bits & PCM_ENABLE_INPUT && |
dev | 1623 | drivers/sound/dmabuf.c | audio_devs[dev]->go) |
dev | 1629 | drivers/sound/dmabuf.c | activate_recording (dev, dmap); |
dev | 1639 | drivers/sound/dmabuf.c | in_sleep_flag[dev].mode = WK_SLEEP; |
dev | 1640 | drivers/sound/dmabuf.c | module_select_wait (&in_sleeper[dev], wait); |
dev | 1648 | drivers/sound/dmabuf.c | dmap = audio_devs[dev]->dmap_out; |
dev | 1657 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_SLEEP; |
dev | 1658 | drivers/sound/dmabuf.c | module_select_wait (&out_sleeper[dev], wait); |
dev | 1673 | drivers/sound/dmabuf.c | if (!space_in_queue (dev)) |
dev | 1677 | drivers/sound/dmabuf.c | out_sleep_flag[dev].mode = WK_SLEEP; |
dev | 1678 | drivers/sound/dmabuf.c | module_select_wait (&out_sleeper[dev], wait); |
dev | 1699 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 1705 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 1711 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size, int dontblock) |
dev | 1717 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len, int dontblock) |
dev | 1723 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 1729 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 1735 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 1747 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 1753 | drivers/sound/dmabuf.c | DMAbuf_open_dma (int dev) |
dev | 1759 | drivers/sound/dmabuf.c | DMAbuf_close_dma (int dev) |
dev | 1765 | drivers/sound/dmabuf.c | DMAbuf_reset_dma (int dev) |
dev | 1771 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 1777 | drivers/sound/dmabuf.c | DMAbuf_outputintr (int dev, int underrun_flag) |
dev | 43 | drivers/sound/gus_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 58 | drivers/sound/gus_midi.c | gus_midi_open (int dev, int mode, |
dev | 59 | drivers/sound/gus_midi.c | void (*input) (int dev, unsigned char data), |
dev | 60 | drivers/sound/gus_midi.c | void (*output) (int dev) |
dev | 122 | drivers/sound/gus_midi.c | gus_midi_close (int dev) |
dev | 133 | drivers/sound/gus_midi.c | gus_midi_out (int dev, unsigned char midi_byte) |
dev | 185 | drivers/sound/gus_midi.c | gus_midi_start_read (int dev) |
dev | 191 | drivers/sound/gus_midi.c | gus_midi_end_read (int dev) |
dev | 197 | drivers/sound/gus_midi.c | gus_midi_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 203 | drivers/sound/gus_midi.c | gus_midi_kick (int dev) |
dev | 208 | drivers/sound/gus_midi.c | gus_midi_buffer_status (int dev) |
dev | 895 | drivers/sound/gus_wave.c | guswave_ioctl (int dev, |
dev | 925 | drivers/sound/gus_wave.c | guswave_set_instr (int dev, int voice, int instr_no) |
dev | 963 | drivers/sound/gus_wave.c | guswave_kill_note (int dev, int voice, int note, int velocity) |
dev | 986 | drivers/sound/gus_wave.c | guswave_aftertouch (int dev, int voice, int pressure) |
dev | 991 | drivers/sound/gus_wave.c | guswave_panning (int dev, int voice, int value) |
dev | 998 | drivers/sound/gus_wave.c | guswave_volume_method (int dev, int mode) |
dev | 1138 | drivers/sound/gus_wave.c | guswave_controller (int dev, int voice, int ctrl_num, int value) |
dev | 1198 | drivers/sound/gus_wave.c | guswave_start_note2 (int dev, int voice, int note_num, int volume) |
dev | 1395 | drivers/sound/gus_wave.c | guswave_start_note (int dev, int voice, int note_num, int volume) |
dev | 1411 | drivers/sound/gus_wave.c | ret_val = guswave_start_note2 (dev, voice, note_num, volume); |
dev | 1439 | drivers/sound/gus_wave.c | ret_val = guswave_start_note2 (dev, voice, note_num, volume); |
dev | 1443 | drivers/sound/gus_wave.c | voices[voice].dev_pending = dev; |
dev | 1459 | drivers/sound/gus_wave.c | guswave_reset (int dev) |
dev | 1471 | drivers/sound/gus_wave.c | guswave_open (int dev, int mode) |
dev | 1499 | drivers/sound/gus_wave.c | guswave_close (int dev) |
dev | 1510 | drivers/sound/gus_wave.c | guswave_load_patch (int dev, int format, const char *addr, |
dev | 1770 | drivers/sound/gus_wave.c | pmgr_inform (dev, PM_E_PATCH_LOADED, instr, free_sample, 0, 0); |
dev | 1776 | drivers/sound/gus_wave.c | guswave_hw_control (int dev, unsigned char *event_rec) |
dev | 1805 | drivers/sound/gus_wave.c | guswave_set_instr (dev, voice, p1); |
dev | 1991 | drivers/sound/gus_wave.c | gus_sampling_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 2049 | drivers/sound/gus_wave.c | gus_sampling_reset (int dev) |
dev | 2059 | drivers/sound/gus_wave.c | gus_sampling_open (int dev, int mode) |
dev | 2084 | drivers/sound/gus_wave.c | audio_devs[dev]->format_mask = AFMT_U8; |
dev | 2086 | drivers/sound/gus_wave.c | audio_devs[dev]->format_mask = AFMT_U8 | AFMT_S16_LE; |
dev | 2092 | drivers/sound/gus_wave.c | gus_sampling_close (int dev) |
dev | 2251 | drivers/sound/gus_wave.c | gus_transfer_output_block (int dev, unsigned long buf, |
dev | 2287 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf + (chn * count), count, DMA_MODE_WRITE); |
dev | 2292 | drivers/sound/gus_wave.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 2309 | drivers/sound/gus_wave.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 2339 | drivers/sound/gus_wave.c | gus_sampling_output_block (int dev, unsigned long buf, int total_count, |
dev | 2345 | drivers/sound/gus_wave.c | pcm_current_dev = dev; |
dev | 2346 | drivers/sound/gus_wave.c | gus_transfer_output_block (dev, buf, total_count, intrflag, 0); |
dev | 2350 | drivers/sound/gus_wave.c | gus_sampling_start_input (int dev, unsigned long buf, int count, |
dev | 2359 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 2363 | drivers/sound/gus_wave.c | if (audio_devs[dev]->dmachan2 > 3) |
dev | 2375 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_input (int dev, int bsize, int bcount) |
dev | 2393 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_output (int dev, int bsize, int bcount) |
dev | 2424 | drivers/sound/gus_wave.c | gus_local_qlen (int dev) |
dev | 2430 | drivers/sound/gus_wave.c | gus_copy_from_user (int dev, char *localbuf, int localoffs, |
dev | 2500 | drivers/sound/gus_wave.c | guswave_setup_voice (int dev, int voice, int chn) |
dev | 2503 | drivers/sound/gus_wave.c | &synth_devs[dev]->chn_info[chn]; |
dev | 2505 | drivers/sound/gus_wave.c | guswave_set_instr (dev, voice, info->pgm_num); |
dev | 2517 | drivers/sound/gus_wave.c | guswave_bender (int dev, int voice, int value) |
dev | 2535 | drivers/sound/gus_wave.c | guswave_patchmgr (int dev, struct patmgr_info *rec) |
dev | 2718 | drivers/sound/gus_wave.c | guswave_alloc (int dev, int chn, int note, struct voice_alloc_info *alloc) |
dev | 2829 | drivers/sound/gus_wave.c | gus_default_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg) |
dev | 3489 | drivers/sound/gus_wave.c | gus_tmr_start (int dev, unsigned int usecs_per_tick) |
dev | 3513 | drivers/sound/gus_wave.c | gus_tmr_disable (int dev) |
dev | 3520 | drivers/sound/gus_wave.c | gus_tmr_restart (int dev) |
dev | 80 | drivers/sound/ics2101.c | write_mix (int dev, int chn, int vol) |
dev | 84 | drivers/sound/ics2101.c | int ctrl_addr = dev << 3; |
dev | 85 | drivers/sound/ics2101.c | int attn_addr = dev << 3; |
dev | 105 | drivers/sound/ics2101.c | outb (selector[dev], u_MixData); |
dev | 112 | drivers/sound/ics2101.c | set_volumes (int dev, int vol) |
dev | 126 | drivers/sound/ics2101.c | write_mix (dev, CHN_LEFT, left); |
dev | 127 | drivers/sound/ics2101.c | write_mix (dev, CHN_RIGHT, right); |
dev | 130 | drivers/sound/ics2101.c | volumes[dev] = vol; |
dev | 135 | drivers/sound/ics2101.c | ics2101_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg) |
dev | 143 | drivers/sound/ics2101.c | return gus_default_mixer_ioctl (dev, cmd, arg); |
dev | 176 | drivers/sound/ics2101.c | return gus_default_mixer_ioctl (dev, cmd, arg); |
dev | 56 | drivers/sound/mad16_sb_midi.c | void (*midi_input_intr) (int dev, unsigned char data); |
dev | 202 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_open (int dev, int mode, |
dev | 203 | drivers/sound/mad16_sb_midi.c | void (*input) (int dev, unsigned char data), |
dev | 204 | drivers/sound/mad16_sb_midi.c | void (*output) (int dev) |
dev | 252 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_close (int dev) |
dev | 266 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_out (int dev, unsigned char midi_byte) |
dev | 289 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_start_read (int dev) |
dev | 300 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_end_read (int dev) |
dev | 311 | drivers/sound/mad16_sb_midi.c | mad16_sb_midi_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 55 | drivers/sound/maui.c | static int (*orig_load_patch) (int dev, int format, const char *addr, |
dev | 144 | drivers/sound/maui.c | maui_load_patch (int dev, int format, const char *addr, |
dev | 154 | drivers/sound/maui.c | return orig_load_patch (dev, format, addr, offs, count, pmgr_flag); |
dev | 151 | drivers/sound/midi_synth.c | int dev; |
dev | 173 | drivers/sound/midi_synth.c | dev = midi2synth[orig_dev]; |
dev | 207 | drivers/sound/midi_synth.c | do_midi_msg (dev, inc->m_buf, inc->m_ptr); |
dev | 235 | drivers/sound/midi_synth.c | do_midi_msg (dev, inc->m_buf, inc->m_ptr); |
dev | 257 | drivers/sound/midi_synth.c | leave_sysex (int dev) |
dev | 259 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 262 | drivers/sound/midi_synth.c | if (!sysex_state[dev]) |
dev | 265 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 271 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 275 | drivers/sound/midi_synth.c | midi_synth_output (int dev) |
dev | 283 | drivers/sound/midi_synth.c | midi_synth_ioctl (int dev, |
dev | 294 | drivers/sound/midi_synth.c | memcpy_tofs ((&((char *) arg)[0]), synth_devs[dev]->info, sizeof (struct synth_info)); |
dev | 309 | drivers/sound/midi_synth.c | midi_synth_kill_note (int dev, int channel, int note, int velocity) |
dev | 311 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 323 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 377 | drivers/sound/midi_synth.c | midi_synth_set_instr (int dev, int channel, int instr_no) |
dev | 379 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 386 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 399 | drivers/sound/midi_synth.c | midi_synth_start_note (int dev, int channel, int note, int velocity) |
dev | 401 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 413 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 441 | drivers/sound/midi_synth.c | midi_synth_reset (int dev) |
dev | 444 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 448 | drivers/sound/midi_synth.c | midi_synth_open (int dev, int mode) |
dev | 450 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 458 | drivers/sound/midi_synth.c | midi2synth[orig_dev] = dev; |
dev | 459 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 483 | drivers/sound/midi_synth.c | midi_synth_close (int dev) |
dev | 485 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 487 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 498 | drivers/sound/midi_synth.c | midi_synth_hw_control (int dev, unsigned char *event) |
dev | 503 | drivers/sound/midi_synth.c | midi_synth_load_patch (int dev, int format, const char *addr, |
dev | 506 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 514 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 603 | drivers/sound/midi_synth.c | midi_synth_panning (int dev, int channel, int pressure) |
dev | 608 | drivers/sound/midi_synth.c | midi_synth_aftertouch (int dev, int channel, int pressure) |
dev | 610 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 618 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 640 | drivers/sound/midi_synth.c | midi_synth_controller (int dev, int channel, int ctrl_num, int value) |
dev | 642 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 650 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 669 | drivers/sound/midi_synth.c | midi_synth_patchmgr (int dev, struct patmgr_info *rec) |
dev | 675 | drivers/sound/midi_synth.c | midi_synth_bender (int dev, int channel, int value) |
dev | 677 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 686 | drivers/sound/midi_synth.c | leave_sysex (dev); |
dev | 707 | drivers/sound/midi_synth.c | midi_synth_setup_voice (int dev, int voice, int channel) |
dev | 712 | drivers/sound/midi_synth.c | midi_synth_send_sysex (int dev, unsigned char *bytes, int len) |
dev | 714 | drivers/sound/midi_synth.c | int orig_dev = synth_devs[dev]->midi_dev; |
dev | 724 | drivers/sound/midi_synth.c | sysex_state[dev] = 1; |
dev | 728 | drivers/sound/midi_synth.c | if (!sysex_state[dev]) /* Orphan sysex end */ |
dev | 730 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 734 | drivers/sound/midi_synth.c | if (!sysex_state[dev]) |
dev | 740 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 753 | drivers/sound/midi_synth.c | sysex_state[dev] = 0; |
dev | 760 | drivers/sound/midi_synth.c | if (!sysex_state[dev]) |
dev | 1 | drivers/sound/midi_synth.h | int midi_synth_ioctl (int dev, |
dev | 3 | drivers/sound/midi_synth.h | int midi_synth_kill_note (int dev, int channel, int note, int velocity); |
dev | 4 | drivers/sound/midi_synth.h | int midi_synth_set_instr (int dev, int channel, int instr_no); |
dev | 5 | drivers/sound/midi_synth.h | int midi_synth_start_note (int dev, int channel, int note, int volume); |
dev | 6 | drivers/sound/midi_synth.h | void midi_synth_reset (int dev); |
dev | 7 | drivers/sound/midi_synth.h | int midi_synth_open (int dev, int mode); |
dev | 8 | drivers/sound/midi_synth.h | void midi_synth_close (int dev); |
dev | 9 | drivers/sound/midi_synth.h | void midi_synth_hw_control (int dev, unsigned char *event); |
dev | 10 | drivers/sound/midi_synth.h | int midi_synth_load_patch (int dev, int format, const char * addr, |
dev | 12 | drivers/sound/midi_synth.h | void midi_synth_panning (int dev, int channel, int pressure); |
dev | 13 | drivers/sound/midi_synth.h | void midi_synth_aftertouch (int dev, int channel, int pressure); |
dev | 14 | drivers/sound/midi_synth.h | void midi_synth_controller (int dev, int channel, int ctrl_num, int value); |
dev | 15 | drivers/sound/midi_synth.h | int midi_synth_patchmgr (int dev, struct patmgr_info *rec); |
dev | 16 | drivers/sound/midi_synth.h | void midi_synth_bender (int dev, int chn, int value); |
dev | 17 | drivers/sound/midi_synth.h | void midi_synth_setup_voice (int dev, int voice, int chn); |
dev | 18 | drivers/sound/midi_synth.h | int midi_synth_send_sysex(int dev, unsigned char *bytes,int len); |
dev | 103 | drivers/sound/midibuf.c | drain_midi_queue (int dev) |
dev | 110 | drivers/sound/midibuf.c | if (midi_devs[dev]->buffer_status != NULL) |
dev | 112 | drivers/sound/midibuf.c | midi_devs[dev]->buffer_status (dev)) |
dev | 121 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_SLEEP; |
dev | 122 | drivers/sound/midibuf.c | module_interruptible_sleep_on (&midi_sleeper[dev]); |
dev | 123 | drivers/sound/midibuf.c | if (!(midi_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 126 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 128 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 133 | drivers/sound/midibuf.c | midi_input_intr (int dev, unsigned char data) |
dev | 135 | drivers/sound/midibuf.c | if (midi_in_buf[dev] == NULL) |
dev | 145 | drivers/sound/midibuf.c | if (SPACE_AVAIL (midi_in_buf[dev])) |
dev | 147 | drivers/sound/midibuf.c | QUEUE_BYTE (midi_in_buf[dev], data); |
dev | 148 | drivers/sound/midibuf.c | if ((input_sleep_flag[dev].mode & WK_SLEEP)) |
dev | 150 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode = WK_WAKEUP; |
dev | 151 | drivers/sound/midibuf.c | module_wake_up (&input_sleeper[dev]); |
dev | 158 | drivers/sound/midibuf.c | midi_output_intr (int dev) |
dev | 169 | drivers/sound/midibuf.c | int dev; |
dev | 175 | drivers/sound/midibuf.c | for (dev = 0; dev < num_midis; dev++) |
dev | 176 | drivers/sound/midibuf.c | if (midi_out_buf[dev] != NULL) |
dev | 178 | drivers/sound/midibuf.c | while (DATA_AVAIL (midi_out_buf[dev]) && |
dev | 179 | drivers/sound/midibuf.c | midi_devs[dev]->putc (dev, |
dev | 180 | drivers/sound/midibuf.c | midi_out_buf[dev]->queue[midi_out_buf[dev]->head])) |
dev | 182 | drivers/sound/midibuf.c | midi_out_buf[dev]->head = (midi_out_buf[dev]->head + 1) % MAX_QUEUE_SIZE; |
dev | 183 | drivers/sound/midibuf.c | midi_out_buf[dev]->len--; |
dev | 186 | drivers/sound/midibuf.c | if (DATA_AVAIL (midi_out_buf[dev]) < 100 && |
dev | 187 | drivers/sound/midibuf.c | (midi_sleep_flag[dev].mode & WK_SLEEP)) |
dev | 189 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_WAKEUP; |
dev | 190 | drivers/sound/midibuf.c | module_wake_up (&midi_sleeper[dev]); |
dev | 205 | drivers/sound/midibuf.c | MIDIbuf_open (int dev, struct fileinfo *file) |
dev | 209 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 218 | drivers/sound/midibuf.c | if (dev < 0 || dev >= num_midis) |
dev | 220 | drivers/sound/midibuf.c | printk ("Sound: Nonexistent MIDI interface %d\n", dev); |
dev | 228 | drivers/sound/midibuf.c | if ((err = midi_devs[dev]->open (dev, mode, |
dev | 234 | drivers/sound/midibuf.c | parms[dev].prech_timeout = 0; |
dev | 236 | drivers/sound/midibuf.c | midi_in_buf[dev] = (struct midi_buf *) kmalloc (sizeof (struct midi_buf), GFP_KERNEL); |
dev | 238 | drivers/sound/midibuf.c | if (midi_in_buf[dev] == NULL) |
dev | 241 | drivers/sound/midibuf.c | midi_devs[dev]->close (dev); |
dev | 244 | drivers/sound/midibuf.c | midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; |
dev | 246 | drivers/sound/midibuf.c | midi_out_buf[dev] = (struct midi_buf *) kmalloc (sizeof (struct midi_buf), GFP_KERNEL); |
dev | 248 | drivers/sound/midibuf.c | if (midi_out_buf[dev] == NULL) |
dev | 251 | drivers/sound/midibuf.c | midi_devs[dev]->close (dev); |
dev | 252 | drivers/sound/midibuf.c | kfree (midi_in_buf[dev]); |
dev | 253 | drivers/sound/midibuf.c | midi_in_buf[dev] = NULL; |
dev | 256 | drivers/sound/midibuf.c | midi_out_buf[dev]->len = midi_out_buf[dev]->head = midi_out_buf[dev]->tail = 0; |
dev | 259 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_NONE; |
dev | 260 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode = WK_NONE; |
dev | 276 | drivers/sound/midibuf.c | MIDIbuf_release (int dev, struct fileinfo *file) |
dev | 281 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 284 | drivers/sound/midibuf.c | if (dev < 0 || dev >= num_midis) |
dev | 296 | drivers/sound/midibuf.c | midi_devs[dev]->putc (dev, 0xfe); /* |
dev | 302 | drivers/sound/midibuf.c | DATA_AVAIL (midi_out_buf[dev])) |
dev | 311 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_SLEEP; |
dev | 312 | drivers/sound/midibuf.c | module_interruptible_sleep_on (&midi_sleeper[dev]); |
dev | 313 | drivers/sound/midibuf.c | if (!(midi_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 316 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 318 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 323 | drivers/sound/midibuf.c | drain_midi_queue (dev); /* |
dev | 330 | drivers/sound/midibuf.c | midi_devs[dev]->close (dev); |
dev | 332 | drivers/sound/midibuf.c | kfree (midi_in_buf[dev]); |
dev | 333 | drivers/sound/midibuf.c | kfree (midi_out_buf[dev]); |
dev | 334 | drivers/sound/midibuf.c | midi_in_buf[dev] = NULL; |
dev | 335 | drivers/sound/midibuf.c | midi_out_buf[dev] = NULL; |
dev | 342 | drivers/sound/midibuf.c | MIDIbuf_write (int dev, struct fileinfo *file, const char *buf, int count) |
dev | 348 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 360 | drivers/sound/midibuf.c | n = SPACE_AVAIL (midi_out_buf[dev]); |
dev | 374 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_SLEEP; |
dev | 375 | drivers/sound/midibuf.c | module_interruptible_sleep_on (&midi_sleeper[dev]); |
dev | 376 | drivers/sound/midibuf.c | if (!(midi_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 379 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 381 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 389 | drivers/sound/midibuf.c | n = SPACE_AVAIL (midi_out_buf[dev]); |
dev | 398 | drivers/sound/midibuf.c | QUEUE_BYTE (midi_out_buf[dev], tmp_data); |
dev | 410 | drivers/sound/midibuf.c | MIDIbuf_read (int dev, struct fileinfo *file, char *buf, int count) |
dev | 416 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 421 | drivers/sound/midibuf.c | if (!DATA_AVAIL (midi_in_buf[dev])) /* |
dev | 429 | drivers/sound/midibuf.c | if (parms[dev].prech_timeout) |
dev | 430 | drivers/sound/midibuf.c | current_set_timeout (tl = jiffies + (parms[dev].prech_timeout)); |
dev | 433 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode = WK_SLEEP; |
dev | 434 | drivers/sound/midibuf.c | module_interruptible_sleep_on (&input_sleeper[dev]); |
dev | 435 | drivers/sound/midibuf.c | if (!(input_sleep_flag[dev].mode & WK_WAKEUP)) |
dev | 438 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode |= WK_TIMEOUT; |
dev | 440 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode &= ~WK_SLEEP; |
dev | 448 | drivers/sound/midibuf.c | if (c == 0 && DATA_AVAIL (midi_in_buf[dev])) /* |
dev | 452 | drivers/sound/midibuf.c | n = DATA_AVAIL (midi_in_buf[dev]); |
dev | 459 | drivers/sound/midibuf.c | REMOVE_BYTE (midi_in_buf[dev], tmp_data); |
dev | 471 | drivers/sound/midibuf.c | MIDIbuf_ioctl (int dev, struct fileinfo *file, |
dev | 476 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 480 | drivers/sound/midibuf.c | if (midi_devs[dev]->coproc) /* Coprocessor ioctl */ |
dev | 481 | drivers/sound/midibuf.c | return midi_devs[dev]->coproc->ioctl (midi_devs[dev]->coproc->devc, cmd, arg, 0); |
dev | 483 | drivers/sound/midibuf.c | printk ("/dev/midi%d: No coprocessor for this device\n", dev); |
dev | 497 | drivers/sound/midibuf.c | parms[dev].prech_timeout = val; |
dev | 502 | drivers/sound/midibuf.c | return midi_devs[dev]->ioctl (dev, cmd, arg); |
dev | 507 | drivers/sound/midibuf.c | MIDIbuf_select (int dev, struct fileinfo *file, int sel_type, select_table_handle * wait) |
dev | 509 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 514 | drivers/sound/midibuf.c | if (!DATA_AVAIL (midi_in_buf[dev])) |
dev | 516 | drivers/sound/midibuf.c | input_sleep_flag[dev].mode = WK_SLEEP; |
dev | 517 | drivers/sound/midibuf.c | module_select_wait (&input_sleeper[dev], wait); |
dev | 524 | drivers/sound/midibuf.c | if (SPACE_AVAIL (midi_out_buf[dev])) |
dev | 526 | drivers/sound/midibuf.c | midi_sleep_flag[dev].mode = WK_SLEEP; |
dev | 527 | drivers/sound/midibuf.c | module_select_wait (&midi_sleeper[dev], wait); |
dev | 82 | drivers/sound/mpu401.c | void (*inputintr) (int dev, unsigned char data); |
dev | 131 | drivers/sound/mpu401.c | static void set_uart_mode (int dev, struct mpu_config *devc, int arg); |
dev | 456 | drivers/sound/mpu401.c | int dev; |
dev | 467 | drivers/sound/mpu401.c | dev = -1; |
dev | 470 | drivers/sound/mpu401.c | dev = irq2dev[irq]; |
dev | 472 | drivers/sound/mpu401.c | if (dev == -1) |
dev | 484 | drivers/sound/mpu401.c | dev = irq2dev[irq]; |
dev | 485 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 488 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 502 | drivers/sound/mpu401.c | mpu401_open (int dev, int mode, |
dev | 503 | drivers/sound/mpu401.c | void (*input) (int dev, unsigned char data), |
dev | 504 | drivers/sound/mpu401.c | void (*output) (int dev) |
dev | 510 | drivers/sound/mpu401.c | if (dev < 0 || dev >= num_midis) |
dev | 513 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 538 | drivers/sound/mpu401.c | irq2dev[devc->irq] = dev; |
dev | 540 | drivers/sound/mpu401.c | if (midi_devs[dev]->coproc) |
dev | 541 | drivers/sound/mpu401.c | if ((err = midi_devs[dev]->coproc-> |
dev | 542 | drivers/sound/mpu401.c | open (midi_devs[dev]->coproc->devc, COPR_MIDI)) < 0) |
dev | 549 | drivers/sound/mpu401.c | set_uart_mode (dev, devc, 1); |
dev | 562 | drivers/sound/mpu401.c | mpu401_close (int dev) |
dev | 566 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 576 | drivers/sound/mpu401.c | if (midi_devs[dev]->coproc) |
dev | 577 | drivers/sound/mpu401.c | midi_devs[dev]->coproc->close (midi_devs[dev]->coproc->devc, COPR_MIDI); |
dev | 582 | drivers/sound/mpu401.c | mpu401_out (int dev, unsigned char midi_byte) |
dev | 589 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 613 | drivers/sound/mpu401.c | mpu401_command (int dev, mpu_command_rec * cmd) |
dev | 620 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 688 | drivers/sound/mpu401.c | if (!mpu401_out (dev, cmd->data[i])) |
dev | 724 | drivers/sound/mpu401.c | mpu_cmd (int dev, int cmd, int data) |
dev | 735 | drivers/sound/mpu401.c | if ((ret = mpu401_command (dev, &rec)) < 0) |
dev | 743 | drivers/sound/mpu401.c | mpu401_prefix_cmd (int dev, unsigned char status) |
dev | 745 | drivers/sound/mpu401.c | struct mpu_config *devc = &dev_conf[dev]; |
dev | 752 | drivers/sound/mpu401.c | if (mpu_cmd (dev, 0xD0, 0) < 0) |
dev | 763 | drivers/sound/mpu401.c | if (mpu_cmd (dev, 0xDF, 0) < 0) |
dev | 778 | drivers/sound/mpu401.c | mpu401_start_read (int dev) |
dev | 784 | drivers/sound/mpu401.c | mpu401_end_read (int dev) |
dev | 790 | drivers/sound/mpu401.c | mpu401_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 794 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
dev | 809 | drivers/sound/mpu401.c | set_uart_mode (dev, devc, !get_fs_long ((long *) arg)); |
dev | 820 | drivers/sound/mpu401.c | if ((ret = mpu401_command (dev, &rec)) < 0) |
dev | 834 | drivers/sound/mpu401.c | mpu401_kick (int dev) |
dev | 839 | drivers/sound/mpu401.c | mpu401_buffer_status (int dev) |
dev | 847 | drivers/sound/mpu401.c | mpu_synth_ioctl (int dev, |
dev | 853 | drivers/sound/mpu401.c | midi_dev = synth_devs[dev]->midi_dev; |
dev | 879 | drivers/sound/mpu401.c | mpu_synth_open (int dev, int mode) |
dev | 884 | drivers/sound/mpu401.c | midi_dev = synth_devs[dev]->midi_dev; |
dev | 917 | drivers/sound/mpu401.c | devc->synthno = dev; |
dev | 945 | drivers/sound/mpu401.c | mpu_synth_close (int dev) |
dev | 950 | drivers/sound/mpu401.c | midi_dev = synth_devs[dev]->midi_dev; |
dev | 1258 | drivers/sound/mpu401.c | set_uart_mode (int dev, struct mpu_config *devc, int arg) |
dev | 1274 | drivers/sound/mpu401.c | if (mpu_cmd (dev, UART_MODE_ON, 0) < 0) |
dev | 1476 | drivers/sound/mpu401.c | mpu_timer_open (int dev, int mode) |
dev | 1478 | drivers/sound/mpu401.c | int midi_dev = sound_timer_devs[dev]->devlink; |
dev | 1499 | drivers/sound/mpu401.c | mpu_timer_close (int dev) |
dev | 1501 | drivers/sound/mpu401.c | int midi_dev = sound_timer_devs[dev]->devlink; |
dev | 1511 | drivers/sound/mpu401.c | mpu_timer_event (int dev, unsigned char *event) |
dev | 1515 | drivers/sound/mpu401.c | int midi_dev = sound_timer_devs[dev]->devlink; |
dev | 1589 | drivers/sound/mpu401.c | mpu_timer_get_time (int dev) |
dev | 1598 | drivers/sound/mpu401.c | mpu_timer_ioctl (int dev, |
dev | 1601 | drivers/sound/mpu401.c | int midi_dev = sound_timer_devs[dev]->devlink; |
dev | 1698 | drivers/sound/mpu401.c | mpu_timer_arm (int dev, long time) |
dev | 92 | drivers/sound/opl3.c | static int opl3_kill_note (int dev, int voice, int note, int velocity); |
dev | 126 | drivers/sound/opl3.c | opl3_ioctl (int dev, |
dev | 144 | drivers/sound/opl3.c | pmgr_inform (dev, PM_E_PATCH_LOADED, ins.channel, 0, 0, 0); |
dev | 322 | drivers/sound/opl3.c | opl3_kill_note (int dev, int voice, int note, int velocity) |
dev | 373 | drivers/sound/opl3.c | opl3_set_instr (int dev, int voice, int instr_no) |
dev | 526 | drivers/sound/opl3.c | opl3_start_note (int dev, int voice, int note, int volume) |
dev | 800 | drivers/sound/opl3.c | opl3_reset (int dev) |
dev | 824 | drivers/sound/opl3.c | opl3_kill_note (dev, i, 0, 64); |
dev | 839 | drivers/sound/opl3.c | opl3_open (int dev, int mode) |
dev | 865 | drivers/sound/opl3.c | opl3_close (int dev) |
dev | 873 | drivers/sound/opl3.c | opl3_reset (dev); |
dev | 877 | drivers/sound/opl3.c | opl3_hw_control (int dev, unsigned char *event) |
dev | 882 | drivers/sound/opl3.c | opl3_load_patch (int dev, int format, const char *addr, |
dev | 906 | drivers/sound/opl3.c | opl3_panning (int dev, int voice, int pressure) |
dev | 911 | drivers/sound/opl3.c | opl3_volume_method (int dev, int mode) |
dev | 922 | drivers/sound/opl3.c | opl3_aftertouch (int dev, int voice, int pressure) |
dev | 992 | drivers/sound/opl3.c | bend_pitch (int dev, int voice, int value) |
dev | 1034 | drivers/sound/opl3.c | opl3_controller (int dev, int voice, int ctrl_num, int value) |
dev | 1042 | drivers/sound/opl3.c | bend_pitch (dev, voice, value); |
dev | 1056 | drivers/sound/opl3.c | opl3_patchmgr (int dev, struct patmgr_info *rec) |
dev | 1062 | drivers/sound/opl3.c | opl3_bender (int dev, int voice, int value) |
dev | 1067 | drivers/sound/opl3.c | bend_pitch (dev, voice, value - 8192); |
dev | 1071 | drivers/sound/opl3.c | opl3_alloc_voice (int dev, int chn, int note, struct voice_alloc_info *alloc) |
dev | 1138 | drivers/sound/opl3.c | opl3_setup_voice (int dev, int voice, int chn) |
dev | 1141 | drivers/sound/opl3.c | &synth_devs[dev]->chn_info[chn]; |
dev | 1143 | drivers/sound/opl3.c | opl3_set_instr (dev, voice, |
dev | 46 | drivers/sound/pas2_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 49 | drivers/sound/pas2_midi.c | pas_midi_open (int dev, int mode, |
dev | 50 | drivers/sound/pas2_midi.c | void (*input) (int dev, unsigned char data), |
dev | 51 | drivers/sound/pas2_midi.c | void (*output) (int dev) |
dev | 119 | drivers/sound/pas2_midi.c | pas_midi_close (int dev) |
dev | 156 | drivers/sound/pas2_midi.c | pas_midi_out (int dev, unsigned char midi_byte) |
dev | 208 | drivers/sound/pas2_midi.c | pas_midi_start_read (int dev) |
dev | 214 | drivers/sound/pas2_midi.c | pas_midi_end_read (int dev) |
dev | 220 | drivers/sound/pas2_midi.c | pas_midi_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 226 | drivers/sound/pas2_midi.c | pas_midi_kick (int dev) |
dev | 232 | drivers/sound/pas2_midi.c | pas_buffer_status (int dev) |
dev | 263 | drivers/sound/pas2_mixer.c | pas_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg) |
dev | 164 | drivers/sound/pas2_pcm.c | pas_pcm_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 231 | drivers/sound/pas2_pcm.c | pas_pcm_reset (int dev) |
dev | 239 | drivers/sound/pas2_pcm.c | pas_pcm_open (int dev, int mode) |
dev | 268 | drivers/sound/pas2_pcm.c | pas_pcm_close (int dev) |
dev | 277 | drivers/sound/pas2_pcm.c | pas_pcm_reset (dev); |
dev | 286 | drivers/sound/pas2_pcm.c | pas_pcm_output_block (int dev, unsigned long buf, int count, |
dev | 294 | drivers/sound/pas2_pcm.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 297 | drivers/sound/pas2_pcm.c | if (audio_devs[dev]->flags & DMA_AUTOMODE && |
dev | 311 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 313 | drivers/sound/pas2_pcm.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 337 | drivers/sound/pas2_pcm.c | pas_pcm_start_input (int dev, unsigned long buf, int count, |
dev | 346 | drivers/sound/pas2_pcm.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 360 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 362 | drivers/sound/pas2_pcm.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 387 | drivers/sound/pas2_pcm.c | pas_pcm_trigger (int dev, int state) |
dev | 407 | drivers/sound/pas2_pcm.c | pas_pcm_prepare_for_input (int dev, int bsize, int bcount) |
dev | 413 | drivers/sound/pas2_pcm.c | pas_pcm_prepare_for_output (int dev, int bsize, int bcount) |
dev | 59 | drivers/sound/patmgr.c | pmgr_open (int dev) |
dev | 61 | drivers/sound/patmgr.c | if (dev < 0 || dev >= num_synths) |
dev | 64 | drivers/sound/patmgr.c | if (pmgr_opened[dev]) |
dev | 66 | drivers/sound/patmgr.c | pmgr_opened[dev] = 1; |
dev | 68 | drivers/sound/patmgr.c | server_wait_flag[dev].mode = WK_NONE; |
dev | 74 | drivers/sound/patmgr.c | pmgr_release (int dev) |
dev | 77 | drivers/sound/patmgr.c | if (mbox[dev]) /* |
dev | 82 | drivers/sound/patmgr.c | mbox[dev]->key = PM_ERROR; |
dev | 83 | drivers/sound/patmgr.c | mbox[dev]->parm1 = -EIO; |
dev | 92 | drivers/sound/patmgr.c | pmgr_opened[dev] = 0; |
dev | 96 | drivers/sound/patmgr.c | pmgr_read (int dev, struct fileinfo *file, char *buf, int count) |
dev | 103 | drivers/sound/patmgr.c | printk ("PATMGR%d: Invalid read count\n", dev); |
dev | 112 | drivers/sound/patmgr.c | while (!(mbox[dev] && msg_direction[dev] == A_TO_S) && |
dev | 116 | drivers/sound/patmgr.c | server_wait_flag[dev].mode = WK_SLEEP; |
dev | 117 | drivers/sound/patmgr.c | module_interruptible_sleep_on (&server_procs[dev]); |
dev | 118 | drivers/sound/patmgr.c | server_wait_flag[dev].mode &= ~WK_SLEEP;; |
dev | 121 | drivers/sound/patmgr.c | if (mbox[dev] && msg_direction[dev] == A_TO_S) |
dev | 123 | drivers/sound/patmgr.c | memcpy_tofs (&((buf)[0]), (char *) mbox[dev], count); |
dev | 124 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 138 | drivers/sound/patmgr.c | pmgr_write (int dev, struct fileinfo *file, const char *buf, int count) |
dev | 144 | drivers/sound/patmgr.c | printk ("PATMGR%d: Write count < 4\n", dev); |
dev | 148 | drivers/sound/patmgr.c | memcpy_fromfs ((char *) mbox[dev], &((buf)[0]), 4); |
dev | 150 | drivers/sound/patmgr.c | if (*(unsigned char *) mbox[dev] == SEQ_FULLSIZE) |
dev | 154 | drivers/sound/patmgr.c | tmp_dev = ((unsigned short *) mbox[dev])[2]; |
dev | 155 | drivers/sound/patmgr.c | if (tmp_dev != dev) |
dev | 158 | drivers/sound/patmgr.c | return synth_devs[dev]->load_patch (dev, *(unsigned short *) mbox[dev], |
dev | 164 | drivers/sound/patmgr.c | printk ("PATMGR%d: Invalid write count\n", dev); |
dev | 176 | drivers/sound/patmgr.c | if (mbox[dev] && !msg_direction[dev]) |
dev | 178 | drivers/sound/patmgr.c | memcpy_fromfs (&((char *) mbox[dev])[4], &((buf)[4]), count - 4); |
dev | 179 | drivers/sound/patmgr.c | msg_direction[dev] = S_TO_A; |
dev | 196 | drivers/sound/patmgr.c | pmgr_access (int dev, struct patmgr_info *rec) |
dev | 204 | drivers/sound/patmgr.c | if (mbox[dev]) |
dev | 205 | drivers/sound/patmgr.c | printk (" PATMGR: Server %d mbox full. Why?\n", dev); |
dev | 209 | drivers/sound/patmgr.c | mbox[dev] = rec; |
dev | 210 | drivers/sound/patmgr.c | msg_direction[dev] = A_TO_S; |
dev | 212 | drivers/sound/patmgr.c | if ((server_wait_flag[dev].mode & WK_SLEEP)) |
dev | 215 | drivers/sound/patmgr.c | server_wait_flag[dev].mode = WK_WAKEUP; |
dev | 216 | drivers/sound/patmgr.c | module_wake_up (&server_procs[dev]); |
dev | 225 | drivers/sound/patmgr.c | if (msg_direction[dev] != S_TO_A) |
dev | 237 | drivers/sound/patmgr.c | mbox[dev] = NULL; |
dev | 238 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 247 | drivers/sound/patmgr.c | pmgr_inform (int dev, int event, unsigned long p1, unsigned long p2, |
dev | 255 | drivers/sound/patmgr.c | if (!pmgr_opened[dev]) |
dev | 269 | drivers/sound/patmgr.c | if (mbox[dev]) |
dev | 270 | drivers/sound/patmgr.c | printk (" PATMGR: Server %d mbox full. Why?\n", dev); |
dev | 274 | drivers/sound/patmgr.c | mbox[dev] = tmp_mbox; |
dev | 275 | drivers/sound/patmgr.c | mbox[dev]->key = PM_K_EVENT; |
dev | 276 | drivers/sound/patmgr.c | mbox[dev]->command = event; |
dev | 277 | drivers/sound/patmgr.c | mbox[dev]->parm1 = p1; |
dev | 278 | drivers/sound/patmgr.c | mbox[dev]->parm2 = p2; |
dev | 279 | drivers/sound/patmgr.c | mbox[dev]->parm3 = p3; |
dev | 280 | drivers/sound/patmgr.c | msg_direction[dev] = A_TO_S; |
dev | 282 | drivers/sound/patmgr.c | if ((server_wait_flag[dev].mode & WK_SLEEP)) |
dev | 285 | drivers/sound/patmgr.c | server_wait_flag[dev].mode = WK_WAKEUP; |
dev | 286 | drivers/sound/patmgr.c | module_wake_up (&server_procs[dev]); |
dev | 294 | drivers/sound/patmgr.c | mbox[dev] = NULL; |
dev | 295 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 125 | drivers/sound/pss.c | set_irq (pss_config * devc, int dev, int irq) |
dev | 140 | drivers/sound/pss.c | tmp = inw (REG (dev)) & ~0x38; /* Load confreg, mask IRQ bits out */ |
dev | 148 | drivers/sound/pss.c | outw (tmp | bits, REG (dev)); |
dev | 153 | drivers/sound/pss.c | set_io_base (pss_config * devc, int dev, int base) |
dev | 155 | drivers/sound/pss.c | unsigned short tmp = inw (REG (dev)) & 0x003f; |
dev | 158 | drivers/sound/pss.c | outw (bits | tmp, REG (dev)); |
dev | 164 | drivers/sound/pss.c | set_dma (pss_config * devc, int dev, int dma) |
dev | 177 | drivers/sound/pss.c | tmp = inw (REG (dev)) & ~0x07; /* Load confreg, mask DMA bits out */ |
dev | 185 | drivers/sound/pss.c | outw (tmp | bits, REG (dev)); |
dev | 60 | drivers/sound/sb16_dsp.c | static int sb16_dsp_open (int dev, int mode); |
dev | 61 | drivers/sound/sb16_dsp.c | static void sb16_dsp_close (int dev); |
dev | 62 | drivers/sound/sb16_dsp.c | static void sb16_dsp_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart); |
dev | 63 | drivers/sound/sb16_dsp.c | static void sb16_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart); |
dev | 64 | drivers/sound/sb16_dsp.c | static int sb16_dsp_ioctl (int dev, unsigned int cmd, caddr_t arg, int local); |
dev | 65 | drivers/sound/sb16_dsp.c | static int sb16_dsp_prepare_for_input (int dev, int bsize, int bcount); |
dev | 66 | drivers/sound/sb16_dsp.c | static int sb16_dsp_prepare_for_output (int dev, int bsize, int bcount); |
dev | 67 | drivers/sound/sb16_dsp.c | static void sb16_dsp_reset (int dev); |
dev | 68 | drivers/sound/sb16_dsp.c | static void sb16_dsp_halt (int dev); |
dev | 69 | drivers/sound/sb16_dsp.c | static void sb16_dsp_trigger (int dev, int bits); |
dev | 154 | drivers/sound/sb16_dsp.c | sb16_dsp_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 206 | drivers/sound/sb16_dsp.c | sb16_dsp_open (int dev, int mode) |
dev | 242 | drivers/sound/sb16_dsp.c | sb16_dsp_close (int dev) |
dev | 253 | drivers/sound/sb16_dsp.c | audio_devs[dev]->dmachan1 = audio_devs[dev]->dmachan2 = dma8; |
dev | 269 | drivers/sound/sb16_dsp.c | sb16_dsp_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 279 | drivers/sound/sb16_dsp.c | actually_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 288 | drivers/sound/sb16_dsp.c | if (audio_devs[dev]->flags & DMA_AUTOMODE && |
dev | 303 | drivers/sound/sb16_dsp.c | sb16_dsp_halt (dev); |
dev | 304 | drivers/sound/sb16_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 322 | drivers/sound/sb16_dsp.c | sb16_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 332 | drivers/sound/sb16_dsp.c | actually_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 341 | drivers/sound/sb16_dsp.c | if (audio_devs[dev]->flags & DMA_AUTOMODE && |
dev | 356 | drivers/sound/sb16_dsp.c | sb16_dsp_halt (dev); |
dev | 357 | drivers/sound/sb16_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 377 | drivers/sound/sb16_dsp.c | sb16_dsp_prepare_for_input (int dev, int bsize, int bcount) |
dev | 389 | drivers/sound/sb16_dsp.c | sb16_dsp_prepare_for_output (int dev, int bsize, int bcount) |
dev | 401 | drivers/sound/sb16_dsp.c | sb16_dsp_trigger (int dev, int bits) |
dev | 434 | drivers/sound/sb16_dsp.c | sb16_dsp_reset (int dev) |
dev | 448 | drivers/sound/sb16_dsp.c | sb16_dsp_halt (int dev) |
dev | 83 | drivers/sound/sb16_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 118 | drivers/sound/sb16_midi.c | sb16midi_open (int dev, int mode, |
dev | 119 | drivers/sound/sb16_midi.c | void (*input) (int dev, unsigned char data), |
dev | 120 | drivers/sound/sb16_midi.c | void (*output) (int dev) |
dev | 139 | drivers/sound/sb16_midi.c | sb16midi_close (int dev) |
dev | 145 | drivers/sound/sb16_midi.c | sb16midi_out (int dev, unsigned char midi_byte) |
dev | 182 | drivers/sound/sb16_midi.c | sb16midi_start_read (int dev) |
dev | 188 | drivers/sound/sb16_midi.c | sb16midi_end_read (int dev) |
dev | 194 | drivers/sound/sb16_midi.c | sb16midi_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 200 | drivers/sound/sb16_midi.c | sb16midi_kick (int dev) |
dev | 205 | drivers/sound/sb16_midi.c | sb16midi_buffer_status (int dev) |
dev | 109 | drivers/sound/sb_dsp.c | static void sb_dsp_reset (int dev); |
dev | 459 | drivers/sound/sb_dsp.c | sb_dsp_output_block (int dev, unsigned long buf, int nr_bytes, |
dev | 470 | drivers/sound/sb_dsp.c | actually_output_block (int dev, unsigned long buf, int nr_bytes, |
dev | 479 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 483 | drivers/sound/sb_dsp.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 536 | drivers/sound/sb_dsp.c | sb_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, |
dev | 552 | drivers/sound/sb_dsp.c | actually_start_input (int dev, unsigned long buf, int nr_bytes, int intrflag, |
dev | 570 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 573 | drivers/sound/sb_dsp.c | if (audio_devs[dev]->dmachan1 > 3) |
dev | 627 | drivers/sound/sb_dsp.c | sb_dsp_trigger (int dev, int bits) |
dev | 658 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_input (int dev, int bsize, int bcount) |
dev | 733 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_output (int dev, int bsize, int bcount) |
dev | 807 | drivers/sound/sb_dsp.c | sb_dsp_halt_xfer (int dev) |
dev | 821 | drivers/sound/sb_dsp.c | sb_dsp_open (int dev, int mode) |
dev | 883 | drivers/sound/sb_dsp.c | sb_dsp_close (int dev) |
dev | 933 | drivers/sound/sb_dsp.c | sb_dsp_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 994 | drivers/sound/sb_dsp.c | sb_dsp_reset (int dev) |
dev | 68 | drivers/sound/sb_midi.c | void (*midi_input_intr) (int dev, unsigned char data); |
dev | 71 | drivers/sound/sb_midi.c | sb_midi_open (int dev, int mode, |
dev | 72 | drivers/sound/sb_midi.c | void (*input) (int dev, unsigned char data), |
dev | 73 | drivers/sound/sb_midi.c | void (*output) (int dev) |
dev | 137 | drivers/sound/sb_midi.c | sb_midi_close (int dev) |
dev | 152 | drivers/sound/sb_midi.c | sb_midi_out (int dev, unsigned char midi_byte) |
dev | 175 | drivers/sound/sb_midi.c | sb_midi_start_read (int dev) |
dev | 186 | drivers/sound/sb_midi.c | sb_midi_end_read (int dev) |
dev | 197 | drivers/sound/sb_midi.c | sb_midi_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 180 | drivers/sound/sb_mixer.c | change_bits (unsigned char *regval, int dev, int chn, int newval) |
dev | 185 | drivers/sound/sb_mixer.c | mask = (1 << (*iomap)[dev][chn].nbits) - 1; |
dev | 190 | drivers/sound/sb_mixer.c | shift = (*iomap)[dev][chn].bitoffs - (*iomap)[dev][LEFT_CHN].nbits + 1; |
dev | 201 | drivers/sound/sb_mixer.c | sb_mixer_get (int dev) |
dev | 203 | drivers/sound/sb_mixer.c | if (!((1 << dev) & supported_devices)) |
dev | 206 | drivers/sound/sb_mixer.c | return levels[dev]; |
dev | 249 | drivers/sound/sb_mixer.c | smw_mixer_set (int dev, int value) |
dev | 260 | drivers/sound/sb_mixer.c | if (dev > 31) |
dev | 263 | drivers/sound/sb_mixer.c | if (!(supported_devices & (1 << dev))) /* Not supported */ |
dev | 266 | drivers/sound/sb_mixer.c | switch (dev) |
dev | 275 | drivers/sound/sb_mixer.c | levels[dev] = left | (right << 8); |
dev | 289 | drivers/sound/sb_mixer.c | reg = smw_mix_regs[dev]; |
dev | 296 | drivers/sound/sb_mixer.c | levels[dev] = left | (right << 8); |
dev | 301 | drivers/sound/sb_mixer.c | sb_mixer_set (int dev, int value) |
dev | 310 | drivers/sound/sb_mixer.c | return smw_mixer_set (dev, value); |
dev | 317 | drivers/sound/sb_mixer.c | if (dev > 31) |
dev | 320 | drivers/sound/sb_mixer.c | if (!(supported_devices & (1 << dev))) /* |
dev | 325 | drivers/sound/sb_mixer.c | regoffs = (*iomap)[dev][LEFT_CHN].regno; |
dev | 331 | drivers/sound/sb_mixer.c | change_bits (&val, dev, LEFT_CHN, left); |
dev | 333 | drivers/sound/sb_mixer.c | levels[dev] = left | (left << 8); |
dev | 335 | drivers/sound/sb_mixer.c | if ((*iomap)[dev][RIGHT_CHN].regno != regoffs) /* |
dev | 342 | drivers/sound/sb_mixer.c | regoffs = (*iomap)[dev][RIGHT_CHN].regno; |
dev | 354 | drivers/sound/sb_mixer.c | change_bits (&val, dev, RIGHT_CHN, right); |
dev | 358 | drivers/sound/sb_mixer.c | levels[dev] = left | (right << 8); |
dev | 448 | drivers/sound/sb_mixer.c | sb_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg) |
dev | 104 | drivers/sound/sequencer.c | sequencer_read (int dev, struct fileinfo *file, char *buf, int count) |
dev | 110 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 114 | drivers/sound/sequencer.c | if (dev) /* |
dev | 117 | drivers/sound/sequencer.c | return pmgr_read (dev - 1, file, buf, count); |
dev | 171 | drivers/sound/sequencer.c | sequencer_midi_output (int dev) |
dev | 212 | drivers/sound/sequencer.c | sequencer_midi_input (int dev, unsigned char data) |
dev | 231 | drivers/sound/sequencer.c | event_rec[2] = dev; |
dev | 265 | drivers/sound/sequencer.c | sequencer_write (int dev, struct fileinfo *file, const char *buf, int count) |
dev | 272 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 274 | drivers/sound/sequencer.c | DEB (printk ("sequencer_write(dev=%d, count=%d)\n", dev, count)); |
dev | 279 | drivers/sound/sequencer.c | if (dev) |
dev | 280 | drivers/sound/sequencer.c | return pmgr_write (dev - 1, file, buf, count); |
dev | 293 | drivers/sound/sequencer.c | dev = *(unsigned short *) &event_rec[2]; |
dev | 294 | drivers/sound/sequencer.c | if (dev < 0 || dev >= max_synthdev) |
dev | 297 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 300 | drivers/sound/sequencer.c | err = synth_devs[dev]->load_patch (dev, *(short *) &event_rec[0], buf, p + 4, c, 0); |
dev | 343 | drivers/sound/sequencer.c | int dev = event_rec[2]; |
dev | 345 | drivers/sound/sequencer.c | if (dev >= max_mididev) |
dev | 347 | drivers/sound/sequencer.c | printk ("Sequencer Error: Nonexistent MIDI device %d\n", dev); |
dev | 353 | drivers/sound/sequencer.c | if ((err = midi_devs[dev]->open (dev, mode, |
dev | 357 | drivers/sound/sequencer.c | printk ("Sequencer Error: Unable to open Midi #%d\n", dev); |
dev | 361 | drivers/sound/sequencer.c | midi_opened[dev] = 1; |
dev | 435 | drivers/sound/sequencer.c | int dev = q[2]; |
dev | 437 | drivers/sound/sequencer.c | if (dev < 0 || dev >= max_synthdev) |
dev | 440 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 446 | drivers/sound/sequencer.c | synth_devs[dev]->kill_note (dev, q[3], q[4], q[5]); |
dev | 453 | drivers/sound/sequencer.c | synth_devs[dev]->start_note (dev, q[3], q[4], q[5]); |
dev | 457 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, q[3], q[4]); |
dev | 461 | drivers/sound/sequencer.c | synth_devs[dev]->aftertouch (dev, q[3], q[4]); |
dev | 465 | drivers/sound/sequencer.c | synth_devs[dev]->panning (dev, q[3], (char) q[4]); |
dev | 469 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, q[3], q[4], (short) (q[5] | (q[6] << 8))); |
dev | 473 | drivers/sound/sequencer.c | if (synth_devs[dev]->volume_method != NULL) |
dev | 474 | drivers/sound/sequencer.c | synth_devs[dev]->volume_method (dev, q[3]); |
dev | 485 | drivers/sound/sequencer.c | find_voice (int dev, int chn, int note) |
dev | 492 | drivers/sound/sequencer.c | for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++) |
dev | 493 | drivers/sound/sequencer.c | if (synth_devs[dev]->alloc.map[i] == key) |
dev | 500 | drivers/sound/sequencer.c | alloc_voice (int dev, int chn, int note) |
dev | 507 | drivers/sound/sequencer.c | voice = synth_devs[dev]->alloc_voice (dev, chn, note, |
dev | 508 | drivers/sound/sequencer.c | &synth_devs[dev]->alloc); |
dev | 509 | drivers/sound/sequencer.c | synth_devs[dev]->alloc.map[voice] = key; |
dev | 510 | drivers/sound/sequencer.c | synth_devs[dev]->alloc.alloc_times[voice] = |
dev | 511 | drivers/sound/sequencer.c | synth_devs[dev]->alloc.timestamp++; |
dev | 518 | drivers/sound/sequencer.c | unsigned char dev = event_rec[1]; |
dev | 525 | drivers/sound/sequencer.c | if ((int) dev > max_synthdev) |
dev | 527 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 529 | drivers/sound/sequencer.c | if (!synth_devs[dev]) |
dev | 534 | drivers/sound/sequencer.c | if (synth_devs[dev]->alloc_voice) |
dev | 535 | drivers/sound/sequencer.c | voice = find_voice (dev, chn, note); |
dev | 550 | drivers/sound/sequencer.c | if (voice == -1 && seq_mode == SEQ_2 && synth_devs[dev]->alloc_voice) |
dev | 552 | drivers/sound/sequencer.c | voice = alloc_voice (dev, chn, note); |
dev | 558 | drivers/sound/sequencer.c | if (seq_mode == SEQ_2 && (int) dev < num_synths) |
dev | 567 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, voice, 128 + note); |
dev | 575 | drivers/sound/sequencer.c | synth_devs[dev]->setup_voice (dev, voice, chn); |
dev | 578 | drivers/sound/sequencer.c | synth_devs[dev]->start_note (dev, voice, note, parm); |
dev | 584 | drivers/sound/sequencer.c | synth_devs[dev]->kill_note (dev, voice, note, parm); |
dev | 590 | drivers/sound/sequencer.c | synth_devs[dev]->aftertouch (dev, voice, parm); |
dev | 600 | drivers/sound/sequencer.c | unsigned char dev = event_rec[1]; |
dev | 608 | drivers/sound/sequencer.c | if ((int) dev > max_synthdev) |
dev | 610 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 612 | drivers/sound/sequencer.c | if (!synth_devs[dev]) |
dev | 620 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].pgm_num = p1; |
dev | 621 | drivers/sound/sequencer.c | if ((int) dev >= num_synths) |
dev | 622 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, chn, p1); |
dev | 625 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, chn, p1); |
dev | 635 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].controllers[p1] = w14 & 0x7f; |
dev | 638 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].controllers[p1 + 32] = 0; |
dev | 640 | drivers/sound/sequencer.c | if ((int) dev < num_synths) |
dev | 647 | drivers/sound/sequencer.c | val = ((synth_devs[dev]-> |
dev | 649 | drivers/sound/sequencer.c | | (synth_devs[dev]-> |
dev | 658 | drivers/sound/sequencer.c | for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++) |
dev | 659 | drivers/sound/sequencer.c | if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key) |
dev | 660 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, i, p1, val); |
dev | 663 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, chn, p1, w14); |
dev | 666 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, chn, p1, w14); |
dev | 672 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].bender_value = w14; |
dev | 674 | drivers/sound/sequencer.c | if ((int) dev < num_synths) |
dev | 680 | drivers/sound/sequencer.c | for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++) |
dev | 681 | drivers/sound/sequencer.c | if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key) |
dev | 682 | drivers/sound/sequencer.c | synth_devs[dev]->bender (dev, i, w14); |
dev | 685 | drivers/sound/sequencer.c | synth_devs[dev]->bender (dev, chn, w14); |
dev | 688 | drivers/sound/sequencer.c | synth_devs[dev]->bender (dev, chn, w14); |
dev | 819 | drivers/sound/sequencer.c | int dev = event_rec[1]; |
dev | 823 | drivers/sound/sequencer.c | if ((int) dev > max_synthdev) |
dev | 825 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 827 | drivers/sound/sequencer.c | if (!synth_devs[dev]) |
dev | 829 | drivers/sound/sequencer.c | if (!synth_devs[dev]->send_sysex) |
dev | 837 | drivers/sound/sequencer.c | synth_devs[dev]->send_sysex (dev, buf, l); |
dev | 925 | drivers/sound/sequencer.c | int dev; |
dev | 927 | drivers/sound/sequencer.c | dev = q[2]; |
dev | 929 | drivers/sound/sequencer.c | if (!midi_devs[dev]->putc (dev, q[1])) |
dev | 940 | drivers/sound/sequencer.c | midi_written[dev] = 1; |
dev | 1037 | drivers/sound/sequencer.c | reset_controllers (int dev, unsigned char *controller, int update_dev) |
dev | 1049 | drivers/sound/sequencer.c | int dev; |
dev | 1053 | drivers/sound/sequencer.c | for (dev = 0; dev < num_midis; dev++) |
dev | 1054 | drivers/sound/sequencer.c | if (midi_devs[dev]->converter != NULL) |
dev | 1057 | drivers/sound/sequencer.c | midi_devs[dev]->converter; |
dev | 1060 | drivers/sound/sequencer.c | for (dev = 0; dev < max_synthdev; dev++) |
dev | 1066 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].pgm_num = 0; |
dev | 1067 | drivers/sound/sequencer.c | reset_controllers (dev, |
dev | 1068 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].controllers, |
dev | 1070 | drivers/sound/sequencer.c | synth_devs[dev]->chn_info[chn].bender_value = (1 << 7); /* Neutral */ |
dev | 1079 | drivers/sound/sequencer.c | sequencer_open (int dev, struct fileinfo *file) |
dev | 1085 | drivers/sound/sequencer.c | level = ((dev & 0x0f) == SND_DEV_SEQ2) ? 2 : 1; |
dev | 1087 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 1090 | drivers/sound/sequencer.c | DEB (printk ("sequencer_open(dev=%d)\n", dev)); |
dev | 1098 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 1276 | drivers/sound/sequencer.c | sequencer_release (int dev, struct fileinfo *file) |
dev | 1281 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 1283 | drivers/sound/sequencer.c | DEB (printk ("sequencer_release(dev=%d)\n", dev)); |
dev | 1285 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1289 | drivers/sound/sequencer.c | dev--; |
dev | 1290 | drivers/sound/sequencer.c | pmgr_release (dev); |
dev | 1291 | drivers/sound/sequencer.c | pmgr_present[dev] = 0; |
dev | 1378 | drivers/sound/sequencer.c | midi_outc (int dev, unsigned char data) |
dev | 1397 | drivers/sound/sequencer.c | while (n && !midi_devs[dev]->putc (dev, data)) |
dev | 1528 | drivers/sound/sequencer.c | sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 1534 | drivers/sound/sequencer.c | orig_dev = dev = dev >> 4; |
dev | 1545 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 1554 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 1575 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1591 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1601 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1627 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1645 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 1664 | drivers/sound/sequencer.c | dev = get_fs_long ((long *) arg); |
dev | 1665 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 1670 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 1675 | drivers/sound/sequencer.c | if (!orig_dev && pmgr_present[dev]) |
dev | 1676 | drivers/sound/sequencer.c | pmgr_inform (dev, PM_E_PATCH_RESET, 0, 0, 0, 0); |
dev | 1678 | drivers/sound/sequencer.c | err = synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 1693 | drivers/sound/sequencer.c | int dev = get_fs_long ((long *) arg); |
dev | 1695 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 1698 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 1701 | drivers/sound/sequencer.c | return snd_ioctl_return ((int *) arg, synth_devs[dev]->ioctl (dev, cmd, arg)); |
dev | 1707 | drivers/sound/sequencer.c | int dev = get_fs_long ((long *) arg); |
dev | 1709 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 1712 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 1715 | drivers/sound/sequencer.c | synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 1723 | drivers/sound/sequencer.c | int dev; |
dev | 1726 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 1728 | drivers/sound/sequencer.c | if (dev < 0 || dev >= max_synthdev) |
dev | 1731 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 1734 | drivers/sound/sequencer.c | return synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 1757 | drivers/sound/sequencer.c | int dev; |
dev | 1760 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 1762 | drivers/sound/sequencer.c | if (dev < 0 || dev >= max_mididev) |
dev | 1765 | drivers/sound/sequencer.c | memcpy_tofs ((&((char *) arg)[0]), (char *) &(midi_devs[dev]->info), sizeof (inf)); |
dev | 1773 | drivers/sound/sequencer.c | int dev, err; |
dev | 1782 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 1784 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 1790 | drivers/sound/sequencer.c | if (!synth_devs[dev]->pmgr_interface) |
dev | 1796 | drivers/sound/sequencer.c | if ((err = synth_devs[dev]->pmgr_interface (dev, inf)) == -1) |
dev | 1811 | drivers/sound/sequencer.c | int dev, err; |
dev | 1820 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 1822 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 1828 | drivers/sound/sequencer.c | if (!pmgr_present[dev]) |
dev | 1834 | drivers/sound/sequencer.c | if ((err = pmgr_access (dev, inf)) < 0) |
dev | 1850 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1878 | drivers/sound/sequencer.c | if (dev) /* |
dev | 1898 | drivers/sound/sequencer.c | sequencer_select (int dev, struct fileinfo *file, int sel_type, select_table_handle * wait) |
dev | 1902 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 5 | drivers/sound/sound_calls.h | int DMAbuf_open(int dev, int mode); |
dev | 6 | drivers/sound/sound_calls.h | int DMAbuf_release(int dev, int mode); |
dev | 7 | drivers/sound/sound_calls.h | int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock); |
dev | 8 | drivers/sound/sound_calls.h | int DMAbuf_get_curr_buffer(int dev, int *buff_no, char **dma_buf, int *buff_ptr, int *buff_size); |
dev | 9 | drivers/sound/sound_calls.h | int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock); |
dev | 10 | drivers/sound/sound_calls.h | int DMAbuf_rmchars(int dev, int buff_no, int c); |
dev | 11 | drivers/sound/sound_calls.h | int DMAbuf_start_output(int dev, int buff_no, int l); |
dev | 12 | drivers/sound/sound_calls.h | int DMAbuf_set_count(int dev, int buff_no, int l); |
dev | 13 | drivers/sound/sound_calls.h | int DMAbuf_ioctl(int dev, unsigned int cmd, caddr_t arg, int local); |
dev | 15 | drivers/sound/sound_calls.h | int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode); |
dev | 16 | drivers/sound/sound_calls.h | int DMAbuf_open_dma (int dev); |
dev | 17 | drivers/sound/sound_calls.h | void DMAbuf_close_dma (int dev); |
dev | 18 | drivers/sound/sound_calls.h | void DMAbuf_reset_dma (int dev); |
dev | 19 | drivers/sound/sound_calls.h | void DMAbuf_inputintr(int dev); |
dev | 20 | drivers/sound/sound_calls.h | void DMAbuf_outputintr(int dev, int underflow_flag); |
dev | 21 | drivers/sound/sound_calls.h | int DMAbuf_select(int dev, struct fileinfo *file, int sel_type, select_table_handle * wait); |
dev | 28 | drivers/sound/sound_calls.h | int audio_read (int dev, struct fileinfo *file, char *buf, int count); |
dev | 29 | drivers/sound/sound_calls.h | int audio_write (int dev, struct fileinfo *file, const char *buf, int count); |
dev | 30 | drivers/sound/sound_calls.h | int audio_open (int dev, struct fileinfo *file); |
dev | 31 | drivers/sound/sound_calls.h | void audio_release (int dev, struct fileinfo *file); |
dev | 32 | drivers/sound/sound_calls.h | int audio_ioctl (int dev, struct fileinfo *file, |
dev | 34 | drivers/sound/sound_calls.h | int audio_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 37 | drivers/sound/sound_calls.h | int audio_select(int dev, struct fileinfo *file, int sel_type, select_table_handle * wait); |
dev | 43 | drivers/sound/sound_calls.h | int sequencer_read (int dev, struct fileinfo *file, char *buf, int count); |
dev | 44 | drivers/sound/sound_calls.h | int sequencer_write (int dev, struct fileinfo *file, const char *buf, int count); |
dev | 45 | drivers/sound/sound_calls.h | int sequencer_open (int dev, struct fileinfo *file); |
dev | 46 | drivers/sound/sound_calls.h | void sequencer_release (int dev, struct fileinfo *file); |
dev | 47 | drivers/sound/sound_calls.h | int sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 49 | drivers/sound/sound_calls.h | int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 57 | drivers/sound/sound_calls.h | int sequencer_select(int dev, struct fileinfo *file, int sel_type, select_table_handle * wait); |
dev | 63 | drivers/sound/sound_calls.h | int MIDIbuf_read (int dev, struct fileinfo *file, char *buf, int count); |
dev | 64 | drivers/sound/sound_calls.h | int MIDIbuf_write (int dev, struct fileinfo *file, const char *buf, int count); |
dev | 65 | drivers/sound/sound_calls.h | int MIDIbuf_open (int dev, struct fileinfo *file); |
dev | 66 | drivers/sound/sound_calls.h | void MIDIbuf_release (int dev, struct fileinfo *file); |
dev | 67 | drivers/sound/sound_calls.h | int MIDIbuf_ioctl (int dev, struct fileinfo *file, |
dev | 69 | drivers/sound/sound_calls.h | int MIDIbuf_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 70 | drivers/sound/sound_calls.h | void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count); |
dev | 73 | drivers/sound/sound_calls.h | int MIDIbuf_select(int dev, struct fileinfo *file, int sel_type, select_table_handle * wait); |
dev | 88 | drivers/sound/sound_calls.h | void sound_dma_malloc(int dev); |
dev | 89 | drivers/sound/sound_calls.h | void sound_dma_free(int dev); |
dev | 94 | drivers/sound/sound_calls.h | int sound_read_sw (int dev, struct fileinfo *file, char *buf, int count); |
dev | 95 | drivers/sound/sound_calls.h | int sound_write_sw (int dev, struct fileinfo *file, const char *buf, int count); |
dev | 96 | drivers/sound/sound_calls.h | int sound_open_sw (int dev, struct fileinfo *file); |
dev | 97 | drivers/sound/sound_calls.h | void sound_release_sw (int dev, struct fileinfo *file); |
dev | 98 | drivers/sound/sound_calls.h | int sound_ioctl_sw (int dev, struct fileinfo *file, |
dev | 180 | drivers/sound/sound_calls.h | int gus_default_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg); |
dev | 200 | drivers/sound/sound_calls.h | int pmgr_open(int dev); |
dev | 201 | drivers/sound/sound_calls.h | void pmgr_release(int dev); |
dev | 202 | drivers/sound/sound_calls.h | int pmgr_read (int dev, struct fileinfo *file, char * buf, int count); |
dev | 203 | drivers/sound/sound_calls.h | int pmgr_write (int dev, struct fileinfo *file, const char * buf, int count); |
dev | 204 | drivers/sound/sound_calls.h | int pmgr_access(int dev, struct patmgr_info *rec); |
dev | 205 | drivers/sound/sound_calls.h | int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2, |
dev | 244 | drivers/sound/sound_calls.h | int pss_read (int dev, struct fileinfo *file, char *buf, int count); |
dev | 245 | drivers/sound/sound_calls.h | int pss_write (int dev, struct fileinfo *file, char *buf, int count); |
dev | 246 | drivers/sound/sound_calls.h | int pss_open (int dev, struct fileinfo *file); |
dev | 247 | drivers/sound/sound_calls.h | void pss_release (int dev, struct fileinfo *file); |
dev | 248 | drivers/sound/sound_calls.h | int pss_ioctl (int dev, struct fileinfo *file, |
dev | 250 | drivers/sound/sound_calls.h | int pss_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 336 | drivers/sound/sound_switch.c | sound_read_sw (int dev, struct fileinfo *file, char *buf, int count) |
dev | 338 | drivers/sound/sound_switch.c | DEB (printk ("sound_read_sw(dev=%d, count=%d)\n", dev, count)); |
dev | 340 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 350 | drivers/sound/sound_switch.c | return audio_read (dev, file, buf, count); |
dev | 357 | drivers/sound/sound_switch.c | return sequencer_read (dev, file, buf, count); |
dev | 363 | drivers/sound/sound_switch.c | return MIDIbuf_read (dev, file, buf, count); |
dev | 367 | drivers/sound/sound_switch.c | printk ("Sound: Undefined minor device %d\n", dev); |
dev | 374 | drivers/sound/sound_switch.c | sound_write_sw (int dev, struct fileinfo *file, const char *buf, int count) |
dev | 377 | drivers/sound/sound_switch.c | DEB (printk ("sound_write_sw(dev=%d, count=%d)\n", dev, count)); |
dev | 379 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 385 | drivers/sound/sound_switch.c | return sequencer_write (dev, file, buf, count); |
dev | 393 | drivers/sound/sound_switch.c | return audio_write (dev, file, buf, count); |
dev | 399 | drivers/sound/sound_switch.c | return MIDIbuf_write (dev, file, buf, count); |
dev | 408 | drivers/sound/sound_switch.c | sound_open_sw (int dev, struct fileinfo *file) |
dev | 412 | drivers/sound/sound_switch.c | DEB (printk ("sound_open_sw(dev=%d)\n", dev)); |
dev | 414 | drivers/sound/sound_switch.c | if ((dev >= SND_NDEVS) || (dev < 0)) |
dev | 416 | drivers/sound/sound_switch.c | printk ("Invalid minor device %d\n", dev); |
dev | 420 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 433 | drivers/sound/sound_switch.c | if ((dev & 0xf0) && ((dev & 0xf0) >> 4) >= num_mixers) |
dev | 441 | drivers/sound/sound_switch.c | if ((retval = sequencer_open (dev, file)) < 0) |
dev | 448 | drivers/sound/sound_switch.c | if ((retval = MIDIbuf_open (dev, file)) < 0) |
dev | 457 | drivers/sound/sound_switch.c | if ((retval = audio_open (dev, file)) < 0) |
dev | 463 | drivers/sound/sound_switch.c | printk ("Invalid minor device %d\n", dev); |
dev | 473 | drivers/sound/sound_switch.c | sound_release_sw (int dev, struct fileinfo *file) |
dev | 476 | drivers/sound/sound_switch.c | DEB (printk ("sound_release_sw(dev=%d)\n", dev)); |
dev | 478 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 493 | drivers/sound/sound_switch.c | sequencer_release (dev, file); |
dev | 499 | drivers/sound/sound_switch.c | MIDIbuf_release (dev, file); |
dev | 507 | drivers/sound/sound_switch.c | audio_release (dev, file); |
dev | 512 | drivers/sound/sound_switch.c | printk ("Sound error: Releasing unknown device 0x%02x\n", dev); |
dev | 518 | drivers/sound/sound_switch.c | sound_ioctl_sw (int dev, struct fileinfo *file, |
dev | 521 | drivers/sound/sound_switch.c | DEB (printk ("sound_ioctl_sw(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg)); |
dev | 524 | drivers/sound/sound_switch.c | if ((dev & 0x0f) != SND_DEV_CTL) |
dev | 526 | drivers/sound/sound_switch.c | int dtype = dev & 0x0f; |
dev | 535 | drivers/sound/sound_switch.c | mixdev = audio_devs[dev >> 4]->mixer_dev; |
dev | 547 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 555 | drivers/sound/sound_switch.c | dev = dev >> 4; |
dev | 557 | drivers/sound/sound_switch.c | if (dev >= num_mixers) |
dev | 560 | drivers/sound/sound_switch.c | return mixer_devs[dev]->ioctl (dev, cmd, arg); |
dev | 566 | drivers/sound/sound_switch.c | return sequencer_ioctl (dev, file, cmd, arg); |
dev | 574 | drivers/sound/sound_switch.c | return audio_ioctl (dev, file, cmd, arg); |
dev | 580 | drivers/sound/sound_switch.c | return MIDIbuf_ioctl (dev, file, cmd, arg); |
dev | 76 | drivers/sound/sound_timer.c | usecs_per_tmr = tmr->tmr_start (tmr->dev, usecs_per_tick); |
dev | 110 | drivers/sound/sound_timer.c | timer_open (int dev, int mode) |
dev | 125 | drivers/sound/sound_timer.c | timer_close (int dev) |
dev | 128 | drivers/sound/sound_timer.c | tmr->tmr_disable (tmr->dev); |
dev | 132 | drivers/sound/sound_timer.c | timer_event (int dev, unsigned char *event) |
dev | 197 | drivers/sound/sound_timer.c | timer_get_time (int dev) |
dev | 206 | drivers/sound/sound_timer.c | timer_ioctl (int dev, |
dev | 287 | drivers/sound/sound_timer.c | timer_arm (int dev, long time) |
dev | 318 | drivers/sound/sound_timer.c | tmr->tmr_restart (tmr->dev); |
dev | 71 | drivers/sound/soundcard.c | int dev; |
dev | 73 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 74 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 75 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 77 | drivers/sound/soundcard.c | return sound_read_sw (dev, &files[dev], buf, count); |
dev | 83 | drivers/sound/soundcard.c | int dev; |
dev | 85 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 86 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 87 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 89 | drivers/sound/soundcard.c | return sound_write_sw (dev, &files[dev], buf, count); |
dev | 101 | drivers/sound/soundcard.c | int dev, retval; |
dev | 110 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 111 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 113 | drivers/sound/soundcard.c | if (!soundcard_configured && dev != SND_DEV_CTL && dev != SND_DEV_STATUS) |
dev | 129 | drivers/sound/soundcard.c | if ((retval = sound_open_sw (dev, &tmp_file)) < 0) |
dev | 136 | drivers/sound/soundcard.c | memcpy ((char *) &files[dev], (char *) &tmp_file, sizeof (tmp_file)); |
dev | 143 | drivers/sound/soundcard.c | int dev; |
dev | 145 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 146 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 148 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 150 | drivers/sound/soundcard.c | sound_release_sw (dev, &files[dev]); |
dev | 160 | drivers/sound/soundcard.c | int dev, err; |
dev | 162 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 163 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 164 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 189 | drivers/sound/soundcard.c | err = sound_ioctl_sw (dev, &files[dev], cmd, (caddr_t) arg); |
dev | 197 | drivers/sound/soundcard.c | int dev; |
dev | 199 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 200 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 201 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 203 | drivers/sound/soundcard.c | DEB (printk ("sound_select(dev=%d, type=0x%x)\n", dev, sel_type)); |
dev | 205 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 210 | drivers/sound/soundcard.c | return sequencer_select (dev, &files[dev], sel_type, wait); |
dev | 216 | drivers/sound/soundcard.c | return MIDIbuf_select (dev, &files[dev], sel_type, wait); |
dev | 224 | drivers/sound/soundcard.c | return audio_select (dev, &files[dev], sel_type, wait); |
dev | 238 | drivers/sound/soundcard.c | int dev, dev_class; |
dev | 242 | drivers/sound/soundcard.c | dev = inode_get_rdev (inode); |
dev | 243 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 244 | drivers/sound/soundcard.c | files[dev].flags = file_get_flags (file); |
dev | 246 | drivers/sound/soundcard.c | dev_class = dev & 0x0f; |
dev | 247 | drivers/sound/soundcard.c | dev >>= 4; |
dev | 263 | drivers/sound/soundcard.c | dmap = audio_devs[dev]->dmap_in; |
dev | 267 | drivers/sound/soundcard.c | dmap = audio_devs[dev]->dmap_out; |
dev | 609 | drivers/sound/soundcard.c | sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan) |
dev | 630 | drivers/sound/soundcard.c | printk ("sound: buffsize[%d] = %lu\n", dev, audio_devs[dev]->buffsize); |
dev | 632 | drivers/sound/soundcard.c | audio_devs[dev]->buffsize = dma_buffsize; |
dev | 634 | drivers/sound/soundcard.c | if (audio_devs[dev]->buffsize > dma_pagesize) |
dev | 635 | drivers/sound/soundcard.c | audio_devs[dev]->buffsize = dma_pagesize; |
dev | 644 | drivers/sound/soundcard.c | while (start_addr == NULL && audio_devs[dev]->buffsize > PAGE_SIZE) |
dev | 649 | drivers/sound/soundcard.c | size < audio_devs[dev]->buffsize; |
dev | 652 | drivers/sound/soundcard.c | audio_devs[dev]->buffsize = PAGE_SIZE * (1 << sz); |
dev | 655 | drivers/sound/soundcard.c | audio_devs[dev]->buffsize /= 2; |
dev | 666 | drivers/sound/soundcard.c | end_addr = start_addr + audio_devs[dev]->buffsize - 1; |
dev | 681 | drivers/sound/soundcard.c | audio_devs[dev]->buffsize); |
dev | 688 | drivers/sound/soundcard.c | memset (dmap->raw_buf, 0x00, audio_devs[dev]->buffsize); |
dev | 699 | drivers/sound/soundcard.c | sound_free_dmap (int dev, struct dma_buffparms *dmap) |
dev | 712 | drivers/sound/soundcard.c | size < audio_devs[dev]->buffsize; |
dev | 716 | drivers/sound/soundcard.c | end_addr = start_addr + audio_devs[dev]->buffsize; |
dev | 729 | drivers/sound/soundcard.c | soud_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc * info) |
dev | 693 | drivers/sound/sscape.c | sscape_audio_open (int dev, int mode) |
dev | 696 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
dev | 724 | drivers/sound/sscape.c | sscape_audio_close (int dev) |
dev | 727 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
dev | 758 | drivers/sound/sscape.c | sscape_audio_ioctl (int dev, unsigned int cmd, caddr_t arg, int local) |
dev | 760 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
dev | 805 | drivers/sound/sscape.c | sscape_audio_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 810 | drivers/sound/sscape.c | sscape_audio_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart) |
dev | 815 | drivers/sound/sscape.c | sscape_audio_prepare_for_input (int dev, int bsize, int bcount) |
dev | 821 | drivers/sound/sscape.c | sscape_audio_prepare_for_output (int dev, int bsize, int bcount) |
dev | 827 | drivers/sound/sscape.c | sscape_audio_halt (int dev) |
dev | 832 | drivers/sound/sscape.c | sscape_audio_reset (int dev) |
dev | 834 | drivers/sound/sscape.c | sscape_audio_halt (dev); |
dev | 106 | drivers/sound/sys_timer.c | def_tmr_open (int dev, int mode) |
dev | 127 | drivers/sound/sys_timer.c | def_tmr_close (int dev) |
dev | 134 | drivers/sound/sys_timer.c | def_tmr_event (int dev, unsigned char *event) |
dev | 196 | drivers/sound/sys_timer.c | def_tmr_get_time (int dev) |
dev | 205 | drivers/sound/sys_timer.c | def_tmr_ioctl (int dev, |
dev | 285 | drivers/sound/sys_timer.c | def_tmr_arm (int dev, long time) |
dev | 80 | drivers/sound/uart6850.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 149 | drivers/sound/uart6850.c | uart6850_open (int dev, int mode, |
dev | 150 | drivers/sound/uart6850.c | void (*input) (int dev, unsigned char data), |
dev | 151 | drivers/sound/uart6850.c | void (*output) (int dev) |
dev | 175 | drivers/sound/uart6850.c | uart6850_close (int dev) |
dev | 184 | drivers/sound/uart6850.c | uart6850_out (int dev, unsigned char midi_byte) |
dev | 221 | drivers/sound/uart6850.c | uart6850_command (int dev, unsigned char *midi_byte) |
dev | 227 | drivers/sound/uart6850.c | uart6850_start_read (int dev) |
dev | 233 | drivers/sound/uart6850.c | uart6850_end_read (int dev) |
dev | 239 | drivers/sound/uart6850.c | uart6850_ioctl (int dev, unsigned cmd, caddr_t arg) |
dev | 245 | drivers/sound/uart6850.c | uart6850_kick (int dev) |
dev | 250 | drivers/sound/uart6850.c | uart6850_buffer_status (int dev) |
dev | 34 | fs/block_dev.c | kdev_t dev; |
dev | 40 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 44 | fs/block_dev.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 45 | fs/block_dev.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 59 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 60 | fs/block_dev.c | size = ((loff_t) blk_size[MAJOR(dev)][MINOR(dev)] << BLOCK_SIZE_BITS) >> blocksize_bits; |
dev | 72 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
dev | 74 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
dev | 79 | fs/block_dev.c | generate_cluster(dev, cluster_list, blocksize); |
dev | 80 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
dev | 84 | fs/block_dev.c | !read_ahead[MAJOR(dev)]) { |
dev | 87 | fs/block_dev.c | bh = bread(dev,block,blocksize); |
dev | 90 | fs/block_dev.c | blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9) / 2; |
dev | 100 | fs/block_dev.c | generate_cluster(dev, cluster_list, blocksize); |
dev | 102 | fs/block_dev.c | bhlist[i] = getblk (dev, block+i, blocksize); |
dev | 175 | fs/block_dev.c | kdev_t dev; |
dev | 179 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 181 | fs/block_dev.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 182 | fs/block_dev.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 191 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 192 | fs/block_dev.c | size = (loff_t) blk_size[MAJOR(dev)][MINOR(dev)] << BLOCK_SIZE_BITS; |
dev | 216 | fs/block_dev.c | if (blocks < read_ahead[MAJOR(dev)] / (blocksize >> 9)) |
dev | 217 | fs/block_dev.c | blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9); |
dev | 246 | fs/block_dev.c | generate_cluster(dev, cluster_list, blocksize); |
dev | 249 | fs/block_dev.c | *bhb = getblk(dev, block++, blocksize); |
dev | 154 | fs/buffer.c | static int sync_buffers(kdev_t dev, int wait) |
dev | 179 | fs/buffer.c | if (dev && bh->b_dev != dev) |
dev | 231 | fs/buffer.c | void sync_dev(kdev_t dev) |
dev | 233 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 234 | fs/buffer.c | sync_supers(dev); |
dev | 235 | fs/buffer.c | sync_inodes(dev); |
dev | 236 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 237 | fs/buffer.c | sync_dquots(dev, -1); |
dev | 240 | fs/buffer.c | int fsync_dev(kdev_t dev) |
dev | 242 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 243 | fs/buffer.c | sync_supers(dev); |
dev | 244 | fs/buffer.c | sync_inodes(dev); |
dev | 245 | fs/buffer.c | sync_dquots(dev, -1); |
dev | 246 | fs/buffer.c | return sync_buffers(dev, 1); |
dev | 289 | fs/buffer.c | void invalidate_buffers(kdev_t dev) |
dev | 298 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 301 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 314 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(HASHDEV(dev)^block))%nr_hash) |
dev | 315 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
dev | 463 | fs/buffer.c | static inline struct buffer_head * find_buffer(kdev_t dev, int block, int size) |
dev | 467 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
dev | 468 | fs/buffer.c | if (tmp->b_blocknr == block && tmp->b_dev == dev) |
dev | 473 | fs/buffer.c | kdevname(dev)); |
dev | 486 | fs/buffer.c | struct buffer_head * get_hash_table(kdev_t dev, int block, int size) |
dev | 491 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
dev | 495 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block |
dev | 502 | fs/buffer.c | void set_blocksize(kdev_t dev, int size) |
dev | 507 | fs/buffer.c | if (!blksize_size[MAJOR(dev)]) |
dev | 518 | fs/buffer.c | if (blksize_size[MAJOR(dev)][MINOR(dev)] == 0 && size == BLOCK_SIZE) { |
dev | 519 | fs/buffer.c | blksize_size[MAJOR(dev)][MINOR(dev)] = size; |
dev | 522 | fs/buffer.c | if (blksize_size[MAJOR(dev)][MINOR(dev)] == size) |
dev | 524 | fs/buffer.c | sync_buffers(dev, 2); |
dev | 525 | fs/buffer.c | blksize_size[MAJOR(dev)][MINOR(dev)] = size; |
dev | 535 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 541 | fs/buffer.c | if (bh->b_dev == dev && bh->b_size != size) { |
dev | 748 | fs/buffer.c | struct buffer_head * getblk(kdev_t dev, int block, int size) |
dev | 760 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
dev | 773 | fs/buffer.c | if (find_buffer(dev,block,size)) |
dev | 784 | fs/buffer.c | bh->b_dev=dev; |
dev | 879 | fs/buffer.c | struct buffer_head * bread(kdev_t dev, int block, int size) |
dev | 883 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
dev | 885 | fs/buffer.c | kdevname(dev)); |
dev | 906 | fs/buffer.c | struct buffer_head * breada(kdev_t dev, int block, int bufsize, |
dev | 918 | fs/buffer.c | if (block < 0 || !(bh = getblk(dev,block,bufsize))) |
dev | 928 | fs/buffer.c | if (blocks > (read_ahead[MAJOR(dev)] >> index)) |
dev | 929 | fs/buffer.c | blocks = read_ahead[MAJOR(dev)] >> index; |
dev | 936 | fs/buffer.c | bh = getblk(dev,block+i,bufsize); |
dev | 1086 | fs/buffer.c | int brw_page(int rw, unsigned long address, kdev_t dev, int b[], int size, int bmap) |
dev | 1105 | fs/buffer.c | next->b_dev = dev; |
dev | 1121 | fs/buffer.c | tmp = get_hash_table(dev, block, size); |
dev | 1603 | fs/buffer.c | kdev_t dev, unsigned int starting_block) |
dev | 1633 | fs/buffer.c | p->b_dev = dev; |
dev | 1656 | fs/buffer.c | static int reassign_cluster(kdev_t dev, |
dev | 1673 | fs/buffer.c | if (try_to_reassign(bh, &bh, dev, starting_block)) |
dev | 1683 | fs/buffer.c | static unsigned long try_to_generate_cluster(kdev_t dev, int block, int size) |
dev | 1701 | fs/buffer.c | if (find_buffer(dev, nblock++, size)) |
dev | 1711 | fs/buffer.c | bh->b_dev = dev; |
dev | 1737 | fs/buffer.c | unsigned long generate_cluster(kdev_t dev, int b[], int size) |
dev | 1743 | fs/buffer.c | if(find_buffer(dev, b[i], size)) return 0; |
dev | 1753 | fs/buffer.c | retval = try_to_generate_cluster(dev, b[0], size); |
dev | 1758 | fs/buffer.c | return try_to_generate_cluster(dev, b[0], size); |
dev | 1760 | fs/buffer.c | return reassign_cluster(dev, b[0], size); |
dev | 73 | fs/dcache.c | #define hash_fn(dev,dir,namehash) ((HASHDEV(dev) ^ (dir) ^ (namehash)) % DCACHE_HASH_QUEUES) |
dev | 182 | fs/devices.c | int check_disk_change(kdev_t dev) |
dev | 187 | fs/devices.c | i = MAJOR(dev); |
dev | 192 | fs/devices.c | if (!fops->check_media_change(dev)) |
dev | 196 | fs/devices.c | kdevname(dev)); |
dev | 198 | fs/devices.c | if (super_blocks[i].s_dev == dev) |
dev | 200 | fs/devices.c | invalidate_inodes(dev); |
dev | 201 | fs/devices.c | invalidate_buffers(dev); |
dev | 204 | fs/devices.c | fops->revalidate(dev); |
dev | 325 | fs/devices.c | char * kdevname(kdev_t dev) |
dev | 328 | fs/devices.c | sprintf(buffer, "%02x:%02x", MAJOR(dev), MINOR(dev)); |
dev | 52 | fs/dquot.c | extern void add_dquot_ref(kdev_t dev, short type); |
dev | 53 | fs/dquot.c | extern void reset_dquot_ptrs(kdev_t dev, short type); |
dev | 62 | fs/dquot.c | static inline int const hashfn(kdev_t dev, unsigned int id, short type) |
dev | 64 | fs/dquot.c | return((HASHDEV(dev) ^ id) * (MAXQUOTAS - type)) % NR_DQHASH; |
dev | 67 | fs/dquot.c | static inline struct dquot **const hash(kdev_t dev, unsigned int id, short type) |
dev | 69 | fs/dquot.c | return(hash_table + hashfn(dev, id, type)); |
dev | 72 | fs/dquot.c | static inline int has_quota_enabled(kdev_t dev, short type) |
dev | 76 | fs/dquot.c | return((vfsmnt = lookup_vfsmnt(dev)) != (struct vfsmount *)NULL && |
dev | 276 | fs/dquot.c | int sync_dquots(kdev_t dev, short type) |
dev | 283 | fs/dquot.c | if (dev == NODEV || dquot->dq_count == 0 || dquot->dq_dev != dev) |
dev | 297 | fs/dquot.c | void invalidate_dquots(kdev_t dev, short type) |
dev | 306 | fs/dquot.c | if (dquot->dq_dev != dev || dquot->dq_type != type) |
dev | 309 | fs/dquot.c | printk("VFS: dquot busy on removed device %s\n", kdevname(dev)); |
dev | 539 | fs/dquot.c | static struct dquot *dqget(kdev_t dev, unsigned int id, short type) |
dev | 544 | fs/dquot.c | if ((vfsmnt = lookup_vfsmnt(dev)) == (struct vfsmount *)NULL || |
dev | 550 | fs/dquot.c | dquot = *(hash(dev, id, type)); |
dev | 552 | fs/dquot.c | if (dquot->dq_dev != dev || dquot->dq_id != id) { |
dev | 557 | fs/dquot.c | if (dquot->dq_dev != dev || dquot->dq_id != id) |
dev | 572 | fs/dquot.c | dquot->dq_dev = dev; |
dev | 584 | fs/dquot.c | static int set_dqblk(kdev_t dev, int id, short type, int flags, struct dqblk *dqblk) |
dev | 600 | fs/dquot.c | if ((dquot = dqget(dev, id, type)) != NODQUOT) { |
dev | 643 | fs/dquot.c | static int get_quota(kdev_t dev, int id, short type, struct dqblk *dqblk) |
dev | 648 | fs/dquot.c | if (has_quota_enabled(dev, type)) { |
dev | 655 | fs/dquot.c | if ((dquot = dqget(dev, id, type)) != NODQUOT) { |
dev | 929 | fs/dquot.c | int quota_off(kdev_t dev, short type) |
dev | 937 | fs/dquot.c | if ((vfsmnt = lookup_vfsmnt(dev)) == (struct vfsmount *)NULL || |
dev | 941 | fs/dquot.c | reset_dquot_ptrs(dev, cnt); |
dev | 942 | fs/dquot.c | invalidate_dquots(dev, cnt); |
dev | 950 | fs/dquot.c | int quota_on(kdev_t dev, short type, char *path) |
dev | 959 | fs/dquot.c | if ((vfsmnt = lookup_vfsmnt(dev)) == (struct vfsmount *)NULL) |
dev | 986 | fs/dquot.c | dquot = dqget(dev, 0, type); |
dev | 991 | fs/dquot.c | add_dquot_ref(dev, type); |
dev | 1015 | fs/dquot.c | kdev_t dev; |
dev | 1037 | fs/dquot.c | dev = 0; |
dev | 1041 | fs/dquot.c | dev = ino->i_rdev; |
dev | 1051 | fs/dquot.c | return(quota_on(dev, type, (char *) addr)); |
dev | 1053 | fs/dquot.c | return(quota_off(dev, type)); |
dev | 1055 | fs/dquot.c | return(get_quota(dev, id, type, (struct dqblk *) addr)); |
dev | 1066 | fs/dquot.c | return(sync_dquots(dev, type)); |
dev | 1074 | fs/dquot.c | if (has_quota_enabled(dev, type)) |
dev | 1075 | fs/dquot.c | return(set_dqblk(dev, id, type, flags, (struct dqblk *) addr)); |
dev | 182 | fs/ext/freelists.c | kdev_t dev; |
dev | 204 | fs/ext/freelists.c | dev = inode->i_dev; |
dev | 222 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
dev | 65 | fs/ext/inode.c | kdev_t dev = s->s_dev; |
dev | 70 | fs/ext/inode.c | set_blocksize(dev, BLOCK_SIZE); |
dev | 71 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
dev | 97 | fs/ext/inode.c | "%s.\n", kdevname(dev)); |
dev | 104 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeblock = bread(dev, |
dev | 116 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeinodeblock = bread(dev, block, BLOCK_SIZE))) { |
dev | 127 | fs/ext/inode.c | s->s_dev = dev; |
dev | 374 | fs/ext2/super.c | kdev_t dev = sb->s_dev; |
dev | 387 | fs/ext2/super.c | set_blocksize (dev, BLOCK_SIZE); |
dev | 388 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
dev | 408 | fs/ext2/super.c | "%s.\n", kdevname(dev)); |
dev | 419 | fs/ext2/super.c | set_blocksize (dev, sb->s_blocksize); |
dev | 422 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
dev | 479 | fs/ext2/super.c | kdevname(dev)); |
dev | 489 | fs/ext2/super.c | "%s.\n", kdevname(dev)); |
dev | 548 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1, |
dev | 588 | fs/ext2/super.c | sb->s_dev = dev; |
dev | 127 | fs/file_table.c | void add_dquot_ref(dev_t dev, short type) |
dev | 133 | fs/file_table.c | if (!filp->f_count || !filp->f_inode || filp->f_inode->i_dev != dev) |
dev | 142 | fs/file_table.c | void reset_dquot_ptrs(dev_t dev, short type) |
dev | 148 | fs/file_table.c | if (!filp->f_count || !filp->f_inode || filp->f_inode->i_dev != dev) |
dev | 246 | fs/hpfs/hpfs_fs.c | static unsigned count_one_bitmap(kdev_t dev, secno secno); |
dev | 255 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_nth_dirent(kdev_t dev, dnode_secno dno, |
dev | 261 | fs/hpfs/hpfs_fs.c | static dnode_secno fnode_dno(kdev_t dev, ino_t ino); |
dev | 262 | fs/hpfs/hpfs_fs.c | static struct fnode *map_fnode(kdev_t dev, ino_t ino, |
dev | 264 | fs/hpfs/hpfs_fs.c | static struct anode *map_anode(kdev_t dev, unsigned secno, |
dev | 266 | fs/hpfs/hpfs_fs.c | static struct dnode *map_dnode(kdev_t dev, unsigned secno, |
dev | 268 | fs/hpfs/hpfs_fs.c | static void *map_sector(kdev_t dev, unsigned secno, struct buffer_head **bhp); |
dev | 269 | fs/hpfs/hpfs_fs.c | static void *map_4sectors(kdev_t dev, unsigned secno, |
dev | 344 | fs/hpfs/hpfs_fs.c | kdev_t dev; |
dev | 372 | fs/hpfs/hpfs_fs.c | dev = s->s_dev; |
dev | 373 | fs/hpfs/hpfs_fs.c | set_blocksize(dev, 512); |
dev | 379 | fs/hpfs/hpfs_fs.c | bootblock = map_sector(dev, 0, &bh0); |
dev | 383 | fs/hpfs/hpfs_fs.c | superblock = map_sector(dev, 16, &bh1); |
dev | 387 | fs/hpfs/hpfs_fs.c | spareblock = map_sector(dev, 17, &bh2); |
dev | 503 | fs/hpfs/hpfs_fs.c | root_dno = fnode_dno(dev, s->s_hpfs_root); |
dev | 856 | fs/hpfs/hpfs_fs.c | static unsigned count_one_bitmap(kdev_t dev, secno secno) |
dev | 862 | fs/hpfs/hpfs_fs.c | bits = map_4sectors(dev, secno, &qbh); |
dev | 1560 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_nth_dirent(kdev_t dev, dnode_secno dno, |
dev | 1566 | fs/hpfs/hpfs_fs.c | struct dnode *dnode = map_dnode(dev, dno, qbh); |
dev | 1590 | fs/hpfs/hpfs_fs.c | static dnode_secno fnode_dno(kdev_t dev, ino_t ino) |
dev | 1596 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(dev, ino, &bh); |
dev | 1607 | fs/hpfs/hpfs_fs.c | static struct fnode *map_fnode(kdev_t dev, ino_t ino, struct buffer_head **bhp) |
dev | 1616 | fs/hpfs/hpfs_fs.c | fnode = map_sector(dev, ino_secno(ino), bhp); |
dev | 1628 | fs/hpfs/hpfs_fs.c | static struct anode *map_anode(kdev_t dev, unsigned secno, |
dev | 1638 | fs/hpfs/hpfs_fs.c | anode = map_sector(dev, secno, bhp); |
dev | 1650 | fs/hpfs/hpfs_fs.c | static struct dnode *map_dnode(kdev_t dev, unsigned secno, |
dev | 1660 | fs/hpfs/hpfs_fs.c | dnode = map_4sectors(dev, secno, qbh); |
dev | 1672 | fs/hpfs/hpfs_fs.c | static void *map_sector(kdev_t dev, unsigned secno, struct buffer_head **bhp) |
dev | 1676 | fs/hpfs/hpfs_fs.c | if ((*bhp = bh = bread(dev, secno, 512)) != 0) |
dev | 1686 | fs/hpfs/hpfs_fs.c | static void *map_4sectors(kdev_t dev, unsigned secno, |
dev | 1701 | fs/hpfs/hpfs_fs.c | qbh->bh[0] = bh = breada(dev, secno, 512, 0, UINT_MAX); |
dev | 1706 | fs/hpfs/hpfs_fs.c | qbh->bh[1] = bh = bread(dev, secno + 1, 512); |
dev | 1711 | fs/hpfs/hpfs_fs.c | qbh->bh[2] = bh = bread(dev, secno + 2, 512); |
dev | 1716 | fs/hpfs/hpfs_fs.c | qbh->bh[3] = bh = bread(dev, secno + 3, 512); |
dev | 26 | fs/inode.c | static inline int const hashfn(kdev_t dev, unsigned int i) |
dev | 28 | fs/inode.c | return (HASHDEV(dev) ^ i) % NR_IHASH; |
dev | 31 | fs/inode.c | static inline struct inode_hash_entry * const hash(kdev_t dev, int i) |
dev | 33 | fs/inode.c | return hash_table + hashfn(dev, i); |
dev | 170 | fs/inode.c | int fs_may_mount(kdev_t dev) |
dev | 179 | fs/inode.c | if (inode->i_dev != dev) |
dev | 188 | fs/inode.c | int fs_may_umount(kdev_t dev, struct inode * mount_root) |
dev | 195 | fs/inode.c | if (inode->i_dev != dev || !inode->i_count) |
dev | 204 | fs/inode.c | int fs_may_remount_ro(kdev_t dev) |
dev | 212 | fs/inode.c | file->f_inode->i_dev != dev) |
dev | 359 | fs/inode.c | void invalidate_inodes(kdev_t dev) |
dev | 368 | fs/inode.c | if (inode->i_dev != dev) |
dev | 372 | fs/inode.c | kdevname(dev)); |
dev | 379 | fs/inode.c | void sync_inodes(kdev_t dev) |
dev | 386 | fs/inode.c | if (dev && inode->i_dev != dev) |
dev | 162 | fs/isofs/inode.c | static unsigned int isofs_get_last_session(kdev_t dev) |
dev | 171 | fs/isofs/inode.c | if (get_blkfops(MAJOR(dev))->ioctl!=NULL) |
dev | 173 | fs/isofs/inode.c | inode_fake.i_rdev=dev; |
dev | 176 | fs/isofs/inode.c | i=get_blkfops(MAJOR(dev))->ioctl(&inode_fake, |
dev | 201 | fs/isofs/inode.c | kdev_t dev = s->s_dev; |
dev | 242 | fs/isofs/inode.c | set_blocksize(dev, opt.blocksize); |
dev | 248 | fs/isofs/inode.c | vol_desc_start = isofs_get_last_session(dev); |
dev | 254 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), opt.blocksize))) { |
dev | 258 | fs/isofs/inode.c | kdevname(dev), iso_blknum); |
dev | 362 | fs/isofs/inode.c | s->s_dev = dev; |
dev | 792 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
dev | 794 | fs/isofs/inode.c | return bread(dev, block, size); |
dev | 126 | fs/minix/inode.c | kdev_t dev = s->s_dev; |
dev | 134 | fs/minix/inode.c | set_blocksize(dev, BLOCK_SIZE); |
dev | 135 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
dev | 181 | fs/minix/inode.c | "%s.\n", kdevname(dev)); |
dev | 191 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 196 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 216 | fs/minix/inode.c | s->s_dev = dev; |
dev | 450 | fs/namei.c | int do_mknod(const char * filename, int mode, dev_t dev) |
dev | 480 | fs/namei.c | error = dir->i_op->mknod(dir,basename,namelen,mode,dev); |
dev | 486 | fs/namei.c | asmlinkage int sys_mknod(const char * filename, int mode, dev_t dev) |
dev | 504 | fs/namei.c | error = do_mknod(tmp,mode,dev); |
dev | 165 | fs/ncpfs/inode.c | kdev_t dev = sb->s_dev; |
dev | 232 | fs/ncpfs/inode.c | sb->s_dev = dev; |
dev | 216 | fs/nfs/dir.c | kdev_t dev; |
dev | 232 | fs/nfs/dir.c | if (entry->dev == dir->i_dev |
dev | 254 | fs/nfs/dir.c | entry->dev = 0; |
dev | 280 | fs/nfs/dir.c | entry->dev = dir->i_dev; |
dev | 293 | fs/nfs/dir.c | kdev_t dev; |
dev | 298 | fs/nfs/dir.c | dev = inode->i_dev; |
dev | 302 | fs/nfs/dir.c | dev = entry->dev; |
dev | 309 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 310 | fs/nfs/dir.c | entry->dev = 0; |
dev | 318 | fs/nfs/dir.c | kdev_t dev = file->i_dev; |
dev | 324 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 94 | fs/nfs/inode.c | kdev_t dev = sb->s_dev; |
dev | 126 | fs/nfs/inode.c | sb->s_dev = dev; |
dev | 66 | fs/nfs/nfsroot.c | struct device *dev; |
dev | 95 | fs/nfs/nfsroot.c | struct device *dev; |
dev | 99 | fs/nfs/nfsroot.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 100 | fs/nfs/nfsroot.c | if (dev->type < ARPHRD_SLIP && |
dev | 101 | fs/nfs/nfsroot.c | dev->family == AF_INET && |
dev | 102 | fs/nfs/nfsroot.c | !(dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { |
dev | 104 | fs/nfs/nfsroot.c | old_flags = dev->flags; |
dev | 105 | fs/nfs/nfsroot.c | dev->flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING; |
dev | 106 | fs/nfs/nfsroot.c | if (!(old_flags & IFF_UP) && dev_open(dev)) { |
dev | 107 | fs/nfs/nfsroot.c | dev->flags = old_flags; |
dev | 114 | fs/nfs/nfsroot.c | openp->dev = dev; |
dev | 146 | fs/nfs/nfsroot.c | if (openp->dev != root_dev) { |
dev | 148 | fs/nfs/nfsroot.c | dev_close(openp->dev); |
dev | 149 | fs/nfs/nfsroot.c | openp->dev->flags = openp->old_flags; |
dev | 166 | fs/nfs/nfsroot.c | struct device *dev, unsigned long src_ip, |
dev | 170 | fs/nfs/nfsroot.c | static int root_rarp_recv(struct sk_buff *skb, struct device *dev, |
dev | 207 | fs/nfs/nfsroot.c | static int root_rarp_recv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 215 | fs/nfs/nfsroot.c | if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd)) { |
dev | 227 | fs/nfs/nfsroot.c | if ((rarp->ar_pro != htons(ETH_P_IP) && dev->type != ARPHRD_AX25) || |
dev | 229 | fs/nfs/nfsroot.c | (rarp->ar_pro != htons(AX25_P_IP) && dev->type == ARPHRD_AX25) || |
dev | 238 | fs/nfs/nfsroot.c | rarp_ptr += dev->addr_len; |
dev | 242 | fs/nfs/nfsroot.c | rarp_ptr += dev->addr_len; |
dev | 246 | fs/nfs/nfsroot.c | if (memcmp(tha, dev->dev_addr, dev->addr_len)) { |
dev | 267 | fs/nfs/nfsroot.c | root_dev = dev; |
dev | 271 | fs/nfs/nfsroot.c | myaddr.sin_family = dev->family; |
dev | 275 | fs/nfs/nfsroot.c | server.sin_family = dev->family; |
dev | 289 | fs/nfs/nfsroot.c | struct device *dev; |
dev | 295 | fs/nfs/nfsroot.c | dev = openp->dev; |
dev | 296 | fs/nfs/nfsroot.c | if (!(dev->flags & IFF_NOARP)) { |
dev | 297 | fs/nfs/nfsroot.c | arp_send(ARPOP_RREQUEST, ETH_P_RARP, 0, dev, 0, NULL, |
dev | 298 | fs/nfs/nfsroot.c | dev->dev_addr, dev->dev_addr); |
dev | 641 | fs/nfs/nfsroot.c | root_dev = open_base->dev; |
dev | 28 | fs/noquot.c | int sync_dquots(kdev_t dev, short type) |
dev | 37 | fs/noquot.c | void invalidate_dquots(kdev_t dev, short type) |
dev | 60 | fs/noquot.c | int quota_off(kdev_t dev, short type) |
dev | 65 | fs/noquot.c | int quota_on(kdev_t dev, short type, char *path) |
dev | 890 | fs/proc/array.c | kdev_t dev; |
dev | 903 | fs/proc/array.c | dev = map->vm_inode->i_dev; |
dev | 906 | fs/proc/array.c | dev = 0; |
dev | 912 | fs/proc/array.c | kdevname(dev), ino); |
dev | 141 | fs/proc/link.c | unsigned int dev,ino; |
dev | 153 | fs/proc/link.c | dev = kdev_t_to_nr(inode->i_dev); |
dev | 156 | fs/proc/link.c | i = sprintf(buf,"[%04x]:%u", dev, ino); |
dev | 180 | fs/smbfs/inode.c | kdev_t dev = sb->s_dev; |
dev | 223 | fs/smbfs/inode.c | sb->s_dev = dev; |
dev | 1614 | fs/smbfs/proc.c | char dev[] = "A:"; |
dev | 1811 | fs/smbfs/proc.c | strlen(server->m.password) + strlen(dev)); |
dev | 1815 | fs/smbfs/proc.c | p = smb_encode_ascii(p, dev, strlen(dev)); |
dev | 62 | fs/super.c | struct vfsmount *lookup_vfsmnt(kdev_t dev) |
dev | 70 | fs/super.c | mru_vfsmnt->mnt_dev == dev) |
dev | 76 | fs/super.c | if (lptr->mnt_dev == dev) { |
dev | 85 | fs/super.c | struct vfsmount *add_vfsmnt(kdev_t dev, const char *dev_name, const char *dir_name) |
dev | 95 | fs/super.c | lptr->mnt_dev = dev; |
dev | 119 | fs/super.c | void remove_vfsmnt(kdev_t dev) |
dev | 126 | fs/super.c | if (lptr->mnt_dev == dev) { |
dev | 129 | fs/super.c | if (vfsmnttail->mnt_dev == dev) |
dev | 133 | fs/super.c | if (lptr->mnt_next->mnt_dev == dev) |
dev | 141 | fs/super.c | if (vfsmnttail->mnt_dev == dev) |
dev | 330 | fs/super.c | void sync_supers(kdev_t dev) |
dev | 337 | fs/super.c | if (dev && sb->s_dev != dev) |
dev | 342 | fs/super.c | if (dev && (dev != sb->s_dev)) |
dev | 349 | fs/super.c | static struct super_block * get_super(kdev_t dev) |
dev | 353 | fs/super.c | if (!dev) |
dev | 357 | fs/super.c | if (s->s_dev == dev) { |
dev | 359 | fs/super.c | if (s->s_dev == dev) |
dev | 367 | fs/super.c | void put_super(kdev_t dev) |
dev | 371 | fs/super.c | if (dev == ROOT_DEV) { |
dev | 373 | fs/super.c | kdevname(dev)); |
dev | 376 | fs/super.c | if (!(sb = get_super(dev))) |
dev | 380 | fs/super.c | kdevname(dev)); |
dev | 387 | fs/super.c | asmlinkage int sys_ustat(dev_t dev, struct ustat * ubuf) |
dev | 395 | fs/super.c | s = get_super(to_kdev_t(dev)); |
dev | 419 | fs/super.c | static struct super_block * read_super(kdev_t dev,const char *name,int flags, |
dev | 425 | fs/super.c | if (!dev) |
dev | 427 | fs/super.c | check_disk_change(dev); |
dev | 428 | fs/super.c | s = get_super(dev); |
dev | 433 | fs/super.c | kdevname(dev), name); |
dev | 442 | fs/super.c | s->s_dev = dev; |
dev | 448 | fs/super.c | s->s_dev = dev; |
dev | 474 | fs/super.c | void put_unnamed_dev(kdev_t dev) |
dev | 476 | fs/super.c | if (!dev) |
dev | 478 | fs/super.c | if (MAJOR(dev) == UNNAMED_MAJOR && |
dev | 479 | fs/super.c | clear_bit(MINOR(dev), unnamed_dev_in_use)) |
dev | 482 | fs/super.c | kdevname(dev)); |
dev | 485 | fs/super.c | static int do_umount(kdev_t dev) |
dev | 490 | fs/super.c | if (dev==ROOT_DEV) { |
dev | 495 | fs/super.c | if (!(sb=get_super(dev))) |
dev | 504 | fs/super.c | quota_off(dev, -1); |
dev | 505 | fs/super.c | fsync_dev(dev); |
dev | 512 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
dev | 516 | fs/super.c | kdevname(dev)); |
dev | 522 | fs/super.c | quota_off(dev, -1); |
dev | 523 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
dev | 532 | fs/super.c | put_super(dev); |
dev | 533 | fs/super.c | remove_vfsmnt(dev); |
dev | 551 | fs/super.c | kdev_t dev; |
dev | 564 | fs/super.c | dev = inode->i_rdev; |
dev | 574 | fs/super.c | dev = inode->i_sb->s_dev; |
dev | 577 | fs/super.c | dummy_inode.i_rdev = dev; |
dev | 580 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 584 | fs/super.c | if (!(retval = do_umount(dev)) && dev != ROOT_DEV) { |
dev | 586 | fs/super.c | if (MAJOR(dev) == UNNAMED_MAJOR) |
dev | 587 | fs/super.c | put_unnamed_dev(dev); |
dev | 593 | fs/super.c | fsync_dev(dev); |
dev | 607 | fs/super.c | int do_mount(kdev_t dev, const char * dev_name, const char * dir_name, const char * type, int flags, void * data) |
dev | 625 | fs/super.c | if (!fs_may_mount(dev)) { |
dev | 629 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
dev | 638 | fs/super.c | vfsmnt = add_vfsmnt(dev, dev_name, dir_name); |
dev | 737 | fs/super.c | kdev_t dev; |
dev | 777 | fs/super.c | dev = inode->i_rdev; |
dev | 778 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 782 | fs/super.c | fops = get_blkfops(MAJOR(dev)); |
dev | 800 | fs/super.c | if (!(dev = get_unnamed_dev())) |
dev | 813 | fs/super.c | retval = do_mount(dev,dev_name,dir_name,t,flags,(void *) page); |
dev | 344 | fs/sysv/inode.c | kdev_t dev = sb->s_dev; |
dev | 357 | fs/sysv/inode.c | set_blocksize(dev,BLOCK_SIZE); |
dev | 360 | fs/sysv/inode.c | if ((bh = bread(dev, 1, BLOCK_SIZE)) != NULL) { |
dev | 365 | fs/sysv/inode.c | if ((bh = bread(dev, 0, BLOCK_SIZE)) != NULL) { |
dev | 381 | fs/sysv/inode.c | if ((bh = bread(dev, offsets[i], BLOCK_SIZE)) != NULL) { |
dev | 398 | fs/sysv/inode.c | "%s\n", kdevname(dev)); |
dev | 433 | fs/sysv/inode.c | set_blocksize(dev,sb->sv_block_size); |
dev | 437 | fs/sysv/inode.c | if ((bh1 = bread(dev, blocknr, sb->sv_block_size)) == NULL) |
dev | 439 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
dev | 445 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
dev | 451 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
dev | 457 | fs/sysv/inode.c | if ((bh2 = bread(dev, blocknr+1, sb->sv_block_size)) == NULL) |
dev | 476 | fs/sysv/inode.c | found, sb->sv_block_size, kdevname(dev)); |
dev | 482 | fs/sysv/inode.c | sb->s_dev = dev; |
dev | 68 | fs/xiafs/inode.c | kdev_t dev; |
dev | 71 | fs/xiafs/inode.c | dev = s->s_dev; |
dev | 74 | fs/xiafs/inode.c | set_blocksize(dev, BLOCK_SIZE); |
dev | 76 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
dev | 91 | fs/xiafs/inode.c | "%s.\n", kdevname(dev)); |
dev | 101 | fs/xiafs/inode.c | set_blocksize(dev, s->s_blocksize); |
dev | 102 | fs/xiafs/inode.c | bh = bread (dev, 0, s->s_blocksize); |
dev | 132 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_imap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 142 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_zmap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 148 | fs/xiafs/inode.c | s->s_dev = dev; |
dev | 79 | include/asm-sparc/sbus.h | sbus_is_slave(struct linux_sbus_device *dev) |
dev | 43 | include/linux/atalk.h | struct device *dev; |
dev | 52 | include/linux/atalk.h | struct device *dev; |
dev | 139 | include/linux/atalk.h | extern struct atalk_iface *atalk_find_dev(struct device *dev); |
dev | 140 | include/linux/atalk.h | extern struct at_addr *atalk_find_dev_addr(struct device *dev); |
dev | 141 | include/linux/atalk.h | extern int aarp_send_ddp(struct device *dev,struct sk_buff *skb, struct at_addr *sa, void *hwaddr); |
dev | 142 | include/linux/atalk.h | extern void aarp_send_probe(struct device *dev, struct at_addr *addr); |
dev | 37 | include/linux/ax25.h | char dev[16]; |
dev | 89 | include/linux/blk.h | extern void set_device_ro(kdev_t dev,int flag); |
dev | 99 | include/linux/blk.h | #define RO_IOCTLS(dev,where) \ |
dev | 101 | include/linux/blk.h | set_device_ro((dev),get_fs_long((long *) (where))); return 0; \ |
dev | 103 | include/linux/blk.h | if (!__err) put_fs_long(0!=is_read_only(dev),(long *) (where)); return __err; } |
dev | 48 | include/linux/blkdev.h | extern void resetup_one_dev(struct gendisk *dev, int drive); |
dev | 51 | include/linux/blkdev.h | extern void add_request(struct blk_dev_struct * dev, struct request * req); |
dev | 52 | include/linux/blkdev.h | extern struct request *get_md_request (int max_req, kdev_t dev); |
dev | 31 | include/linux/etherdevice.h | extern int eth_header(struct sk_buff *skb, struct device *dev, |
dev | 34 | include/linux/etherdevice.h | extern int eth_rebuild_header(void *buff, struct device *dev, |
dev | 36 | include/linux/etherdevice.h | extern unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev); |
dev | 37 | include/linux/etherdevice.h | extern void eth_header_cache_bind(struct hh_cache ** hhp, struct device *dev, |
dev | 39 | include/linux/etherdevice.h | extern void eth_header_cache_update(struct hh_cache *hh, struct device *dev, unsigned char * haddr); |
dev | 416 | include/linux/fs.h | int (*check_media_change) (kdev_t dev); |
dev | 417 | include/linux/fs.h | int (*revalidate) (kdev_t dev); |
dev | 504 | include/linux/fs.h | extern int fs_may_mount(kdev_t dev); |
dev | 505 | include/linux/fs.h | extern int fs_may_umount(kdev_t dev, struct inode * mount_root); |
dev | 506 | include/linux/fs.h | extern int fs_may_remount_ro(kdev_t dev); |
dev | 548 | include/linux/fs.h | extern int check_disk_change(kdev_t dev); |
dev | 549 | include/linux/fs.h | extern void invalidate_inodes(kdev_t dev); |
dev | 551 | include/linux/fs.h | extern void invalidate_buffers(kdev_t dev); |
dev | 553 | include/linux/fs.h | extern void sync_inodes(kdev_t dev); |
dev | 554 | include/linux/fs.h | extern void sync_dev(kdev_t dev); |
dev | 555 | include/linux/fs.h | extern int fsync_dev(kdev_t dev); |
dev | 556 | include/linux/fs.h | extern void sync_supers(kdev_t dev); |
dev | 566 | include/linux/fs.h | extern int do_mknod(const char * filename, int mode, dev_t dev); |
dev | 576 | include/linux/fs.h | extern struct buffer_head * get_hash_table(kdev_t dev, int block, int size); |
dev | 577 | include/linux/fs.h | extern struct buffer_head * getblk(kdev_t dev, int block, int size); |
dev | 579 | include/linux/fs.h | extern void ll_rw_page(int rw, kdev_t dev, unsigned long nr, char * buffer); |
dev | 580 | include/linux/fs.h | extern void ll_rw_swap_file(int rw, kdev_t dev, unsigned int *b, int nb, char *buffer); |
dev | 581 | include/linux/fs.h | extern int is_read_only(kdev_t dev); |
dev | 594 | include/linux/fs.h | extern void set_blocksize(kdev_t dev, int size); |
dev | 595 | include/linux/fs.h | extern struct buffer_head * bread(kdev_t dev, int block, int size); |
dev | 596 | include/linux/fs.h | extern struct buffer_head * breada(kdev_t dev,int block, int size, |
dev | 604 | include/linux/fs.h | extern void put_super(kdev_t dev); |
dev | 605 | include/linux/fs.h | unsigned long generate_cluster(kdev_t dev, int b[], int size); |
dev | 39 | include/linux/if_eql.h | struct device *dev; |
dev | 117 | include/linux/if_pppvar.h | struct device *dev; /* easy for intr handling */ |
dev | 99 | include/linux/igmp.h | struct device *dev; |
dev | 111 | include/linux/igmp.h | extern void ip_mc_drop_device(struct device *dev); |
dev | 112 | include/linux/igmp.h | extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr); |
dev | 113 | include/linux/igmp.h | extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr); |
dev | 337 | include/linux/isdn.h | struct device dev; /* interface to upper levels */ |
dev | 559 | include/linux/isdn.h | extern isdn_dev *dev; |
dev | 172 | include/linux/iso_fs.h | extern int isofs_new_block(int dev); |
dev | 173 | include/linux/iso_fs.h | extern int isofs_free_block(int dev, int block); |
dev | 202 | include/linux/iso_fs.h | extern struct buffer_head * leak_check_bread(int dev, int block, int size); |
dev | 69 | include/linux/kdev_t.h | #define MAJOR(dev) ((dev) >> MINORBITS) |
dev | 70 | include/linux/kdev_t.h | #define MINOR(dev) ((dev) & MINORMASK) |
dev | 71 | include/linux/kdev_t.h | #define HASHDEV(dev) (dev) |
dev | 83 | include/linux/kdev_t.h | static inline unsigned int kdev_t_to_nr(kdev_t dev) { |
dev | 84 | include/linux/kdev_t.h | return (MAJOR(dev)<<8) | MINOR(dev); |
dev | 87 | include/linux/kdev_t.h | static inline kdev_t to_kdev_t(int dev) |
dev | 91 | include/linux/kdev_t.h | major = (dev >> 16); |
dev | 93 | include/linux/kdev_t.h | major = (dev >> 8); |
dev | 94 | include/linux/kdev_t.h | minor = (dev & 0xff); |
dev | 96 | include/linux/kdev_t.h | minor = (dev & 0xffff); |
dev | 98 | include/linux/kdev_t.h | major = (dev >> 8); |
dev | 99 | include/linux/kdev_t.h | minor = (dev & 0xff); |
dev | 110 | include/linux/kdev_t.h | #define MAJOR(dev) ((dev)>>8) |
dev | 111 | include/linux/kdev_t.h | #define MINOR(dev) ((dev) & 0xff) |
dev | 92 | include/linux/md.h | kdev_t dev; /* Device number */ |
dev | 139 | include/linux/md.h | extern char *partition_name (kdev_t dev); |
dev | 142 | include/linux/md.h | extern int md_valid_device (int minor, kdev_t dev, int mode); |
dev | 28 | include/linux/mount.h | struct vfsmount *lookup_vfsmnt(kdev_t dev); |
dev | 129 | include/linux/mroute.h | struct device *dev; /* Device we are using */ |
dev | 42 | include/linux/net_alias.h | struct device dev; /* alias device defn*/ |
dev | 97 | include/linux/net_alias.h | net_alias_is(struct device *dev) |
dev | 99 | include/linux/net_alias.h | return (dev->my_alias != NULL); |
dev | 108 | include/linux/net_alias.h | net_alias_has(struct device *dev) |
dev | 110 | include/linux/net_alias.h | return (dev->alias_info != NULL); |
dev | 117 | include/linux/net_alias.h | extern int net_alias_dev_rehash(struct device *dev, struct sockaddr *sa); |
dev | 137 | include/linux/net_alias.h | static __inline__ struct device *net_alias_main_dev(struct device *dev) |
dev | 139 | include/linux/net_alias.h | return (net_alias_is(dev))? dev->my_alias->main_dev : dev; |
dev | 149 | include/linux/net_alias.h | net_alias_nextdev(struct device *dev) |
dev | 151 | include/linux/net_alias.h | return (dev->alias_info)? dev->alias_info->taildev->next : dev->next; |
dev | 161 | include/linux/net_alias.h | net_alias_nextdev_set(struct device *dev, struct device *nextdev) |
dev | 163 | include/linux/net_alias.h | struct device *pdev = dev; |
dev | 164 | include/linux/net_alias.h | if (net_alias_has(dev)) |
dev | 166 | include/linux/net_alias.h | pdev = dev->alias_info->taildev; /* point to last dev alias */ |
dev | 112 | include/linux/netdevice.h | int (*init)(struct device *dev); |
dev | 119 | include/linux/netdevice.h | struct enet_statistics* (*get_stats)(struct device *dev); |
dev | 167 | include/linux/netdevice.h | int (*open)(struct device *dev); |
dev | 168 | include/linux/netdevice.h | int (*stop)(struct device *dev); |
dev | 170 | include/linux/netdevice.h | struct device *dev); |
dev | 172 | include/linux/netdevice.h | struct device *dev, |
dev | 177 | include/linux/netdevice.h | int (*rebuild_header)(void *eth, struct device *dev, |
dev | 180 | include/linux/netdevice.h | void (*set_multicast_list)(struct device *dev); |
dev | 182 | include/linux/netdevice.h | int (*set_mac_address)(struct device *dev, void *addr); |
dev | 184 | include/linux/netdevice.h | int (*do_ioctl)(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 186 | include/linux/netdevice.h | int (*set_config)(struct device *dev, struct ifmap *map); |
dev | 188 | include/linux/netdevice.h | void (*header_cache_bind)(struct hh_cache **hhp, struct device *dev, unsigned short htype, __u32 daddr); |
dev | 189 | include/linux/netdevice.h | void (*header_cache_update)(struct hh_cache *hh, struct device *dev, unsigned char * haddr); |
dev | 195 | include/linux/netdevice.h | struct device * dev; |
dev | 228 | include/linux/netdevice.h | extern int dev_open(struct device *dev); |
dev | 229 | include/linux/netdevice.h | extern int dev_close(struct device *dev); |
dev | 230 | include/linux/netdevice.h | extern void dev_queue_xmit(struct sk_buff *skb, struct device *dev, |
dev | 237 | include/linux/netdevice.h | extern void dev_tint(struct device *dev); |
dev | 284 | include/linux/netdevice.h | extern void ether_setup(struct device *dev); |
dev | 285 | include/linux/netdevice.h | extern void tr_setup(struct device *dev); |
dev | 286 | include/linux/netdevice.h | extern int ether_config(struct device *dev, struct ifmap *map); |
dev | 288 | include/linux/netdevice.h | extern int register_netdev(struct device *dev); |
dev | 289 | include/linux/netdevice.h | extern void unregister_netdev(struct device *dev); |
dev | 293 | include/linux/netdevice.h | extern void dev_mc_upload(struct device *dev); |
dev | 294 | include/linux/netdevice.h | extern void dev_mc_delete(struct device *dev, void *addr, int alen, int all); |
dev | 295 | include/linux/netdevice.h | extern void dev_mc_add(struct device *dev, void *addr, int alen, int newonly); |
dev | 296 | include/linux/netdevice.h | extern void dev_mc_discard(struct device *dev); |
dev | 298 | include/linux/netdevice.h | extern void ip_mc_allhost(struct device *dev); |
dev | 621 | include/linux/pci.h | unsigned int dev); |
dev | 206 | include/linux/quota.h | extern void invalidate_dquots(kdev_t dev, short type); |
dev | 207 | include/linux/quota.h | extern int quota_off(kdev_t dev, short type); |
dev | 208 | include/linux/quota.h | extern int sync_dquots(kdev_t dev, short type); |
dev | 11 | include/linux/raid0.h | struct real_dev *dev[MAX_REAL]; /* Devices attached to the zone */ |
dev | 39 | include/linux/raid0.h | struct real_dev *dev[MAX_REAL]; /* Devices attached to the zone */ |
dev | 16 | include/linux/scsicam.h | extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip); |
dev | 58 | include/linux/skbuff.h | struct device *dev; /* Device we arrived on/are leaving by */ |
dev | 789 | include/linux/soundcard.h | #define MIXER_READ(dev) _IOR('M', dev, int) |
dev | 817 | include/linux/soundcard.h | #define MIXER_WRITE(dev) _IOWR('M', dev, int) |
dev | 962 | include/linux/soundcard.h | #define PM_LOAD_PATCH(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 963 | include/linux/soundcard.h | _pm_info.device=dev, _pm_info.data.data8[0]=pgm, \ |
dev | 966 | include/linux/soundcard.h | #define PM_LOAD_PATCHES(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 967 | include/linux/soundcard.h | _pm_info.device=dev, memcpy(_pm_info.data.data8, pgm, 128), \ |
dev | 971 | include/linux/soundcard.h | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ |
dev | 974 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 986 | include/linux/soundcard.h | #define _CHN_VOICE(dev, event, chn, note, parm) \ |
dev | 989 | include/linux/soundcard.h | _seqbuf[_seqbufptr+1] = (dev);\ |
dev | 998 | include/linux/soundcard.h | #define SEQ_START_NOTE(dev, chn, note, vol) \ |
dev | 999 | include/linux/soundcard.h | _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) |
dev | 1001 | include/linux/soundcard.h | #define SEQ_STOP_NOTE(dev, chn, note, vol) \ |
dev | 1002 | include/linux/soundcard.h | _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) |
dev | 1004 | include/linux/soundcard.h | #define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \ |
dev | 1005 | include/linux/soundcard.h | _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure) |
dev | 1011 | include/linux/soundcard.h | #define _CHN_COMMON(dev, event, chn, p1, p2, w14) \ |
dev | 1014 | include/linux/soundcard.h | _seqbuf[_seqbufptr+1] = (dev);\ |
dev | 1036 | include/linux/soundcard.h | #define SEQ_SYSEX(dev, buf, len) \ |
dev | 1044 | include/linux/soundcard.h | #define SEQ_CHN_PRESSURE(dev, chn, pressure) \ |
dev | 1045 | include/linux/soundcard.h | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) |
dev | 1047 | include/linux/soundcard.h | #define SEQ_SET_PATCH(dev, chn, patch) \ |
dev | 1048 | include/linux/soundcard.h | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) |
dev | 1050 | include/linux/soundcard.h | #define SEQ_CONTROL(dev, chn, controller, value) \ |
dev | 1051 | include/linux/soundcard.h | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) |
dev | 1053 | include/linux/soundcard.h | #define SEQ_BENDER(dev, chn, value) \ |
dev | 1054 | include/linux/soundcard.h | _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value) |
dev | 1057 | include/linux/soundcard.h | #define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\ |
dev | 1060 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 1071 | include/linux/soundcard.h | #define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) |
dev | 1072 | include/linux/soundcard.h | #define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) |
dev | 1073 | include/linux/soundcard.h | #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128) |
dev | 1074 | include/linux/soundcard.h | #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100) |
dev | 1075 | include/linux/soundcard.h | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) |
dev | 340 | include/linux/sysv_fs.h | sv_get_hash_table (struct super_block *sb, kdev_t dev, unsigned int block) |
dev | 342 | include/linux/sysv_fs.h | return get_hash_table (dev, block + sb->sv_block_base, sb->sv_block_size); |
dev | 347 | include/linux/sysv_fs.h | sv_getblk (struct super_block *sb, kdev_t dev, unsigned int block) |
dev | 349 | include/linux/sysv_fs.h | return getblk (dev, block + sb->sv_block_base, sb->sv_block_size); |
dev | 354 | include/linux/sysv_fs.h | sv_bread (struct super_block *sb, kdev_t dev, unsigned int block) |
dev | 356 | include/linux/sysv_fs.h | return bread (dev, block + sb->sv_block_base, sb->sv_block_size); |
dev | 524 | include/linux/tpqic02.h | #define TP_DENS(dev) ((MINOR(dev) >> 1) & 0x07) /* tape density */ |
dev | 525 | include/linux/tpqic02.h | #define TP_UNIT(dev) ((MINOR(dev) >> 4) & 0x07) /* unit number */ |
dev | 528 | include/linux/tpqic02.h | #define TP_DIAGS(dev) (QIC02_TAPE_DEBUG & TPQD_DIAGS) |
dev | 31 | include/linux/trdevice.h | extern int tr_header(struct sk_buff *skb, struct device *dev, |
dev | 34 | include/linux/trdevice.h | extern int tr_rebuild_header(void *buff, struct device *dev, |
dev | 36 | include/linux/trdevice.h | extern unsigned short tr_type_trans(struct sk_buff *skb, struct device *dev); |
dev | 116 | include/linux/xd.h | static int xd_reread_partitions (kdev_t dev); |
dev | 6 | include/net/arp.h | extern int arp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 8 | include/net/arp.h | extern int arp_query(unsigned char *haddr, u32 paddr, struct device *dev); |
dev | 10 | include/net/arp.h | struct device *dev, u32 saddr, struct sk_buff *skb); |
dev | 13 | include/net/arp.h | struct device *dev, u32 src_ip, |
dev | 15 | include/net/arp.h | extern int arp_bind_cache(struct hh_cache ** hhp, struct device *dev, unsigned short type, __u32 daddr); |
dev | 31 | include/net/icmp.h | unsigned long info, struct device *dev); |
dev | 32 | include/net/icmp.h | extern int icmp_rcv(struct sk_buff *skb1, struct device *dev, |
dev | 46 | include/net/ip.h | extern void ip_mc_dropdevice(struct device *dev); |
dev | 79 | include/net/ip.h | struct device *dev; /* Device - for icmp replies */ |
dev | 89 | include/net/ip.h | extern int ip_send(struct rtable *rt, struct sk_buff *skb, __u32 daddr, int len, struct device *dev, __u32 saddr); |
dev | 93 | include/net/ip.h | struct device **dev, int type, |
dev | 96 | include/net/ip.h | extern int ip_rcv(struct sk_buff *skb, struct device *dev, |
dev | 105 | include/net/ip.h | struct device *dev, struct sk_buff *skb, |
dev | 129 | include/net/ip.h | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev); |
dev | 130 | include/net/ip.h | void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag); |
dev | 136 | include/net/ip.h | extern int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag, __u32 target_addr); |
dev | 1 | include/net/ipip.h | extern int ipip_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 49 | include/net/ipx.h | extern int ipx_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt); |
dev | 50 | include/net/ipx.h | extern void ipxrtr_device_down(struct device *dev); |
dev | 85 | include/net/netrom.h | struct device *dev; |
dev | 31 | include/net/protocol.h | int (*handler)(struct sk_buff *skb, struct device *dev, |
dev | 188 | include/net/route.h | extern void ip_rt_flush(struct device *dev); |
dev | 189 | include/net/route.h | extern void ip_rt_redirect(__u32 src, __u32 dst, __u32 gw, struct device *dev); |
dev | 332 | include/net/sock.h | struct device **dev, int type, |
dev | 339 | include/net/sock.h | struct device *dev, struct sk_buff *skb, |
dev | 344 | include/net/sock.h | int (*rcv)(struct sk_buff *buff, struct device *dev, |
dev | 122 | include/net/tcp.h | extern int tcp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 147 | include/net/tcp.h | struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl); |
dev | 45 | include/net/udp.h | extern int udp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 93 | kernel/ksyms.c | extern void set_device_ro(int dev,int flag); |
dev | 30 | net/802/p8022.c | p8022_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 38 | net/802/p8022.c | return proto->rcvfunc(skb, dev, pt); |
dev | 50 | net/802/p8022.c | struct device *dev = skb->dev; |
dev | 57 | net/802/p8022.c | dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len); |
dev | 11 | net/802/p8023.c | struct device *dev = skb->dev; |
dev | 13 | net/802/p8023.c | dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len); |
dev | 40 | net/802/psnap.c | int snap_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 64 | net/802/psnap.c | return proto->rcvfunc(skb, dev, &psnap_packet_type); |
dev | 20 | net/802/tr.c | static void tr_source_route(struct trh_hdr *trh,struct device *dev); |
dev | 41 | net/802/tr.c | int tr_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 45 | net/802/tr.c | struct trh_hdr *trh=(struct trh_hdr *)skb_push(skb,dev->hard_header_len); |
dev | 52 | net/802/tr.c | memcpy(trh->saddr,saddr,dev->addr_len); |
dev | 54 | net/802/tr.c | memset(trh->saddr,0,dev->addr_len); /* Adapter fills in address */ |
dev | 63 | net/802/tr.c | memcpy(trh->daddr,daddr,dev->addr_len); |
dev | 64 | net/802/tr.c | tr_source_route(trh,dev); |
dev | 65 | net/802/tr.c | return(dev->hard_header_len); |
dev | 67 | net/802/tr.c | return -dev->hard_header_len; |
dev | 71 | net/802/tr.c | int tr_rebuild_header(void *buff, struct device *dev, unsigned long dest, |
dev | 82 | net/802/tr.c | if(arp_find(trh->daddr, dest, dev, dev->pa_addr, skb)) { |
dev | 86 | net/802/tr.c | tr_source_route(trh,dev); |
dev | 91 | net/802/tr.c | unsigned short tr_type_trans(struct sk_buff *skb, struct device *dev) { |
dev | 98 | net/802/tr.c | skb_pull(skb,dev->hard_header_len); |
dev | 105 | net/802/tr.c | if(!memcmp(trh->daddr,dev->broadcast,TR_ALEN)) |
dev | 111 | net/802/tr.c | else if(dev->flags & IFF_PROMISC) |
dev | 113 | net/802/tr.c | if(memcmp(trh->daddr, dev->dev_addr, TR_ALEN)) |
dev | 122 | net/802/tr.c | static void tr_source_route(struct trh_hdr *trh,struct device *dev) { |
dev | 129 | net/802/tr.c | if(!memcmp(&(trh->daddr[0]),&(dev->broadcast[0]),TR_ALEN)) { |
dev | 64 | net/appletalk/aarp.c | struct device *dev; /* Device to use */ |
dev | 104 | net/appletalk/aarp.c | struct device *dev=a->dev; |
dev | 105 | net/appletalk/aarp.c | int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length; |
dev | 108 | net/appletalk/aarp.c | struct at_addr *sat=atalk_find_dev_addr(dev); |
dev | 117 | net/appletalk/aarp.c | skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length); |
dev | 121 | net/appletalk/aarp.c | skb->dev = a->dev; |
dev | 133 | net/appletalk/aarp.c | memcpy(eah->hw_src, dev->dev_addr, ETH_ALEN); |
dev | 155 | net/appletalk/aarp.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 164 | net/appletalk/aarp.c | static void aarp_send_reply(struct device *dev, struct at_addr *us, struct at_addr *them, unsigned char *sha) |
dev | 166 | net/appletalk/aarp.c | int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length; |
dev | 177 | net/appletalk/aarp.c | skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length); |
dev | 181 | net/appletalk/aarp.c | skb->dev = dev; |
dev | 193 | net/appletalk/aarp.c | memcpy(eah->hw_src, dev->dev_addr, ETH_ALEN); |
dev | 218 | net/appletalk/aarp.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 226 | net/appletalk/aarp.c | void aarp_send_probe(struct device *dev, struct at_addr *us) |
dev | 228 | net/appletalk/aarp.c | int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length; |
dev | 240 | net/appletalk/aarp.c | skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length); |
dev | 245 | net/appletalk/aarp.c | skb->dev = dev; |
dev | 257 | net/appletalk/aarp.c | memcpy(eah->hw_src, dev->dev_addr, ETH_ALEN); |
dev | 279 | net/appletalk/aarp.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 334 | net/appletalk/aarp.c | static void aarp_expire_device(struct aarp_entry **n, struct device *dev) |
dev | 339 | net/appletalk/aarp.c | if((*n)->dev==dev) |
dev | 407 | net/appletalk/aarp.c | static struct aarp_entry *aarp_find_entry(struct aarp_entry *list, struct device *dev, struct at_addr *sat) |
dev | 415 | net/appletalk/aarp.c | list->target_addr.s_node==sat->s_node && list->dev==dev) |
dev | 427 | net/appletalk/aarp.c | int aarp_send_ddp(struct device *dev,struct sk_buff *skb, struct at_addr *sa, void *hwaddr) |
dev | 438 | net/appletalk/aarp.c | if(dev->type==ARPHRD_LOCALTLK) |
dev | 440 | net/appletalk/aarp.c | struct at_addr *at=atalk_find_dev_addr(dev); |
dev | 469 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, SOPRI_NORMAL); |
dev | 471 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
dev | 479 | net/appletalk/aarp.c | if(dev->type!=ARPHRD_ETHER) |
dev | 484 | net/appletalk/aarp.c | skb->dev = dev; |
dev | 499 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, SOPRI_NORMAL); |
dev | 501 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
dev | 505 | net/appletalk/aarp.c | a=aarp_find_entry(resolved[hash],dev,sa); |
dev | 515 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, SOPRI_NORMAL); |
dev | 517 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
dev | 526 | net/appletalk/aarp.c | a=aarp_find_entry(unresolved[hash],dev,sa); |
dev | 559 | net/appletalk/aarp.c | a->dev=dev; |
dev | 623 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, SOPRI_NORMAL); |
dev | 625 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
dev | 638 | net/appletalk/aarp.c | static int aarp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 652 | net/appletalk/aarp.c | if(dev->type!=ARPHRD_ETHER) |
dev | 704 | net/appletalk/aarp.c | ifa=atalk_find_dev(dev); |
dev | 736 | net/appletalk/aarp.c | if((a=aarp_find_entry(unresolved[hash],dev,&sa))==NULL || dev != a->dev) |
dev | 776 | net/appletalk/aarp.c | aarp_send_reply(dev,ma,&sa,ea->hw_src); |
dev | 303 | net/appletalk/ddp.c | static void atif_drop_device(struct device *dev) |
dev | 310 | net/appletalk/ddp.c | if (tmp->dev == dev) |
dev | 320 | net/appletalk/ddp.c | static struct atalk_iface *atif_add_device(struct device *dev, struct at_addr *sa) |
dev | 327 | net/appletalk/ddp.c | iface->dev=dev; |
dev | 389 | net/appletalk/ddp.c | aarp_send_probe(atif->dev, &atif->address); |
dev | 411 | net/appletalk/ddp.c | struct at_addr *atalk_find_dev_addr(struct device *dev) |
dev | 415 | net/appletalk/ddp.c | if(iface->dev==dev) |
dev | 424 | net/appletalk/ddp.c | if(!(iface->dev->flags&IFF_LOOPBACK)) |
dev | 437 | net/appletalk/ddp.c | struct atalk_iface *atalk_find_dev(struct device *dev) |
dev | 441 | net/appletalk/ddp.c | if(iface->dev==dev) |
dev | 451 | net/appletalk/ddp.c | static struct atalk_iface *atalk_find_anynet(int node, struct device *dev) |
dev | 456 | net/appletalk/ddp.c | if ( iface->dev != dev || ( iface->status & ATIF_PROBE )) |
dev | 500 | net/appletalk/ddp.c | if(atrtr_default.dev) |
dev | 517 | net/appletalk/ddp.c | return atr->dev; |
dev | 524 | net/appletalk/ddp.c | static void atrtr_set_default(struct device *dev) |
dev | 526 | net/appletalk/ddp.c | atrtr_default.dev=dev; |
dev | 593 | net/appletalk/ddp.c | devhint = riface->dev; |
dev | 610 | net/appletalk/ddp.c | rt->dev=devhint; |
dev | 648 | net/appletalk/ddp.c | void atrtr_device_down(struct device *dev) |
dev | 655 | net/appletalk/ddp.c | if (tmp->dev == dev) |
dev | 663 | net/appletalk/ddp.c | if(atrtr_default.dev==dev) |
dev | 697 | net/appletalk/ddp.c | struct device *dev; |
dev | 710 | net/appletalk/ddp.c | if((dev=dev_get(atreq.ifr_name))==NULL) |
dev | 714 | net/appletalk/ddp.c | atif=atalk_find_dev(dev); |
dev | 723 | net/appletalk/ddp.c | if(dev->type!=ARPHRD_ETHER&&dev->type!=ARPHRD_LOOPBACK |
dev | 724 | net/appletalk/ddp.c | &&dev->type!=ARPHRD_LOCALTLK) |
dev | 732 | net/appletalk/ddp.c | if(dev->type==ARPHRD_ETHER && nr->nr_phase!=2) |
dev | 746 | net/appletalk/ddp.c | atrtr_device_down(dev); /* Flush old routes */ |
dev | 750 | net/appletalk/ddp.c | atif=atif_add_device(dev, &sa->sat_addr); |
dev | 759 | net/appletalk/ddp.c | if(!(dev->flags&IFF_LOOPBACK) && atif_probe_device(atif)<0) |
dev | 761 | net/appletalk/ddp.c | atif_drop_device(dev); |
dev | 778 | net/appletalk/ddp.c | if(dev->flags&IFF_LOOPBACK) |
dev | 786 | net/appletalk/ddp.c | atrtr_create(&rtdef, dev); |
dev | 787 | net/appletalk/ddp.c | atrtr_set_default(dev); |
dev | 800 | net/appletalk/ddp.c | atrtr_create(&rtdef, dev); |
dev | 803 | net/appletalk/ddp.c | dev_mc_add(dev, aarp_mcast, 6, 1); |
dev | 863 | net/appletalk/ddp.c | iface->dev->name, |
dev | 893 | net/appletalk/ddp.c | if(atrtr_default.dev) |
dev | 898 | net/appletalk/ddp.c | rt->dev->name); |
dev | 905 | net/appletalk/ddp.c | rt->dev->name); |
dev | 1374 | net/appletalk/ddp.c | static int atalk_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 1443 | net/appletalk/ddp.c | atif=atalk_find_anynet(ddp->deh_dnode, dev); |
dev | 1496 | net/appletalk/ddp.c | skb_trim(skb,min(origlen, rt->dev->hard_header_len + |
dev | 1506 | net/appletalk/ddp.c | if(aarp_send_ddp(rt->dev, skb, &ta, NULL)==-1) |
dev | 1547 | net/appletalk/ddp.c | static int ltalk_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 1561 | net/appletalk/ddp.c | ap=atalk_find_dev_addr(dev); |
dev | 1600 | net/appletalk/ddp.c | return atalk_rcv(skb,dev,pt); |
dev | 1609 | net/appletalk/ddp.c | struct device *dev; |
dev | 1663 | net/appletalk/ddp.c | dev=rt->dev; |
dev | 1673 | net/appletalk/ddp.c | dev=rt->dev; |
dev | 1677 | net/appletalk/ddp.c | printk("SK %p: Size needed %d, device %s\n", sk, size, dev->name); |
dev | 1679 | net/appletalk/ddp.c | size += dev->hard_header_len; |
dev | 1689 | net/appletalk/ddp.c | skb_reserve(skb,dev->hard_header_len); |
dev | 1691 | net/appletalk/ddp.c | skb->dev=dev; |
dev | 1741 | net/appletalk/ddp.c | if((!(rt->flags&RTF_GATEWAY))&&(!(dev->flags&IFF_LOOPBACK))) |
dev | 1749 | net/appletalk/ddp.c | if(aarp_send_ddp(dev,skb2,&usat->sat_addr, NULL)==-1) |
dev | 1756 | net/appletalk/ddp.c | if((dev->flags&IFF_LOOPBACK) || loopback) |
dev | 1762 | net/appletalk/ddp.c | ddp_dl->datalink_header(ddp_dl, skb, dev->dev_addr); |
dev | 1765 | net/appletalk/ddp.c | skb->h.raw = skb->data + ddp_dl->header_length + dev->hard_header_len; |
dev | 1766 | net/appletalk/ddp.c | skb_pull(skb,dev->hard_header_len); |
dev | 1768 | net/appletalk/ddp.c | atalk_rcv(skb,dev,NULL); |
dev | 1780 | net/appletalk/ddp.c | if(aarp_send_ddp(dev,skb,&usat->sat_addr, NULL)==-1) |
dev | 208 | net/ax25/af_ax25.c | static void ax25_kill_by_device(struct device *dev) |
dev | 213 | net/ax25/af_ax25.c | if (s->device == dev) { |
dev | 232 | net/ax25/af_ax25.c | struct device *dev = (struct device *)ptr; |
dev | 236 | net/ax25/af_ax25.c | ax25_dev_device_up(dev); |
dev | 239 | net/ax25/af_ax25.c | ax25_kill_by_device(dev); |
dev | 240 | net/ax25/af_ax25.c | ax25_rt_device_down(dev); |
dev | 241 | net/ax25/af_ax25.c | ax25_dev_device_down(dev); |
dev | 270 | net/ax25/af_ax25.c | static struct sock *ax25_find_listener(ax25_address *addr, struct device *dev, int type) |
dev | 281 | net/ax25/af_ax25.c | if (s->device == NULL || s->device == dev) { |
dev | 319 | net/ax25/af_ax25.c | static ax25_cb *ax25_find_cb(ax25_address *my_addr, ax25_address *dest_addr, struct device *dev) |
dev | 330 | net/ax25/af_ax25.c | if (ax25cmp(&s->source_addr, my_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->device == dev) { |
dev | 586 | net/ax25/af_ax25.c | int ax25_dev_is_dama_slave(struct device *dev) |
dev | 592 | net/ax25/af_ax25.c | if (ax25->device == dev && ax25->dama_slave) { |
dev | 605 | net/ax25/af_ax25.c | static void ax25_fillin_cb(ax25_cb *ax25, struct device *dev) |
dev | 607 | net/ax25/af_ax25.c | ax25->device = dev; |
dev | 609 | net/ax25/af_ax25.c | ax25->rtt = ax25_dev_get_value(dev, AX25_VALUES_T1); |
dev | 610 | net/ax25/af_ax25.c | ax25->t1 = ax25_dev_get_value(dev, AX25_VALUES_T1); |
dev | 611 | net/ax25/af_ax25.c | ax25->t2 = ax25_dev_get_value(dev, AX25_VALUES_T2); |
dev | 612 | net/ax25/af_ax25.c | ax25->t3 = ax25_dev_get_value(dev, AX25_VALUES_T3); |
dev | 613 | net/ax25/af_ax25.c | ax25->n2 = ax25_dev_get_value(dev, AX25_VALUES_N2); |
dev | 617 | net/ax25/af_ax25.c | ax25->modulus = ax25_dev_get_value(dev, AX25_VALUES_AXDEFMODE); |
dev | 620 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
dev | 622 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
dev | 625 | net/ax25/af_ax25.c | ax25->backoff = ax25_dev_get_value(dev, AX25_VALUES_BACKOFF) == 'E'; |
dev | 629 | net/ax25/af_ax25.c | ax25_digi *digi, struct device *dev) |
dev | 643 | net/ax25/af_ax25.c | if (ax25cmp(&ax25->source_addr, src) == 0 && ax25cmp(&ax25->dest_addr, dest) == 0 && ax25->device == dev) { |
dev | 652 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
dev | 688 | net/ax25/af_ax25.c | struct device *dev; |
dev | 690 | net/ax25/af_ax25.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 691 | net/ax25/af_ax25.c | if (dev->flags & IFF_UP) { |
dev | 692 | net/ax25/af_ax25.c | switch (dev->type) { |
dev | 694 | net/ax25/af_ax25.c | if (ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0) |
dev | 695 | net/ax25/af_ax25.c | return dev; |
dev | 701 | net/ax25/af_ax25.c | if ((dev_addr = ax25_bpq_get_addr(dev)) != NULL) |
dev | 703 | net/ax25/af_ax25.c | return dev; |
dev | 979 | net/ax25/af_ax25.c | static struct sock *ax25_make_new(struct sock *osk, struct device *dev) |
dev | 992 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
dev | 1155 | net/ax25/af_ax25.c | struct device *dev; |
dev | 1180 | net/ax25/af_ax25.c | dev = NULL; |
dev | 1184 | net/ax25/af_ax25.c | if ((dev = ax25rtr_get_dev(&addr->fsa_digipeater[0])) == NULL) { |
dev | 1190 | net/ax25/af_ax25.c | printk("AX25: bound to device %s\n", dev->name); |
dev | 1193 | net/ax25/af_ax25.c | if ((dev = ax25rtr_get_dev(&addr->fsa_ax25.sax25_call)) == NULL) { |
dev | 1199 | net/ax25/af_ax25.c | printk("AX25: bound to device %s\n", dev->name); |
dev | 1202 | net/ax25/af_ax25.c | ax25_fillin_cb(sk->ax25, dev); |
dev | 1430 | net/ax25/af_ax25.c | static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_addr, struct packet_type *ptype) |
dev | 1467 | net/ax25/af_ax25.c | ax25_rt_rx_frame(&src, dev, &dp); |
dev | 1474 | net/ax25/af_ax25.c | struct device *dev_out = dev; |
dev | 1481 | net/ax25/af_ax25.c | if (ax25_dev_get_value(dev, AX25_VALUES_DIGI) & AX25_DIGI_XBAND) { |
dev | 1490 | net/ax25/af_ax25.c | if (dev != dev_out && (ax25_dev_get_value(dev_out, AX25_VALUES_DIGI) & AX25_DIGI_XBAND) == 0) { |
dev | 1496 | net/ax25/af_ax25.c | if (dev == dev_out && (ax25_dev_get_value(dev, AX25_VALUES_DIGI) & AX25_DIGI_INBAND) == 0) { |
dev | 1538 | net/ax25/af_ax25.c | if (!mine && ax25cmp(&dest, (ax25_address *)dev->broadcast) != 0) { |
dev | 1548 | net/ax25/af_ax25.c | ax25_ip_mode_set(&src, dev, 'D'); |
dev | 1549 | net/ax25/af_ax25.c | ip_rcv(skb, dev, ptype); /* Note ptype here is the wrong one, fix me later */ |
dev | 1554 | net/ax25/af_ax25.c | arp_rcv(skb, dev, ptype); /* Note ptype here is wrong... */ |
dev | 1591 | net/ax25/af_ax25.c | if (!ax25_dev_get_value(dev, AX25_VALUES_CONMODE)) { |
dev | 1600 | net/ax25/af_ax25.c | if ((ax25 = ax25_find_cb(&dest, &src, dev)) != NULL) { |
dev | 1622 | net/ax25/af_ax25.c | ax25_return_dm(dev, &src, &dest, &dp); |
dev | 1630 | net/ax25/af_ax25.c | if ((sk = ax25_find_listener(&dest, dev, SOCK_SEQPACKET)) != NULL) { |
dev | 1631 | net/ax25/af_ax25.c | if (sk->ack_backlog == sk->max_ack_backlog || (make = ax25_make_new(sk, dev)) == NULL) { |
dev | 1633 | net/ax25/af_ax25.c | ax25_return_dm(dev, &src, &dest, &dp); |
dev | 1656 | net/ax25/af_ax25.c | ax25_return_dm(dev, &src, &dest, &dp); |
dev | 1661 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
dev | 1664 | net/ax25/af_ax25.c | ax25_return_dm(dev, &src, &dest, &dp); |
dev | 1695 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
dev | 1698 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
dev | 1701 | net/ax25/af_ax25.c | ax25->device = dev; |
dev | 1728 | net/ax25/af_ax25.c | static int kiss_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *ptype) |
dev | 1739 | net/ax25/af_ax25.c | return ax25_rcv(skb, dev, (ax25_address *)dev->dev_addr, ptype); |
dev | 1746 | net/ax25/af_ax25.c | static int bpq_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *ptype) |
dev | 1753 | net/ax25/af_ax25.c | if ((port_call = ax25_bpq_get_addr(dev)) == NULL) { |
dev | 1763 | net/ax25/af_ax25.c | return ax25_rcv(skb, dev, port_call, ptype); |
dev | 2096 | net/ax25/af_ax25.c | struct device *dev; |
dev | 2107 | net/ax25/af_ax25.c | if ((dev = ax25->device) == NULL) |
dev | 2110 | net/ax25/af_ax25.c | devname = dev->name; |
dev | 2257 | net/ax25/af_ax25.c | void ax25_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) |
dev | 2272 | net/ax25/af_ax25.c | if(dev->type == ARPHRD_ETHER) { |
dev | 2290 | net/ax25/af_ax25.c | dev->hard_header(skb, dev, ETH_P_BPQ, bcast_addr, NULL, 0); |
dev | 2298 | net/ax25/af_ax25.c | dev_queue_xmit(skb, dev, pri); |
dev | 2315 | net/ax25/af_ax25.c | dev_queue_xmit(skb, dev, pri); |
dev | 2329 | net/ax25/af_ax25.c | int ax25_encapsulate(struct sk_buff *skb, struct device *dev, unsigned short type, void *daddr, |
dev | 2338 | net/ax25/af_ax25.c | memcpy(buff, daddr, dev->addr_len); /* Address specified */ |
dev | 2346 | net/ax25/af_ax25.c | memcpy(buff, saddr, dev->addr_len); |
dev | 2348 | net/ax25/af_ax25.c | memcpy(buff, dev->dev_addr, dev->addr_len); |
dev | 2378 | net/ax25/af_ax25.c | int ax25_rebuild_header(unsigned char *bp, struct device *dev, unsigned long dest, struct sk_buff *skb) |
dev | 2382 | net/ax25/af_ax25.c | if (arp_find(bp + 1, dest, dev, dev->pa_addr, skb)) |
dev | 2386 | net/ax25/af_ax25.c | mode = ax25_ip_mode_get((ax25_address *)(bp + 1), dev); |
dev | 2387 | net/ax25/af_ax25.c | if (mode == 'V' || mode == 'v' || (mode == ' ' && ax25_dev_get_value(dev, AX25_VALUES_IPDEFMODE) == 'V')) { |
dev | 2404 | net/ax25/af_ax25.c | ax25_send_frame(skb, (ax25_address *)(bp + 8), (ax25_address *)(bp + 1), NULL, dev); |
dev | 2417 | net/ax25/af_ax25.c | ax25_dg_build_path(skb, (ax25_address *)(bp + 1), dev); |
dev | 65 | net/ax25/ax25_route.c | struct device *dev; |
dev | 74 | net/ax25/ax25_route.c | struct device *dev; |
dev | 78 | net/ax25/ax25_route.c | void ax25_rt_rx_frame(ax25_address *src, struct device *dev, ax25_digi *digi) |
dev | 93 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, src) == 0 && ax25_rt->dev == dev) { |
dev | 113 | net/ax25/ax25_route.c | ax25_rt->dev = dev; |
dev | 138 | net/ax25/ax25_route.c | void ax25_rt_device_down(struct device *dev) |
dev | 146 | net/ax25/ax25_route.c | if (s->dev == dev) { |
dev | 172 | net/ax25/ax25_route.c | struct device *dev; |
dev | 180 | net/ax25/ax25_route.c | if ((dev = ax25rtr_get_dev(&route.port_addr)) == NULL) |
dev | 185 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, &route.dest_addr) == 0 && ax25_rt->dev == dev) { |
dev | 207 | net/ax25/ax25_route.c | ax25_rt->dev = dev; |
dev | 235 | net/ax25/ax25_route.c | if ((dev = ax25rtr_get_dev(&route.port_addr)) == NULL) |
dev | 241 | net/ax25/ax25_route.c | if (s->dev == dev && ax25cmp(&route.dest_addr, &s->callsign) == 0) { |
dev | 286 | net/ax25/ax25_route.c | ax25_rt->dev ? ax25_rt->dev->name : "???", |
dev | 381 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev != NULL) |
dev | 383 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, &null_ax25_address) == 0 && ax25_rt->dev != NULL) |
dev | 423 | net/ax25/ax25_route.c | if (ax25_rt->dev == NULL) |
dev | 429 | net/ax25/ax25_route.c | ax25->device = ax25_rt->dev; |
dev | 439 | net/ax25/ax25_route.c | void ax25_dg_build_path(struct sk_buff *skb, ax25_address *addr, struct device *dev) |
dev | 447 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, addr) == 0 && ax25_rt->dev == dev) { |
dev | 476 | net/ax25/ax25_route.c | void ax25_ip_mode_set(ax25_address *callsign, struct device *dev, char ip_mode) |
dev | 481 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, callsign) == 0 && ax25_rt->dev == dev) { |
dev | 491 | net/ax25/ax25_route.c | char ax25_ip_mode_get(ax25_address *callsign, struct device *dev) |
dev | 496 | net/ax25/ax25_route.c | if (ax25cmp(&ax25_rt->callsign, callsign) == 0 && ax25_rt->dev == dev) |
dev | 502 | net/ax25/ax25_route.c | static struct ax25_dev *ax25_dev_get_dev(struct device *dev) |
dev | 507 | net/ax25/ax25_route.c | if (s->dev == dev) |
dev | 516 | net/ax25/ax25_route.c | unsigned short ax25_dev_get_value(struct device *dev, int valueno) |
dev | 520 | net/ax25/ax25_route.c | if ((ax25_dev = ax25_dev_get_dev(dev)) == NULL) { |
dev | 532 | net/ax25/ax25_route.c | void ax25_dev_device_up(struct device *dev) |
dev | 540 | net/ax25/ax25_route.c | ax25_dev->dev = dev; |
dev | 565 | net/ax25/ax25_route.c | void ax25_dev_device_down(struct device *dev) |
dev | 573 | net/ax25/ax25_route.c | if (s->dev == dev) { |
dev | 593 | net/ax25/ax25_route.c | struct device *dev; |
dev | 604 | net/ax25/ax25_route.c | if ((dev = ax25rtr_get_dev(&ax25_parms.port_addr)) == NULL) |
dev | 606 | net/ax25/ax25_route.c | if ((ax25_dev = ax25_dev_get_dev(dev)) == NULL) |
dev | 655 | net/ax25/ax25_route.c | if ((dev = ax25rtr_get_dev(&ax25_parms.port_addr)) == NULL) |
dev | 657 | net/ax25/ax25_route.c | if ((ax25_dev = ax25_dev_get_dev(dev)) == NULL) |
dev | 674 | net/ax25/ax25_route.c | struct device *dev; |
dev | 691 | net/ax25/ax25_route.c | bpqdev->dev ? bpqdev->dev->name : "???", |
dev | 715 | net/ax25/ax25_route.c | ax25_address *ax25_bpq_get_addr(struct device *dev) |
dev | 720 | net/ax25/ax25_route.c | if (bpqdev->dev == dev) |
dev | 731 | net/ax25/ax25_route.c | struct device *dev; |
dev | 739 | net/ax25/ax25_route.c | if ((dev = dev_get(bpqaddr.dev)) == NULL) |
dev | 741 | net/ax25/ax25_route.c | if (dev->type != ARPHRD_ETHER) |
dev | 744 | net/ax25/ax25_route.c | if (bpqdev->dev == dev) { |
dev | 751 | net/ax25/ax25_route.c | bpqdev->dev = dev; |
dev | 205 | net/ax25/ax25_subr.c | struct device *dev; |
dev | 207 | net/ax25/ax25_subr.c | if ((dev = ax25->device) == NULL) |
dev | 250 | net/ax25/ax25_subr.c | void ax25_return_dm(struct device *dev, ax25_address *src, ax25_address *dest, ax25_digi *digi) |
dev | 256 | net/ax25/ax25_subr.c | if (dev == NULL) |
dev | 281 | net/ax25/ax25_subr.c | ax25_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 201 | net/core/dev.c | struct device *dev; |
dev | 203 | net/core/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 205 | net/core/dev.c | if (strcmp(dev->name, name) == 0) |
dev | 206 | net/core/dev.c | return(dev); |
dev | 236 | net/core/dev.c | int dev_open(struct device *dev) |
dev | 243 | net/core/dev.c | if (dev->open) |
dev | 244 | net/core/dev.c | ret = dev->open(dev); |
dev | 252 | net/core/dev.c | dev->flags |= (IFF_UP | IFF_RUNNING); |
dev | 256 | net/core/dev.c | dev_mc_upload(dev); |
dev | 257 | net/core/dev.c | notifier_call_chain(&netdev_chain, NETDEV_UP, dev); |
dev | 267 | net/core/dev.c | int dev_close(struct device *dev) |
dev | 276 | net/core/dev.c | if ((dev->flags & IFF_UP) && dev->stop) |
dev | 277 | net/core/dev.c | dev->stop(dev); |
dev | 283 | net/core/dev.c | dev->flags&=~(IFF_UP|IFF_RUNNING); |
dev | 288 | net/core/dev.c | notifier_call_chain(&netdev_chain, NETDEV_DOWN, dev); |
dev | 292 | net/core/dev.c | dev_mc_discard(dev); |
dev | 296 | net/core/dev.c | dev->pa_addr = 0; |
dev | 297 | net/core/dev.c | dev->pa_dstaddr = 0; |
dev | 298 | net/core/dev.c | dev->pa_brdaddr = 0; |
dev | 299 | net/core/dev.c | dev->pa_mask = 0; |
dev | 306 | net/core/dev.c | while((skb=skb_dequeue(&dev->buffs[ct]))!=NULL) |
dev | 338 | net/core/dev.c | void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) |
dev | 351 | net/core/dev.c | skb->dev = dev; |
dev | 378 | net/core/dev.c | if (!skb->arp && dev->rebuild_header(skb->data, dev, skb->raddr, skb)) { |
dev | 391 | net/core/dev.c | if (net_alias_is(dev)) |
dev | 392 | net/core/dev.c | skb->dev = dev = net_alias_main_dev(dev); |
dev | 394 | net/core/dev.c | list = dev->buffs + pri; |
dev | 401 | net/core/dev.c | if (skb_queue_len(list) > dev->tx_queue_len) { |
dev | 422 | net/core/dev.c | if ((ptype->dev == dev || !ptype->dev) && |
dev | 428 | net/core/dev.c | skb2->h.raw = skb2->data + dev->hard_header_len; |
dev | 430 | net/core/dev.c | ptype->func(skb2, skb->dev, ptype); |
dev | 436 | net/core/dev.c | if (dev->hard_start_xmit(skb, dev) == 0) { |
dev | 519 | net/core/dev.c | struct device *dev; |
dev | 521 | net/core/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 523 | net/core/dev.c | if (dev->flags != 0 && !dev->tbusy) { |
dev | 527 | net/core/dev.c | dev_tint(dev); |
dev | 631 | net/core/dev.c | pt_prev->func(skb2,skb->dev, pt_prev); |
dev | 638 | net/core/dev.c | if (ptype->type == type && (!ptype->dev || ptype->dev==skb->dev)) |
dev | 656 | net/core/dev.c | pt_prev->func(skb2, skb->dev, pt_prev); |
dev | 668 | net/core/dev.c | pt_prev->func(skb, skb->dev, pt_prev); |
dev | 709 | net/core/dev.c | void dev_tint(struct device *dev) |
dev | 720 | net/core/dev.c | if (net_alias_is(dev)) return; |
dev | 722 | net/core/dev.c | head = dev->buffs; |
dev | 746 | net/core/dev.c | dev_queue_xmit(skb,dev,-i - 1); |
dev | 750 | net/core/dev.c | if (dev->tbusy) |
dev | 769 | net/core/dev.c | struct device *dev; |
dev | 798 | net/core/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 800 | net/core/dev.c | if(!(dev->flags & IFF_UP)) /* Downed devices don't count */ |
dev | 810 | net/core/dev.c | strcpy(ifr.ifr_name, dev->name); |
dev | 811 | net/core/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_family = dev->family; |
dev | 812 | net/core/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 846 | net/core/dev.c | static int sprintf_stats(char *buffer, struct device *dev) |
dev | 848 | net/core/dev.c | struct enet_statistics *stats = (dev->get_stats ? dev->get_stats(dev): NULL); |
dev | 853 | net/core/dev.c | dev->name, |
dev | 864 | net/core/dev.c | size = sprintf(buffer, "%6s: No statistics available.\n", dev->name); |
dev | 881 | net/core/dev.c | struct device *dev; |
dev | 891 | net/core/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 893 | net/core/dev.c | size = sprintf_stats(buffer+len, dev); |
dev | 939 | net/core/dev.c | struct device *dev; |
dev | 968 | net/core/dev.c | if ((dev = net_alias_dev_get(ifr.ifr_name, getset == SIOCSIFADDR, &err, NULL, NULL)) == NULL) |
dev | 971 | net/core/dev.c | if ((dev = dev_get(ifr.ifr_name)) == NULL) |
dev | 977 | net/core/dev.c | ifr.ifr_flags = dev->flags; |
dev | 982 | net/core/dev.c | int old_flags = dev->flags; |
dev | 995 | net/core/dev.c | dev->flags = (ifr.ifr_flags & ( |
dev | 999 | net/core/dev.c | | IFF_MULTICAST)) | (dev->flags & IFF_UP); |
dev | 1004 | net/core/dev.c | dev_mc_upload(dev); |
dev | 1015 | net/core/dev.c | ret=dev_close(dev); |
dev | 1018 | net/core/dev.c | ret=dev_open(dev); |
dev | 1020 | net/core/dev.c | dev->flags&=~IFF_UP; /* Open failed */ |
dev | 1029 | net/core/dev.c | dev_mc_upload(dev); |
dev | 1036 | net/core/dev.c | memcpy(ifr.ifr_hwaddr.sa_data,dev->dev_addr, MAX_ADDR_LEN); |
dev | 1037 | net/core/dev.c | ifr.ifr_hwaddr.sa_family=dev->type; |
dev | 1043 | net/core/dev.c | &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 1045 | net/core/dev.c | &ifr.ifr_addr).sin_family = dev->family; |
dev | 1060 | net/core/dev.c | if(dev->set_mac_address==NULL) |
dev | 1062 | net/core/dev.c | ret=dev->set_mac_address(dev,&ifr.ifr_addr); |
dev | 1073 | net/core/dev.c | if (net_alias_is(dev)) |
dev | 1074 | net/core/dev.c | net_alias_dev_rehash(dev ,&ifr.ifr_addr); |
dev | 1076 | net/core/dev.c | dev->pa_addr = (*(struct sockaddr_in *) |
dev | 1078 | net/core/dev.c | dev->family = ifr.ifr_addr.sa_family; |
dev | 1083 | net/core/dev.c | dev->pa_mask = ip_get_mask(dev->pa_addr); |
dev | 1085 | net/core/dev.c | dev->pa_brdaddr = dev->pa_addr | ~dev->pa_mask; |
dev | 1092 | net/core/dev.c | &ifr.ifr_broadaddr).sin_addr.s_addr = dev->pa_brdaddr; |
dev | 1094 | net/core/dev.c | &ifr.ifr_broadaddr).sin_family = dev->family; |
dev | 1100 | net/core/dev.c | dev->pa_brdaddr = (*(struct sockaddr_in *) |
dev | 1107 | net/core/dev.c | &ifr.ifr_dstaddr).sin_addr.s_addr = dev->pa_dstaddr; |
dev | 1109 | net/core/dev.c | &ifr.ifr_dstaddr).sin_family = dev->family; |
dev | 1115 | net/core/dev.c | dev->pa_dstaddr = (*(struct sockaddr_in *) |
dev | 1122 | net/core/dev.c | &ifr.ifr_netmask).sin_addr.s_addr = dev->pa_mask; |
dev | 1124 | net/core/dev.c | &ifr.ifr_netmask).sin_family = dev->family; |
dev | 1139 | net/core/dev.c | dev->pa_mask = mask; |
dev | 1146 | net/core/dev.c | ifr.ifr_metric = dev->metric; |
dev | 1150 | net/core/dev.c | dev->metric = ifr.ifr_metric; |
dev | 1155 | net/core/dev.c | ifr.ifr_mtu = dev->mtu; |
dev | 1166 | net/core/dev.c | dev->mtu = ifr.ifr_mtu; |
dev | 1180 | net/core/dev.c | memcpy(ifr.ifr_hwaddr.sa_data,dev->dev_addr, MAX_ADDR_LEN); |
dev | 1181 | net/core/dev.c | ifr.ifr_hwaddr.sa_family=dev->type; |
dev | 1185 | net/core/dev.c | if(dev->set_mac_address==NULL) |
dev | 1187 | net/core/dev.c | if(ifr.ifr_hwaddr.sa_family!=dev->type) |
dev | 1189 | net/core/dev.c | ret=dev->set_mac_address(dev,&ifr.ifr_hwaddr); |
dev | 1193 | net/core/dev.c | ifr.ifr_map.mem_start=dev->mem_start; |
dev | 1194 | net/core/dev.c | ifr.ifr_map.mem_end=dev->mem_end; |
dev | 1195 | net/core/dev.c | ifr.ifr_map.base_addr=dev->base_addr; |
dev | 1196 | net/core/dev.c | ifr.ifr_map.irq=dev->irq; |
dev | 1197 | net/core/dev.c | ifr.ifr_map.dma=dev->dma; |
dev | 1198 | net/core/dev.c | ifr.ifr_map.port=dev->if_port; |
dev | 1202 | net/core/dev.c | if(dev->set_config==NULL) |
dev | 1204 | net/core/dev.c | return dev->set_config(dev,&ifr.ifr_map); |
dev | 1207 | net/core/dev.c | if(dev->set_multicast_list==NULL) |
dev | 1211 | net/core/dev.c | dev_mc_add(dev,ifr.ifr_hwaddr.sa_data, dev->addr_len, 1); |
dev | 1215 | net/core/dev.c | if(dev->set_multicast_list==NULL) |
dev | 1219 | net/core/dev.c | dev_mc_delete(dev,ifr.ifr_hwaddr.sa_data,dev->addr_len, 1); |
dev | 1228 | net/core/dev.c | if(dev->do_ioctl==NULL) |
dev | 1230 | net/core/dev.c | ret=dev->do_ioctl(dev, &ifr, getset); |
dev | 1328 | net/core/dev.c | struct device *dev, **dp; |
dev | 1372 | net/core/dev.c | while ((dev = *dp) != NULL) |
dev | 1376 | net/core/dev.c | skb_queue_head_init(dev->buffs + i); |
dev | 1379 | net/core/dev.c | if (dev->init && dev->init(dev)) |
dev | 1384 | net/core/dev.c | *dp = dev->next; |
dev | 1388 | net/core/dev.c | dp = &dev->next; |
dev | 62 | net/core/dev_mcast.c | void dev_mc_upload(struct device *dev) |
dev | 68 | net/core/dev_mcast.c | if(!(dev->flags&IFF_UP)) |
dev | 75 | net/core/dev_mcast.c | if(dev->set_multicast_list==NULL) |
dev | 78 | net/core/dev_mcast.c | dev->set_multicast_list(dev); |
dev | 85 | net/core/dev_mcast.c | void dev_mc_delete(struct device *dev, void *addr, int alen, int all) |
dev | 88 | net/core/dev_mcast.c | for(dmi=&dev->mc_list;*dmi!=NULL;dmi=&(*dmi)->next) |
dev | 96 | net/core/dev_mcast.c | dev->mc_count--; |
dev | 98 | net/core/dev_mcast.c | dev_mc_upload(dev); |
dev | 108 | net/core/dev_mcast.c | void dev_mc_add(struct device *dev, void *addr, int alen, int newonly) |
dev | 111 | net/core/dev_mcast.c | for(dmi=dev->mc_list;dmi!=NULL;dmi=dmi->next) |
dev | 125 | net/core/dev_mcast.c | dmi->next=dev->mc_list; |
dev | 127 | net/core/dev_mcast.c | dev->mc_list=dmi; |
dev | 128 | net/core/dev_mcast.c | dev->mc_count++; |
dev | 129 | net/core/dev_mcast.c | dev_mc_upload(dev); |
dev | 136 | net/core/dev_mcast.c | void dev_mc_discard(struct device *dev) |
dev | 138 | net/core/dev_mcast.c | while(dev->mc_list!=NULL) |
dev | 140 | net/core/dev_mcast.c | struct dev_mc_list *tmp=dev->mc_list; |
dev | 141 | net/core/dev_mcast.c | dev->mc_list=dev->mc_list->next; |
dev | 144 | net/core/dev_mcast.c | dev->mc_count=0; |
dev | 70 | net/core/net_alias.c | static int net_alias_devinit(struct device *dev); |
dev | 71 | net/core/net_alias.c | static int net_alias_hard_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 76 | net/core/net_alias.c | static void net_alias_free(struct device *dev); |
dev | 200 | net/core/net_alias.c | struct device *dev, struct sockaddr *sa) |
dev | 203 | net/core/net_alias.c | return nat->dev_addr_chk(nat, dev, sa); |
dev | 205 | net/core/net_alias.c | return (dev->pa_addr == (*(struct sockaddr_in *)sa).sin_addr.s_addr); |
dev | 215 | net/core/net_alias.c | net_alias_devinit(struct device *dev) |
dev | 218 | net/core/net_alias.c | printk("net_alias_devinit(%s) called.\n", dev->name); |
dev | 230 | net/core/net_alias.c | net_alias_hard_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 232 | net/core/net_alias.c | printk("net_alias: net_alias_hard_start_xmit() for %s called (ignored)!!\n", dev->name); |
dev | 247 | net/core/net_alias.c | struct device *dev; |
dev | 259 | net/core/net_alias.c | dev = &alias->dev; |
dev | 260 | net/core/net_alias.c | memset(dev, '\0', sizeof(struct device)); |
dev | 263 | net/core/net_alias.c | dev->alias_info = NULL; /* no aliasing recursion */ |
dev | 264 | net/core/net_alias.c | dev->my_alias = alias; /* point to alias */ |
dev | 265 | net/core/net_alias.c | dev->name = alias->name; |
dev | 266 | net/core/net_alias.c | dev->type = main_dev->type; |
dev | 267 | net/core/net_alias.c | dev->hard_header_len = main_dev->hard_header_len; |
dev | 268 | net/core/net_alias.c | memcpy(dev->broadcast, main_dev->broadcast, MAX_ADDR_LEN); |
dev | 269 | net/core/net_alias.c | memcpy(dev->dev_addr, main_dev->dev_addr, MAX_ADDR_LEN); |
dev | 270 | net/core/net_alias.c | dev->addr_len = main_dev->addr_len; |
dev | 271 | net/core/net_alias.c | dev->init = net_alias_devinit; |
dev | 272 | net/core/net_alias.c | dev->hard_start_xmit = net_alias_hard_start_xmit; |
dev | 273 | net/core/net_alias.c | dev->flags = main_dev->flags & NET_ALIAS_IFF_MASK & ~IFF_UP; |
dev | 281 | net/core/net_alias.c | dev->metric = main_dev->metric; |
dev | 282 | net/core/net_alias.c | dev->mtu = main_dev->mtu; |
dev | 283 | net/core/net_alias.c | dev->pa_alen = main_dev->pa_alen; |
dev | 284 | net/core/net_alias.c | dev->hard_header = main_dev->hard_header; |
dev | 285 | net/core/net_alias.c | dev->rebuild_header = main_dev->rebuild_header; |
dev | 294 | net/core/net_alias.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 296 | net/core/net_alias.c | dev->family = family; |
dev | 338 | net/core/net_alias.c | struct device *dev; |
dev | 419 | net/core/net_alias.c | dev = &alias->dev; |
dev | 436 | net/core/net_alias.c | addr32 = (sa)? nat_addr32(nat, sa) : alias->dev.pa_addr; |
dev | 466 | net/core/net_alias.c | dev->next = alias_info->taildev->next; |
dev | 467 | net/core/net_alias.c | alias_info->taildev->next = dev; |
dev | 468 | net/core/net_alias.c | alias_info->taildev = dev; |
dev | 470 | net/core/net_alias.c | return dev; |
dev | 483 | net/core/net_alias.c | struct device *dev; |
dev | 522 | net/core/net_alias.c | dev = &alias->dev; |
dev | 559 | net/core/net_alias.c | if ( dev == alias_info->taildev ) |
dev | 565 | net/core/net_alias.c | prevdev->next = dev->next; |
dev | 566 | net/core/net_alias.c | dev_close(dev); |
dev | 605 | net/core/net_alias.c | struct device *dev; |
dev | 622 | net/core/net_alias.c | dev = main_dev->next; |
dev | 633 | net/core/net_alias.c | while (dev) |
dev | 635 | net/core/net_alias.c | if (net_alias_is(dev)) |
dev | 637 | net/core/net_alias.c | alias = dev->my_alias; |
dev | 650 | net/core/net_alias.c | dev_close(dev); |
dev | 651 | net/core/net_alias.c | dev = dev->next; |
dev | 663 | net/core/net_alias.c | dev = dev->next; |
dev | 678 | net/core/net_alias.c | struct device *dev; |
dev | 684 | net/core/net_alias.c | if ((dev=dev_get(dev_name))) |
dev | 685 | net/core/net_alias.c | return dev; |
dev | 709 | net/core/net_alias.c | if (!(dev=dev_get(dev_name))) |
dev | 734 | net/core/net_alias.c | return net_alias_dev_delete(dev, slot, err); |
dev | 736 | net/core/net_alias.c | return net_alias_dev_create(dev, slot, err, sa, data); |
dev | 745 | net/core/net_alias.c | net_alias_dev_rehash(struct device *dev, struct sockaddr *sa) |
dev | 758 | net/core/net_alias.c | if (dev == NULL) return -1; |
dev | 759 | net/core/net_alias.c | if ( (alias = dev->my_alias) == NULL ) return -1; |
dev | 930 | net/core/net_alias.c | struct device *dev; |
dev | 933 | net/core/net_alias.c | for (dev = dev_base; dev ; dev = dev->next) |
dev | 934 | net/core/net_alias.c | if (net_alias_is(dev)) |
dev | 936 | net/core/net_alias.c | alias = dev->my_alias; |
dev | 938 | net/core/net_alias.c | dlen=sprintf(buffer+len, "%-16s %-6d ", alias->name, alias->dev.family); |
dev | 984 | net/core/net_alias.c | struct device *dev = ptr; |
dev | 989 | net/core/net_alias.c | printk("net_alias: NETDEV_DOWN for %s received\n", dev->name); |
dev | 991 | net/core/net_alias.c | if (net_alias_has(dev)) |
dev | 992 | net/core/net_alias.c | net_alias_free(dev); |
dev | 998 | net/core/net_alias.c | printk("net_alias: NETDEV_UP for %s received\n", dev->name); |
dev | 1000 | net/core/net_alias.c | dev->alias_info = 0; |
dev | 1019 | net/core/net_alias.c | if (alias->dev.family != sa->sa_family) continue; |
dev | 1025 | net/core/net_alias.c | if (alias->dev.flags & flags_on && !(alias->dev.flags & flags_off) && |
dev | 1026 | net/core/net_alias.c | nat_dev_addr_chk_1(nat,&alias->dev,sa)) |
dev | 1027 | net/core/net_alias.c | return &alias->dev; |
dev | 1044 | net/core/net_alias.c | if (alias->dev.family != family) continue; |
dev | 1050 | net/core/net_alias.c | if (alias->dev.flags & flags_on && !(alias->dev.flags & flags_off) && |
dev | 1051 | net/core/net_alias.c | addr32 == alias->dev.pa_addr) |
dev | 1052 | net/core/net_alias.c | return &alias->dev; |
dev | 1120 | net/core/net_alias.c | struct device *dev; |
dev | 1153 | net/core/net_alias.c | dev = nat_addr_chk(nat, alias_info, sa_dst, IFF_UP, 0); |
dev | 1155 | net/core/net_alias.c | if (dev != NULL) return dev; |
dev | 1163 | net/core/net_alias.c | dev = nat->dev_select(nat, main_dev, sa_src); |
dev | 1165 | net/core/net_alias.c | if (dev == NULL || dev->family != family) return main_dev; |
dev | 1171 | net/core/net_alias.c | dev = net_alias_is(dev)? |
dev | 1172 | net/core/net_alias.c | ( (dev->my_alias->main_dev == main_dev)? dev : NULL) : NULL; |
dev | 1178 | net/core/net_alias.c | return (dev)? dev : main_dev; |
dev | 1192 | net/core/net_alias.c | struct device *dev; |
dev | 1224 | net/core/net_alias.c | dev = nat_addr_chk32(nat, alias_info, family, dst, IFF_UP, 0); |
dev | 1225 | net/core/net_alias.c | if (dev) return dev; |
dev | 1237 | net/core/net_alias.c | dev = nat->dev_select(nat, main_dev, (struct sockaddr *)&sin_src); |
dev | 1239 | net/core/net_alias.c | if (dev == NULL || dev->family != family) return main_dev; |
dev | 1245 | net/core/net_alias.c | dev = net_alias_is(dev)? |
dev | 1246 | net/core/net_alias.c | ( (dev->my_alias->main_dev == main_dev)? dev : NULL) : NULL; |
dev | 1252 | net/core/net_alias.c | return (dev)? dev : main_dev; |
dev | 695 | net/core/skbuff.c | n->dev=skb->dev; |
dev | 552 | net/core/sock.c | sk->prot->rcv(skb, skb->dev, (struct options*)skb->proto_priv, |
dev | 90 | net/ethernet/eth.c | int eth_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 110 | net/ethernet/eth.c | memcpy(eth->h_source,saddr,dev->addr_len); |
dev | 112 | net/ethernet/eth.c | memcpy(eth->h_source,dev->dev_addr,dev->addr_len); |
dev | 118 | net/ethernet/eth.c | if (dev->flags & IFF_LOOPBACK) |
dev | 120 | net/ethernet/eth.c | memset(eth->h_dest, 0, dev->addr_len); |
dev | 121 | net/ethernet/eth.c | return(dev->hard_header_len); |
dev | 126 | net/ethernet/eth.c | memcpy(eth->h_dest,daddr,dev->addr_len); |
dev | 127 | net/ethernet/eth.c | return dev->hard_header_len; |
dev | 130 | net/ethernet/eth.c | return -dev->hard_header_len; |
dev | 140 | net/ethernet/eth.c | int eth_rebuild_header(void *buff, struct device *dev, unsigned long dst, |
dev | 151 | net/ethernet/eth.c | printk(KERN_DEBUG "%s: unable to resolve type %X addresses.\n",dev->name,(int)eth->h_proto); |
dev | 152 | net/ethernet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 160 | net/ethernet/eth.c | return arp_find(eth->h_dest, dst, dev, dev->pa_addr, skb)? 1 : 0; |
dev | 173 | net/ethernet/eth.c | unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev) |
dev | 179 | net/ethernet/eth.c | skb_pull(skb,dev->hard_header_len); |
dev | 184 | net/ethernet/eth.c | if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) |
dev | 195 | net/ethernet/eth.c | else if(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)) |
dev | 197 | net/ethernet/eth.c | if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN)) |
dev | 227 | net/ethernet/eth.c | void eth_header_cache_bind(struct hh_cache ** hhp, struct device *dev, |
dev | 237 | net/ethernet/eth.c | if (arp_bind_cache(hhp, dev, htype, daddr)) |
dev | 241 | net/ethernet/eth.c | memcpy(hh->hh_data+6, dev->dev_addr, ETH_ALEN); |
dev | 251 | net/ethernet/eth.c | void eth_header_cache_update(struct hh_cache *hh, struct device *dev, unsigned char * haddr) |
dev | 11 | net/ethernet/pe2.c | struct device *dev = skb->dev; |
dev | 14 | net/ethernet/pe2.c | dev->hard_header(skb, dev, ETH_P_IPX, dest_node, NULL, skb->len); |
dev | 362 | net/ipv4/af_inet.c | skb->dev = NULL; |
dev | 125 | net/ipv4/arp.c | struct device *dev; /* Device the entry is tied to */ |
dev | 391 | net/ipv4/arp.c | entry->dev->header_cache_update(hh, entry->dev, entry->ha); |
dev | 439 | net/ipv4/arp.c | struct device * dev = entry->dev; |
dev | 449 | net/ipv4/arp.c | dev, dev->pa_addr, entry->ha, |
dev | 450 | net/ipv4/arp.c | dev->dev_addr, NULL); |
dev | 517 | net/ipv4/arp.c | struct device *dev = entry->dev; |
dev | 526 | net/ipv4/arp.c | arp_send(ARPOP_REQUEST, ETH_P_ARP, entry->ip, dev, dev->pa_addr, |
dev | 527 | net/ipv4/arp.c | NULL, dev->dev_addr, NULL); |
dev | 537 | net/ipv4/arp.c | struct device *dev = entry->dev; |
dev | 548 | net/ipv4/arp.c | arp_send(ARPOP_REQUEST, ETH_P_ARP, entry->ip, dev, dev->pa_addr, |
dev | 549 | net/ipv4/arp.c | NULL, dev->dev_addr, NULL); |
dev | 585 | net/ipv4/arp.c | struct device *dev=ptr; |
dev | 607 | net/ipv4/arp.c | if (entry->dev == dev) |
dev | 627 | net/ipv4/arp.c | struct device *dev, u32 src_ip, |
dev | 639 | net/ipv4/arp.c | if (dev->flags&IFF_NOARP) |
dev | 646 | net/ipv4/arp.c | skb = alloc_skb(sizeof(struct arphdr)+ 2*(dev->addr_len+4) |
dev | 647 | net/ipv4/arp.c | + dev->hard_header_len, GFP_ATOMIC); |
dev | 653 | net/ipv4/arp.c | skb_reserve(skb, dev->hard_header_len); |
dev | 654 | net/ipv4/arp.c | arp = (struct arphdr *) skb_put(skb,sizeof(struct arphdr) + 2*(dev->addr_len+4)); |
dev | 656 | net/ipv4/arp.c | skb->dev = dev; |
dev | 664 | net/ipv4/arp.c | dev->hard_header(skb,dev,ptype,dest_hw?dest_hw:dev->broadcast,src_hw?src_hw:NULL,skb->len); |
dev | 667 | net/ipv4/arp.c | arp->ar_hrd = htons(dev->type); |
dev | 670 | net/ipv4/arp.c | arp->ar_pro = (dev->type == ARPHRD_AX25 || dev->type == ARPHRD_NETROM) ? htons(AX25_P_IP) : htons(ETH_P_IP); |
dev | 672 | net/ipv4/arp.c | arp->ar_pro = (dev->type != ARPHRD_AX25) ? htons(ETH_P_IP) : htons(AX25_P_IP); |
dev | 677 | net/ipv4/arp.c | arp->ar_hln = dev->addr_len; |
dev | 683 | net/ipv4/arp.c | memcpy(arp_ptr, src_hw, dev->addr_len); |
dev | 684 | net/ipv4/arp.c | arp_ptr+=dev->addr_len; |
dev | 688 | net/ipv4/arp.c | memcpy(arp_ptr, target_hw, dev->addr_len); |
dev | 690 | net/ipv4/arp.c | memset(arp_ptr, 0, dev->addr_len); |
dev | 691 | net/ipv4/arp.c | arp_ptr+=dev->addr_len; |
dev | 694 | net/ipv4/arp.c | dev_queue_xmit(skb, dev, 0); |
dev | 730 | net/ipv4/arp.c | if(!skb->dev->rebuild_header(skb->data,skb->dev,skb->raddr,skb)) |
dev | 734 | net/ipv4/arp.c | dev_queue_xmit(skb, skb->dev, 0); |
dev | 736 | net/ipv4/arp.c | dev_queue_xmit(skb,skb->dev,skb->sk->priority); |
dev | 776 | net/ipv4/arp.c | int arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 798 | net/ipv4/arp.c | if (arp->ar_hln != dev->addr_len || |
dev | 799 | net/ipv4/arp.c | dev->type != ntohs(arp->ar_hrd) || |
dev | 800 | net/ipv4/arp.c | dev->flags & IFF_NOARP || |
dev | 817 | net/ipv4/arp.c | switch (dev->type) |
dev | 865 | net/ipv4/arp.c | arp_ptr += dev->addr_len; |
dev | 869 | net/ipv4/arp.c | arp_ptr += dev->addr_len; |
dev | 904 | net/ipv4/arp.c | if (tip != dev->pa_addr && net_alias_has(skb->dev)) |
dev | 909 | net/ipv4/arp.c | dev = net_alias_dev_rcv_sel32(dev, AF_INET, sip, tip); |
dev | 911 | net/ipv4/arp.c | if (dev->type != ntohs(arp->ar_hrd) || dev->flags & IFF_NOARP) |
dev | 924 | net/ipv4/arp.c | if (tip != dev->pa_addr) |
dev | 945 | net/ipv4/arp.c | if (proxy_entry->dev == dev && |
dev | 952 | net/ipv4/arp.c | memcpy(ha, proxy_entry->ha, dev->addr_len); |
dev | 954 | net/ipv4/arp.c | arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,ha, sha); |
dev | 970 | net/ipv4/arp.c | arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha); |
dev | 995 | net/ipv4/arp.c | if (entry->ip == sip && entry->dev == dev) |
dev | 1004 | net/ipv4/arp.c | memcpy(entry->ha, sha, dev->addr_len); |
dev | 1045 | net/ipv4/arp.c | memcpy(entry->ha, sha, dev->addr_len); |
dev | 1052 | net/ipv4/arp.c | entry->dev = dev; |
dev | 1054 | net/ipv4/arp.c | entry->dev = skb->dev; |
dev | 1087 | net/ipv4/arp.c | static struct arp_table *arp_lookup(u32 paddr, unsigned short flags, struct device * dev) |
dev | 1095 | net/ipv4/arp.c | if (entry->ip == paddr && (!dev || entry->dev == dev)) |
dev | 1104 | net/ipv4/arp.c | if (entry->ip == paddr && (!dev || entry->dev == dev)) |
dev | 1111 | net/ipv4/arp.c | (!dev || entry->dev == dev)) |
dev | 1120 | net/ipv4/arp.c | int arp_query(unsigned char *haddr, u32 paddr, struct device * dev) |
dev | 1126 | net/ipv4/arp.c | entry = arp_lookup(paddr, 0, dev); |
dev | 1133 | net/ipv4/arp.c | memcpy(haddr, entry->ha, dev->addr_len); |
dev | 1143 | net/ipv4/arp.c | static int arp_set_predefined(int addr_hint, unsigned char * haddr, __u32 paddr, struct device * dev) |
dev | 1149 | net/ipv4/arp.c | memcpy(haddr, dev->dev_addr, dev->addr_len); |
dev | 1153 | net/ipv4/arp.c | if(dev->type==ARPHRD_ETHER || dev->type==ARPHRD_IEEE802) |
dev | 1173 | net/ipv4/arp.c | memcpy(haddr, dev->broadcast, dev->addr_len); |
dev | 1183 | net/ipv4/arp.c | int arp_find(unsigned char *haddr, u32 paddr, struct device *dev, |
dev | 1189 | net/ipv4/arp.c | if (arp_set_predefined(ip_chk_addr(paddr), haddr, paddr, dev)) |
dev | 1202 | net/ipv4/arp.c | entry = arp_lookup(paddr, 0, dev); |
dev | 1237 | net/ipv4/arp.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, dev); |
dev | 1251 | net/ipv4/arp.c | memcpy(haddr, entry->ha, dev->addr_len); |
dev | 1270 | net/ipv4/arp.c | memset(entry->ha, 0, dev->addr_len); |
dev | 1271 | net/ipv4/arp.c | entry->dev = dev; |
dev | 1307 | net/ipv4/arp.c | arp_send(ARPOP_REQUEST, ETH_P_ARP, paddr, dev, saddr, NULL, |
dev | 1308 | net/ipv4/arp.c | dev->dev_addr, NULL); |
dev | 1346 | net/ipv4/arp.c | if (entry->dev->type == ARPHRD_AX25 || entry->dev->type == ARPHRD_NETROM) |
dev | 1350 | net/ipv4/arp.c | if(entry->dev->type==ARPHRD_AX25) |
dev | 1356 | net/ipv4/arp.c | for(k=0,j=0;k<HBUFFERLEN-3 && j<entry->dev->addr_len;j++) |
dev | 1370 | net/ipv4/arp.c | (unsigned int)entry->dev->type, |
dev | 1377 | net/ipv4/arp.c | "*" : in_ntoa(entry->mask), entry->dev->name); |
dev | 1382 | net/ipv4/arp.c | "*" : in_ntoa(entry->mask), entry->dev->name, |
dev | 1408 | net/ipv4/arp.c | int arp_bind_cache(struct hh_cache ** hhp, struct device *dev, unsigned short htype, u32 paddr) |
dev | 1426 | net/ipv4/arp.c | arp_set_predefined(addr_hint, haddr, paddr, dev); |
dev | 1433 | net/ipv4/arp.c | dev->header_cache_update(hh, dev, haddr); |
dev | 1441 | net/ipv4/arp.c | entry = arp_lookup(paddr, 0, dev); |
dev | 1475 | net/ipv4/arp.c | dev->header_cache_update(hh, dev, entry->ha); |
dev | 1505 | net/ipv4/arp.c | memset(entry->ha, 0, dev->addr_len); |
dev | 1506 | net/ipv4/arp.c | entry->dev = dev; |
dev | 1526 | net/ipv4/arp.c | arp_send(ARPOP_REQUEST, ETH_P_ARP, paddr, dev, dev->pa_addr, NULL, dev->dev_addr, NULL); |
dev | 1566 | net/ipv4/arp.c | if (entry1->ip==sip && entry1->dev == entry->dev) |
dev | 1571 | net/ipv4/arp.c | struct device * dev = entry->dev; |
dev | 1582 | net/ipv4/arp.c | arp_send(ARPOP_REQUEST, ETH_P_ARP, entry->ip, dev, dev->pa_addr, NULL, dev->dev_addr, NULL); |
dev | 1656 | net/ipv4/arp.c | static int arp_req_set(struct arpreq *r, struct device * dev) |
dev | 1687 | net/ipv4/arp.c | if (!dev) { |
dev | 1690 | net/ipv4/arp.c | dev = dev1; |
dev | 1694 | net/ipv4/arp.c | if (r->arp_ha.sa_family != dev->type) |
dev | 1697 | net/ipv4/arp.c | if (((r->arp_flags & ATF_PUBL) && dev == dev1) || |
dev | 1698 | net/ipv4/arp.c | (!(r->arp_flags & ATF_PUBL) && dev != dev1)) |
dev | 1715 | net/ipv4/arp.c | entry = arp_lookup(ip, r->arp_flags & ~ATF_NETMASK, dev); |
dev | 1763 | net/ipv4/arp.c | if ((r->arp_flags & ATF_COM) && empty(ha, dev->addr_len)) |
dev | 1764 | net/ipv4/arp.c | ha = dev->dev_addr; |
dev | 1765 | net/ipv4/arp.c | memcpy(entry->ha, ha, dev->addr_len); |
dev | 1775 | net/ipv4/arp.c | entry->dev = dev; |
dev | 1787 | net/ipv4/arp.c | static int arp_req_get(struct arpreq *r, struct device *dev) |
dev | 1800 | net/ipv4/arp.c | entry = arp_lookup(si->sin_addr.s_addr, r->arp_flags|ATF_NETMASK, dev); |
dev | 1812 | net/ipv4/arp.c | memcpy(r->arp_ha.sa_data, &entry->ha, entry->dev->addr_len); |
dev | 1813 | net/ipv4/arp.c | r->arp_ha.sa_family = entry->dev->type; |
dev | 1815 | net/ipv4/arp.c | strncpy(r->arp_dev, entry->dev->name, 16); |
dev | 1820 | net/ipv4/arp.c | static int arp_req_delete(struct arpreq *r, struct device * dev) |
dev | 1837 | net/ipv4/arp.c | && (!dev || entry->dev == dev)) |
dev | 1849 | net/ipv4/arp.c | && (!dev || entry->dev == dev)) |
dev | 1870 | net/ipv4/arp.c | struct device * dev = NULL; |
dev | 1906 | net/ipv4/arp.c | if ((dev = dev_get(r.arp_dev)) == NULL) |
dev | 1910 | net/ipv4/arp.c | r.arp_ha.sa_family = dev->type; |
dev | 1911 | net/ipv4/arp.c | else if (r.arp_ha.sa_family != dev->type) |
dev | 1918 | net/ipv4/arp.c | if ((dev = dev_getbytype(r.arp_ha.sa_family)) == NULL) |
dev | 1926 | net/ipv4/arp.c | return arp_req_delete(&r, dev); |
dev | 1928 | net/ipv4/arp.c | return arp_req_set(&r, dev); |
dev | 1934 | net/ipv4/arp.c | err = arp_req_delete(&r, dev); |
dev | 1937 | net/ipv4/arp.c | arp_req_delete(&r, dev); |
dev | 1939 | net/ipv4/arp.c | err = arp_req_delete(&r, dev); |
dev | 1942 | net/ipv4/arp.c | err = arp_req_set(&r, dev); |
dev | 1951 | net/ipv4/arp.c | arp_req_delete(&r, dev); |
dev | 1958 | net/ipv4/arp.c | err = arp_req_get(&r, dev); |
dev | 1967 | net/ipv4/arp.c | err = arp_req_get(&r, dev); |
dev | 1971 | net/ipv4/arp.c | err = arp_req_get(&r, dev); |
dev | 78 | net/ipv4/devinet.c | struct device *dev; |
dev | 107 | net/ipv4/devinet.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 109 | net/ipv4/devinet.c | if ((!(dev->flags & IFF_UP)) || dev->family!=AF_INET) |
dev | 116 | net/ipv4/devinet.c | if (dev->pa_addr == 0) |
dev | 122 | net/ipv4/devinet.c | if (addr == dev->pa_addr) |
dev | 128 | net/ipv4/devinet.c | if ((dev->flags & IFF_BROADCAST) && addr == dev->pa_brdaddr) |
dev | 134 | net/ipv4/devinet.c | if (((addr ^ dev->pa_addr) & dev->pa_mask) == 0) |
dev | 136 | net/ipv4/devinet.c | if ((addr & ~dev->pa_mask) == 0) |
dev | 138 | net/ipv4/devinet.c | if ((addr & ~dev->pa_mask) == ~dev->pa_mask) |
dev | 146 | net/ipv4/devinet.c | if (((addr ^ dev->pa_addr) & mask) == 0) |
dev | 172 | net/ipv4/devinet.c | struct device *dev; |
dev | 174 | net/ipv4/devinet.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 176 | net/ipv4/devinet.c | if (dev->flags & IFF_LOOPBACK) |
dev | 177 | net/ipv4/devinet.c | return(dev->pa_addr); |
dev | 191 | net/ipv4/devinet.c | struct device *dev; |
dev | 193 | net/ipv4/devinet.c | for (dev = dev_base; dev; dev = dev->next) |
dev | 195 | net/ipv4/devinet.c | if (!(dev->flags & IFF_UP)) |
dev | 197 | net/ipv4/devinet.c | if (!(dev->flags & IFF_POINTOPOINT)) |
dev | 199 | net/ipv4/devinet.c | if (addr != dev->pa_dstaddr) |
dev | 201 | net/ipv4/devinet.c | return dev; |
dev | 203 | net/ipv4/devinet.c | for (dev = dev_base; dev; dev = dev->next) |
dev | 205 | net/ipv4/devinet.c | if (!(dev->flags & IFF_UP)) |
dev | 207 | net/ipv4/devinet.c | if (dev->flags & IFF_POINTOPOINT) |
dev | 209 | net/ipv4/devinet.c | if (dev->pa_mask & (addr ^ dev->pa_addr)) |
dev | 211 | net/ipv4/devinet.c | return dev; |
dev | 222 | net/ipv4/devinet.c | struct device *dev; |
dev | 223 | net/ipv4/devinet.c | for(dev = dev_base; dev; dev=dev->next) |
dev | 225 | net/ipv4/devinet.c | if((dev->flags&IFF_UP) && dev->pa_addr==addr) |
dev | 226 | net/ipv4/devinet.c | return dev; |
dev | 233 | net/ipv4/devinet.c | struct device *dev; |
dev | 235 | net/ipv4/devinet.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 237 | net/ipv4/devinet.c | if (dev->type == type && !(dev->flags&(IFF_LOOPBACK|IFF_NOARP))) |
dev | 238 | net/ipv4/devinet.c | return(dev); |
dev | 152 | net/ipv4/icmp.c | void (*handler)(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len); |
dev | 254 | net/ipv4/icmp.c | void icmp_send(struct sk_buff *skb_in, int type, int code, unsigned long info, struct device *dev) |
dev | 318 | net/ipv4/icmp.c | if(saddr!=dev->pa_addr && ip_chk_addr(saddr)!=IS_MYADDR) |
dev | 319 | net/ipv4/icmp.c | saddr=dev->pa_addr; |
dev | 340 | net/ipv4/icmp.c | static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) |
dev | 482 | net/ipv4/icmp.c | static void icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 source, __u32 daddr, int len) |
dev | 498 | net/ipv4/icmp.c | printk(KERN_INFO "icmp: ICMP redirect from %s on %s ignored.\n", in_ntoa(source), dev->name); |
dev | 510 | net/ipv4/icmp.c | ip, 0, icmph->un.gateway, dev,0, 0, 0); |
dev | 527 | net/ipv4/icmp.c | ip_rt_redirect(source, ip, icmph->un.gateway, dev); |
dev | 552 | net/ipv4/icmp.c | static void icmp_echo(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) |
dev | 572 | net/ipv4/icmp.c | static void icmp_timestamp(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) |
dev | 622 | net/ipv4/icmp.c | static void icmp_address(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) |
dev | 631 | net/ipv4/icmp.c | icmp_param.data_ptr=&dev->pa_mask; |
dev | 639 | net/ipv4/icmp.c | static void icmp_discard(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) |
dev | 648 | net/ipv4/icmp.c | int icmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 685 | net/ipv4/icmp.c | if (daddr!=dev->pa_addr && ip_chk_addr(daddr) != IS_MYADDR) |
dev | 703 | net/ipv4/icmp.c | daddr=dev->pa_addr; |
dev | 708 | net/ipv4/icmp.c | (icmp_pointers[icmph->type].handler)(icmph,skb,skb->dev,saddr,daddr,len); |
dev | 109 | net/ipv4/igmp.c | static struct ip_router_info *igmp_get_mrouter_info(struct device *dev) |
dev | 115 | net/ipv4/igmp.c | if (i->dev == dev) |
dev | 128 | net/ipv4/igmp.c | i->dev = dev; |
dev | 145 | net/ipv4/igmp.c | static struct ip_router_info *igmp_set_mrouter_info(struct device *dev,int type,int time) |
dev | 151 | net/ipv4/igmp.c | if (i->dev == dev) |
dev | 176 | net/ipv4/igmp.c | i->dev = dev; |
dev | 238 | net/ipv4/igmp.c | static void igmp_send_report(struct device *dev, unsigned long address, int type) |
dev | 246 | net/ipv4/igmp.c | tmp=ip_build_header(skb, INADDR_ANY, address, &dev, IPPROTO_IGMP, NULL, |
dev | 259 | net/ipv4/igmp.c | ip_queue_xmit(NULL,dev,skb,1); |
dev | 287 | net/ipv4/igmp.c | static void igmp_heard_report(struct device *dev, unsigned long address) |
dev | 293 | net/ipv4/igmp.c | for(im=dev->ip_mc_list;im!=NULL;im=im->next) { |
dev | 301 | net/ipv4/igmp.c | static void igmp_heard_query(struct device *dev,unsigned char max_resp_time) |
dev | 313 | net/ipv4/igmp.c | if(igmp_set_mrouter_info(dev,mrouter_type,0)==NULL) |
dev | 325 | net/ipv4/igmp.c | for(im=dev->ip_mc_list;im!=NULL;im=im->next) |
dev | 347 | net/ipv4/igmp.c | if(igmp_set_mrouter_info(dev,mrouter_type,IGMP_AGE_THRESHOLD)==NULL) |
dev | 357 | net/ipv4/igmp.c | for(im=dev->ip_mc_list;im!=NULL;im=im->next) |
dev | 386 | net/ipv4/igmp.c | void ip_mc_filter_add(struct device *dev, unsigned long addr) |
dev | 389 | net/ipv4/igmp.c | if(dev->type!=ARPHRD_ETHER) |
dev | 392 | net/ipv4/igmp.c | dev_mc_add(dev,buf,ETH_ALEN,0); |
dev | 399 | net/ipv4/igmp.c | void ip_mc_filter_del(struct device *dev, unsigned long addr) |
dev | 402 | net/ipv4/igmp.c | if(dev->type!=ARPHRD_ETHER) |
dev | 405 | net/ipv4/igmp.c | dev_mc_delete(dev,buf,ETH_ALEN,0); |
dev | 429 | net/ipv4/igmp.c | int igmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 442 | net/ipv4/igmp.c | if(dev->flags&IFF_LOOPBACK) |
dev | 444 | net/ipv4/igmp.c | dev=ip_dev_find(saddr); |
dev | 445 | net/ipv4/igmp.c | if(dev==NULL) |
dev | 446 | net/ipv4/igmp.c | dev=&loopback_dev; |
dev | 463 | net/ipv4/igmp.c | dev->name); |
dev | 469 | net/ipv4/igmp.c | igmp_heard_query(dev,ih->code); |
dev | 471 | net/ipv4/igmp.c | igmp_heard_report(dev,ih->group); |
dev | 473 | net/ipv4/igmp.c | igmp_heard_report(dev,ih->group); |
dev | 487 | net/ipv4/igmp.c | static void ip_mc_inc_group(struct device *dev, unsigned long addr) |
dev | 490 | net/ipv4/igmp.c | for(i=dev->ip_mc_list;i!=NULL;i=i->next) |
dev | 502 | net/ipv4/igmp.c | i->interface=dev; |
dev | 504 | net/ipv4/igmp.c | i->next=dev->ip_mc_list; |
dev | 506 | net/ipv4/igmp.c | dev->ip_mc_list=i; |
dev | 513 | net/ipv4/igmp.c | static void ip_mc_dec_group(struct device *dev, unsigned long addr) |
dev | 516 | net/ipv4/igmp.c | for(i=&(dev->ip_mc_list);(*i)!=NULL;i=&(*i)->next) |
dev | 537 | net/ipv4/igmp.c | void ip_mc_drop_device(struct device *dev) |
dev | 541 | net/ipv4/igmp.c | for(i=dev->ip_mc_list;i!=NULL;i=j) |
dev | 546 | net/ipv4/igmp.c | dev->ip_mc_list=NULL; |
dev | 553 | net/ipv4/igmp.c | void ip_mc_allhost(struct device *dev) |
dev | 556 | net/ipv4/igmp.c | for(i=dev->ip_mc_list;i!=NULL;i=i->next) |
dev | 563 | net/ipv4/igmp.c | i->interface=dev; |
dev | 566 | net/ipv4/igmp.c | i->next=dev->ip_mc_list; |
dev | 567 | net/ipv4/igmp.c | dev->ip_mc_list=i; |
dev | 576 | net/ipv4/igmp.c | int ip_mc_join_group(struct sock *sk , struct device *dev, unsigned long addr) |
dev | 582 | net/ipv4/igmp.c | if(!(dev->flags&IFF_MULTICAST)) |
dev | 592 | net/ipv4/igmp.c | if(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev) |
dev | 601 | net/ipv4/igmp.c | sk->ip_mc_list->multidev[unused]=dev; |
dev | 602 | net/ipv4/igmp.c | ip_mc_inc_group(dev,addr); |
dev | 610 | net/ipv4/igmp.c | int ip_mc_leave_group(struct sock *sk, struct device *dev, unsigned long addr) |
dev | 615 | net/ipv4/igmp.c | if(!(dev->flags&IFF_MULTICAST)) |
dev | 622 | net/ipv4/igmp.c | if(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev) |
dev | 625 | net/ipv4/igmp.c | ip_mc_dec_group(dev,addr); |
dev | 75 | net/ipv4/ip_alias.c | p = (char *) &alias->dev.pa_addr; |
dev | 67 | net/ipv4/ip_forward.c | skb->dev = out; |
dev | 86 | net/ipv4/ip_forward.c | int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag, |
dev | 118 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, dev); |
dev | 153 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0, dev); |
dev | 174 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_UNREACH, 0, dev); |
dev | 195 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_SR_FAILED, 0, dev); |
dev | 211 | net/ipv4/ip_forward.c | if (dev == dev2 && !((iph->saddr^iph->daddr)&dev->pa_mask) && |
dev | 213 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, raddr, dev); |
dev | 222 | net/ipv4/ip_forward.c | dev2=skb->dev; |
dev | 251 | net/ipv4/ip_forward.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(dev2->mtu), dev); |
dev | 287 | net/ipv4/ip_forward.c | skb_reserve(skb,(encap+dev->hard_header_len+15)&~15); /* 16 byte aligned IP headers are good */ |
dev | 317 | net/ipv4/ip_forward.c | skb2->dev=dev2; |
dev | 352 | net/ipv4/ip_forward.c | icmp_send(skb2, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, dev); |
dev | 223 | net/ipv4/ip_fragment.c | ICMP_EXC_FRAGTIME, 0, qp->dev); |
dev | 253 | net/ipv4/ip_fragment.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
dev | 263 | net/ipv4/ip_fragment.c | skb->dev = qp->dev; |
dev | 284 | net/ipv4/ip_fragment.c | qp->dev = dev; |
dev | 409 | net/ipv4/ip_fragment.c | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
dev | 474 | net/ipv4/ip_fragment.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
dev | 618 | net/ipv4/ip_fragment.c | void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag) |
dev | 634 | net/ipv4/ip_fragment.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
dev | 646 | net/ipv4/ip_fragment.c | hlen += dev->hard_header_len; /* Total header size */ |
dev | 647 | net/ipv4/ip_fragment.c | mtu = (dev->mtu - hlen); /* Size of data space */ |
dev | 670 | net/ipv4/ip_fragment.c | icmp_send(skb,ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED,dev->mtu, dev); |
dev | 755 | net/ipv4/ip_fragment.c | skb2->h.raw+=dev->hard_header_len; |
dev | 788 | net/ipv4/ip_fragment.c | ip_queue_xmit(sk, dev, skb2, 2); |
dev | 613 | net/ipv4/ip_fw.c | static struct sk_buff *revamp(struct sk_buff *skb, struct device *dev, struct ip_masq *ftp) |
dev | 708 | net/ipv4/ip_fw.c | from = ntohl(dev->pa_addr); |
dev | 809 | net/ipv4/ip_fw.c | void ip_fw_masquerade(struct sk_buff **skb_ptr, struct device *dev) |
dev | 873 | net/ipv4/ip_fw.c | iph->saddr = dev->pa_addr; /* my own address */ |
dev | 890 | net/ipv4/ip_fw.c | skb = revamp(*skb_ptr, dev, ms); |
dev | 915 | net/ipv4/ip_fw.c | printk("O-routed from %lX:%X over %s\n",ntohl(dev->pa_addr),ntohs(ms->mport),dev->name); |
dev | 1278 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
dev | 1280 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
dev | 1623 | net/ipv4/ip_fw.c | return ip_fw_chk(phdr, skb->dev, ip_fw_in_chain, ip_fw_in_policy, 0); |
dev | 1628 | net/ipv4/ip_fw.c | return ip_fw_chk(phdr, skb->dev, ip_fw_out_chain, ip_fw_out_policy, 0); |
dev | 1633 | net/ipv4/ip_fw.c | return ip_fw_chk(phdr, skb->dev, ip_fw_fwd_chain, ip_fw_fwd_policy, 0); |
dev | 1652 | net/ipv4/ip_fw.c | struct device *dev=ptr; |
dev | 1653 | net/ipv4/ip_fw.c | char *devname = dev->name; |
dev | 1666 | net/ipv4/ip_fw.c | fw->fw_viadev = dev; |
dev | 198 | net/ipv4/ip_input.c | int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 223 | net/ipv4/ip_input.c | return ipv6_rcv(skb,dev,pt); |
dev | 285 | net/ipv4/ip_input.c | if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) |
dev | 286 | net/ipv4/ip_input.c | skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr); |
dev | 295 | net/ipv4/ip_input.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
dev | 307 | net/ipv4/ip_input.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0, dev); |
dev | 342 | net/ipv4/ip_input.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
dev | 365 | net/ipv4/ip_input.c | skb->dev); |
dev | 390 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag, nexthop)) |
dev | 401 | net/ipv4/ip_input.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
dev | 406 | net/ipv4/ip_input.c | struct ip_mc_list *ip_mc=dev->ip_mc_list; |
dev | 429 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag|IPFWD_MASQUERADED, iph->daddr)) |
dev | 442 | net/ipv4/ip_input.c | skb=ip_defrag(iph,skb,dev); |
dev | 445 | net/ipv4/ip_input.c | skb->dev = dev; |
dev | 493 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,daddr); |
dev | 548 | net/ipv4/ip_input.c | ipprot->handler(skb2, dev, opt, daddr, |
dev | 585 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb, dev, iph->saddr, daddr); |
dev | 589 | net/ipv4/ip_input.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0, dev); |
dev | 617 | net/ipv4/ip_input.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, 16, skb->dev); |
dev | 621 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag, iph->daddr)) |
dev | 341 | net/ipv4/ip_options.c | memcpy(&optptr[optptr[2]-1], &skb->dev->pa_addr, 4); |
dev | 392 | net/ipv4/ip_options.c | memcpy(&optptr[ts->ptr-1], &skb->dev->pa_addr, 4); |
dev | 468 | net/ipv4/ip_options.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph, skb->dev); |
dev | 69 | net/ipv4/ip_output.c | struct device *dev=&loopback_dev; |
dev | 71 | net/ipv4/ip_output.c | struct sk_buff *newskb=dev_alloc_skb(len+dev->hard_header_len+15); |
dev | 78 | net/ipv4/ip_output.c | newskb->dev=dev; |
dev | 90 | net/ipv4/ip_output.c | ip_send(NULL,newskb, skb->ip_hdr->daddr, len, dev, skb->ip_hdr->saddr); |
dev | 105 | net/ipv4/ip_output.c | ip_queue_xmit(NULL, dev, newskb, 1); |
dev | 114 | net/ipv4/ip_output.c | int ip_send(struct rtable * rt, struct sk_buff *skb, __u32 daddr, int len, struct device *dev, __u32 saddr) |
dev | 118 | net/ipv4/ip_output.c | skb->dev = dev; |
dev | 121 | net/ipv4/ip_output.c | if (dev->hard_header) |
dev | 127 | net/ipv4/ip_output.c | skb_reserve(skb,(dev->hard_header_len+15)&~15); /* 16 byte aligned IP headers are good */ |
dev | 128 | net/ipv4/ip_output.c | if (rt && dev == rt->rt_dev && rt->rt_hh) |
dev | 130 | net/ipv4/ip_output.c | memcpy(skb_push(skb,dev->hard_header_len),rt->rt_hh->hh_data,dev->hard_header_len); |
dev | 132 | net/ipv4/ip_output.c | return dev->hard_header_len; |
dev | 138 | net/ipv4/ip_output.c | return -dev->hard_header_len; |
dev | 140 | net/ipv4/ip_output.c | mac = dev->hard_header(skb, dev, ETH_P_IP, NULL, NULL, len); |
dev | 151 | net/ipv4/ip_output.c | static int ip_send_room(struct rtable * rt, struct sk_buff *skb, __u32 daddr, int len, struct device *dev, __u32 saddr) |
dev | 155 | net/ipv4/ip_output.c | skb->dev = dev; |
dev | 158 | net/ipv4/ip_output.c | if (dev->hard_header) |
dev | 161 | net/ipv4/ip_output.c | if (rt && dev == rt->rt_dev && rt->rt_hh) |
dev | 163 | net/ipv4/ip_output.c | memcpy(skb_push(skb,dev->hard_header_len),rt->rt_hh->hh_data,dev->hard_header_len); |
dev | 165 | net/ipv4/ip_output.c | return dev->hard_header_len; |
dev | 171 | net/ipv4/ip_output.c | return -dev->hard_header_len; |
dev | 173 | net/ipv4/ip_output.c | mac = dev->hard_header(skb, dev, ETH_P_IP, NULL, NULL, len); |
dev | 193 | net/ipv4/ip_output.c | struct device **dev, int type, struct options *opt, |
dev | 211 | net/ipv4/ip_output.c | if(MULTICAST(daddr) && *dev==NULL && skb->sk && *skb->sk->ip_mc_name) |
dev | 212 | net/ipv4/ip_output.c | *dev=dev_get(skb->sk->ip_mc_name); |
dev | 228 | net/ipv4/ip_output.c | if (*dev == NULL) |
dev | 236 | net/ipv4/ip_output.c | *dev = rt->rt_dev; |
dev | 240 | net/ipv4/ip_output.c | saddr = rt ? rt->rt_src : (*dev)->pa_addr; |
dev | 263 | net/ipv4/ip_output.c | tmp = ip_send_room(rt, skb, raddr, len, *dev, saddr); |
dev | 265 | net/ipv4/ip_output.c | tmp = ip_send(rt, skb, raddr, len, *dev, saddr); |
dev | 273 | net/ipv4/ip_output.c | skb->dev = *dev; |
dev | 310 | net/ipv4/ip_output.c | ip_options_build(skb, opt, final_daddr, (*dev)->pa_addr, 0); |
dev | 334 | net/ipv4/ip_output.c | void ip_queue_xmit(struct sock *sk, struct device *dev, |
dev | 341 | net/ipv4/ip_output.c | if (dev == NULL) |
dev | 354 | net/ipv4/ip_output.c | skb->dev = dev; |
dev | 395 | net/ipv4/ip_output.c | if(ntohs(iph->tot_len)> dev->mtu) |
dev | 397 | net/ipv4/ip_output.c | ip_fragment(sk,skb,dev,0); |
dev | 471 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
dev | 480 | net/ipv4/ip_output.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
dev | 484 | net/ipv4/ip_output.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
dev | 486 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 490 | net/ipv4/ip_output.c | struct ip_mc_list *imc=dev->ip_mc_list; |
dev | 495 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 511 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
dev | 512 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 514 | net/ipv4/ip_output.c | if (dev->flags & IFF_UP) |
dev | 523 | net/ipv4/ip_output.c | dev_queue_xmit(skb, dev, sk->priority); |
dev | 527 | net/ipv4/ip_output.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 583 | net/ipv4/ip_output.c | struct device *dev = NULL; |
dev | 596 | net/ipv4/ip_output.c | dev=dev_get(sk->ip_mc_name); |
dev | 597 | net/ipv4/ip_output.c | if(!dev) |
dev | 603 | net/ipv4/ip_output.c | saddr = dev->pa_addr; |
dev | 623 | net/ipv4/ip_output.c | dev=rt->rt_dev; |
dev | 626 | net/ipv4/ip_output.c | if (rt && !dev) |
dev | 627 | net/ipv4/ip_output.c | dev = rt->rt_dev; |
dev | 646 | net/ipv4/ip_output.c | if(length <= dev->mtu && !MULTICAST(daddr) && daddr!=0xFFFFFFFF && daddr!=dev->pa_brdaddr) |
dev | 649 | net/ipv4/ip_output.c | struct sk_buff *skb=sock_alloc_send_skb(sk, length+15+dev->hard_header_len,0, noblock, &error); |
dev | 655 | net/ipv4/ip_output.c | skb->dev=dev; |
dev | 663 | net/ipv4/ip_output.c | skb_reserve(skb,(dev->hard_header_len+15)&~15); |
dev | 667 | net/ipv4/ip_output.c | memcpy(skb_push(skb,dev->hard_header_len),hh->hh_data,dev->hard_header_len); |
dev | 676 | net/ipv4/ip_output.c | else if(dev->hard_header) |
dev | 678 | net/ipv4/ip_output.c | if(dev->hard_header(skb,dev,ETH_P_IP,NULL,NULL,0)>0) |
dev | 701 | net/ipv4/ip_output.c | true_daddr, dev->pa_addr, 0); |
dev | 718 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain, IP_FW_F_ACCEPT,1); |
dev | 720 | net/ipv4/ip_output.c | if(dev->flags&IFF_UP) |
dev | 721 | net/ipv4/ip_output.c | dev_queue_xmit(skb,dev,sk->priority); |
dev | 733 | net/ipv4/ip_output.c | fragheaderlen = dev->hard_header_len + sizeof(struct iphdr) + opt->optlen; |
dev | 734 | net/ipv4/ip_output.c | maxfraglen = ((dev->mtu-sizeof(struct iphdr)-opt->optlen) & ~7) + fragheaderlen; |
dev | 738 | net/ipv4/ip_output.c | fragheaderlen = dev->hard_header_len; |
dev | 747 | net/ipv4/ip_output.c | maxfraglen = ((dev->mtu-20) & ~7) + fragheaderlen; |
dev | 822 | net/ipv4/ip_output.c | skb->dev = dev; |
dev | 830 | net/ipv4/ip_output.c | skb_reserve(skb,(dev->hard_header_len+15)&~15); |
dev | 831 | net/ipv4/ip_output.c | data = skb_put(skb, fraglen-dev->hard_header_len); |
dev | 843 | net/ipv4/ip_output.c | memcpy(skb_push(skb,dev->hard_header_len),hh->hh_data,dev->hard_header_len); |
dev | 852 | net/ipv4/ip_output.c | else if (dev->hard_header) |
dev | 854 | net/ipv4/ip_output.c | if(dev->hard_header(skb, dev, ETH_P_IP, |
dev | 877 | net/ipv4/ip_output.c | true_daddr, dev->pa_addr, offset); |
dev | 924 | net/ipv4/ip_output.c | ip_fw_chk(iph, dev, ip_acct_chain, IP_FW_F_ACCEPT, 1); |
dev | 935 | net/ipv4/ip_output.c | if (MULTICAST(daddr) && !(dev->flags&IFF_LOOPBACK)) |
dev | 946 | net/ipv4/ip_output.c | if(skb->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
dev | 947 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 950 | net/ipv4/ip_output.c | struct ip_mc_list *imc=dev->ip_mc_list; |
dev | 955 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 979 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (daddr==0xFFFFFFFF || daddr==dev->pa_brdaddr) && !(dev->flags&IFF_LOOPBACK)) |
dev | 980 | net/ipv4/ip_output.c | ip_loopback(dev,skb); |
dev | 986 | net/ipv4/ip_output.c | if (dev->flags & IFF_UP) |
dev | 988 | net/ipv4/ip_output.c | dev_queue_xmit(skb, dev, sk->priority); |
dev | 1069 | net/ipv4/ip_output.c | struct device *dev=ptr; |
dev | 1072 | net/ipv4/ip_output.c | ip_netlink_msg(RTMSG_DELDEVICE, 0,0,0,0,0,dev->name); |
dev | 1073 | net/ipv4/ip_output.c | ip_rt_flush(dev); |
dev | 1081 | net/ipv4/ip_output.c | ip_mc_allhost(dev); |
dev | 1083 | net/ipv4/ip_output.c | ip_netlink_msg(RTMSG_NEWDEVICE, 0,0,0,0,0,dev->name); |
dev | 49 | net/ipv4/ip_sockglue.c | struct device *dev; |
dev | 55 | net/ipv4/ip_sockglue.c | for(dev = dev_base; dev; dev = dev->next) |
dev | 57 | net/ipv4/ip_sockglue.c | if((dev->flags&IFF_UP)&&(dev->flags&IFF_MULTICAST)) |
dev | 60 | net/ipv4/ip_sockglue.c | dev->name, dev->mc_count); |
dev | 61 | net/ipv4/ip_sockglue.c | for(im = dev->ip_mc_list; im; im = im->next) |
dev | 98 | net/ipv4/ip_sockglue.c | struct device *dev; |
dev | 99 | net/ipv4/ip_sockglue.c | for(dev = dev_base; dev; dev = dev->next) |
dev | 101 | net/ipv4/ip_sockglue.c | if((dev->flags&IFF_UP)&&(dev->flags&IFF_MULTICAST)&& |
dev | 102 | net/ipv4/ip_sockglue.c | (dev->pa_addr==addr)) |
dev | 103 | net/ipv4/ip_sockglue.c | return dev; |
dev | 215 | net/ipv4/ip_sockglue.c | struct device *dev=NULL; |
dev | 242 | net/ipv4/ip_sockglue.c | dev=ip_mc_find_devfor(addr.s_addr); |
dev | 248 | net/ipv4/ip_sockglue.c | if(dev) |
dev | 250 | net/ipv4/ip_sockglue.c | strcpy(sk->ip_mc_name,dev->name); |
dev | 265 | net/ipv4/ip_sockglue.c | struct device *dev=NULL; |
dev | 288 | net/ipv4/ip_sockglue.c | dev=rt->rt_dev; |
dev | 300 | net/ipv4/ip_sockglue.c | dev=ip_mc_find_devfor(mreq.imr_interface.s_addr); |
dev | 307 | net/ipv4/ip_sockglue.c | if(!dev) |
dev | 314 | net/ipv4/ip_sockglue.c | return ip_mc_join_group(sk,dev,mreq.imr_multiaddr.s_addr); |
dev | 322 | net/ipv4/ip_sockglue.c | struct device *dev=NULL; |
dev | 342 | net/ipv4/ip_sockglue.c | dev=rt->rt_dev; |
dev | 351 | net/ipv4/ip_sockglue.c | dev=ip_mc_find_devfor(mreq.imr_interface.s_addr); |
dev | 358 | net/ipv4/ip_sockglue.c | if(!dev) |
dev | 365 | net/ipv4/ip_sockglue.c | return ip_mc_leave_group(sk,dev,mreq.imr_multiaddr.s_addr); |
dev | 52 | net/ipv4/ipip.c | int ipip_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 91 | net/ipv4/ipip.c | icmp_send(skb,ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0 , dev); |
dev | 108 | net/ipv4/ipip.c | if(ip_forward(skb, dev, 0, daddr)) |
dev | 71 | net/ipv4/ipmr.c | v->dev->flags&=~IFF_ALLMULTI; |
dev | 72 | net/ipv4/ipmr.c | dev_mc_upload(v->dev); |
dev | 74 | net/ipv4/ipmr.c | v->dev=NULL; |
dev | 81 | net/ipv4/ipmr.c | static int ipmr_vifi_find(struct device *dev) |
dev | 87 | net/ipv4/ipmr.c | if(v->dev==dev) |
dev | 471 | net/ipv4/ipmr.c | struct device *dev; |
dev | 476 | net/ipv4/ipmr.c | dev=ip_dev_find(vif.vifc_lcl_addr.s_addr); |
dev | 477 | net/ipv4/ipmr.c | if(!dev) |
dev | 488 | net/ipv4/ipmr.c | if(dev->flags&IFF_MULTICAST) |
dev | 492 | net/ipv4/ipmr.c | dev->flags|=IFF_ALLMULTI; |
dev | 493 | net/ipv4/ipmr.c | dev_mc_upload(dev); |
dev | 510 | net/ipv4/ipmr.c | v->dev=dev; |
dev | 654 | net/ipv4/ipmr.c | v->dev->flags&=~IFF_ALLMULTI; |
dev | 655 | net/ipv4/ipmr.c | dev_mc_upload(v->dev); |
dev | 681 | net/ipv4/ipmr.c | if((vifc_map&(1<<ct)) && v->dev==ptr) |
dev | 713 | net/ipv4/ipmr.c | skb->dev=vif->dev; |
dev | 719 | net/ipv4/ipmr.c | if(vif->dev==NULL || ip_forward(skb, in_dev, frag|IPFWD_MULTICASTING|tunnel, raddr)==-1) |
dev | 732 | net/ipv4/ipmr.c | int vif=ipmr_vifi_find(skb->dev); |
dev | 773 | net/ipv4/ipmr.c | ipmr_queue_xmit(skb2, &vif_table[psend], skb->dev, is_frag); |
dev | 784 | net/ipv4/ipmr.c | ipmr_queue_xmit(skb, &vif_table[psend], skb->dev, is_frag); |
dev | 814 | net/ipv4/ipmr.c | if(vif->dev==NULL) |
dev | 817 | net/ipv4/ipmr.c | vif->dev->name,vif->bytes_in, vif->pkt_in, vif->bytes_out,vif->pkt_out, |
dev | 863 | net/ipv4/ipmr.c | name=vif_table[mfc->mfc_parent].dev->name; |
dev | 74 | net/ipv4/packet.c | int packet_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 96 | net/ipv4/packet.c | skb->dev = dev; |
dev | 126 | net/ipv4/packet.c | struct device *dev; |
dev | 153 | net/ipv4/packet.c | dev = dev_get(saddr->sa_data); |
dev | 154 | net/ipv4/packet.c | if (dev == NULL) |
dev | 164 | net/ipv4/packet.c | if(len>dev->mtu+dev->hard_header_len) |
dev | 193 | net/ipv4/packet.c | if (dev->flags & IFF_UP) |
dev | 194 | net/ipv4/packet.c | dev_queue_xmit(skb, dev, sk->priority); |
dev | 246 | net/ipv4/packet.c | int packet_attach(struct sock *sk, struct device *dev) |
dev | 255 | net/ipv4/packet.c | p->dev = dev; |
dev | 263 | net/ipv4/packet.c | sk->protinfo.af_packet.bound_dev = dev; |
dev | 274 | net/ipv4/packet.c | struct device *dev; |
dev | 291 | net/ipv4/packet.c | dev=dev_get(name); |
dev | 292 | net/ipv4/packet.c | if(dev==NULL) |
dev | 298 | net/ipv4/packet.c | if(!(dev->flags&IFF_UP)) |
dev | 317 | net/ipv4/packet.c | sk->protinfo.af_packet.prot_hook->dev=dev; |
dev | 318 | net/ipv4/packet.c | sk->protinfo.af_packet.bound_dev=dev; |
dev | 323 | net/ipv4/packet.c | int err=packet_attach(sk, dev); |
dev | 450 | net/ipv4/packet.c | saddr->sa_family = skb->dev->type; |
dev | 451 | net/ipv4/packet.c | strncpy(saddr->sa_data,skb->dev->name, 15); |
dev | 82 | net/ipv4/rarp.c | struct device *dev; /* Device the entry is tied to */ |
dev | 141 | net/ipv4/rarp.c | static void rarp_destroy_dev(struct device *dev) |
dev | 150 | net/ipv4/rarp.c | if (entry->dev == dev) |
dev | 194 | net/ipv4/rarp.c | static int rarp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 209 | net/ipv4/rarp.c | if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd) |
dev | 210 | net/ipv4/rarp.c | || dev->flags&IFF_NOARP) |
dev | 231 | net/ipv4/rarp.c | (rarp->ar_pro != htons(AX25_P_IP) && dev->type == ARPHRD_AX25) || |
dev | 233 | net/ipv4/rarp.c | (rarp->ar_pro != htons(ETH_P_IP) && dev->type != ARPHRD_AX25) |
dev | 248 | net/ipv4/rarp.c | rarp_ptr+=dev->addr_len; |
dev | 252 | net/ipv4/rarp.c | rarp_ptr+=dev->addr_len; |
dev | 269 | net/ipv4/rarp.c | arp_send(ARPOP_RREPLY, ETH_P_RARP, sip, dev, dev->pa_addr, sha, |
dev | 270 | net/ipv4/rarp.c | dev->dev_addr, sha); |
dev | 292 | net/ipv4/rarp.c | struct device * dev; |
dev | 334 | net/ipv4/rarp.c | dev = rt->rt_dev; |
dev | 373 | net/ipv4/rarp.c | entry->dev = dev; |
dev | 119 | net/ipv4/raw.c | int raw_rcv(struct sock *sk, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr) |
dev | 126 | net/ipv4/raw.c | skb->dev = dev; |
dev | 135 | net/ipv4/route.c | struct device *dev; |
dev | 344 | net/ipv4/route.c | static __u32 guess_mask(__u32 dst, struct device * dev) |
dev | 351 | net/ipv4/route.c | if ((dst ^ dev->pa_addr) & mask) |
dev | 353 | net/ipv4/route.c | return dev->pa_mask; |
dev | 373 | net/ipv4/route.c | struct device * dev, __u32 gtw, short flags, short metric, __u32 mask) |
dev | 390 | net/ipv4/route.c | (dev && fi->fib_dev != dev) ) |
dev | 408 | net/ipv4/route.c | struct device * dev, __u32 gtw, short flags, short metric) |
dev | 424 | net/ipv4/route.c | tmp = fib_del_list(fp, dst, dev, gtw, flags, metric, mask); |
dev | 438 | net/ipv4/route.c | found = fib_del_list(fp, dst, dev, gtw, flags, metric, mask); |
dev | 452 | net/ipv4/route.c | static struct fib_info * fib_create_info(__u32 gw, struct device * dev, |
dev | 460 | net/ipv4/route.c | mss = dev->mtu; |
dev | 482 | net/ipv4/route.c | fi->fib_dev != dev || |
dev | 499 | net/ipv4/route.c | fi->fib_dev = dev; |
dev | 518 | net/ipv4/route.c | __u32 gw, struct device *dev, unsigned short mss, |
dev | 535 | net/ipv4/route.c | if (!((dst ^ dev->pa_addr) & dev->pa_mask)) |
dev | 537 | net/ipv4/route.c | mask = dev->pa_mask; |
dev | 546 | net/ipv4/route.c | mask = guess_mask(dst, dev); |
dev | 554 | net/ipv4/route.c | if (gw == dev->pa_addr) |
dev | 564 | net/ipv4/route.c | if ((dev != get_gw_dev(gw)) && dev->type!=ARPHRD_TUNNEL) |
dev | 585 | net/ipv4/route.c | if ((fi = fib_create_info(gw, dev, flags, mss, window, irtt)) == NULL) |
dev | 742 | net/ipv4/route.c | static int rt_flush_list(struct fib_node ** fp, struct device *dev) |
dev | 748 | net/ipv4/route.c | if (f->fib_info->fib_dev != dev) { |
dev | 763 | net/ipv4/route.c | static __inline__ void fib_flush_1(struct device *dev) |
dev | 775 | net/ipv4/route.c | tmp += rt_flush_list(&fz->fz_hash_table[i], dev); |
dev | 782 | net/ipv4/route.c | tmp = rt_flush_list(&fz->fz_list, dev); |
dev | 1112 | net/ipv4/route.c | static void rt_redirect_1(__u32 dst, __u32 gw, struct device *dev) |
dev | 1117 | net/ipv4/route.c | if (gw == dev->pa_addr) |
dev | 1119 | net/ipv4/route.c | if (dev != get_gw_dev(gw)) |
dev | 1127 | net/ipv4/route.c | rt->rt_dev = dev; |
dev | 1129 | net/ipv4/route.c | rt->rt_src = dev->pa_addr; |
dev | 1130 | net/ipv4/route.c | rt->rt_mtu = dev->mtu; |
dev | 1132 | net/ipv4/route.c | if (dev->mtu > 576) |
dev | 1270 | net/ipv4/route.c | rt_redirect_1(rtr->dst, rtr->gw, rtr->dev); |
dev | 1286 | net/ipv4/route.c | struct device * dev, __u32 gtw, short rt_flags, short metric) |
dev | 1293 | net/ipv4/route.c | retval = fib_del_1(dst, mask, dev, gtw, rt_flags, metric); |
dev | 1300 | net/ipv4/route.c | __u32 gw, struct device *dev, unsigned short mss, |
dev | 1306 | net/ipv4/route.c | fib_add_1(flags, dst, mask, gw, dev, mss, window, irtt, metric); |
dev | 1311 | net/ipv4/route.c | void ip_rt_flush(struct device *dev) |
dev | 1316 | net/ipv4/route.c | fib_flush_1(dev); |
dev | 1325 | net/ipv4/route.c | void ip_rt_redirect(__u32 src, __u32 dst, __u32 gw, struct device *dev) |
dev | 1335 | net/ipv4/route.c | rt->rt_dev != dev || |
dev | 1336 | net/ipv4/route.c | ((gw^dev->pa_addr)&dev->pa_mask) || |
dev | 1347 | net/ipv4/route.c | rt_redirect_1(dst, gw, dev); |
dev | 1357 | net/ipv4/route.c | rtr->dev = dev; |
dev | 1609 | net/ipv4/route.c | struct device * dev = NULL; |
dev | 1623 | net/ipv4/route.c | dev = dev_get(devname); |
dev | 1625 | net/ipv4/route.c | if (!dev) |
dev | 1653 | net/ipv4/route.c | if (!dev && (flags & RTF_GATEWAY)) |
dev | 1661 | net/ipv4/route.c | dev = dev2; |
dev | 1691 | net/ipv4/route.c | if (!dev) |
dev | 1692 | net/ipv4/route.c | dev = get_gw_dev(gw); |
dev | 1694 | net/ipv4/route.c | else if (!dev) |
dev | 1695 | net/ipv4/route.c | dev = ip_dev_check(daddr); |
dev | 1701 | net/ipv4/route.c | if (dev == NULL) |
dev | 1708 | net/ipv4/route.c | rt_add(flags, daddr, mask, gw, dev, r->rt_mss, r->rt_window, r->rt_irtt, metric); |
dev | 1724 | net/ipv4/route.c | struct device * dev = NULL; |
dev | 1734 | net/ipv4/route.c | dev = dev_get(devname); |
dev | 1736 | net/ipv4/route.c | if (!dev) |
dev | 1743 | net/ipv4/route.c | err=rt_del((__u32)trg->sin_addr.s_addr, (__u32)msk->sin_addr.s_addr, dev, |
dev | 902 | net/ipv4/tcp.c | struct device *dev = NULL; |
dev | 1095 | net/ipv4/tcp.c | tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev, |
dev | 1107 | net/ipv4/tcp.c | skb->dev = dev; |
dev | 1211 | net/ipv4/tcp.c | struct device *dev = NULL; |
dev | 1252 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 1274 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 1947 | net/ipv4/tcp.c | struct device *dev=NULL; |
dev | 2008 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 2052 | net/ipv4/tcp.c | sk->mtu = min(sk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr)); |
dev | 2066 | net/ipv4/tcp.c | sk->mtu=skip_pick_mtu(sk->mtu,dev); |
dev | 2098 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 158 | net/ipv4/tcp_input.c | struct options *opt, unsigned long saddr, struct device *dev) |
dev | 172 | net/ipv4/tcp_input.c | tcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
dev | 316 | net/ipv4/tcp_input.c | u32 daddr, u32 saddr, struct options *opt, struct device *dev, u32 seq) |
dev | 333 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
dev | 492 | net/ipv4/tcp_input.c | newsk->mtu = min(newsk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr)); |
dev | 506 | net/ipv4/tcp_input.c | sk->mtu=skip_pick_mtu(sk->mtu,dev); |
dev | 1265 | net/ipv4/tcp_input.c | sk->prot, NULL, skb->dev, sk->ip_tos, sk->ip_ttl); |
dev | 1574 | net/ipv4/tcp_input.c | int tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 1685 | net/ipv4/tcp_input.c | tcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
dev | 1704 | net/ipv4/tcp_input.c | tcp_conn_request(sk, skb, daddr, saddr, opt, dev, tcp_init_seq()); |
dev | 1749 | net/ipv4/tcp_input.c | sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
dev | 1761 | net/ipv4/tcp_input.c | sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
dev | 1851 | net/ipv4/tcp_input.c | tcp_conn_request(sk, skb, daddr, saddr,opt, dev,seq+128000); |
dev | 1868 | net/ipv4/tcp_input.c | bad_tcp_sequence(sk, th, len, opt, saddr, dev); |
dev | 1882 | net/ipv4/tcp_input.c | tcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
dev | 1901 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
dev | 1945 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
dev | 123 | net/ipv4/tcp_output.c | sk->prot->queue_xmit(sk, skb->dev, skb, 0); |
dev | 292 | net/ipv4/tcp_output.c | sk->prot->queue_xmit(sk, skb->dev, skb, skb->free); |
dev | 317 | net/ipv4/tcp_output.c | struct device *dev; |
dev | 330 | net/ipv4/tcp_output.c | dev = skb->dev; |
dev | 399 | net/ipv4/tcp_output.c | dev=rt->rt_dev; |
dev | 401 | net/ipv4/tcp_output.c | skb->dev=dev; |
dev | 405 | net/ipv4/tcp_output.c | memcpy(skb_push(skb,dev->hard_header_len),rt->rt_hh->hh_data,dev->hard_header_len); |
dev | 414 | net/ipv4/tcp_output.c | else if (dev->hard_header) |
dev | 416 | net/ipv4/tcp_output.c | if(dev->hard_header(skb, dev, ETH_P_IP, NULL, NULL, skb->len)<0) |
dev | 441 | net/ipv4/tcp_output.c | if (dev->flags & IFF_UP) |
dev | 457 | net/ipv4/tcp_output.c | dev_queue_xmit(skb, dev, sk->priority); |
dev | 493 | net/ipv4/tcp_output.c | struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl) |
dev | 517 | net/ipv4/tcp_output.c | buff->dev = dev; |
dev | 574 | net/ipv4/tcp_output.c | struct device *dev=NULL; |
dev | 598 | net/ipv4/tcp_output.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
dev | 626 | net/ipv4/tcp_output.c | buff->dev = dev; |
dev | 655 | net/ipv4/tcp_output.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 758 | net/ipv4/tcp_output.c | struct device *dev = NULL; |
dev | 799 | net/ipv4/tcp_output.c | tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev, |
dev | 848 | net/ipv4/tcp_output.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 861 | net/ipv4/tcp_output.c | struct device *dev=NULL; |
dev | 937 | net/ipv4/tcp_output.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 950 | net/ipv4/tcp_output.c | buff->dev = dev; |
dev | 1003 | net/ipv4/tcp_output.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 1031 | net/ipv4/tcp_output.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 138 | net/ipv4/udp.c | static int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len); |
dev | 591 | net/ipv4/udp.c | int udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 600 | net/ipv4/udp.c | if(!dev || dev->pa_addr!=daddr) |
dev | 678 | net/ipv4/udp.c | udp_deliver(sk, uh, skb1, dev,saddr,daddr,len); |
dev | 705 | net/ipv4/udp.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0, dev); |
dev | 715 | net/ipv4/udp.c | return udp_deliver(sk,uh,skb,dev, saddr, daddr, len); |
dev | 718 | net/ipv4/udp.c | static int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len) |
dev | 721 | net/ipv4/udp.c | skb->dev = dev; |
dev | 208 | net/ipx/af_ipx.c | ipxitf_find_using_phys(struct device *dev, unsigned short datalink) |
dev | 213 | net/ipx/af_ipx.c | i && ((i->if_dev!=dev) || (i->if_dlink_type!=datalink)); |
dev | 332 | net/ipx/af_ipx.c | struct device *dev = ptr; |
dev | 341 | net/ipx/af_ipx.c | if (i->if_dev == dev) |
dev | 563 | net/ipx/af_ipx.c | struct device *dev = intrfc->if_dev; |
dev | 574 | net/ipx/af_ipx.c | if ((dl == NULL) || (dev == NULL) || (dev->flags & IFF_LOOPBACK)) |
dev | 650 | net/ipx/af_ipx.c | addr_len = dev->addr_len; |
dev | 652 | net/ipx/af_ipx.c | memcpy(dest_node, dev->broadcast, addr_len); |
dev | 665 | net/ipx/af_ipx.c | skb->dev = dev; |
dev | 681 | net/ipx/af_ipx.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 841 | net/ipx/af_ipx.c | struct device *dev; |
dev | 881 | net/ipx/af_ipx.c | dev=dev_get(idef->ipx_device); |
dev | 882 | net/ipx/af_ipx.c | if (dev==NULL) |
dev | 885 | net/ipx/af_ipx.c | if (!(dev->flags & IFF_UP)) |
dev | 889 | net/ipx/af_ipx.c | if(dev->addr_len>IPX_NODE_LEN) |
dev | 892 | net/ipx/af_ipx.c | if ((intrfc = ipxitf_find_using_phys(dev, dlink_type)) == NULL) { |
dev | 898 | net/ipx/af_ipx.c | intrfc->if_dev=dev; |
dev | 908 | net/ipx/af_ipx.c | intrfc->if_ipx_offset = dev->hard_header_len + datalink->header_length; |
dev | 910 | net/ipx/af_ipx.c | memcpy((char *)&(intrfc->if_node[IPX_NODE_LEN-dev->addr_len]), dev->dev_addr, dev->addr_len); |
dev | 925 | net/ipx/af_ipx.c | struct device *dev = NULL; |
dev | 941 | net/ipx/af_ipx.c | dev=dev_get(idef->ipx_device); |
dev | 942 | net/ipx/af_ipx.c | if(dev==NULL) return -ENODEV; |
dev | 944 | net/ipx/af_ipx.c | intrfc = ipxitf_find_using_phys(dev, dlink_type); |
dev | 953 | net/ipx/af_ipx.c | ipxitf_auto_create(struct device *dev, unsigned short dlink_type) |
dev | 966 | net/ipx/af_ipx.c | if (dev == NULL) |
dev | 970 | net/ipx/af_ipx.c | if(dev->addr_len>IPX_NODE_LEN) return NULL; |
dev | 974 | net/ipx/af_ipx.c | intrfc->if_dev=dev; |
dev | 981 | net/ipx/af_ipx.c | intrfc->if_ipx_offset = dev->hard_header_len + |
dev | 984 | net/ipx/af_ipx.c | memcpy((char *)&(intrfc->if_node[IPX_NODE_LEN-dev->addr_len]), |
dev | 985 | net/ipx/af_ipx.c | dev->dev_addr, dev->addr_len); |
dev | 1025 | net/ipx/af_ipx.c | struct device *dev; |
dev | 1031 | net/ipx/af_ipx.c | dev=dev_get(ifr.ifr_name); |
dev | 1032 | net/ipx/af_ipx.c | if(!dev) |
dev | 1034 | net/ipx/af_ipx.c | ipxif=ipxitf_find_using_phys(dev, ipx_map_frame_type(sipx->sipx_type)); |
dev | 1936 | net/ipx/af_ipx.c | int ipx_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 1960 | net/ipx/af_ipx.c | intrfc = ipxitf_find_using_phys(dev, pt->type); |
dev | 1963 | net/ipx/af_ipx.c | intrfc = ipxitf_auto_create(dev, pt->type); |
dev | 102 | net/netrom/af_netrom.c | static void nr_kill_by_device(struct device *dev) |
dev | 107 | net/netrom/af_netrom.c | if (s->nr->device == dev) { |
dev | 123 | net/netrom/af_netrom.c | struct device *dev = (struct device *)ptr; |
dev | 128 | net/netrom/af_netrom.c | nr_kill_by_device(dev); |
dev | 129 | net/netrom/af_netrom.c | nr_rt_device_down(dev); |
dev | 661 | net/netrom/af_netrom.c | struct device *dev; |
dev | 672 | net/netrom/af_netrom.c | if ((dev = nr_dev_get(&addr->fsa_ax25.sax25_call)) == NULL) { |
dev | 699 | net/netrom/af_netrom.c | sk->nr->device = dev; |
dev | 716 | net/netrom/af_netrom.c | struct device *dev; |
dev | 740 | net/netrom/af_netrom.c | if ((dev = nr_dev_first()) == NULL) |
dev | 743 | net/netrom/af_netrom.c | source = (ax25_address *)dev->dev_addr; |
dev | 753 | net/netrom/af_netrom.c | sk->nr->device = dev; |
dev | 887 | net/netrom/af_netrom.c | int nr_rx_frame(struct sk_buff *skb, struct device *dev) |
dev | 917 | net/netrom/af_netrom.c | return nr_rx_ip(skb, dev); |
dev | 1257 | net/netrom/af_netrom.c | struct device *dev; |
dev | 1268 | net/netrom/af_netrom.c | if ((dev = s->nr->device) == NULL) |
dev | 1271 | net/netrom/af_netrom.c | devname = dev->name; |
dev | 54 | net/netrom/nr_dev.c | int nr_rx_ip(struct sk_buff *skb, struct device *dev) |
dev | 56 | net/netrom/nr_dev.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 58 | net/netrom/nr_dev.c | if (!dev->start) { |
dev | 67 | net/netrom/nr_dev.c | skb->dev = dev; |
dev | 70 | net/netrom/nr_dev.c | ip_rcv(skb, skb->dev, NULL); |
dev | 75 | net/netrom/nr_dev.c | static int nr_header(struct sk_buff *skb, struct device *dev, unsigned short type, |
dev | 80 | net/netrom/nr_dev.c | memcpy(buff, (saddr != NULL) ? saddr : dev->dev_addr, dev->addr_len); |
dev | 87 | net/netrom/nr_dev.c | memcpy(buff, daddr, dev->addr_len); |
dev | 107 | net/netrom/nr_dev.c | static int nr_rebuild_header(void *buff, struct device *dev, |
dev | 110 | net/netrom/nr_dev.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 115 | net/netrom/nr_dev.c | if (!arp_query(bp + 7, raddr, dev)) { |
dev | 141 | net/netrom/nr_dev.c | static int nr_set_mac_address(struct device *dev, void *addr) |
dev | 144 | net/netrom/nr_dev.c | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); |
dev | 149 | net/netrom/nr_dev.c | static int nr_open(struct device *dev) |
dev | 151 | net/netrom/nr_dev.c | dev->tbusy = 0; |
dev | 152 | net/netrom/nr_dev.c | dev->start = 1; |
dev | 157 | net/netrom/nr_dev.c | static int nr_close(struct device *dev) |
dev | 159 | net/netrom/nr_dev.c | dev->tbusy = 1; |
dev | 160 | net/netrom/nr_dev.c | dev->start = 0; |
dev | 165 | net/netrom/nr_dev.c | static int nr_xmit(struct sk_buff *skb, struct device *dev) |
dev | 167 | net/netrom/nr_dev.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 169 | net/netrom/nr_dev.c | if (skb == NULL || dev == NULL) |
dev | 172 | net/netrom/nr_dev.c | if (!dev->start) { |
dev | 179 | net/netrom/nr_dev.c | if (dev->tbusy != 0) { |
dev | 185 | net/netrom/nr_dev.c | dev->tbusy = 1; |
dev | 193 | net/netrom/nr_dev.c | dev->tbusy = 0; |
dev | 200 | net/netrom/nr_dev.c | static struct enet_statistics *nr_get_stats(struct device *dev) |
dev | 202 | net/netrom/nr_dev.c | return (struct enet_statistics *)dev->priv; |
dev | 205 | net/netrom/nr_dev.c | int nr_init(struct device *dev) |
dev | 209 | net/netrom/nr_dev.c | dev->mtu = 236; /* MTU */ |
dev | 210 | net/netrom/nr_dev.c | dev->tbusy = 0; |
dev | 211 | net/netrom/nr_dev.c | dev->hard_start_xmit = nr_xmit; |
dev | 212 | net/netrom/nr_dev.c | dev->open = nr_open; |
dev | 213 | net/netrom/nr_dev.c | dev->stop = nr_close; |
dev | 215 | net/netrom/nr_dev.c | dev->hard_header = nr_header; |
dev | 216 | net/netrom/nr_dev.c | dev->hard_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + NR_NETWORK_LEN + NR_TRANSPORT_LEN; |
dev | 217 | net/netrom/nr_dev.c | dev->addr_len = AX25_ADDR_LEN; |
dev | 218 | net/netrom/nr_dev.c | dev->type = ARPHRD_NETROM; |
dev | 219 | net/netrom/nr_dev.c | dev->rebuild_header = nr_rebuild_header; |
dev | 220 | net/netrom/nr_dev.c | dev->set_mac_address = nr_set_mac_address; |
dev | 223 | net/netrom/nr_dev.c | dev->flags = 0; |
dev | 224 | net/netrom/nr_dev.c | dev->family = AF_INET; |
dev | 226 | net/netrom/nr_dev.c | dev->pa_addr = 0; |
dev | 227 | net/netrom/nr_dev.c | dev->pa_brdaddr = 0; |
dev | 228 | net/netrom/nr_dev.c | dev->pa_mask = 0; |
dev | 229 | net/netrom/nr_dev.c | dev->pa_alen = sizeof(unsigned long); |
dev | 231 | net/netrom/nr_dev.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 232 | net/netrom/nr_dev.c | if (dev->priv == NULL) |
dev | 235 | net/netrom/nr_dev.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 237 | net/netrom/nr_dev.c | dev->get_stats = nr_get_stats; |
dev | 241 | net/netrom/nr_dev.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 68 | net/netrom/nr_route.c | ax25_digi *ax25_digi, struct device *dev, int quality, int obs_count) |
dev | 81 | net/netrom/nr_route.c | if (ax25cmp(ax25, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev) |
dev | 93 | net/netrom/nr_route.c | nr_neigh->dev = dev; |
dev | 291 | net/netrom/nr_route.c | static int nr_del_node(ax25_address *callsign, ax25_address *neighbour, struct device *dev) |
dev | 304 | net/netrom/nr_route.c | if (ax25cmp(neighbour, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev) |
dev | 341 | net/netrom/nr_route.c | static int nr_add_neigh(ax25_address *callsign, struct device *dev, unsigned int quality) |
dev | 347 | net/netrom/nr_route.c | if (ax25cmp(callsign, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev) { |
dev | 359 | net/netrom/nr_route.c | nr_neigh->dev = dev; |
dev | 380 | net/netrom/nr_route.c | static int nr_del_neigh(ax25_address *callsign, struct device *dev, unsigned int quality) |
dev | 385 | net/netrom/nr_route.c | if (ax25cmp(callsign, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev) |
dev | 468 | net/netrom/nr_route.c | void nr_rt_device_down(struct device *dev) |
dev | 478 | net/netrom/nr_route.c | if (s->dev == dev) { |
dev | 515 | net/netrom/nr_route.c | struct device *dev; |
dev | 517 | net/netrom/nr_route.c | if ((dev = dev_get(devname)) == NULL) |
dev | 520 | net/netrom/nr_route.c | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_AX25) |
dev | 521 | net/netrom/nr_route.c | return dev; |
dev | 524 | net/netrom/nr_route.c | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ETHER) |
dev | 525 | net/netrom/nr_route.c | if (ax25_bpq_get_addr(dev) != NULL) |
dev | 526 | net/netrom/nr_route.c | return dev; |
dev | 537 | net/netrom/nr_route.c | struct device *dev, *first = NULL; |
dev | 539 | net/netrom/nr_route.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 540 | net/netrom/nr_route.c | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM) |
dev | 541 | net/netrom/nr_route.c | if (first == NULL || strncmp(dev->name, first->name, 3) < 0) |
dev | 542 | net/netrom/nr_route.c | first = dev; |
dev | 552 | net/netrom/nr_route.c | struct device *dev; |
dev | 554 | net/netrom/nr_route.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 555 | net/netrom/nr_route.c | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM && ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0) |
dev | 556 | net/netrom/nr_route.c | return dev; |
dev | 567 | net/netrom/nr_route.c | struct device *dev; |
dev | 577 | net/netrom/nr_route.c | if ((dev = nr_ax25_dev_get(nr_route.device)) == NULL) |
dev | 584 | net/netrom/nr_route.c | NULL, dev, nr_route.quality, |
dev | 588 | net/netrom/nr_route.c | dev, nr_route.quality); |
dev | 597 | net/netrom/nr_route.c | if ((dev = nr_ax25_dev_get(nr_route.device)) == NULL) |
dev | 602 | net/netrom/nr_route.c | &nr_route.neighbour, dev); |
dev | 605 | net/netrom/nr_route.c | dev, nr_route.quality); |
dev | 628 | net/netrom/nr_route.c | void nr_link_failed(ax25_address *callsign, struct device *dev) |
dev | 634 | net/netrom/nr_route.c | if (ax25cmp(&nr_neigh->callsign, callsign) == 0 && nr_neigh->dev == dev) |
dev | 654 | net/netrom/nr_route.c | struct device *dev; |
dev | 670 | net/netrom/nr_route.c | if ((dev = nr_dev_get(nr_dest)) != NULL) /* Its for me */ |
dev | 671 | net/netrom/nr_route.c | return nr_rx_frame(skb, dev); |
dev | 694 | net/netrom/nr_route.c | if ((dev = nr_dev_first()) == NULL) |
dev | 705 | net/netrom/nr_route.c | ax25_send_frame(skb, (ax25_address *)dev->dev_addr, &nr_neigh->callsign, nr_neigh->digipeat, nr_neigh->dev); |
dev | 776 | net/netrom/nr_route.c | nr_neigh->dev ? nr_neigh->dev->name : "???", |