tag | line | file | source code |
dev | 144 | arch/alpha/boot/main.c | static inline long close(long dev) |
dev | 146 | arch/alpha/boot/main.c | return dispatch(CCB_CLOSE, dev); |
dev | 149 | arch/alpha/boot/main.c | static inline long load(long dev, unsigned long addr, unsigned long count) |
dev | 161 | arch/alpha/boot/main.c | return dispatch(CCB_READ, dev, count, addr, BOOT_SIZE/512 + 1); |
dev | 181 | arch/alpha/boot/main.c | long dev; |
dev | 191 | arch/alpha/boot/main.c | dev = openboot(); |
dev | 192 | arch/alpha/boot/main.c | if (dev < 0) { |
dev | 193 | arch/alpha/boot/main.c | printk("Unable to open boot device: %016lx\n", dev); |
dev | 196 | arch/alpha/boot/main.c | dev &= 0xffffffff; |
dev | 198 | arch/alpha/boot/main.c | i = load(dev, START_ADDR, START_SIZE); |
dev | 199 | arch/alpha/boot/main.c | close(dev); |
dev | 92 | arch/alpha/kernel/bios32.c | static void layout_dev(struct pci_dev *dev) |
dev | 98 | arch/alpha/kernel/bios32.c | bus = dev->bus; |
dev | 99 | arch/alpha/kernel/bios32.c | pcibios_read_config_word(bus->number, dev->devfn, PCI_COMMAND, &cmd); |
dev | 106 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, reg, |
dev | 108 | arch/alpha/kernel/bios32.c | pcibios_read_config_dword(bus->number, dev->devfn, reg, &base); |
dev | 128 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, |
dev | 149 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 150 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn)); |
dev | 167 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 168 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn)); |
dev | 192 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn), |
dev | 193 | arch/alpha/kernel/bios32.c | PCI_FUNC(dev->devfn), size); |
dev | 207 | arch/alpha/kernel/bios32.c | pcibios_write_config_dword(bus->number, dev->devfn, |
dev | 212 | arch/alpha/kernel/bios32.c | pcibios_write_config_word(bus->number, dev->devfn, PCI_COMMAND, |
dev | 221 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 236 | arch/alpha/kernel/bios32.c | for (dev = bus->devices; dev; dev = dev->sibling) { |
dev | 237 | arch/alpha/kernel/bios32.c | if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) { |
dev | 238 | arch/alpha/kernel/bios32.c | layout_dev(dev); |
dev | 301 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 303 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 304 | arch/alpha/kernel/bios32.c | if (dev->vendor == vendor && dev->device == device_id) { |
dev | 306 | arch/alpha/kernel/bios32.c | *devfn = dev->devfn; |
dev | 307 | arch/alpha/kernel/bios32.c | *bus = dev->bus->number; |
dev | 325 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 327 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 328 | arch/alpha/kernel/bios32.c | if (dev->class == class_code) { |
dev | 330 | arch/alpha/kernel/bios32.c | *devfn = dev->devfn; |
dev | 331 | arch/alpha/kernel/bios32.c | *bus = dev->bus->number; |
dev | 364 | arch/alpha/kernel/bios32.c | struct pci_dev *dev; |
dev | 399 | arch/alpha/kernel/bios32.c | for (dev = pci_devices; dev; dev = dev->next) { |
dev | 400 | arch/alpha/kernel/bios32.c | dev->irq = 0; |
dev | 401 | arch/alpha/kernel/bios32.c | if (dev->bus->number != 0 || |
dev | 402 | arch/alpha/kernel/bios32.c | PCI_SLOT(dev->devfn) < 6 || PCI_SLOT(dev->devfn) > 10) |
dev | 405 | arch/alpha/kernel/bios32.c | dev->bus->number, PCI_SLOT(dev->devfn)); |
dev | 409 | arch/alpha/kernel/bios32.c | pcibios_read_config_byte(dev->bus->number, dev->devfn, |
dev | 412 | arch/alpha/kernel/bios32.c | if (dev->vendor == PCI_VENDOR_ID_S3 && |
dev | 413 | arch/alpha/kernel/bios32.c | (dev->device == PCI_DEVICE_ID_S3_864_1 || |
dev | 414 | arch/alpha/kernel/bios32.c | dev->device == PCI_DEVICE_ID_S3_864_2)) |
dev | 421 | arch/alpha/kernel/bios32.c | pirq = pirq_tab[PCI_SLOT(dev->devfn) - 6][pin - 1]; |
dev | 425 | arch/alpha/kernel/bios32.c | dev->irq = (route_tab >> (8 * pirq)) & 0xff; |
dev | 428 | arch/alpha/kernel/bios32.c | pcibios_write_config_byte(dev->bus->number, dev->devfn, |
dev | 429 | arch/alpha/kernel/bios32.c | PCI_INTERRUPT_LINE, dev->irq); |
dev | 243 | arch/alpha/kernel/osf_sys.c | dev_t dev; |
dev | 259 | arch/alpha/kernel/osf_sys.c | dev = inode->i_rdev; |
dev | 260 | arch/alpha/kernel/osf_sys.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 264 | arch/alpha/kernel/osf_sys.c | fops = get_blkfops(MAJOR(dev)); |
dev | 340 | arch/alpha/kernel/osf_sys.c | dev_t dev; |
dev | 348 | arch/alpha/kernel/osf_sys.c | dev = get_unnamed_dev(); |
dev | 349 | arch/alpha/kernel/osf_sys.c | if (!dev) |
dev | 351 | arch/alpha/kernel/osf_sys.c | retval = do_mount(dev, dirname, "proc", flags, NULL); |
dev | 353 | arch/alpha/kernel/osf_sys.c | put_unnamed_dev(dev); |
dev | 187 | drivers/block/aztcd.c | (CURRENT && MAJOR(CURRENT -> dev) == MAJOR_NR && CURRENT -> cmd == READ \ |
dev | 22 | drivers/block/blk.h | ((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \ |
dev | 33 | drivers/block/blk.h | blksize_size[MAJOR_NR][MINOR(CURRENT->dev)] ? \ |
dev | 34 | drivers/block/blk.h | ((blksize_size[MAJOR_NR][MINOR(CURRENT->dev)] >> 9) - 1) : \ |
dev | 76 | drivers/block/blk.h | extern void set_device_ro(int dev,int flag); |
dev | 85 | drivers/block/blk.h | #define RO_IOCTLS(dev,where) \ |
dev | 87 | drivers/block/blk.h | set_device_ro((dev),get_fs_long((long *) (where))); return 0; \ |
dev | 89 | drivers/block/blk.h | if (!__err) put_fs_long(0!=is_read_only(dev),(long *) (where)); return __err; } |
dev | 284 | drivers/block/blk.h | #define CURRENT_DEV DEVICE_NR(CURRENT->dev) |
dev | 323 | drivers/block/blk.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 348 | drivers/block/blk.h | (unsigned long)req->dev, req->sector); |
dev | 374 | drivers/block/blk.h | DEVICE_OFF(req->dev); |
dev | 379 | drivers/block/blk.h | req->dev = -1; |
dev | 1404 | drivers/block/cdu31a.c | if (CURRENT && (CURRENT->dev > 0)) |
dev | 1433 | drivers/block/cdu31a.c | if (!(CURRENT) || CURRENT->dev < 0) |
dev | 1445 | drivers/block/cdu31a.c | in.i_rdev = CURRENT->dev; |
dev | 1452 | drivers/block/cdu31a.c | if (MAJOR(CURRENT->dev) != MAJOR_NR) |
dev | 651 | drivers/block/cm206.c | if (CURRENT == NULL || CURRENT->dev == -1) return; |
dev | 2384 | drivers/block/floppy.c | set_fdc(DRIVE(CURRENT->dev)); |
dev | 2629 | drivers/block/floppy.c | if (CURRENT && CURRENT->dev < 0){ |
dev | 2640 | drivers/block/floppy.c | if (MAJOR(CURRENT->dev) != MAJOR_NR) |
dev | 2646 | drivers/block/floppy.c | (CURRENT->errors || error == CURRENT->dev)){ |
dev | 2647 | drivers/block/floppy.c | error=CURRENT->dev; |
dev | 2653 | drivers/block/floppy.c | device = CURRENT->dev; |
dev | 3305 | drivers/block/floppy.c | static int check_floppy_change(dev_t dev) |
dev | 3307 | drivers/block/floppy.c | int drive = DRIVE( dev ); |
dev | 3309 | drivers/block/floppy.c | if (MAJOR(dev) != MAJOR_NR) { |
dev | 3325 | drivers/block/floppy.c | (!TYPE(dev) && !current_type[drive])) |
dev | 3334 | drivers/block/floppy.c | static int floppy_revalidate(dev_t dev) |
dev | 3336 | drivers/block/floppy.c | #define NO_GEOM (!current_type[drive] && !TYPE(dev)) |
dev | 3338 | drivers/block/floppy.c | int drive=DRIVE(dev); |
dev | 3358 | drivers/block/floppy.c | int size = floppy_blocksizes[MINOR(dev)]; |
dev | 3361 | drivers/block/floppy.c | if (!(bh = getblk(dev,0,size))){ |
dev | 56 | drivers/block/genhd.c | static void extended_partition(struct gendisk *hd, int dev) |
dev | 63 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 69 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
dev | 102 | drivers/block/genhd.c | dev = ((hd->major) << 8) | current_minor; |
dev | 111 | drivers/block/genhd.c | static int msdos_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector) |
dev | 122 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 152 | drivers/block/genhd.c | hd->part[MINOR(dev)].start_sect += p->end_sector; |
dev | 153 | drivers/block/genhd.c | hd->part[MINOR(dev)].nr_sects -= p->end_sector; |
dev | 155 | drivers/block/genhd.c | ide_xlate_1024(dev); /* harmless if not an IDE drive */ |
dev | 170 | drivers/block/genhd.c | ide_xlate_1024(dev); /* harmless if not an IDE drive */ |
dev | 210 | drivers/block/genhd.c | static int osf_partition(struct gendisk *hd, unsigned int dev, unsigned long first_sector) |
dev | 248 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 278 | drivers/block/genhd.c | static void check_partition(struct gendisk *hd, unsigned int dev) |
dev | 286 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 293 | drivers/block/genhd.c | hd->part[MINOR(dev)].start_sect = 0; |
dev | 297 | drivers/block/genhd.c | printk(" %s%c:", hd->major_name, minor_name(hd, MINOR(dev))); |
dev | 299 | drivers/block/genhd.c | if (msdos_partition(hd, dev, first_sector)) |
dev | 303 | drivers/block/genhd.c | if (osf_partition(hd, dev, first_sector)) |
dev | 318 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
dev | 321 | drivers/block/genhd.c | int start = drive<<dev->minor_shift; |
dev | 322 | drivers/block/genhd.c | int j = start + dev->max_p; |
dev | 323 | drivers/block/genhd.c | int major = dev->major << 8; |
dev | 325 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 326 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 329 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 332 | drivers/block/genhd.c | static void setup_dev(struct gendisk *dev) |
dev | 335 | drivers/block/genhd.c | int j = dev->max_nr * dev->max_p; |
dev | 336 | drivers/block/genhd.c | int major = dev->major << 8; |
dev | 341 | drivers/block/genhd.c | dev->part[i].start_sect = 0; |
dev | 342 | drivers/block/genhd.c | dev->part[i].nr_sects = 0; |
dev | 344 | drivers/block/genhd.c | dev->init(); |
dev | 345 | drivers/block/genhd.c | for (drive=0 ; drive<dev->nr_real ; drive++) { |
dev | 346 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 347 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 350 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 351 | drivers/block/genhd.c | blk_size[dev->major] = dev->sizes; |
dev | 269 | drivers/block/gscd.c | unsigned int block,dev; |
dev | 273 | drivers/block/gscd.c | if (!(CURRENT) || CURRENT->dev < 0) return; |
dev | 275 | drivers/block/gscd.c | dev = MINOR(CURRENT->dev); |
dev | 289 | drivers/block/gscd.c | if (MINOR(CURRENT -> dev) != 0) |
dev | 307 | drivers/block/gscd.c | printk ("GSCD: dev %d, block %d, nsect %d\n", dev, block, nsect ); |
dev | 136 | drivers/block/hd.c | devc = CURRENT ? 'a' + DEVICE_NR(CURRENT->dev) : '?'; |
dev | 285 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->dev); |
dev | 287 | drivers/block/hd.c | struct hd_driveid *id = hd_ident_info[dev]; |
dev | 289 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 292 | drivers/block/hd.c | printk (" hd%c: non-IDE device, %dMB, CHS=%d/%d/%d\n", dev+'a', |
dev | 293 | drivers/block/hd.c | hd_info[dev].cyl*hd_info[dev].head*hd_info[dev].sect / 2048, |
dev | 294 | drivers/block/hd.c | hd_info[dev].cyl, hd_info[dev].head, hd_info[dev].sect); |
dev | 296 | drivers/block/hd.c | hd_ident_info[dev] = NULL; |
dev | 301 | drivers/block/hd.c | max_mult[dev] = id->max_multsect; |
dev | 310 | drivers/block/hd.c | hd_info[dev].cyl = id->cur_cyls; |
dev | 311 | drivers/block/hd.c | hd_info[dev].head = id->cur_heads; |
dev | 312 | drivers/block/hd.c | hd_info[dev].sect = id->cur_sectors; |
dev | 318 | drivers/block/hd.c | dev+'a', id->model, id->cyls*id->heads*id->sectors/2048, |
dev | 319 | drivers/block/hd.c | id->buf_size/2, bios_info[dev].cyl, bios_info[dev].head, |
dev | 320 | drivers/block/hd.c | bios_info[dev].sect, id->max_multsect); |
dev | 327 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 338 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->dev), stat = inb_p(HD_STATUS); |
dev | 340 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 343 | drivers/block/hd.c | mult_req[dev] = mult_count[dev] = 0; |
dev | 346 | drivers/block/hd.c | if ((mult_count[dev] = mult_req[dev])) |
dev | 348 | drivers/block/hd.c | dev+'a', mult_count[dev]); |
dev | 350 | drivers/block/hd.c | printk (" hd%c: disabled multiple mode\n", dev+'a'); |
dev | 448 | drivers/block/hd.c | int dev; |
dev | 452 | drivers/block/hd.c | dev = DEVICE_NR(CURRENT->dev); |
dev | 455 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 459 | drivers/block/hd.c | special_op[dev] = recalibrate[dev] = 1; |
dev | 476 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(CURRENT->dev); |
dev | 477 | drivers/block/hd.c | int i, retries = 100000, msect = mult_count[dev], nsect; |
dev | 479 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 509 | drivers/block/hd.c | dev+'a', CURRENT->sector, CURRENT->sector+nsect, |
dev | 529 | drivers/block/hd.c | static inline void multwrite (unsigned int dev) |
dev | 531 | drivers/block/hd.c | unsigned int mcount = mult_count[dev]; |
dev | 551 | drivers/block/hd.c | unsigned int dev = DEVICE_NR(WCURRENT.dev); |
dev | 553 | drivers/block/hd.c | if (unmask_intr[dev]) |
dev | 558 | drivers/block/hd.c | multwrite(dev); |
dev | 587 | drivers/block/hd.c | if (unmask_intr[DEVICE_NR(WCURRENT.dev)]) |
dev | 637 | drivers/block/hd.c | unsigned int dev; |
dev | 645 | drivers/block/hd.c | dev = DEVICE_NR(CURRENT->dev); |
dev | 646 | drivers/block/hd.c | printk("hd%c: timeout\n", dev+'a'); |
dev | 649 | drivers/block/hd.c | printk("hd%c: too many errors\n", dev+'a'); |
dev | 658 | drivers/block/hd.c | int do_special_op (unsigned int dev) |
dev | 660 | drivers/block/hd.c | if (recalibrate[dev]) { |
dev | 661 | drivers/block/hd.c | recalibrate[dev] = 0; |
dev | 662 | drivers/block/hd.c | hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr); |
dev | 665 | drivers/block/hd.c | if (!identified[dev]) { |
dev | 666 | drivers/block/hd.c | identified[dev] = 1; |
dev | 667 | drivers/block/hd.c | unmask_intr[dev] = DEFAULT_UNMASK_INTR; |
dev | 668 | drivers/block/hd.c | mult_req[dev] = DEFAULT_MULT_COUNT; |
dev | 669 | drivers/block/hd.c | hd_out(dev,0,0,0,0,WIN_IDENTIFY,&identify_intr); |
dev | 672 | drivers/block/hd.c | if (mult_req[dev] != mult_count[dev]) { |
dev | 673 | drivers/block/hd.c | hd_out(dev,mult_req[dev],0,0,0,WIN_SETMULT,&set_multmode_intr); |
dev | 676 | drivers/block/hd.c | if (hd_info[dev].head > 16) { |
dev | 677 | drivers/block/hd.c | printk ("hd%c: cannot handle device with more than 16 heads - giving up\n", dev+'a'); |
dev | 680 | drivers/block/hd.c | special_op[dev] = 0; |
dev | 698 | drivers/block/hd.c | unsigned int dev, block, nsect, sec, track, head, cyl; |
dev | 700 | drivers/block/hd.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 712 | drivers/block/hd.c | dev = MINOR(CURRENT->dev); |
dev | 715 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects || ((block+nsect) > hd[dev].nr_sects)) { |
dev | 717 | drivers/block/hd.c | if (dev >= (NR_HD<<6)) |
dev | 718 | drivers/block/hd.c | printk("hd: bad minor number: device=0x%04x\n", CURRENT->dev); |
dev | 721 | drivers/block/hd.c | (CURRENT->dev>>6)+'a', block, nsect); |
dev | 726 | drivers/block/hd.c | block += hd[dev].start_sect; |
dev | 727 | drivers/block/hd.c | dev >>= 6; |
dev | 728 | drivers/block/hd.c | if (special_op[dev]) { |
dev | 729 | drivers/block/hd.c | if (do_special_op(dev)) |
dev | 733 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
dev | 734 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
dev | 735 | drivers/block/hd.c | head = track % hd_info[dev].head; |
dev | 736 | drivers/block/hd.c | cyl = track / hd_info[dev].head; |
dev | 739 | drivers/block/hd.c | dev+'a', (CURRENT->cmd == READ)?"read":"writ", |
dev | 742 | drivers/block/hd.c | if (!unmask_intr[dev]) |
dev | 745 | drivers/block/hd.c | unsigned int cmd = mult_count[dev] > 1 ? WIN_MULTREAD : WIN_READ; |
dev | 746 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,cmd,&read_intr); |
dev | 752 | drivers/block/hd.c | if (mult_count[dev]) |
dev | 753 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_MULTWRITE,&multwrite_intr); |
dev | 755 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr); |
dev | 762 | drivers/block/hd.c | if (mult_count[dev]) { |
dev | 764 | drivers/block/hd.c | multwrite(dev); |
dev | 783 | drivers/block/hd.c | int dev, err; |
dev | 788 | drivers/block/hd.c | dev = DEVICE_NR(inode->i_rdev); |
dev | 789 | drivers/block/hd.c | if (dev >= NR_HD) |
dev | 797 | drivers/block/hd.c | put_user(bios_info[dev].head, |
dev | 799 | drivers/block/hd.c | put_user(bios_info[dev].sect, |
dev | 801 | drivers/block/hd.c | put_user(bios_info[dev].cyl, |
dev | 838 | drivers/block/hd.c | unmask_intr[dev] = arg; |
dev | 846 | drivers/block/hd.c | put_user(unmask_intr[dev], (long *) arg); |
dev | 854 | drivers/block/hd.c | put_user(mult_count[dev], (long *) arg); |
dev | 862 | drivers/block/hd.c | if (arg > max_mult[dev]) |
dev | 864 | drivers/block/hd.c | else if (mult_req[dev] != mult_count[dev]) { |
dev | 865 | drivers/block/hd.c | special_op[dev] = 1; |
dev | 868 | drivers/block/hd.c | mult_req[dev] = arg; |
dev | 869 | drivers/block/hd.c | special_op[dev] = 1; |
dev | 878 | drivers/block/hd.c | if (hd_ident_info[dev] == NULL) return -ENOMSG; |
dev | 882 | drivers/block/hd.c | memcpy_tofs((char *)arg, (char *) hd_ident_info[dev], sizeof(struct hd_driveid)); |
dev | 1081 | drivers/block/hd.c | static int revalidate_hddisk(int dev, int maxusage) |
dev | 1090 | drivers/block/hd.c | target = DEVICE_NR(dev); |
dev | 74 | drivers/block/ide-cd.c | #define OUT_WORDS(b,n) output_ide_data(dev,b,(n)/2) |
dev | 75 | drivers/block/ide-cd.c | #define IN_WORDS(b,n) input_ide_data(dev,b,(n)/2) |
dev | 150 | drivers/block/ide-cd.c | #define CDROM_FLAGS(dev) ((struct ide_cd_flags *)&((dev)->bios_sect)) |
dev | 362 | drivers/block/ide-cd.c | void cdrom_analyze_sense_data (ide_dev_t *dev, |
dev | 380 | drivers/block/ide-cd.c | printk ("ATAPI device %s:\n", dev->name); |
dev | 440 | drivers/block/ide-cd.c | dev->name, |
dev | 461 | drivers/block/ide-cd.c | static void cdrom_queue_request_sense (ide_dev_t *dev) |
dev | 487 | drivers/block/ide-cd.c | reqbuf = &cdrom_info[DEV_HWIF][dev->select.b.drive].sense_data; |
dev | 498 | drivers/block/ide-cd.c | rq->dev = MKDEV (major, (dev->select.b.drive) << PARTN_BITS); |
dev | 521 | drivers/block/ide-cd.c | static void cdrom_end_request (int uptodate, ide_dev_t *dev) |
dev | 537 | drivers/block/ide-cd.c | reqbuf = &cdrom_info[DEV_HWIF][dev->select.b.drive].sense_data; |
dev | 538 | drivers/block/ide-cd.c | cdrom_analyze_sense_data (dev, reqbuf, NULL); |
dev | 547 | drivers/block/ide-cd.c | static void cdrom_saw_media_change (ide_dev_t *dev) |
dev | 549 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->media_changed = 1; |
dev | 550 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->toc_valid = 0; |
dev | 551 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].nsectors_buffered = 0; |
dev | 557 | drivers/block/ide-cd.c | static int cdrom_decode_status (ide_dev_t *dev, int good_stat, int *stat_ret) |
dev | 574 | drivers/block/ide-cd.c | printk ("%s : missing request in cdrom_decode_status\n", dev->name); |
dev | 583 | drivers/block/ide-cd.c | cdrom_saw_media_change (dev); |
dev | 588 | drivers/block/ide-cd.c | printk ("%s : tray open\n", dev->name); |
dev | 589 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 602 | drivers/block/ide-cd.c | printk ("%s : tray open\n", dev->name); |
dev | 606 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 613 | drivers/block/ide-cd.c | cdrom_saw_media_change (dev); |
dev | 614 | drivers/block/ide-cd.c | printk ("%s: media changed\n", dev->name); |
dev | 624 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 631 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 641 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 648 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 654 | drivers/block/ide-cd.c | ide_error (dev, "cdrom_decode_status", stat); |
dev | 660 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 668 | drivers/block/ide-cd.c | cdrom_queue_request_sense (dev); |
dev | 681 | drivers/block/ide-cd.c | static int cdrom_start_packet_command (ide_dev_t *dev, int xferlen) |
dev | 684 | drivers/block/ide-cd.c | if (wait_stat (dev, 0, BUSY_STAT, WAIT_READY)) return 1; |
dev | 693 | drivers/block/ide-cd.c | OUT_BYTE (dev->ctl, HD_CMD); |
dev | 703 | drivers/block/ide-cd.c | static int cdrom_transfer_packet_command (ide_dev_t *dev, |
dev | 706 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->drq_interrupt) |
dev | 713 | drivers/block/ide-cd.c | if (cdrom_decode_status (dev, DRQ_STAT, &stat_dum)) return 1; |
dev | 718 | drivers/block/ide-cd.c | if (wait_stat (dev, DRQ_STAT, BUSY_STAT, WAIT_READY)) return 1; |
dev | 740 | drivers/block/ide-cd.c | static void cdrom_buffer_sectors (ide_dev_t *dev, unsigned long sector, |
dev | 743 | drivers/block/ide-cd.c | struct cdrom_info *info = &cdrom_info[DEV_HWIF][dev->select.b.drive]; |
dev | 795 | drivers/block/ide-cd.c | int cdrom_read_check_ireason (ide_dev_t *dev, int len, int ireason) |
dev | 805 | drivers/block/ide-cd.c | dev->name); |
dev | 821 | drivers/block/ide-cd.c | dev->name, ireason); |
dev | 824 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 833 | drivers/block/ide-cd.c | static void cdrom_read_intr (ide_dev_t *dev) |
dev | 841 | drivers/block/ide-cd.c | if (cdrom_decode_status (dev, 0, &stat)) return; |
dev | 855 | drivers/block/ide-cd.c | dev->name, rq->current_nr_sectors); |
dev | 856 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 859 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 866 | drivers/block/ide-cd.c | if (cdrom_read_check_ireason (dev, len, ireason)) return; |
dev | 873 | drivers/block/ide-cd.c | dev->name, len); |
dev | 875 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 907 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 913 | drivers/block/ide-cd.c | cdrom_buffer_sectors (dev, rq->sector, sectors_to_transfer); |
dev | 948 | drivers/block/ide-cd.c | static int cdrom_read_from_buffer (ide_dev_t *dev) |
dev | 950 | drivers/block/ide-cd.c | struct cdrom_info *info = &cdrom_info[DEV_HWIF][dev->select.b.drive]; |
dev | 963 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 978 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 984 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 994 | drivers/block/ide-cd.c | dev->name, rq->sector); |
dev | 995 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 1010 | drivers/block/ide-cd.c | static int cdrom_start_read_continuation (ide_dev_t *dev) |
dev | 1036 | drivers/block/ide-cd.c | dev->name, rq->current_nr_sectors); |
dev | 1037 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 1074 | drivers/block/ide-cd.c | if (cdrom_transfer_packet_command (dev, pc.c, sizeof (pc.c))) |
dev | 1090 | drivers/block/ide-cd.c | static int cdrom_start_read (ide_dev_t *dev, unsigned int block) |
dev | 1099 | drivers/block/ide-cd.c | if (cdrom_read_from_buffer (dev)) |
dev | 1103 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].nsectors_buffered = 0; |
dev | 1105 | drivers/block/ide-cd.c | if (cdrom_start_packet_command (dev, 32768)) |
dev | 1108 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->drq_interrupt) |
dev | 1112 | drivers/block/ide-cd.c | if (cdrom_start_read_continuation (dev)) |
dev | 1128 | drivers/block/ide-cd.c | cdrom_request_sense (ide_dev_t *dev, struct atapi_request_sense *reqbuf); |
dev | 1132 | drivers/block/ide-cd.c | static void cdrom_pc_intr (ide_dev_t *dev) |
dev | 1139 | drivers/block/ide-cd.c | if (cdrom_decode_status (dev, 0, &stat)) return; |
dev | 1159 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 1163 | drivers/block/ide-cd.c | dev->name, pc->buflen); |
dev | 1165 | drivers/block/ide-cd.c | cdrom_end_request (1, dev); |
dev | 1183 | drivers/block/ide-cd.c | dev->name); |
dev | 1212 | drivers/block/ide-cd.c | dev->name); |
dev | 1237 | drivers/block/ide-cd.c | dev->name, ireason); |
dev | 1246 | drivers/block/ide-cd.c | static int cdrom_do_pc_continuation (ide_dev_t *dev) |
dev | 1251 | drivers/block/ide-cd.c | if (cdrom_transfer_packet_command (dev, pc->c, sizeof (pc->c))) |
dev | 1261 | drivers/block/ide-cd.c | static int cdrom_do_packet_command (ide_dev_t *dev) |
dev | 1272 | drivers/block/ide-cd.c | if (cdrom_start_packet_command (dev, len)) |
dev | 1275 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->drq_interrupt) |
dev | 1279 | drivers/block/ide-cd.c | if (cdrom_do_pc_continuation (dev)) |
dev | 1288 | drivers/block/ide-cd.c | int cdrom_queue_packet_command (ide_dev_t *dev, struct packet_command *pc) |
dev | 1297 | drivers/block/ide-cd.c | req.dev = MKDEV (major, (dev->select.b.drive) << PARTN_BITS); |
dev | 1334 | drivers/block/ide-cd.c | &cdrom_info[DEV_HWIF][dev->select.b.drive].sense_data; |
dev | 1336 | drivers/block/ide-cd.c | if (pc->c[0] == REQUEST_SENSE || cdrom_request_sense (dev, reqbuf)) |
dev | 1341 | drivers/block/ide-cd.c | cdrom_analyze_sense_data (dev, reqbuf, pc); |
dev | 1363 | drivers/block/ide-cd.c | static int do_rw_cdrom (ide_dev_t *dev, unsigned long block) |
dev | 1368 | drivers/block/ide-cd.c | return cdrom_do_packet_command (dev); |
dev | 1373 | drivers/block/ide-cd.c | cdrom_end_request (0, dev); |
dev | 1377 | drivers/block/ide-cd.c | return cdrom_start_read (dev, block); |
dev | 1436 | drivers/block/ide-cd.c | cdrom_check_status (ide_dev_t *dev) |
dev | 1444 | drivers/block/ide-cd.c | (void) cdrom_queue_packet_command (dev, &pc); |
dev | 1449 | drivers/block/ide-cd.c | cdrom_request_sense (ide_dev_t *dev, struct atapi_request_sense *reqbuf) |
dev | 1460 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1467 | drivers/block/ide-cd.c | cdrom_lockdoor (ide_dev_t *dev, int lockflag) |
dev | 1475 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1483 | drivers/block/ide-cd.c | cdrom_eject (ide_dev_t *dev, int ejectflag) |
dev | 1491 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1496 | drivers/block/ide-cd.c | cdrom_pause (ide_dev_t *dev, int pauseflag) |
dev | 1504 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1509 | drivers/block/ide-cd.c | cdrom_startstop (ide_dev_t *dev, int startflag) |
dev | 1518 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1523 | drivers/block/ide-cd.c | cdrom_read_tocentry (ide_dev_t *dev, int trackno, int msf_flag, |
dev | 1537 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1543 | drivers/block/ide-cd.c | cdrom_read_toc (ide_dev_t *dev) |
dev | 1547 | drivers/block/ide-cd.c | struct atapi_toc *toc = cdrom_info[DEV_HWIF][dev->select.b.drive].toc; |
dev | 1554 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].toc = toc; |
dev | 1559 | drivers/block/ide-cd.c | printk ("%s: No cdrom TOC buffer!\n", dev->name); |
dev | 1565 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->toc_valid) |
dev | 1566 | drivers/block/ide-cd.c | cdrom_check_status (dev); |
dev | 1568 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->toc_valid) return 0; |
dev | 1571 | drivers/block/ide-cd.c | msf_flag = (CDROM_FLAGS (dev)->no_lba_toc); |
dev | 1574 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (dev, 0, msf_flag, (char *)toc, |
dev | 1584 | drivers/block/ide-cd.c | stat = cdrom_read_tocentry (dev, 0, msf_flag, (char *)toc, |
dev | 1601 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->toc_valid = 1; |
dev | 1608 | drivers/block/ide-cd.c | cdrom_read_subchannel (ide_dev_t *dev, |
dev | 1622 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1628 | drivers/block/ide-cd.c | cdrom_mode_sense (ide_dev_t *dev, int pageno, int modeflag, |
dev | 1641 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1646 | drivers/block/ide-cd.c | cdrom_mode_select (ide_dev_t *dev, int pageno, char *buf, int buflen) |
dev | 1659 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1664 | drivers/block/ide-cd.c | cdrom_play_lba_range_play12 (ide_dev_t *dev, int lba_start, int lba_end) |
dev | 1676 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1681 | drivers/block/ide-cd.c | cdrom_play_lba_range_msf (ide_dev_t *dev, int lba_start, int lba_end) |
dev | 1691 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->msf_as_bcd) |
dev | 1701 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1708 | drivers/block/ide-cd.c | cdrom_play_lba_range (ide_dev_t *dev, int lba_start, int lba_end) |
dev | 1721 | drivers/block/ide-cd.c | if (CDROM_FLAGS (dev)->no_playaudio12) |
dev | 1722 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (dev, lba_start, lba_end); |
dev | 1728 | drivers/block/ide-cd.c | stat = cdrom_play_lba_range_play12 (dev, lba_start, lba_end); |
dev | 1732 | drivers/block/ide-cd.c | reqbuf = &cdrom_info[DEV_HWIF][dev->select.b.drive].sense_data; |
dev | 1738 | drivers/block/ide-cd.c | "trying PLAYAUDIO_MSF\n", dev->name); |
dev | 1739 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_playaudio12 = 1; |
dev | 1740 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->msf_as_bcd = 1; |
dev | 1741 | drivers/block/ide-cd.c | return cdrom_play_lba_range_msf (dev, lba_start, lba_end); |
dev | 1751 | drivers/block/ide-cd.c | int cdrom_get_toc_entry (ide_dev_t *dev, int track, |
dev | 1758 | drivers/block/ide-cd.c | stat = cdrom_read_toc (dev); |
dev | 1761 | drivers/block/ide-cd.c | toc = cdrom_info[DEV_HWIF][dev->select.b.drive].toc; |
dev | 1777 | drivers/block/ide-cd.c | static int ide_cdrom_ioctl (ide_dev_t *dev, struct inode *inode, |
dev | 1783 | drivers/block/ide-cd.c | return cdrom_eject (dev, 0); |
dev | 1786 | drivers/block/ide-cd.c | return cdrom_pause (dev, 1); |
dev | 1789 | drivers/block/ide-cd.c | return cdrom_pause (dev, 0); |
dev | 1792 | drivers/block/ide-cd.c | return cdrom_startstop (dev, 1); |
dev | 1795 | drivers/block/ide-cd.c | return cdrom_startstop (dev, 0); |
dev | 1814 | drivers/block/ide-cd.c | return cdrom_play_lba_range (dev, lba_start, lba_end); |
dev | 1830 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (dev, ti.cdti_trk0, &first_toc); |
dev | 1832 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (dev, ti.cdti_trk1, &last_toc); |
dev | 1841 | drivers/block/ide-cd.c | return cdrom_play_lba_range (dev, lba_start, lba_end); |
dev | 1854 | drivers/block/ide-cd.c | stat = cdrom_read_toc (dev); |
dev | 1857 | drivers/block/ide-cd.c | toc = cdrom_info[DEV_HWIF][dev->select.b.drive].toc; |
dev | 1879 | drivers/block/ide-cd.c | stat = cdrom_get_toc_entry (dev, tocentry.cdte_track, &toce); |
dev | 1914 | drivers/block/ide-cd.c | stat = cdrom_read_subchannel (dev, buffer, sizeof (buffer)); |
dev | 1959 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (dev, 0x0e, 0, buffer, sizeof (buffer)); |
dev | 1961 | drivers/block/ide-cd.c | stat = cdrom_mode_sense (dev, 0x0e, 1, mask , sizeof (buffer)); |
dev | 1971 | drivers/block/ide-cd.c | return cdrom_mode_select (dev, 0x0e, buffer, sizeof (buffer)); |
dev | 1986 | drivers/block/ide-cd.c | return cdrom_queue_packet_command (dev, &pc); |
dev | 1997 | drivers/block/ide-cd.c | stat = cdrom_request_sense (dev, &reqbuf); |
dev | 2017 | drivers/block/ide-cd.c | static int cdrom_check_media_change (ide_dev_t *dev) |
dev | 2021 | drivers/block/ide-cd.c | cdrom_check_status (dev); |
dev | 2023 | drivers/block/ide-cd.c | retval = CDROM_FLAGS (dev)->media_changed; |
dev | 2024 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->media_changed = 0; |
dev | 2031 | drivers/block/ide-cd.c | cdrom_open (struct inode *ip, struct file *fp, ide_dev_t *dev) |
dev | 2038 | drivers/block/ide-cd.c | if (dev->usage == 1) |
dev | 2039 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (dev, 1); |
dev | 2052 | drivers/block/ide-cd.c | cdrom_release (struct inode *inode, struct file *file, ide_dev_t *dev) |
dev | 2054 | drivers/block/ide-cd.c | if (dev->usage == 0) |
dev | 2060 | drivers/block/ide-cd.c | (void) cdrom_lockdoor (dev, 0); |
dev | 2071 | drivers/block/ide-cd.c | static void cdrom_setup (ide_dev_t *dev) |
dev | 2074 | drivers/block/ide-cd.c | ide_capacity[DEV_HWIF][dev->select.b.drive] = 0x1fffff; |
dev | 2076 | drivers/block/ide-cd.c | ide_blksizes[DEV_HWIF][dev->select.b.drive << PARTN_BITS] = CD_FRAMESIZE; |
dev | 2078 | drivers/block/ide-cd.c | dev->special.all = 0; |
dev | 2080 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->media_changed = 0; |
dev | 2081 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->toc_valid = 0; |
dev | 2083 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_playaudio12 = 0; |
dev | 2084 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_lba_toc = 0; |
dev | 2085 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->msf_as_bcd = 0; |
dev | 2086 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->drq_interrupt = ((dev->id->config & 0x0060) == 0x20); |
dev | 2089 | drivers/block/ide-cd.c | if (strcmp (dev->id->model, "CD220E") == 0) /* Creative Labs */ |
dev | 2090 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_lba_toc = 1; |
dev | 2092 | drivers/block/ide-cd.c | else if (strcmp (dev->id->model, "TO-ICSLYAL") == 0 || /* Acer CD525E */ |
dev | 2093 | drivers/block/ide-cd.c | strcmp (dev->id->model, "OTI-SCYLLA") == 0) |
dev | 2094 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_lba_toc = 1; |
dev | 2096 | drivers/block/ide-cd.c | else if (strcmp (dev->id->model, "CDA26803I SE") == 0) /* Aztech */ |
dev | 2098 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_lba_toc = 1; |
dev | 2101 | drivers/block/ide-cd.c | CDROM_FLAGS (dev)->no_playaudio12 = 1; |
dev | 2104 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].toc = NULL; |
dev | 2105 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].sector_buffer = NULL; |
dev | 2106 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].sector_buffered = 0; |
dev | 2107 | drivers/block/ide-cd.c | cdrom_info[DEV_HWIF][dev->select.b.drive].nsectors_buffered = 0; |
dev | 203 | drivers/block/ide.c | #define DEV_HWIF (dev->hwif) |
dev | 259 | drivers/block/ide.c | #define BIOS_SECTORS(dev) (dev->bios_head*dev->bios_sect*dev->bios_cyl) |
dev | 430 | drivers/block/ide.c | #define WAIT_STAT(dev,good,bad,timeout,msg,label) \ |
dev | 443 | drivers/block/ide.c | ide_error(dev, msg " error", stat); \ |
dev | 451 | drivers/block/ide.c | void input_ide_data (ide_dev_t *dev, void *buffer, uint wcount) |
dev | 454 | drivers/block/ide.c | if (dev->vlb_32bit) { |
dev | 456 | drivers/block/ide.c | if (dev->vlb_sync) { |
dev | 460 | drivers/block/ide.c | if (dev->unmask) |
dev | 473 | drivers/block/ide.c | void output_ide_data (ide_dev_t *dev, void *buffer, uint wcount) |
dev | 476 | drivers/block/ide.c | if (dev->vlb_32bit) { |
dev | 478 | drivers/block/ide.c | if (dev->vlb_sync) { |
dev | 482 | drivers/block/ide.c | if (dev->unmask) |
dev | 503 | drivers/block/ide.c | static void do_ide_reset (ide_dev_t *dev) |
dev | 527 | drivers/block/ide.c | OUT_BYTE(dev->ctl|6,HD_CMD); /* set nIEN, set SRST */ |
dev | 529 | drivers/block/ide.c | OUT_BYTE(dev->ctl|2,HD_CMD); /* clear SRST */ |
dev | 570 | drivers/block/ide.c | static void end_drive_cmd (ide_dev_t *dev, byte stat, byte err) |
dev | 596 | drivers/block/ide.c | ide_dev_t *dev = ide_cur_dev[HWIF]; |
dev | 597 | drivers/block/ide.c | const char *name = dev ? dev->name : ide_name[HWIF]; |
dev | 603 | drivers/block/ide.c | if (dev && dev->type == disk) { |
dev | 624 | drivers/block/ide.c | if (dev && dev->type == disk) { |
dev | 665 | drivers/block/ide.c | static void ide_error (ide_dev_t *dev, const char *msg, byte stat) |
dev | 671 | drivers/block/ide.c | if ((rq = ide_cur_rq[DEV_HWIF]) == NULL || dev == NULL) |
dev | 675 | drivers/block/ide.c | end_drive_cmd(dev, stat, err); |
dev | 682 | drivers/block/ide.c | if (dev->type == disk && (stat & ERR_STAT)) { |
dev | 690 | drivers/block/ide.c | int i = dev->mult_count ? dev->mult_count<<8 : 1<<8; |
dev | 692 | drivers/block/ide.c | (void) IN_BYTE(HD_DATA, dev->hwif); |
dev | 695 | drivers/block/ide.c | if (GET_STAT(dev->hwif) & (BUSY_STAT|DRQ_STAT)) |
dev | 702 | drivers/block/ide.c | do_ide_reset(dev); |
dev | 704 | drivers/block/ide.c | dev->special.b.recalibrate = 1; |
dev | 709 | drivers/block/ide.c | static void read_intr (ide_dev_t *dev) |
dev | 718 | drivers/block/ide.c | ide_error(dev, "read_intr", stat); |
dev | 722 | drivers/block/ide.c | msect = dev->mult_count; |
dev | 731 | drivers/block/ide.c | input_ide_data(dev, rq->buffer, nsect * SECTOR_WORDS); |
dev | 734 | drivers/block/ide.c | dev->name, rq->sector, rq->sector+nsect-1, |
dev | 753 | drivers/block/ide.c | static void write_intr (ide_dev_t *dev) |
dev | 759 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(DEV_HWIF),DRIVE_READY,dev->bad_wstat)) { |
dev | 762 | drivers/block/ide.c | dev->name, rq->sector, (unsigned long) rq->buffer, |
dev | 775 | drivers/block/ide.c | output_ide_data(dev, rq->buffer, SECTOR_WORDS); |
dev | 783 | drivers/block/ide.c | ide_error(dev, "write_intr", stat); |
dev | 787 | drivers/block/ide.c | static void multwrite (ide_dev_t *dev) |
dev | 790 | drivers/block/ide.c | unsigned int mcount = dev->mult_count; |
dev | 798 | drivers/block/ide.c | output_ide_data(dev, rq->buffer, nsect<<7); |
dev | 801 | drivers/block/ide.c | dev->name, rq->sector, (unsigned long) rq->buffer, |
dev | 811 | drivers/block/ide.c | panic("%s: buffer list corrupted\n", dev->name); |
dev | 820 | drivers/block/ide.c | static void multwrite_intr (ide_dev_t *dev) |
dev | 826 | drivers/block/ide.c | if (OK_STAT(stat=GET_STAT(DEV_HWIF),DRIVE_READY,dev->bad_wstat)) { |
dev | 829 | drivers/block/ide.c | if (dev->mult_count) |
dev | 830 | drivers/block/ide.c | multwrite(dev); |
dev | 847 | drivers/block/ide.c | ide_error(dev, "multwrite_intr", stat); |
dev | 855 | drivers/block/ide.c | static inline void ide_cmd(ide_dev_t *dev, byte cmd, byte nsect, |
dev | 856 | drivers/block/ide.c | void (*handler)(ide_dev_t *dev)) |
dev | 858 | drivers/block/ide.c | OUT_BYTE(dev->ctl,HD_CMD); |
dev | 864 | drivers/block/ide.c | static void set_multmode_intr (ide_dev_t *dev) |
dev | 870 | drivers/block/ide.c | dev->mult_req = dev->mult_count = 0; |
dev | 871 | drivers/block/ide.c | dev->special.b.recalibrate = 1; |
dev | 873 | drivers/block/ide.c | } else if (!dev->be_quiet) { |
dev | 874 | drivers/block/ide.c | if ((dev->mult_count = dev->mult_req)) |
dev | 876 | drivers/block/ide.c | dev->name, dev->mult_count); |
dev | 878 | drivers/block/ide.c | printk (" %s: multiple mode turned off\n", dev->name); |
dev | 880 | drivers/block/ide.c | dev->be_quiet = 0; |
dev | 884 | drivers/block/ide.c | static void set_geometry_intr (ide_dev_t *dev) |
dev | 890 | drivers/block/ide.c | ide_error(dev, "set_geometry_intr", stat); |
dev | 894 | drivers/block/ide.c | static void recal_intr (ide_dev_t *dev) |
dev | 900 | drivers/block/ide.c | ide_error(dev, "recal_intr", stat); |
dev | 904 | drivers/block/ide.c | static void drive_cmd_intr (ide_dev_t *dev) |
dev | 910 | drivers/block/ide.c | ide_error(dev, "drive_cmd", stat); /* calls end_drive_cmd() */ |
dev | 912 | drivers/block/ide.c | end_drive_cmd (dev, stat, GET_ERR(DEV_HWIF)); |
dev | 962 | drivers/block/ide.c | static int do_special (ide_dev_t *dev) |
dev | 964 | drivers/block/ide.c | special_t *s = &dev->special; |
dev | 966 | drivers/block/ide.c | printk("%s: do_special: 0x%02x\n", dev->name, s->all); |
dev | 970 | drivers/block/ide.c | if (dev->type == disk) { |
dev | 971 | drivers/block/ide.c | OUT_BYTE(dev->sect,HD_SECTOR); |
dev | 972 | drivers/block/ide.c | OUT_BYTE(dev->cyl,HD_LCYL); |
dev | 973 | drivers/block/ide.c | OUT_BYTE(dev->cyl>>8,HD_HCYL); |
dev | 974 | drivers/block/ide.c | OUT_BYTE(((dev->head-1)|dev->select.all)&0xBF,HD_CURRENT); |
dev | 975 | drivers/block/ide.c | ide_cmd(dev, WIN_SPECIFY, dev->sect, &set_geometry_intr); |
dev | 979 | drivers/block/ide.c | if (dev->type == disk) |
dev | 980 | drivers/block/ide.c | ide_cmd(dev,WIN_RESTORE,dev->sect,&recal_intr); |
dev | 982 | drivers/block/ide.c | if (dev->type == disk) { |
dev | 983 | drivers/block/ide.c | if (dev->id && dev->mult_req > dev->id->max_multsect) |
dev | 984 | drivers/block/ide.c | dev->mult_req = dev->id->max_multsect; |
dev | 985 | drivers/block/ide.c | ide_cmd(dev,WIN_SETMULT,dev->mult_req,&set_multmode_intr); |
dev | 987 | drivers/block/ide.c | dev->mult_req = 0; |
dev | 988 | drivers/block/ide.c | printk("%s: multmode not supported by this device\n", dev->name); |
dev | 993 | drivers/block/ide.c | printk("%s: bad special flag: 0x%02x\n", dev->name, s->all); |
dev | 1001 | drivers/block/ide.c | static byte wait_stat (ide_dev_t *dev, byte good, byte bad, unsigned long timeout) |
dev | 1007 | drivers/block/ide.c | WAIT_STAT(dev, good, bad, timeout, "status", error); |
dev | 1018 | drivers/block/ide.c | static inline int do_rw_disk (ide_dev_t *dev, struct request *rq, unsigned long block) |
dev | 1020 | drivers/block/ide.c | OUT_BYTE(dev->ctl,HD_CMD); |
dev | 1022 | drivers/block/ide.c | if (dev->select.b.lba) { |
dev | 1025 | drivers/block/ide.c | dev->name, (rq->cmd==READ)?"read":"writ", |
dev | 1031 | drivers/block/ide.c | OUT_BYTE(((block>>8)&0x0f)|dev->select.all,HD_CURRENT); |
dev | 1034 | drivers/block/ide.c | track = block / dev->sect; |
dev | 1035 | drivers/block/ide.c | sect = block % dev->sect + 1; |
dev | 1037 | drivers/block/ide.c | head = track % dev->head; |
dev | 1038 | drivers/block/ide.c | cyl = track / dev->head; |
dev | 1041 | drivers/block/ide.c | OUT_BYTE(head|dev->select.all,HD_CURRENT); |
dev | 1044 | drivers/block/ide.c | dev->name, (rq->cmd==READ)?"read":"writ", cyl, |
dev | 1049 | drivers/block/ide.c | OUT_BYTE(dev->mult_count ? WIN_MULTREAD : WIN_READ, HD_COMMAND); |
dev | 1054 | drivers/block/ide.c | OUT_BYTE(dev->wpcom,HD_PRECOMP); /* for ancient drives */ |
dev | 1055 | drivers/block/ide.c | OUT_BYTE(dev->mult_count ? WIN_MULTWRITE : WIN_WRITE, HD_COMMAND); |
dev | 1056 | drivers/block/ide.c | WAIT_STAT(dev,DATA_READY,dev->bad_wstat,WAIT_DRQ,"DRQ",error); |
dev | 1057 | drivers/block/ide.c | if (!dev->unmask) |
dev | 1059 | drivers/block/ide.c | if (dev->mult_count) { |
dev | 1061 | drivers/block/ide.c | multwrite(dev); |
dev | 1064 | drivers/block/ide.c | output_ide_data(dev, rq->buffer, SECTOR_WORDS); |
dev | 1074 | drivers/block/ide.c | ide_cmd(dev, args[0], args[1], &drive_cmd_intr); |
dev | 1076 | drivers/block/ide.c | dev->name, args[0], args[1], args[2]); |
dev | 1080 | drivers/block/ide.c | printk("%s: DRIVE_CMD (null)\n", dev->name); |
dev | 1082 | drivers/block/ide.c | end_drive_cmd(dev,GET_STAT(DEV_HWIF),GET_ERR(DEV_HWIF)); |
dev | 1087 | drivers/block/ide.c | printk("%s: bad command: %d\n", dev->name, rq->cmd); |
dev | 1109 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1117 | drivers/block/ide.c | if ((rq == NULL) || (rq->dev < 0)) { |
dev | 1120 | drivers/block/ide.c | if (sharing_single_irq && (dev = ide_cur_dev[hwif])) /* disable irq */ |
dev | 1121 | drivers/block/ide.c | OUT_BYTE(dev->ctl|2,HD_CMD); |
dev | 1123 | drivers/block/ide.c | if ((rq != NULL) && (rq->dev >= 0)) |
dev | 1135 | drivers/block/ide.c | minor = MINOR(rq->dev); |
dev | 1137 | drivers/block/ide.c | ide_cur_dev[HWIF] = dev = &ide_dev[HWIF][drive]; |
dev | 1138 | drivers/block/ide.c | if ((MAJOR(rq->dev) != ide_major[HWIF]) || (drive >= MAX_DRIVES)) { |
dev | 1139 | drivers/block/ide.c | printk("%s: bad device number: 0x%04x\n", ide_name[HWIF], rq->dev); |
dev | 1152 | drivers/block/ide.c | dev->name, block, rq->nr_sectors); |
dev | 1160 | drivers/block/ide.c | OUT_BYTE(dev->select.all,HD_CURRENT); |
dev | 1162 | drivers/block/ide.c | WAIT_STAT(dev, (dev->type == cdrom) ? 0 : READY_STAT, |
dev | 1165 | drivers/block/ide.c | WAIT_STAT(dev, READY_STAT, BUSY_STAT|DRQ_STAT, WAIT_READY, "DRDY", repeat); |
dev | 1167 | drivers/block/ide.c | if (!dev->special.all) { |
dev | 1169 | drivers/block/ide.c | if (dev->type == disk) { |
dev | 1171 | drivers/block/ide.c | if (do_rw_disk(dev, rq, block)) |
dev | 1175 | drivers/block/ide.c | if (do_rw_cdrom(dev, block)) |
dev | 1180 | drivers/block/ide.c | if (do_special(dev)) |
dev | 1263 | drivers/block/ide.c | ide_dev_t *dev; \ |
dev | 1269 | drivers/block/ide.c | dev = ide_cur_dev[hwif]; \ |
dev | 1270 | drivers/block/ide.c | if (dev->unmask) \ |
dev | 1272 | drivers/block/ide.c | handler(dev); \ |
dev | 1333 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1337 | drivers/block/ide.c | case IDE0_MAJOR: dev = &ide_dev[0][drive]; |
dev | 1338 | drivers/block/ide.c | if (dev->present) return dev; |
dev | 1340 | drivers/block/ide.c | case IDE1_MAJOR: dev = &ide_dev[1][drive]; |
dev | 1341 | drivers/block/ide.c | if (dev->present) return dev; |
dev | 1350 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1353 | drivers/block/ide.c | if ((dev = get_info_ptr(inode->i_rdev)) == NULL) |
dev | 1357 | drivers/block/ide.c | while (dev->busy) |
dev | 1358 | drivers/block/ide.c | sleep_on(&dev->wqueue); |
dev | 1359 | drivers/block/ide.c | dev->usage++; |
dev | 1361 | drivers/block/ide.c | if (dev->id && (dev->id->config & (1<<7))) /* for removeable disks */ |
dev | 1364 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 1365 | drivers/block/ide.c | return cdrom_open (inode, filp, dev); |
dev | 1376 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1378 | drivers/block/ide.c | if ((dev = get_info_ptr(inode->i_rdev)) != NULL) { |
dev | 1380 | drivers/block/ide.c | dev->usage--; |
dev | 1382 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 1383 | drivers/block/ide.c | cdrom_release (inode, file, dev); |
dev | 1399 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1403 | drivers/block/ide.c | if ((dev = get_info_ptr(i_rdev)) == NULL) |
dev | 1408 | drivers/block/ide.c | if (dev->busy || (dev->usage > 1)) { |
dev | 1412 | drivers/block/ide.c | dev->busy = 1; |
dev | 1431 | drivers/block/ide.c | dev->busy = 0; |
dev | 1432 | drivers/block/ide.c | wake_up(&dev->wqueue); |
dev | 1443 | drivers/block/ide.c | static int do_drive_cmd(int dev, char *args) |
dev | 1446 | drivers/block/ide.c | unsigned int major = MAJOR(dev); |
dev | 1462 | drivers/block/ide.c | rq.dev = dev; |
dev | 1500 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1505 | drivers/block/ide.c | if ((dev = get_info_ptr(inode->i_rdev)) == NULL) |
dev | 1509 | drivers/block/ide.c | if (!loc || dev->type != disk) return -EINVAL; |
dev | 1512 | drivers/block/ide.c | put_user(dev->bios_head, |
dev | 1514 | drivers/block/ide.c | put_user(dev->bios_sect, |
dev | 1516 | drivers/block/ide.c | put_user(dev->bios_cyl, |
dev | 1543 | drivers/block/ide.c | return write_fs_long(arg, dev->keep_settings); |
dev | 1546 | drivers/block/ide.c | return write_fs_long(arg, dev->unmask); |
dev | 1549 | drivers/block/ide.c | return write_fs_long(arg, dev->chipset); |
dev | 1552 | drivers/block/ide.c | return write_fs_long(arg, dev->mult_count); |
dev | 1557 | drivers/block/ide.c | if (dev->id == NULL) |
dev | 1559 | drivers/block/ide.c | err = verify_area(VERIFY_WRITE, (char *)arg, sizeof(*dev->id)); |
dev | 1561 | drivers/block/ide.c | memcpy_tofs((char *)arg, (char *)dev->id, sizeof(*dev->id)); |
dev | 1565 | drivers/block/ide.c | return write_fs_long(arg, dev->bad_wstat == BAD_R_STAT); |
dev | 1578 | drivers/block/ide.c | dev->keep_settings = arg; |
dev | 1581 | drivers/block/ide.c | dev->unmask = arg; |
dev | 1584 | drivers/block/ide.c | dev->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; |
dev | 1587 | drivers/block/ide.c | dev->chipset = arg; |
dev | 1588 | drivers/block/ide.c | dev->vlb_sync = (arg & 2) >> 1; |
dev | 1589 | drivers/block/ide.c | dev->vlb_32bit = (arg & 1); |
dev | 1599 | drivers/block/ide.c | if ((dev->id != NULL) && (arg > dev->id->max_multsect)) |
dev | 1603 | drivers/block/ide.c | if (dev->special.b.set_multmode) { |
dev | 1607 | drivers/block/ide.c | dev->mult_req = arg; |
dev | 1608 | drivers/block/ide.c | dev->special.b.set_multmode = 1; |
dev | 1614 | drivers/block/ide.c | return (dev->mult_count == arg) ? 0 : -EIO; |
dev | 1640 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 1641 | drivers/block/ide.c | return ide_cdrom_ioctl(dev, inode, file, cmd, arg); |
dev | 1649 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 1651 | drivers/block/ide.c | if ((dev = get_info_ptr(full_dev)) == NULL) |
dev | 1654 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 1655 | drivers/block/ide.c | return cdrom_check_media_change (dev); |
dev | 1657 | drivers/block/ide.c | if (dev->id && (dev->id->config & (1<<7))) /* for removeable disks */ |
dev | 1716 | drivers/block/ide.c | static void do_identify (ide_dev_t *dev, byte cmd) |
dev | 1722 | drivers/block/ide.c | id = dev->id = (struct hd_driveid *) probe_mem_start; /* kmalloc() */ |
dev | 1724 | drivers/block/ide.c | input_ide_data(dev, id, SECTOR_WORDS); /* read 512 bytes of id info */ |
dev | 1732 | drivers/block/ide.c | printk("%s: EATA SCSI HBA %.10s\n", dev->name, id->model); |
dev | 1733 | drivers/block/ide.c | dev->present = 0; |
dev | 1758 | drivers/block/ide.c | printk("%s: %s, ATAPI,", dev->name, id->model); |
dev | 1764 | drivers/block/ide.c | dev->type = cdrom; /* until we do it "correctly" above */ |
dev | 1765 | drivers/block/ide.c | dev->present = 1; |
dev | 1772 | drivers/block/ide.c | dev->type = disk; |
dev | 1774 | drivers/block/ide.c | if (!dev->present) { |
dev | 1775 | drivers/block/ide.c | dev->present = 1; |
dev | 1776 | drivers/block/ide.c | dev->cyl = dev->bios_cyl = id->cyls; |
dev | 1777 | drivers/block/ide.c | dev->head = dev->bios_head = id->heads; |
dev | 1778 | drivers/block/ide.c | dev->sect = dev->bios_sect = id->sectors; |
dev | 1794 | drivers/block/ide.c | dev->cyl = id->cur_cyls; |
dev | 1795 | drivers/block/ide.c | dev->head = id->cur_heads; |
dev | 1796 | drivers/block/ide.c | dev->sect = id->cur_sectors; |
dev | 1797 | drivers/block/ide.c | capacity = dev->cyl * dev->head * dev->sect; |
dev | 1808 | drivers/block/ide.c | if ((!dev->head || dev->head > 16) && id->heads && id->heads <= 16) { |
dev | 1809 | drivers/block/ide.c | dev->cyl = id->cyls; |
dev | 1810 | drivers/block/ide.c | dev->head = id->heads; |
dev | 1811 | drivers/block/ide.c | dev->sect = id->sectors; |
dev | 1814 | drivers/block/ide.c | if (dev->sect == dev->bios_sect && dev->head == dev->bios_head) { |
dev | 1815 | drivers/block/ide.c | if (dev->cyl > dev->bios_cyl) |
dev | 1816 | drivers/block/ide.c | dev->bios_cyl = dev->cyl; |
dev | 1820 | drivers/block/ide.c | dev->select.b.lba = 1; |
dev | 1823 | drivers/block/ide.c | capacity = dev->cyl * dev->head * dev->sect; |
dev | 1826 | drivers/block/ide.c | ide_capacity[DEV_HWIF][dev->select.b.drive] = capacity; |
dev | 1828 | drivers/block/ide.c | dev->name, id->model, capacity/2048L, id->buf_size/2, |
dev | 1829 | drivers/block/ide.c | dev->select.b.lba ? "LBA, " : "", |
dev | 1830 | drivers/block/ide.c | dev->bios_cyl, dev->bios_head, dev->bios_sect); |
dev | 1832 | drivers/block/ide.c | dev->mult_count = 0; |
dev | 1834 | drivers/block/ide.c | dev->mult_req = INITIAL_MULT_COUNT; |
dev | 1835 | drivers/block/ide.c | if (dev->mult_req > id->max_multsect) |
dev | 1836 | drivers/block/ide.c | dev->mult_req = id->max_multsect; |
dev | 1837 | drivers/block/ide.c | if (dev->mult_req || ((id->multsect_valid & 1) && id->multsect)) { |
dev | 1838 | drivers/block/ide.c | dev->special.b.set_multmode = 1; |
dev | 1839 | drivers/block/ide.c | dev->be_quiet = 1; |
dev | 1857 | drivers/block/ide.c | static int try_to_identify (ide_dev_t *dev, byte cmd) |
dev | 1871 | drivers/block/ide.c | OUT_BYTE(dev->ctl|2,HD_CMD); /* disable device irq */ |
dev | 1876 | drivers/block/ide.c | OUT_BYTE(dev->ctl,HD_CMD); /* enable device irq */ |
dev | 1882 | drivers/block/ide.c | printk("%s: probing with STATUS instead of ALTSTATUS\n", dev->name); |
dev | 1901 | drivers/block/ide.c | do_identify(dev, cmd); /* drive returned ID */ |
dev | 1912 | drivers/block/ide.c | printk("%s: IRQ probe failed (%d)\n", dev->name, irqs); |
dev | 1928 | drivers/block/ide.c | static int do_probe (ide_dev_t *dev, byte cmd) |
dev | 1940 | drivers/block/ide.c | if (dev->present) { /* avoid waiting for inappropriate probes */ |
dev | 1941 | drivers/block/ide.c | if ((dev->type == disk) ^ (cmd == WIN_IDENTIFY)) |
dev | 1947 | drivers/block/ide.c | dev->name, dev->present, dev->type ? "cdrom":"disk", |
dev | 1950 | drivers/block/ide.c | OUT_BYTE(dev->select.all,HD_CURRENT); /* select target drive */ |
dev | 1952 | drivers/block/ide.c | if (IN_BYTE(HD_CURRENT,DEV_HWIF) != dev->select.all && !dev->present) { |
dev | 1958 | drivers/block/ide.c | || dev->present || cmd == WIN_PIDENTIFY) |
dev | 1960 | drivers/block/ide.c | if ((rc = try_to_identify(dev, cmd))) /* send cmd and wait */ |
dev | 1961 | drivers/block/ide.c | rc = try_to_identify(dev, cmd); /* failed: try again */ |
dev | 1964 | drivers/block/ide.c | dev->name, GET_STAT(DEV_HWIF)); |
dev | 1965 | drivers/block/ide.c | OUT_BYTE(dev->ctl|2,HD_CMD); /* disable device irq */ |
dev | 1971 | drivers/block/ide.c | if (dev->select.b.drive == 1) { |
dev | 1974 | drivers/block/ide.c | OUT_BYTE(dev->ctl|2,HD_CMD); /* disable device irq */ |
dev | 1981 | drivers/block/ide.c | static byte probe_for_drive (ide_dev_t *dev) |
dev | 1987 | drivers/block/ide.c | if (dev->noprobe) /* skip probing? */ |
dev | 1988 | drivers/block/ide.c | return dev->present; |
dev | 1989 | drivers/block/ide.c | if (do_probe(dev, WIN_IDENTIFY) >= 2) { /* if !(success || timed-out) */ |
dev | 1991 | drivers/block/ide.c | (void) do_probe(dev, WIN_PIDENTIFY); /* look for ATAPI device */ |
dev | 1994 | drivers/block/ide.c | if (!dev->present) |
dev | 1996 | drivers/block/ide.c | if (dev->id == NULL) { /* identification failed? */ |
dev | 1997 | drivers/block/ide.c | if (dev->type == disk) { |
dev | 1999 | drivers/block/ide.c | dev->name, dev->cyl, dev->head, dev->sect); |
dev | 2002 | drivers/block/ide.c | else if (dev->type == cdrom) { |
dev | 2003 | drivers/block/ide.c | printk("%s: ATAPI cdrom (?)\n", dev->name); |
dev | 2007 | drivers/block/ide.c | dev->present = 0; /* nuke it */ |
dev | 2012 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 2013 | drivers/block/ide.c | cdrom_setup(dev); |
dev | 2015 | drivers/block/ide.c | if (dev->type == disk && !dev->select.b.lba) { |
dev | 2016 | drivers/block/ide.c | if (!dev->head || dev->head > 16) { |
dev | 2018 | drivers/block/ide.c | dev->name, dev->head); |
dev | 2019 | drivers/block/ide.c | dev->present = 0; |
dev | 2060 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 2083 | drivers/block/ide.c | dev = &ide_dev[hwif][drive]; |
dev | 2084 | drivers/block/ide.c | if (dev->present) |
dev | 2103 | drivers/block/ide.c | dev->noprobe = 1; /* don't probe for this drive */ |
dev | 2108 | drivers/block/ide.c | dev->bad_wstat = BAD_R_STAT; /* ignore WRERR_STAT */ |
dev | 2114 | drivers/block/ide.c | dev->present = 1; /* force autoprobe to find it */ |
dev | 2115 | drivers/block/ide.c | dev->type = cdrom; |
dev | 2125 | drivers/block/ide.c | dev->type = disk; |
dev | 2126 | drivers/block/ide.c | dev->cyl = dev->bios_cyl = ints[1]; |
dev | 2127 | drivers/block/ide.c | dev->head = dev->bios_head = ints[2]; |
dev | 2128 | drivers/block/ide.c | dev->ctl = (ints[2] > 8 ? 8 : 0); |
dev | 2129 | drivers/block/ide.c | dev->sect = dev->bios_sect = ints[3]; |
dev | 2130 | drivers/block/ide.c | dev->wpcom = (ints[0] >= 4) ? ints[4] : 0; |
dev | 2133 | drivers/block/ide.c | ide_capacity[HWIF][drive] = BIOS_SECTORS(dev); |
dev | 2134 | drivers/block/ide.c | dev->present = 1; |
dev | 2165 | drivers/block/ide.c | ide_dev_t *dev; |
dev | 2167 | drivers/block/ide.c | if ((dev = get_info_ptr(full_dev)) != NULL) { |
dev | 2168 | drivers/block/ide.c | dev->bios_cyl -= 1; /* keeps fdisk sane */ |
dev | 2169 | drivers/block/ide.c | while (dev->bios_cyl > 1024) { |
dev | 2170 | drivers/block/ide.c | if (dev->bios_head > 32) |
dev | 2172 | drivers/block/ide.c | dev->bios_head *= 2; |
dev | 2173 | drivers/block/ide.c | dev->bios_cyl /= 2; |
dev | 2201 | drivers/block/ide.c | ide_dev_t *dev = &ide_dev[0][drive]; |
dev | 2202 | drivers/block/ide.c | if ((cmos_disks & (0xf0 >> (drive*4))) && !dev->present) { |
dev | 2203 | drivers/block/ide.c | dev->cyl = dev->bios_cyl = *(unsigned short *)BIOS; |
dev | 2204 | drivers/block/ide.c | dev->head = dev->bios_head = * (BIOS+2); |
dev | 2205 | drivers/block/ide.c | dev->sect = dev->bios_sect = * (BIOS+14); |
dev | 2206 | drivers/block/ide.c | dev->wpcom = (*(unsigned short *)(BIOS+5))>>2; |
dev | 2207 | drivers/block/ide.c | dev->ctl = *(BIOS+8); |
dev | 2208 | drivers/block/ide.c | dev->wpcom = 0; |
dev | 2209 | drivers/block/ide.c | dev->type = disk; |
dev | 2210 | drivers/block/ide.c | dev->present = 1; |
dev | 2211 | drivers/block/ide.c | ide_capacity[0][drive] = BIOS_SECTORS(dev); |
dev | 2229 | drivers/block/ide.c | ide_dev_t *dev = &ide_dev[hwif][drive]; |
dev | 2230 | drivers/block/ide.c | dev->select.all = (drive<<4)|0xa0; |
dev | 2231 | drivers/block/ide.c | dev->hwif = hwif; |
dev | 2232 | drivers/block/ide.c | dev->unmask = 0; |
dev | 2233 | drivers/block/ide.c | dev->busy = 0; |
dev | 2234 | drivers/block/ide.c | dev->mult_count = 0; /* set by do_identify() */ |
dev | 2235 | drivers/block/ide.c | dev->mult_req = 0; /* set by do_identify() */ |
dev | 2236 | drivers/block/ide.c | dev->usage = 0; |
dev | 2237 | drivers/block/ide.c | dev->vlb_32bit = 0; |
dev | 2238 | drivers/block/ide.c | dev->vlb_sync = 0; |
dev | 2239 | drivers/block/ide.c | dev->id = NULL; |
dev | 2240 | drivers/block/ide.c | dev->ctl = 0x08; |
dev | 2241 | drivers/block/ide.c | dev->wqueue = NULL; |
dev | 2242 | drivers/block/ide.c | dev->special.all = 0; |
dev | 2243 | drivers/block/ide.c | dev->special.b.recalibrate = 1; |
dev | 2244 | drivers/block/ide.c | dev->special.b.set_geometry = 1; |
dev | 2245 | drivers/block/ide.c | dev->keep_settings = 0; |
dev | 2247 | drivers/block/ide.c | dev->name = ide_devname[hwif][drive]; |
dev | 2248 | drivers/block/ide.c | if (!dev->bad_wstat) |
dev | 2249 | drivers/block/ide.c | dev->bad_wstat = BAD_W_STAT; |
dev | 2300 | drivers/block/ide.c | ide_dev_t *dev = &ide_dev[HWIF][drive]; |
dev | 2301 | drivers/block/ide.c | if (dev->present) { |
dev | 2304 | drivers/block/ide.c | if (dev->type == cdrom) |
dev | 107 | drivers/block/ll_rw_blk.c | static void plug_device(struct blk_dev_struct * dev, struct request * plug) |
dev | 111 | drivers/block/ll_rw_blk.c | plug->dev = -1; |
dev | 116 | drivers/block/ll_rw_blk.c | if (!dev->current_request) |
dev | 117 | drivers/block/ll_rw_blk.c | dev->current_request = plug; |
dev | 124 | drivers/block/ll_rw_blk.c | static void unplug_device(struct blk_dev_struct * dev) |
dev | 131 | drivers/block/ll_rw_blk.c | req = dev->current_request; |
dev | 132 | drivers/block/ll_rw_blk.c | if (req && req->dev == -1 && req->cmd == -1) { |
dev | 133 | drivers/block/ll_rw_blk.c | dev->current_request = req->next; |
dev | 134 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 144 | drivers/block/ll_rw_blk.c | static inline struct request * get_request(int n, int dev) |
dev | 160 | drivers/block/ll_rw_blk.c | if (req->dev < 0) |
dev | 166 | drivers/block/ll_rw_blk.c | req->dev = dev; |
dev | 173 | drivers/block/ll_rw_blk.c | static struct request * __get_request_wait(int n, int dev) |
dev | 180 | drivers/block/ll_rw_blk.c | unplug_device(MAJOR(dev)+blk_dev); |
dev | 183 | drivers/block/ll_rw_blk.c | req = get_request(n, dev); |
dev | 194 | drivers/block/ll_rw_blk.c | static inline struct request * get_request_wait(int n, int dev) |
dev | 199 | drivers/block/ll_rw_blk.c | req = get_request(n, dev); |
dev | 203 | drivers/block/ll_rw_blk.c | return __get_request_wait(n, dev); |
dev | 210 | drivers/block/ll_rw_blk.c | int is_read_only(int dev) |
dev | 214 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 215 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 220 | drivers/block/ll_rw_blk.c | void set_device_ro(int dev,int flag) |
dev | 224 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 225 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 236 | drivers/block/ll_rw_blk.c | static void add_request(struct blk_dev_struct * dev, struct request * req) |
dev | 241 | drivers/block/ll_rw_blk.c | switch (MAJOR(req->dev)) { |
dev | 242 | drivers/block/ll_rw_blk.c | case SCSI_DISK_MAJOR: disk_index = (MINOR(req->dev) & 0x0070) >> 4; |
dev | 247 | drivers/block/ll_rw_blk.c | case XT_DISK_MAJOR: disk_index = (MINOR(req->dev) & 0x0040) >> 6; |
dev | 250 | drivers/block/ll_rw_blk.c | case IDE1_MAJOR: disk_index = ((MINOR(req->dev) & 0x0040) >> 6) + 2; |
dev | 259 | drivers/block/ll_rw_blk.c | if (!(tmp = dev->current_request)) { |
dev | 260 | drivers/block/ll_rw_blk.c | dev->current_request = req; |
dev | 261 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 275 | drivers/block/ll_rw_blk.c | if (scsi_major(MAJOR(req->dev))) |
dev | 276 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 347 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 361 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 409 | drivers/block/ll_rw_blk.c | void ll_rw_page(int rw, int dev, unsigned long page, char * buffer) |
dev | 412 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 417 | drivers/block/ll_rw_blk.c | printk("Trying to read nonexistent block-device %04x (%ld)\n",dev,sector); |
dev | 422 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 423 | drivers/block/ll_rw_blk.c | printk("Can't page to read-only device 0x%X\n",dev); |
dev | 426 | drivers/block/ll_rw_blk.c | req = get_request_wait(NR_REQUEST, dev); |
dev | 450 | drivers/block/ll_rw_blk.c | struct blk_dev_struct * dev; |
dev | 460 | drivers/block/ll_rw_blk.c | dev = NULL; |
dev | 462 | drivers/block/ll_rw_blk.c | dev = blk_dev + major; |
dev | 463 | drivers/block/ll_rw_blk.c | if (!dev || !dev->request_fn) { |
dev | 499 | drivers/block/ll_rw_blk.c | plug_device(dev, &plug); |
dev | 510 | drivers/block/ll_rw_blk.c | unplug_device(dev); |
dev | 521 | drivers/block/ll_rw_blk.c | void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf) |
dev | 526 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 538 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 539 | drivers/block/ll_rw_blk.c | printk("Can't swap to read-only device 0x%X\n",dev); |
dev | 550 | drivers/block/ll_rw_blk.c | req[j] = get_request_wait(NR_REQUEST, dev); |
dev | 553 | drivers/block/ll_rw_blk.c | req[j] = get_request(NR_REQUEST, dev); |
dev | 582 | drivers/block/ll_rw_blk.c | req->dev = -1; |
dev | 142 | drivers/block/mcd.c | (CURRENT && MAJOR(CURRENT -> dev) == MAJOR_NR && CURRENT -> cmd == READ \ |
dev | 458 | drivers/block/mcdx.c | int dev; |
dev | 465 | drivers/block/mcdx.c | if ((CURRENT == NULL) || (CURRENT->dev < 0)) { |
dev | 470 | drivers/block/mcdx.c | stuffp = mcdx_stuffp[MINOR(CURRENT->dev)]; |
dev | 474 | drivers/block/mcdx.c | dev = MINOR(CURRENT->dev); |
dev | 476 | drivers/block/mcdx.c | if ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) { |
dev | 477 | drivers/block/mcdx.c | printk(MCD "do_request(): bad device: 0x%04x\n", CURRENT->dev); |
dev | 43 | drivers/block/ramdisk.c | if ((MINOR(CURRENT->dev) != RAMDISK_MINOR) || |
dev | 4374 | drivers/block/sbpcd.c | if ((CURRENT==NULL)||(CURRENT->dev<0)) goto err_done; |
dev | 4381 | drivers/block/sbpcd.c | i = MINOR(CURRENT->dev); |
dev | 4384 | drivers/block/sbpcd.c | msg(DBG_INF, "do_request: bad device: %04X\n", CURRENT->dev); |
dev | 911 | drivers/block/sjcd.c | ( CURRENT != NULL && MAJOR( CURRENT->dev ) == MAJOR_NR && \ |
dev | 817 | drivers/block/sonycd535.c | unsigned int dev; |
dev | 835 | drivers/block/sonycd535.c | if (!(CURRENT) || CURRENT->dev < 0) { |
dev | 839 | drivers/block/sonycd535.c | dev = MINOR(CURRENT->dev); |
dev | 842 | drivers/block/sonycd535.c | if (dev != 0) { |
dev | 1113 | drivers/block/sonycd535.c | unsigned int dev; |
dev | 1123 | drivers/block/sonycd535.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 1124 | drivers/block/sonycd535.c | if (dev != 0) { |
dev | 195 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(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 | 219 | drivers/block/xd.c | if (CURRENT_DEV < xd_drives && CURRENT->sector + CURRENT->nr_sectors <= xd[MINOR(CURRENT->dev)].nr_sects) { |
dev | 220 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
dev | 241 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)),err; |
dev | 243 | drivers/block/xd.c | if (inode && (dev < xd_drives)) |
dev | 249 | drivers/block/xd.c | put_user(xd_info[dev].heads, &geometry->heads); |
dev | 250 | drivers/block/xd.c | put_user(xd_info[dev].sectors, &geometry->sectors); |
dev | 251 | drivers/block/xd.c | put_user(xd_info[dev].cylinders, &geometry->cylinders); |
dev | 289 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 291 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 292 | drivers/block/xd.c | sync_dev(dev); |
dev | 293 | drivers/block/xd.c | xd_access[dev]--; |
dev | 298 | drivers/block/xd.c | static int xd_reread_partitions(int dev) |
dev | 300 | drivers/block/xd.c | int target = DEVICE_NR(MINOR(dev)),start = target << xd_gendisk.minor_shift,partition; |
dev | 1921 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 1934 | drivers/char/tpqic02.c | MINOR(dev), buf, count, (unsigned long) filp->f_pos, flags); |
dev | 2096 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 2108 | drivers/char/tpqic02.c | MINOR(dev), buf, count, (unsigned long) filp->f_pos, flags); |
dev | 2247 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 2253 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) { |
dev | 2254 | drivers/char/tpqic02.c | printk("qic02_tape_open: dev=%x, flags=%x ", dev, flags); |
dev | 2257 | drivers/char/tpqic02.c | if (MINOR(dev)==255) /* special case for resetting */ |
dev | 2333 | drivers/char/tpqic02.c | if ((TP_DENS(dev)!=0) && (TP_DENS(current_tape_dev) != TP_DENS(dev))) { |
dev | 2346 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2382 | drivers/char/tpqic02.c | if (TP_DENS(current_tape_dev) == TP_DENS(dev) ) |
dev | 2385 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2388 | drivers/char/tpqic02.c | dens = TP_DENS(dev); |
dev | 2395 | drivers/char/tpqic02.c | switch (TP_DENS(dev)) { |
dev | 2440 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 2442 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) |
dev | 2443 | drivers/char/tpqic02.c | printk("qic02_tape_release: dev=%x\n", dev); |
dev | 2459 | drivers/char/tpqic02.c | if ((TP_REWCLOSE(dev)) && (status_bytes_rd | status_bytes_wr)) { |
dev | 120 | drivers/net/3c501.c | int el1_probe(struct device *dev); |
dev | 121 | drivers/net/3c501.c | static int el1_probe1(struct device *dev, int ioaddr); |
dev | 122 | drivers/net/3c501.c | static int el_open(struct device *dev); |
dev | 123 | drivers/net/3c501.c | static int el_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 125 | drivers/net/3c501.c | static void el_receive(struct device *dev); |
dev | 126 | drivers/net/3c501.c | static void el_reset(struct device *dev); |
dev | 127 | drivers/net/3c501.c | static int el1_close(struct device *dev); |
dev | 128 | drivers/net/3c501.c | static struct enet_statistics *el1_get_stats(struct device *dev); |
dev | 129 | drivers/net/3c501.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 198 | drivers/net/3c501.c | el1_probe(struct device *dev) |
dev | 201 | drivers/net/3c501.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 204 | drivers/net/3c501.c | return el1_probe1(dev, base_addr); |
dev | 212 | drivers/net/3c501.c | if (el1_probe1(dev, ioaddr) == 0) |
dev | 222 | drivers/net/3c501.c | el1_probe1(struct device *dev, int ioaddr) |
dev | 252 | drivers/net/3c501.c | if (dev->irq < 2) { |
dev | 273 | drivers/net/3c501.c | dev->base_addr = ioaddr; |
dev | 274 | drivers/net/3c501.c | memcpy(dev->dev_addr, station_addr, ETH_ALEN); |
dev | 275 | drivers/net/3c501.c | if (dev->mem_start & 0xf) |
dev | 276 | drivers/net/3c501.c | el_debug = dev->mem_start & 0x7; |
dev | 278 | drivers/net/3c501.c | dev->irq = autoirq; |
dev | 281 | drivers/net/3c501.c | dev->name, mname, dev->base_addr, |
dev | 282 | drivers/net/3c501.c | autoirq ? "auto":"assigned ", dev->irq); |
dev | 292 | drivers/net/3c501.c | if (dev->priv == NULL) |
dev | 293 | drivers/net/3c501.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 294 | drivers/net/3c501.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 297 | drivers/net/3c501.c | dev->open = &el_open; |
dev | 298 | drivers/net/3c501.c | dev->hard_start_xmit = &el_start_xmit; |
dev | 299 | drivers/net/3c501.c | dev->stop = &el1_close; |
dev | 300 | drivers/net/3c501.c | dev->get_stats = &el1_get_stats; |
dev | 301 | drivers/net/3c501.c | dev->set_multicast_list = &set_multicast_list; |
dev | 303 | drivers/net/3c501.c | ether_setup(dev); |
dev | 311 | drivers/net/3c501.c | el_open(struct device *dev) |
dev | 313 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 316 | drivers/net/3c501.c | printk("%s: Doing el_open()...", dev->name); |
dev | 318 | drivers/net/3c501.c | if (request_irq(dev->irq, &el_interrupt, 0, "3c501")) { |
dev | 321 | drivers/net/3c501.c | irq2dev_map[dev->irq] = dev; |
dev | 323 | drivers/net/3c501.c | el_reset(dev); |
dev | 325 | drivers/net/3c501.c | dev->start = 1; |
dev | 333 | drivers/net/3c501.c | el_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 335 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 336 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 339 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 340 | drivers/net/3c501.c | if (jiffies - dev->trans_start < 20) { |
dev | 347 | drivers/net/3c501.c | dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS)); |
dev | 353 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 354 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 358 | drivers/net/3c501.c | dev_tint(dev); |
dev | 368 | drivers/net/3c501.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 371 | drivers/net/3c501.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 403 | drivers/net/3c501.c | printk("%s: burped during tx load.\n", dev->name); |
dev | 407 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 422 | drivers/net/3c501.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 427 | drivers/net/3c501.c | if (dev == NULL || dev->irq != irq) { |
dev | 432 | drivers/net/3c501.c | ioaddr = dev->base_addr; |
dev | 433 | drivers/net/3c501.c | lp = (struct net_local *)dev->priv; |
dev | 437 | drivers/net/3c501.c | printk("%s: el_interrupt() aux=%#02x", dev->name, axsr); |
dev | 438 | drivers/net/3c501.c | if (dev->interrupt) |
dev | 439 | drivers/net/3c501.c | printk("%s: Reentering the interrupt driver!\n", dev->name); |
dev | 440 | drivers/net/3c501.c | dev->interrupt = 1; |
dev | 444 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 462 | drivers/net/3c501.c | " gp=%03x rp=%03x.\n", dev->name, txsr, axsr, |
dev | 464 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 472 | drivers/net/3c501.c | dev->name); |
dev | 485 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 498 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 524 | drivers/net/3c501.c | el_receive(dev); |
dev | 528 | drivers/net/3c501.c | dev->name, rxsr); |
dev | 529 | drivers/net/3c501.c | el_reset(dev); |
dev | 542 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 550 | drivers/net/3c501.c | el_receive(struct device *dev) |
dev | 552 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 553 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 564 | drivers/net/3c501.c | printk("%s: bogus packet, length=%d\n", dev->name, pkt_len); |
dev | 581 | drivers/net/3c501.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 586 | drivers/net/3c501.c | skb->dev = dev; |
dev | 595 | drivers/net/3c501.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 603 | drivers/net/3c501.c | el_reset(struct device *dev) |
dev | 605 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 614 | drivers/net/3c501.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 623 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 624 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 629 | drivers/net/3c501.c | el1_close(struct device *dev) |
dev | 631 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 634 | drivers/net/3c501.c | printk("%s: Shutting down ethercard at %#x.\n", dev->name, ioaddr); |
dev | 636 | drivers/net/3c501.c | dev->tbusy = 1; |
dev | 637 | drivers/net/3c501.c | dev->start = 0; |
dev | 640 | drivers/net/3c501.c | free_irq(dev->irq); |
dev | 642 | drivers/net/3c501.c | irq2dev_map[dev->irq] = 0; |
dev | 649 | drivers/net/3c501.c | el1_get_stats(struct device *dev) |
dev | 651 | drivers/net/3c501.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 662 | drivers/net/3c501.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 664 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 41 | drivers/net/3c503.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 44 | drivers/net/3c503.c | int el2_probe(struct device *dev); |
dev | 45 | drivers/net/3c503.c | int el2_pio_probe(struct device *dev); |
dev | 46 | drivers/net/3c503.c | int el2_probe1(struct device *dev, int ioaddr); |
dev | 63 | drivers/net/3c503.c | static int el2_open(struct device *dev); |
dev | 64 | drivers/net/3c503.c | static int el2_close(struct device *dev); |
dev | 65 | drivers/net/3c503.c | static void el2_reset_8390(struct device *dev); |
dev | 66 | drivers/net/3c503.c | static void el2_init_card(struct device *dev); |
dev | 67 | drivers/net/3c503.c | static void el2_block_output(struct device *dev, int count, |
dev | 69 | drivers/net/3c503.c | static int el2_block_input(struct device *dev, int count, char *buf, |
dev | 81 | drivers/net/3c503.c | el2_probe(struct device *dev) |
dev | 84 | drivers/net/3c503.c | int base_addr = dev->base_addr; |
dev | 87 | drivers/net/3c503.c | return el2_probe1(dev, base_addr); |
dev | 102 | drivers/net/3c503.c | if (el2_probe1(dev, netcard_portlist[i]) == 0) |
dev | 106 | drivers/net/3c503.c | return el2_pio_probe(dev); |
dev | 116 | drivers/net/3c503.c | el2_pio_probe(struct device *dev) |
dev | 119 | drivers/net/3c503.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 122 | drivers/net/3c503.c | return el2_probe1(dev, base_addr); |
dev | 130 | drivers/net/3c503.c | if (el2_probe1(dev, ioaddr) == 0) |
dev | 142 | drivers/net/3c503.c | el2_probe1(struct device *dev, int ioaddr) |
dev | 177 | drivers/net/3c503.c | if (dev == NULL) |
dev | 178 | drivers/net/3c503.c | dev = init_etherdev(0, sizeof(struct ei_device), 0); |
dev | 183 | drivers/net/3c503.c | dev->base_addr = ioaddr; |
dev | 184 | drivers/net/3c503.c | ethdev_init(dev); |
dev | 186 | drivers/net/3c503.c | printk("%s: 3c503 at %#3x,", dev->name, ioaddr); |
dev | 190 | drivers/net/3c503.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 206 | drivers/net/3c503.c | ei_status.interface_num = dev->mem_end & 0xf; |
dev | 210 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 212 | drivers/net/3c503.c | dev->mem_start = ((membase_reg & 0xc0) ? 0xD8000 : 0xC8000) + |
dev | 219 | drivers/net/3c503.c | int *mem_base = (int *)dev->mem_start; |
dev | 227 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 238 | drivers/net/3c503.c | dev->mem_end = dev->rmem_end = dev->mem_start + EL2_MEMSIZE; |
dev | 239 | drivers/net/3c503.c | dev->rmem_start = TX_PAGES*256 + dev->mem_start; |
dev | 251 | drivers/net/3c503.c | if (dev->irq == 2) |
dev | 252 | drivers/net/3c503.c | dev->irq = 9; |
dev | 253 | drivers/net/3c503.c | else if (dev->irq > 5 && dev->irq != 9) { |
dev | 255 | drivers/net/3c503.c | dev->irq); |
dev | 256 | drivers/net/3c503.c | dev->irq = 0; |
dev | 259 | drivers/net/3c503.c | ei_status.saved_irq = dev->irq; |
dev | 261 | drivers/net/3c503.c | dev->start = 0; |
dev | 262 | drivers/net/3c503.c | dev->open = &el2_open; |
dev | 263 | drivers/net/3c503.c | dev->stop = &el2_close; |
dev | 265 | drivers/net/3c503.c | if (dev->mem_start) |
dev | 267 | drivers/net/3c503.c | dev->name, ei_status.name, dev->mem_start, dev->mem_end-1); |
dev | 270 | drivers/net/3c503.c | dev->name, ei_status.name); |
dev | 279 | drivers/net/3c503.c | el2_open(struct device *dev) |
dev | 282 | drivers/net/3c503.c | if (dev->irq < 2) { |
dev | 294 | drivers/net/3c503.c | && request_irq (dev->irq = *irqp, &ei_interrupt, 0, "3c503") == 0) |
dev | 303 | drivers/net/3c503.c | if (request_irq(dev->irq, &ei_interrupt, 0, "3c503")) { |
dev | 307 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 308 | drivers/net/3c503.c | return ei_open(dev); |
dev | 312 | drivers/net/3c503.c | el2_close(struct device *dev) |
dev | 314 | drivers/net/3c503.c | free_irq(dev->irq); |
dev | 315 | drivers/net/3c503.c | dev->irq = ei_status.saved_irq; |
dev | 316 | drivers/net/3c503.c | irq2dev_map[dev->irq] = NULL; |
dev | 319 | drivers/net/3c503.c | NS8390_init(dev, 0); |
dev | 320 | drivers/net/3c503.c | dev->start = 0; |
dev | 330 | drivers/net/3c503.c | el2_reset_8390(struct device *dev) |
dev | 333 | drivers/net/3c503.c | printk("%s: Resetting the 3c503 board...", dev->name); |
dev | 340 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 346 | drivers/net/3c503.c | el2_init_card(struct device *dev) |
dev | 361 | drivers/net/3c503.c | outb_p(0x00, dev->base_addr + EN0_IMR); |
dev | 366 | drivers/net/3c503.c | outb_p((0x04 << (dev->irq == 9 ? 2 : dev->irq)), E33G_IDCFR); |
dev | 376 | drivers/net/3c503.c | el2_block_output(struct device *dev, int count, |
dev | 385 | drivers/net/3c503.c | if (dev->mem_start) { /* Shared memory transfer */ |
dev | 386 | drivers/net/3c503.c | void *dest_addr = (void *)(dev->mem_start + |
dev | 391 | drivers/net/3c503.c | dev->name, (int) dest_addr); |
dev | 409 | drivers/net/3c503.c | dev->name, i, count, boguscount); |
dev | 420 | drivers/net/3c503.c | el2_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 423 | drivers/net/3c503.c | int end_of_ring = dev->rmem_end; |
dev | 427 | drivers/net/3c503.c | if (dev->mem_start) { /* Use the shared memory. */ |
dev | 429 | drivers/net/3c503.c | if (dev->mem_start + ring_offset + count > end_of_ring) { |
dev | 431 | drivers/net/3c503.c | int semi_count = end_of_ring - (dev->mem_start + ring_offset); |
dev | 432 | drivers/net/3c503.c | memcpy(buf, (char *)dev->mem_start + ring_offset, semi_count); |
dev | 434 | drivers/net/3c503.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 435 | drivers/net/3c503.c | return dev->rmem_start + count; |
dev | 437 | drivers/net/3c503.c | memcpy(buf, (char *)dev->mem_start + ring_offset, count); |
dev | 453 | drivers/net/3c503.c | dev->name, i, count, boguscount); |
dev | 6 | drivers/net/3c503.h | #define EL2H (dev->base_addr + 0x400) |
dev | 7 | drivers/net/3c503.h | #define EL2L (dev->base_addr) |
dev | 263 | drivers/net/3c505.c | adapter_reset (struct device * dev) |
dev | 266 | drivers/net/3c505.c | unsigned char orig_hcr=inb_control(dev->base_addr); |
dev | 268 | drivers/net/3c505.c | elp_device * adapter=dev->priv; |
dev | 270 | drivers/net/3c505.c | outb_control(0,dev->base_addr); |
dev | 272 | drivers/net/3c505.c | if (inb_status(dev->base_addr)&ACRF) { |
dev | 274 | drivers/net/3c505.c | inb_command(dev->base_addr); |
dev | 276 | drivers/net/3c505.c | while ((jiffies<=timeout) && !(inb_status(dev->base_addr)&ACRF)) |
dev | 278 | drivers/net/3c505.c | } while (inb_status(dev->base_addr)&ACRF); |
dev | 279 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_NAK); |
dev | 282 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|ATTN|DIR,dev->base_addr); |
dev | 286 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~ATTN,dev->base_addr); |
dev | 290 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|FLSH,dev->base_addr); |
dev | 294 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~FLSH,dev->base_addr); |
dev | 299 | drivers/net/3c505.c | outb_control(orig_hcr, dev->base_addr); |
dev | 300 | drivers/net/3c505.c | if (!start_receive(dev, &adapter->tx_pcb)) |
dev | 301 | drivers/net/3c505.c | printk("%s: start receive command failed \n", dev->name); |
dev | 320 | drivers/net/3c505.c | send_pcb (struct device * dev, pcb_struct * pcb) |
dev | 331 | drivers/net/3c505.c | set_hsf(dev->base_addr,0); |
dev | 332 | drivers/net/3c505.c | if ((cont = WAIT_HCRE(dev->base_addr,5))) { |
dev | 335 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~DIR,dev->base_addr); |
dev | 336 | drivers/net/3c505.c | outb_command(pcb->command, dev->base_addr); |
dev | 338 | drivers/net/3c505.c | cont = WAIT_HCRE(dev->base_addr,5); |
dev | 342 | drivers/net/3c505.c | outb_command(pcb->length, dev->base_addr); |
dev | 343 | drivers/net/3c505.c | cont = WAIT_HCRE(dev->base_addr,5); |
dev | 348 | drivers/net/3c505.c | outb_command(pcb->data.raw[i], dev->base_addr); |
dev | 349 | drivers/net/3c505.c | cont = wait_fast_hcre(dev->base_addr,20000,__LINE__); |
dev | 356 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_END); |
dev | 357 | drivers/net/3c505.c | outb_command(2+pcb->length, dev->base_addr); |
dev | 361 | drivers/net/3c505.c | i = GET_ASF(dev->base_addr); |
dev | 371 | drivers/net/3c505.c | printk("%s: PCB send was NAKed\n", dev->name); |
dev | 373 | drivers/net/3c505.c | printk("%s: timeout after sending PCB\n", dev->name); |
dev | 376 | drivers/net/3c505.c | printk("%s: timeout in middle of sending PCB\n", dev->name); |
dev | 378 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 396 | drivers/net/3c505.c | receive_pcb (struct device * dev, pcb_struct * pcb) |
dev | 404 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 406 | drivers/net/3c505.c | set_hsf(dev->base_addr,0); |
dev | 410 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr))&ACRF) == 0 && jiffies < timeout) |
dev | 417 | drivers/net/3c505.c | pcb->command = inb_command(dev->base_addr); |
dev | 421 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && jiffies < timeout) |
dev | 427 | drivers/net/3c505.c | pcb->length = inb_command(dev->base_addr); |
dev | 431 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 440 | drivers/net/3c505.c | while (((stat = get_status(dev->base_addr))&ACRF) == 0 && j++ < 20000) |
dev | 442 | drivers/net/3c505.c | pcb->data.raw[i++] = inb_command(dev->base_addr); |
dev | 458 | drivers/net/3c505.c | printk("%s: mangled PCB received\n", dev->name); |
dev | 459 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_NAK); |
dev | 463 | drivers/net/3c505.c | set_hsf(dev->base_addr,HSF_PCB_ACK); |
dev | 469 | drivers/net/3c505.c | adapter_hard_reset (struct device * dev) |
dev | 473 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 477 | drivers/net/3c505.c | dev->name); |
dev | 481 | drivers/net/3c505.c | outb_control(ATTN|FLSH, dev->base_addr); |
dev | 492 | drivers/net/3c505.c | outb_control(0, dev->base_addr); |
dev | 504 | drivers/net/3c505.c | if (GET_ASF(dev->base_addr) != ASF_PCB_END) |
dev | 516 | drivers/net/3c505.c | start_receive (struct device * dev, pcb_struct * tx_pcb) |
dev | 518 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 522 | drivers/net/3c505.c | printk("%s: restarting receiver\n", dev->name); |
dev | 529 | drivers/net/3c505.c | return send_pcb(dev, tx_pcb); |
dev | 542 | drivers/net/3c505.c | receive_packet (struct device * dev, int len) |
dev | 551 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 552 | drivers/net/3c505.c | adapter=dev->priv; |
dev | 569 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|DIR, dev->base_addr); |
dev | 577 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) |
dev | 585 | drivers/net/3c505.c | inw_data(dev->base_addr); |
dev | 591 | drivers/net/3c505.c | skb->dev = dev; |
dev | 599 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) |
dev | 609 | drivers/net/3c505.c | *ptr = inw_data(dev->base_addr); |
dev | 614 | drivers/net/3c505.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 618 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)&~DIR, dev->base_addr); |
dev | 633 | drivers/net/3c505.c | struct device *dev; |
dev | 642 | drivers/net/3c505.c | dev = irq2dev_map[irq]; |
dev | 644 | drivers/net/3c505.c | if (dev == NULL) { |
dev | 649 | drivers/net/3c505.c | adapter = (elp_device *) dev->priv; |
dev | 653 | drivers/net/3c505.c | if (dev->interrupt) |
dev | 655 | drivers/net/3c505.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 656 | drivers/net/3c505.c | dev->interrupt = 1; |
dev | 667 | drivers/net/3c505.c | while ((inb_status(dev->base_addr)&ACRF) != 0 && jiffies < timeout) { |
dev | 669 | drivers/net/3c505.c | if (receive_pcb(dev, &adapter->irx_pcb)) { |
dev | 678 | drivers/net/3c505.c | if (dev->start == 0) |
dev | 682 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr)|DIR, |
dev | 683 | drivers/net/3c505.c | dev->base_addr); |
dev | 687 | drivers/net/3c505.c | printk("%s: interrupt - packet not received correctly\n", dev->name); |
dev | 692 | drivers/net/3c505.c | printk("%s: interrupt - packet received of length %i (%i)\n", dev->name, len, dlen); |
dev | 695 | drivers/net/3c505.c | receive_packet(dev, dlen); |
dev | 698 | drivers/net/3c505.c | printk("%s: packet received\n", dev->name); |
dev | 700 | drivers/net/3c505.c | if (dev->start && !start_receive(dev, &adapter->itx_pcb)) |
dev | 702 | drivers/net/3c505.c | printk("%s: interrupt - failed to send receive start PCB\n", dev->name); |
dev | 704 | drivers/net/3c505.c | printk("%s: receive procedure complete\n", dev->name); |
dev | 714 | drivers/net/3c505.c | printk("%s: interrupt - configure response received\n", dev->name); |
dev | 723 | drivers/net/3c505.c | printk("%s: Adapter memory configuration %s.\n",dev->name, |
dev | 733 | drivers/net/3c505.c | printk("%s: Multicast address list loading %s.\n",dev->name, |
dev | 743 | drivers/net/3c505.c | printk("%s: Ethernet address setting %s.\n",dev->name, |
dev | 759 | drivers/net/3c505.c | printk("%s: interrupt - statistics response received\n", dev->name); |
dev | 767 | drivers/net/3c505.c | printk("%s: interrupt - packet sent\n", dev->name); |
dev | 768 | drivers/net/3c505.c | if (dev->start == 0) |
dev | 773 | drivers/net/3c505.c | dev->name, adapter->irx_pcb.data.xmit_resp.c_stat); |
dev | 774 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 782 | drivers/net/3c505.c | printk("%s: unknown PCB received - %2.2x\n", dev->name, adapter->irx_pcb.command); |
dev | 786 | drivers/net/3c505.c | printk("%s: failed to read PCB on interrupt\n", dev->name); |
dev | 787 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 794 | drivers/net/3c505.c | dev->interrupt = 0; |
dev | 805 | drivers/net/3c505.c | elp_open (struct device *dev) |
dev | 809 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 811 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 814 | drivers/net/3c505.c | printk("%s: request to open device\n", dev->name); |
dev | 820 | drivers/net/3c505.c | printk("%s: Opening a non-existent physical device\n", dev->name); |
dev | 827 | drivers/net/3c505.c | outb_control(0x00, dev->base_addr); |
dev | 832 | drivers/net/3c505.c | inb_command(dev->base_addr); |
dev | 833 | drivers/net/3c505.c | adapter_reset(dev); |
dev | 838 | drivers/net/3c505.c | dev->interrupt = 0; |
dev | 843 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 848 | drivers/net/3c505.c | irq2dev_map[dev->irq] = dev; |
dev | 853 | drivers/net/3c505.c | if (request_irq(dev->irq, &elp_interrupt, 0, "3c505")) { |
dev | 854 | drivers/net/3c505.c | irq2dev_map[dev->irq] = NULL; |
dev | 861 | drivers/net/3c505.c | outb_control(CMDE, dev->base_addr); |
dev | 866 | drivers/net/3c505.c | dev->start = 1; |
dev | 872 | drivers/net/3c505.c | printk("%s: sending 3c505 memory configuration command\n", dev->name); |
dev | 882 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 883 | drivers/net/3c505.c | printk("%s: couldn't send memory configuration command\n", dev->name); |
dev | 897 | drivers/net/3c505.c | printk("%s: sending 82586 configure command\n", dev->name); |
dev | 902 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 903 | drivers/net/3c505.c | printk("%s: couldn't send 82586 configure command\n", dev->name); |
dev | 915 | drivers/net/3c505.c | if (!start_receive(dev, &adapter->tx_pcb)) |
dev | 916 | drivers/net/3c505.c | printk("%s: start receive command failed \n", dev->name); |
dev | 918 | drivers/net/3c505.c | printk("%s: start receive command sent\n", dev->name); |
dev | 931 | drivers/net/3c505.c | send_packet (struct device * dev, unsigned char * ptr, int len) |
dev | 942 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 945 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 959 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) { |
dev | 968 | drivers/net/3c505.c | while (((inb_status(dev->base_addr)&HRDY) == 0) |
dev | 974 | drivers/net/3c505.c | dev->name,filename,__LINE__, i, nlen/2); |
dev | 978 | drivers/net/3c505.c | outw_data(*(short *)ptr, dev->base_addr); |
dev | 994 | drivers/net/3c505.c | elp_start_xmit (struct sk_buff *skb, struct device *dev) |
dev | 996 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1002 | drivers/net/3c505.c | dev_tint(dev); |
dev | 1013 | drivers/net/3c505.c | printk("%s: request to send packet of length %d\n", dev->name, (int)skb->len); |
dev | 1018 | drivers/net/3c505.c | if (dev->tbusy) { |
dev | 1019 | drivers/net/3c505.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1023 | drivers/net/3c505.c | printk("%s: transmit timed out, not resetting adapter\n", dev->name); |
dev | 1024 | drivers/net/3c505.c | if (((stat=inb_status(dev->base_addr))&ACRF) != 0) |
dev | 1025 | drivers/net/3c505.c | printk("%s: hmmm...seemed to have missed an interrupt!\n", dev->name); |
dev | 1026 | drivers/net/3c505.c | printk("%s: status %#02x\n", dev->name, stat); |
dev | 1027 | drivers/net/3c505.c | dev->trans_start = jiffies; |
dev | 1028 | drivers/net/3c505.c | dev->tbusy = 0; |
dev | 1034 | drivers/net/3c505.c | if (!send_packet(dev, skb->data, skb->len)) { |
dev | 1035 | drivers/net/3c505.c | printk("%s: send packet PCB failed\n", dev->name); |
dev | 1040 | drivers/net/3c505.c | printk("%s: packet of length %d sent\n", dev->name, (int)skb->len); |
dev | 1046 | drivers/net/3c505.c | dev->trans_start = jiffies; |
dev | 1051 | drivers/net/3c505.c | dev->tbusy = 1; |
dev | 1068 | drivers/net/3c505.c | elp_get_stats (struct device *dev) |
dev | 1070 | drivers/net/3c505.c | elp_device *adapter = (elp_device *) dev->priv; |
dev | 1073 | drivers/net/3c505.c | printk("%s: request for stats\n", dev->name); |
dev | 1077 | drivers/net/3c505.c | if (!dev->start) |
dev | 1084 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1085 | drivers/net/3c505.c | printk("%s: couldn't send get statistics command\n", dev->name); |
dev | 1107 | drivers/net/3c505.c | elp_close (struct device *dev) |
dev | 1111 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1112 | drivers/net/3c505.c | adapter = dev->priv; |
dev | 1116 | drivers/net/3c505.c | printk("%s: request to close device\n", dev->name); |
dev | 1122 | drivers/net/3c505.c | (void) elp_get_stats(dev); |
dev | 1127 | drivers/net/3c505.c | outb_control(0x00, dev->base_addr); |
dev | 1132 | drivers/net/3c505.c | dev->tbusy = 1; |
dev | 1137 | drivers/net/3c505.c | dev->start = 0; |
dev | 1142 | drivers/net/3c505.c | free_irq(dev->irq); |
dev | 1147 | drivers/net/3c505.c | irq2dev_map[dev->irq] = 0; |
dev | 1163 | drivers/net/3c505.c | elp_set_mc_list (struct device *dev, int num_addrs, void *addrs) |
dev | 1165 | drivers/net/3c505.c | elp_device *adapter = (elp_device *) dev->priv; |
dev | 1169 | drivers/net/3c505.c | printk("%s: request to set multicast list\n", dev->name); |
dev | 1179 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1180 | drivers/net/3c505.c | printk("%s: couldn't send set_multicast command\n", dev->name); |
dev | 1200 | drivers/net/3c505.c | printk("%s: sending 82586 configure command\n", dev->name); |
dev | 1204 | drivers/net/3c505.c | if (!send_pcb(dev, &adapter->tx_pcb)) |
dev | 1205 | drivers/net/3c505.c | printk("%s: couldn't send 82586 configure command\n", dev->name); |
dev | 1222 | drivers/net/3c505.c | elp_init (struct device *dev) |
dev | 1226 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1231 | drivers/net/3c505.c | dev->open = elp_open; /* local */ |
dev | 1232 | drivers/net/3c505.c | dev->stop = elp_close; /* local */ |
dev | 1233 | drivers/net/3c505.c | dev->get_stats = elp_get_stats; /* local */ |
dev | 1234 | drivers/net/3c505.c | dev->hard_start_xmit = elp_start_xmit; /* local */ |
dev | 1235 | drivers/net/3c505.c | dev->set_multicast_list = elp_set_mc_list; /* local */ |
dev | 1238 | drivers/net/3c505.c | ether_setup(dev); |
dev | 1243 | drivers/net/3c505.c | adapter = (elp_device *)(dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL)); |
dev | 1250 | drivers/net/3c505.c | dev->mem_start = dev->mem_end = dev->rmem_end = dev->rmem_start = 0; |
dev | 1260 | drivers/net/3c505.c | elp_sense (struct device * dev) |
dev | 1263 | drivers/net/3c505.c | int addr=dev->base_addr; |
dev | 1264 | drivers/net/3c505.c | char *name=dev->name; |
dev | 1319 | drivers/net/3c505.c | adapter_hard_reset(dev); |
dev | 1330 | drivers/net/3c505.c | elp_autodetect (struct device * dev) |
dev | 1336 | drivers/net/3c505.c | if (dev->base_addr != 0) { /* dev->base_addr == 0 ==> plain autodetect */ |
dev | 1337 | drivers/net/3c505.c | if (elp_sense(dev) == 0) |
dev | 1338 | drivers/net/3c505.c | return dev->base_addr; |
dev | 1339 | drivers/net/3c505.c | } else while ( (dev->base_addr=addr_list[idx++]) ) { |
dev | 1340 | drivers/net/3c505.c | if (elp_sense(dev) == 0) |
dev | 1341 | drivers/net/3c505.c | return dev->base_addr; |
dev | 1346 | drivers/net/3c505.c | printk(couldnot_msg, dev->name); |
dev | 1358 | drivers/net/3c505.c | elplus_probe (struct device *dev) |
dev | 1363 | drivers/net/3c505.c | CHECK_NULL(dev); |
dev | 1369 | drivers/net/3c505.c | dev->base_addr = elp_autodetect(dev); |
dev | 1370 | drivers/net/3c505.c | if ( !(dev->base_addr) ) |
dev | 1377 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr) | CMDE, dev->base_addr); |
dev | 1386 | drivers/net/3c505.c | if (!send_pcb (dev, &adapter.tx_pcb) || |
dev | 1387 | drivers/net/3c505.c | !receive_pcb(dev, &adapter.rx_pcb) || |
dev | 1390 | drivers/net/3c505.c | printk("%s: not responding to first PCB\n", dev->name); |
dev | 1394 | drivers/net/3c505.c | if (dev->irq) { /* Is there a preset IRQ? */ |
dev | 1395 | drivers/net/3c505.c | if (dev->irq != autoirq_report(0)) { |
dev | 1396 | drivers/net/3c505.c | printk("%s: Detected IRQ doesn't match user-defined one.\n",dev->name); |
dev | 1401 | drivers/net/3c505.c | dev->irq=autoirq_report(0); |
dev | 1402 | drivers/net/3c505.c | switch (dev->irq) { /* Legal, sane? */ |
dev | 1404 | drivers/net/3c505.c | printk("%s: No IRQ reported by autoirq_report().\n",dev->name); |
dev | 1405 | drivers/net/3c505.c | printk("%s: Check the jumpers of your 3c505 board.\n",dev->name); |
dev | 1412 | drivers/net/3c505.c | dev->name, dev->irq); |
dev | 1419 | drivers/net/3c505.c | outb_control(inb_control(dev->base_addr) & ~CMDE, dev->base_addr); |
dev | 1425 | drivers/net/3c505.c | dev->dev_addr[i] = adapter.rx_pcb.data.eth_addr[i]; |
dev | 1432 | drivers/net/3c505.c | dev->name, dev->base_addr, dev->irq, |
dev | 1433 | drivers/net/3c505.c | dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], |
dev | 1434 | drivers/net/3c505.c | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); |
dev | 1439 | drivers/net/3c505.c | request_region(dev->base_addr,16,"3c505"); |
dev | 1444 | drivers/net/3c505.c | elp_init(dev); |
dev | 62 | drivers/net/3c507.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 164 | drivers/net/3c507.c | #define SCB_BASE ((unsigned)64*1024 - (dev->mem_end - dev->mem_start)) |
dev | 199 | drivers/net/3c507.c | #define RX_BUF_END (dev->mem_end - dev->mem_start) |
dev | 280 | drivers/net/3c507.c | extern int el16_probe(struct device *dev); /* Called from Space.c */ |
dev | 282 | drivers/net/3c507.c | static int el16_probe1(struct device *dev, int ioaddr); |
dev | 283 | drivers/net/3c507.c | static int el16_open(struct device *dev); |
dev | 284 | drivers/net/3c507.c | static int el16_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 286 | drivers/net/3c507.c | static void el16_rx(struct device *dev); |
dev | 287 | drivers/net/3c507.c | static int el16_close(struct device *dev); |
dev | 288 | drivers/net/3c507.c | static struct enet_statistics *el16_get_stats(struct device *dev); |
dev | 290 | drivers/net/3c507.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 291 | drivers/net/3c507.c | void init_82586_mem(struct device *dev); |
dev | 306 | drivers/net/3c507.c | el16_probe(struct device *dev) |
dev | 308 | drivers/net/3c507.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 312 | drivers/net/3c507.c | return el16_probe1(dev, base_addr); |
dev | 320 | drivers/net/3c507.c | if (el16_probe1(dev, ioaddr) == 0) |
dev | 327 | drivers/net/3c507.c | int el16_probe1(struct device *dev, int ioaddr) |
dev | 353 | drivers/net/3c507.c | if (dev == NULL) |
dev | 354 | drivers/net/3c507.c | dev = init_etherdev(0, sizeof(struct net_local), 0); |
dev | 359 | drivers/net/3c507.c | printk("%s: 3c507 at %#x,", dev->name, ioaddr); |
dev | 374 | drivers/net/3c507.c | dev->base_addr = ioaddr; |
dev | 378 | drivers/net/3c507.c | dev->dev_addr[i] = inb(ioaddr + i); |
dev | 379 | drivers/net/3c507.c | printk(" %02x", dev->dev_addr[i]); |
dev | 382 | drivers/net/3c507.c | if ((dev->mem_start & 0xf) > 0) |
dev | 383 | drivers/net/3c507.c | net_debug = dev->mem_start & 7; |
dev | 386 | drivers/net/3c507.c | dev->mem_start = MEM_BASE; |
dev | 387 | drivers/net/3c507.c | dev->mem_end = dev->mem_start + 0x10000; |
dev | 401 | drivers/net/3c507.c | dev->mem_start = base; |
dev | 402 | drivers/net/3c507.c | dev->mem_end = base + size; |
dev | 406 | drivers/net/3c507.c | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; |
dev | 407 | drivers/net/3c507.c | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; |
dev | 409 | drivers/net/3c507.c | printk(", IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->irq, |
dev | 410 | drivers/net/3c507.c | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); |
dev | 416 | drivers/net/3c507.c | if (dev->priv == NULL) |
dev | 417 | drivers/net/3c507.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 418 | drivers/net/3c507.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 420 | drivers/net/3c507.c | dev->open = el16_open; |
dev | 421 | drivers/net/3c507.c | dev->stop = el16_close; |
dev | 422 | drivers/net/3c507.c | dev->hard_start_xmit = el16_send_packet; |
dev | 423 | drivers/net/3c507.c | dev->get_stats = el16_get_stats; |
dev | 425 | drivers/net/3c507.c | ether_setup(dev); /* Generic ethernet behaviour */ |
dev | 433 | drivers/net/3c507.c | el16_open(struct device *dev) |
dev | 435 | drivers/net/3c507.c | irq2dev_map[dev->irq] = dev; |
dev | 438 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 440 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 441 | drivers/net/3c507.c | dev->interrupt = 0; |
dev | 442 | drivers/net/3c507.c | dev->start = 1; |
dev | 447 | drivers/net/3c507.c | el16_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 449 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 450 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 451 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 453 | drivers/net/3c507.c | if (dev->tbusy) { |
dev | 456 | drivers/net/3c507.c | int tickssofar = jiffies - dev->trans_start; |
dev | 460 | drivers/net/3c507.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 467 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 475 | drivers/net/3c507.c | dev->tbusy=0; |
dev | 476 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 483 | drivers/net/3c507.c | dev_tint(dev); |
dev | 488 | drivers/net/3c507.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 489 | drivers/net/3c507.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 496 | drivers/net/3c507.c | hardware_send_packet(dev, buf, length); |
dev | 497 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 514 | drivers/net/3c507.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 520 | drivers/net/3c507.c | if (dev == NULL) { |
dev | 524 | drivers/net/3c507.c | dev->interrupt = 1; |
dev | 526 | drivers/net/3c507.c | ioaddr = dev->base_addr; |
dev | 527 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
dev | 528 | drivers/net/3c507.c | shmem = ((ushort*)dev->mem_start); |
dev | 533 | drivers/net/3c507.c | printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); |
dev | 550 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 571 | drivers/net/3c507.c | el16_rx(dev); |
dev | 577 | drivers/net/3c507.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 580 | drivers/net/3c507.c | dev->name, status); |
dev | 587 | drivers/net/3c507.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 593 | drivers/net/3c507.c | dev->name, status); |
dev | 594 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 612 | drivers/net/3c507.c | el16_close(struct device *dev) |
dev | 614 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 615 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 617 | drivers/net/3c507.c | dev->tbusy = 1; |
dev | 618 | drivers/net/3c507.c | dev->start = 0; |
dev | 630 | drivers/net/3c507.c | irq2dev_map[dev->irq] = 0; |
dev | 640 | drivers/net/3c507.c | el16_get_stats(struct device *dev) |
dev | 642 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 651 | drivers/net/3c507.c | init_rx_bufs(struct device *dev) |
dev | 653 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 662 | drivers/net/3c507.c | write_ptr = (unsigned short *)(dev->mem_start + cur_rxbuf); |
dev | 690 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
dev | 697 | drivers/net/3c507.c | init_82586_mem(struct device *dev) |
dev | 699 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 700 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 701 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 712 | drivers/net/3c507.c | memcpy((void*)dev->mem_end-10, init_words, 10); |
dev | 715 | drivers/net/3c507.c | memcpy((char*)dev->mem_start, init_words + 5, sizeof(init_words) - 10); |
dev | 718 | drivers/net/3c507.c | memcpy((char*)dev->mem_start+SA_OFFSET, dev->dev_addr, |
dev | 719 | drivers/net/3c507.c | sizeof(dev->dev_addr)); |
dev | 725 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 739 | drivers/net/3c507.c | "cmd %04x.\n", dev->name, |
dev | 750 | drivers/net/3c507.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 756 | drivers/net/3c507.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 758 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 759 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 761 | drivers/net/3c507.c | ushort *write_ptr = (ushort *)(dev->mem_start + tx_block); |
dev | 784 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
dev | 794 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
dev | 798 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 802 | drivers/net/3c507.c | el16_rx(struct device *dev) |
dev | 804 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 805 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 812 | drivers/net/3c507.c | ushort *read_frame = (short *)(dev->mem_start + rx_head); |
dev | 816 | drivers/net/3c507.c | ushort *data_frame = (short *)(dev->mem_start + data_buffer_addr); |
dev | 822 | drivers/net/3c507.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 840 | drivers/net/3c507.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 846 | drivers/net/3c507.c | skb->dev = dev; |
dev | 851 | drivers/net/3c507.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 860 | 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 | 111 | drivers/net/3c509.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 116 | drivers/net/3c509.c | int el3_probe(struct device *dev) |
dev | 120 | drivers/net/3c509.c | short *phys_addr = (short *)dev->dev_addr; |
dev | 206 | drivers/net/3c509.c | if (dev->base_addr != 0 |
dev | 207 | drivers/net/3c509.c | && dev->base_addr != (unsigned short)ioaddr) { |
dev | 224 | drivers/net/3c509.c | dev->base_addr = ioaddr; |
dev | 225 | drivers/net/3c509.c | dev->irq = irq; |
dev | 226 | drivers/net/3c509.c | dev->if_port = if_port; |
dev | 227 | drivers/net/3c509.c | request_region(dev->base_addr, 16,"3c509"); |
dev | 232 | drivers/net/3c509.c | dev->name, dev->base_addr, current_tag, if_names[dev->if_port]); |
dev | 237 | drivers/net/3c509.c | printk(" %2.2x", dev->dev_addr[i]); |
dev | 238 | drivers/net/3c509.c | printk(", IRQ %d.\n", dev->irq); |
dev | 241 | drivers/net/3c509.c | dev->priv = kmalloc(sizeof(struct el3_private), GFP_KERNEL); |
dev | 242 | drivers/net/3c509.c | memset(dev->priv, 0, sizeof(struct el3_private)); |
dev | 248 | drivers/net/3c509.c | dev->open = &el3_open; |
dev | 249 | drivers/net/3c509.c | dev->hard_start_xmit = &el3_start_xmit; |
dev | 250 | drivers/net/3c509.c | dev->stop = &el3_close; |
dev | 251 | drivers/net/3c509.c | dev->get_stats = &el3_get_stats; |
dev | 253 | drivers/net/3c509.c | dev->set_multicast_list = &set_multicast_list; |
dev | 257 | drivers/net/3c509.c | ether_setup(dev); |
dev | 300 | drivers/net/3c509.c | el3_open(struct device *dev) |
dev | 302 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 309 | drivers/net/3c509.c | if (request_irq(dev->irq, &el3_interrupt, 0, "3c509")) { |
dev | 315 | drivers/net/3c509.c | printk("%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, |
dev | 316 | drivers/net/3c509.c | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); |
dev | 321 | drivers/net/3c509.c | irq2dev_map[dev->irq] = dev; |
dev | 324 | drivers/net/3c509.c | outw((dev->irq << 12) | 0x0f00, ioaddr + WN0_IRQ); |
dev | 330 | drivers/net/3c509.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 332 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 335 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 356 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 357 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 358 | drivers/net/3c509.c | dev->start = 1; |
dev | 369 | drivers/net/3c509.c | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); |
dev | 378 | drivers/net/3c509.c | el3_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 380 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 381 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 384 | drivers/net/3c509.c | if (dev->tbusy) { |
dev | 385 | drivers/net/3c509.c | int tickssofar = jiffies - dev->trans_start; |
dev | 389 | drivers/net/3c509.c | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS)); |
dev | 390 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 394 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 398 | drivers/net/3c509.c | dev_tint(dev); |
dev | 407 | drivers/net/3c509.c | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); |
dev | 415 | drivers/net/3c509.c | " Tx %2.2x Rx %4.4x.\n", dev->name, status, |
dev | 427 | drivers/net/3c509.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 428 | drivers/net/3c509.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 436 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 438 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 465 | drivers/net/3c509.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 469 | drivers/net/3c509.c | if (dev == NULL) { |
dev | 474 | drivers/net/3c509.c | if (dev->interrupt) |
dev | 475 | drivers/net/3c509.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 476 | drivers/net/3c509.c | dev->interrupt = 1; |
dev | 478 | drivers/net/3c509.c | ioaddr = dev->base_addr; |
dev | 482 | drivers/net/3c509.c | printk("%s: interrupt, status %4.4x.\n", dev->name, status); |
dev | 487 | drivers/net/3c509.c | el3_rx(dev); |
dev | 494 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 498 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 502 | drivers/net/3c509.c | dev->name, status); |
dev | 513 | drivers/net/3c509.c | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, |
dev | 517 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 523 | drivers/net/3c509.c | el3_get_stats(struct device *dev) |
dev | 525 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 530 | drivers/net/3c509.c | update_stats(dev->base_addr, dev); |
dev | 540 | drivers/net/3c509.c | static void update_stats(int ioaddr, struct device *dev) |
dev | 542 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 569 | drivers/net/3c509.c | el3_rx(struct device *dev) |
dev | 571 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 572 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 599 | drivers/net/3c509.c | skb->dev = dev; |
dev | 606 | drivers/net/3c509.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 613 | drivers/net/3c509.c | dev->name, pkt_len); |
dev | 633 | drivers/net/3c509.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 635 | drivers/net/3c509.c | short ioaddr = dev->base_addr; |
dev | 640 | drivers/net/3c509.c | printk("%s: Setting Rx mode to %d addresses.\n", dev->name, num_addrs); |
dev | 654 | drivers/net/3c509.c | el3_close(struct device *dev) |
dev | 656 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 659 | drivers/net/3c509.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 661 | drivers/net/3c509.c | dev->tbusy = 1; |
dev | 662 | drivers/net/3c509.c | dev->start = 0; |
dev | 671 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 674 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 680 | drivers/net/3c509.c | free_irq(dev->irq); |
dev | 687 | drivers/net/3c509.c | irq2dev_map[dev->irq] = 0; |
dev | 689 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 95 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev); |
dev | 96 | drivers/net/8390.c | static void ei_receive(struct device *dev); |
dev | 97 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev); |
dev | 100 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 103 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 111 | drivers/net/8390.c | int ei_open(struct device *dev) |
dev | 113 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 116 | drivers/net/8390.c | printk("%s: Opening a non-existent physical device\n", dev->name); |
dev | 120 | drivers/net/8390.c | irq2dev_map[dev->irq] = dev; |
dev | 121 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 122 | drivers/net/8390.c | dev->start = 1; |
dev | 127 | drivers/net/8390.c | static int ei_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 129 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 130 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 139 | drivers/net/8390.c | if (dev->tbusy) { /* Do timeouts, just like the 8003 driver. */ |
dev | 141 | drivers/net/8390.c | int tickssofar = jiffies - dev->trans_start; |
dev | 146 | drivers/net/8390.c | if (dev->start == 0) { |
dev | 147 | drivers/net/8390.c | printk("%s: xmit on stopped card\n", dev->name); |
dev | 151 | drivers/net/8390.c | dev->name, txsr, isr); |
dev | 154 | drivers/net/8390.c | printk(KERN_DEBUG "%s: Possible IRQ conflict on IRQ%d?\n", dev->name, dev->irq); |
dev | 157 | drivers/net/8390.c | printk(KERN_DEBUG "%s: Possible network cable problem?\n", dev->name); |
dev | 162 | drivers/net/8390.c | ei_reset_8390(dev); |
dev | 163 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 164 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 171 | drivers/net/8390.c | dev_tint(dev); |
dev | 181 | drivers/net/8390.c | if (dev->interrupt) { |
dev | 182 | drivers/net/8390.c | printk("%s: Tx request while isr active.\n",dev->name); |
dev | 197 | drivers/net/8390.c | dev->name, ei_local->tx2, ei_local->lasttx, |
dev | 204 | drivers/net/8390.c | dev->name, ei_local->tx1, ei_local->lasttx, |
dev | 209 | drivers/net/8390.c | dev->name, dev->interrupt, ei_local->tx1, |
dev | 212 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 216 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, output_page); |
dev | 219 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, output_page); |
dev | 220 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 228 | drivers/net/8390.c | dev->tbusy = (ei_local->tx1 && ei_local->tx2); |
dev | 230 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, ei_local->tx_start_page); |
dev | 232 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, ei_local->tx_start_page); |
dev | 233 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 234 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 250 | drivers/net/8390.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 255 | drivers/net/8390.c | if (dev == NULL) { |
dev | 259 | drivers/net/8390.c | e8390_base = dev->base_addr; |
dev | 260 | drivers/net/8390.c | ei_local = (struct ei_device *) dev->priv; |
dev | 261 | drivers/net/8390.c | if (dev->interrupt || ei_local->irqlock) { |
dev | 266 | drivers/net/8390.c | dev->name, inb_p(e8390_base + EN0_ISR), |
dev | 271 | drivers/net/8390.c | dev->interrupt = 1; |
dev | 276 | drivers/net/8390.c | printk("%s: interrupt(isr=%#2.2x).\n", dev->name, |
dev | 282 | drivers/net/8390.c | if (dev->start == 0) { |
dev | 283 | drivers/net/8390.c | printk("%s: interrupt from stopped card\n", dev->name); |
dev | 288 | drivers/net/8390.c | ei_rx_overrun(dev); |
dev | 291 | drivers/net/8390.c | ei_receive(dev); |
dev | 295 | drivers/net/8390.c | ei_tx_intr(dev); |
dev | 320 | drivers/net/8390.c | dev->name, interrupts); |
dev | 323 | drivers/net/8390.c | printk("%s: unknown interrupt %#2x\n", dev->name, interrupts); |
dev | 327 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 333 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev) |
dev | 335 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 337 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 348 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 351 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6); |
dev | 352 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 362 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 365 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page); |
dev | 366 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 373 | drivers/net/8390.c | dev->name, ei_local->lasttx); |
dev | 376 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 397 | drivers/net/8390.c | static void ei_receive(struct device *dev) |
dev | 399 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 400 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 423 | drivers/net/8390.c | dev->name, this_frame, ei_local->current_page); |
dev | 429 | drivers/net/8390.c | ei_block_input(dev, sizeof(rx_frame), (char *)&rx_frame, |
dev | 452 | drivers/net/8390.c | dev->name, rx_frame.count, rx_frame.status, |
dev | 462 | drivers/net/8390.c | dev->name, pkt_len); |
dev | 467 | drivers/net/8390.c | skb->dev = dev; |
dev | 469 | drivers/net/8390.c | ei_block_input(dev, pkt_len, skb_put(skb,pkt_len), |
dev | 471 | drivers/net/8390.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 479 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, |
dev | 488 | drivers/net/8390.c | printk("%s: next frame inconsistency, %#2x\n", dev->name, |
dev | 510 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev) |
dev | 512 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 514 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 520 | drivers/net/8390.c | printk("%s: Receiver overrun.\n", dev->name); |
dev | 533 | drivers/net/8390.c | dev->name); |
dev | 534 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 539 | drivers/net/8390.c | ei_receive(dev); |
dev | 547 | drivers/net/8390.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 549 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 550 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 553 | drivers/net/8390.c | if (dev->start == 0) return &ei_local->stat; |
dev | 570 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 572 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 586 | drivers/net/8390.c | int ethdev_init(struct device *dev) |
dev | 591 | drivers/net/8390.c | if (dev->priv == NULL) { |
dev | 594 | drivers/net/8390.c | dev->priv = kmalloc(sizeof(struct ei_device), GFP_KERNEL); |
dev | 595 | drivers/net/8390.c | memset(dev->priv, 0, sizeof(struct ei_device)); |
dev | 596 | drivers/net/8390.c | ei_local = (struct ei_device *)dev->priv; |
dev | 603 | drivers/net/8390.c | if (dev->open == NULL) |
dev | 604 | drivers/net/8390.c | dev->open = &ei_open; |
dev | 606 | drivers/net/8390.c | dev->hard_start_xmit = &ei_start_xmit; |
dev | 607 | drivers/net/8390.c | dev->get_stats = get_stats; |
dev | 609 | drivers/net/8390.c | dev->set_multicast_list = &set_multicast_list; |
dev | 612 | drivers/net/8390.c | ether_setup(dev); |
dev | 620 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp) |
dev | 622 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 623 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 654 | drivers/net/8390.c | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS + i); |
dev | 664 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 665 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 680 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 683 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 689 | drivers/net/8390.c | dev->name); |
dev | 23 | drivers/net/8390.h | extern int ethif_init(struct device *dev); |
dev | 24 | drivers/net/8390.h | extern int ethdev_init(struct device *dev); |
dev | 25 | drivers/net/8390.h | extern void NS8390_init(struct device *dev, int startp); |
dev | 26 | drivers/net/8390.h | extern int ei_open(struct device *dev); |
dev | 69 | 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 | 77 | drivers/net/Space.c | ethif_probe(struct device *dev) |
dev | 79 | drivers/net/Space.c | u_long base_addr = dev->base_addr; |
dev | 86 | drivers/net/Space.c | && seeq8005_probe(dev) |
dev | 89 | drivers/net/Space.c | && hp100_probe(dev) |
dev | 92 | drivers/net/Space.c | && ultra_probe(dev) |
dev | 95 | drivers/net/Space.c | && wd_probe(dev) |
dev | 98 | drivers/net/Space.c | && el2_probe(dev) |
dev | 101 | drivers/net/Space.c | && ne_probe(dev) |
dev | 104 | drivers/net/Space.c | && hp_probe(dev) |
dev | 107 | drivers/net/Space.c | && hp_plus_probe(dev) |
dev | 110 | drivers/net/Space.c | && at1500_probe(dev) |
dev | 113 | drivers/net/Space.c | && at1700_probe(dev) |
dev | 116 | drivers/net/Space.c | && el3_probe(dev) |
dev | 119 | drivers/net/Space.c | && znet_probe(dev) |
dev | 122 | drivers/net/Space.c | && express_probe(dev) |
dev | 125 | drivers/net/Space.c | && eepro_probe(dev) |
dev | 128 | drivers/net/Space.c | && depca_probe(dev) |
dev | 131 | drivers/net/Space.c | && ewrk3_probe(dev) |
dev | 134 | drivers/net/Space.c | && de4x5_probe(dev) |
dev | 137 | drivers/net/Space.c | && apricot_probe(dev) |
dev | 140 | drivers/net/Space.c | && el1_probe(dev) |
dev | 143 | drivers/net/Space.c | && wavelan_probe(dev) |
dev | 146 | drivers/net/Space.c | && el16_probe(dev) |
dev | 149 | drivers/net/Space.c | && elplus_probe(dev) |
dev | 152 | drivers/net/Space.c | && ac3200_probe(dev) |
dev | 155 | drivers/net/Space.c | && e2100_probe(dev) |
dev | 158 | drivers/net/Space.c | && de600_probe(dev) |
dev | 161 | drivers/net/Space.c | && de620_probe(dev) |
dev | 164 | drivers/net/Space.c | && SK_init(dev) |
dev | 167 | drivers/net/Space.c | && ni52_probe(dev) |
dev | 170 | drivers/net/Space.c | && ni65_probe(dev) |
dev | 200 | drivers/net/Space.c | extern int arcnet_probe(struct device *dev); |
dev | 349 | drivers/net/Space.c | extern int dummy_init(struct device *dev); |
dev | 357 | drivers/net/Space.c | extern int eql_init(struct device *dev); |
dev | 374 | drivers/net/Space.c | extern int tok_probe(struct device *dev); |
dev | 391 | drivers/net/Space.c | extern int tok_probe(struct device *dev); |
dev | 445 | drivers/net/Space.c | extern int loopback_init(struct device *dev); |
dev | 57 | drivers/net/ac3200.c | int ac3200_probe(struct device *dev); |
dev | 58 | drivers/net/ac3200.c | static int ac_probe1(int ioaddr, struct device *dev); |
dev | 60 | drivers/net/ac3200.c | static int ac_open(struct device *dev); |
dev | 61 | drivers/net/ac3200.c | static void ac_reset_8390(struct device *dev); |
dev | 62 | drivers/net/ac3200.c | static int ac_block_input(struct device *dev, int count, |
dev | 64 | drivers/net/ac3200.c | static void ac_block_output(struct device *dev, const int count, |
dev | 66 | drivers/net/ac3200.c | static int ac_close_card(struct device *dev); |
dev | 75 | drivers/net/ac3200.c | int ac3200_probe(struct device *dev) |
dev | 77 | drivers/net/ac3200.c | unsigned short ioaddr = dev->base_addr; |
dev | 80 | drivers/net/ac3200.c | return ac_probe1(ioaddr, dev); |
dev | 89 | drivers/net/ac3200.c | if (ac_probe1(ioaddr, dev) == 0) |
dev | 95 | drivers/net/ac3200.c | static int ac_probe1(int ioaddr, struct device *dev) |
dev | 126 | drivers/net/ac3200.c | dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i); |
dev | 136 | drivers/net/ac3200.c | if (dev->irq == 0) |
dev | 137 | drivers/net/ac3200.c | dev->irq = config2irq(inb(ioaddr + AC_CONFIG)); |
dev | 138 | drivers/net/ac3200.c | else if (dev->irq == 2) |
dev | 139 | drivers/net/ac3200.c | dev->irq = 9; |
dev | 141 | drivers/net/ac3200.c | if (request_irq(dev->irq, ei_interrupt, 0, "ac3200")) { |
dev | 142 | drivers/net/ac3200.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 146 | drivers/net/ac3200.c | dev->base_addr = ioaddr; |
dev | 149 | drivers/net/ac3200.c | if (dev->mem_start) { /* Override the value from the board. */ |
dev | 151 | drivers/net/ac3200.c | if (addrmap[i] == dev->mem_start) |
dev | 159 | drivers/net/ac3200.c | dev->if_port = inb(ioaddr + AC_CONFIG) >> 6; |
dev | 160 | drivers/net/ac3200.c | dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG)); |
dev | 161 | drivers/net/ac3200.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 162 | drivers/net/ac3200.c | dev->mem_end = dev->rmem_end = dev->mem_start |
dev | 165 | drivers/net/ac3200.c | ethdev_init(dev); |
dev | 174 | drivers/net/ac3200.c | dev->name, ioaddr, dev->irq, port_name[dev->if_port], |
dev | 175 | drivers/net/ac3200.c | dev->mem_start, dev->mem_end-1); |
dev | 184 | drivers/net/ac3200.c | dev->open = &ac_open; |
dev | 185 | drivers/net/ac3200.c | dev->stop = &ac_close_card; |
dev | 186 | drivers/net/ac3200.c | NS8390_init(dev, 0); |
dev | 190 | drivers/net/ac3200.c | static int ac_open(struct device *dev) |
dev | 194 | drivers/net/ac3200.c | int ioaddr = dev->base_addr; |
dev | 196 | drivers/net/ac3200.c | if (request_irq(dev->irq, ei_interrupt, 0, "ac3200")) |
dev | 200 | drivers/net/ac3200.c | return ei_open(dev); |
dev | 203 | drivers/net/ac3200.c | static void ac_reset_8390(struct device *dev) |
dev | 205 | drivers/net/ac3200.c | ushort ioaddr = dev->base_addr; |
dev | 220 | drivers/net/ac3200.c | static int ac_block_input(struct device *dev, int count, char *buf, |
dev | 223 | drivers/net/ac3200.c | long xfer_start = dev->mem_start + ring_offset - (AC_START_PG<<8); |
dev | 225 | drivers/net/ac3200.c | if (xfer_start + count > dev->rmem_end) { |
dev | 227 | drivers/net/ac3200.c | int semi_count = dev->rmem_end - xfer_start; |
dev | 230 | drivers/net/ac3200.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 231 | drivers/net/ac3200.c | return dev->rmem_start + count; |
dev | 238 | drivers/net/ac3200.c | static void ac_block_output(struct device *dev, int count, |
dev | 241 | drivers/net/ac3200.c | long shmem = dev->mem_start + ((start_page - AC_START_PG)<<8); |
dev | 246 | drivers/net/ac3200.c | static int ac_close_card(struct device *dev) |
dev | 248 | drivers/net/ac3200.c | dev->start = 0; |
dev | 249 | drivers/net/ac3200.c | dev->tbusy = 1; |
dev | 252 | drivers/net/ac3200.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 257 | drivers/net/ac3200.c | free_irq(dev->irq); |
dev | 258 | drivers/net/ac3200.c | irq2dev_map[dev->irq] = 0; |
dev | 261 | drivers/net/ac3200.c | NS8390_init(dev, 0); |
dev | 187 | drivers/net/apricot.c | static int i596_open(struct device *dev); |
dev | 188 | drivers/net/apricot.c | static int i596_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 190 | drivers/net/apricot.c | static int i596_close(struct device *dev); |
dev | 191 | drivers/net/apricot.c | static struct enet_statistics *i596_get_stats(struct device *dev); |
dev | 192 | drivers/net/apricot.c | static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd); |
dev | 195 | drivers/net/apricot.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 200 | drivers/net/apricot.c | init_rx_bufs(struct device *dev, int num) |
dev | 202 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 208 | drivers/net/apricot.c | if (i596_debug > 1) printk ("%s: init_rx_bufs %d.\n", dev->name, num); |
dev | 238 | drivers/net/apricot.c | remove_rx_bufs(struct device *dev) |
dev | 240 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 255 | drivers/net/apricot.c | init_i596_mem(struct device *dev) |
dev | 257 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 258 | drivers/net/apricot.c | short ioaddr = dev->base_addr; |
dev | 278 | drivers/net/apricot.c | if (i596_debug > 2) printk("%s: starting i82596.\n", dev->name); |
dev | 288 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 296 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
dev | 298 | drivers/net/apricot.c | memcpy (lp->eth_addr, dev->dev_addr, 6); |
dev | 300 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_add); |
dev | 303 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->tdr); |
dev | 310 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 330 | drivers/net/apricot.c | i596_rx(struct device *dev) |
dev | 332 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 351 | drivers/net/apricot.c | printk ("%s: i596_rx Memory squeeze, dropping packet.\n", dev->name); |
dev | 356 | drivers/net/apricot.c | skb->dev = dev; |
dev | 359 | drivers/net/apricot.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 447 | drivers/net/apricot.c | i596_reset(struct device *dev, struct i596_private *lp, int ioaddr) |
dev | 461 | drivers/net/apricot.c | dev->start = 0; |
dev | 462 | drivers/net/apricot.c | dev->tbusy = 1; |
dev | 479 | drivers/net/apricot.c | i596_rx(dev); |
dev | 481 | drivers/net/apricot.c | dev->start = 1; |
dev | 482 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 483 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 484 | drivers/net/apricot.c | init_i596_mem(dev); |
dev | 487 | drivers/net/apricot.c | static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd) |
dev | 489 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 490 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 531 | drivers/net/apricot.c | printk("%s: command unit timed out, status resetting.\n", dev->name); |
dev | 533 | drivers/net/apricot.c | i596_reset(dev, lp, ioaddr); |
dev | 538 | drivers/net/apricot.c | i596_open(struct device *dev) |
dev | 543 | drivers/net/apricot.c | printk("%s: i596_open() irq %d.\n", dev->name, dev->irq); |
dev | 545 | drivers/net/apricot.c | if (request_irq(dev->irq, &i596_interrupt, 0, "apricot")) |
dev | 548 | drivers/net/apricot.c | irq2dev_map[dev->irq] = dev; |
dev | 550 | drivers/net/apricot.c | i = init_rx_bufs(dev, RX_RING_SIZE); |
dev | 552 | drivers/net/apricot.c | if ((i = init_rx_bufs(dev, RX_RING_SIZE)) < RX_RING_SIZE) |
dev | 553 | drivers/net/apricot.c | printk("%s: only able to allocate %d receive buffers\n", dev->name, i); |
dev | 557 | drivers/net/apricot.c | free_irq(dev->irq); |
dev | 558 | drivers/net/apricot.c | irq2dev_map[dev->irq] = 0; |
dev | 562 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 563 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 564 | drivers/net/apricot.c | dev->start = 1; |
dev | 570 | drivers/net/apricot.c | init_i596_mem(dev); |
dev | 576 | drivers/net/apricot.c | i596_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 578 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 579 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 582 | drivers/net/apricot.c | if (i596_debug > 2) printk ("%s: Apricot start xmit\n", dev->name); |
dev | 585 | drivers/net/apricot.c | if (dev->tbusy) { |
dev | 586 | drivers/net/apricot.c | int tickssofar = jiffies - dev->trans_start; |
dev | 590 | drivers/net/apricot.c | dev->name); |
dev | 597 | drivers/net/apricot.c | i596_reset(dev,lp, ioaddr); |
dev | 607 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 608 | drivers/net/apricot.c | dev->trans_start = jiffies; |
dev | 615 | drivers/net/apricot.c | dev_tint(dev); |
dev | 622 | drivers/net/apricot.c | if (i596_debug > 3) printk("%s: i596_start_xmit() called\n", dev->name); |
dev | 626 | drivers/net/apricot.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 627 | drivers/net/apricot.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 631 | drivers/net/apricot.c | dev->trans_start = jiffies; |
dev | 636 | drivers/net/apricot.c | printk ("%s: i596_xmit Memory squeeze, dropping packet.\n", dev->name); |
dev | 657 | drivers/net/apricot.c | i596_add_cmd(dev, (struct i596_cmd *)tx_cmd); |
dev | 663 | drivers/net/apricot.c | dev->tbusy = 0; |
dev | 685 | drivers/net/apricot.c | int apricot_probe(struct device *dev) |
dev | 719 | drivers/net/apricot.c | dev->base_addr = ioaddr; |
dev | 720 | drivers/net/apricot.c | ether_setup(dev); |
dev | 721 | drivers/net/apricot.c | printk("%s: Apricot 82596 at %#3x,", dev->name, ioaddr); |
dev | 724 | drivers/net/apricot.c | printk(" %2.2X", dev->dev_addr[i] = eth_addr[i]); |
dev | 726 | drivers/net/apricot.c | dev->base_addr = ioaddr; |
dev | 727 | drivers/net/apricot.c | dev->irq = 10; |
dev | 728 | drivers/net/apricot.c | printk(" IRQ %d.\n", dev->irq); |
dev | 733 | drivers/net/apricot.c | dev->open = &i596_open; |
dev | 734 | drivers/net/apricot.c | dev->stop = &i596_close; |
dev | 735 | drivers/net/apricot.c | dev->hard_start_xmit = &i596_start_xmit; |
dev | 736 | drivers/net/apricot.c | dev->get_stats = &i596_get_stats; |
dev | 738 | drivers/net/apricot.c | dev->set_multicast_list = &set_multicast_list; |
dev | 741 | drivers/net/apricot.c | dev->mem_start = (int)kmalloc(sizeof(struct i596_private)+ 0x0f, GFP_KERNEL); |
dev | 743 | drivers/net/apricot.c | dev->priv = (void *)((dev->mem_start + 0xf) & 0xfffffff0); |
dev | 745 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
dev | 757 | drivers/net/apricot.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 763 | drivers/net/apricot.c | if (dev == NULL) { |
dev | 768 | drivers/net/apricot.c | if (i596_debug > 3) printk ("%s: i596_interrupt(): irq %d\n",dev->name, irq); |
dev | 770 | drivers/net/apricot.c | if (dev->interrupt) |
dev | 771 | drivers/net/apricot.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 773 | drivers/net/apricot.c | dev->interrupt = 1; |
dev | 775 | drivers/net/apricot.c | ioaddr = dev->base_addr; |
dev | 777 | drivers/net/apricot.c | lp = (struct i596_private *)dev->priv; |
dev | 782 | 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 | 788 | drivers/net/apricot.c | printk("%s: i596 interrupt, status %4.4x.\n", dev->name, status); |
dev | 797 | drivers/net/apricot.c | printk("%s: i596 interrupt completed command.\n", dev->name); |
dev | 799 | drivers/net/apricot.c | printk("%s: i596 interrupt command unit inactive %x.\n", dev->name, status & 0x0700); |
dev | 851 | drivers/net/apricot.c | printk("%s: link ok.\n", dev->name); |
dev | 856 | drivers/net/apricot.c | printk("%s: Transceiver problem.\n", dev->name); |
dev | 858 | drivers/net/apricot.c | printk("%s: Termination problem.\n", dev->name); |
dev | 860 | drivers/net/apricot.c | printk("%s: Short circuit.\n", dev->name); |
dev | 862 | drivers/net/apricot.c | printk("%s: Time %ld.\n", dev->name, status & 0x07ff); |
dev | 879 | drivers/net/apricot.c | if ((lp->cmd_head != (struct i596_cmd *) I596_NULL) && (dev->start)) ack_cmd |= CUC_START; |
dev | 886 | drivers/net/apricot.c | printk("%s: i596 interrupt received a frame.\n", dev->name); |
dev | 888 | drivers/net/apricot.c | printk("%s: i596 interrupt receive unit inactive %x.\n", dev->name, status & 0x0070); |
dev | 890 | drivers/net/apricot.c | i596_rx(dev); |
dev | 892 | drivers/net/apricot.c | if (dev->start) ack_cmd |= RX_START; |
dev | 904 | 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 | 914 | drivers/net/apricot.c | printk("%s: exiting interrupt.\n", dev->name); |
dev | 916 | drivers/net/apricot.c | dev->interrupt = 0; |
dev | 921 | drivers/net/apricot.c | i596_close(struct device *dev) |
dev | 923 | drivers/net/apricot.c | int ioaddr = dev->base_addr; |
dev | 924 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 927 | drivers/net/apricot.c | dev->start = 0; |
dev | 928 | drivers/net/apricot.c | dev->tbusy = 1; |
dev | 932 | drivers/net/apricot.c | dev->name, lp->scb.status); |
dev | 943 | drivers/net/apricot.c | dev->name, lp->scb.status, lp->scb.command); |
dev | 946 | drivers/net/apricot.c | free_irq(dev->irq); |
dev | 947 | drivers/net/apricot.c | irq2dev_map[dev->irq] = 0; |
dev | 948 | drivers/net/apricot.c | remove_rx_bufs(dev); |
dev | 958 | drivers/net/apricot.c | i596_get_stats(struct device *dev) |
dev | 960 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 973 | drivers/net/apricot.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 975 | drivers/net/apricot.c | struct i596_private *lp = (struct i596_private *)dev->priv; |
dev | 979 | drivers/net/apricot.c | printk ("%s: set multicast list %d\n", dev->name, num_addrs); |
dev | 985 | drivers/net/apricot.c | printk ("%s: set_multicast Memory squeeze.\n", dev->name); |
dev | 994 | drivers/net/apricot.c | i596_add_cmd(dev, cmd); |
dev | 1003 | drivers/net/apricot.c | i596_add_cmd(dev, &lp->set_conf); |
dev | 424 | drivers/net/arcnet.c | extern int arcnet_probe(struct device *dev); |
dev | 426 | drivers/net/arcnet.c | static int arcnet_memprobe(struct device *dev,u_char *addr); |
dev | 427 | drivers/net/arcnet.c | static int arcnet_ioprobe(struct device *dev, short ioaddr); |
dev | 429 | drivers/net/arcnet.c | static int arcnetW_init(struct device *dev); |
dev | 431 | drivers/net/arcnet.c | static int arcnet_open(struct device *dev); |
dev | 432 | drivers/net/arcnet.c | static int arcnet_close(struct device *dev); |
dev | 433 | drivers/net/arcnet.c | static int arcnet_reset(struct device *dev); |
dev | 435 | drivers/net/arcnet.c | static int arcnetA_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 436 | drivers/net/arcnet.c | static void arcnetA_continue_tx(struct device *dev); |
dev | 437 | drivers/net/arcnet.c | static void arcnetA_prepare_tx(struct device *dev,struct ClientData *hdr, |
dev | 439 | drivers/net/arcnet.c | static void arcnetA_go_tx(struct device *dev); |
dev | 441 | drivers/net/arcnet.c | static int arcnetW_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 444 | drivers/net/arcnet.c | static void arcnet_inthandler(struct device *dev); |
dev | 446 | drivers/net/arcnet.c | static void arcnet_rx(struct device *dev,int recbuf); |
dev | 447 | drivers/net/arcnet.c | static void arcnetA_rx(struct device *dev,struct ClientData *arcsoft, |
dev | 449 | drivers/net/arcnet.c | static void arcnetW_rx(struct device *dev,u_char *arcsoft, |
dev | 452 | drivers/net/arcnet.c | static struct enet_statistics *arcnet_get_stats(struct device *dev); |
dev | 453 | drivers/net/arcnet.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 456 | drivers/net/arcnet.c | int arcnetA_header(struct sk_buff *skb,struct device *dev,unsigned short type, |
dev | 458 | drivers/net/arcnet.c | int arcnetA_rebuild_header(void *eth,struct device *dev,unsigned long raddr, |
dev | 460 | drivers/net/arcnet.c | unsigned short arcnetA_type_trans(struct sk_buff *skb,struct device *dev); |
dev | 467 | drivers/net/arcnet.c | #define tx_done(dev) 1 |
dev | 487 | drivers/net/arcnet.c | arcnet_probe(struct device *dev) |
dev | 514 | drivers/net/arcnet.c | int base_addr=dev->base_addr, status=0; |
dev | 532 | drivers/net/arcnet.c | dev->base_addr,dev->irq,dev->mem_start); |
dev | 536 | drivers/net/arcnet.c | status=arcnet_ioprobe(dev, base_addr); |
dev | 550 | drivers/net/arcnet.c | status=arcnet_ioprobe(dev, ioaddr); |
dev | 566 | drivers/net/arcnet.c | dev->mem_start); |
dev | 567 | drivers/net/arcnet.c | if (dev->mem_start) /* value given - probe just that one */ |
dev | 569 | drivers/net/arcnet.c | status=arcnet_memprobe(dev,(u_char *)dev->mem_start); |
dev | 575 | drivers/net/arcnet.c | status=arcnet_memprobe(dev,(u_char *)(*addr)); |
dev | 582 | drivers/net/arcnet.c | if (!dev->base_addr || !dev->irq || !dev->mem_start |
dev | 583 | drivers/net/arcnet.c | || !dev->rmem_start) |
dev | 593 | drivers/net/arcnet.c | int irqval = request_irq(dev->irq, &arcnet_interrupt, 0, |
dev | 597 | drivers/net/arcnet.c | dev->name,dev->irq, irqval); |
dev | 603 | drivers/net/arcnet.c | request_region(dev->base_addr, ARCNET_TOTAL_SIZE,"arcnet"); |
dev | 606 | drivers/net/arcnet.c | dev->name, dev->base_addr, dev->irq, dev->mem_start); |
dev | 609 | drivers/net/arcnet.c | dev->priv = kmalloc(sizeof(struct arcnet_local), GFP_KERNEL); |
dev | 610 | drivers/net/arcnet.c | memset(dev->priv, 0, sizeof(struct arcnet_local)); |
dev | 611 | drivers/net/arcnet.c | lp=(struct arcnet_local *)(dev->priv); |
dev | 613 | drivers/net/arcnet.c | dev->open=arcnet_open; |
dev | 614 | drivers/net/arcnet.c | dev->stop=arcnet_close; |
dev | 615 | drivers/net/arcnet.c | dev->hard_start_xmit=arcnetA_send_packet; |
dev | 616 | drivers/net/arcnet.c | dev->get_stats=arcnet_get_stats; |
dev | 618 | drivers/net/arcnet.c | dev->set_multicast_list = &set_multicast_list; |
dev | 624 | drivers/net/arcnet.c | ether_setup(dev); |
dev | 627 | drivers/net/arcnet.c | dev->type=ARPHRD_ARCNET; |
dev | 628 | drivers/net/arcnet.c | dev->hard_header_len=sizeof(struct ClientData); |
dev | 636 | drivers/net/arcnet.c | dev->addr_len=1; |
dev | 637 | drivers/net/arcnet.c | dev->broadcast[0]=0x00; |
dev | 640 | drivers/net/arcnet.c | arcnet_reset(dev); |
dev | 649 | drivers/net/arcnet.c | dev->dev_addr[0]=lp->arcnum; |
dev | 653 | drivers/net/arcnet.c | dev->hard_header=arcnetA_header; |
dev | 654 | drivers/net/arcnet.c | dev->rebuild_header=arcnetA_rebuild_header; |
dev | 661 | drivers/net/arcnet.c | int arcnet_ioprobe(struct device *dev, short ioaddr) |
dev | 750 | drivers/net/arcnet.c | if (!airq && !(dev->base_addr && dev->irq)) |
dev | 774 | drivers/net/arcnet.c | if (!dev->base_addr) dev->base_addr=ioaddr; |
dev | 776 | drivers/net/arcnet.c | if (dev->irq < 2) /* "Auto-IRQ" */ |
dev | 779 | drivers/net/arcnet.c | dev->irq=airq; |
dev | 781 | drivers/net/arcnet.c | else if (dev->irq == 2) |
dev | 785 | drivers/net/arcnet.c | dev->irq = 9; |
dev | 790 | drivers/net/arcnet.c | dev->base_addr,dev->irq); |
dev | 799 | drivers/net/arcnet.c | int arcnet_memprobe(struct device *dev,u_char *addr) |
dev | 804 | drivers/net/arcnet.c | dev->mem_start=0; |
dev | 826 | drivers/net/arcnet.c | dev->mem_start=(unsigned long)addr; |
dev | 827 | drivers/net/arcnet.c | dev->mem_end=dev->mem_start+512*4-1; |
dev | 828 | drivers/net/arcnet.c | dev->rmem_start=dev->mem_start+512*0; |
dev | 829 | drivers/net/arcnet.c | dev->rmem_end=dev->mem_start+512*2-1; |
dev | 837 | drivers/net/arcnet.c | int arcnet_reset(struct device *dev) |
dev | 839 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
dev | 840 | drivers/net/arcnet.c | short ioaddr=dev->base_addr; |
dev | 848 | drivers/net/arcnet.c | dev->name,inb(STATUS)); |
dev | 859 | drivers/net/arcnet.c | cardmem = (u_char *) dev->mem_start; |
dev | 877 | drivers/net/arcnet.c | memset((void *)dev->mem_start,0x42,2048); |
dev | 889 | drivers/net/arcnet.c | static int arcnetW_init(struct device *dev) |
dev | 891 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 894 | drivers/net/arcnet.c | dev->dev_addr[0]=0; |
dev | 895 | drivers/net/arcnet.c | dev->dev_addr[5]=lp->arcnum; |
dev | 896 | drivers/net/arcnet.c | dev->mtu=493; /* MTU is small because of missing packet splitting */ |
dev | 924 | drivers/net/arcnet.c | arcnet_open(struct device *dev) |
dev | 926 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 928 | drivers/net/arcnet.c | if (dev->metric>=1000) |
dev | 930 | drivers/net/arcnet.c | arcnet_debug=dev->metric-1000; |
dev | 932 | drivers/net/arcnet.c | dev->metric=1; |
dev | 937 | drivers/net/arcnet.c | irq2dev_map[dev->irq] = dev; |
dev | 942 | drivers/net/arcnet.c | if (arcnet_reset(dev) && arcnet_reset(dev)) |
dev | 945 | drivers/net/arcnet.c | dev->tbusy=0; |
dev | 946 | drivers/net/arcnet.c | dev->interrupt=0; |
dev | 951 | drivers/net/arcnet.c | lp->adev=dev; |
dev | 958 | drivers/net/arcnet.c | memcpy(lp->wdev,dev,sizeof(struct device)); |
dev | 960 | drivers/net/arcnet.c | sprintf(lp->wdev->name,"%sw",dev->name); |
dev | 978 | drivers/net/arcnet.c | arcnet_close(struct device *dev) |
dev | 980 | drivers/net/arcnet.c | int ioaddr = dev->base_addr; |
dev | 981 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1024 | drivers/net/arcnet.c | arcnetA_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1026 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1027 | drivers/net/arcnet.c | int ioaddr=dev->base_addr; |
dev | 1046 | drivers/net/arcnet.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1073 | drivers/net/arcnet.c | dev->trans_start = jiffies; |
dev | 1101 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
dev | 1102 | drivers/net/arcnet.c | dev_tint(dev); |
dev | 1114 | drivers/net/arcnet.c | arcnet_inthandler(dev); /* fake an interrupt */ |
dev | 1124 | drivers/net/arcnet.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 1127 | drivers/net/arcnet.c | inb(STATUS),lp->intx,jiffies-dev->trans_start); |
dev | 1154 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1167 | drivers/net/arcnet.c | arcnetA_prepare_tx(dev,out->hdr, |
dev | 1177 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1200 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1207 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 1210 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1211 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 1213 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1233 | drivers/net/arcnet.c | dev->trans_start=jiffies; |
dev | 1242 | drivers/net/arcnet.c | static void arcnetA_continue_tx(struct device *dev) |
dev | 1244 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1272 | drivers/net/arcnet.c | arcnetA_prepare_tx(dev,out->hdr,out->seglen,out->data); |
dev | 1284 | drivers/net/arcnet.c | arcnetA_prepare_tx(struct device *dev,struct ClientData *hdr,short length, |
dev | 1287 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1290 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
dev | 1305 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
dev | 1385 | drivers/net/arcnet.c | arcnetA_go_tx(struct device *dev) |
dev | 1387 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)dev->priv; |
dev | 1388 | drivers/net/arcnet.c | int ioaddr=dev->base_addr; |
dev | 1401 | drivers/net/arcnet.c | dev->trans_start = jiffies; |
dev | 1414 | drivers/net/arcnet.c | arcnetW_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1416 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1419 | drivers/net/arcnet.c | printk("%s: in arcnetW_send_packet (skb=%p)\n",dev->name,skb); |
dev | 1425 | drivers/net/arcnet.c | int tickssofar = jiffies - dev->trans_start; |
dev | 1428 | drivers/net/arcnet.c | printk("%s: transmit timed out\n",dev->name); |
dev | 1432 | drivers/net/arcnet.c | dev->trans_start = jiffies; |
dev | 1441 | drivers/net/arcnet.c | dev_tint(dev); |
dev | 1447 | drivers/net/arcnet.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 1448 | drivers/net/arcnet.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1452 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+512*(lp->txbuf^1)); |
dev | 1475 | drivers/net/arcnet.c | memset((void *)dev->mem_start+lp->txbuf*512,0x42,512); |
dev | 1539 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1540 | drivers/net/arcnet.c | dev->trans_start = jiffies; |
dev | 1564 | drivers/net/arcnet.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 1566 | drivers/net/arcnet.c | if (dev==NULL || !dev->start) |
dev | 1573 | drivers/net/arcnet.c | arcnet_inthandler(dev); |
dev | 1581 | drivers/net/arcnet.c | arcnet_inthandler(struct device *dev) |
dev | 1586 | drivers/net/arcnet.c | if (dev->interrupt) |
dev | 1589 | drivers/net/arcnet.c | dev->interrupt = 1; |
dev | 1591 | drivers/net/arcnet.c | ioaddr = dev->base_addr; |
dev | 1592 | drivers/net/arcnet.c | lp = (struct arcnet_local *)dev->priv; |
dev | 1605 | drivers/net/arcnet.c | if (!dev->start) |
dev | 1613 | drivers/net/arcnet.c | dev->interrupt=0; |
dev | 1651 | drivers/net/arcnet.c | arcnet_rx(dev,!recbuf); |
dev | 1692 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1724 | drivers/net/arcnet.c | arcnetA_continue_tx(dev); |
dev | 1726 | drivers/net/arcnet.c | arcnetA_go_tx(dev); |
dev | 1757 | drivers/net/arcnet.c | if (dev->start && lp->sending ) |
dev | 1762 | drivers/net/arcnet.c | dev->interrupt=0; |
dev | 1778 | drivers/net/arcnet.c | arcnet_rx(struct device *dev,int recbuf) |
dev | 1780 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1781 | drivers/net/arcnet.c | int ioaddr = dev->base_addr; |
dev | 1783 | drivers/net/arcnet.c | (union ArcPacket *)(dev->mem_start+recbuf*512); |
dev | 1826 | drivers/net/arcnet.c | arcnetA_rx(dev,(struct ClientData*)arcsoft, |
dev | 1830 | drivers/net/arcnet.c | arcnetW_rx(dev,arcsoft,length,saddr,daddr); |
dev | 1866 | drivers/net/arcnet.c | arcnetA_rx(struct device *dev,struct ClientData *arcsoft, |
dev | 1869 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 1920 | drivers/net/arcnet.c | skb->dev = dev; |
dev | 1975 | drivers/net/arcnet.c | skb->protocol=arcnetA_type_trans(skb,dev); |
dev | 2047 | drivers/net/arcnet.c | dev->name); |
dev | 2060 | drivers/net/arcnet.c | skb->dev=dev; |
dev | 2139 | drivers/net/arcnet.c | skb->protocol=arcnetA_type_trans(skb,dev); |
dev | 2151 | drivers/net/arcnet.c | arcnetW_rx(struct device *dev,u_char *arcsoft, |
dev | 2154 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2169 | drivers/net/arcnet.c | skb->dev = lp->wdev; |
dev | 2187 | drivers/net/arcnet.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 2206 | drivers/net/arcnet.c | arcnet_get_stats(struct device *dev) |
dev | 2208 | drivers/net/arcnet.c | struct arcnet_local *lp = (struct arcnet_local *)dev->priv; |
dev | 2220 | drivers/net/arcnet.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 2223 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); |
dev | 2225 | drivers/net/arcnet.c | short ioaddr = dev->base_addr; |
dev | 2238 | drivers/net/arcnet.c | int arcnetA_header(struct sk_buff *skb,struct device *dev,unsigned short type, |
dev | 2242 | drivers/net/arcnet.c | skb_push(skb,dev->hard_header_len); |
dev | 2280 | drivers/net/arcnet.c | head->saddr=((u_char*)(dev->dev_addr))[0]; |
dev | 2289 | drivers/net/arcnet.c | if (dev->flags & IFF_LOOPBACK) |
dev | 2292 | drivers/net/arcnet.c | return(dev->hard_header_len); |
dev | 2303 | drivers/net/arcnet.c | return dev->hard_header_len; |
dev | 2308 | drivers/net/arcnet.c | return -dev->hard_header_len; |
dev | 2316 | drivers/net/arcnet.c | int arcnetA_rebuild_header(void *buff,struct device *dev,unsigned long dst, |
dev | 2338 | drivers/net/arcnet.c | return arp_find(&(head->daddr), dst, dev, dev->pa_addr, skb)? 1 : 0; |
dev | 2348 | drivers/net/arcnet.c | unsigned short arcnetA_type_trans(struct sk_buff *skb,struct device *dev) |
dev | 2351 | drivers/net/arcnet.c | struct arcnet_local *lp=(struct arcnet_local *) (dev->priv); |
dev | 2355 | drivers/net/arcnet.c | skb_pull(skb,dev->hard_header_len); |
dev | 2359 | drivers/net/arcnet.c | else if (dev->flags&IFF_PROMISC) |
dev | 2362 | drivers/net/arcnet.c | if (head->daddr != dev->dev_addr[0]) |
dev | 55 | drivers/net/at1700.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 116 | drivers/net/at1700.c | extern int at1700_probe(struct device *dev); |
dev | 118 | drivers/net/at1700.c | static int at1700_probe1(struct device *dev, short ioaddr); |
dev | 120 | drivers/net/at1700.c | static int net_open(struct device *dev); |
dev | 121 | drivers/net/at1700.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 123 | drivers/net/at1700.c | static void net_rx(struct device *dev); |
dev | 124 | drivers/net/at1700.c | static int net_close(struct device *dev); |
dev | 125 | drivers/net/at1700.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 126 | drivers/net/at1700.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 142 | drivers/net/at1700.c | at1700_probe(struct device *dev) |
dev | 145 | drivers/net/at1700.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 148 | drivers/net/at1700.c | return at1700_probe1(dev, base_addr); |
dev | 156 | drivers/net/at1700.c | if (at1700_probe1(dev, ioaddr) == 0) |
dev | 172 | drivers/net/at1700.c | int at1700_probe1(struct device *dev, short ioaddr) |
dev | 204 | drivers/net/at1700.c | if (dev == NULL) |
dev | 205 | drivers/net/at1700.c | dev = init_etherdev(0, sizeof(struct net_local), 0); |
dev | 211 | drivers/net/at1700.c | printk("%s: AT1700 found at %#3x, IRQ %d, address ", dev->name, |
dev | 214 | drivers/net/at1700.c | dev->base_addr = ioaddr; |
dev | 215 | drivers/net/at1700.c | dev->irq = irq; |
dev | 216 | drivers/net/at1700.c | irq2dev_map[irq] = dev; |
dev | 221 | drivers/net/at1700.c | ((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val); |
dev | 234 | drivers/net/at1700.c | dev->if_port = setup_value >> 8; |
dev | 235 | drivers/net/at1700.c | printk(" %s interface.\n", porttype[(dev->if_port>>3) & 3]); |
dev | 241 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 254 | drivers/net/at1700.c | outb(dev->if_port, MODE13); |
dev | 263 | drivers/net/at1700.c | if (dev->priv == NULL) |
dev | 264 | drivers/net/at1700.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 265 | drivers/net/at1700.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 267 | drivers/net/at1700.c | dev->open = net_open; |
dev | 268 | drivers/net/at1700.c | dev->stop = net_close; |
dev | 269 | drivers/net/at1700.c | dev->hard_start_xmit = net_send_packet; |
dev | 270 | drivers/net/at1700.c | dev->get_stats = net_get_stats; |
dev | 271 | drivers/net/at1700.c | dev->set_multicast_list = &set_multicast_list; |
dev | 275 | drivers/net/at1700.c | ether_setup(dev); |
dev | 320 | drivers/net/at1700.c | static int net_open(struct device *dev) |
dev | 322 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 323 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 331 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 355 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 356 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 357 | drivers/net/at1700.c | dev->start = 1; |
dev | 363 | drivers/net/at1700.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 365 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 366 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 368 | drivers/net/at1700.c | if (dev->tbusy) { |
dev | 371 | drivers/net/at1700.c | int tickssofar = jiffies - dev->trans_start; |
dev | 374 | drivers/net/at1700.c | printk("%s: transmit timed out with status %04x, %s?\n", dev->name, |
dev | 378 | drivers/net/at1700.c | dev->name, inw(ioaddr + 0), inw(ioaddr + 2), inw(ioaddr + 4), |
dev | 387 | drivers/net/at1700.c | dev->tbusy=0; |
dev | 388 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 398 | drivers/net/at1700.c | dev_tint(dev); |
dev | 404 | drivers/net/at1700.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 405 | drivers/net/at1700.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 424 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 426 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 429 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 444 | drivers/net/at1700.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 448 | drivers/net/at1700.c | if (dev == NULL) { |
dev | 452 | drivers/net/at1700.c | dev->interrupt = 1; |
dev | 454 | drivers/net/at1700.c | ioaddr = dev->base_addr; |
dev | 455 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
dev | 460 | drivers/net/at1700.c | printk("%s: Interrupt with status %04x.\n", dev->name, status); |
dev | 463 | drivers/net/at1700.c | net_rx(dev); |
dev | 472 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 473 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 479 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 485 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 491 | drivers/net/at1700.c | net_rx(struct device *dev) |
dev | 493 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 494 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 503 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), status); |
dev | 523 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 533 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 540 | drivers/net/at1700.c | skb->dev = dev; |
dev | 544 | drivers/net/at1700.c | skb->protocol=eth_type_trans(skb, dev); |
dev | 566 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), i); |
dev | 572 | drivers/net/at1700.c | static int net_close(struct device *dev) |
dev | 574 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
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 | 594 | drivers/net/at1700.c | net_get_stats(struct device *dev) |
dev | 596 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 612 | drivers/net/at1700.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 614 | drivers/net/at1700.c | short ioaddr = dev->base_addr; |
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, int num_addrs, void *addrs); |
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 | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 234 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 239 | drivers/net/atp.c | dev->if_port = (dev->mem_start & 0xf) ? dev->mem_start & 0x7 : 4; |
dev | 240 | drivers/net/atp.c | if (dev->mem_end & 0xf) |
dev | 241 | drivers/net/atp.c | net_debug = dev->mem_end & 7; |
dev | 243 | drivers/net/atp.c | dev->open = net_open; |
dev | 244 | drivers/net/atp.c | dev->stop = net_close; |
dev | 245 | drivers/net/atp.c | dev->hard_start_xmit = net_send_packet; |
dev | 246 | drivers/net/atp.c | dev->get_stats = net_get_stats; |
dev | 247 | drivers/net/atp.c | dev->set_multicast_list = &set_multicast_list; |
dev | 252 | drivers/net/atp.c | atp_timed_dev = dev; |
dev | 259 | drivers/net/atp.c | static void get_node_ID(struct device *dev) |
dev | 261 | drivers/net/atp.c | short ioaddr = dev->base_addr; |
dev | 273 | drivers/net/atp.c | ((unsigned short *)dev->dev_addr)[i] = |
dev | 321 | drivers/net/atp.c | static int net_open(struct device *dev) |
dev | 327 | drivers/net/atp.c | if (irq2dev_map[dev->irq] != 0 |
dev | 328 | drivers/net/atp.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 329 | drivers/net/atp.c | || request_irq(dev->irq, &net_interrupt, 0, "ATP")) { |
dev | 333 | drivers/net/atp.c | hardware_init(dev); |
dev | 334 | drivers/net/atp.c | dev->start = 1; |
dev | 340 | drivers/net/atp.c | static void hardware_init(struct device *dev) |
dev | 342 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 343 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 349 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 354 | drivers/net/atp.c | printk("%s: Reset: current Rx mode %d.\n", dev->name, |
dev | 372 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 373 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 414 | drivers/net/atp.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 416 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 417 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 419 | drivers/net/atp.c | if (dev->tbusy) { |
dev | 422 | drivers/net/atp.c | int tickssofar = jiffies - dev->trans_start; |
dev | 425 | drivers/net/atp.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 430 | drivers/net/atp.c | hardware_init(dev); |
dev | 431 | drivers/net/atp.c | dev->tbusy=0; |
dev | 432 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 439 | drivers/net/atp.c | dev_tint(dev); |
dev | 445 | drivers/net/atp.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 446 | drivers/net/atp.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 460 | drivers/net/atp.c | write_packet(ioaddr, length, buf, dev->if_port); |
dev | 471 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 487 | drivers/net/atp.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 492 | drivers/net/atp.c | if (dev == NULL) { |
dev | 496 | drivers/net/atp.c | dev->interrupt = 1; |
dev | 498 | drivers/net/atp.c | ioaddr = dev->base_addr; |
dev | 499 | drivers/net/atp.c | lp = (struct net_local *)dev->priv; |
dev | 508 | drivers/net/atp.c | if (net_debug > 5) printk("%s: In interrupt ", dev->name); |
dev | 525 | drivers/net/atp.c | net_rx(dev); |
dev | 530 | drivers/net/atp.c | net_rx(dev); |
dev | 531 | drivers/net/atp.c | dev->last_rx = jiffies; |
dev | 545 | drivers/net/atp.c | hardware_init(dev); |
dev | 561 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 566 | drivers/net/atp.c | && jiffies > dev->last_rx + 100) { |
dev | 569 | drivers/net/atp.c | " status %02x CMR1 %02x.\n", dev->name, |
dev | 570 | drivers/net/atp.c | num_tx_since_rx, jiffies - dev->last_rx, status, |
dev | 573 | drivers/net/atp.c | hardware_init(dev); |
dev | 585 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 603 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 644 | drivers/net/atp.c | static void net_rx(struct device *dev) |
dev | 646 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 647 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 656 | drivers/net/atp.c | read_block(ioaddr, 8, (unsigned char*)&rx_head, dev->if_port); |
dev | 665 | drivers/net/atp.c | dev->name, rx_head.rx_status); |
dev | 666 | drivers/net/atp.c | hardware_init(dev); |
dev | 675 | drivers/net/atp.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 679 | drivers/net/atp.c | skb->dev = dev; |
dev | 681 | drivers/net/atp.c | read_block(ioaddr, pkt_len, skb_put(skb,pkt_len), dev->if_port); |
dev | 692 | drivers/net/atp.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 723 | drivers/net/atp.c | net_close(struct device *dev) |
dev | 725 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 726 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 728 | drivers/net/atp.c | dev->tbusy = 1; |
dev | 729 | drivers/net/atp.c | dev->start = 0; |
dev | 737 | drivers/net/atp.c | free_irq(dev->irq); |
dev | 738 | drivers/net/atp.c | irq2dev_map[dev->irq] = 0; |
dev | 749 | drivers/net/atp.c | net_get_stats(struct device *dev) |
dev | 751 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 762 | drivers/net/atp.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 764 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 765 | drivers/net/atp.c | short ioaddr = dev->base_addr; |
dev | 404 | drivers/net/de4x5.c | static int de4x5_open(struct device *dev); |
dev | 405 | drivers/net/de4x5.c | static int de4x5_queue_pkt(struct sk_buff *skb, struct device *dev); |
dev | 407 | drivers/net/de4x5.c | static int de4x5_close(struct device *dev); |
dev | 408 | drivers/net/de4x5.c | static struct enet_statistics *de4x5_get_stats(struct device *dev); |
dev | 409 | drivers/net/de4x5.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 410 | drivers/net/de4x5.c | static int de4x5_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 415 | drivers/net/de4x5.c | static int de4x5_hw_init(struct device *dev, u_long iobase); |
dev | 416 | drivers/net/de4x5.c | static int de4x5_init(struct device *dev); |
dev | 417 | drivers/net/de4x5.c | static int de4x5_rx(struct device *dev); |
dev | 418 | drivers/net/de4x5.c | static int de4x5_tx(struct device *dev); |
dev | 419 | drivers/net/de4x5.c | static int de4x5_ast(struct device *dev); |
dev | 421 | drivers/net/de4x5.c | static int autoconf_media(struct device *dev); |
dev | 422 | drivers/net/de4x5.c | static void create_packet(struct device *dev, char *frame, int len); |
dev | 425 | drivers/net/de4x5.c | static void load_packet(struct device *dev, char *buf, u32 flags, struct sk_buff *skb); |
dev | 426 | drivers/net/de4x5.c | static void dc21040_autoconf(struct device *dev); |
dev | 427 | drivers/net/de4x5.c | static void dc21041_autoconf(struct device *dev); |
dev | 428 | drivers/net/de4x5.c | static void dc21140_autoconf(struct device *dev); |
dev | 429 | 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 | 431 | drivers/net/de4x5.c | static int ping_media(struct device *dev); |
dev | 432 | drivers/net/de4x5.c | static void reset_init_sia(struct device *dev, s32 sicr, s32 strr, s32 sigr); |
dev | 433 | drivers/net/de4x5.c | static int test_ans(struct device *dev, s32 irqs, s32 irq_mask, s32 msec); |
dev | 434 | drivers/net/de4x5.c | static void load_ms_timer(struct device *dev, u32 msec); |
dev | 445 | drivers/net/de4x5.c | static void SetMulticastFilter(struct device *dev, int num_addrs, char *addrs); |
dev | 446 | drivers/net/de4x5.c | static int get_hw_addr(struct device *dev); |
dev | 448 | drivers/net/de4x5.c | static void eisa_probe(struct device *dev, u_long iobase); |
dev | 449 | drivers/net/de4x5.c | static void pci_probe(struct device *dev, u_long iobase); |
dev | 450 | drivers/net/de4x5.c | static struct device *alloc_device(struct device *dev, u_long iobase); |
dev | 451 | drivers/net/de4x5.c | static char *build_setup_frame(struct device *dev, int mode); |
dev | 452 | drivers/net/de4x5.c | static void disable_ast(struct device *dev); |
dev | 453 | drivers/net/de4x5.c | static void enable_ast(struct device *dev, u32 time_out); |
dev | 454 | drivers/net/de4x5.c | static void kick_tx(struct device *dev); |
dev | 499 | drivers/net/de4x5.c | int de4x5_probe(struct device *dev) |
dev | 502 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 508 | drivers/net/de4x5.c | eisa_probe(dev, iobase); |
dev | 509 | drivers/net/de4x5.c | pci_probe(dev, iobase); |
dev | 512 | drivers/net/de4x5.c | printk("%s: de4x5_probe() cannot find device at 0x%04lx.\n", dev->name, |
dev | 520 | drivers/net/de4x5.c | for (; (dev->priv == NULL) && (dev->next != NULL); dev = dev->next); |
dev | 522 | drivers/net/de4x5.c | if (dev->priv) status = 0; |
dev | 530 | drivers/net/de4x5.c | de4x5_hw_init(struct device *dev, u_long iobase) |
dev | 563 | drivers/net/de4x5.c | dev->base_addr = iobase; |
dev | 566 | drivers/net/de4x5.c | dev->name, name, iobase, ((iobase>>12)&0x0f)); |
dev | 568 | drivers/net/de4x5.c | printk("%s: %s at %04lx (PCI bus %d, device %d)", dev->name, name, |
dev | 573 | drivers/net/de4x5.c | status = get_hw_addr(dev); |
dev | 575 | drivers/net/de4x5.c | printk("%2.2x:", dev->dev_addr[i]); |
dev | 577 | drivers/net/de4x5.c | printk("%2.2x,\n", dev->dev_addr[i]); |
dev | 589 | drivers/net/de4x5.c | dev->priv = (void *) kmalloc(sizeof(struct de4x5_private) + ALIGN, |
dev | 594 | drivers/net/de4x5.c | dev->priv = (void *)(((u_long)dev->priv + ALIGN) & ~ALIGN); |
dev | 595 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
dev | 596 | drivers/net/de4x5.c | memset(dev->priv, 0, sizeof(struct de4x5_private)); |
dev | 619 | drivers/net/de4x5.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
dev | 661 | drivers/net/de4x5.c | if (dev->irq < 2) { |
dev | 676 | drivers/net/de4x5.c | for (dev->irq=0,i=0; (i<sizeof(de4x5_irq)) && (!dev->irq); i++) { |
dev | 678 | drivers/net/de4x5.c | dev->irq = irqnum; |
dev | 679 | drivers/net/de4x5.c | printk(" and uses IRQ%d.\n", dev->irq); |
dev | 683 | drivers/net/de4x5.c | if (!dev->irq) { |
dev | 693 | drivers/net/de4x5.c | printk(" and requires IRQ%d (not probed).\n", dev->irq); |
dev | 697 | drivers/net/de4x5.c | dev->name); |
dev | 720 | drivers/net/de4x5.c | dev->open = &de4x5_open; |
dev | 721 | drivers/net/de4x5.c | dev->hard_start_xmit = &de4x5_queue_pkt; |
dev | 722 | drivers/net/de4x5.c | dev->stop = &de4x5_close; |
dev | 723 | drivers/net/de4x5.c | dev->get_stats = &de4x5_get_stats; |
dev | 725 | drivers/net/de4x5.c | dev->set_multicast_list = &set_multicast_list; |
dev | 727 | drivers/net/de4x5.c | dev->do_ioctl = &de4x5_ioctl; |
dev | 729 | drivers/net/de4x5.c | dev->mem_start = 0; |
dev | 732 | drivers/net/de4x5.c | ether_setup(dev); |
dev | 740 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 745 | drivers/net/de4x5.c | if (dev->priv) { |
dev | 746 | drivers/net/de4x5.c | kfree_s(dev->priv, sizeof(struct de4x5_private) + ALIGN); |
dev | 747 | drivers/net/de4x5.c | dev->priv = NULL; |
dev | 756 | drivers/net/de4x5.c | de4x5_open(struct device *dev) |
dev | 758 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 759 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 771 | drivers/net/de4x5.c | if (request_irq(dev->irq, (void *)de4x5_interrupt, 0, lp->adapter_name)) { |
dev | 772 | drivers/net/de4x5.c | printk("de4x5_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 776 | drivers/net/de4x5.c | irq2dev_map[dev->irq] = dev; |
dev | 780 | drivers/net/de4x5.c | status = de4x5_init(dev); |
dev | 783 | drivers/net/de4x5.c | printk("%s: de4x5 open with irq %d\n",dev->name,dev->irq); |
dev | 786 | drivers/net/de4x5.c | printk("%2.2x:",(short)dev->dev_addr[i]); |
dev | 826 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 827 | drivers/net/de4x5.c | dev->start = 1; |
dev | 828 | drivers/net/de4x5.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 829 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 869 | drivers/net/de4x5.c | de4x5_init(struct device *dev) |
dev | 871 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 872 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 877 | drivers/net/de4x5.c | set_bit(0, (void *)&dev->tbusy); |
dev | 909 | drivers/net/de4x5.c | SetMulticastFilter(dev, 0, NULL); |
dev | 912 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, HASH_F|TD_SET|SETUP_FRAME_LEN, NULL); |
dev | 914 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, PERFECT_F|TD_SET|SETUP_FRAME_LEN, NULL); |
dev | 925 | drivers/net/de4x5.c | printk("%s: Setup frame timed out, status %08x\n", dev->name, |
dev | 934 | drivers/net/de4x5.c | if (autoconf_media(dev) == 0) { |
dev | 945 | drivers/net/de4x5.c | de4x5_queue_pkt(struct sk_buff *skb, struct device *dev) |
dev | 947 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 948 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 957 | drivers/net/de4x5.c | if (set_bit(0, (void*)&dev->tbusy) == 0) { |
dev | 959 | drivers/net/de4x5.c | de4x5_tx(dev); |
dev | 960 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 969 | drivers/net/de4x5.c | if (dev->tbusy || (lp->lostMedia > LOST_MEDIA_THRESHOLD)) { |
dev | 970 | drivers/net/de4x5.c | u_long tickssofar = jiffies - dev->trans_start; |
dev | 976 | drivers/net/de4x5.c | printk("%s: transmit timed out, status %08x, tbusy:%ld, lostMedia:%d tickssofar:%ld, resetting.\n",dev->name, inl(DE4X5_STS), dev->tbusy, lp->lostMedia, tickssofar); |
dev | 987 | drivers/net/de4x5.c | dev_queue_xmit(lp->skb[i], dev, SOPRI_NORMAL); |
dev | 998 | drivers/net/de4x5.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 1004 | drivers/net/de4x5.c | status = de4x5_init(dev); |
dev | 1009 | drivers/net/de4x5.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 1010 | drivers/net/de4x5.c | dev->start = 1; |
dev | 1011 | drivers/net/de4x5.c | dev->tbusy = 0; |
dev | 1012 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 1027 | drivers/net/de4x5.c | dev->name, inl(DE4X5_STS)); |
dev | 1031 | drivers/net/de4x5.c | dev_tint(dev); |
dev | 1036 | drivers/net/de4x5.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 1037 | drivers/net/de4x5.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1042 | drivers/net/de4x5.c | load_packet(dev, skb->data, TD_IC | TD_LS | TD_FS | skb->len, skb); |
dev | 1048 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 1051 | drivers/net/de4x5.c | dev->tbusy = 0; /* Another pkt may be queued */ |
dev | 1077 | drivers/net/de4x5.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 1082 | drivers/net/de4x5.c | if (dev == NULL) { |
dev | 1085 | drivers/net/de4x5.c | lp = (struct de4x5_private *)dev->priv; |
dev | 1086 | drivers/net/de4x5.c | iobase = dev->base_addr; |
dev | 1088 | drivers/net/de4x5.c | if (dev->interrupt) |
dev | 1089 | drivers/net/de4x5.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 1092 | drivers/net/de4x5.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 1098 | drivers/net/de4x5.c | de4x5_rx(dev); |
dev | 1101 | drivers/net/de4x5.c | de4x5_tx(dev); |
dev | 1104 | drivers/net/de4x5.c | de4x5_ast(dev); |
dev | 1109 | drivers/net/de4x5.c | kick_tx(dev); |
dev | 1115 | drivers/net/de4x5.c | dev->name, sts); |
dev | 1119 | drivers/net/de4x5.c | if (TX_BUFFS_AVAIL && dev->tbusy) {/* Any resources available? */ |
dev | 1120 | drivers/net/de4x5.c | dev->tbusy = 0; /* Clear TX busy flag */ |
dev | 1124 | drivers/net/de4x5.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 1132 | drivers/net/de4x5.c | de4x5_rx(struct device *dev) |
dev | 1134 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1157 | drivers/net/de4x5.c | skb->dev = dev; |
dev | 1169 | drivers/net/de4x5.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1187 | drivers/net/de4x5.c | } else if ((*(s32 *)&buf[0] == *(s32 *)&dev->dev_addr[0]) && |
dev | 1188 | drivers/net/de4x5.c | (*(s16 *)&buf[4] == *(s16 *)&dev->dev_addr[4])) { |
dev | 1197 | drivers/net/de4x5.c | printk("%s: Insufficient memory; nuking packet.\n", dev->name); |
dev | 1225 | drivers/net/de4x5.c | de4x5_tx(struct device *dev) |
dev | 1227 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1228 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1249 | drivers/net/de4x5.c | kick_tx(dev); |
dev | 1272 | drivers/net/de4x5.c | de4x5_ast(struct device *dev) |
dev | 1274 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1275 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1278 | drivers/net/de4x5.c | disable_ast(dev); |
dev | 1289 | drivers/net/de4x5.c | kick_tx(dev); |
dev | 1294 | drivers/net/de4x5.c | enable_ast(dev, DE4X5_AUTOSENSE_MS); |
dev | 1299 | drivers/net/de4x5.c | enable_ast(dev, 1500); |
dev | 1304 | drivers/net/de4x5.c | enable_ast(dev, 4000); |
dev | 1310 | drivers/net/de4x5.c | enable_ast(dev, DE4X5_AUTOSENSE_MS); |
dev | 1318 | drivers/net/de4x5.c | de4x5_close(struct device *dev) |
dev | 1320 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1321 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1324 | drivers/net/de4x5.c | dev->start = 0; |
dev | 1325 | drivers/net/de4x5.c | dev->tbusy = 1; |
dev | 1329 | drivers/net/de4x5.c | dev->name, inl(DE4X5_STS)); |
dev | 1342 | drivers/net/de4x5.c | free_irq(dev->irq); |
dev | 1343 | drivers/net/de4x5.c | irq2dev_map[dev->irq] = 0; |
dev | 1357 | drivers/net/de4x5.c | de4x5_get_stats(struct device *dev) |
dev | 1359 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1360 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1367 | drivers/net/de4x5.c | static void load_packet(struct device *dev, char *buf, u32 flags, struct sk_buff *skb) |
dev | 1369 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1392 | drivers/net/de4x5.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1394 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1395 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1398 | drivers/net/de4x5.c | if (irq2dev_map[dev->irq] != NULL) { |
dev | 1400 | drivers/net/de4x5.c | SetMulticastFilter(dev, num_addrs, (char *)addrs); |
dev | 1402 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
dev | 1405 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
dev | 1411 | drivers/net/de4x5.c | dev->trans_start = jiffies; |
dev | 1423 | drivers/net/de4x5.c | static void SetMulticastFilter(struct device *dev, int num_addrs, char *addrs) |
dev | 1425 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1426 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1433 | drivers/net/de4x5.c | pa = build_setup_frame(dev, ALL); /* Build the basic frame */ |
dev | 1484 | drivers/net/de4x5.c | static void eisa_probe(struct device *dev, u_long ioaddr) |
dev | 1508 | drivers/net/de4x5.c | for (status = -ENODEV; (i<maxSlots) && (dev!=NULL); i++, iobase+=EISA_SLOT_INC) { |
dev | 1523 | drivers/net/de4x5.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1524 | drivers/net/de4x5.c | if ((status = de4x5_hw_init(dev, iobase)) == 0) { |
dev | 1530 | drivers/net/de4x5.c | printk("%s: region already allocated at 0x%04lx.\n", dev->name, iobase); |
dev | 1554 | drivers/net/de4x5.c | static void pci_probe(struct device *dev, u_long ioaddr) |
dev | 1610 | drivers/net/de4x5.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1611 | drivers/net/de4x5.c | dev->irq = irq; |
dev | 1612 | drivers/net/de4x5.c | if ((status = de4x5_hw_init(dev, iobase)) == 0) { |
dev | 1618 | drivers/net/de4x5.c | printk("%s: region already allocated at 0x%04x.\n", dev->name, (u_short)iobase); |
dev | 1635 | drivers/net/de4x5.c | static struct device *alloc_device(struct device *dev, u_long iobase) |
dev | 1645 | drivers/net/de4x5.c | while (dev->next != NULL) { |
dev | 1646 | drivers/net/de4x5.c | if ((dev->base_addr == DE4X5_NDA) || (dev->base_addr == 0)) break; |
dev | 1647 | drivers/net/de4x5.c | dev = dev->next; /* walk through eth device list */ |
dev | 1655 | drivers/net/de4x5.c | if ((dev->base_addr == 0) && (num_de4x5s > 0)) { |
dev | 1657 | drivers/net/de4x5.c | tmp = dev->next; /* point to the next device */ |
dev | 1658 | drivers/net/de4x5.c | init = dev->init; /* remember the probe function */ |
dev | 1665 | drivers/net/de4x5.c | if ((dev->next == NULL) && |
dev | 1666 | drivers/net/de4x5.c | !((dev->base_addr == DE4X5_NDA) || (dev->base_addr == 0))){ |
dev | 1667 | drivers/net/de4x5.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 1670 | drivers/net/de4x5.c | dev = dev->next; /* point to the new device */ |
dev | 1671 | drivers/net/de4x5.c | if (dev == NULL) { |
dev | 1680 | drivers/net/de4x5.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1682 | drivers/net/de4x5.c | sprintf(dev->name,"eth????"); /* New device name */ |
dev | 1684 | drivers/net/de4x5.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1686 | drivers/net/de4x5.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1687 | drivers/net/de4x5.c | dev->next = NULL; /* mark the end of list */ |
dev | 1688 | drivers/net/de4x5.c | dev->init = &de4x5_probe; /* initialisation routine */ |
dev | 1692 | drivers/net/de4x5.c | ret = dev; /* return current struct, or NULL */ |
dev | 1712 | drivers/net/de4x5.c | dev->name); |
dev | 1735 | drivers/net/de4x5.c | ret = dev; |
dev | 1747 | drivers/net/de4x5.c | static int autoconf_media(struct device *dev) |
dev | 1749 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1750 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1755 | drivers/net/de4x5.c | printk("%s: Searching for media... ",dev->name); |
dev | 1757 | drivers/net/de4x5.c | printk("%s: Searching for mode... ",dev->name); |
dev | 1763 | drivers/net/de4x5.c | dc21040_autoconf(dev); |
dev | 1766 | drivers/net/de4x5.c | dc21041_autoconf(dev); |
dev | 1768 | drivers/net/de4x5.c | disable_ast(dev); |
dev | 1770 | drivers/net/de4x5.c | dc21140_autoconf(dev); |
dev | 1803 | drivers/net/de4x5.c | static void dc21040_autoconf(struct device *dev) |
dev | 1805 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1806 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1812 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f01, 0xffff, 0x0000); |
dev | 1819 | drivers/net/de4x5.c | dc21040_autoconf(dev); |
dev | 1826 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f09, 0x0705, 0x0006); |
dev | 1828 | drivers/net/de4x5.c | linkBad = ping_media(dev); |
dev | 1831 | drivers/net/de4x5.c | dc21040_autoconf(dev); |
dev | 1837 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f01, 0xffff, 0x0000); |
dev | 1841 | drivers/net/de4x5.c | reset_init_sia(dev, 0x8f09, 0x0705, 0x0006); |
dev | 1854 | drivers/net/de4x5.c | static void dc21041_autoconf(struct device *dev) |
dev | 1856 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1857 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1866 | drivers/net/de4x5.c | sts = test_media(dev, irqs, irq_mask, 0xef01, 0xffff, 0x0008, 2400); |
dev | 1872 | drivers/net/de4x5.c | dc21041_autoconf(dev); |
dev | 1878 | drivers/net/de4x5.c | sts = test_ans(dev, irqs, irq_mask, 3000); |
dev | 1881 | drivers/net/de4x5.c | dc21041_autoconf(dev); |
dev | 1890 | drivers/net/de4x5.c | sts = test_media(dev, irqs, irq_mask, 0xef01, 0xff3f, 0x0008, 2400); |
dev | 1897 | drivers/net/de4x5.c | dc21041_autoconf(dev); |
dev | 1906 | drivers/net/de4x5.c | sts = test_media(dev, irqs, irq_mask, 0xef09, 0xf7fd, 0x000e, 1000); |
dev | 1909 | drivers/net/de4x5.c | dc21041_autoconf(dev); |
dev | 1918 | drivers/net/de4x5.c | sts = test_media(dev, irqs, irq_mask, 0xef09, 0xf7fd, 0x0006, 1000); |
dev | 1922 | drivers/net/de4x5.c | if (ping_media(dev)) lp->media = NC; |
dev | 1929 | drivers/net/de4x5.c | reset_init_sia(dev, 0xef01, 0xffff, 0x0008);/* Initialise the SIA */ |
dev | 1939 | drivers/net/de4x5.c | static void dc21140_autoconf(struct device *dev) |
dev | 1941 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1942 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1965 | drivers/net/de4x5.c | test_media(struct device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec) |
dev | 1967 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 1968 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 1971 | drivers/net/de4x5.c | reset_init_sia(dev, csr13, csr14, csr15); |
dev | 1974 | drivers/net/de4x5.c | load_ms_timer(dev, msec); |
dev | 2017 | drivers/net/de4x5.c | static int ping_media(struct device *dev) |
dev | 2019 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2020 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2025 | drivers/net/de4x5.c | create_packet(dev, frame, sizeof(frame)); |
dev | 2028 | drivers/net/de4x5.c | load_packet(dev, frame, TD_LS | TD_FS | sizeof(frame),NULL); |
dev | 2051 | drivers/net/de4x5.c | static int test_ans(struct device *dev, s32 irqs, s32 irq_mask, s32 msec) |
dev | 2053 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2054 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2060 | drivers/net/de4x5.c | load_ms_timer(dev, msec); |
dev | 2078 | drivers/net/de4x5.c | static void reset_init_sia(struct device *dev, s32 sicr, s32 strr, s32 sigr) |
dev | 2080 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2081 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2094 | drivers/net/de4x5.c | static void load_ms_timer(struct device *dev, u32 msec) |
dev | 2096 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2097 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2117 | drivers/net/de4x5.c | static void create_packet(struct device *dev, char *frame, int len) |
dev | 2123 | drivers/net/de4x5.c | *buf++ = dev->dev_addr[i]; |
dev | 2126 | drivers/net/de4x5.c | *buf++ = dev->dev_addr[i]; |
dev | 2214 | drivers/net/de4x5.c | } dev; |
dev | 2220 | drivers/net/de4x5.c | dev.llsig.a = ETH_PROM_SIG; |
dev | 2221 | drivers/net/de4x5.c | dev.llsig.b = ETH_PROM_SIG; |
dev | 2232 | drivers/net/de4x5.c | if (dev.Sig[j] == data) { /* track signature */ |
dev | 2235 | drivers/net/de4x5.c | if (data == dev.Sig[0]) { |
dev | 2257 | drivers/net/de4x5.c | static int get_hw_addr(struct device *dev) |
dev | 2259 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2272 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2275 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2277 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
dev | 2278 | drivers/net/de4x5.c | dev->dev_addr[i] = (u_char) lp->srom.ieee_addr[i]; i++; |
dev | 2282 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2284 | drivers/net/de4x5.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 2413 | drivers/net/de4x5.c | static char *build_setup_frame(struct device *dev, int mode) |
dev | 2415 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2426 | drivers/net/de4x5.c | *(pa + i) = dev->dev_addr[i]; /* Host address */ |
dev | 2432 | drivers/net/de4x5.c | *(pa + (i&1)) = dev->dev_addr[i]; |
dev | 2444 | drivers/net/de4x5.c | static void enable_ast(struct device *dev, u32 time_out) |
dev | 2446 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2447 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2451 | drivers/net/de4x5.c | load_ms_timer(dev, time_out); |
dev | 2456 | drivers/net/de4x5.c | static void disable_ast(struct device *dev) |
dev | 2458 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2459 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2463 | drivers/net/de4x5.c | load_ms_timer(dev, 0); |
dev | 2468 | drivers/net/de4x5.c | static void kick_tx(struct device *dev) |
dev | 2475 | drivers/net/de4x5.c | skb->dev=dev; |
dev | 2476 | drivers/net/de4x5.c | dev_queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 2486 | drivers/net/de4x5.c | static int de4x5_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 2488 | drivers/net/de4x5.c | struct de4x5_private *lp = (struct de4x5_private *)dev->priv; |
dev | 2490 | drivers/net/de4x5.c | u_long iobase = dev->base_addr; |
dev | 2506 | drivers/net/de4x5.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 2521 | drivers/net/de4x5.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 2523 | drivers/net/de4x5.c | build_setup_frame(dev, PHYS_ADDR_ONLY); |
dev | 2525 | drivers/net/de4x5.c | while (set_bit(0, (void *)&dev->tbusy) != 0);/* Wait for lock to free*/ |
dev | 2527 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | HASH_F | TD_SET | |
dev | 2530 | drivers/net/de4x5.c | load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | |
dev | 2535 | drivers/net/de4x5.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 2559 | drivers/net/de4x5.c | printk("%s: Boo!\n", dev->name); |
dev | 2575 | drivers/net/de4x5.c | set_multicast_list(dev, ioc->len, tmp.addr); |
dev | 2578 | drivers/net/de4x5.c | set_multicast_list(dev, ioc->len, NULL); |
dev | 2587 | drivers/net/de4x5.c | set_multicast_list(dev, 0, NULL); |
dev | 2662 | drivers/net/de4x5.c | tmp.addr[j++] = dev->irq; |
dev | 2664 | drivers/net/de4x5.c | tmp.addr[j++] = dev->dev_addr[i]; |
dev | 2713 | drivers/net/de4x5.c | tmp.addr[j++] = dev->tbusy; |
dev | 243 | drivers/net/de600.c | static byte de600_read_status(struct device *dev); |
dev | 244 | drivers/net/de600.c | static byte de600_read_byte(unsigned char type, struct device *dev); |
dev | 247 | drivers/net/de600.c | static int de600_open(struct device *dev); |
dev | 248 | drivers/net/de600.c | static int de600_close(struct device *dev); |
dev | 249 | drivers/net/de600.c | static struct netstats *get_stats(struct device *dev); |
dev | 250 | drivers/net/de600.c | static int de600_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 254 | drivers/net/de600.c | static int de600_tx_intr(struct device *dev, int irq_status); |
dev | 255 | drivers/net/de600.c | static void de600_rx_intr(struct device *dev); |
dev | 258 | drivers/net/de600.c | static void trigger_interrupt(struct device *dev); |
dev | 259 | drivers/net/de600.c | int de600_probe(struct device *dev); |
dev | 260 | drivers/net/de600.c | static int adapter_init(struct device *dev); |
dev | 310 | drivers/net/de600.c | de600_read_status(struct device *dev) |
dev | 322 | drivers/net/de600.c | de600_read_byte(unsigned char type, struct device *dev) { /* dev used by macros */ |
dev | 340 | drivers/net/de600.c | de600_open(struct device *dev) |
dev | 343 | drivers/net/de600.c | printk ("%s: unable to get IRQ %d\n", dev->name, DE600_IRQ); |
dev | 346 | drivers/net/de600.c | irq2dev_map[DE600_IRQ] = dev; |
dev | 351 | drivers/net/de600.c | dev->start = 1; |
dev | 352 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 363 | drivers/net/de600.c | de600_close(struct device *dev) |
dev | 372 | drivers/net/de600.c | if (dev->start) { |
dev | 375 | drivers/net/de600.c | dev->start = 0; |
dev | 384 | drivers/net/de600.c | get_stats(struct device *dev) |
dev | 386 | drivers/net/de600.c | return (struct netstats *)(dev->priv); |
dev | 390 | drivers/net/de600.c | trigger_interrupt(struct device *dev) |
dev | 404 | drivers/net/de600.c | de600_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 418 | drivers/net/de600.c | dev_tint(dev); |
dev | 423 | drivers/net/de600.c | tickssofar = jiffies - dev->trans_start; |
dev | 430 | drivers/net/de600.c | dev->name, |
dev | 435 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 454 | drivers/net/de600.c | de600_read_byte(READ_DATA, dev); |
dev | 455 | drivers/net/de600.c | if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) { |
dev | 456 | drivers/net/de600.c | if (adapter_init(dev)) { |
dev | 468 | drivers/net/de600.c | dev->trans_start = jiffies; |
dev | 469 | drivers/net/de600.c | dev->tbusy = 0; /* allow more packets into adapter */ |
dev | 475 | drivers/net/de600.c | dev->tbusy = !free_tx_pages; |
dev | 500 | drivers/net/de600.c | struct device *dev = irq2dev_map[irq]; |
dev | 506 | drivers/net/de600.c | if ((dev == NULL) || (dev->start == 0) || (DE600_IRQ != irq)) { |
dev | 507 | drivers/net/de600.c | printk("%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); |
dev | 511 | drivers/net/de600.c | dev->interrupt = 1; |
dev | 513 | drivers/net/de600.c | irq_status = de600_read_status(dev); |
dev | 519 | drivers/net/de600.c | de600_rx_intr(dev); |
dev | 525 | drivers/net/de600.c | retrig = de600_tx_intr(dev, irq_status); |
dev | 529 | drivers/net/de600.c | irq_status = de600_read_status(dev); |
dev | 538 | drivers/net/de600.c | dev->interrupt = 0; |
dev | 542 | drivers/net/de600.c | trigger_interrupt(dev); |
dev | 549 | drivers/net/de600.c | de600_tx_intr(struct device *dev, int irq_status) |
dev | 565 | drivers/net/de600.c | ((struct netstats *)(dev->priv))->tx_packets++; |
dev | 566 | drivers/net/de600.c | dev->tbusy = 0; |
dev | 571 | drivers/net/de600.c | dev->trans_start = jiffies; |
dev | 585 | drivers/net/de600.c | de600_rx_intr(struct device *dev) |
dev | 595 | drivers/net/de600.c | size = de600_read_byte(RX_LEN, dev); /* low byte */ |
dev | 596 | drivers/net/de600.c | size += (de600_read_byte(RX_LEN, dev) << 8); /* high byte */ |
dev | 606 | drivers/net/de600.c | printk("%s: Bogus packet size %d.\n", dev->name, size); |
dev | 608 | drivers/net/de600.c | adapter_init(dev); |
dev | 616 | drivers/net/de600.c | dev->name, size); |
dev | 621 | drivers/net/de600.c | skb->dev = dev; |
dev | 630 | drivers/net/de600.c | *buffer = de600_read_byte(READ_DATA, dev); |
dev | 632 | drivers/net/de600.c | ((struct netstats *)(dev->priv))->rx_packets++; /* count all receives */ |
dev | 634 | drivers/net/de600.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 645 | drivers/net/de600.c | de600_probe(struct device *dev) |
dev | 651 | drivers/net/de600.c | printk("%s: D-Link DE-600 pocket adapter", dev->name); |
dev | 659 | drivers/net/de600.c | (void)de600_read_status(dev); |
dev | 662 | drivers/net/de600.c | if (de600_read_status(dev) & 0xf0) { |
dev | 675 | drivers/net/de600.c | dev->dev_addr[i] = de600_read_byte(READ_DATA, dev); |
dev | 676 | drivers/net/de600.c | dev->broadcast[i] = 0xff; |
dev | 680 | drivers/net/de600.c | if ((dev->dev_addr[1] == 0xde) && (dev->dev_addr[2] == 0x15)) { |
dev | 682 | drivers/net/de600.c | dev->dev_addr[0] = 0x00; |
dev | 683 | drivers/net/de600.c | dev->dev_addr[1] = 0x80; |
dev | 684 | drivers/net/de600.c | dev->dev_addr[2] = 0xc8; |
dev | 685 | drivers/net/de600.c | dev->dev_addr[3] &= 0x0f; |
dev | 686 | drivers/net/de600.c | dev->dev_addr[3] |= 0x70; |
dev | 700 | drivers/net/de600.c | printk(", Ethernet Address: %02X", dev->dev_addr[0]); |
dev | 702 | drivers/net/de600.c | printk(":%02X",dev->dev_addr[i]); |
dev | 707 | drivers/net/de600.c | dev->priv = &de600_netstats; |
dev | 709 | drivers/net/de600.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 710 | drivers/net/de600.c | dev->get_stats = get_stats; |
dev | 712 | drivers/net/de600.c | dev->open = de600_open; |
dev | 713 | drivers/net/de600.c | dev->stop = de600_close; |
dev | 714 | drivers/net/de600.c | dev->hard_start_xmit = &de600_start_xmit; |
dev | 716 | drivers/net/de600.c | ether_setup(dev); |
dev | 723 | drivers/net/de600.c | adapter_init(struct device *dev) |
dev | 739 | drivers/net/de600.c | de600_read_byte(READ_DATA, dev); |
dev | 740 | drivers/net/de600.c | if ((de600_read_byte(READ_DATA, dev) != 0xde) || |
dev | 741 | drivers/net/de600.c | (de600_read_byte(READ_DATA, dev) != 0x15)) { |
dev | 750 | drivers/net/de600.c | dev->flags &= ~IFF_UP; |
dev | 751 | drivers/net/de600.c | de600_close(dev); |
dev | 754 | drivers/net/de600.c | dev->tbusy = 1; /* Transmit busy... */ |
dev | 763 | drivers/net/de600.c | dev->tbusy = 0; /* Transmit busy... */ |
dev | 764 | drivers/net/de600.c | dev->interrupt = 0; |
dev | 772 | drivers/net/de600.c | de600_put_byte(dev->dev_addr[i]); |
dev | 408 | drivers/net/de620.c | de620_open(struct device *dev) |
dev | 411 | drivers/net/de620.c | printk ("%s: unable to get IRQ %d\n", dev->name, DE620_IRQ); |
dev | 414 | drivers/net/de620.c | irq2dev_map[DE620_IRQ] = dev; |
dev | 419 | drivers/net/de620.c | if (adapter_init(dev)) { |
dev | 422 | drivers/net/de620.c | dev->start = 1; |
dev | 432 | drivers/net/de620.c | de620_close(struct device *dev) |
dev | 440 | drivers/net/de620.c | dev->start = 0; |
dev | 453 | drivers/net/de620.c | get_stats(struct device *dev) |
dev | 455 | drivers/net/de620.c | return (struct netstats *)(dev->priv); |
dev | 469 | drivers/net/de620.c | de620_set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 485 | drivers/net/de620.c | de620_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 500 | drivers/net/de620.c | dev_tint(dev); |
dev | 505 | drivers/net/de620.c | dev->tbusy = (using_txbuf == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 507 | drivers/net/de620.c | if (dev->tbusy) { /* Do timeouts, to avoid hangs. */ |
dev | 508 | drivers/net/de620.c | tickssofar = jiffies - dev->trans_start; |
dev | 515 | drivers/net/de620.c | dev->name, |
dev | 520 | drivers/net/de620.c | if (adapter_init(dev)) /* maybe close it */ |
dev | 557 | drivers/net/de620.c | dev->trans_start = jiffies; |
dev | 558 | drivers/net/de620.c | dev->tbusy = (using_txbuf == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 560 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->tx_packets++; |
dev | 577 | drivers/net/de620.c | struct device *dev = irq2dev_map[irq]; |
dev | 583 | drivers/net/de620.c | if ((dev == NULL) || (DE620_IRQ != irq)) { |
dev | 584 | drivers/net/de620.c | printk("%s: bogus interrupt %d\n", dev?dev->name:"DE620", irq); |
dev | 589 | drivers/net/de620.c | dev->interrupt = 1; |
dev | 598 | drivers/net/de620.c | again = de620_rx_intr(dev); |
dev | 604 | drivers/net/de620.c | dev->tbusy = (de620_tx_buffs() == (TXBF0 | TXBF1)); /* Boolean! */ |
dev | 606 | drivers/net/de620.c | dev->interrupt = 0; |
dev | 619 | drivers/net/de620.c | de620_rx_intr(struct device *dev) |
dev | 648 | drivers/net/de620.c | printk("%s: Ring overrun? Restoring...\n", dev->name); |
dev | 650 | drivers/net/de620.c | adapter_init(dev); |
dev | 651 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_over_errors++; |
dev | 667 | drivers/net/de620.c | printk("%s: Page link out of sync! Restoring...\n", dev->name); |
dev | 671 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_over_errors++; |
dev | 678 | drivers/net/de620.c | printk("%s: Illegal packet size: %d!\n", dev->name, size); |
dev | 684 | drivers/net/de620.c | dev->name, size); |
dev | 685 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_dropped++; |
dev | 689 | drivers/net/de620.c | skb->dev = dev; |
dev | 696 | drivers/net/de620.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 699 | drivers/net/de620.c | ((struct netstats *)(dev->priv))->rx_packets++; |
dev | 718 | drivers/net/de620.c | adapter_init(struct device *dev) |
dev | 746 | drivers/net/de620.c | de620_set_register(W_PAR0 + i, dev->dev_addr[i]); |
dev | 779 | drivers/net/de620.c | dev->flags &= ~IFF_UP; |
dev | 780 | drivers/net/de620.c | de620_close(dev); |
dev | 806 | drivers/net/de620.c | de620_probe(struct device *dev) |
dev | 840 | drivers/net/de620.c | dev->dev_addr[0] = nic_data.NodeID[0]); |
dev | 842 | drivers/net/de620.c | printk(":%2.2X", dev->dev_addr[i] = nic_data.NodeID[i]); |
dev | 843 | drivers/net/de620.c | dev->broadcast[i] = 0xff; |
dev | 856 | drivers/net/de620.c | dev->priv = &de620_netstats; |
dev | 858 | drivers/net/de620.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 859 | drivers/net/de620.c | dev->get_stats = get_stats; |
dev | 860 | drivers/net/de620.c | dev->open = de620_open; |
dev | 861 | drivers/net/de620.c | dev->stop = de620_close; |
dev | 862 | drivers/net/de620.c | dev->hard_start_xmit = &de620_start_xmit; |
dev | 863 | drivers/net/de620.c | dev->set_multicast_list = &de620_set_multicast_list; |
dev | 864 | drivers/net/de620.c | dev->base_addr = DE620_IO; |
dev | 865 | drivers/net/de620.c | dev->irq = DE620_IRQ; |
dev | 867 | drivers/net/de620.c | ether_setup(dev); |
dev | 367 | drivers/net/depca.c | static int depca_open(struct device *dev); |
dev | 368 | drivers/net/depca.c | static int depca_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 370 | drivers/net/depca.c | static int depca_close(struct device *dev); |
dev | 371 | drivers/net/depca.c | static int depca_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 372 | drivers/net/depca.c | static struct enet_statistics *depca_get_stats(struct device *dev); |
dev | 373 | drivers/net/depca.c | static void set_multicast_list(struct device *dev,int num_addrs,void *addrs); |
dev | 378 | drivers/net/depca.c | static int depca_hw_init(struct device *dev, u_long ioaddr); |
dev | 379 | drivers/net/depca.c | static void depca_init_ring(struct device *dev); |
dev | 380 | drivers/net/depca.c | static int depca_rx(struct device *dev); |
dev | 381 | drivers/net/depca.c | static int depca_tx(struct device *dev); |
dev | 383 | drivers/net/depca.c | static void LoadCSRs(struct device *dev); |
dev | 384 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev); |
dev | 387 | drivers/net/depca.c | static int get_hw_addr(struct device *dev); |
dev | 389 | drivers/net/depca.c | static void SetMulticastFilter(struct device *dev,int num_addrs,char *addrs); |
dev | 390 | drivers/net/depca.c | static void isa_probe(struct device *dev, u_long iobase); |
dev | 391 | drivers/net/depca.c | static void eisa_probe(struct device *dev, u_long iobase); |
dev | 392 | drivers/net/depca.c | static struct device *alloc_device(struct device *dev, u_long iobase); |
dev | 393 | drivers/net/depca.c | static int load_packet(struct device *dev, struct sk_buff *skb); |
dev | 419 | drivers/net/depca.c | int depca_probe(struct device *dev) |
dev | 422 | drivers/net/depca.c | u_long iobase = dev->base_addr; |
dev | 428 | drivers/net/depca.c | isa_probe(dev, iobase); |
dev | 429 | drivers/net/depca.c | eisa_probe(dev, iobase); |
dev | 432 | drivers/net/depca.c | printk("%s: depca_probe() cannot find device at 0x%04lx.\n", dev->name, |
dev | 440 | drivers/net/depca.c | for (; (dev->priv == NULL) && (dev->next != NULL); dev = dev->next); |
dev | 442 | drivers/net/depca.c | if (dev->priv) status = 0; |
dev | 450 | drivers/net/depca.c | depca_hw_init(struct device *dev, u_long ioaddr) |
dev | 471 | drivers/net/depca.c | dev->base_addr = ioaddr; |
dev | 475 | drivers/net/depca.c | dev->name, name, ioaddr, (int)((ioaddr>>12)&0x0f)); |
dev | 477 | drivers/net/depca.c | printk("%s: %s at 0x%04lx", dev->name, name, ioaddr); |
dev | 481 | drivers/net/depca.c | status = get_hw_addr(dev); |
dev | 483 | drivers/net/depca.c | printk("%2.2x:", dev->dev_addr[i]); |
dev | 485 | drivers/net/depca.c | printk("%2.2x", dev->dev_addr[i]); |
dev | 513 | drivers/net/depca.c | dev->priv = (void *) kmalloc(sizeof(struct depca_private), GFP_KERNEL); |
dev | 514 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 515 | drivers/net/depca.c | memset((char *)dev->priv, 0, sizeof(struct depca_private)); |
dev | 517 | drivers/net/depca.c | sprintf(lp->adapter_name,"%s (%s)", name, dev->name); |
dev | 552 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 555 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 563 | drivers/net/depca.c | if (dev->irq < 2) { |
dev | 594 | drivers/net/depca.c | for (dev->irq=0,i=0; (depca_irq[i]) && (!dev->irq); i++) { |
dev | 596 | drivers/net/depca.c | dev->irq = irqnum; |
dev | 597 | drivers/net/depca.c | printk(" and uses IRQ%d.\n", dev->irq); |
dev | 601 | drivers/net/depca.c | if (!dev->irq) { |
dev | 608 | drivers/net/depca.c | printk(" and assigned IRQ%d.\n", dev->irq); |
dev | 627 | drivers/net/depca.c | dev->open = &depca_open; |
dev | 628 | drivers/net/depca.c | dev->hard_start_xmit = &depca_start_xmit; |
dev | 629 | drivers/net/depca.c | dev->stop = &depca_close; |
dev | 630 | drivers/net/depca.c | dev->get_stats = &depca_get_stats; |
dev | 631 | drivers/net/depca.c | dev->set_multicast_list = &set_multicast_list; |
dev | 632 | drivers/net/depca.c | dev->do_ioctl = &depca_ioctl; |
dev | 634 | drivers/net/depca.c | dev->mem_start = 0; |
dev | 637 | drivers/net/depca.c | ether_setup(dev); |
dev | 639 | drivers/net/depca.c | if (dev->priv) { |
dev | 640 | drivers/net/depca.c | kfree_s(dev->priv, sizeof(struct depca_private)); |
dev | 641 | drivers/net/depca.c | dev->priv = NULL; |
dev | 653 | drivers/net/depca.c | depca_open(struct device *dev) |
dev | 655 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 657 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 661 | drivers/net/depca.c | if (request_irq(dev->irq, &depca_interrupt, 0, lp->adapter_name)) { |
dev | 662 | drivers/net/depca.c | printk("depca_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 666 | drivers/net/depca.c | irq2dev_map[dev->irq] = dev; |
dev | 677 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 678 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 684 | drivers/net/depca.c | printk("%s: depca open with irq %d\n",dev->name,dev->irq); |
dev | 750 | drivers/net/depca.c | dev->tbusy = 0; |
dev | 751 | drivers/net/depca.c | dev->interrupt = 0; |
dev | 752 | drivers/net/depca.c | dev->start = 1; |
dev | 754 | drivers/net/depca.c | status = InitRestartDepca(dev); |
dev | 768 | drivers/net/depca.c | depca_init_ring(struct device *dev) |
dev | 770 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 775 | drivers/net/depca.c | set_bit(0, (void *)&dev->tbusy); |
dev | 796 | drivers/net/depca.c | SetMulticastFilter(dev, 0, NULL); |
dev | 799 | drivers/net/depca.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 811 | drivers/net/depca.c | depca_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 813 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 814 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 818 | drivers/net/depca.c | if (dev->tbusy) { |
dev | 819 | drivers/net/depca.c | int tickssofar = jiffies - dev->trans_start; |
dev | 824 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 827 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 828 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 829 | drivers/net/depca.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 830 | drivers/net/depca.c | dev->start = 1; |
dev | 831 | drivers/net/depca.c | dev->tbusy=0; |
dev | 832 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 833 | drivers/net/depca.c | InitRestartDepca(dev); |
dev | 837 | drivers/net/depca.c | dev_tint(dev); |
dev | 840 | drivers/net/depca.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 841 | drivers/net/depca.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 845 | drivers/net/depca.c | status = load_packet(dev, skb); |
dev | 852 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 856 | drivers/net/depca.c | dev->tbusy=0; |
dev | 873 | drivers/net/depca.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 878 | drivers/net/depca.c | if (dev == NULL) { |
dev | 881 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 882 | drivers/net/depca.c | ioaddr = dev->base_addr; |
dev | 884 | drivers/net/depca.c | if (dev->interrupt) |
dev | 885 | drivers/net/depca.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 887 | drivers/net/depca.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 901 | drivers/net/depca.c | depca_rx(dev); |
dev | 904 | drivers/net/depca.c | depca_tx(dev); |
dev | 906 | drivers/net/depca.c | if ((TX_BUFFS_AVAIL >= 0) && dev->tbusy) { /* any resources available? */ |
dev | 907 | drivers/net/depca.c | dev->tbusy = 0; /* clear TX busy flag */ |
dev | 915 | drivers/net/depca.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 922 | drivers/net/depca.c | depca_rx(struct device *dev) |
dev | 924 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 951 | drivers/net/depca.c | skb->dev = dev; |
dev | 964 | drivers/net/depca.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 983 | drivers/net/depca.c | } else if ((*(s16 *)&buf[0] == *(s16 *)&dev->dev_addr[0]) && |
dev | 984 | drivers/net/depca.c | (*(s32 *)&buf[2] == *(s32 *)&dev->dev_addr[2])) { |
dev | 993 | drivers/net/depca.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 1019 | drivers/net/depca.c | depca_tx(struct device *dev) |
dev | 1021 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1024 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1057 | drivers/net/depca.c | depca_close(struct device *dev) |
dev | 1059 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1061 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1063 | drivers/net/depca.c | dev->start = 0; |
dev | 1064 | drivers/net/depca.c | dev->tbusy = 1; |
dev | 1070 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 1091 | drivers/net/depca.c | free_irq(dev->irq); |
dev | 1092 | drivers/net/depca.c | irq2dev_map[dev->irq] = NULL; |
dev | 1099 | drivers/net/depca.c | static void LoadCSRs(struct device *dev) |
dev | 1101 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1102 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1116 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev) |
dev | 1118 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1119 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1136 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
dev | 1140 | drivers/net/depca.c | dev->name, i, lp->sh_mem, inw(DEPCA_DATA)); |
dev | 1148 | drivers/net/depca.c | depca_get_stats(struct device *dev) |
dev | 1150 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1165 | drivers/net/depca.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1167 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1168 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1170 | drivers/net/depca.c | if (irq2dev_map[dev->irq] != NULL) { |
dev | 1171 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1172 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1176 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1179 | drivers/net/depca.c | SetMulticastFilter(dev, num_addrs, (char *)addrs); |
dev | 1185 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1186 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1187 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1197 | drivers/net/depca.c | static void SetMulticastFilter(struct device *dev, int num_addrs, char *addrs) |
dev | 1199 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1245 | drivers/net/depca.c | static void isa_probe(struct device *dev, u_long ioaddr) |
dev | 1261 | drivers/net/depca.c | for (; (i<maxSlots) && (dev!=NULL) && ports[i]; i++) { |
dev | 1264 | drivers/net/depca.c | if ((dev = alloc_device(dev, ports[i])) != NULL) { |
dev | 1265 | drivers/net/depca.c | if (depca_hw_init(dev, ports[i]) == 0) { |
dev | 1271 | drivers/net/depca.c | printk("%s: region already allocated at 0x%04x.\n", dev->name,ports[i]); |
dev | 1283 | drivers/net/depca.c | static void eisa_probe(struct device *dev, u_long ioaddr) |
dev | 1303 | drivers/net/depca.c | for (; (i<maxSlots) && (dev!=NULL); i++, iobase+=EISA_SLOT_INC) { |
dev | 1307 | drivers/net/depca.c | if ((dev = alloc_device(dev, iobase)) != NULL) { |
dev | 1308 | drivers/net/depca.c | if (depca_hw_init(dev, iobase) == 0) { |
dev | 1314 | drivers/net/depca.c | printk("%s: region already allocated at 0x%04lx.\n",dev->name,iobase); |
dev | 1327 | drivers/net/depca.c | static struct device *alloc_device(struct device *dev, u_long iobase) |
dev | 1337 | drivers/net/depca.c | while (dev->next != NULL) { |
dev | 1338 | drivers/net/depca.c | if ((dev->base_addr == DEPCA_NDA) || (dev->base_addr == 0)) break; |
dev | 1339 | drivers/net/depca.c | dev = dev->next; /* walk through eth device list */ |
dev | 1347 | drivers/net/depca.c | if ((dev->base_addr == 0) && (num_depcas > 0)) { |
dev | 1349 | drivers/net/depca.c | tmp = dev->next; /* point to the next device */ |
dev | 1350 | drivers/net/depca.c | init = dev->init; /* remember the probe function */ |
dev | 1357 | drivers/net/depca.c | if ((dev->next == NULL) && |
dev | 1358 | drivers/net/depca.c | !((dev->base_addr == DEPCA_NDA) || (dev->base_addr == 0))){ |
dev | 1359 | drivers/net/depca.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 1362 | drivers/net/depca.c | dev = dev->next; /* point to the new device */ |
dev | 1363 | drivers/net/depca.c | if (dev == NULL) { |
dev | 1372 | drivers/net/depca.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1374 | drivers/net/depca.c | sprintf(dev->name,"eth????"); /* New device name */ |
dev | 1376 | drivers/net/depca.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1378 | drivers/net/depca.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1379 | drivers/net/depca.c | dev->next = NULL; /* mark the end of list */ |
dev | 1380 | drivers/net/depca.c | dev->init = &depca_probe; /* initialisation routine */ |
dev | 1384 | drivers/net/depca.c | ret = dev; /* return current struct, or NULL */ |
dev | 1404 | drivers/net/depca.c | dev->name); |
dev | 1427 | drivers/net/depca.c | ret = dev; |
dev | 1490 | drivers/net/depca.c | } dev; |
dev | 1505 | drivers/net/depca.c | dev.llsig.a = ETH_PROM_SIG; |
dev | 1506 | drivers/net/depca.c | dev.llsig.b = ETH_PROM_SIG; |
dev | 1511 | drivers/net/depca.c | if (dev.Sig[j] == data) { /* track signature */ |
dev | 1514 | drivers/net/depca.c | if (data == dev.Sig[0]) { /* rare case.... */ |
dev | 1534 | drivers/net/depca.c | static int get_hw_addr(struct device *dev) |
dev | 1536 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1547 | drivers/net/depca.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 1549 | drivers/net/depca.c | dev->dev_addr[i++] = (u_char) tmp; |
dev | 1565 | drivers/net/depca.c | static int load_packet(struct device *dev, struct sk_buff *skb) |
dev | 1567 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1657 | drivers/net/depca.c | static int depca_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 1659 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1662 | drivers/net/depca.c | u_long ioaddr = dev->base_addr; |
dev | 1672 | drivers/net/depca.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 1685 | drivers/net/depca.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 1687 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1688 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1692 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1693 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1694 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1695 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1704 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1705 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1709 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1712 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1713 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1714 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1722 | drivers/net/depca.c | while(dev->tbusy); /* Stop ring access */ |
dev | 1723 | drivers/net/depca.c | set_bit(0, (void*)&dev->tbusy); |
dev | 1727 | drivers/net/depca.c | depca_init_ring(dev); /* Initialize the descriptor rings */ |
dev | 1730 | drivers/net/depca.c | LoadCSRs(dev); /* Reload CSR3 */ |
dev | 1731 | drivers/net/depca.c | InitRestartDepca(dev); /* Resume normal operation. */ |
dev | 1732 | drivers/net/depca.c | dev->tbusy = 0; /* Unlock the TX ring */ |
dev | 1739 | drivers/net/depca.c | printk("%s: Boo!\n", dev->name); |
dev | 1754 | drivers/net/depca.c | set_multicast_list(dev, ioc->len, tmp.addr); |
dev | 1757 | drivers/net/depca.c | set_multicast_list(dev, ioc->len, NULL); |
dev | 1766 | drivers/net/depca.c | set_multicast_list(dev, 0, NULL); |
dev | 1774 | drivers/net/depca.c | set_multicast_list(dev, HASH_TABLE_LEN, NULL); |
dev | 59 | drivers/net/dummy.c | static int dummy_xmit(struct sk_buff *skb, struct device *dev); |
dev | 61 | drivers/net/dummy.c | static struct enet_statistics *dummy_get_stats(struct device *dev); |
dev | 65 | drivers/net/dummy.c | static int dummy_open(struct device *dev) |
dev | 71 | drivers/net/dummy.c | static int dummy_close(struct device *dev) |
dev | 80 | drivers/net/dummy.c | int dummy_init(struct device *dev) |
dev | 87 | drivers/net/dummy.c | dev->hard_start_xmit = dummy_xmit; |
dev | 90 | drivers/net/dummy.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 91 | drivers/net/dummy.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 92 | drivers/net/dummy.c | dev->get_stats = dummy_get_stats; |
dev | 95 | drivers/net/dummy.c | dev->open = &dummy_open; |
dev | 96 | drivers/net/dummy.c | dev->stop = &dummy_close; |
dev | 100 | drivers/net/dummy.c | ether_setup(dev); |
dev | 101 | drivers/net/dummy.c | dev->flags |= IFF_NOARP; |
dev | 107 | drivers/net/dummy.c | dummy_xmit(struct sk_buff *skb, struct device *dev) |
dev | 113 | drivers/net/dummy.c | if (skb == NULL || dev == NULL) |
dev | 119 | drivers/net/dummy.c | stats = (struct enet_statistics *)dev->priv; |
dev | 128 | drivers/net/dummy.c | dummy_get_stats(struct device *dev) |
dev | 130 | drivers/net/dummy.c | struct enet_statistics *stats = (struct enet_statistics*) dev->priv; |
dev | 138 | drivers/net/dummy.c | static int dummy_probe(struct device *dev) |
dev | 140 | drivers/net/dummy.c | dummy_init(dev); |
dev | 92 | drivers/net/e2100.c | int e2100_probe(struct device *dev); |
dev | 93 | drivers/net/e2100.c | int e21_probe1(struct device *dev, int ioaddr); |
dev | 95 | drivers/net/e2100.c | static int e21_open(struct device *dev); |
dev | 96 | drivers/net/e2100.c | static void e21_reset_8390(struct device *dev); |
dev | 97 | drivers/net/e2100.c | static int e21_block_input(struct device *dev, int count, |
dev | 99 | drivers/net/e2100.c | static void e21_block_output(struct device *dev, int count, |
dev | 101 | drivers/net/e2100.c | static int e21_close(struct device *dev); |
dev | 111 | drivers/net/e2100.c | int e2100_probe(struct device *dev) |
dev | 114 | drivers/net/e2100.c | int base_addr = dev->base_addr; |
dev | 117 | drivers/net/e2100.c | return e21_probe1(dev, base_addr); |
dev | 124 | drivers/net/e2100.c | if (e21_probe1(dev, *port) == 0) |
dev | 131 | drivers/net/e2100.c | int e21_probe1(struct device *dev, int ioaddr) |
dev | 134 | drivers/net/e2100.c | unsigned char *station_addr = dev->dev_addr; |
dev | 159 | drivers/net/e2100.c | printk("%s: E21** at %#3x,", dev->name, ioaddr); |
dev | 163 | drivers/net/e2100.c | if (dev->irq < 2) { |
dev | 167 | drivers/net/e2100.c | dev->irq = irqlist[i]; |
dev | 171 | drivers/net/e2100.c | printk(" unable to get IRQ %d.\n", dev->irq); |
dev | 174 | drivers/net/e2100.c | } else if (dev->irq == 2) /* Fixup luser bogosity: IRQ2 is really IRQ9 */ |
dev | 175 | drivers/net/e2100.c | dev->irq = 9; |
dev | 178 | drivers/net/e2100.c | dev->base_addr = ioaddr; |
dev | 180 | drivers/net/e2100.c | ethdev_init(dev); |
dev | 187 | drivers/net/e2100.c | ei_status.saved_irq = dev->irq; |
dev | 191 | drivers/net/e2100.c | if (dev->mem_end & 15) |
dev | 192 | drivers/net/e2100.c | dev->if_port = dev->mem_end & 7; |
dev | 194 | drivers/net/e2100.c | dev->if_port = 0; |
dev | 198 | drivers/net/e2100.c | dev->if_port = 1; |
dev | 206 | drivers/net/e2100.c | if (dev->mem_start == 0) |
dev | 207 | drivers/net/e2100.c | dev->mem_start = 0xd0000; |
dev | 212 | drivers/net/e2100.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 213 | drivers/net/e2100.c | dev->mem_end = dev->rmem_end = dev->mem_start + 2*1024; |
dev | 216 | drivers/net/e2100.c | printk(", IRQ %d, %s media, memory @ %#lx.\n", dev->irq, |
dev | 217 | drivers/net/e2100.c | dev->if_port ? "secondary" : "primary", dev->mem_start); |
dev | 225 | drivers/net/e2100.c | dev->open = &e21_open; |
dev | 226 | drivers/net/e2100.c | dev->stop = &e21_close; |
dev | 227 | drivers/net/e2100.c | NS8390_init(dev, 0); |
dev | 233 | drivers/net/e2100.c | e21_open(struct device *dev) |
dev | 235 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 237 | drivers/net/e2100.c | if (request_irq(dev->irq, ei_interrupt, 0, "e2100")) { |
dev | 240 | drivers/net/e2100.c | irq2dev_map[dev->irq] = dev; |
dev | 244 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + (dev->irq & 7)); |
dev | 246 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + (dev->irq > 7 ? 1:0) |
dev | 247 | drivers/net/e2100.c | + (dev->if_port ? E21_ALT_IFPORT : 0)); |
dev | 249 | drivers/net/e2100.c | outb(0, ioaddr + E21_ASIC + ((dev->mem_start >> 17) & 7)); |
dev | 251 | drivers/net/e2100.c | return ei_open(dev); |
dev | 255 | drivers/net/e2100.c | e21_reset_8390(struct device *dev) |
dev | 257 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 273 | drivers/net/e2100.c | e21_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 275 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 276 | drivers/net/e2100.c | char *shared_mem = (char *)dev->mem_start; |
dev | 294 | drivers/net/e2100.c | e21_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 297 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 298 | drivers/net/e2100.c | volatile char *shared_mem = (char *)dev->mem_start; |
dev | 310 | drivers/net/e2100.c | e21_close(struct device *dev) |
dev | 312 | drivers/net/e2100.c | short ioaddr = dev->base_addr; |
dev | 315 | drivers/net/e2100.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 317 | drivers/net/e2100.c | free_irq(dev->irq); |
dev | 318 | drivers/net/e2100.c | dev->irq = ei_status.saved_irq; |
dev | 326 | drivers/net/e2100.c | irq2dev_map[dev->irq] = NULL; |
dev | 328 | drivers/net/e2100.c | NS8390_init(dev, 0); |
dev | 106 | drivers/net/eepro.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 141 | drivers/net/eepro.c | extern int eepro_probe(struct device *dev); |
dev | 143 | drivers/net/eepro.c | static int eepro_probe1(struct device *dev, short ioaddr); |
dev | 144 | drivers/net/eepro.c | static int eepro_open(struct device *dev); |
dev | 145 | drivers/net/eepro.c | static int eepro_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 147 | drivers/net/eepro.c | static void eepro_rx(struct device *dev); |
dev | 148 | drivers/net/eepro.c | static void eepro_transmit_interrupt(struct device *dev); |
dev | 149 | drivers/net/eepro.c | static int eepro_close(struct device *dev); |
dev | 150 | drivers/net/eepro.c | static struct enet_statistics *eepro_get_stats(struct device *dev); |
dev | 151 | drivers/net/eepro.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 154 | drivers/net/eepro.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 155 | drivers/net/eepro.c | static int eepro_grab_irq(struct device *dev); |
dev | 284 | drivers/net/eepro.c | eepro_probe(struct device *dev) |
dev | 287 | drivers/net/eepro.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 290 | drivers/net/eepro.c | return eepro_probe1(dev, base_addr); |
dev | 298 | drivers/net/eepro.c | if (eepro_probe1(dev, ioaddr) == 0) |
dev | 310 | drivers/net/eepro.c | int eepro_probe1(struct device *dev, short ioaddr) |
dev | 346 | drivers/net/eepro.c | dev->name, ioaddr); |
dev | 351 | drivers/net/eepro.c | dev->name, ioaddr); |
dev | 355 | drivers/net/eepro.c | dev->base_addr = ioaddr; |
dev | 358 | drivers/net/eepro.c | dev->dev_addr[i] = ((unsigned char *) station_addr)[5-i]; |
dev | 359 | drivers/net/eepro.c | printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); |
dev | 365 | drivers/net/eepro.c | dev->if_port = TPE; |
dev | 366 | drivers/net/eepro.c | else dev->if_port = BNC; |
dev | 368 | drivers/net/eepro.c | if (dev->irq < 2 && eepro) { |
dev | 371 | drivers/net/eepro.c | case 0: dev->irq = 9; break; |
dev | 372 | drivers/net/eepro.c | case 1: dev->irq = 3; break; |
dev | 373 | drivers/net/eepro.c | case 2: dev->irq = 5; break; |
dev | 374 | drivers/net/eepro.c | case 3: dev->irq = 10; break; |
dev | 375 | drivers/net/eepro.c | case 4: dev->irq = 11; break; |
dev | 381 | drivers/net/eepro.c | else if (dev->irq == 2) |
dev | 382 | drivers/net/eepro.c | dev->irq = 9; |
dev | 384 | drivers/net/eepro.c | if (dev->irq > 2) { |
dev | 385 | drivers/net/eepro.c | printk(", IRQ %d, %s.\n", dev->irq, |
dev | 386 | drivers/net/eepro.c | ifmap[dev->if_port]); |
dev | 387 | drivers/net/eepro.c | if (request_irq(dev->irq, &eepro_interrupt, 0, "eepro")) { |
dev | 388 | drivers/net/eepro.c | printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq); |
dev | 392 | drivers/net/eepro.c | else printk(", %s.\n", ifmap[dev->if_port]); |
dev | 394 | drivers/net/eepro.c | if ((dev->mem_start & 0xf) > 0) |
dev | 395 | drivers/net/eepro.c | net_debug = dev->mem_start & 7; |
dev | 401 | drivers/net/eepro.c | dev->name); |
dev | 411 | drivers/net/eepro.c | if (dev->priv == NULL) |
dev | 412 | drivers/net/eepro.c | dev->priv = kmalloc(sizeof(struct eepro_local), GFP_KERNEL); |
dev | 413 | drivers/net/eepro.c | memset(dev->priv, 0, sizeof(struct eepro_local)); |
dev | 415 | drivers/net/eepro.c | dev->open = eepro_open; |
dev | 416 | drivers/net/eepro.c | dev->stop = eepro_close; |
dev | 417 | drivers/net/eepro.c | dev->hard_start_xmit = eepro_send_packet; |
dev | 418 | drivers/net/eepro.c | dev->get_stats = eepro_get_stats; |
dev | 419 | drivers/net/eepro.c | dev->set_multicast_list = &set_multicast_list; |
dev | 424 | drivers/net/eepro.c | ether_setup(dev); |
dev | 446 | drivers/net/eepro.c | static int eepro_grab_irq(struct device *dev) |
dev | 449 | drivers/net/eepro.c | int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr; |
dev | 479 | drivers/net/eepro.c | (request_irq(dev->irq = *irqp, &eepro_interrupt, 0, "eepro") == 0)) |
dev | 501 | drivers/net/eepro.c | return dev->irq; |
dev | 505 | drivers/net/eepro.c | eepro_open(struct device *dev) |
dev | 508 | drivers/net/eepro.c | int i, ioaddr = dev->base_addr; |
dev | 509 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 514 | drivers/net/eepro.c | if (dev->dev_addr[0] == SA_ADDR0 && |
dev | 515 | drivers/net/eepro.c | dev->dev_addr[1] == SA_ADDR1 && |
dev | 516 | drivers/net/eepro.c | dev->dev_addr[2] == SA_ADDR2) |
dev | 521 | drivers/net/eepro.c | if (dev->irq < 2 && eepro_grab_irq(dev) == 0) { |
dev | 522 | drivers/net/eepro.c | printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq); |
dev | 526 | drivers/net/eepro.c | if (irq2dev_map[dev->irq] != 0 |
dev | 527 | drivers/net/eepro.c | || (irq2dev_map[dev->irq] = dev) == 0) |
dev | 537 | drivers/net/eepro.c | outb(dev->dev_addr[i] , ioaddr + I_ADD_REG0 + i); |
dev | 553 | drivers/net/eepro.c | outb((temp_reg & 0xf8) | irqrmap[dev->irq], ioaddr + INT_NO_REG); |
dev | 588 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 589 | drivers/net/eepro.c | dev->interrupt = 0; |
dev | 590 | drivers/net/eepro.c | dev->start = 1; |
dev | 604 | drivers/net/eepro.c | eepro_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 606 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 607 | drivers/net/eepro.c | int ioaddr = dev->base_addr; |
dev | 612 | drivers/net/eepro.c | if (dev->tbusy) { |
dev | 615 | drivers/net/eepro.c | int tickssofar = jiffies - dev->trans_start; |
dev | 619 | drivers/net/eepro.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 632 | drivers/net/eepro.c | dev->tbusy=0; |
dev | 633 | drivers/net/eepro.c | dev->trans_start = jiffies; |
dev | 643 | drivers/net/eepro.c | dev_tint(dev); |
dev | 648 | drivers/net/eepro.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 649 | drivers/net/eepro.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 654 | drivers/net/eepro.c | hardware_send_packet(dev, buf, length); |
dev | 655 | drivers/net/eepro.c | dev->trans_start = jiffies; |
dev | 675 | drivers/net/eepro.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 681 | drivers/net/eepro.c | if (dev == NULL) { |
dev | 685 | drivers/net/eepro.c | dev->interrupt = 1; |
dev | 687 | drivers/net/eepro.c | ioaddr = dev->base_addr; |
dev | 700 | drivers/net/eepro.c | eepro_rx(dev); |
dev | 710 | drivers/net/eepro.c | eepro_transmit_interrupt(dev); |
dev | 711 | drivers/net/eepro.c | dev->tbusy = 0; |
dev | 716 | drivers/net/eepro.c | dev->interrupt = 0; |
dev | 724 | drivers/net/eepro.c | eepro_close(struct device *dev) |
dev | 726 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 727 | drivers/net/eepro.c | int ioaddr = dev->base_addr; |
dev | 730 | drivers/net/eepro.c | dev->tbusy = 1; |
dev | 731 | drivers/net/eepro.c | dev->start = 0; |
dev | 756 | drivers/net/eepro.c | free_irq(dev->irq); |
dev | 758 | drivers/net/eepro.c | irq2dev_map[dev->irq] = 0; |
dev | 778 | drivers/net/eepro.c | eepro_get_stats(struct device *dev) |
dev | 780 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 792 | drivers/net/eepro.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 794 | drivers/net/eepro.c | struct eepro_local *lp = (struct eepro_local *)dev->priv; |
dev | 795 | drivers/net/eepro.c | short ioaddr = dev->base_addr; |
dev | 805 | drivers/net/eepro.c | printk("%s: promiscuous mode enabled.\n", dev->name); |
dev | 840 | drivers/net/eepro.c | eaddrs = (unsigned short *) dev->dev_addr; |
dev | 869 | drivers/net/eepro.c | dev->name); |
dev | 873 | drivers/net/eepro.c | dev->name, num_addrs); |
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 | 288 | drivers/net/eexpress.c | extern int express_probe(struct device *dev); /* Called from Space.c */ |
dev | 290 | drivers/net/eexpress.c | static int eexp_probe1(struct device *dev, short ioaddr); |
dev | 291 | drivers/net/eexpress.c | static int eexp_open(struct device *dev); |
dev | 292 | drivers/net/eexpress.c | static int eexp_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 294 | drivers/net/eexpress.c | static void eexp_rx(struct device *dev); |
dev | 295 | drivers/net/eexpress.c | static int eexp_close(struct device *dev); |
dev | 296 | drivers/net/eexpress.c | static struct enet_statistics *eexp_get_stats(struct device *dev); |
dev | 297 | drivers/net/eexpress.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 300 | drivers/net/eexpress.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 301 | drivers/net/eexpress.c | static void init_82586_mem(struct device *dev); |
dev | 302 | drivers/net/eexpress.c | static void init_rx_bufs(struct device *dev); |
dev | 312 | drivers/net/eexpress.c | express_probe(struct device *dev) |
dev | 316 | drivers/net/eexpress.c | int base_addr = dev->base_addr; |
dev | 319 | drivers/net/eexpress.c | return eexp_probe1(dev, base_addr); |
dev | 338 | drivers/net/eexpress.c | && eexp_probe1(dev, *port) == 0) |
dev | 345 | drivers/net/eexpress.c | int eexp_probe1(struct device *dev, short ioaddr) |
dev | 350 | drivers/net/eexpress.c | printk("%s: EtherExpress at %#x,", dev->name, ioaddr); |
dev | 367 | drivers/net/eexpress.c | dev->base_addr = ioaddr; |
dev | 370 | drivers/net/eexpress.c | dev->dev_addr[i] = ((unsigned char*)station_addr)[5-i]; |
dev | 371 | drivers/net/eexpress.c | printk(" %02x", dev->dev_addr[i]); |
dev | 382 | drivers/net/eexpress.c | dev->irq = irqmap[setupval >> 13]; |
dev | 383 | drivers/net/eexpress.c | dev->if_port = (setupval & 0x1000) == 0 ? AUI : |
dev | 385 | drivers/net/eexpress.c | printk(", IRQ %d, Interface %s.\n", dev->irq, ifmap[dev->if_port]); |
dev | 394 | drivers/net/eexpress.c | if ((dev->mem_start & 0xf) > 0) |
dev | 395 | drivers/net/eexpress.c | net_debug = dev->mem_start & 7; |
dev | 401 | drivers/net/eexpress.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 402 | drivers/net/eexpress.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 404 | drivers/net/eexpress.c | dev->open = eexp_open; |
dev | 405 | drivers/net/eexpress.c | dev->stop = eexp_close; |
dev | 406 | drivers/net/eexpress.c | dev->hard_start_xmit = eexp_send_packet; |
dev | 407 | drivers/net/eexpress.c | dev->get_stats = eexp_get_stats; |
dev | 408 | drivers/net/eexpress.c | dev->set_multicast_list = &set_multicast_list; |
dev | 412 | drivers/net/eexpress.c | ether_setup(dev); |
dev | 422 | drivers/net/eexpress.c | eexp_open(struct device *dev) |
dev | 424 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 426 | drivers/net/eexpress.c | if (dev->irq == 0 || irqrmap[dev->irq] == 0) |
dev | 429 | drivers/net/eexpress.c | if (irq2dev_map[dev->irq] != 0 |
dev | 431 | drivers/net/eexpress.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 432 | drivers/net/eexpress.c | || request_irq(dev->irq, &eexp_interrupt, 0, "EExpress")) { |
dev | 437 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 440 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 442 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 443 | drivers/net/eexpress.c | dev->interrupt = 0; |
dev | 444 | drivers/net/eexpress.c | dev->start = 1; |
dev | 452 | drivers/net/eexpress.c | eexp_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 454 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 455 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 457 | drivers/net/eexpress.c | if (dev->tbusy) { |
dev | 460 | drivers/net/eexpress.c | int tickssofar = jiffies - dev->trans_start; |
dev | 464 | drivers/net/eexpress.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 472 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 480 | drivers/net/eexpress.c | dev->tbusy=0; |
dev | 481 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 488 | drivers/net/eexpress.c | dev_tint(dev); |
dev | 493 | drivers/net/eexpress.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 494 | drivers/net/eexpress.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 500 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 501 | drivers/net/eexpress.c | hardware_send_packet(dev, buf, length); |
dev | 502 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 504 | drivers/net/eexpress.c | outb(0x08 | irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 520 | drivers/net/eexpress.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 525 | drivers/net/eexpress.c | if (dev == NULL) { |
dev | 529 | drivers/net/eexpress.c | dev->interrupt = 1; |
dev | 531 | drivers/net/eexpress.c | ioaddr = dev->base_addr; |
dev | 532 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
dev | 537 | drivers/net/eexpress.c | printk("%s: EExp interrupt, status %4.4x.\n", dev->name, status); |
dev | 541 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 555 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 576 | drivers/net/eexpress.c | eexp_rx(dev); |
dev | 582 | drivers/net/eexpress.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 586 | drivers/net/eexpress.c | dev->name, status); |
dev | 601 | drivers/net/eexpress.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 609 | drivers/net/eexpress.c | dev->name, status, lp->rx_head, lp->rx_tail); |
dev | 620 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 630 | drivers/net/eexpress.c | printk("%s: EExp exiting interrupt, status %4.4x.\n", dev->name, |
dev | 634 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 639 | drivers/net/eexpress.c | eexp_close(struct device *dev) |
dev | 641 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 643 | drivers/net/eexpress.c | dev->tbusy = 1; |
dev | 644 | drivers/net/eexpress.c | dev->start = 0; |
dev | 653 | drivers/net/eexpress.c | free_irq(dev->irq); |
dev | 655 | drivers/net/eexpress.c | irq2dev_map[dev->irq] = 0; |
dev | 671 | drivers/net/eexpress.c | eexp_get_stats(struct device *dev) |
dev | 673 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 687 | drivers/net/eexpress.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 691 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 755 | drivers/net/eexpress.c | init_82586_mem(struct device *dev) |
dev | 757 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 758 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 773 | drivers/net/eexpress.c | outsw(ioaddr, dev->dev_addr, 3); |
dev | 783 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 797 | drivers/net/eexpress.c | dev->name, inw(ioaddr + SCB_STATUS), inw(ioaddr + SCB_CMD)); |
dev | 807 | drivers/net/eexpress.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 813 | drivers/net/eexpress.c | static void init_rx_bufs(struct device *dev) |
dev | 815 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 816 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 854 | drivers/net/eexpress.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 856 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 857 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 894 | drivers/net/eexpress.c | "reap %4x status %4.4x.\n", dev->name, ioaddr, length, |
dev | 899 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 903 | drivers/net/eexpress.c | eexp_rx(struct device *dev) |
dev | 905 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 906 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 928 | drivers/net/eexpress.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 946 | drivers/net/eexpress.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 950 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 957 | drivers/net/eexpress.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 969 | drivers/net/eexpress.c | printk("%s: Rx next frame at %#x is %#x instead of %#x.\n", dev->name, |
dev | 983 | drivers/net/eexpress.c | dev->name, rx_tail, (outw(rx_tail+4, ioaddr + READ_PTR),inw(ioaddr)), |
dev | 140 | drivers/net/eql.c | int eql_init(struct device *dev); /* */ |
dev | 141 | drivers/net/eql.c | static int eql_open(struct device *dev); /* */ |
dev | 142 | drivers/net/eql.c | static int eql_close(struct device *dev); /* */ |
dev | 143 | drivers/net/eql.c | static int eql_ioctl(struct device *dev, struct ifreq *ifr, int cmd); /* */ |
dev | 144 | drivers/net/eql.c | static int eql_slave_xmit(struct sk_buff *skb, struct device *dev); /* */ |
dev | 146 | drivers/net/eql.c | static struct enet_statistics *eql_get_stats(struct device *dev); /* */ |
dev | 147 | drivers/net/eql.c | static int eql_header(struct sk_buff *skb, struct device *dev, |
dev | 150 | drivers/net/eql.c | static int eql_rebuild_header(void *buff, struct device *dev, |
dev | 155 | drivers/net/eql.c | static int eql_enslave(struct device *dev, slaving_request_t *srq); /* */ |
dev | 156 | drivers/net/eql.c | static int eql_emancipate(struct device *dev, slaving_request_t *srq); /* */ |
dev | 158 | drivers/net/eql.c | static int eql_g_slave_cfg(struct device *dev, slave_config_t *sc); /* */ |
dev | 159 | drivers/net/eql.c | static int eql_s_slave_cfg(struct device *dev, slave_config_t *sc); /* */ |
dev | 161 | drivers/net/eql.c | static int eql_g_master_cfg(struct device *dev, master_config_t *mc); /* */ |
dev | 162 | drivers/net/eql.c | static int eql_s_master_cfg(struct device *dev, master_config_t *mc); /* */ |
dev | 164 | drivers/net/eql.c | static inline int eql_is_slave(struct device *dev); /* */ |
dev | 165 | drivers/net/eql.c | static inline int eql_is_master(struct device *dev); /* */ |
dev | 176 | drivers/net/eql.c | static slave_queue_t *eql_new_slave_queue(struct device *dev); /* */ |
dev | 183 | drivers/net/eql.c | static int eql_remove_slave_dev(slave_queue_t *queue, struct device *dev); /* */ |
dev | 193 | drivers/net/eql.c | static slave_t *eql_find_slave_dev(slave_queue_t *queue, struct device *dev); /* */ |
dev | 205 | drivers/net/eql.c | eql_init(struct device *dev) |
dev | 216 | drivers/net/eql.c | dev->priv = kmalloc (sizeof (equalizer_t), GFP_KERNEL); |
dev | 217 | drivers/net/eql.c | memset (dev->priv, 0, sizeof (equalizer_t)); |
dev | 218 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 224 | drivers/net/eql.c | eql->timer.data = (unsigned long) dev->priv; |
dev | 229 | drivers/net/eql.c | dev->open = eql_open; |
dev | 230 | drivers/net/eql.c | dev->stop = eql_close; |
dev | 231 | drivers/net/eql.c | dev->do_ioctl = eql_ioctl; |
dev | 232 | drivers/net/eql.c | dev->hard_start_xmit = eql_slave_xmit; |
dev | 233 | drivers/net/eql.c | dev->get_stats = eql_get_stats; |
dev | 239 | drivers/net/eql.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 241 | drivers/net/eql.c | dev->hard_header = eql_header; |
dev | 242 | drivers/net/eql.c | dev->rebuild_header = eql_rebuild_header; |
dev | 245 | drivers/net/eql.c | dev->mtu = EQL_DEFAULT_MTU; /* set to 576 in eql.h */ |
dev | 246 | drivers/net/eql.c | dev->flags = IFF_MASTER; |
dev | 248 | drivers/net/eql.c | dev->family = AF_INET; |
dev | 249 | drivers/net/eql.c | dev->pa_addr = 0; |
dev | 250 | drivers/net/eql.c | dev->pa_brdaddr = 0; |
dev | 251 | drivers/net/eql.c | dev->pa_mask = 0; |
dev | 252 | drivers/net/eql.c | dev->pa_alen = 4; |
dev | 254 | drivers/net/eql.c | dev->type = ARPHRD_SLIP; |
dev | 262 | drivers/net/eql.c | eql_open(struct device *dev) |
dev | 264 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 269 | drivers/net/eql.c | printk ("%s: open\n", dev->name); |
dev | 272 | drivers/net/eql.c | new_queue = eql_new_slave_queue (dev); |
dev | 276 | drivers/net/eql.c | new_queue->master_dev = dev; |
dev | 282 | drivers/net/eql.c | printk ("%s: adding timer\n", dev->name); |
dev | 294 | drivers/net/eql.c | eql_close(struct device *dev) |
dev | 296 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 300 | drivers/net/eql.c | printk ("%s: close\n", dev->name); |
dev | 304 | drivers/net/eql.c | printk ("%s: stopping timer\n", dev->name); |
dev | 316 | drivers/net/eql.c | eql_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 323 | drivers/net/eql.c | return eql_enslave (dev, (slaving_request_t *) ifr->ifr_data); |
dev | 325 | drivers/net/eql.c | return eql_emancipate (dev, (slaving_request_t *) ifr->ifr_data); |
dev | 328 | drivers/net/eql.c | return eql_g_slave_cfg (dev, (slave_config_t *) ifr->ifr_data); |
dev | 330 | drivers/net/eql.c | return eql_s_slave_cfg (dev, (slave_config_t *) ifr->ifr_data); |
dev | 333 | drivers/net/eql.c | return eql_g_master_cfg (dev, (master_config_t *) ifr->ifr_data); |
dev | 335 | drivers/net/eql.c | return eql_s_master_cfg (dev, (master_config_t *) ifr->ifr_data); |
dev | 345 | drivers/net/eql.c | eql_slave_xmit(struct sk_buff *skb, struct device *dev) |
dev | 347 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 366 | drivers/net/eql.c | dev->name, eql_number_slaves (eql->queue), skb->len, |
dev | 388 | drivers/net/eql.c | eql_get_stats(struct device *dev) |
dev | 390 | drivers/net/eql.c | equalizer_t *eql = (equalizer_t *) dev->priv; |
dev | 398 | drivers/net/eql.c | eql_header(struct sk_buff *skb, struct device *dev, |
dev | 408 | drivers/net/eql.c | eql_rebuild_header(void *buff, struct device *dev, |
dev | 422 | drivers/net/eql.c | eql_enslave(struct device *dev, slaving_request_t *srqp) |
dev | 436 | drivers/net/eql.c | printk ("%s: enslave '%s' %ld bps\n", dev->name, |
dev | 440 | drivers/net/eql.c | master_dev = dev; /* for "clarity" */ |
dev | 451 | drivers/net/eql.c | s->dev = slave_dev; |
dev | 471 | drivers/net/eql.c | eql_emancipate(struct device *dev, slaving_request_t *srqp) |
dev | 485 | drivers/net/eql.c | printk ("%s: emancipate `%s`\n", dev->name, srq.slave_name); |
dev | 489 | drivers/net/eql.c | master_dev = dev; /* for "clarity" */ |
dev | 507 | drivers/net/eql.c | eql_g_slave_cfg(struct device *dev, slave_config_t *scp) |
dev | 522 | drivers/net/eql.c | printk ("%s: get config for slave `%s'\n", dev->name, sc.slave_name); |
dev | 525 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 548 | drivers/net/eql.c | eql_s_slave_cfg(struct device *dev, slave_config_t *scp) |
dev | 561 | drivers/net/eql.c | printk ("%s: set config for slave `%s'\n", dev->name, sc.slave_name); |
dev | 566 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 586 | drivers/net/eql.c | eql_g_master_cfg(struct device *dev, master_config_t *mcp) |
dev | 593 | drivers/net/eql.c | printk ("%s: get master config\n", dev->name); |
dev | 596 | drivers/net/eql.c | if ( eql_is_master (dev) ) |
dev | 603 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 615 | drivers/net/eql.c | eql_s_master_cfg(struct device *dev, master_config_t *mcp) |
dev | 626 | drivers/net/eql.c | printk ("%s: set master config\n", dev->name); |
dev | 631 | drivers/net/eql.c | if ( eql_is_master (dev) ) |
dev | 633 | drivers/net/eql.c | eql = (equalizer_t *) dev->priv; |
dev | 647 | drivers/net/eql.c | eql_is_slave(struct device *dev) |
dev | 649 | drivers/net/eql.c | if (dev) |
dev | 651 | drivers/net/eql.c | if ((dev->flags & IFF_SLAVE) == IFF_SLAVE) |
dev | 660 | drivers/net/eql.c | eql_is_master(struct device *dev) |
dev | 662 | drivers/net/eql.c | if (dev) |
dev | 664 | drivers/net/eql.c | if ((dev->flags & IFF_MASTER) == IFF_MASTER) |
dev | 745 | drivers/net/eql.c | eql_new_slave_queue(struct device *dev) |
dev | 764 | drivers/net/eql.c | queue->master_dev = dev; |
dev | 805 | drivers/net/eql.c | duplicate_slave = eql_find_slave_dev (queue, slave->dev); |
dev | 839 | drivers/net/eql.c | current->dev != 0 ) |
dev | 862 | drivers/net/eql.c | eql_insert_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 871 | drivers/net/eql.c | slave->dev = dev; |
dev | 888 | drivers/net/eql.c | eql_remove_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 894 | drivers/net/eql.c | target = eql_find_slave_dev (queue, dev); |
dev | 925 | drivers/net/eql.c | if (queue->best_slave->dev != 0) |
dev | 926 | drivers/net/eql.c | return queue->best_slave->dev; |
dev | 988 | drivers/net/eql.c | if ( slave->dev != 0) |
dev | 990 | drivers/net/eql.c | if ((slave->dev->flags & IFF_UP) == IFF_UP ) |
dev | 1030 | drivers/net/eql.c | eql_find_slave_dev(slave_queue_t *queue, struct device *dev) |
dev | 1036 | drivers/net/eql.c | while (slave != 0 && slave->dev != dev && slave != 0) |
dev | 1039 | drivers/net/eql.c | if (slave->dev != 0) |
dev | 1040 | drivers/net/eql.c | printk ("eql: find_slave_dev; looked at '%s'...\n", slave->dev->name); |
dev | 1137 | drivers/net/eql.c | if ((slave->dev->flags & IFF_UP) == IFF_UP ) |
dev | 291 | drivers/net/ewrk3.c | static int ewrk3_open(struct device *dev); |
dev | 292 | drivers/net/ewrk3.c | static int ewrk3_queue_pkt(struct sk_buff *skb, struct device *dev); |
dev | 294 | drivers/net/ewrk3.c | static int ewrk3_close(struct device *dev); |
dev | 295 | drivers/net/ewrk3.c | static struct enet_statistics *ewrk3_get_stats(struct device *dev); |
dev | 296 | drivers/net/ewrk3.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 297 | drivers/net/ewrk3.c | static int ewrk3_ioctl(struct device *dev, struct ifreq *rq, int cmd); |
dev | 302 | drivers/net/ewrk3.c | static int ewrk3_hw_init(struct device *dev, short iobase); |
dev | 303 | drivers/net/ewrk3.c | static void ewrk3_init(struct device *dev); |
dev | 304 | drivers/net/ewrk3.c | static int ewrk3_rx(struct device *dev); |
dev | 305 | drivers/net/ewrk3.c | static int ewrk3_tx(struct device *dev); |
dev | 309 | drivers/net/ewrk3.c | static void SetMulticastFilter(struct device *dev, int num_addrs, char *addrs, char *multicast_table); |
dev | 313 | drivers/net/ewrk3.c | static unsigned char aprom_crc (struct device *dev, unsigned char *eeprom_image, char chipType); |
dev | 316 | drivers/net/ewrk3.c | static struct device *isa_probe(struct device *dev); |
dev | 317 | drivers/net/ewrk3.c | static struct device *eisa_probe(struct device *dev); |
dev | 318 | drivers/net/ewrk3.c | static struct device *alloc_device(struct device *dev, int iobase); |
dev | 343 | drivers/net/ewrk3.c | int ewrk3_probe(struct device *dev) |
dev | 345 | drivers/net/ewrk3.c | int base_addr = dev->base_addr; |
dev | 358 | drivers/net/ewrk3.c | status = ewrk3_hw_init(dev, base_addr); |
dev | 365 | drivers/net/ewrk3.c | printk("%s: ewrk3_probe(): Detected a device already registered at 0x%02x\n", dev->name, base_addr); |
dev | 369 | drivers/net/ewrk3.c | status = ewrk3_hw_init(dev, base_addr); |
dev | 381 | drivers/net/ewrk3.c | eth0=isa_probe(dev); |
dev | 383 | drivers/net/ewrk3.c | if (dev->priv) status=0; |
dev | 391 | drivers/net/ewrk3.c | if (status) dev->base_addr = base_addr; |
dev | 397 | drivers/net/ewrk3.c | ewrk3_hw_init(struct device *dev, short iobase) |
dev | 439 | drivers/net/ewrk3.c | printk("%s: Device has a bad on-board EEPROM.\n", dev->name); |
dev | 448 | drivers/net/ewrk3.c | dev->base_addr = iobase; |
dev | 459 | drivers/net/ewrk3.c | printk("%s: %s at %#3x", dev->name, name, iobase); |
dev | 464 | drivers/net/ewrk3.c | dev->name, name, iobase, ((iobase>>12)&0x0f)); |
dev | 466 | drivers/net/ewrk3.c | printk("%s: %s at %#3x", dev->name, name, iobase); |
dev | 473 | drivers/net/ewrk3.c | printk("%2.2x:", dev->dev_addr[i] = |
dev | 477 | drivers/net/ewrk3.c | printk("%2.2x,\n",dev->dev_addr[i] = eeprom_image[EEPROM_PADDR0 + i]); |
dev | 482 | drivers/net/ewrk3.c | printk("%2.2x:", dev->dev_addr[i] = inb(EWRK3_APROM)); |
dev | 483 | drivers/net/ewrk3.c | outb(dev->dev_addr[i], EWRK3_PAR0 + i); |
dev | 485 | drivers/net/ewrk3.c | printk("%2.2x,\n", dev->dev_addr[i] = inb(EWRK3_APROM)); |
dev | 486 | drivers/net/ewrk3.c | outb(dev->dev_addr[i], EWRK3_PAR0 + i); |
dev | 489 | drivers/net/ewrk3.c | if (aprom_crc(dev, eeprom_image, lemac)) { |
dev | 549 | drivers/net/ewrk3.c | dev->priv = (void *) kmalloc(sizeof(struct ewrk3_private), |
dev | 551 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
dev | 552 | drivers/net/ewrk3.c | memset(dev->priv, 0, sizeof(struct ewrk3_private)); |
dev | 569 | drivers/net/ewrk3.c | dev->dma = 0; |
dev | 573 | drivers/net/ewrk3.c | if (dev->irq < 2) { |
dev | 588 | drivers/net/ewrk3.c | dev->irq = autoirq_report(1); |
dev | 589 | drivers/net/ewrk3.c | if ((dev->irq) && (irqnum == dev->irq)) { |
dev | 590 | drivers/net/ewrk3.c | printk(" and uses IRQ%d.\n", dev->irq); |
dev | 592 | drivers/net/ewrk3.c | if (!dev->irq) { |
dev | 606 | drivers/net/ewrk3.c | printk(" and requires IRQ%d.\n", dev->irq); |
dev | 625 | drivers/net/ewrk3.c | dev->open = &ewrk3_open; |
dev | 626 | drivers/net/ewrk3.c | dev->hard_start_xmit = &ewrk3_queue_pkt; |
dev | 627 | drivers/net/ewrk3.c | dev->stop = &ewrk3_close; |
dev | 628 | drivers/net/ewrk3.c | dev->get_stats = &ewrk3_get_stats; |
dev | 630 | drivers/net/ewrk3.c | dev->set_multicast_list = &set_multicast_list; |
dev | 632 | drivers/net/ewrk3.c | dev->do_ioctl = &ewrk3_ioctl; |
dev | 634 | drivers/net/ewrk3.c | dev->mem_start = 0; |
dev | 637 | drivers/net/ewrk3.c | ether_setup(dev); |
dev | 648 | drivers/net/ewrk3.c | ewrk3_open(struct device *dev) |
dev | 650 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 651 | drivers/net/ewrk3.c | int i, iobase = dev->base_addr; |
dev | 661 | drivers/net/ewrk3.c | if (request_irq(dev->irq, &ewrk3_interrupt, 0, "ewrk3")) { |
dev | 662 | drivers/net/ewrk3.c | printk("ewrk3_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 666 | drivers/net/ewrk3.c | irq2dev_map[dev->irq] = dev; |
dev | 671 | drivers/net/ewrk3.c | ewrk3_init(dev); |
dev | 674 | drivers/net/ewrk3.c | printk("%s: ewrk3 open with irq %d\n",dev->name,dev->irq); |
dev | 677 | drivers/net/ewrk3.c | printk("%2.2x:",(short)dev->dev_addr[i]); |
dev | 695 | drivers/net/ewrk3.c | dev->tbusy = 0; |
dev | 696 | drivers/net/ewrk3.c | dev->start = 1; |
dev | 697 | drivers/net/ewrk3.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 707 | drivers/net/ewrk3.c | dev->start = 0; |
dev | 708 | drivers/net/ewrk3.c | dev->tbusy = 1; |
dev | 709 | drivers/net/ewrk3.c | printk("%s: ewrk3 available for hard strapped set up only.\n", dev->name); |
dev | 725 | drivers/net/ewrk3.c | ewrk3_init(struct device *dev) |
dev | 727 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 729 | drivers/net/ewrk3.c | short iobase = dev->base_addr; |
dev | 734 | drivers/net/ewrk3.c | set_multicast_list(dev, HASH_TABLE_LEN, NULL); |
dev | 760 | drivers/net/ewrk3.c | ewrk3_queue_pkt(struct sk_buff *skb, struct device *dev) |
dev | 762 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 763 | drivers/net/ewrk3.c | int iobase = dev->base_addr; |
dev | 768 | drivers/net/ewrk3.c | if (dev->tbusy || lp->lock) { |
dev | 769 | drivers/net/ewrk3.c | int tickssofar = jiffies - dev->trans_start; |
dev | 774 | drivers/net/ewrk3.c | dev->name, inb(EWRK3_CSR)); |
dev | 786 | drivers/net/ewrk3.c | ewrk3_init(dev); |
dev | 793 | drivers/net/ewrk3.c | dev->tbusy=0; |
dev | 794 | drivers/net/ewrk3.c | dev->trans_start = jiffies; |
dev | 797 | drivers/net/ewrk3.c | dev_tint(dev); |
dev | 804 | drivers/net/ewrk3.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 805 | drivers/net/ewrk3.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 836 | drivers/net/ewrk3.c | printk("%s: Oops - your private data area is hosed!\n",dev->name); |
dev | 877 | drivers/net/ewrk3.c | dev->trans_start = jiffies; |
dev | 896 | drivers/net/ewrk3.c | dev->tbusy = 0; |
dev | 911 | drivers/net/ewrk3.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 916 | drivers/net/ewrk3.c | if (dev == NULL) { |
dev | 919 | drivers/net/ewrk3.c | lp = (struct ewrk3_private *)dev->priv; |
dev | 920 | drivers/net/ewrk3.c | iobase = dev->base_addr; |
dev | 922 | drivers/net/ewrk3.c | if (dev->interrupt) |
dev | 923 | drivers/net/ewrk3.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 925 | drivers/net/ewrk3.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 940 | drivers/net/ewrk3.c | ewrk3_rx(dev); |
dev | 943 | drivers/net/ewrk3.c | ewrk3_tx(dev); |
dev | 955 | drivers/net/ewrk3.c | dev->tbusy = 0; /* clear TX busy flag */ |
dev | 965 | drivers/net/ewrk3.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 974 | drivers/net/ewrk3.c | ewrk3_rx(struct device *dev) |
dev | 976 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 977 | drivers/net/ewrk3.c | int i, iobase = dev->base_addr; |
dev | 1013 | drivers/net/ewrk3.c | printk("%s: Oops - your private data area is hosed!\n",dev->name); |
dev | 1040 | drivers/net/ewrk3.c | skb->dev = dev; |
dev | 1058 | drivers/net/ewrk3.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1078 | drivers/net/ewrk3.c | } else if ((*(long *)&buf[0] == *(long *)&dev->dev_addr[0]) && |
dev | 1079 | drivers/net/ewrk3.c | (*(short *)&buf[4] == *(short *)&dev->dev_addr[4])) { |
dev | 1088 | drivers/net/ewrk3.c | printk("%s: Insufficient memory; nuking packet.\n", dev->name); |
dev | 1119 | drivers/net/ewrk3.c | ewrk3_tx(struct device *dev) |
dev | 1121 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1122 | drivers/net/ewrk3.c | int iobase = dev->base_addr; |
dev | 1154 | drivers/net/ewrk3.c | ewrk3_close(struct device *dev) |
dev | 1156 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1157 | drivers/net/ewrk3.c | int iobase = dev->base_addr; |
dev | 1160 | drivers/net/ewrk3.c | dev->start = 0; |
dev | 1161 | drivers/net/ewrk3.c | dev->tbusy = 1; |
dev | 1165 | drivers/net/ewrk3.c | dev->name, inb(EWRK3_CSR)); |
dev | 1186 | drivers/net/ewrk3.c | free_irq(dev->irq); |
dev | 1188 | drivers/net/ewrk3.c | irq2dev_map[dev->irq] = 0; |
dev | 1199 | drivers/net/ewrk3.c | ewrk3_get_stats(struct device *dev) |
dev | 1201 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1216 | drivers/net/ewrk3.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1218 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1219 | drivers/net/ewrk3.c | int iobase = dev->base_addr; |
dev | 1232 | drivers/net/ewrk3.c | SetMulticastFilter(dev, num_addrs, (char *)addrs, multicast_table); |
dev | 1251 | drivers/net/ewrk3.c | static void SetMulticastFilter(struct device *dev, int num_addrs, char *addrs, char *multicast_table) |
dev | 1253 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1254 | drivers/net/ewrk3.c | int i, iobase = dev->base_addr; |
dev | 1334 | drivers/net/ewrk3.c | static struct device *isa_probe(struct device *dev) |
dev | 1352 | drivers/net/ewrk3.c | dev = alloc_device(dev, iobase); |
dev | 1354 | drivers/net/ewrk3.c | if ((status = ewrk3_hw_init(dev, iobase)) == 0) { |
dev | 1363 | drivers/net/ewrk3.c | printk("%s: ewrk3_probe(): Detected a device already registered at 0x%02x\n", dev->name, iobase); |
dev | 1370 | drivers/net/ewrk3.c | return dev; |
dev | 1377 | drivers/net/ewrk3.c | static struct device *eisa_probe(struct device *dev) |
dev | 1395 | drivers/net/ewrk3.c | dev = alloc_device(dev, iobase); |
dev | 1397 | drivers/net/ewrk3.c | if ((status = ewrk3_hw_init(dev, iobase)) == 0) { |
dev | 1405 | drivers/net/ewrk3.c | return dev; |
dev | 1412 | drivers/net/ewrk3.c | static struct device *alloc_device(struct device *dev, int iobase) |
dev | 1417 | drivers/net/ewrk3.c | while (dev->next != NULL) { |
dev | 1418 | drivers/net/ewrk3.c | if (dev->next->base_addr == 0xffe0) break; |
dev | 1419 | drivers/net/ewrk3.c | dev = dev->next; /* walk through eth device list */ |
dev | 1427 | drivers/net/ewrk3.c | if (dev->next == NULL) { |
dev | 1428 | drivers/net/ewrk3.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 1430 | drivers/net/ewrk3.c | if (dev->next == NULL) { |
dev | 1441 | drivers/net/ewrk3.c | if ((dev->next != NULL) && |
dev | 1443 | drivers/net/ewrk3.c | dev = dev->next; /* point to the new device */ |
dev | 1444 | drivers/net/ewrk3.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 1445 | drivers/net/ewrk3.c | sprintf(dev->name,"eth%d", num_eth);/* New device name */ |
dev | 1446 | drivers/net/ewrk3.c | dev->base_addr = iobase; /* assign the io address */ |
dev | 1447 | drivers/net/ewrk3.c | dev->next = NULL; /* mark the end of list */ |
dev | 1448 | drivers/net/ewrk3.c | dev->init = &ewrk3_probe; /* initialisation routine */ |
dev | 1452 | drivers/net/ewrk3.c | return dev; |
dev | 1576 | drivers/net/ewrk3.c | static unsigned char aprom_crc(struct device *dev, unsigned char *eeprom_image, char chipType) |
dev | 1581 | drivers/net/ewrk3.c | int iobase = dev->base_addr; |
dev | 1611 | drivers/net/ewrk3.c | static int ewrk3_ioctl(struct device *dev, struct ifreq *rq, int cmd) |
dev | 1613 | drivers/net/ewrk3.c | struct ewrk3_private *lp = (struct ewrk3_private *)dev->priv; |
dev | 1615 | drivers/net/ewrk3.c | int i, j, iobase = dev->base_addr, status = 0; |
dev | 1626 | drivers/net/ewrk3.c | tmp.addr[i] = dev->dev_addr[i]; |
dev | 1645 | drivers/net/ewrk3.c | dev->dev_addr[i] = tmp.addr[i]; |
dev | 1678 | drivers/net/ewrk3.c | printk("%s: Boo!\n", dev->name); |
dev | 1709 | drivers/net/ewrk3.c | set_multicast_list(dev, ioc->len, tmp.addr); |
dev | 1717 | drivers/net/ewrk3.c | set_multicast_list(dev, 0, NULL); |
dev | 37 | drivers/net/hp-plus.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 95 | drivers/net/hp-plus.c | int hpplus_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 int 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 int hpp_io_block_input(struct device *dev, int count, |
dev | 107 | drivers/net/hp-plus.c | static void hpp_io_block_output(struct device *dev, int count, |
dev | 120 | drivers/net/hp-plus.c | int hp_plus_probe(struct device *dev) |
dev | 123 | drivers/net/hp-plus.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 126 | drivers/net/hp-plus.c | return hpp_probe1(dev, base_addr); |
dev | 134 | drivers/net/hp-plus.c | if (hpp_probe1(dev, ioaddr) == 0) |
dev | 143 | drivers/net/hp-plus.c | int hpp_probe1(struct device *dev, int ioaddr) |
dev | 155 | drivers/net/hp-plus.c | if (dev == NULL) |
dev | 156 | drivers/net/hp-plus.c | dev = init_etherdev(0, sizeof(struct ei_device), 0); |
dev | 158 | drivers/net/hp-plus.c | printk("%s: %s at %#3x,", dev->name, name, ioaddr); |
dev | 165 | drivers/net/hp-plus.c | dev->dev_addr[i] = inval; |
dev | 189 | drivers/net/hp-plus.c | dev->irq = irq; |
dev | 205 | drivers/net/hp-plus.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 207 | drivers/net/hp-plus.c | ethdev_init(dev); |
dev | 209 | drivers/net/hp-plus.c | dev->open = &hpp_open; |
dev | 210 | drivers/net/hp-plus.c | dev->stop = &hpp_close; |
dev | 226 | drivers/net/hp-plus.c | dev->mem_start = mem_start; |
dev | 227 | drivers/net/hp-plus.c | dev->rmem_start = dev->mem_start + TX_2X_PAGES*256; |
dev | 228 | drivers/net/hp-plus.c | dev->mem_end = dev->rmem_end |
dev | 229 | drivers/net/hp-plus.c | = dev->mem_start + (HP_STOP_PG - HP_START_PG)*256; |
dev | 233 | drivers/net/hp-plus.c | NS8390_init(dev, 0); |
dev | 241 | drivers/net/hp-plus.c | hpp_open(struct device *dev) |
dev | 243 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 246 | drivers/net/hp-plus.c | if (request_irq(dev->irq, &ei_interrupt, 0, "hp-plus")) { |
dev | 264 | drivers/net/hp-plus.c | return ei_open(dev); |
dev | 268 | drivers/net/hp-plus.c | hpp_close(struct device *dev) |
dev | 270 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 273 | drivers/net/hp-plus.c | free_irq(dev->irq); |
dev | 274 | drivers/net/hp-plus.c | irq2dev_map[dev->irq] = NULL; |
dev | 275 | drivers/net/hp-plus.c | NS8390_init(dev, 0); |
dev | 283 | drivers/net/hp-plus.c | hpp_reset_8390(struct device *dev) |
dev | 285 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 301 | drivers/net/hp-plus.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 311 | drivers/net/hp-plus.c | hpp_io_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 313 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 323 | drivers/net/hp-plus.c | hpp_mem_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 325 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 332 | drivers/net/hp-plus.c | memcpy(buf, (char*)dev->mem_start, (count + 3) & ~3); |
dev | 341 | drivers/net/hp-plus.c | hpp_io_block_output(struct device *dev, int count, |
dev | 344 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 351 | drivers/net/hp-plus.c | hpp_mem_block_output(struct device *dev, int count, |
dev | 354 | drivers/net/hp-plus.c | int ioaddr = dev->base_addr - NIC_OFFSET; |
dev | 359 | drivers/net/hp-plus.c | memcpy((char *)dev->mem_start, buf, (count + 3) & ~3); |
dev | 34 | drivers/net/hp.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 55 | drivers/net/hp.c | int hp_probe(struct device *dev); |
dev | 56 | drivers/net/hp.c | int hp_probe1(struct device *dev, int ioaddr); |
dev | 58 | drivers/net/hp.c | static void hp_reset_8390(struct device *dev); |
dev | 59 | drivers/net/hp.c | static int hp_block_input(struct device *dev, int count, |
dev | 61 | drivers/net/hp.c | static void hp_block_output(struct device *dev, int count, |
dev | 63 | drivers/net/hp.c | static void hp_init_card(struct device *dev); |
dev | 78 | drivers/net/hp.c | int hp_probe(struct device *dev) |
dev | 81 | drivers/net/hp.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 84 | drivers/net/hp.c | return hp_probe1(dev, base_addr); |
dev | 92 | drivers/net/hp.c | if (hp_probe1(dev, ioaddr) == 0) |
dev | 100 | drivers/net/hp.c | int hp_probe1(struct device *dev, int ioaddr) |
dev | 124 | drivers/net/hp.c | if (dev == NULL) |
dev | 125 | drivers/net/hp.c | dev = init_etherdev(0, sizeof(struct ei_device), 0); |
dev | 130 | drivers/net/hp.c | printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); |
dev | 133 | drivers/net/hp.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 136 | drivers/net/hp.c | if (dev->irq < 2) { |
dev | 150 | drivers/net/hp.c | dev->irq = *irqp; |
dev | 160 | drivers/net/hp.c | if (dev->irq == 2) |
dev | 161 | drivers/net/hp.c | dev->irq = 9; |
dev | 162 | drivers/net/hp.c | if (request_irq(dev->irq, ei_interrupt, 0, "hp")) { |
dev | 163 | drivers/net/hp.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 172 | drivers/net/hp.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 174 | drivers/net/hp.c | ethdev_init(dev); |
dev | 185 | drivers/net/hp.c | hp_init_card(dev); |
dev | 191 | drivers/net/hp.c | hp_reset_8390(struct device *dev) |
dev | 193 | drivers/net/hp.c | int hp_base = dev->base_addr - NIC_OFFSET; |
dev | 207 | drivers/net/hp.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 219 | drivers/net/hp.c | hp_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 221 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 247 | drivers/net/hp.c | dev->name, ring_offset + xfer_count, addr); |
dev | 254 | drivers/net/hp.c | hp_block_output(struct device *dev, int count, |
dev | 257 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 304 | drivers/net/hp.c | dev->name, (start_page << 8) + count, addr); |
dev | 312 | drivers/net/hp.c | hp_init_card(struct device *dev) |
dev | 314 | drivers/net/hp.c | int irq = dev->irq; |
dev | 315 | drivers/net/hp.c | NS8390_init(dev, 0); |
dev | 317 | drivers/net/hp.c | dev->base_addr - NIC_OFFSET + HP_CONFIGURE); |
dev | 153 | drivers/net/hp100.c | static int hp100_probe1( struct device *dev, int ioaddr ); |
dev | 154 | drivers/net/hp100.c | static int hp100_open( struct device *dev ); |
dev | 155 | drivers/net/hp100.c | static int hp100_close( struct device *dev ); |
dev | 156 | drivers/net/hp100.c | static int hp100_start_xmit( struct sk_buff *skb, struct device *dev ); |
dev | 157 | drivers/net/hp100.c | static void hp100_rx( struct device *dev ); |
dev | 158 | drivers/net/hp100.c | static struct enet_statistics *hp100_get_stats( struct device *dev ); |
dev | 159 | drivers/net/hp100.c | static void hp100_update_stats( struct device *dev ); |
dev | 161 | drivers/net/hp100.c | static void hp100_set_multicast_list( struct device *dev, int num_addrs, void *addrs ); |
dev | 169 | drivers/net/hp100.c | static void hp100_start_interface( struct device *dev ); |
dev | 170 | drivers/net/hp100.c | static void hp100_stop_interface( struct device *dev ); |
dev | 171 | drivers/net/hp100.c | static void hp100_load_eeprom( struct device *dev ); |
dev | 172 | drivers/net/hp100.c | static int hp100_sense_lan( struct device *dev ); |
dev | 173 | drivers/net/hp100.c | static int hp100_login_to_vg_hub( struct device *dev ); |
dev | 174 | drivers/net/hp100.c | static int hp100_down_vg_link( struct device *dev ); |
dev | 180 | drivers/net/hp100.c | int hp100_probe( struct device *dev ) |
dev | 182 | drivers/net/hp100.c | int base_addr = dev ? dev -> base_addr : 0; |
dev | 186 | drivers/net/hp100.c | return hp100_probe1(dev, base_addr); |
dev | 195 | drivers/net/hp100.c | if ( hp100_probe1( dev, ioaddr ) == 0 ) return 0; |
dev | 203 | drivers/net/hp100.c | if ( hp100_probe1( dev, ioaddr ) == 0 ) return 0; |
dev | 209 | drivers/net/hp100.c | static int hp100_probe1( struct device *dev, int ioaddr ) |
dev | 217 | drivers/net/hp100.c | if ( dev == NULL ) |
dev | 231 | drivers/net/hp100.c | dev -> base_addr = ioaddr; |
dev | 289 | drivers/net/hp100.c | if ( ( dev -> priv = kmalloc( sizeof( struct hp100_private ), GFP_KERNEL ) ) == NULL ) |
dev | 291 | drivers/net/hp100.c | memset( dev -> priv, 0, sizeof( struct hp100_private ) ); |
dev | 293 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
dev | 300 | drivers/net/hp100.c | dev -> base_addr = ioaddr; |
dev | 302 | drivers/net/hp100.c | dev -> irq = hp100_inb( IRQ_CHANNEL ) & HP100_IRQ_MASK; |
dev | 303 | drivers/net/hp100.c | if ( dev -> irq == 2 ) dev -> irq = 9; |
dev | 311 | drivers/net/hp100.c | dev -> open = hp100_open; |
dev | 312 | drivers/net/hp100.c | dev -> stop = hp100_close; |
dev | 313 | drivers/net/hp100.c | dev -> hard_start_xmit = hp100_start_xmit; |
dev | 314 | drivers/net/hp100.c | dev -> get_stats = hp100_get_stats; |
dev | 316 | drivers/net/hp100.c | dev -> set_multicast_list = &hp100_set_multicast_list; |
dev | 320 | drivers/net/hp100.c | request_region( dev -> base_addr, 0x20, eid -> name ); |
dev | 325 | drivers/net/hp100.c | dev -> dev_addr[ i ] = hp100_inb( LAN_ADDR + i ); |
dev | 327 | drivers/net/hp100.c | ether_setup( dev ); |
dev | 329 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
dev | 332 | drivers/net/hp100.c | dev -> name, lp -> id -> name, ioaddr, dev -> irq, |
dev | 348 | drivers/net/hp100.c | static int hp100_open( struct device *dev ) |
dev | 351 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 352 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 354 | drivers/net/hp100.c | if ( request_irq( dev -> irq, hp100_interrupt, SA_INTERRUPT, lp -> id -> name ) ) |
dev | 356 | drivers/net/hp100.c | printk( "%s: unable to get IRQ %d\n", dev -> name, dev -> irq ); |
dev | 359 | drivers/net/hp100.c | irq2dev_map[ dev -> irq ] = dev; |
dev | 365 | drivers/net/hp100.c | dev -> tbusy = 0; |
dev | 366 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 367 | drivers/net/hp100.c | dev -> interrupt = 0; |
dev | 368 | drivers/net/hp100.c | dev -> start = 1; |
dev | 370 | drivers/net/hp100.c | lp -> lan_type = hp100_sense_lan( dev ); |
dev | 377 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 379 | drivers/net/hp100.c | hp100_load_eeprom( dev ); |
dev | 394 | drivers/net/hp100.c | hp100_outb( dev -> dev_addr[ i ], MAC_ADDR + i ); |
dev | 410 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 412 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 417 | drivers/net/hp100.c | static int hp100_close( struct device *dev ) |
dev | 419 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 420 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 425 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 428 | drivers/net/hp100.c | hp100_login_to_vg_hub( dev ); |
dev | 430 | drivers/net/hp100.c | dev -> tbusy = 1; |
dev | 431 | drivers/net/hp100.c | dev -> start = 0; |
dev | 433 | drivers/net/hp100.c | free_irq( dev -> irq ); |
dev | 434 | drivers/net/hp100.c | irq2dev_map[ dev -> irq ] = NULL; |
dev | 445 | drivers/net/hp100.c | static int hp100_start_xmit( struct sk_buff *skb, struct device *dev ) |
dev | 448 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 450 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 454 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 455 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) < 0 ) |
dev | 457 | drivers/net/hp100.c | printk( "%s: no connection found - check wire\n", dev -> name ); |
dev | 458 | drivers/net/hp100.c | hp100_start_interface( dev ); /* 10Mb/s RX packets maybe handled */ |
dev | 462 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 463 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 471 | drivers/net/hp100.c | if ( jiffies - dev -> trans_start < 2 * HZ ) return -EAGAIN; |
dev | 475 | drivers/net/hp100.c | printk( "%s: login to 100Mb/s hub retry\n", dev -> name ); |
dev | 476 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 477 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 478 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 483 | drivers/net/hp100.c | i = hp100_sense_lan( dev ); |
dev | 487 | drivers/net/hp100.c | printk( "%s: link down detected\n", dev -> name ); |
dev | 492 | drivers/net/hp100.c | printk( "%s: cable change 10Mb/s <-> 100Mb/s detected\n", dev -> name ); |
dev | 494 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 496 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 497 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 501 | drivers/net/hp100.c | printk( "%s: interface reset\n", dev -> name ); |
dev | 502 | drivers/net/hp100.c | hp100_stop_interface( dev ); |
dev | 503 | drivers/net/hp100.c | hp100_start_interface( dev ); |
dev | 506 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 512 | drivers/net/hp100.c | dev_tint( dev ); |
dev | 549 | drivers/net/hp100.c | dev -> trans_start = jiffies; |
dev | 565 | drivers/net/hp100.c | static void hp100_rx( struct device *dev ) |
dev | 568 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 569 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 576 | drivers/net/hp100.c | if ( ( lp -> lan_type = hp100_sense_lan( dev ) ) == HP100_LAN_100 ) |
dev | 577 | drivers/net/hp100.c | lp -> hub_status = hp100_login_to_vg_hub( dev ); |
dev | 616 | drivers/net/hp100.c | skb -> dev = dev; |
dev | 618 | drivers/net/hp100.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 638 | drivers/net/hp100.c | static struct enet_statistics *hp100_get_stats( struct device *dev ) |
dev | 640 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 643 | drivers/net/hp100.c | hp100_update_stats( dev ); |
dev | 645 | drivers/net/hp100.c | return &((struct hp100_private *)dev -> priv) -> stats; |
dev | 648 | drivers/net/hp100.c | static void hp100_update_stats( struct device *dev ) |
dev | 650 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 652 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 682 | drivers/net/hp100.c | static void hp100_set_multicast_list( struct device *dev, int num_addrs, void *addrs ) |
dev | 684 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 685 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 735 | drivers/net/hp100.c | struct device *dev = (struct device *)irq2dev_map[ irq ]; |
dev | 740 | drivers/net/hp100.c | if ( dev == NULL ) return; |
dev | 741 | drivers/net/hp100.c | ioaddr = dev -> base_addr; |
dev | 742 | drivers/net/hp100.c | if ( dev -> interrupt ) |
dev | 743 | drivers/net/hp100.c | printk( "%s: re-entering the interrupt handler\n", dev -> name ); |
dev | 745 | drivers/net/hp100.c | dev -> interrupt = 1; |
dev | 753 | drivers/net/hp100.c | hp100_rx( dev ); |
dev | 762 | drivers/net/hp100.c | lp = (struct hp100_private *)dev -> priv; |
dev | 763 | drivers/net/hp100.c | hp100_update_stats( dev ); |
dev | 769 | drivers/net/hp100.c | dev -> interrupt = 0; |
dev | 777 | drivers/net/hp100.c | static void hp100_start_interface( struct device *dev ) |
dev | 779 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 780 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 796 | drivers/net/hp100.c | static void hp100_stop_interface( struct device *dev ) |
dev | 798 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 813 | drivers/net/hp100.c | printk( "%s: hp100_stop_interface - timeout\n", dev -> name ); |
dev | 816 | drivers/net/hp100.c | static void hp100_load_eeprom( struct device *dev ) |
dev | 819 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 826 | drivers/net/hp100.c | printk( "%s: hp100_load_eeprom - timeout\n", dev -> name ); |
dev | 831 | drivers/net/hp100.c | static int hp100_sense_lan( struct device *dev ) |
dev | 834 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 836 | drivers/net/hp100.c | struct hp100_private *lp = (struct hp100_private *)dev -> priv; |
dev | 856 | drivers/net/hp100.c | static int hp100_down_vg_link( struct device *dev ) |
dev | 858 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 880 | drivers/net/hp100.c | static int hp100_login_to_vg_hub( struct device *dev ) |
dev | 883 | drivers/net/hp100.c | int ioaddr = dev -> base_addr; |
dev | 901 | drivers/net/hp100.c | if ( hp100_down_vg_link( dev ) < 0 ) /* if fail, try reset VG link */ |
dev | 926 | drivers/net/hp100.c | printk( "%s: 100Mb cable training failed, check cable.\n", dev -> name ); |
dev | 928 | drivers/net/hp100.c | printk( "%s: 100Mb node not accepted by hub, check frame type or security.\n", dev -> name ); |
dev | 931 | drivers/net/hp100.c | hp100_down_vg_link( dev ); |
dev | 77 | drivers/net/ibmtr.c | #define DPRINTK(format, args...) printk("%s: " format, dev->name , ## args) |
dev | 78 | drivers/net/ibmtr.c | #define DPRINTD(format, args...) DummyCall("%s: " format, dev->name , ## args) |
dev | 86 | drivers/net/ibmtr.c | void (*do_tok_int)(struct device *dev)=NULL; |
dev | 98 | drivers/net/ibmtr.c | int tok_probe(struct device *dev); |
dev | 104 | drivers/net/ibmtr.c | static void initial_tok_int(struct device *dev); |
dev | 106 | drivers/net/ibmtr.c | static void open_sap(unsigned char type,struct device *dev); |
dev | 108 | drivers/net/ibmtr.c | static void tr_rx(struct device *dev); |
dev | 109 | drivers/net/ibmtr.c | static void tr_tx(struct device *dev); |
dev | 111 | drivers/net/ibmtr.c | static int tok_open(struct device *dev); |
dev | 112 | drivers/net/ibmtr.c | static int tok_close(struct device *dev); |
dev | 113 | drivers/net/ibmtr.c | static int tok_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 114 | drivers/net/ibmtr.c | static struct enet_statistics * tok_get_stats(struct device *dev); |
dev | 142 | drivers/net/ibmtr.c | int tok_probe(struct device *dev) { |
dev | 255 | drivers/net/ibmtr.c | dev->priv = ti; /* this seems like the logical use of the |
dev | 308 | drivers/net/ibmtr.c | dev->dev_addr[(j/2)]=ti->hw_address[j]+(ti->hw_address[j-1]<<4); |
dev | 419 | drivers/net/ibmtr.c | if (request_irq (dev->irq = irq, &tok_interrupt,0,"IBM TR") != 0) { |
dev | 424 | drivers/net/ibmtr.c | irq2dev_map[irq]=dev; |
dev | 428 | drivers/net/ibmtr.c | dev->base_addr=PIOaddr; /* set the value for device */ |
dev | 430 | drivers/net/ibmtr.c | dev->open=tok_open; |
dev | 431 | drivers/net/ibmtr.c | dev->stop=tok_close; |
dev | 432 | drivers/net/ibmtr.c | dev->hard_start_xmit=tok_send_packet; |
dev | 433 | drivers/net/ibmtr.c | dev->get_stats = NULL; |
dev | 434 | drivers/net/ibmtr.c | dev->get_stats = tok_get_stats; |
dev | 435 | drivers/net/ibmtr.c | dev->set_multicast_list = NULL; |
dev | 436 | drivers/net/ibmtr.c | tr_setup(dev); |
dev | 437 | drivers/net/ibmtr.c | tok_init_card((unsigned long)dev); |
dev | 465 | drivers/net/ibmtr.c | static int tok_open(struct device *dev) { |
dev | 467 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *)dev->priv; |
dev | 470 | drivers/net/ibmtr.c | tok_init_card((unsigned long)dev); |
dev | 478 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 479 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 480 | drivers/net/ibmtr.c | dev->start=1; |
dev | 490 | drivers/net/ibmtr.c | static int tok_close(struct device *dev) { |
dev | 492 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 515 | drivers/net/ibmtr.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 517 | drivers/net/ibmtr.c | DPRINTK("Int from tok_driver, dev : %p\n",dev); |
dev | 519 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 529 | drivers/net/ibmtr.c | dev->interrupt=1; |
dev | 553 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 563 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 578 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 591 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 622 | drivers/net/ibmtr.c | open_sap(EXTENDED_SAP,dev); |
dev | 631 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 646 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 682 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 717 | drivers/net/ibmtr.c | tr_rx(dev); |
dev | 728 | drivers/net/ibmtr.c | tr_timer.data=(unsigned long)dev; |
dev | 739 | drivers/net/ibmtr.c | dev->tbusy=1; /* really srb busy... */ |
dev | 745 | drivers/net/ibmtr.c | tr_tx(dev); |
dev | 777 | drivers/net/ibmtr.c | dev->interrupt=0; |
dev | 784 | drivers/net/ibmtr.c | initial_tok_int(dev); |
dev | 792 | drivers/net/ibmtr.c | static void initial_tok_int(struct device *dev) { |
dev | 798 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 838 | drivers/net/ibmtr.c | printk("%02X%s",dev->dev_addr[i]=encoded_addr[i],(i==TR_ALEN-1) ? "" : ":" ); |
dev | 841 | drivers/net/ibmtr.c | tok_open_adapter((unsigned long)dev); |
dev | 850 | drivers/net/ibmtr.c | struct device *dev=(struct device *)dev_addr; |
dev | 851 | drivers/net/ibmtr.c | PIOaddr = dev->base_addr; |
dev | 852 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 859 | drivers/net/ibmtr.c | dev->tbusy=1; /* nothing can be done before reset and open completed */ |
dev | 880 | drivers/net/ibmtr.c | static void open_sap(unsigned char type,struct device *dev) { |
dev | 882 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 900 | drivers/net/ibmtr.c | struct device *dev=(struct device *)dev_addr; |
dev | 903 | drivers/net/ibmtr.c | ti=(struct tok_info *) dev->priv; |
dev | 929 | drivers/net/ibmtr.c | static void tr_tx(struct device *dev) { |
dev | 931 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1017 | drivers/net/ibmtr.c | dev->tbusy=0; |
dev | 1023 | drivers/net/ibmtr.c | static void tr_rx(struct device *dev) { |
dev | 1025 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1085 | drivers/net/ibmtr.c | skb->dev=dev; |
dev | 1122 | drivers/net/ibmtr.c | skb->protocol=tr_type_trans(skb,dev); |
dev | 1128 | drivers/net/ibmtr.c | static int tok_send_packet(struct sk_buff *skb, struct device *dev) { |
dev | 1130 | drivers/net/ibmtr.c | struct tok_info *ti=(struct tok_info *) dev->priv; |
dev | 1136 | drivers/net/ibmtr.c | if (dev->tbusy) { |
dev | 1137 | drivers/net/ibmtr.c | int ticks_waited=jiffies - dev->trans_start; |
dev | 1143 | drivers/net/ibmtr.c | dev->trans_start+=5; /* we fake the transmission start time... */ |
dev | 1150 | drivers/net/ibmtr.c | dev_tint(dev); |
dev | 1154 | drivers/net/ibmtr.c | if(set_bit(0,(void *)&dev->tbusy)!=0) |
dev | 1164 | drivers/net/ibmtr.c | dev->trans_start=jiffies; |
dev | 1175 | drivers/net/ibmtr.c | static struct enet_statistics * tok_get_stats(struct device *dev) { |
dev | 1178 | drivers/net/ibmtr.c | toki=(struct tok_info *) dev->priv; |
dev | 39 | drivers/net/lance.c | struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 256 | drivers/net/lance.c | static int lance_open(struct device *dev); |
dev | 257 | drivers/net/lance.c | static void lance_init_ring(struct device *dev); |
dev | 258 | drivers/net/lance.c | static int lance_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 259 | drivers/net/lance.c | static int lance_rx(struct device *dev); |
dev | 261 | drivers/net/lance.c | static int lance_close(struct device *dev); |
dev | 262 | drivers/net/lance.c | static struct enet_statistics *lance_get_stats(struct device *dev); |
dev | 264 | drivers/net/lance.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 336 | drivers/net/lance.c | struct device *dev; |
dev | 394 | drivers/net/lance.c | dev = init_etherdev(0, 7 |
dev | 403 | drivers/net/lance.c | printk("%s: %s at %#3x,", dev->name, chipname, ioaddr); |
dev | 408 | drivers/net/lance.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 410 | drivers/net/lance.c | dev->base_addr = ioaddr; |
dev | 414 | drivers/net/lance.c | dev->priv = (void *)(((int)dev->priv + 7) & ~7); |
dev | 415 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 425 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 441 | drivers/net/lance.c | dev->dma = 4; /* Native bus-master, no DMA channel needed. */ |
dev | 442 | drivers/net/lance.c | dev->irq = pci_irq_line; |
dev | 447 | drivers/net/lance.c | dev->dma = dma_tbl[(port_val >> 4) & 3]; |
dev | 448 | drivers/net/lance.c | dev->irq = irq_tbl[(port_val >> 2) & 3]; |
dev | 449 | drivers/net/lance.c | printk(" HP Vectra IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 454 | drivers/net/lance.c | dev->dma = dma_tbl[(reset_val >> 2) & 3]; |
dev | 455 | drivers/net/lance.c | dev->irq = irq_tbl[(reset_val >> 4) & 7]; |
dev | 456 | drivers/net/lance.c | printk(" HP J2405A IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 461 | drivers/net/lance.c | dev->dma = bus_info & 0x07; |
dev | 462 | drivers/net/lance.c | dev->irq = (bus_info >> 4) & 0x0F; |
dev | 465 | drivers/net/lance.c | if (dev->mem_start & 0x07) |
dev | 466 | drivers/net/lance.c | dev->dma = dev->mem_start & 0x07; |
dev | 469 | drivers/net/lance.c | if (dev->dma == 0) { |
dev | 475 | drivers/net/lance.c | if (dev->irq >= 2) |
dev | 476 | drivers/net/lance.c | printk(" assigned IRQ %d", dev->irq); |
dev | 486 | drivers/net/lance.c | dev->irq = autoirq_report(1); |
dev | 487 | drivers/net/lance.c | if (dev->irq) |
dev | 488 | drivers/net/lance.c | printk(", probed IRQ %d", dev->irq); |
dev | 497 | drivers/net/lance.c | dev->dma = 4; |
dev | 500 | drivers/net/lance.c | if (dev->dma == 4) { |
dev | 502 | drivers/net/lance.c | } else if (dev->dma) { |
dev | 503 | drivers/net/lance.c | if (request_dma(dev->dma, chipname)) { |
dev | 504 | drivers/net/lance.c | printk("DMA %d allocation failed.\n", dev->dma); |
dev | 507 | drivers/net/lance.c | printk(", assigned DMA %d.\n", dev->dma); |
dev | 530 | drivers/net/lance.c | dev->dma = dma; |
dev | 531 | drivers/net/lance.c | printk(", DMA %d.\n", dev->dma); |
dev | 555 | drivers/net/lance.c | dev->open = &lance_open; |
dev | 556 | drivers/net/lance.c | dev->hard_start_xmit = &lance_start_xmit; |
dev | 557 | drivers/net/lance.c | dev->stop = &lance_close; |
dev | 558 | drivers/net/lance.c | dev->get_stats = &lance_get_stats; |
dev | 559 | drivers/net/lance.c | dev->set_multicast_list = &set_multicast_list; |
dev | 566 | drivers/net/lance.c | lance_open(struct device *dev) |
dev | 568 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 569 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 572 | drivers/net/lance.c | if (dev->irq == 0 || |
dev | 573 | drivers/net/lance.c | request_irq(dev->irq, &lance_interrupt, 0, lp->name)) { |
dev | 580 | drivers/net/lance.c | irq2dev_map[dev->irq] = dev; |
dev | 586 | drivers/net/lance.c | if (dev->dma != 4) { |
dev | 587 | drivers/net/lance.c | enable_dma(dev->dma); |
dev | 588 | drivers/net/lance.c | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
dev | 603 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
dev | 606 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 619 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 620 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 621 | drivers/net/lance.c | dev->start = 1; |
dev | 634 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
dev | 652 | drivers/net/lance.c | lance_purge_tx_ring(struct device *dev) |
dev | 654 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 668 | drivers/net/lance.c | lance_init_ring(struct device *dev) |
dev | 670 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 689 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 697 | drivers/net/lance.c | lance_restart(struct device *dev, unsigned int csr0_bits, int must_reinit) |
dev | 699 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 703 | drivers/net/lance.c | lance_purge_tx_ring(dev); |
dev | 704 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 706 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 707 | drivers/net/lance.c | outw(csr0_bits, dev->base_addr + LANCE_DATA); |
dev | 711 | drivers/net/lance.c | lance_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 713 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 714 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 719 | drivers/net/lance.c | if (dev->tbusy) { |
dev | 720 | drivers/net/lance.c | int tickssofar = jiffies - dev->trans_start; |
dev | 725 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 745 | drivers/net/lance.c | lance_restart(dev, 0x0043, 1); |
dev | 747 | drivers/net/lance.c | dev->tbusy=0; |
dev | 748 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 754 | drivers/net/lance.c | dev_tint(dev); |
dev | 763 | drivers/net/lance.c | printk("%s: lance_start_xmit() called, csr0 %4.4x.\n", dev->name, |
dev | 770 | drivers/net/lance.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 771 | drivers/net/lance.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 777 | drivers/net/lance.c | printk("%s: tx queue lock!.\n", dev->name); |
dev | 804 | drivers/net/lance.c | dev->name, (int)(skb->data)); |
dev | 819 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 825 | drivers/net/lance.c | dev->tbusy=0; |
dev | 837 | drivers/net/lance.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 842 | drivers/net/lance.c | if (dev == NULL) { |
dev | 847 | drivers/net/lance.c | ioaddr = dev->base_addr; |
dev | 848 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 849 | drivers/net/lance.c | if (dev->interrupt) |
dev | 850 | drivers/net/lance.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 852 | drivers/net/lance.c | dev->interrupt = 1; |
dev | 854 | drivers/net/lance.c | outw(0x00, dev->base_addr + LANCE_ADDR); |
dev | 855 | drivers/net/lance.c | while ((csr0 = inw(dev->base_addr + LANCE_DATA)) & 0x8600 |
dev | 858 | drivers/net/lance.c | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); |
dev | 864 | drivers/net/lance.c | dev->name, csr0, inw(dev->base_addr + LANCE_DATA)); |
dev | 867 | drivers/net/lance.c | lance_rx(dev); |
dev | 893 | drivers/net/lance.c | dev->name, csr0); |
dev | 920 | drivers/net/lance.c | if (lp->tx_full && dev->tbusy |
dev | 924 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 936 | drivers/net/lance.c | dev->name, csr0); |
dev | 943 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 944 | drivers/net/lance.c | outw(0x0004, dev->base_addr + LANCE_DATA); |
dev | 945 | drivers/net/lance.c | lance_restart(dev, 0x0002, 0); |
dev | 950 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 951 | drivers/net/lance.c | outw(0x7940, dev->base_addr + LANCE_DATA); |
dev | 955 | drivers/net/lance.c | dev->name, inw(ioaddr + LANCE_ADDR), |
dev | 956 | drivers/net/lance.c | inw(dev->base_addr + LANCE_DATA)); |
dev | 958 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 963 | drivers/net/lance.c | lance_rx(struct device *dev) |
dev | 965 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 992 | drivers/net/lance.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 1004 | drivers/net/lance.c | skb->dev = dev; |
dev | 1010 | drivers/net/lance.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 1029 | drivers/net/lance.c | lance_close(struct device *dev) |
dev | 1031 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 1032 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 1034 | drivers/net/lance.c | dev->start = 0; |
dev | 1035 | drivers/net/lance.c | dev->tbusy = 1; |
dev | 1045 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 1051 | drivers/net/lance.c | if (dev->dma != 4) |
dev | 1052 | drivers/net/lance.c | disable_dma(dev->dma); |
dev | 1054 | drivers/net/lance.c | free_irq(dev->irq); |
dev | 1056 | drivers/net/lance.c | irq2dev_map[dev->irq] = 0; |
dev | 1062 | drivers/net/lance.c | lance_get_stats(struct device *dev) |
dev | 1064 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 1065 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 1089 | drivers/net/lance.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1091 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 1109 | drivers/net/lance.c | printk("%s: Promiscuous mode enabled.\n", dev->name); |
dev | 1114 | drivers/net/lance.c | lance_restart(dev, 0x0142, 0); /* Resume normal operation */ |
dev | 47 | drivers/net/loopback.c | static int loopback_xmit(struct sk_buff *skb, struct device *dev) |
dev | 49 | drivers/net/loopback.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 53 | drivers/net/loopback.c | if (skb == NULL || dev == NULL) |
dev | 58 | drivers/net/loopback.c | if (dev->tbusy != 0) |
dev | 64 | drivers/net/loopback.c | dev->tbusy = 1; |
dev | 94 | drivers/net/loopback.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 95 | drivers/net/loopback.c | skb->dev=dev; |
dev | 106 | drivers/net/loopback.c | dev->tbusy = 0; |
dev | 111 | drivers/net/loopback.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 113 | drivers/net/loopback.c | return (struct enet_statistics *)dev->priv; |
dev | 116 | drivers/net/loopback.c | static int loopback_open(struct device *dev) |
dev | 118 | drivers/net/loopback.c | dev->flags|=IFF_LOOPBACK; |
dev | 123 | drivers/net/loopback.c | int loopback_init(struct device *dev) |
dev | 127 | drivers/net/loopback.c | dev->mtu = 2000; /* MTU */ |
dev | 128 | drivers/net/loopback.c | dev->tbusy = 0; |
dev | 129 | drivers/net/loopback.c | dev->hard_start_xmit = loopback_xmit; |
dev | 130 | drivers/net/loopback.c | dev->open = NULL; |
dev | 131 | drivers/net/loopback.c | dev->hard_header = eth_header; |
dev | 132 | drivers/net/loopback.c | dev->hard_header_len = ETH_HLEN; /* 14 */ |
dev | 133 | drivers/net/loopback.c | dev->addr_len = ETH_ALEN; /* 6 */ |
dev | 134 | drivers/net/loopback.c | dev->type = ARPHRD_ETHER; /* 0x0001 */ |
dev | 135 | drivers/net/loopback.c | dev->rebuild_header = eth_rebuild_header; |
dev | 136 | drivers/net/loopback.c | dev->open = loopback_open; |
dev | 137 | drivers/net/loopback.c | dev->flags = IFF_LOOPBACK|IFF_BROADCAST; |
dev | 138 | drivers/net/loopback.c | dev->family = AF_INET; |
dev | 140 | drivers/net/loopback.c | dev->pa_addr = in_aton("127.0.0.1"); |
dev | 141 | drivers/net/loopback.c | dev->pa_brdaddr = in_aton("127.255.255.255"); |
dev | 142 | drivers/net/loopback.c | dev->pa_mask = in_aton("255.0.0.0"); |
dev | 143 | drivers/net/loopback.c | dev->pa_alen = 4; |
dev | 145 | drivers/net/loopback.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 146 | drivers/net/loopback.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 147 | drivers/net/loopback.c | dev->get_stats = get_stats; |
dev | 154 | drivers/net/loopback.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 54 | drivers/net/ne.c | extern struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 77 | drivers/net/ne.c | #define NE_BASE (dev->base_addr) |
dev | 88 | drivers/net/ne.c | int ne_probe(struct device *dev); |
dev | 89 | drivers/net/ne.c | static int ne_probe1(struct device *dev, int ioaddr); |
dev | 91 | drivers/net/ne.c | static void ne_reset_8390(struct device *dev); |
dev | 92 | drivers/net/ne.c | static int ne_block_input(struct device *dev, int count, |
dev | 94 | drivers/net/ne.c | static void ne_block_output(struct device *dev, const int count, |
dev | 124 | drivers/net/ne.c | int ne_probe(struct device *dev) |
dev | 127 | drivers/net/ne.c | int base_addr = dev ? dev->base_addr : 0; |
dev | 130 | drivers/net/ne.c | return ne_probe1(dev, base_addr); |
dev | 138 | drivers/net/ne.c | if (ne_probe1(dev, ioaddr) == 0) |
dev | 146 | drivers/net/ne.c | static int ne_probe1(struct device *dev, int ioaddr) |
dev | 239 | drivers/net/ne.c | dev->dev_addr[i] = SA_prom[i]; |
dev | 282 | drivers/net/ne.c | if (dev == NULL) |
dev | 283 | drivers/net/ne.c | dev = init_etherdev(0, sizeof(struct ei_device), 0); |
dev | 285 | drivers/net/ne.c | if (dev->irq < 2) { |
dev | 292 | drivers/net/ne.c | dev->irq = autoirq_report(0); |
dev | 294 | drivers/net/ne.c | printk(" autoirq is %d\n", dev->irq); |
dev | 295 | drivers/net/ne.c | } else if (dev->irq == 2) |
dev | 298 | drivers/net/ne.c | dev->irq = 9; |
dev | 303 | drivers/net/ne.c | int irqval = request_irq (dev->irq, ei_interrupt, 0, wordlength==2 ? "ne2000":"ne1000"); |
dev | 305 | drivers/net/ne.c | printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval); |
dev | 310 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 315 | drivers/net/ne.c | dev->dev_addr[i] = SA_prom[i]; |
dev | 317 | drivers/net/ne.c | ethdev_init(dev); |
dev | 319 | drivers/net/ne.c | dev->name, name, ioaddr, dev->irq); |
dev | 338 | drivers/net/ne.c | NS8390_init(dev, 0); |
dev | 345 | drivers/net/ne.c | ne_reset_8390(struct device *dev) |
dev | 360 | drivers/net/ne.c | printk("%s: ne_reset_8390() did not complete.\n", dev->name); |
dev | 372 | drivers/net/ne.c | ne_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 377 | drivers/net/ne.c | int nic_base = dev->base_addr; |
dev | 384 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock, |
dev | 385 | drivers/net/ne.c | dev->interrupt); |
dev | 426 | drivers/net/ne.c | dev->name, ring_offset + xfer_count, addr); |
dev | 435 | drivers/net/ne.c | ne_block_output(struct device *dev, int count, |
dev | 455 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock, |
dev | 456 | drivers/net/ne.c | dev->interrupt); |
dev | 515 | drivers/net/ne.c | dev->name, (start_page << 8) + count, addr); |
dev | 524 | drivers/net/ne.c | printk("%s: timeout waiting for Tx RDC.\n", dev->name); |
dev | 525 | drivers/net/ne.c | ne_reset_8390(dev); |
dev | 526 | drivers/net/ne.c | NS8390_init(dev,1); |
dev | 93 | drivers/net/net_init.c | init_etherdev(struct device *dev, int sizeof_priv, unsigned long *mem_startp) |
dev | 99 | drivers/net/net_init.c | if (dev == NULL) { |
dev | 110 | drivers/net/net_init.c | dev = cur_dev; |
dev | 111 | drivers/net/net_init.c | dev->init = NULL; |
dev | 114 | drivers/net/net_init.c | dev->priv = (void*) *mem_startp; |
dev | 117 | drivers/net/net_init.c | dev->priv = kmalloc(sizeof_priv, GFP_KERNEL); |
dev | 118 | drivers/net/net_init.c | memset(dev->priv, 0, sizeof_priv); |
dev | 126 | drivers/net/net_init.c | dev = (struct device *)*mem_startp; |
dev | 129 | drivers/net/net_init.c | dev = (struct device *)kmalloc(alloc_size, GFP_KERNEL); |
dev | 130 | drivers/net/net_init.c | memset(dev, 0, alloc_size); |
dev | 132 | drivers/net/net_init.c | dev->priv = (void *) (dev + 1); |
dev | 133 | drivers/net/net_init.c | dev->name = sizeof_priv + (char *)(dev + 1); |
dev | 139 | drivers/net/net_init.c | if (dev->name && |
dev | 140 | drivers/net/net_init.c | ((dev->name[0] == '\0') || (dev->name[0] == ' '))) { |
dev | 143 | drivers/net/net_init.c | sprintf(dev->name, "eth%d", i); |
dev | 144 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 149 | drivers/net/net_init.c | ether_setup(dev); /* Hmmm, should this be called here? */ |
dev | 156 | drivers/net/net_init.c | (*old_devp)->next = dev; |
dev | 157 | drivers/net/net_init.c | dev->next = 0; |
dev | 159 | drivers/net/net_init.c | return dev; |
dev | 163 | drivers/net/net_init.c | static int eth_mac_addr(struct device *dev, void * addr) |
dev | 167 | drivers/net/net_init.c | if(dev->start) |
dev | 169 | drivers/net/net_init.c | memcpy(dev->dev_addr, ifr->ifr_hwaddr.sa_data,dev->hard_header_len); |
dev | 173 | drivers/net/net_init.c | void ether_setup(struct device *dev) |
dev | 179 | drivers/net/net_init.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 182 | drivers/net/net_init.c | if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) { |
dev | 183 | drivers/net/net_init.c | i = simple_strtoul(dev->name + 3, NULL, 0); |
dev | 185 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 187 | drivers/net/net_init.c | else if (dev != ethdev_index[i]) { |
dev | 190 | drivers/net/net_init.c | dev->name); |
dev | 194 | drivers/net/net_init.c | dev->hard_header = eth_header; |
dev | 195 | drivers/net/net_init.c | dev->rebuild_header = eth_rebuild_header; |
dev | 196 | drivers/net/net_init.c | dev->set_mac_address = eth_mac_addr; |
dev | 197 | drivers/net/net_init.c | dev->header_cache = eth_header_cache; |
dev | 199 | drivers/net/net_init.c | dev->type = ARPHRD_ETHER; |
dev | 200 | drivers/net/net_init.c | dev->hard_header_len = ETH_HLEN; |
dev | 201 | drivers/net/net_init.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 202 | drivers/net/net_init.c | dev->addr_len = ETH_ALEN; |
dev | 204 | drivers/net/net_init.c | dev->broadcast[i]=0xff; |
dev | 208 | drivers/net/net_init.c | dev->flags = IFF_BROADCAST|IFF_MULTICAST; |
dev | 209 | drivers/net/net_init.c | dev->family = AF_INET; |
dev | 210 | drivers/net/net_init.c | dev->pa_addr = 0; |
dev | 211 | drivers/net/net_init.c | dev->pa_brdaddr = 0; |
dev | 212 | drivers/net/net_init.c | dev->pa_mask = 0; |
dev | 213 | drivers/net/net_init.c | dev->pa_alen = 4; |
dev | 218 | drivers/net/net_init.c | void tr_setup(struct device *dev) |
dev | 224 | drivers/net/net_init.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 226 | drivers/net/net_init.c | dev->hard_header = tr_header; |
dev | 227 | drivers/net/net_init.c | dev->rebuild_header = tr_rebuild_header; |
dev | 229 | drivers/net/net_init.c | dev->type = ARPHRD_IEEE802; |
dev | 230 | drivers/net/net_init.c | dev->hard_header_len = TR_HLEN; |
dev | 231 | drivers/net/net_init.c | dev->mtu = 2000; /* bug in fragmenter...*/ |
dev | 232 | drivers/net/net_init.c | dev->addr_len = TR_ALEN; |
dev | 234 | drivers/net/net_init.c | dev->broadcast[i]=0xff; |
dev | 238 | drivers/net/net_init.c | dev->flags = IFF_BROADCAST; |
dev | 239 | drivers/net/net_init.c | dev->family = AF_INET; |
dev | 240 | drivers/net/net_init.c | dev->pa_addr = 0; |
dev | 241 | drivers/net/net_init.c | dev->pa_brdaddr = 0; |
dev | 242 | drivers/net/net_init.c | dev->pa_mask = 0; |
dev | 243 | drivers/net/net_init.c | dev->pa_alen = 4; |
dev | 248 | drivers/net/net_init.c | int ether_config(struct device *dev, struct ifmap *map) |
dev | 251 | drivers/net/net_init.c | dev->mem_start = map->mem_start; |
dev | 253 | drivers/net/net_init.c | dev->mem_end = map->mem_end; |
dev | 255 | drivers/net/net_init.c | dev->base_addr = map->base_addr; |
dev | 257 | drivers/net/net_init.c | dev->irq = map->irq; |
dev | 259 | drivers/net/net_init.c | dev->dma = map->dma; |
dev | 261 | drivers/net/net_init.c | dev->if_port = map->port; |
dev | 265 | drivers/net/net_init.c | int register_netdev(struct device *dev) |
dev | 274 | drivers/net/net_init.c | if (dev && dev->init) { |
dev | 275 | drivers/net/net_init.c | if (dev->name && |
dev | 276 | drivers/net/net_init.c | ((dev->name[0] == '\0') || (dev->name[0] == ' '))) { |
dev | 279 | drivers/net/net_init.c | sprintf(dev->name, "eth%d", i); |
dev | 280 | drivers/net/net_init.c | printk("loading device '%s'...\n", dev->name); |
dev | 281 | drivers/net/net_init.c | ethdev_index[i] = dev; |
dev | 286 | drivers/net/net_init.c | if (dev->init(dev) != 0) { |
dev | 296 | drivers/net/net_init.c | d->next = dev; |
dev | 299 | drivers/net/net_init.c | dev_base = dev; |
dev | 300 | drivers/net/net_init.c | dev->next = NULL; |
dev | 306 | drivers/net/net_init.c | void unregister_netdev(struct device *dev) |
dev | 317 | drivers/net/net_init.c | if (dev == NULL) { |
dev | 323 | drivers/net/net_init.c | if (dev->start) |
dev | 324 | drivers/net/net_init.c | printk("'%s' busy\n", dev->name); |
dev | 326 | drivers/net/net_init.c | if (dev_base == dev) |
dev | 327 | drivers/net/net_init.c | dev_base = dev->next; |
dev | 329 | drivers/net/net_init.c | while (d && (d->next != dev)) |
dev | 332 | drivers/net/net_init.c | if (d && (d->next == dev)) { |
dev | 333 | drivers/net/net_init.c | d->next = dev->next; |
dev | 334 | drivers/net/net_init.c | printk("'%s' unlinked\n", dev->name); |
dev | 337 | drivers/net/net_init.c | printk("'%s' not found\n", dev->name); |
dev | 343 | drivers/net/net_init.c | if (ethdev_index[i] == dev) { |
dev | 100 | drivers/net/ni52.c | #define ni_attn586() {outb(0,dev->base_addr+NI52_ATTENTION);} |
dev | 101 | drivers/net/ni52.c | #define ni_reset586() {outb(0,dev->base_addr+NI52_RESET);} |
dev | 146 | drivers/net/ni52.c | printk("%s: scb_cmd timed out .. resetting i82586\n",dev->name); \ |
dev | 163 | drivers/net/ni52.c | static int ni52_probe1(struct device *dev,int ioaddr); |
dev | 165 | drivers/net/ni52.c | static int ni52_open(struct device *dev); |
dev | 166 | drivers/net/ni52.c | static int ni52_close(struct device *dev); |
dev | 168 | drivers/net/ni52.c | static struct enet_statistics *ni52_get_stats(struct device *dev); |
dev | 169 | drivers/net/ni52.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 172 | drivers/net/ni52.c | static int init586(struct device *dev,int num_addrs,void *addrs); |
dev | 173 | drivers/net/ni52.c | static int check586(struct device *dev,char *where,unsigned size); |
dev | 174 | drivers/net/ni52.c | static void alloc586(struct device *dev); |
dev | 175 | drivers/net/ni52.c | static void startrecv586(struct device *dev); |
dev | 176 | drivers/net/ni52.c | static void *alloc_rfa(struct device *dev,void *ptr); |
dev | 177 | drivers/net/ni52.c | static void ni52_rcv_int(struct device *dev); |
dev | 178 | drivers/net/ni52.c | static void ni52_xmt_int(struct device *dev); |
dev | 179 | drivers/net/ni52.c | static void ni52_rnr_int(struct device *dev); |
dev | 207 | drivers/net/ni52.c | static int ni52_close(struct device *dev) |
dev | 209 | drivers/net/ni52.c | free_irq(dev->irq); |
dev | 210 | drivers/net/ni52.c | irq2dev_map[dev->irq] = 0; |
dev | 214 | drivers/net/ni52.c | dev->start = 0; |
dev | 215 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 224 | drivers/net/ni52.c | static int ni52_open(struct device *dev) |
dev | 226 | drivers/net/ni52.c | alloc586(dev); |
dev | 227 | drivers/net/ni52.c | init586(dev,0,NULL); |
dev | 228 | drivers/net/ni52.c | startrecv586(dev); |
dev | 230 | drivers/net/ni52.c | if(request_irq(dev->irq, &ni52_interrupt,0,"ni52")) |
dev | 235 | drivers/net/ni52.c | irq2dev_map[dev->irq] = dev; |
dev | 237 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 238 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 239 | drivers/net/ni52.c | dev->start = 1; |
dev | 248 | drivers/net/ni52.c | static int check586(struct device *dev,char *where,unsigned size) |
dev | 250 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 285 | drivers/net/ni52.c | void alloc586(struct device *dev) |
dev | 287 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 293 | drivers/net/ni52.c | p->scb = (struct scb_struct *) (dev->mem_start); |
dev | 310 | drivers/net/ni52.c | printk("%s: Init-Problems (alloc).\n",dev->name); |
dev | 319 | drivers/net/ni52.c | int ni52_probe(struct device *dev) |
dev | 322 | drivers/net/ni52.c | int base_addr = dev->base_addr; |
dev | 327 | drivers/net/ni52.c | return ni52_probe1(dev, base_addr); |
dev | 339 | drivers/net/ni52.c | dev->base_addr = ioaddr; |
dev | 340 | drivers/net/ni52.c | if (ni52_probe1(dev, ioaddr) == 0) |
dev | 344 | drivers/net/ni52.c | dev->base_addr = base_addr; |
dev | 348 | drivers/net/ni52.c | static int ni52_probe1(struct device *dev,int ioaddr) |
dev | 354 | drivers/net/ni52.c | dev->dev_addr[i] = inb(dev->base_addr+i); |
dev | 356 | drivers/net/ni52.c | if(dev->dev_addr[0] != NI52_ADDR0 || dev->dev_addr[1] != NI52_ADDR1 |
dev | 357 | drivers/net/ni52.c | || dev->dev_addr[2] != NI52_ADDR2) |
dev | 360 | drivers/net/ni52.c | printk("%s: Ni52 found at %#3x, ",dev->name,dev->base_addr); |
dev | 364 | drivers/net/ni52.c | dev->priv = (void *) kmalloc(sizeof(struct priv),GFP_KERNEL); |
dev | 366 | drivers/net/ni52.c | memset((char *) dev->priv,0,sizeof(struct priv)); |
dev | 371 | drivers/net/ni52.c | if(dev->mem_start != 0) /* no auto-mem-probe */ |
dev | 374 | drivers/net/ni52.c | if(!check586(dev,(char *) dev->mem_start,size)) { |
dev | 376 | drivers/net/ni52.c | if(!check586(dev,(char *) dev->mem_start,size)) { |
dev | 377 | drivers/net/ni52.c | printk("?memprobe, Can't find memory at 0x%lx!\n",dev->mem_start); |
dev | 390 | drivers/net/ni52.c | dev->mem_start = memaddrs[i]; |
dev | 392 | drivers/net/ni52.c | if(check586(dev,(char *)dev->mem_start,size)) /* 8K-check */ |
dev | 395 | drivers/net/ni52.c | if(check586(dev,(char *)dev->mem_start,size)) /* 16K-check */ |
dev | 399 | drivers/net/ni52.c | dev->mem_end = dev->mem_start + size; /* set mem_end showed by 'ifconfig' */ |
dev | 401 | drivers/net/ni52.c | ((struct priv *) (dev->priv))->base = dev->mem_start + size - 0x01000000; |
dev | 402 | drivers/net/ni52.c | alloc586(dev); |
dev | 406 | drivers/net/ni52.c | ((struct priv *) dev->priv)->num_recv_buffs = NUM_RECV_BUFFS_8; |
dev | 408 | drivers/net/ni52.c | ((struct priv *) dev->priv)->num_recv_buffs = NUM_RECV_BUFFS_16; |
dev | 410 | drivers/net/ni52.c | printk("Memaddr: 0x%lx, Memsize: %d, ",dev->mem_start,size); |
dev | 412 | drivers/net/ni52.c | if(dev->irq < 2) |
dev | 417 | drivers/net/ni52.c | if(!(dev->irq = autoirq_report(2))) |
dev | 423 | drivers/net/ni52.c | else if(dev->irq == 2) |
dev | 424 | drivers/net/ni52.c | dev->irq = 9; |
dev | 426 | drivers/net/ni52.c | printk("IRQ %d.\n",dev->irq); |
dev | 428 | drivers/net/ni52.c | dev->open = &ni52_open; |
dev | 429 | drivers/net/ni52.c | dev->stop = &ni52_close; |
dev | 430 | drivers/net/ni52.c | dev->get_stats = &ni52_get_stats; |
dev | 431 | drivers/net/ni52.c | dev->hard_start_xmit = &ni52_send_packet; |
dev | 432 | drivers/net/ni52.c | dev->set_multicast_list = &set_multicast_list; |
dev | 434 | drivers/net/ni52.c | dev->if_port = 0; |
dev | 436 | drivers/net/ni52.c | ether_setup(dev); |
dev | 438 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 439 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 440 | drivers/net/ni52.c | dev->start = 0; |
dev | 450 | drivers/net/ni52.c | static int init586(struct device *dev,int num_addrs,void *addrs) |
dev | 455 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 490 | drivers/net/ni52.c | printk("%s (ni52): configure command failed: %x\n",dev->name,cfg_cmd->cmd_status); |
dev | 503 | drivers/net/ni52.c | memcpy((char *)&ias_cmd->iaddr,(char *) dev->dev_addr,ETH_ALEN); |
dev | 515 | drivers/net/ni52.c | printk("%s (ni52): individual address setup command failed: %04x\n",dev->name,ias_cmd->cmd_status); |
dev | 537 | drivers/net/ni52.c | printk("%s: Problems while running the TDR.\n",dev->name); |
dev | 551 | drivers/net/ni52.c | printk("%s: TDR: Transceiver problem!\n",dev->name); |
dev | 553 | drivers/net/ni52.c | printk("%s: TDR: No correct termination %d clocks away.\n",dev->name,result & TDR_TIMEMASK); |
dev | 557 | drivers/net/ni52.c | printk("%s: TDR: Detected a short circuit %d clocks away.\n",dev->name,result & TDR_TIMEMASK); |
dev | 560 | drivers/net/ni52.c | printk("%s: TDR: Unknown status %04x\n",dev->name,result); |
dev | 596 | drivers/net/ni52.c | ptr = alloc_rfa(dev,(void *)ptr); /* init receive-frame-area */ |
dev | 607 | drivers/net/ni52.c | printk("%s: Ooooops, no memory for MC-Setup!\n",dev->name); |
dev | 614 | drivers/net/ni52.c | printk("%s: Sorry, can only apply %d MC-Address(es).\n",dev->name,num_addrs); |
dev | 631 | drivers/net/ni52.c | printk("%s: Can't apply multicast-address-list.\n",dev->name); |
dev | 646 | drivers/net/ni52.c | printk("%s: not enough shared-mem for your configuration!\n",dev->name); |
dev | 685 | drivers/net/ni52.c | static void *alloc_rfa(struct device *dev,void *ptr) |
dev | 690 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 731 | drivers/net/ni52.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 735 | drivers/net/ni52.c | if (dev == NULL) { |
dev | 739 | drivers/net/ni52.c | p = (struct priv *) dev->priv; |
dev | 741 | drivers/net/ni52.c | dev->interrupt = 1; |
dev | 749 | drivers/net/ni52.c | ni52_xmt_int(dev); |
dev | 752 | drivers/net/ni52.c | ni52_rcv_int(dev); |
dev | 757 | drivers/net/ni52.c | if(dev->start) |
dev | 758 | drivers/net/ni52.c | printk("%s: oops! CU has left active state. stat: %04x/%04x.\n",dev->name,(int) stat,(int) p->scb->status); |
dev | 772 | drivers/net/ni52.c | printk("%s: Receiver-Unit went 'NOT READY': %04x/%04x.\n",dev->name,(int) stat,(int) p->scb->status); |
dev | 773 | drivers/net/ni52.c | ni52_rnr_int(dev); |
dev | 781 | drivers/net/ni52.c | dev->interrupt = 0; |
dev | 788 | drivers/net/ni52.c | static void ni52_rcv_int(struct device *dev) |
dev | 794 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 809 | drivers/net/ni52.c | skb->dev = dev; |
dev | 812 | drivers/net/ni52.c | skb->protocol=eth_type_trans(skb,dev); |
dev | 821 | drivers/net/ni52.c | printk("%s: received oversized frame.\n",dev->name); |
dev | 827 | drivers/net/ni52.c | printk("%s: oops! rfd-error-status: %04x\n",dev->name,status); |
dev | 842 | drivers/net/ni52.c | static void ni52_rnr_int(struct device *dev) |
dev | 844 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 853 | drivers/net/ni52.c | alloc_rfa(dev,(char *)p->rfd_first); |
dev | 854 | drivers/net/ni52.c | startrecv586(dev); /* restart RU */ |
dev | 856 | drivers/net/ni52.c | printk("%s: Receive-Unit restarted. Status: %04x\n",dev->name,p->scb->status); |
dev | 864 | drivers/net/ni52.c | static void ni52_xmt_int(struct device *dev) |
dev | 867 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 871 | drivers/net/ni52.c | printk("%s: strange .. xmit-int without a 'COMPLETE'\n",dev->name); |
dev | 882 | drivers/net/ni52.c | printk("%s: late collision detected.\n",dev->name); |
dev | 887 | drivers/net/ni52.c | printk("%s: no carrier detected.\n",dev->name); |
dev | 890 | drivers/net/ni52.c | printk("%s: loss of CTS detected.\n",dev->name); |
dev | 893 | drivers/net/ni52.c | printk("%s: DMA underrun detected.\n",dev->name); |
dev | 896 | drivers/net/ni52.c | printk("%s: Max. collisions exceeded.\n",dev->name); |
dev | 906 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 914 | drivers/net/ni52.c | static void startrecv586(struct device *dev) |
dev | 916 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 928 | drivers/net/ni52.c | static int ni52_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 934 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 936 | drivers/net/ni52.c | if(dev->tbusy) |
dev | 938 | drivers/net/ni52.c | int tickssofar = jiffies - dev->trans_start; |
dev | 944 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 946 | drivers/net/ni52.c | printk("%s: strange ... timeout with CU active?!?\n",dev->name); |
dev | 947 | 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 | 956 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 962 | drivers/net/ni52.c | printk("%s: xmitter timed out, try to restart! stat: %04x\n",dev->name,p->scb->status); |
dev | 963 | 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 | 965 | drivers/net/ni52.c | ni52_close(dev); |
dev | 966 | drivers/net/ni52.c | ni52_open(dev); |
dev | 968 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 974 | drivers/net/ni52.c | dev_tint(dev); |
dev | 982 | 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 | 986 | drivers/net/ni52.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 987 | drivers/net/ni52.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 1003 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1012 | drivers/net/ni52.c | printk("%s: Can't start transmit-command.\n",dev->name); |
dev | 1023 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1038 | drivers/net/ni52.c | dev->trans_start = jiffies; |
dev | 1043 | drivers/net/ni52.c | dev->tbusy = 0; |
dev | 1055 | drivers/net/ni52.c | static struct enet_statistics *ni52_get_stats(struct device *dev) |
dev | 1057 | drivers/net/ni52.c | struct priv *p = (struct priv *) dev->priv; |
dev | 1081 | drivers/net/ni52.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1083 | drivers/net/ni52.c | if(!dev->start && !num_addrs) |
dev | 1085 | drivers/net/ni52.c | printk("%s: Can't apply promiscuous/multicastmode to a not running interface.\n",dev->name); |
dev | 1089 | drivers/net/ni52.c | dev->start = 0; |
dev | 1090 | drivers/net/ni52.c | alloc586(dev); |
dev | 1091 | drivers/net/ni52.c | init586(dev,num_addrs,addrs); |
dev | 1092 | drivers/net/ni52.c | startrecv586(dev); |
dev | 1093 | drivers/net/ni52.c | dev->start = 1; |
dev | 77 | drivers/net/ni65.c | #define PORT dev->base_addr |
dev | 114 | drivers/net/ni65.c | static int ni65_probe1(struct device *dev,int); |
dev | 116 | drivers/net/ni65.c | static void recv_intr(struct device *dev); |
dev | 117 | drivers/net/ni65.c | static void xmit_intr(struct device *dev); |
dev | 118 | drivers/net/ni65.c | static int ni65_open(struct device *dev); |
dev | 119 | drivers/net/ni65.c | static int am7990_reinit(struct device *dev); |
dev | 120 | drivers/net/ni65.c | static int ni65_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 121 | drivers/net/ni65.c | static int ni65_close(struct device *dev); |
dev | 124 | drivers/net/ni65.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 149 | drivers/net/ni65.c | static int ni65_open(struct device *dev) |
dev | 151 | drivers/net/ni65.c | if(am7990_reinit(dev)) |
dev | 153 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 154 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 155 | drivers/net/ni65.c | dev->start = 1; |
dev | 160 | drivers/net/ni65.c | dev->start = 0; |
dev | 165 | drivers/net/ni65.c | static int ni65_close(struct device *dev) |
dev | 168 | drivers/net/ni65.c | dev->tbusy = 1; |
dev | 169 | drivers/net/ni65.c | dev->start = 0; |
dev | 178 | drivers/net/ni65.c | int ni65_probe(struct device *dev) |
dev | 181 | drivers/net/ni65.c | int base_addr = dev->base_addr; |
dev | 184 | drivers/net/ni65.c | return ni65_probe1(dev, base_addr); |
dev | 196 | drivers/net/ni65.c | dev->base_addr = ioaddr; |
dev | 197 | drivers/net/ni65.c | if (ni65_probe1(dev, ioaddr) == 0) |
dev | 201 | drivers/net/ni65.c | dev->base_addr = base_addr; |
dev | 206 | drivers/net/ni65.c | static int ni65_probe1(struct device *dev,int ioaddr) |
dev | 213 | drivers/net/ni65.c | station_addr[i] = dev->dev_addr[i] = inb(PORT+L_EBASE+i); |
dev | 217 | drivers/net/ni65.c | printk("%s: wrong Hardaddress \n",dev->name); |
dev | 221 | drivers/net/ni65.c | if(dev->irq == 0) |
dev | 222 | drivers/net/ni65.c | dev->irq = irqtab[(inw(PORT+L_CONFIG)>>2)&3]; |
dev | 223 | drivers/net/ni65.c | if(dev->dma == 0) |
dev | 224 | drivers/net/ni65.c | dev->dma = dmatab[inw(PORT+L_CONFIG)&3]; |
dev | 226 | drivers/net/ni65.c | printk("%s: %s found at %#3x, IRQ %d DMA %d.\n", dev->name, |
dev | 227 | drivers/net/ni65.c | "network card", dev->base_addr, dev->irq,dev->dma); |
dev | 230 | drivers/net/ni65.c | int irqval = request_irq(dev->irq, &ni65_interrupt,0,"ni65"); |
dev | 233 | drivers/net/ni65.c | dev->name,dev->irq, irqval); |
dev | 236 | drivers/net/ni65.c | if(request_dma(dev->dma, "ni65") != 0) |
dev | 238 | drivers/net/ni65.c | printk("%s: Can't request dma-channel %d\n",dev->name,(int) dev->dma); |
dev | 239 | drivers/net/ni65.c | free_irq(dev->irq); |
dev | 243 | drivers/net/ni65.c | irq2dev_map[dev->irq] = dev; |
dev | 248 | drivers/net/ni65.c | p = dev->priv = (void *) kmalloc(sizeof(struct priv),GFP_KERNEL); |
dev | 249 | drivers/net/ni65.c | memset((char *) dev->priv,0,sizeof(struct priv)); |
dev | 251 | drivers/net/ni65.c | dev->open = ni65_open; |
dev | 252 | drivers/net/ni65.c | dev->stop = ni65_close; |
dev | 253 | drivers/net/ni65.c | dev->hard_start_xmit = ni65_send_packet; |
dev | 254 | drivers/net/ni65.c | dev->get_stats = ni65_get_stats; |
dev | 255 | drivers/net/ni65.c | dev->set_multicast_list = set_multicast_list; |
dev | 257 | drivers/net/ni65.c | ether_setup(dev); |
dev | 259 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 260 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 261 | drivers/net/ni65.c | dev->start = 0; |
dev | 264 | drivers/net/ni65.c | printk("%s: Can't alloc TMD/RMD-buffer.\n",dev->name); |
dev | 268 | drivers/net/ni65.c | printk("%s: Can't alloc TMD/RMD buffer in lower 16MB!\n",dev->name); |
dev | 278 | drivers/net/ni65.c | printk("%s: Can't alloc Xmit-Mem.\n",dev->name); |
dev | 282 | drivers/net/ni65.c | printk("%s: Can't alloc Xmit-Mem in lower 16MB!\n",dev->name); |
dev | 291 | drivers/net/ni65.c | printk("%s: unable to alloc recv-mem\n",dev->name); |
dev | 295 | drivers/net/ni65.c | printk("%s: unable to alloc receive-memory in lower 16MB!\n",dev->name); |
dev | 307 | drivers/net/ni65.c | static int am7990_reinit(struct device *dev) |
dev | 312 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 317 | drivers/net/ni65.c | disable_dma(dev->dma); /* I've never worked with dma, but we do it like the packetdriver */ |
dev | 318 | drivers/net/ni65.c | set_dma_mode(dev->dma,DMA_MODE_CASCADE); |
dev | 319 | drivers/net/ni65.c | enable_dma(dev->dma); |
dev | 324 | drivers/net/ni65.c | printk("%s: can't RESET ni6510 card: %04x\n",dev->name,(int) inw(PORT+L_DATAREG)); |
dev | 325 | drivers/net/ni65.c | disable_dma(dev->dma); |
dev | 326 | drivers/net/ni65.c | free_dma(dev->dma); |
dev | 327 | drivers/net/ni65.c | free_irq(dev->irq); |
dev | 357 | drivers/net/ni65.c | p->ib.eaddr[i] = dev->dev_addr[i]; |
dev | 384 | drivers/net/ni65.c | printk("%s: can't init am7990, status: %04x\n",dev->name,(int) inw(PORT+L_DATAREG)); |
dev | 385 | drivers/net/ni65.c | disable_dma(dev->dma); |
dev | 386 | drivers/net/ni65.c | free_dma(dev->dma); |
dev | 387 | drivers/net/ni65.c | free_irq(dev->irq); |
dev | 403 | drivers/net/ni65.c | struct device *dev = (struct device *) irq2dev_map[irq]; |
dev | 405 | drivers/net/ni65.c | if (dev == NULL) { |
dev | 413 | drivers/net/ni65.c | dev->interrupt = 1; |
dev | 417 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 427 | drivers/net/ni65.c | recv_intr(dev); |
dev | 431 | drivers/net/ni65.c | xmit_intr(dev); |
dev | 435 | drivers/net/ni65.c | dev->interrupt = 0; |
dev | 445 | drivers/net/ni65.c | static void xmit_intr(struct device *dev) |
dev | 449 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 468 | drivers/net/ni65.c | printk("%s: xmit-error: %04x %04x\n",dev->name,(int) tmdstat,(int) tmdp->status2); |
dev | 470 | drivers/net/ni65.c | printk("%s: tdr-problems (e.g. no resistor)\n",dev->name); |
dev | 488 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 496 | drivers/net/ni65.c | static void recv_intr(struct device *dev) |
dev | 501 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 512 | drivers/net/ni65.c | printk("%s: packet too long\n",dev->name); |
dev | 518 | drivers/net/ni65.c | printk("%s: receive-error: %04x\n",dev->name,(int) rmdstat ); |
dev | 524 | drivers/net/ni65.c | printk("%s: lance-status: %04x\n",dev->name,(int) inw(PORT+L_DATAREG)); |
dev | 543 | drivers/net/ni65.c | skb1->dev = dev; |
dev | 545 | drivers/net/ni65.c | skb1->protocol=eth_type_trans(skb1,dev); |
dev | 551 | drivers/net/ni65.c | printk("%s: can't alloc new sk_buff\n",dev->name); |
dev | 564 | drivers/net/ni65.c | static int ni65_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 566 | drivers/net/ni65.c | struct priv *p = (struct priv *) dev->priv; |
dev | 569 | drivers/net/ni65.c | if(dev->tbusy) |
dev | 571 | drivers/net/ni65.c | int tickssofar = jiffies - dev->trans_start; |
dev | 575 | drivers/net/ni65.c | printk("%s: xmitter timed out, try to restart!\n",dev->name); |
dev | 576 | drivers/net/ni65.c | am7990_reinit(dev); |
dev | 577 | drivers/net/ni65.c | dev->tbusy=0; |
dev | 578 | drivers/net/ni65.c | dev->trans_start = jiffies; |
dev | 583 | drivers/net/ni65.c | dev_tint(dev); |
dev | 590 | drivers/net/ni65.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 592 | drivers/net/ni65.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 597 | drivers/net/ni65.c | printk("%s: Queue was locked!\n",dev->name); |
dev | 622 | drivers/net/ni65.c | dev->tbusy = 0; |
dev | 626 | drivers/net/ni65.c | dev->trans_start = jiffies; |
dev | 633 | drivers/net/ni65.c | static struct enet_statistics *ni65_get_stats(struct device *dev) |
dev | 635 | drivers/net/ni65.c | return &((struct priv *) dev->priv)->stats; |
dev | 638 | drivers/net/ni65.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 82 | drivers/net/pi2.c | struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 139 | drivers/net/pi2.c | static int pi0_preprobe(struct device *dev){return 0;} /* Dummy probe function */ |
dev | 150 | drivers/net/pi2.c | static int pi_probe(struct device *dev, int card_type); |
dev | 151 | drivers/net/pi2.c | static int pi_open(struct device *dev); |
dev | 152 | drivers/net/pi2.c | static int pi_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 154 | drivers/net/pi2.c | static int pi_close(struct device *dev); |
dev | 155 | drivers/net/pi2.c | static int pi_ioctl(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 156 | drivers/net/pi2.c | static struct enet_statistics *pi_get_stats(struct device *dev); |
dev | 158 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp); |
dev | 161 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp); |
dev | 505 | drivers/net/pi2.c | static void a_rxint(struct device *dev, struct pi_local *lp) |
dev | 557 | drivers/net/pi2.c | printk("PI: %s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 562 | drivers/net/pi2.c | skb->dev = dev; |
dev | 581 | drivers/net/pi2.c | static void b_rxint(struct device *dev, struct pi_local *lp) |
dev | 646 | drivers/net/pi2.c | printk("PI: %s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 651 | 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 | 1282 | drivers/net/pi2.c | static int pi_set_mac_address(struct device *dev, void *addr) |
dev | 1284 | drivers/net/pi2.c | memcpy(dev->dev_addr, addr, 7); /* addr is an AX.25 shifted ASCII */ |
dev | 1304 | drivers/net/pi2.c | static int pi_probe(struct device *dev, int card_type) |
dev | 1312 | drivers/net/pi2.c | ioaddr = dev->base_addr; |
dev | 1317 | drivers/net/pi2.c | dev->priv = (void *) (((int) dev->priv + 7) & ~7); |
dev | 1318 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
dev | 1320 | drivers/net/pi2.c | memset(dev->priv, 0, sizeof(struct pi_local)); |
dev | 1323 | drivers/net/pi2.c | mem_ptr = (unsigned long) dev->priv + sizeof(struct pi_local); |
dev | 1341 | drivers/net/pi2.c | lp->base = dev->base_addr; |
dev | 1342 | drivers/net/pi2.c | lp->cardbase = dev->base_addr & 0x3f0; |
dev | 1343 | drivers/net/pi2.c | if (dev->base_addr & CHANA) { |
dev | 1364 | drivers/net/pi2.c | chipset_init(dev); |
dev | 1366 | drivers/net/pi2.c | if (dev->base_addr & CHANA) { /* Do these things only for the A port */ |
dev | 1369 | drivers/net/pi2.c | lp->dmachan = dev->dma; |
dev | 1375 | drivers/net/pi2.c | if (dev->irq < 2) { |
dev | 1386 | drivers/net/pi2.c | dev->irq = autoirq_report(20); |
dev | 1387 | drivers/net/pi2.c | if (!dev->irq) { |
dev | 1392 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, FHWRES); /* Hardware reset */ |
dev | 1394 | drivers/net/pi2.c | wrtscc(lp->cardbase, dev->base_addr + CTL, R9, 0); |
dev | 1399 | drivers/net/pi2.c | dev->irq, dev->dma); |
dev | 1405 | drivers/net/pi2.c | int irqval = request_irq(dev->irq, &pi_interrupt,0, "pi2"); |
dev | 1408 | drivers/net/pi2.c | dev->irq, irqval); |
dev | 1418 | drivers/net/pi2.c | dev->open = pi_open; |
dev | 1419 | drivers/net/pi2.c | dev->stop = pi_close; |
dev | 1420 | drivers/net/pi2.c | dev->do_ioctl = pi_ioctl; |
dev | 1421 | drivers/net/pi2.c | dev->hard_start_xmit = pi_send_packet; |
dev | 1422 | drivers/net/pi2.c | dev->get_stats = pi_get_stats; |
dev | 1426 | drivers/net/pi2.c | skb_queue_head_init(&dev->buffs[i]); |
dev | 1429 | drivers/net/pi2.c | dev->hard_header = pi_header; |
dev | 1430 | drivers/net/pi2.c | dev->rebuild_header = pi_rebuild_header; |
dev | 1431 | drivers/net/pi2.c | dev->set_mac_address = pi_set_mac_address; |
dev | 1433 | drivers/net/pi2.c | dev->type = ARPHRD_AX25; /* AF_AX25 device */ |
dev | 1434 | drivers/net/pi2.c | dev->hard_header_len = 73; /* We do digipeaters now */ |
dev | 1435 | drivers/net/pi2.c | dev->mtu = 1500; /* eth_mtu is the default */ |
dev | 1436 | drivers/net/pi2.c | dev->addr_len = 7; /* sizeof an ax.25 address */ |
dev | 1437 | drivers/net/pi2.c | memcpy(dev->broadcast, ax25_bcast, 7); |
dev | 1438 | drivers/net/pi2.c | memcpy(dev->dev_addr, ax25_test, 7); |
dev | 1441 | drivers/net/pi2.c | dev->flags = 0; |
dev | 1442 | drivers/net/pi2.c | dev->family = AF_INET; |
dev | 1443 | drivers/net/pi2.c | dev->pa_addr = 0; |
dev | 1444 | drivers/net/pi2.c | dev->pa_brdaddr = 0; |
dev | 1445 | drivers/net/pi2.c | dev->pa_mask = 0; |
dev | 1446 | drivers/net/pi2.c | dev->pa_alen = 4; |
dev | 1458 | drivers/net/pi2.c | static int pi_open(struct device *dev) |
dev | 1463 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1465 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1467 | drivers/net/pi2.c | if (request_dma(dev->dma,"pi2")) { |
dev | 1468 | drivers/net/pi2.c | free_irq(dev->irq); |
dev | 1471 | drivers/net/pi2.c | irq2dev_map[dev->irq] = dev; |
dev | 1474 | drivers/net/pi2.c | chipset_init(dev); |
dev | 1478 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1479 | drivers/net/pi2.c | scc_init(dev); /* Called once for each channel */ |
dev | 1480 | drivers/net/pi2.c | scc_init(dev->next); |
dev | 1490 | drivers/net/pi2.c | dev->tbusy = 0; |
dev | 1491 | drivers/net/pi2.c | dev->interrupt = 0; |
dev | 1492 | drivers/net/pi2.c | dev->start = 1; |
dev | 1497 | drivers/net/pi2.c | static int pi_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 1499 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1505 | drivers/net/pi2.c | dev_tint(dev); |
dev | 1509 | drivers/net/pi2.c | dev->trans_start = jiffies; |
dev | 1571 | drivers/net/pi2.c | static int pi_close(struct device *dev) |
dev | 1580 | drivers/net/pi2.c | lp = (struct pi_local *) dev->priv; |
dev | 1583 | drivers/net/pi2.c | chipset_init(dev); /* reset the scc */ |
dev | 1588 | drivers/net/pi2.c | dev->tbusy = 1; |
dev | 1589 | drivers/net/pi2.c | dev->start = 0; |
dev | 1599 | drivers/net/pi2.c | static int pi_ioctl(struct device *dev, struct ifreq *ifr, int cmd) |
dev | 1603 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 1637 | drivers/net/pi2.c | if (dev->base_addr & 2) { /* if A channel */ |
dev | 1642 | drivers/net/pi2.c | pi_close(dev); |
dev | 1644 | drivers/net/pi2.c | dev->dma = lp->dmachan = rq.dmachan; |
dev | 1647 | drivers/net/pi2.c | pi_open(dev); |
dev | 1667 | drivers/net/pi2.c | rq.irq = dev->irq; |
dev | 1681 | drivers/net/pi2.c | pi_get_stats(struct device *dev) |
dev | 1683 | drivers/net/pi2.c | struct pi_local *lp = (struct pi_local *) dev->priv; |
dev | 118 | drivers/net/pi2.h | int dev; /* Device number */ |
dev | 120 | drivers/net/plip.c | #define PAR_DATA(dev) ((dev)->base_addr+0) |
dev | 121 | drivers/net/plip.c | #define PAR_STATUS(dev) ((dev)->base_addr+1) |
dev | 122 | drivers/net/plip.c | #define PAR_CONTROL(dev) ((dev)->base_addr+2) |
dev | 125 | drivers/net/plip.c | static void plip_kick_bh(struct device *dev); |
dev | 126 | drivers/net/plip.c | static void plip_bh(struct device *dev); |
dev | 132 | drivers/net/plip.c | static int plip_rebuild_header(void *buff, struct device *dev, |
dev | 134 | drivers/net/plip.c | static int plip_tx_packet(struct sk_buff *skb, struct device *dev); |
dev | 135 | drivers/net/plip.c | static int plip_open(struct device *dev); |
dev | 136 | drivers/net/plip.c | static int plip_close(struct device *dev); |
dev | 137 | drivers/net/plip.c | static struct enet_statistics *plip_get_stats(struct device *dev); |
dev | 138 | drivers/net/plip.c | static int plip_config(struct device *dev, struct ifmap *map); |
dev | 139 | drivers/net/plip.c | static int plip_ioctl(struct device *dev, struct ifreq *ifr, int cmd); |
dev | 198 | drivers/net/plip.c | int (*orig_rebuild_header)(void *eth, struct device *dev, |
dev | 205 | drivers/net/plip.c | plip_init(struct device *dev) |
dev | 210 | drivers/net/plip.c | if (check_region(PAR_DATA(dev), 3) < 0) |
dev | 214 | drivers/net/plip.c | outb(0, PAR_DATA(dev)); |
dev | 216 | drivers/net/plip.c | if (inb(PAR_DATA(dev)) != 0) |
dev | 220 | drivers/net/plip.c | printk("%s: Parallel port at %#3lx, ", dev->name, dev->base_addr); |
dev | 221 | drivers/net/plip.c | if (dev->irq) { |
dev | 222 | drivers/net/plip.c | printk("using assigned IRQ %d.\n", dev->irq); |
dev | 231 | drivers/net/plip.c | outb(0x00, PAR_CONTROL(dev)); |
dev | 233 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 234 | drivers/net/plip.c | outb(PAR_INTR_ON, PAR_CONTROL(dev)); |
dev | 235 | drivers/net/plip.c | outb(PAR_INTR_OFF, PAR_CONTROL(dev)); |
dev | 240 | drivers/net/plip.c | dev->irq = irq; |
dev | 241 | drivers/net/plip.c | printk("using probed IRQ %d.\n", dev->irq); |
dev | 247 | drivers/net/plip.c | request_region(PAR_DATA(dev), 3, dev->name); |
dev | 250 | drivers/net/plip.c | ether_setup(dev); |
dev | 253 | drivers/net/plip.c | dev->hard_start_xmit = plip_tx_packet; |
dev | 254 | drivers/net/plip.c | dev->open = plip_open; |
dev | 255 | drivers/net/plip.c | dev->stop = plip_close; |
dev | 256 | drivers/net/plip.c | dev->get_stats = plip_get_stats; |
dev | 257 | drivers/net/plip.c | dev->set_config = plip_config; |
dev | 258 | drivers/net/plip.c | dev->do_ioctl = plip_ioctl; |
dev | 259 | drivers/net/plip.c | dev->flags = IFF_POINTOPOINT|IFF_NOARP; |
dev | 262 | drivers/net/plip.c | dev->priv = kmalloc(sizeof (struct net_local), GFP_KERNEL); |
dev | 263 | drivers/net/plip.c | if (dev->priv == NULL) |
dev | 265 | drivers/net/plip.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 266 | drivers/net/plip.c | nl = (struct net_local *) dev->priv; |
dev | 268 | drivers/net/plip.c | nl->orig_rebuild_header = dev->rebuild_header; |
dev | 269 | drivers/net/plip.c | dev->rebuild_header = plip_rebuild_header; |
dev | 279 | drivers/net/plip.c | nl->immediate.data = dev; |
dev | 284 | drivers/net/plip.c | nl->deferred.data = dev; |
dev | 293 | drivers/net/plip.c | plip_kick_bh(struct device *dev) |
dev | 295 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 314 | drivers/net/plip.c | static int plip_bh_timeout_error(struct device *dev, struct net_local *nl, |
dev | 323 | drivers/net/plip.c | typedef int (*plip_func)(struct device *dev, struct net_local *nl, |
dev | 337 | drivers/net/plip.c | plip_bh(struct device *dev) |
dev | 339 | drivers/net/plip.c | struct net_local *nl = (struct net_local *)dev->priv; |
dev | 347 | drivers/net/plip.c | if ((r = (*f)(dev, nl, snd, rcv)) != OK |
dev | 348 | drivers/net/plip.c | && (r = plip_bh_timeout_error(dev, nl, snd, rcv, r)) != OK) { |
dev | 355 | drivers/net/plip.c | plip_bh_timeou |