tag | line | file | source code |
dev | 28 | drivers/block/blk.h | int dev; /* -1 if no request */ |
dev | 48 | drivers/block/blk.h | ((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \ |
dev | 67 | drivers/block/blk.h | blksize_size[MAJOR_NR][MINOR(CURRENT->dev)] ? \ |
dev | 68 | drivers/block/blk.h | ((blksize_size[MAJOR_NR][MINOR(CURRENT->dev)] >> 9) - 1) : \ |
dev | 76 | drivers/block/blk.h | extern void resetup_one_dev(struct gendisk *dev, int drive); |
dev | 85 | drivers/block/blk.h | extern int is_read_only(int dev); |
dev | 86 | drivers/block/blk.h | extern void set_device_ro(int dev,int flag); |
dev | 94 | drivers/block/blk.h | #define RO_IOCTLS(dev,where) \ |
dev | 96 | drivers/block/blk.h | set_device_ro((dev),get_fs_long((long *) (where))); return 0; \ |
dev | 98 | drivers/block/blk.h | if (!__err) put_fs_long(is_read_only(dev),(long *) (where)); return __err; } |
dev | 204 | drivers/block/blk.h | #define CURRENT_DEV DEVICE_NR(CURRENT->dev) |
dev | 246 | drivers/block/blk.h | (unsigned long)req->dev, req->sector); |
dev | 268 | drivers/block/blk.h | DEVICE_OFF(req->dev); |
dev | 276 | drivers/block/blk.h | req->dev = -1; |
dev | 292 | drivers/block/blk.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 848 | drivers/block/cdu31a.c | unsigned int dev; |
dev | 869 | drivers/block/cdu31a.c | if (!(CURRENT) || CURRENT->dev < 0) |
dev | 875 | drivers/block/cdu31a.c | dev = MINOR(CURRENT->dev); |
dev | 878 | drivers/block/cdu31a.c | if (dev != 0) |
dev | 1142 | drivers/block/cdu31a.c | unsigned int dev; |
dev | 1153 | drivers/block/cdu31a.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 1154 | drivers/block/cdu31a.c | if (dev != 0) |
dev | 239 | drivers/block/floppy.c | (CURRENT->dev)) |
dev | 682 | drivers/block/floppy.c | int drive = MINOR(CURRENT->dev); |
dev | 1000 | drivers/block/floppy.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 1014 | drivers/block/floppy.c | if (MAJOR(CURRENT->dev) != MAJOR_NR) |
dev | 36 | drivers/block/genhd.c | static void extended_partition(struct gendisk *hd, int dev) |
dev | 43 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 49 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
dev | 84 | drivers/block/genhd.c | dev = ((hd->major) << 8) | current_minor; |
dev | 93 | drivers/block/genhd.c | static void check_partition(struct gendisk *hd, unsigned int dev) |
dev | 105 | drivers/block/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 106 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 107 | drivers/block/genhd.c | printk(" unable to read partition table of device %04x\n",dev); |
dev | 160 | drivers/block/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
dev | 163 | drivers/block/genhd.c | int start = drive<<dev->minor_shift; |
dev | 164 | drivers/block/genhd.c | int j = start + dev->max_p; |
dev | 165 | drivers/block/genhd.c | int major = dev->major << 8; |
dev | 167 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 168 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 171 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 174 | drivers/block/genhd.c | static void setup_dev(struct gendisk *dev) |
dev | 177 | drivers/block/genhd.c | int j = dev->max_nr * dev->max_p; |
dev | 178 | drivers/block/genhd.c | int major = dev->major << 8; |
dev | 183 | drivers/block/genhd.c | dev->part[i].start_sect = 0; |
dev | 184 | drivers/block/genhd.c | dev->part[i].nr_sects = 0; |
dev | 186 | drivers/block/genhd.c | dev->init(); |
dev | 187 | drivers/block/genhd.c | for (drive=0 ; drive<dev->nr_real ; drive++) { |
dev | 188 | drivers/block/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 189 | drivers/block/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 192 | drivers/block/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 193 | drivers/block/genhd.c | blk_size[dev->major] = dev->sizes; |
dev | 289 | drivers/block/hd.c | int dev; |
dev | 293 | drivers/block/hd.c | dev = MINOR(CURRENT->dev) >> 6; |
dev | 296 | drivers/block/hd.c | recalibrate[dev] = 1; |
dev | 300 | drivers/block/hd.c | recalibrate[dev] = 1; |
dev | 350 | drivers/block/hd.c | MINOR(CURRENT->dev), CURRENT->sector, i, CURRENT-> |
dev | 451 | drivers/block/hd.c | unsigned int block,dev; |
dev | 455 | drivers/block/hd.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 463 | drivers/block/hd.c | dev = MINOR(CURRENT->dev); |
dev | 466 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
dev | 469 | drivers/block/hd.c | block, hd[dev].nr_sects); |
dev | 474 | drivers/block/hd.c | block += hd[dev].start_sect; |
dev | 475 | drivers/block/hd.c | dev >>= 6; |
dev | 476 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
dev | 477 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
dev | 478 | drivers/block/hd.c | head = track % hd_info[dev].head; |
dev | 479 | drivers/block/hd.c | cyl = track / hd_info[dev].head; |
dev | 482 | drivers/block/hd.c | dev, cyl, head, sec, CURRENT->buffer); |
dev | 494 | drivers/block/hd.c | if (recalibrate[dev]) { |
dev | 495 | drivers/block/hd.c | recalibrate[dev] = 0; |
dev | 496 | drivers/block/hd.c | hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr); |
dev | 503 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr); |
dev | 516 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr); |
dev | 529 | drivers/block/hd.c | int dev, err; |
dev | 533 | drivers/block/hd.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 534 | drivers/block/hd.c | if (dev >= NR_HD) |
dev | 542 | drivers/block/hd.c | put_fs_byte(hd_info[dev].head, |
dev | 544 | drivers/block/hd.c | put_fs_byte(hd_info[dev].sect, |
dev | 546 | drivers/block/hd.c | put_fs_word(hd_info[dev].cyl, |
dev | 761 | drivers/block/hd.c | static int revalidate_hddisk(int dev, int maxusage) |
dev | 769 | drivers/block/hd.c | target = DEVICE_NR(MINOR(dev)); |
dev | 77 | drivers/block/ll_rw_blk.c | static inline struct request * get_request(int n, int dev) |
dev | 93 | drivers/block/ll_rw_blk.c | if (req->dev < 0) |
dev | 99 | drivers/block/ll_rw_blk.c | req->dev = dev; |
dev | 108 | drivers/block/ll_rw_blk.c | static inline struct request * get_request_wait(int n, int dev) |
dev | 112 | drivers/block/ll_rw_blk.c | while ((req = get_request(n, dev)) == NULL) |
dev | 121 | drivers/block/ll_rw_blk.c | int is_read_only(int dev) |
dev | 125 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 126 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 131 | drivers/block/ll_rw_blk.c | void set_device_ro(int dev,int flag) |
dev | 135 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 136 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 147 | drivers/block/ll_rw_blk.c | static void add_request(struct blk_dev_struct * dev, struct request * req) |
dev | 155 | drivers/block/ll_rw_blk.c | if (!(tmp = dev->current_request)) { |
dev | 156 | drivers/block/ll_rw_blk.c | dev->current_request = req; |
dev | 157 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 171 | drivers/block/ll_rw_blk.c | if (scsi_major(MAJOR(req->dev))) |
dev | 172 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 234 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 248 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 301 | drivers/block/ll_rw_blk.c | void ll_rw_page(int rw, int dev, int page, char * buffer) |
dev | 304 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 307 | drivers/block/ll_rw_blk.c | printk("Trying to read nonexistent block-device %04x (%d)\n",dev,page*8); |
dev | 312 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 313 | drivers/block/ll_rw_blk.c | printk("Can't page to read-only device 0x%X\n",dev); |
dev | 317 | drivers/block/ll_rw_blk.c | req = get_request_wait(NR_REQUEST, dev); |
dev | 344 | drivers/block/ll_rw_blk.c | struct blk_dev_struct * dev; |
dev | 354 | drivers/block/ll_rw_blk.c | dev = NULL; |
dev | 356 | drivers/block/ll_rw_blk.c | dev = blk_dev + major; |
dev | 357 | drivers/block/ll_rw_blk.c | if (!dev || !dev->request_fn) { |
dev | 394 | drivers/block/ll_rw_blk.c | if (!dev->current_request && nr > 1) { |
dev | 395 | drivers/block/ll_rw_blk.c | dev->current_request = &plug; |
dev | 396 | drivers/block/ll_rw_blk.c | plug.dev = -1; |
dev | 409 | drivers/block/ll_rw_blk.c | dev->current_request = plug.next; |
dev | 410 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 423 | drivers/block/ll_rw_blk.c | void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf) |
dev | 428 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 439 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 440 | drivers/block/ll_rw_blk.c | printk("Can't swap to read-only device 0x%X\n",dev); |
dev | 449 | drivers/block/ll_rw_blk.c | req = get_request_wait(NR_REQUEST, dev); |
dev | 472 | drivers/block/ll_rw_blk.c | req->dev = -1; |
dev | 537 | drivers/block/mcd.c | unsigned int block,dev; |
dev | 541 | drivers/block/mcd.c | if (!(CURRENT) || CURRENT->dev < 0) return; |
dev | 543 | drivers/block/mcd.c | dev = MINOR(CURRENT->dev); |
dev | 40 | drivers/block/ramdisk.c | if ((MINOR(CURRENT->dev) != RAMDISK_MINOR) || |
dev | 160 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 162 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 163 | drivers/block/xd.c | while (!xd_valid[dev]) |
dev | 166 | drivers/block/xd.c | xd_access[dev]++; |
dev | 184 | drivers/block/xd.c | if (CURRENT_DEV < xd_drives && CURRENT->sector + CURRENT->nr_sectors <= xd[MINOR(CURRENT->dev)].nr_sects) { |
dev | 185 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
dev | 204 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)),err; |
dev | 206 | drivers/block/xd.c | if (inode && (dev < xd_drives)) |
dev | 211 | drivers/block/xd.c | put_fs_byte(xd_info[dev].heads,(char *) &geometry->heads); |
dev | 212 | drivers/block/xd.c | put_fs_byte(xd_info[dev].sectors,(char *) &geometry->sectors); |
dev | 213 | drivers/block/xd.c | put_fs_word(xd_info[dev].cylinders,(short *) &geometry->cylinders); |
dev | 243 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 245 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 246 | drivers/block/xd.c | sync_dev(dev); |
dev | 247 | drivers/block/xd.c | xd_access[dev]--; |
dev | 252 | drivers/block/xd.c | static int xd_reread_partitions(int dev) |
dev | 254 | drivers/block/xd.c | int target = DEVICE_NR(MINOR(dev)),start = target << xd_gendisk.minor_shift,partition; |
dev | 1813 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 1820 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
dev | 1983 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 1989 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
dev | 2129 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 2136 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) { |
dev | 2137 | drivers/char/tpqic02.c | printk("tape_qic02_open: dev=%x, flags=%x ", dev, flags); |
dev | 2140 | drivers/char/tpqic02.c | if (MINOR(dev)==255) /* special case for resetting */ |
dev | 2187 | drivers/char/tpqic02.c | if ((TP_DENS(dev)!=0) && (TP_DENS(current_tape_dev) != TP_DENS(dev))) { |
dev | 2198 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2237 | drivers/char/tpqic02.c | if (TP_DENS(current_tape_dev) == TP_DENS(dev) ) |
dev | 2240 | drivers/char/tpqic02.c | current_tape_dev = dev; |
dev | 2242 | drivers/char/tpqic02.c | dens = TP_DENS(dev); |
dev | 2248 | drivers/char/tpqic02.c | switch (TP_DENS(dev)) { |
dev | 2292 | drivers/char/tpqic02.c | dev_t dev = inode->i_rdev; |
dev | 2294 | drivers/char/tpqic02.c | if (TP_DIAGS(dev)) |
dev | 2295 | drivers/char/tpqic02.c | printk("tape_qic02_release: dev=%x\n", dev); |
dev | 2312 | drivers/char/tpqic02.c | if ((TP_REWCLOSE(dev)) && (status_bytes_rd | status_bytes_wr)) { |
dev | 250 | drivers/char/tty_io.c | int dev; |
dev | 254 | drivers/char/tty_io.c | dev = 0x0400 + tty->line; |
dev | 258 | drivers/char/tty_io.c | if (filp->f_rdev != dev) |
dev | 996 | drivers/char/tty_io.c | int i, dev; |
dev | 999 | drivers/char/tty_io.c | dev = file->f_rdev; |
dev | 1000 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1001 | drivers/char/tty_io.c | printk("tty_read: bad pseudo-major nr #%d\n", MAJOR(dev)); |
dev | 1004 | drivers/char/tty_io.c | dev = MINOR(dev); |
dev | 1005 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1010 | drivers/char/tty_io.c | (current->tty == dev) && |
dev | 1029 | drivers/char/tty_io.c | int dev, i, is_console; |
dev | 1032 | drivers/char/tty_io.c | dev = file->f_rdev; |
dev | 1034 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1038 | drivers/char/tty_io.c | dev = MINOR(dev); |
dev | 1042 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1046 | drivers/char/tty_io.c | (current->tty == dev) && (tty->pgrp != current->pgrp)) { |
dev | 1068 | drivers/char/tty_io.c | static int init_dev(int dev) |
dev | 1075 | drivers/char/tty_io.c | o_dev = PTY_OTHER(dev); |
dev | 1081 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev) && tty_table[dev] && tty_table[dev]->count) |
dev | 1084 | drivers/char/tty_io.c | if (!tty_table[dev] && !tty) { |
dev | 1087 | drivers/char/tty_io.c | initialize_tty_struct(dev, tty); |
dev | 1090 | drivers/char/tty_io.c | if (!tty_termios[dev] && !tp) { |
dev | 1095 | drivers/char/tty_io.c | initialize_termios(dev, tp); |
dev | 1098 | drivers/char/tty_io.c | if (!termios_locked[dev] && !ltp) { |
dev | 1106 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1134 | drivers/char/tty_io.c | if (!tty_termios[dev]) { |
dev | 1135 | drivers/char/tty_io.c | tty_termios[dev] = tp; |
dev | 1138 | drivers/char/tty_io.c | if (!tty_table[dev]) { |
dev | 1139 | drivers/char/tty_io.c | tty->termios = tty_termios[dev]; |
dev | 1140 | drivers/char/tty_io.c | tty_table[dev] = tty; |
dev | 1143 | drivers/char/tty_io.c | if (!termios_locked[dev]) { |
dev | 1144 | drivers/char/tty_io.c | termios_locked[dev] = ltp; |
dev | 1147 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1161 | drivers/char/tty_io.c | tty_table[dev]->link = tty_table[o_dev]; |
dev | 1162 | drivers/char/tty_io.c | tty_table[o_dev]->link = tty_table[dev]; |
dev | 1164 | drivers/char/tty_io.c | tty_table[dev]->count++; |
dev | 1165 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev)) |
dev | 1189 | drivers/char/tty_io.c | static void release_dev(int dev, struct file * filp) |
dev | 1195 | drivers/char/tty_io.c | tty = tty_table[dev]; |
dev | 1196 | drivers/char/tty_io.c | tp = tty_termios[dev]; |
dev | 1200 | drivers/char/tty_io.c | printk("release_dev: tty_table[%d] was NULL\n", dev); |
dev | 1204 | drivers/char/tty_io.c | printk("release_dev: tty_termios[%d] was NULL\n", dev); |
dev | 1207 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1208 | drivers/char/tty_io.c | o_tty = tty_table[PTY_OTHER(dev)]; |
dev | 1209 | drivers/char/tty_io.c | o_tp = tty_termios[PTY_OTHER(dev)]; |
dev | 1211 | drivers/char/tty_io.c | printk("release_dev: pty pair(%d) was NULL\n", dev); |
dev | 1215 | drivers/char/tty_io.c | printk("release_dev: pty pair(%d) termios was NULL\n", dev); |
dev | 1226 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 1229 | drivers/char/tty_io.c | dev, tty->count); |
dev | 1235 | drivers/char/tty_io.c | dev, tty->count); |
dev | 1257 | drivers/char/tty_io.c | tty_table[PTY_OTHER(dev)] = NULL; |
dev | 1258 | drivers/char/tty_io.c | tty_termios[PTY_OTHER(dev)] = NULL; |
dev | 1261 | drivers/char/tty_io.c | tty_table[dev] = NULL; |
dev | 1262 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1263 | drivers/char/tty_io.c | tty_termios[dev] = NULL; |
dev | 1362 | drivers/char/tty_io.c | int dev; |
dev | 1364 | drivers/char/tty_io.c | dev = filp->f_rdev; |
dev | 1365 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1369 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1370 | drivers/char/tty_io.c | if (!dev) { |
dev | 1374 | drivers/char/tty_io.c | release_dev(dev, filp); |
dev | 1379 | drivers/char/tty_io.c | int dev; |
dev | 1382 | drivers/char/tty_io.c | dev = filp->f_rdev; |
dev | 1383 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1387 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1388 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1390 | drivers/char/tty_io.c | printk("tty_select: tty struct for dev %d was NULL\n", dev); |
dev | 416 | drivers/char/tty_ioctl.c | int dev; |
dev | 424 | drivers/char/tty_ioctl.c | dev = MINOR(file->f_rdev); |
dev | 425 | drivers/char/tty_ioctl.c | tty = TTY_TABLE(dev); |
dev | 428 | drivers/char/tty_ioctl.c | if (IS_A_PTY(dev)) |
dev | 429 | drivers/char/tty_ioctl.c | other_tty = tty_table[PTY_OTHER(dev)]; |
dev | 433 | drivers/char/tty_ioctl.c | termios_dev = dev; |
dev | 434 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 436 | drivers/char/tty_ioctl.c | termios_dev = PTY_OTHER(dev); |
dev | 503 | drivers/char/tty_ioctl.c | current->tty = dev; |
dev | 547 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 571 | drivers/char/tty_ioctl.c | if (IS_A_CONSOLE(dev)) { |
dev | 581 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 583 | drivers/char/tty_ioctl.c | else if (IS_A_PTY_SLAVE(dev)) |
dev | 623 | drivers/char/tty_ioctl.c | if (!IS_A_PTY_MASTER(dev)) |
dev | 63 | drivers/net/3c501.c | int el1_probe(struct device *dev); |
dev | 64 | drivers/net/3c501.c | static int el_open(struct device *dev); |
dev | 65 | drivers/net/3c501.c | static int el_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 67 | drivers/net/3c501.c | static void el_receive(struct device *dev); |
dev | 68 | drivers/net/3c501.c | static void el_reset(struct device *dev); |
dev | 69 | drivers/net/3c501.c | static int el1_close(struct device *dev); |
dev | 70 | drivers/net/3c501.c | static struct enet_statistics *el1_get_stats(struct device *dev); |
dev | 72 | drivers/net/3c501.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 139 | drivers/net/3c501.c | el1_probe(struct device *dev) |
dev | 146 | drivers/net/3c501.c | eldev = dev; /* Store for debugging. */ |
dev | 147 | drivers/net/3c501.c | el_base = dev->base_addr; |
dev | 172 | drivers/net/3c501.c | if (dev->irq < 2) { |
dev | 185 | drivers/net/3c501.c | printk("%s: 3c501 probe failed to detect IRQ line.\n", dev->name); |
dev | 188 | drivers/net/3c501.c | dev->irq = autoirq; |
dev | 193 | drivers/net/3c501.c | dev->base_addr = el_base; |
dev | 194 | drivers/net/3c501.c | memcpy(dev->dev_addr, station_addr, ETH_ALEN); |
dev | 195 | drivers/net/3c501.c | if (dev->mem_start & 0xf) |
dev | 196 | drivers/net/3c501.c | el_debug = dev->mem_start & 0x7; |
dev | 199 | drivers/net/3c501.c | dev->name, dev->base_addr, autoirq ? "auto":"assigned ", dev->irq); |
dev | 205 | drivers/net/3c501.c | dev->open = &el_open; |
dev | 206 | drivers/net/3c501.c | dev->hard_start_xmit = &el_start_xmit; |
dev | 207 | drivers/net/3c501.c | dev->stop = &el1_close; |
dev | 208 | drivers/net/3c501.c | dev->get_stats = &el1_get_stats; |
dev | 210 | drivers/net/3c501.c | dev->set_multicast_list = &set_multicast_list; |
dev | 215 | drivers/net/3c501.c | dev->buffs[i] = NULL; |
dev | 217 | drivers/net/3c501.c | dev->hard_header = eth_header; |
dev | 218 | drivers/net/3c501.c | dev->add_arp = eth_add_arp; |
dev | 219 | drivers/net/3c501.c | dev->queue_xmit = dev_queue_xmit; |
dev | 220 | drivers/net/3c501.c | dev->rebuild_header = eth_rebuild_header; |
dev | 221 | drivers/net/3c501.c | dev->type_trans = eth_type_trans; |
dev | 223 | drivers/net/3c501.c | dev->type = ARPHRD_ETHER; |
dev | 224 | drivers/net/3c501.c | dev->hard_header_len = ETH_HLEN; |
dev | 225 | drivers/net/3c501.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 226 | drivers/net/3c501.c | dev->addr_len = ETH_ALEN; |
dev | 228 | drivers/net/3c501.c | dev->broadcast[i]=0xff; |
dev | 232 | drivers/net/3c501.c | dev->flags = IFF_BROADCAST; |
dev | 233 | drivers/net/3c501.c | dev->family = AF_INET; |
dev | 234 | drivers/net/3c501.c | dev->pa_addr = 0; |
dev | 235 | drivers/net/3c501.c | dev->pa_brdaddr = 0; |
dev | 236 | drivers/net/3c501.c | dev->pa_mask = 0; |
dev | 237 | drivers/net/3c501.c | dev->pa_alen = sizeof(unsigned long); |
dev | 244 | drivers/net/3c501.c | el_open(struct device *dev) |
dev | 248 | drivers/net/3c501.c | printk("%s: Doing el_open()...", dev->name); |
dev | 250 | drivers/net/3c501.c | if (request_irq(dev->irq, &el_interrupt)) { |
dev | 255 | drivers/net/3c501.c | irq2dev_map[dev->irq] = dev; |
dev | 257 | drivers/net/3c501.c | el_reset(dev); |
dev | 259 | drivers/net/3c501.c | dev->start = 1; |
dev | 268 | drivers/net/3c501.c | el_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 271 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 272 | drivers/net/3c501.c | if (jiffies - dev->trans_start < 20) { |
dev | 279 | drivers/net/3c501.c | dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS)); |
dev | 282 | drivers/net/3c501.c | el_reset(dev); |
dev | 289 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 290 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 294 | drivers/net/3c501.c | dev_tint(dev); |
dev | 299 | drivers/net/3c501.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 300 | drivers/net/3c501.c | skb->dev = dev; |
dev | 310 | drivers/net/3c501.c | printk("%s: el_start_xmit(%d)...", dev->name, skb->len); |
dev | 313 | drivers/net/3c501.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 314 | drivers/net/3c501.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 330 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 348 | drivers/net/3c501.c | struct device *dev = eldev; |
dev | 357 | drivers/net/3c501.c | ioaddr = dev->base_addr; |
dev | 362 | drivers/net/3c501.c | printk("%s: el_interrupt() aux=%#02x", dev->name, axsr); |
dev | 363 | drivers/net/3c501.c | if (dev->interrupt) |
dev | 364 | drivers/net/3c501.c | printk("%s: Reentering the interrupt driver!\n", dev->name); |
dev | 365 | drivers/net/3c501.c | dev->interrupt = 1; |
dev | 367 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 376 | drivers/net/3c501.c | " gp=%03x rp=%03x.\n", dev->name, txsr, axsr, |
dev | 378 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 383 | drivers/net/3c501.c | dev->name); |
dev | 393 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 400 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 420 | drivers/net/3c501.c | dev->name, rxsr); |
dev | 431 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 439 | drivers/net/3c501.c | el_receive(struct device *dev) |
dev | 451 | drivers/net/3c501.c | printk("%s: bogus packet, length=%d\n", dev->name, pkt_len); |
dev | 461 | drivers/net/3c501.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 468 | drivers/net/3c501.c | skb->dev = dev; |
dev | 476 | drivers/net/3c501.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 488 | drivers/net/3c501.c | el_reset(struct device *dev) |
dev | 497 | drivers/net/3c501.c | outb(dev->dev_addr[i], el_base + i); |
dev | 506 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 507 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 512 | drivers/net/3c501.c | el1_close(struct device *dev) |
dev | 514 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 517 | drivers/net/3c501.c | printk("%s: Shutting down ethercard at %#x.\n", dev->name, ioaddr); |
dev | 519 | drivers/net/3c501.c | dev->tbusy = 1; |
dev | 520 | drivers/net/3c501.c | dev->start = 0; |
dev | 523 | drivers/net/3c501.c | free_irq(dev->irq); |
dev | 525 | drivers/net/3c501.c | irq2dev_map[dev->irq] = 0; |
dev | 531 | drivers/net/3c501.c | el1_get_stats(struct device *dev) |
dev | 544 | drivers/net/3c501.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 33 | drivers/net/3c503.c | int el2_probe(struct device *dev); |
dev | 34 | drivers/net/3c503.c | int el2_pio_autoprobe(struct device *dev); |
dev | 35 | drivers/net/3c503.c | int el2probe1(int ioaddr, struct device *dev); |
dev | 37 | drivers/net/3c503.c | static int el2_open(struct device *dev); |
dev | 38 | drivers/net/3c503.c | static int el2_close(struct device *dev); |
dev | 39 | drivers/net/3c503.c | static void el2_reset_8390(struct device *dev); |
dev | 40 | drivers/net/3c503.c | static void el2_init_card(struct device *dev); |
dev | 41 | drivers/net/3c503.c | static void el2_block_output(struct device *dev, int count, |
dev | 43 | drivers/net/3c503.c | static int el2_block_input(struct device *dev, int count, char *buf, |
dev | 58 | drivers/net/3c503.c | el2_probe(struct device *dev) |
dev | 61 | drivers/net/3c503.c | short ioaddr = dev->base_addr; |
dev | 66 | drivers/net/3c503.c | return ! el2probe1(ioaddr, dev); |
dev | 81 | drivers/net/3c503.c | if (el2probe1(ports[i], dev)) |
dev | 85 | drivers/net/3c503.c | return el2_pio_autoprobe(dev); |
dev | 94 | drivers/net/3c503.c | el2_pio_autoprobe(struct device *dev) |
dev | 106 | drivers/net/3c503.c | && el2probe1(ports[i], dev)) |
dev | 116 | drivers/net/3c503.c | el2probe1(int ioaddr, struct device *dev) |
dev | 119 | drivers/net/3c503.c | unsigned char *station_addr = dev->dev_addr; |
dev | 152 | drivers/net/3c503.c | ethdev_init(dev); |
dev | 156 | drivers/net/3c503.c | dev->base_addr = ioaddr; |
dev | 168 | drivers/net/3c503.c | ei_status.interface_num = dev->mem_end & 0xf; |
dev | 172 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 174 | drivers/net/3c503.c | dev->mem_start = ((membase_reg & 0xc0) ? 0xD8000 : 0xC8000) + |
dev | 181 | drivers/net/3c503.c | int *mem_base = (int *)dev->mem_start; |
dev | 189 | drivers/net/3c503.c | dev->mem_start = 0; |
dev | 200 | drivers/net/3c503.c | dev->mem_end = dev->rmem_end = dev->mem_start + EL2_MEMSIZE; |
dev | 201 | drivers/net/3c503.c | dev->rmem_start = TX_PAGES*256 + dev->mem_start; |
dev | 205 | drivers/net/3c503.c | dev->mem_start, dev->rmem_start, dev->mem_end, dev->rmem_end); |
dev | 216 | drivers/net/3c503.c | if (dev->irq == 2) |
dev | 217 | drivers/net/3c503.c | dev->irq = 9; |
dev | 218 | drivers/net/3c503.c | else if (dev->irq > 5 && dev->irq != 9) { |
dev | 220 | drivers/net/3c503.c | dev->irq); |
dev | 221 | drivers/net/3c503.c | dev->irq = 0; |
dev | 224 | drivers/net/3c503.c | ei_status.saved_irq = dev->irq; |
dev | 226 | drivers/net/3c503.c | dev->start = 0; |
dev | 227 | drivers/net/3c503.c | dev->open = &el2_open; |
dev | 228 | drivers/net/3c503.c | dev->stop = &el2_close; |
dev | 230 | drivers/net/3c503.c | if (dev->mem_start) |
dev | 232 | drivers/net/3c503.c | dev->name, ei_status.name, dev->mem_start, dev->mem_end-1); |
dev | 235 | drivers/net/3c503.c | dev->name, ei_status.name); |
dev | 243 | drivers/net/3c503.c | el2_open(struct device *dev) |
dev | 246 | drivers/net/3c503.c | if (dev->irq < 2) { |
dev | 258 | drivers/net/3c503.c | && request_irq (dev->irq = *irqp, &ei_interrupt) == 0) |
dev | 267 | drivers/net/3c503.c | if (request_irq(dev->irq, &ei_interrupt)) { |
dev | 271 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 272 | drivers/net/3c503.c | return ei_open(dev); |
dev | 276 | drivers/net/3c503.c | el2_close(struct device *dev) |
dev | 278 | drivers/net/3c503.c | free_irq(dev->irq); |
dev | 279 | drivers/net/3c503.c | dev->irq = ei_status.saved_irq; |
dev | 280 | drivers/net/3c503.c | irq2dev_map[dev->irq] = NULL; |
dev | 283 | drivers/net/3c503.c | NS8390_init(dev, 0); |
dev | 293 | drivers/net/3c503.c | el2_reset_8390(struct device *dev) |
dev | 296 | drivers/net/3c503.c | printk("%s: Resetting the 3c503 board...", dev->name); |
dev | 303 | drivers/net/3c503.c | el2_init_card(dev); |
dev | 309 | drivers/net/3c503.c | el2_init_card(struct device *dev) |
dev | 324 | drivers/net/3c503.c | outb_p(0x00, dev->base_addr + EN0_IMR); |
dev | 329 | drivers/net/3c503.c | outb_p((0x04 << (dev->irq == 9 ? 2 : dev->irq)), E33G_IDCFR); |
dev | 339 | drivers/net/3c503.c | el2_block_output(struct device *dev, int count, |
dev | 348 | drivers/net/3c503.c | if (dev->mem_start) { /* Shared memory transfer */ |
dev | 349 | drivers/net/3c503.c | void *dest_addr = (void *)(dev->mem_start + |
dev | 354 | drivers/net/3c503.c | dev->name, (int) dest_addr); |
dev | 357 | drivers/net/3c503.c | dev->name, (int) dest_addr); |
dev | 375 | drivers/net/3c503.c | dev->name, i, count, boguscount); |
dev | 386 | drivers/net/3c503.c | el2_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 389 | drivers/net/3c503.c | int end_of_ring = dev->rmem_end; |
dev | 393 | drivers/net/3c503.c | if (dev->mem_start) { /* Use the shared memory. */ |
dev | 395 | drivers/net/3c503.c | if (dev->mem_start + ring_offset + count > end_of_ring) { |
dev | 397 | drivers/net/3c503.c | int semi_count = end_of_ring - (dev->mem_start + ring_offset); |
dev | 400 | drivers/net/3c503.c | dev->name, dev->mem_start, ring_offset, |
dev | 401 | drivers/net/3c503.c | dev->mem_start + ring_offset); |
dev | 402 | drivers/net/3c503.c | memcpy(buf, (char *)dev->mem_start + ring_offset, semi_count); |
dev | 404 | drivers/net/3c503.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 405 | drivers/net/3c503.c | return dev->rmem_start + count; |
dev | 409 | drivers/net/3c503.c | dev->name, dev->mem_start, ring_offset, |
dev | 410 | drivers/net/3c503.c | dev->mem_start + ring_offset); |
dev | 411 | drivers/net/3c503.c | memcpy(buf, (char *)dev->mem_start + ring_offset, count); |
dev | 427 | 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 | 182 | drivers/net/3c507.c | #define RX_BUF_END (dev->mem_end - dev->mem_start) |
dev | 259 | drivers/net/3c507.c | extern int el16_probe(struct device *dev); /* Called from Space.c */ |
dev | 261 | drivers/net/3c507.c | static int el16_probe1(struct device *dev, short ioaddr); |
dev | 262 | drivers/net/3c507.c | static int el16_open(struct device *dev); |
dev | 263 | drivers/net/3c507.c | static int el16_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 265 | drivers/net/3c507.c | static void el16_rx(struct device *dev); |
dev | 266 | drivers/net/3c507.c | static int el16_close(struct device *dev); |
dev | 267 | drivers/net/3c507.c | static struct enet_statistics *el16_get_stats(struct device *dev); |
dev | 269 | drivers/net/3c507.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 270 | drivers/net/3c507.c | void init_82586_mem(struct device *dev); |
dev | 280 | drivers/net/3c507.c | el16_probe(struct device *dev) |
dev | 284 | drivers/net/3c507.c | int base_addr = dev->base_addr; |
dev | 288 | drivers/net/3c507.c | return el16_probe1(dev, base_addr); |
dev | 308 | drivers/net/3c507.c | && el16_probe1(dev, *port) == 0) |
dev | 319 | drivers/net/3c507.c | && el16_probe1(dev, *port) == 0) |
dev | 327 | drivers/net/3c507.c | int el16_probe1(struct device *dev, short ioaddr) |
dev | 331 | drivers/net/3c507.c | printk("%s: 3c507 at %#x,", dev->name, ioaddr); |
dev | 346 | drivers/net/3c507.c | dev->base_addr = ioaddr; |
dev | 350 | drivers/net/3c507.c | dev->dev_addr[i] = inb(ioaddr + i); |
dev | 351 | drivers/net/3c507.c | printk(" %02x", dev->dev_addr[i]); |
dev | 354 | drivers/net/3c507.c | if ((dev->mem_start & 0xf) > 0) |
dev | 355 | drivers/net/3c507.c | net_debug = dev->mem_start & 7; |
dev | 358 | drivers/net/3c507.c | dev->mem_start = MEM_BASE; |
dev | 359 | drivers/net/3c507.c | dev->mem_end = dev->mem_start + 0x10000; |
dev | 375 | drivers/net/3c507.c | "shared memory.\n", dev->name); |
dev | 376 | drivers/net/3c507.c | dev->mem_start = base; |
dev | 377 | drivers/net/3c507.c | dev->mem_end = base + size; |
dev | 381 | drivers/net/3c507.c | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; |
dev | 382 | drivers/net/3c507.c | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; |
dev | 384 | drivers/net/3c507.c | printk(", IRQ %d, %sternal xcvr, memory %#x-%#x.\n", dev->irq, |
dev | 385 | drivers/net/3c507.c | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); |
dev | 391 | drivers/net/3c507.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 392 | drivers/net/3c507.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 394 | drivers/net/3c507.c | dev->open = el16_open; |
dev | 395 | drivers/net/3c507.c | dev->stop = el16_close; |
dev | 396 | drivers/net/3c507.c | dev->hard_start_xmit = el16_send_packet; |
dev | 397 | drivers/net/3c507.c | dev->get_stats = el16_get_stats; |
dev | 402 | drivers/net/3c507.c | dev->buffs[i] = NULL; |
dev | 404 | drivers/net/3c507.c | dev->hard_header = eth_header; |
dev | 405 | drivers/net/3c507.c | dev->add_arp = eth_add_arp; |
dev | 406 | drivers/net/3c507.c | dev->queue_xmit = dev_queue_xmit; |
dev | 407 | drivers/net/3c507.c | dev->rebuild_header = eth_rebuild_header; |
dev | 408 | drivers/net/3c507.c | dev->type_trans = eth_type_trans; |
dev | 410 | drivers/net/3c507.c | dev->type = ARPHRD_ETHER; |
dev | 411 | drivers/net/3c507.c | dev->hard_header_len = ETH_HLEN; |
dev | 412 | drivers/net/3c507.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 413 | drivers/net/3c507.c | dev->addr_len = ETH_ALEN; |
dev | 415 | drivers/net/3c507.c | dev->broadcast[i]=0xff; |
dev | 419 | drivers/net/3c507.c | dev->flags = IFF_BROADCAST; |
dev | 420 | drivers/net/3c507.c | dev->family = AF_INET; |
dev | 421 | drivers/net/3c507.c | dev->pa_addr = 0; |
dev | 422 | drivers/net/3c507.c | dev->pa_brdaddr = 0; |
dev | 423 | drivers/net/3c507.c | dev->pa_mask = 0; |
dev | 424 | drivers/net/3c507.c | dev->pa_alen = sizeof(unsigned long); |
dev | 432 | drivers/net/3c507.c | el16_open(struct device *dev) |
dev | 434 | drivers/net/3c507.c | irq2dev_map[dev->irq] = dev; |
dev | 437 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 439 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 440 | drivers/net/3c507.c | dev->interrupt = 0; |
dev | 441 | drivers/net/3c507.c | dev->start = 1; |
dev | 446 | drivers/net/3c507.c | el16_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 448 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 449 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 450 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 452 | drivers/net/3c507.c | if (dev->tbusy) { |
dev | 455 | drivers/net/3c507.c | int tickssofar = jiffies - dev->trans_start; |
dev | 459 | drivers/net/3c507.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 466 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 474 | drivers/net/3c507.c | dev->tbusy=0; |
dev | 475 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 482 | drivers/net/3c507.c | dev_tint(dev); |
dev | 488 | drivers/net/3c507.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 489 | drivers/net/3c507.c | skb->dev = dev; |
dev | 496 | drivers/net/3c507.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 497 | drivers/net/3c507.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 504 | drivers/net/3c507.c | hardware_send_packet(dev, buf, length); |
dev | 505 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 524 | drivers/net/3c507.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 530 | drivers/net/3c507.c | if (dev == NULL) { |
dev | 534 | drivers/net/3c507.c | dev->interrupt = 1; |
dev | 536 | drivers/net/3c507.c | ioaddr = dev->base_addr; |
dev | 537 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
dev | 538 | drivers/net/3c507.c | shmem = ((ushort*)dev->mem_start); |
dev | 543 | drivers/net/3c507.c | printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); |
dev | 560 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 581 | drivers/net/3c507.c | el16_rx(dev); |
dev | 587 | drivers/net/3c507.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 590 | drivers/net/3c507.c | dev->name, status); |
dev | 597 | drivers/net/3c507.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 603 | drivers/net/3c507.c | dev->name, status); |
dev | 604 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 622 | drivers/net/3c507.c | el16_close(struct device *dev) |
dev | 624 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 625 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 627 | drivers/net/3c507.c | dev->tbusy = 1; |
dev | 628 | drivers/net/3c507.c | dev->start = 0; |
dev | 640 | drivers/net/3c507.c | irq2dev_map[dev->irq] = 0; |
dev | 650 | drivers/net/3c507.c | el16_get_stats(struct device *dev) |
dev | 652 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 661 | drivers/net/3c507.c | init_rx_bufs(struct device *dev) |
dev | 663 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 671 | drivers/net/3c507.c | write_ptr = (unsigned short *)(dev->mem_start + cur_rxbuf); |
dev | 699 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
dev | 706 | drivers/net/3c507.c | init_82586_mem(struct device *dev) |
dev | 708 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 709 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 710 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 718 | drivers/net/3c507.c | memcpy((void*)dev->mem_start+0xfff6, init_words, 10); |
dev | 720 | drivers/net/3c507.c | memcpy((void*)dev->mem_end-10, init_words, 10); |
dev | 723 | drivers/net/3c507.c | memcpy((char*)dev->mem_start, init_words + 5, sizeof(init_words) - 10); |
dev | 726 | drivers/net/3c507.c | memcpy((char*)dev->mem_start+SA_OFFSET, dev->dev_addr, |
dev | 727 | drivers/net/3c507.c | sizeof(dev->dev_addr)); |
dev | 733 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 747 | drivers/net/3c507.c | "cmd %04x.\n", dev->name, |
dev | 758 | drivers/net/3c507.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 764 | drivers/net/3c507.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 766 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 767 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 769 | drivers/net/3c507.c | ushort *write_ptr = (ushort *)(dev->mem_start + tx_block); |
dev | 792 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
dev | 802 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
dev | 806 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 810 | drivers/net/3c507.c | el16_rx(struct device *dev) |
dev | 812 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 813 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 820 | drivers/net/3c507.c | ushort *read_frame = (short *)(dev->mem_start + rx_head); |
dev | 824 | drivers/net/3c507.c | ushort *data_frame = (short *)(dev->mem_start + data_buffer_addr); |
dev | 830 | drivers/net/3c507.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 850 | drivers/net/3c507.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 857 | drivers/net/3c507.c | skb->dev = dev; |
dev | 866 | drivers/net/3c507.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 879 | drivers/net/3c507.c | *(short*)(dev->mem_start + rx_tail + 2) = 0x0000; |
dev | 85 | drivers/net/3c509.c | static int el3_open(struct device *dev); |
dev | 86 | drivers/net/3c509.c | static int el3_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 88 | drivers/net/3c509.c | static void update_stats(int addr, struct device *dev); |
dev | 89 | drivers/net/3c509.c | static struct enet_statistics *el3_get_stats(struct device *dev); |
dev | 90 | drivers/net/3c509.c | static int el3_rx(struct device *dev); |
dev | 91 | drivers/net/3c509.c | static int el3_close(struct device *dev); |
dev | 93 | drivers/net/3c509.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 98 | drivers/net/3c509.c | int el3_probe(struct device *dev) |
dev | 102 | drivers/net/3c509.c | short *phys_addr = (short *)dev->dev_addr; |
dev | 181 | drivers/net/3c509.c | if (dev->base_addr != 0 |
dev | 182 | drivers/net/3c509.c | && dev->base_addr != (unsigned short)ioaddr) { |
dev | 197 | drivers/net/3c509.c | dev->base_addr = ioaddr; |
dev | 198 | drivers/net/3c509.c | dev->irq = irq; |
dev | 199 | drivers/net/3c509.c | dev->if_port = if_port; |
dev | 200 | drivers/net/3c509.c | snarf_region(dev->base_addr, 16); |
dev | 205 | drivers/net/3c509.c | dev->name, dev->base_addr, current_tag, if_names[dev->if_port]); |
dev | 210 | drivers/net/3c509.c | printk(" %2.2x", dev->dev_addr[i]); |
dev | 211 | drivers/net/3c509.c | printk(", IRQ %d.\n", dev->irq); |
dev | 214 | drivers/net/3c509.c | dev->priv = kmalloc(sizeof(struct el3_private), GFP_KERNEL); |
dev | 215 | drivers/net/3c509.c | memset(dev->priv, 0, sizeof(struct el3_private)); |
dev | 221 | drivers/net/3c509.c | dev->open = &el3_open; |
dev | 222 | drivers/net/3c509.c | dev->hard_start_xmit = &el3_start_xmit; |
dev | 223 | drivers/net/3c509.c | dev->stop = &el3_close; |
dev | 224 | drivers/net/3c509.c | dev->get_stats = &el3_get_stats; |
dev | 226 | drivers/net/3c509.c | dev->set_multicast_list = &set_multicast_list; |
dev | 231 | drivers/net/3c509.c | dev->buffs[i] = NULL; |
dev | 233 | drivers/net/3c509.c | dev->hard_header = eth_header; |
dev | 234 | drivers/net/3c509.c | dev->add_arp = eth_add_arp; |
dev | 235 | drivers/net/3c509.c | dev->queue_xmit = dev_queue_xmit; |
dev | 236 | drivers/net/3c509.c | dev->rebuild_header = eth_rebuild_header; |
dev | 237 | drivers/net/3c509.c | dev->type_trans = eth_type_trans; |
dev | 239 | drivers/net/3c509.c | dev->type = ARPHRD_ETHER; |
dev | 240 | drivers/net/3c509.c | dev->hard_header_len = ETH_HLEN; |
dev | 241 | drivers/net/3c509.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 242 | drivers/net/3c509.c | dev->addr_len = ETH_ALEN; |
dev | 244 | drivers/net/3c509.c | dev->broadcast[i]=0xff; |
dev | 248 | drivers/net/3c509.c | dev->flags = IFF_BROADCAST; |
dev | 249 | drivers/net/3c509.c | dev->family = AF_INET; |
dev | 250 | drivers/net/3c509.c | dev->pa_addr = 0; |
dev | 251 | drivers/net/3c509.c | dev->pa_brdaddr = 0; |
dev | 252 | drivers/net/3c509.c | dev->pa_mask = 0; |
dev | 253 | drivers/net/3c509.c | dev->pa_alen = sizeof(unsigned long); |
dev | 297 | drivers/net/3c509.c | el3_open(struct device *dev) |
dev | 299 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 302 | drivers/net/3c509.c | if (request_irq(dev->irq, &el3_interrupt)) { |
dev | 308 | drivers/net/3c509.c | printk("%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, |
dev | 309 | drivers/net/3c509.c | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); |
dev | 314 | drivers/net/3c509.c | irq2dev_map[dev->irq] = dev; |
dev | 317 | drivers/net/3c509.c | outw((dev->irq << 12) | 0x0f00, ioaddr + 8); |
dev | 323 | drivers/net/3c509.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 325 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 328 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 342 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 343 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 344 | drivers/net/3c509.c | dev->start = 1; |
dev | 349 | drivers/net/3c509.c | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); |
dev | 355 | drivers/net/3c509.c | el3_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 357 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 358 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 361 | drivers/net/3c509.c | if (dev->tbusy) { |
dev | 362 | drivers/net/3c509.c | int tickssofar = jiffies - dev->trans_start; |
dev | 366 | drivers/net/3c509.c | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS)); |
dev | 367 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 371 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 375 | drivers/net/3c509.c | dev_tint(dev); |
dev | 380 | drivers/net/3c509.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 381 | drivers/net/3c509.c | skb->dev = dev; |
dev | 392 | drivers/net/3c509.c | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); |
dev | 400 | drivers/net/3c509.c | " Tx %2.2x Rx %4.4x.\n", dev->name, status, |
dev | 411 | drivers/net/3c509.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 412 | drivers/net/3c509.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 420 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 422 | drivers/net/3c509.c | dev->tbusy=0; |
dev | 453 | drivers/net/3c509.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 457 | drivers/net/3c509.c | if (dev == NULL) { |
dev | 462 | drivers/net/3c509.c | if (dev->interrupt) |
dev | 463 | drivers/net/3c509.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 464 | drivers/net/3c509.c | dev->interrupt = 1; |
dev | 466 | drivers/net/3c509.c | ioaddr = dev->base_addr; |
dev | 470 | drivers/net/3c509.c | printk("%s: interrupt, status %4.4x.\n", dev->name, status); |
dev | 475 | drivers/net/3c509.c | el3_rx(dev); |
dev | 482 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 486 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 490 | drivers/net/3c509.c | dev->name, status); |
dev | 498 | drivers/net/3c509.c | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, |
dev | 502 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 508 | drivers/net/3c509.c | el3_get_stats(struct device *dev) |
dev | 510 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 513 | drivers/net/3c509.c | update_stats(dev->base_addr, dev); |
dev | 523 | drivers/net/3c509.c | static void update_stats(int ioaddr, struct device *dev) |
dev | 525 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 552 | drivers/net/3c509.c | el3_rx(struct device *dev) |
dev | 554 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 555 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 588 | drivers/net/3c509.c | skb->dev = dev; |
dev | 601 | drivers/net/3c509.c | IN_SKBUFF,dev)== 0){ |
dev | 614 | drivers/net/3c509.c | printk("%s: receive buffers full.\n", dev->name); |
dev | 620 | drivers/net/3c509.c | dev->name, sksize); |
dev | 644 | drivers/net/3c509.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 646 | drivers/net/3c509.c | short ioaddr = dev->base_addr; |
dev | 657 | drivers/net/3c509.c | el3_close(struct device *dev) |
dev | 659 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 662 | drivers/net/3c509.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 664 | drivers/net/3c509.c | dev->tbusy = 1; |
dev | 665 | drivers/net/3c509.c | dev->start = 0; |
dev | 674 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 677 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 683 | drivers/net/3c509.c | free_irq(dev->irq); |
dev | 690 | drivers/net/3c509.c | irq2dev_map[dev->irq] = 0; |
dev | 692 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 84 | drivers/net/8390.c | int ei_open(struct device *dev); |
dev | 87 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev); |
dev | 88 | drivers/net/8390.c | static void ei_receive(struct device *dev); |
dev | 89 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev); |
dev | 92 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp); |
dev | 93 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 96 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 105 | drivers/net/8390.c | int ei_open(struct device *dev) |
dev | 107 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 110 | drivers/net/8390.c | printk("%s: Opening a non-existent physical device\n", dev->name); |
dev | 114 | drivers/net/8390.c | irq2dev_map[dev->irq] = dev; |
dev | 115 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 120 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 121 | drivers/net/8390.c | dev->interrupt = 0; |
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 | 135 | drivers/net/8390.c | if (dev->tbusy) { /* Do timeouts, just like the 8003 driver. */ |
dev | 137 | drivers/net/8390.c | int tickssofar = jiffies - dev->trans_start; |
dev | 143 | drivers/net/8390.c | dev->name, txsr, isr); |
dev | 147 | drivers/net/8390.c | printk("%s: Possible IRQ conflict on IRQ%d?", dev->name, dev->irq); |
dev | 149 | drivers/net/8390.c | printk("%s: Possible network cable problem?\n", dev->name); |
dev | 151 | drivers/net/8390.c | ei_reset_8390(dev); |
dev | 152 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 160 | drivers/net/8390.c | dev_tint(dev); |
dev | 164 | drivers/net/8390.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 165 | drivers/net/8390.c | skb->dev = dev; |
dev | 177 | drivers/net/8390.c | if (dev->interrupt || ei_local->irqlock) { |
dev | 182 | drivers/net/8390.c | dev->name, ei_local->irqlock ? " during interrupt" : ""); |
dev | 189 | drivers/net/8390.c | tmp_tbusy = set_bit(0, (void*)&dev->tbusy); |
dev | 200 | drivers/net/8390.c | dev->name, ei_local->tx2, ei_local->lasttx, |
dev | 207 | drivers/net/8390.c | dev->name, ei_local->tx1, ei_local->lasttx, |
dev | 214 | drivers/net/8390.c | dev->name); |
dev | 217 | drivers/net/8390.c | dev->tbusy = tmp_tbusy; |
dev | 222 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 223 | drivers/net/8390.c | ei_block_output(dev, length, (unsigned char *)(skb+1), output_page); |
dev | 225 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, output_page); |
dev | 236 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 237 | drivers/net/8390.c | ei_block_output(dev, length, (unsigned char *)(skb+1), |
dev | 239 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, ei_local->tx_start_page); |
dev | 250 | drivers/net/8390.c | dev->tbusy=tmp_tbusy; |
dev | 260 | drivers/net/8390.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 265 | drivers/net/8390.c | if (dev == NULL) { |
dev | 269 | drivers/net/8390.c | e8390_base = dev->base_addr; |
dev | 270 | drivers/net/8390.c | ei_local = (struct ei_device *) dev->priv; |
dev | 271 | drivers/net/8390.c | if (dev->interrupt || ei_local->irqlock) { |
dev | 277 | drivers/net/8390.c | dev->name, inb_p(e8390_base + EN0_ISR), |
dev | 282 | drivers/net/8390.c | dev->interrupt = 1; |
dev | 288 | drivers/net/8390.c | printk("%s: interrupt(isr=%#2.2x).\n", dev->name, |
dev | 299 | drivers/net/8390.c | ei_rx_overrun(dev); |
dev | 302 | drivers/net/8390.c | ei_receive(dev); |
dev | 306 | drivers/net/8390.c | ei_tx_intr(dev); |
dev | 308 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
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 | 350 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6); |
dev | 351 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 362 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 364 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page); |
dev | 365 | 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 | 402 | drivers/net/8390.c | static void ei_receive(struct device *dev) |
dev | 404 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 405 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 427 | drivers/net/8390.c | dev->name, this_frame, ei_local->current_page); |
dev | 433 | drivers/net/8390.c | ei_block_input(dev, sizeof(rx_frame), (char *)&rx_frame, |
dev | 454 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, rx_frame.count, |
dev | 461 | drivers/net/8390.c | dev->name, ei_local->current_page, next_frame, |
dev | 469 | drivers/net/8390.c | dev->name, ei_local->stat.rx_packets); |
dev | 471 | drivers/net/8390.c | ei_reset_8390(dev); |
dev | 472 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 481 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, rx_frame.count); |
dev | 490 | drivers/net/8390.c | dev->name, sksize); |
dev | 497 | drivers/net/8390.c | skb->dev = dev; |
dev | 500 | drivers/net/8390.c | ei_block_input(dev, pkt_len, (char *)(skb+1), |
dev | 506 | drivers/net/8390.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev)) { |
dev | 518 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, rx_frame.count); |
dev | 526 | drivers/net/8390.c | printk("%s: next frame inconsistency, %#2x..", dev->name, next_frame); |
dev | 544 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev) |
dev | 546 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 548 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 554 | drivers/net/8390.c | printk("%s: Receiver overrun.\n", dev->name); |
dev | 566 | drivers/net/8390.c | dev->name); |
dev | 567 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 572 | drivers/net/8390.c | ei_receive(dev); |
dev | 580 | drivers/net/8390.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 582 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 583 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 600 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 602 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 616 | drivers/net/8390.c | int ethdev_init(struct device *dev) |
dev | 623 | drivers/net/8390.c | if (dev->priv == NULL) { |
dev | 626 | drivers/net/8390.c | dev->priv = kmalloc(sizeof(struct ei_device), GFP_KERNEL); |
dev | 627 | drivers/net/8390.c | memset(dev->priv, 0, sizeof(struct ei_device)); |
dev | 628 | drivers/net/8390.c | ei_local = (struct ei_device *)dev->priv; |
dev | 635 | drivers/net/8390.c | if (dev->open == NULL) |
dev | 636 | drivers/net/8390.c | dev->open = &ei_open; |
dev | 638 | drivers/net/8390.c | dev->hard_start_xmit = &ei_start_xmit; |
dev | 639 | drivers/net/8390.c | dev->get_stats = get_stats; |
dev | 641 | drivers/net/8390.c | dev->set_multicast_list = &set_multicast_list; |
dev | 645 | drivers/net/8390.c | dev->buffs[i] = NULL; |
dev | 647 | drivers/net/8390.c | dev->hard_header = eth_header; |
dev | 648 | drivers/net/8390.c | dev->add_arp = eth_add_arp; |
dev | 649 | drivers/net/8390.c | dev->queue_xmit = dev_queue_xmit; |
dev | 650 | drivers/net/8390.c | dev->rebuild_header = eth_rebuild_header; |
dev | 651 | drivers/net/8390.c | dev->type_trans = eth_type_trans; |
dev | 653 | drivers/net/8390.c | dev->type = ARPHRD_ETHER; |
dev | 654 | drivers/net/8390.c | dev->hard_header_len = ETH_HLEN; |
dev | 655 | drivers/net/8390.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 656 | drivers/net/8390.c | dev->addr_len = ETH_ALEN; |
dev | 658 | drivers/net/8390.c | dev->broadcast[i]=0xff; |
dev | 662 | drivers/net/8390.c | dev->flags = IFF_BROADCAST; |
dev | 663 | drivers/net/8390.c | dev->family = AF_INET; |
dev | 664 | drivers/net/8390.c | dev->pa_addr = 0; |
dev | 665 | drivers/net/8390.c | dev->pa_brdaddr = 0; |
dev | 666 | drivers/net/8390.c | dev->pa_mask = 0; |
dev | 667 | drivers/net/8390.c | dev->pa_alen = sizeof(unsigned long); |
dev | 675 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp) |
dev | 677 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 678 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 707 | drivers/net/8390.c | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS + i); |
dev | 729 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 732 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 739 | 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 | 64 | drivers/net/8390.h | #define ei_status (*(struct ei_device *)(dev->priv)) |
dev | 40 | drivers/net/Space.c | extern int ultra_probe(struct device *dev); |
dev | 41 | drivers/net/Space.c | extern int wd_probe(struct device *dev); |
dev | 42 | drivers/net/Space.c | extern int el2_probe(struct device *dev); |
dev | 43 | drivers/net/Space.c | extern int ne_probe(struct device *dev); |
dev | 44 | drivers/net/Space.c | extern int hp_probe(struct device *dev); |
dev | 62 | drivers/net/Space.c | ethif_probe(struct device *dev) |
dev | 64 | drivers/net/Space.c | short base_addr = dev->base_addr; |
dev | 71 | drivers/net/Space.c | && ultra_probe(dev) |
dev | 74 | drivers/net/Space.c | && wd_probe(dev) |
dev | 77 | drivers/net/Space.c | && el2_probe(dev) |
dev | 80 | drivers/net/Space.c | && ne_probe(dev) |
dev | 83 | drivers/net/Space.c | && hp_probe(dev) |
dev | 86 | drivers/net/Space.c | && at1500_probe(dev) |
dev | 89 | drivers/net/Space.c | && at1700_probe(dev) |
dev | 92 | drivers/net/Space.c | && el3_probe(dev) |
dev | 95 | drivers/net/Space.c | && znet_probe(dev) |
dev | 98 | drivers/net/Space.c | && express_probe(dev) |
dev | 101 | drivers/net/Space.c | && depca_probe(dev) |
dev | 104 | drivers/net/Space.c | && el1_probe(dev) |
dev | 107 | drivers/net/Space.c | && el16_probe(dev) |
dev | 110 | drivers/net/Space.c | && elplus_probe(dev) |
dev | 113 | drivers/net/Space.c | && ac3200_probe(dev) |
dev | 116 | drivers/net/Space.c | && e2100_probe(dev) |
dev | 249 | drivers/net/Space.c | extern int loopback_init(struct device *dev); |
dev | 112 | drivers/net/at1700.c | extern int at1700_probe(struct device *dev); |
dev | 114 | drivers/net/at1700.c | static int at1700_probe1(struct device *dev, short ioaddr); |
dev | 116 | drivers/net/at1700.c | static int net_open(struct device *dev); |
dev | 117 | drivers/net/at1700.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 119 | drivers/net/at1700.c | static void net_rx(struct device *dev); |
dev | 120 | drivers/net/at1700.c | static int net_close(struct device *dev); |
dev | 121 | drivers/net/at1700.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 123 | drivers/net/at1700.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 134 | drivers/net/at1700.c | at1700_probe(struct device *dev) |
dev | 137 | drivers/net/at1700.c | short *port, base_addr = dev->base_addr; |
dev | 140 | drivers/net/at1700.c | return at1700_probe1(dev, base_addr); |
dev | 152 | drivers/net/at1700.c | if (at1700_probe1(dev, ioaddr) == 0) |
dev | 159 | drivers/net/at1700.c | int at1700_probe1(struct device *dev, short ioaddr) |
dev | 164 | drivers/net/at1700.c | unsigned short *station_address = (unsigned short *)dev->dev_addr; |
dev | 192 | drivers/net/at1700.c | printk("%s: AT1700 found at %#3x, IRQ %d, address ", dev->name, |
dev | 195 | drivers/net/at1700.c | dev->base_addr = ioaddr; |
dev | 196 | drivers/net/at1700.c | dev->irq = irq; |
dev | 197 | drivers/net/at1700.c | irq2dev_map[irq] = dev; |
dev | 215 | drivers/net/at1700.c | dev->if_port = setup_value >> 8; |
dev | 216 | drivers/net/at1700.c | printk(" %s interface (%04x).\n", porttype[(dev->if_port>>3) & 3], |
dev | 223 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 236 | drivers/net/at1700.c | outb(dev->if_port, MODE13); |
dev | 245 | drivers/net/at1700.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 246 | drivers/net/at1700.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 248 | drivers/net/at1700.c | dev->open = net_open; |
dev | 249 | drivers/net/at1700.c | dev->stop = net_close; |
dev | 250 | drivers/net/at1700.c | dev->hard_start_xmit = net_send_packet; |
dev | 251 | drivers/net/at1700.c | dev->get_stats = net_get_stats; |
dev | 253 | drivers/net/at1700.c | dev->set_multicast_list = &set_multicast_list; |
dev | 259 | drivers/net/at1700.c | dev->buffs[i] = NULL; |
dev | 261 | drivers/net/at1700.c | dev->hard_header = eth_header; |
dev | 262 | drivers/net/at1700.c | dev->add_arp = eth_add_arp; |
dev | 263 | drivers/net/at1700.c | dev->queue_xmit = dev_queue_xmit; |
dev | 264 | drivers/net/at1700.c | dev->rebuild_header = eth_rebuild_header; |
dev | 265 | drivers/net/at1700.c | dev->type_trans = eth_type_trans; |
dev | 267 | drivers/net/at1700.c | dev->type = ARPHRD_ETHER; |
dev | 268 | drivers/net/at1700.c | dev->hard_header_len = ETH_HLEN; |
dev | 269 | drivers/net/at1700.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 270 | drivers/net/at1700.c | dev->addr_len = ETH_ALEN; |
dev | 272 | drivers/net/at1700.c | dev->broadcast[i]=0xff; |
dev | 276 | drivers/net/at1700.c | dev->flags = IFF_BROADCAST; |
dev | 277 | drivers/net/at1700.c | dev->family = AF_INET; |
dev | 278 | drivers/net/at1700.c | dev->pa_addr = 0; |
dev | 279 | drivers/net/at1700.c | dev->pa_brdaddr = 0; |
dev | 280 | drivers/net/at1700.c | dev->pa_mask = 0; |
dev | 281 | drivers/net/at1700.c | dev->pa_alen = sizeof(unsigned long); |
dev | 327 | drivers/net/at1700.c | static int net_open(struct device *dev) |
dev | 329 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 330 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 338 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 360 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 361 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 362 | drivers/net/at1700.c | dev->start = 1; |
dev | 368 | drivers/net/at1700.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 370 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 371 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 373 | drivers/net/at1700.c | if (dev->tbusy) { |
dev | 376 | drivers/net/at1700.c | int tickssofar = jiffies - dev->trans_start; |
dev | 379 | drivers/net/at1700.c | printk("%s: transmit timed out with status %04x, %s?\n", dev->name, |
dev | 383 | drivers/net/at1700.c | dev->name, inw(ioaddr + 0), inw(ioaddr + 2), inw(ioaddr + 4), |
dev | 392 | drivers/net/at1700.c | dev->tbusy=0; |
dev | 393 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 400 | drivers/net/at1700.c | dev_tint(dev); |
dev | 406 | drivers/net/at1700.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 407 | drivers/net/at1700.c | skb->dev = dev; |
dev | 415 | drivers/net/at1700.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 416 | drivers/net/at1700.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 422 | drivers/net/at1700.c | printk("%s: Transmitting a packet of length %d.\n", dev->name, |
dev | 439 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 442 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 459 | drivers/net/at1700.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 463 | drivers/net/at1700.c | if (dev == NULL) { |
dev | 467 | drivers/net/at1700.c | dev->interrupt = 1; |
dev | 469 | drivers/net/at1700.c | ioaddr = dev->base_addr; |
dev | 470 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
dev | 475 | drivers/net/at1700.c | printk("%s: Interrupt with status %04x.\n", dev->name, status); |
dev | 478 | drivers/net/at1700.c | net_rx(dev); |
dev | 487 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 488 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 494 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 504 | drivers/net/at1700.c | net_rx(struct device *dev) |
dev | 506 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 507 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 515 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), status); |
dev | 537 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 545 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 553 | drivers/net/at1700.c | skb->dev = dev; |
dev | 560 | drivers/net/at1700.c | printk("%s: Rxed packet of length %d: ", dev->name, pkt_len); |
dev | 570 | drivers/net/at1700.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 595 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), i); |
dev | 601 | drivers/net/at1700.c | static int net_close(struct device *dev) |
dev | 603 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 604 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 608 | drivers/net/at1700.c | dev->tbusy = 1; |
dev | 609 | drivers/net/at1700.c | dev->start = 0; |
dev | 625 | drivers/net/at1700.c | net_get_stats(struct device *dev) |
dev | 627 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 644 | drivers/net/at1700.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 646 | drivers/net/at1700.c | short ioaddr = dev->base_addr; |
dev | 219 | drivers/net/d_link.c | static int d_link_read_status(struct device *dev); |
dev | 220 | drivers/net/d_link.c | static unsigned char d_link_read_byte(unsigned char type, struct device *dev); |
dev | 223 | drivers/net/d_link.c | static int d_link_open(struct device *dev); |
dev | 224 | drivers/net/d_link.c | static int d_link_close(struct device *dev); |
dev | 225 | drivers/net/d_link.c | static struct netstats *get_stats(struct device *dev); |
dev | 226 | drivers/net/d_link.c | static int d_link_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 230 | drivers/net/d_link.c | static int d_link_tx_intr(struct device *dev, int irq_status); |
dev | 231 | drivers/net/d_link.c | static void d_link_rx_intr(struct device *dev); |
dev | 234 | drivers/net/d_link.c | static void trigger_interrupt(struct device *dev); |
dev | 235 | drivers/net/d_link.c | int d_link_init(struct device *dev); |
dev | 236 | drivers/net/d_link.c | static void adapter_init(struct device *dev); |
dev | 286 | drivers/net/d_link.c | d_link_read_status(struct device *dev) |
dev | 298 | drivers/net/d_link.c | d_link_read_byte(unsigned char type, struct device *dev) { /* dev used by macros */ |
dev | 316 | drivers/net/d_link.c | d_link_open(struct device *dev) |
dev | 321 | drivers/net/d_link.c | printk ("%s: unable to get IRQ %d\n", dev->name, D_LINK_IRQ); |
dev | 324 | drivers/net/d_link.c | irq2dev_map[D_LINK_IRQ] = dev; |
dev | 326 | drivers/net/d_link.c | adapter_init(dev); |
dev | 346 | drivers/net/d_link.c | d_link_close(struct device *dev) |
dev | 357 | drivers/net/d_link.c | dev->start = 0; |
dev | 364 | drivers/net/d_link.c | get_stats(struct device *dev) |
dev | 366 | drivers/net/d_link.c | return (struct netstats *)(dev->priv); |
dev | 370 | drivers/net/d_link.c | trigger_interrupt(struct device *dev) |
dev | 384 | drivers/net/d_link.c | d_link_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 398 | drivers/net/d_link.c | dev_tint(dev); |
dev | 404 | drivers/net/d_link.c | if(dev->rebuild_header(skb + 1, dev)) { |
dev | 405 | drivers/net/d_link.c | skb->dev = dev; |
dev | 412 | drivers/net/d_link.c | tickssofar = jiffies - dev->trans_start; |
dev | 419 | drivers/net/d_link.c | dev->name, |
dev | 424 | drivers/net/d_link.c | adapter_init(dev); |
dev | 444 | drivers/net/d_link.c | dev->trans_start = jiffies; |
dev | 445 | drivers/net/d_link.c | dev->tbusy = 0; /* allow more packets into adapter */ |
dev | 451 | drivers/net/d_link.c | dev->tbusy = !free_tx_pages; |
dev | 471 | drivers/net/d_link.c | struct device *dev = irq2dev_map[irq]; |
dev | 477 | drivers/net/d_link.c | if ((dev == NULL) || (dev->start == 0) || (D_LINK_IRQ != irq)) { |
dev | 478 | drivers/net/d_link.c | printk("%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); |
dev | 482 | drivers/net/d_link.c | dev->interrupt = 1; |
dev | 484 | drivers/net/d_link.c | irq_status = d_link_read_status(dev); |
dev | 490 | drivers/net/d_link.c | d_link_rx_intr(dev); |
dev | 496 | drivers/net/d_link.c | retrig = d_link_tx_intr(dev, irq_status); |
dev | 500 | drivers/net/d_link.c | irq_status = d_link_read_status(dev); |
dev | 509 | drivers/net/d_link.c | dev->interrupt = 0; |
dev | 513 | drivers/net/d_link.c | trigger_interrupt(dev); |
dev | 520 | drivers/net/d_link.c | d_link_tx_intr(struct device *dev, int irq_status) |
dev | 536 | drivers/net/d_link.c | ((struct netstats *)(dev->priv))->tx_packets++; |
dev | 537 | drivers/net/d_link.c | dev->tbusy = 0; |
dev | 542 | drivers/net/d_link.c | dev->trans_start = jiffies; |
dev | 556 | drivers/net/d_link.c | d_link_rx_intr(struct device *dev) |
dev | 567 | drivers/net/d_link.c | size = d_link_read_byte(RX_LEN, dev); /* low byte */ |
dev | 568 | drivers/net/d_link.c | size += (d_link_read_byte(RX_LEN, dev) << 8); /* high byte */ |
dev | 578 | drivers/net/d_link.c | printk("%s: Bogus packet size %d.\n", dev->name, size); |
dev | 585 | drivers/net/d_link.c | dev->name, sksize); |
dev | 599 | drivers/net/d_link.c | *buffer = d_link_read_byte(READ_DATA, dev); |
dev | 601 | drivers/net/d_link.c | ((struct netstats *)(dev->priv))->rx_packets++; /* count all receives */ |
dev | 603 | drivers/net/d_link.c | if (dev_rint((unsigned char *)skb, size, IN_SKBUFF, dev)) |
dev | 604 | drivers/net/d_link.c | printk("%s: receive buffers full.\n", dev->name); |
dev | 613 | drivers/net/d_link.c | d_link_init(struct device *dev) |
dev | 617 | drivers/net/d_link.c | printk("%s: D-Link DE-600 pocket adapter", dev->name); |
dev | 625 | drivers/net/d_link.c | (void)d_link_read_status(dev); |
dev | 628 | drivers/net/d_link.c | if (d_link_read_status(dev) & 0xf0) { |
dev | 641 | drivers/net/d_link.c | dev->dev_addr[i] = d_link_read_byte(READ_DATA, dev); |
dev | 642 | drivers/net/d_link.c | dev->broadcast[i] = 0xff; |
dev | 646 | drivers/net/d_link.c | if ((dev->dev_addr[1] == 0xde) && (dev->dev_addr[2] == 0x15)) { |
dev | 648 | drivers/net/d_link.c | dev->dev_addr[0] = 0x00; |
dev | 649 | drivers/net/d_link.c | dev->dev_addr[1] = 0x80; |
dev | 650 | drivers/net/d_link.c | dev->dev_addr[2] = 0xc8; |
dev | 651 | drivers/net/d_link.c | dev->dev_addr[3] &= 0x0f; |
dev | 652 | drivers/net/d_link.c | dev->dev_addr[3] |= 0x70; |
dev | 658 | drivers/net/d_link.c | printk(", Ethernet Address: %2.2X", dev->dev_addr[0]); |
dev | 660 | drivers/net/d_link.c | printk(":%2.2X",dev->dev_addr[i]); |
dev | 664 | drivers/net/d_link.c | dev->priv = kmalloc(sizeof(struct netstats), GFP_KERNEL); |
dev | 665 | drivers/net/d_link.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 668 | drivers/net/d_link.c | dev->buffs[i] = NULL; |
dev | 670 | drivers/net/d_link.c | dev->get_stats = get_stats; |
dev | 671 | drivers/net/d_link.c | dev->hard_header = eth_header; |
dev | 672 | drivers/net/d_link.c | dev->add_arp = eth_add_arp; |
dev | 673 | drivers/net/d_link.c | dev->queue_xmit = dev_queue_xmit; |
dev | 674 | drivers/net/d_link.c | dev->rebuild_header = eth_rebuild_header; |
dev | 675 | drivers/net/d_link.c | dev->type_trans = eth_type_trans; |
dev | 677 | drivers/net/d_link.c | dev->open = d_link_open; |
dev | 678 | drivers/net/d_link.c | dev->stop = d_link_close; |
dev | 679 | drivers/net/d_link.c | dev->hard_start_xmit = &d_link_start_xmit; |
dev | 682 | drivers/net/d_link.c | dev->type = ARPHRD_ETHER; |
dev | 683 | drivers/net/d_link.c | dev->hard_header_len = ETH_HLEN; |
dev | 684 | drivers/net/d_link.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 685 | drivers/net/d_link.c | dev->addr_len = ETH_ALEN; |
dev | 688 | drivers/net/d_link.c | dev->flags = IFF_BROADCAST; |
dev | 689 | drivers/net/d_link.c | dev->family = AF_INET; |
dev | 690 | drivers/net/d_link.c | dev->pa_addr = 0; |
dev | 691 | drivers/net/d_link.c | dev->pa_brdaddr = 0; |
dev | 692 | drivers/net/d_link.c | dev->pa_mask = 0; |
dev | 693 | drivers/net/d_link.c | dev->pa_alen = sizeof(unsigned long); |
dev | 700 | drivers/net/d_link.c | adapter_init(struct device *dev) |
dev | 705 | drivers/net/d_link.c | dev->tbusy = 0; /* Transmit busy... */ |
dev | 706 | drivers/net/d_link.c | dev->interrupt = 0; |
dev | 707 | drivers/net/d_link.c | dev->start = 1; |
dev | 721 | drivers/net/d_link.c | d_link_put_byte(dev->dev_addr[i]); |
dev | 286 | drivers/net/eexpress.c | extern int express_probe(struct device *dev); /* Called from Space.c */ |
dev | 288 | drivers/net/eexpress.c | static int eexp_probe1(struct device *dev, short ioaddr); |
dev | 289 | drivers/net/eexpress.c | static int eexp_open(struct device *dev); |
dev | 290 | drivers/net/eexpress.c | static int eexp_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 292 | drivers/net/eexpress.c | static void eexp_rx(struct device *dev); |
dev | 293 | drivers/net/eexpress.c | static int eexp_close(struct device *dev); |
dev | 294 | drivers/net/eexpress.c | static struct enet_statistics *eexp_get_stats(struct device *dev); |
dev | 296 | 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 | 337 | drivers/net/eexpress.c | && eexp_probe1(dev, *port) == 0) |
dev | 344 | drivers/net/eexpress.c | int eexp_probe1(struct device *dev, short ioaddr) |
dev | 349 | drivers/net/eexpress.c | printk("%s: EtherExpress at %#x,", dev->name, ioaddr); |
dev | 366 | drivers/net/eexpress.c | dev->base_addr = ioaddr; |
dev | 369 | drivers/net/eexpress.c | dev->dev_addr[i] = ((unsigned char*)station_addr)[5-i]; |
dev | 370 | drivers/net/eexpress.c | printk(" %02x", dev->dev_addr[i]); |
dev | 381 | drivers/net/eexpress.c | dev->irq = irqmap[setupval >> 13]; |
dev | 382 | drivers/net/eexpress.c | dev->if_port = (setupval & 0x1000) == 0 ? AUI : |
dev | 384 | drivers/net/eexpress.c | printk(", IRQ %d, Interface %s.\n", dev->irq, ifmap[dev->if_port]); |
dev | 393 | drivers/net/eexpress.c | if ((dev->mem_start & 0xf) > 0) |
dev | 394 | drivers/net/eexpress.c | net_debug = dev->mem_start & 7; |
dev | 400 | drivers/net/eexpress.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 401 | drivers/net/eexpress.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 403 | drivers/net/eexpress.c | dev->open = eexp_open; |
dev | 404 | drivers/net/eexpress.c | dev->stop = eexp_close; |
dev | 405 | drivers/net/eexpress.c | dev->hard_start_xmit = eexp_send_packet; |
dev | 406 | drivers/net/eexpress.c | dev->get_stats = eexp_get_stats; |
dev | 408 | drivers/net/eexpress.c | dev->set_multicast_list = &set_multicast_list; |
dev | 414 | drivers/net/eexpress.c | dev->buffs[i] = NULL; |
dev | 416 | drivers/net/eexpress.c | dev->hard_header = eth_header; |
dev | 417 | drivers/net/eexpress.c | dev->add_arp = eth_add_arp; |
dev | 418 | drivers/net/eexpress.c | dev->queue_xmit = dev_queue_xmit; |
dev | 419 | drivers/net/eexpress.c | dev->rebuild_header = eth_rebuild_header; |
dev | 420 | drivers/net/eexpress.c | dev->type_trans = eth_type_trans; |
dev | 422 | drivers/net/eexpress.c | dev->type = ARPHRD_ETHER; |
dev | 423 | drivers/net/eexpress.c | dev->hard_header_len = ETH_HLEN; |
dev | 424 | drivers/net/eexpress.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 425 | drivers/net/eexpress.c | dev->addr_len = ETH_ALEN; |
dev | 427 | drivers/net/eexpress.c | dev->broadcast[i]=0xff; |
dev | 431 | drivers/net/eexpress.c | dev->flags = IFF_BROADCAST; |
dev | 432 | drivers/net/eexpress.c | dev->family = AF_INET; |
dev | 433 | drivers/net/eexpress.c | dev->pa_addr = 0; |
dev | 434 | drivers/net/eexpress.c | dev->pa_brdaddr = 0; |
dev | 435 | drivers/net/eexpress.c | dev->pa_mask = 0; |
dev | 436 | drivers/net/eexpress.c | dev->pa_alen = sizeof(unsigned long); |
dev | 446 | drivers/net/eexpress.c | eexp_open(struct device *dev) |
dev | 448 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 450 | drivers/net/eexpress.c | if (dev->irq == 0 || irqrmap[dev->irq] == 0) |
dev | 453 | drivers/net/eexpress.c | if (irq2dev_map[dev->irq] != 0 |
dev | 455 | drivers/net/eexpress.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 456 | drivers/net/eexpress.c | || request_irq(dev->irq, &eexp_interrupt)) { |
dev | 461 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 464 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 466 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 467 | drivers/net/eexpress.c | dev->interrupt = 0; |
dev | 468 | drivers/net/eexpress.c | dev->start = 1; |
dev | 473 | drivers/net/eexpress.c | eexp_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 475 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 476 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 478 | drivers/net/eexpress.c | if (dev->tbusy) { |
dev | 481 | drivers/net/eexpress.c | int tickssofar = jiffies - dev->trans_start; |
dev | 485 | drivers/net/eexpress.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 493 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 501 | drivers/net/eexpress.c | dev->tbusy=0; |
dev | 502 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 509 | drivers/net/eexpress.c | dev_tint(dev); |
dev | 515 | drivers/net/eexpress.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 516 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 523 | drivers/net/eexpress.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 524 | drivers/net/eexpress.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 530 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 531 | drivers/net/eexpress.c | hardware_send_packet(dev, buf, length); |
dev | 532 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 534 | drivers/net/eexpress.c | outb(0x08 | irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 552 | drivers/net/eexpress.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 557 | drivers/net/eexpress.c | if (dev == NULL) { |
dev | 561 | drivers/net/eexpress.c | dev->interrupt = 1; |
dev | 563 | drivers/net/eexpress.c | ioaddr = dev->base_addr; |
dev | 564 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
dev | 569 | drivers/net/eexpress.c | printk("%s: EExp interrupt, status %4.4x.\n", dev->name, status); |
dev | 573 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 587 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 608 | drivers/net/eexpress.c | eexp_rx(dev); |
dev | 614 | drivers/net/eexpress.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 617 | drivers/net/eexpress.c | dev->name, status); |
dev | 624 | drivers/net/eexpress.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 630 | drivers/net/eexpress.c | dev->name, status); |
dev | 631 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 641 | drivers/net/eexpress.c | printk("%s: EExp exiting interrupt, status %4.4x.\n", dev->name, |
dev | 645 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 650 | drivers/net/eexpress.c | eexp_close(struct device *dev) |
dev | 652 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 654 | drivers/net/eexpress.c | dev->tbusy = 1; |
dev | 655 | drivers/net/eexpress.c | dev->start = 0; |
dev | 664 | drivers/net/eexpress.c | free_irq(dev->irq); |
dev | 666 | drivers/net/eexpress.c | irq2dev_map[dev->irq] = 0; |
dev | 676 | drivers/net/eexpress.c | eexp_get_stats(struct device *dev) |
dev | 678 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 693 | drivers/net/eexpress.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 695 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 759 | drivers/net/eexpress.c | init_82586_mem(struct device *dev) |
dev | 761 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 762 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 777 | drivers/net/eexpress.c | port_write(ioaddr, dev->dev_addr, 3); |
dev | 787 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 801 | drivers/net/eexpress.c | dev->name, inw(ioaddr + SCB_STATUS), inw(ioaddr + SCB_CMD)); |
dev | 811 | drivers/net/eexpress.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 818 | drivers/net/eexpress.c | init_rx_bufs(struct device *dev) |
dev | 820 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 821 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 859 | drivers/net/eexpress.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 861 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 862 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 899 | drivers/net/eexpress.c | "reap %4x status %4.4x.\n", dev->name, ioaddr, length, |
dev | 904 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 908 | drivers/net/eexpress.c | eexp_rx(struct device *dev) |
dev | 910 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 911 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 933 | drivers/net/eexpress.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 953 | drivers/net/eexpress.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 960 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 970 | drivers/net/eexpress.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 986 | drivers/net/eexpress.c | printk("%s: Rx next frame at %#x is %#x instead of %#x.\n", dev->name, |
dev | 1000 | drivers/net/eexpress.c | dev->name, rx_tail, (outw(rx_tail+4, ioaddr + READ_PTR),inw(ioaddr)), |
dev | 44 | drivers/net/hp.c | int hp_probe(struct device *dev); |
dev | 45 | drivers/net/hp.c | int hpprobe1(int ioaddr, struct device *dev); |
dev | 47 | drivers/net/hp.c | static void hp_reset_8390(struct device *dev); |
dev | 48 | drivers/net/hp.c | static int hp_block_input(struct device *dev, int count, |
dev | 50 | drivers/net/hp.c | static void hp_block_output(struct device *dev, int count, |
dev | 52 | drivers/net/hp.c | static void hp_init_card(struct device *dev); |
dev | 63 | drivers/net/hp.c | int hp_probe(struct device *dev) |
dev | 66 | drivers/net/hp.c | short ioaddr = dev->base_addr; |
dev | 69 | drivers/net/hp.c | return ! hpprobe1(ioaddr, dev); |
dev | 78 | drivers/net/hp.c | if (inb_p(*port) != 0xff && hpprobe1(*port, dev)) { |
dev | 82 | drivers/net/hp.c | dev->base_addr = ioaddr; |
dev | 86 | drivers/net/hp.c | int hpprobe1(int ioaddr, struct device *dev) |
dev | 89 | drivers/net/hp.c | unsigned char *station_addr = dev->dev_addr; |
dev | 99 | drivers/net/hp.c | ethdev_init(dev); |
dev | 114 | drivers/net/hp.c | printk("%s: %s at %#3x,", dev->name, ei_status.name, ioaddr); |
dev | 121 | drivers/net/hp.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 124 | drivers/net/hp.c | if (dev->irq < 2) { |
dev | 129 | drivers/net/hp.c | if (request_irq (dev->irq = *irqp, NULL) != -EBUSY) { |
dev | 132 | drivers/net/hp.c | outb_p(irqmap[dev->irq] | HP_RUN, ioaddr + HP_CONFIGURE); |
dev | 134 | drivers/net/hp.c | if (dev->irq == autoirq_report(0) /* It's a good IRQ line! */ |
dev | 135 | drivers/net/hp.c | && request_irq (dev->irq, &ei_interrupt) == 0) { |
dev | 136 | drivers/net/hp.c | printk(" selecting IRQ %d.\n", dev->irq); |
dev | 146 | drivers/net/hp.c | if (dev->irq == 2) |
dev | 147 | drivers/net/hp.c | dev->irq = 9; |
dev | 148 | drivers/net/hp.c | if (irqaction(dev->irq, &ei_sigaction)) { |
dev | 149 | drivers/net/hp.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 164 | drivers/net/hp.c | hp_init_card(dev); |
dev | 165 | drivers/net/hp.c | return dev->base_addr; |
dev | 169 | drivers/net/hp.c | hp_reset_8390(struct device *dev) |
dev | 171 | drivers/net/hp.c | int hp_base = dev->base_addr - NIC_OFFSET; |
dev | 194 | drivers/net/hp.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 206 | drivers/net/hp.c | hp_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 208 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 234 | drivers/net/hp.c | dev->name, ring_offset + xfer_count, addr); |
dev | 241 | drivers/net/hp.c | hp_block_output(struct device *dev, int count, |
dev | 244 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 291 | drivers/net/hp.c | dev->name, (start_page << 8) + count, addr); |
dev | 299 | drivers/net/hp.c | hp_init_card(struct device *dev) |
dev | 301 | drivers/net/hp.c | int irq = dev->irq; |
dev | 302 | drivers/net/hp.c | NS8390_init(dev, 0); |
dev | 304 | drivers/net/hp.c | dev->base_addr - NIC_OFFSET + HP_CONFIGURE); |
dev | 48 | drivers/net/lance.c | struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 210 | drivers/net/lance.c | static int lance_open(struct device *dev); |
dev | 211 | drivers/net/lance.c | static void lance_init_ring(struct device *dev); |
dev | 212 | drivers/net/lance.c | static int lance_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 213 | drivers/net/lance.c | static int lance_rx(struct device *dev); |
dev | 215 | drivers/net/lance.c | static int lance_close(struct device *dev); |
dev | 216 | drivers/net/lance.c | static struct enet_statistics *lance_get_stats(struct device *dev); |
dev | 218 | drivers/net/lance.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 243 | drivers/net/lance.c | struct device *dev; |
dev | 263 | drivers/net/lance.c | dev = init_etherdev(0, sizeof(struct lance_private) |
dev | 267 | drivers/net/lance.c | printk("%s: LANCE at %#3x,", dev->name, ioaddr); |
dev | 272 | drivers/net/lance.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 274 | drivers/net/lance.c | dev->base_addr = ioaddr; |
dev | 278 | drivers/net/lance.c | dev->priv = (void *)(((int)dev->priv + 7) & ~7); |
dev | 279 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 280 | drivers/net/lance.c | lp->rx_buffs = (long)dev->priv + sizeof(struct lance_private); |
dev | 302 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 318 | drivers/net/lance.c | dev->dma = dma_tbl[(reset_val >> 2) & 3]; |
dev | 319 | drivers/net/lance.c | dev->irq = irq_tbl[(reset_val >> 4) & 7]; |
dev | 320 | drivers/net/lance.c | printk(" HP J2405A IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 323 | drivers/net/lance.c | if (dev->mem_start & 0x07) |
dev | 324 | drivers/net/lance.c | dev->dma = dev->mem_start & 0x07; |
dev | 325 | drivers/net/lance.c | else if (dev->dma == 0) |
dev | 326 | drivers/net/lance.c | dev->dma = LANCE_DMA; |
dev | 330 | drivers/net/lance.c | if (dev->irq < 2) { |
dev | 337 | drivers/net/lance.c | dev->irq = autoirq_report(1); |
dev | 338 | drivers/net/lance.c | if (dev->irq) |
dev | 339 | drivers/net/lance.c | printk(", probed IRQ %d, fixed at DMA %d.\n", dev->irq, dev->dma); |
dev | 345 | drivers/net/lance.c | printk(" assigned IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 359 | drivers/net/lance.c | dev->open = &lance_open; |
dev | 360 | drivers/net/lance.c | dev->hard_start_xmit = &lance_start_xmit; |
dev | 361 | drivers/net/lance.c | dev->stop = &lance_close; |
dev | 362 | drivers/net/lance.c | dev->get_stats = &lance_get_stats; |
dev | 364 | drivers/net/lance.c | dev->set_multicast_list = &set_multicast_list; |
dev | 372 | drivers/net/lance.c | lance_open(struct device *dev) |
dev | 374 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 375 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 378 | drivers/net/lance.c | if (request_irq(dev->irq, &lance_interrupt)) { |
dev | 382 | drivers/net/lance.c | if (request_dma(dev->dma)) { |
dev | 383 | drivers/net/lance.c | free_irq(dev->irq); |
dev | 386 | drivers/net/lance.c | irq2dev_map[dev->irq] = dev; |
dev | 392 | drivers/net/lance.c | enable_dma(dev->dma); |
dev | 393 | drivers/net/lance.c | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
dev | 407 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
dev | 410 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 423 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 424 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 425 | drivers/net/lance.c | dev->start = 1; |
dev | 434 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
dev | 441 | drivers/net/lance.c | lance_init_ring(struct device *dev) |
dev | 443 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 461 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 469 | drivers/net/lance.c | lance_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 471 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 472 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 476 | drivers/net/lance.c | if (dev->tbusy) { |
dev | 477 | drivers/net/lance.c | int tickssofar = jiffies - dev->trans_start; |
dev | 482 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 501 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 504 | drivers/net/lance.c | dev->tbusy=0; |
dev | 505 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 511 | drivers/net/lance.c | dev_tint(dev); |
dev | 516 | drivers/net/lance.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 517 | drivers/net/lance.c | skb->dev = dev; |
dev | 528 | drivers/net/lance.c | printk("%s: lance_start_xmit() called, csr0 %4.4x.\n", dev->name, |
dev | 535 | drivers/net/lance.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 536 | drivers/net/lance.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 560 | drivers/net/lance.c | dev->name, (int)(skb+1)); |
dev | 575 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 578 | drivers/net/lance.c | dev->tbusy=0; |
dev | 588 | drivers/net/lance.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 592 | drivers/net/lance.c | if (dev == NULL) { |
dev | 597 | drivers/net/lance.c | ioaddr = dev->base_addr; |
dev | 598 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 599 | drivers/net/lance.c | if (dev->interrupt) |
dev | 600 | drivers/net/lance.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 602 | drivers/net/lance.c | dev->interrupt = 1; |
dev | 604 | drivers/net/lance.c | outw(0x00, dev->base_addr + LANCE_ADDR); |
dev | 605 | drivers/net/lance.c | csr0 = inw(dev->base_addr + LANCE_DATA); |
dev | 608 | drivers/net/lance.c | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); |
dev | 612 | drivers/net/lance.c | dev->name, csr0, inw(dev->base_addr + LANCE_DATA)); |
dev | 615 | drivers/net/lance.c | lance_rx(dev); |
dev | 621 | drivers/net/lance.c | && dev->tbusy) { |
dev | 623 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 680 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 681 | drivers/net/lance.c | outw(0x7f40, dev->base_addr + LANCE_DATA); |
dev | 685 | drivers/net/lance.c | dev->name, inw(ioaddr + LANCE_ADDR), |
dev | 686 | drivers/net/lance.c | inw(dev->base_addr + LANCE_DATA)); |
dev | 688 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 693 | drivers/net/lance.c | lance_rx(struct device *dev) |
dev | 695 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 716 | drivers/net/lance.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 723 | drivers/net/lance.c | skb->dev = dev; |
dev | 731 | drivers/net/lance.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 751 | drivers/net/lance.c | lance_close(struct device *dev) |
dev | 753 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 754 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 756 | drivers/net/lance.c | dev->start = 0; |
dev | 757 | drivers/net/lance.c | dev->tbusy = 1; |
dev | 766 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 772 | drivers/net/lance.c | disable_dma(dev->dma); |
dev | 774 | drivers/net/lance.c | free_irq(dev->irq); |
dev | 775 | drivers/net/lance.c | free_dma(dev->dma); |
dev | 777 | drivers/net/lance.c | irq2dev_map[dev->irq] = 0; |
dev | 783 | drivers/net/lance.c | lance_get_stats(struct device *dev) |
dev | 785 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 786 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 807 | drivers/net/lance.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 809 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 35 | drivers/net/ne.c | #define NE_BASE (dev->base_addr) |
dev | 45 | drivers/net/ne.c | int ne_probe(struct device *dev); |
dev | 46 | drivers/net/ne.c | static int neprobe1(int ioaddr, struct device *dev, int verbose); |
dev | 48 | drivers/net/ne.c | static void ne_reset_8390(struct device *dev); |
dev | 49 | drivers/net/ne.c | static int ne_block_input(struct device *dev, int count, |
dev | 51 | drivers/net/ne.c | static void ne_block_output(struct device *dev, const int count, |
dev | 76 | drivers/net/ne.c | int ne_probe(struct device *dev) |
dev | 79 | drivers/net/ne.c | short ioaddr = dev->base_addr; |
dev | 84 | drivers/net/ne.c | return ! neprobe1(ioaddr, dev, 1); |
dev | 91 | drivers/net/ne.c | if (inb_p(*port) != 0xff && neprobe1(*port, dev, 0)) { |
dev | 92 | drivers/net/ne.c | dev->base_addr = *port; |
dev | 96 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 100 | drivers/net/ne.c | static int neprobe1(int ioaddr, struct device *dev, int verbose) |
dev | 177 | drivers/net/ne.c | dev->dev_addr[i] = SA_prom[i]; |
dev | 206 | drivers/net/ne.c | if (dev->irq < 2) { |
dev | 213 | drivers/net/ne.c | dev->irq = autoirq_report(0); |
dev | 215 | drivers/net/ne.c | printk(" autoirq is %d", dev->irq); |
dev | 216 | drivers/net/ne.c | } else if (dev->irq == 2) |
dev | 219 | drivers/net/ne.c | dev->irq = 9; |
dev | 224 | drivers/net/ne.c | int irqval = irqaction (dev->irq, &ei_sigaction); |
dev | 226 | drivers/net/ne.c | printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval); |
dev | 231 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 237 | drivers/net/ne.c | ethdev_init(dev); |
dev | 239 | drivers/net/ne.c | dev->name, name, ioaddr, dev->irq); |
dev | 258 | drivers/net/ne.c | NS8390_init(dev, 0); |
dev | 259 | drivers/net/ne.c | return dev->base_addr; |
dev | 265 | drivers/net/ne.c | ne_reset_8390(struct device *dev) |
dev | 277 | drivers/net/ne.c | printk("%s: ne_reset_8390() did not complete.\n", dev->name); |
dev | 288 | drivers/net/ne.c | ne_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 291 | drivers/net/ne.c | int nic_base = dev->base_addr; |
dev | 297 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock); |
dev | 333 | drivers/net/ne.c | dev->name, ring_offset + xfer_count, addr); |
dev | 340 | drivers/net/ne.c | ne_block_output(struct device *dev, int count, |
dev | 355 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock); |
dev | 408 | drivers/net/ne.c | dev->name, (start_page << 8) + count, addr); |
dev | 95 | drivers/net/net_init.c | struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 101 | drivers/net/net_init.c | if (dev == NULL) { |
dev | 105 | drivers/net/net_init.c | dev = (struct device *)*mem_startp; |
dev | 108 | drivers/net/net_init.c | dev = (struct device *)kmalloc(alloc_size, GFP_KERNEL); |
dev | 109 | drivers/net/net_init.c | memset(dev, 0, sizeof(alloc_size)); |
dev | 110 | drivers/net/net_init.c | dev->name = (char *)(dev + 1); |
dev | 112 | drivers/net/net_init.c | dev->priv = dev->name + sizeof("eth%d "); |
dev | 116 | drivers/net/net_init.c | if (dev->name && dev->name[0] == '\0') |
dev | 117 | drivers/net/net_init.c | sprintf(dev->name, "eth%d", next_ethdev_number++); |
dev | 120 | drivers/net/net_init.c | dev->buffs[i] = NULL; |
dev | 122 | drivers/net/net_init.c | dev->hard_header = eth_header; |
dev | 123 | drivers/net/net_init.c | dev->add_arp = eth_add_arp; |
dev | 124 | drivers/net/net_init.c | dev->queue_xmit = dev_queue_xmit; |
dev | 125 | drivers/net/net_init.c | dev->rebuild_header = eth_rebuild_header; |
dev | 126 | drivers/net/net_init.c | dev->type_trans = eth_type_trans; |
dev | 128 | drivers/net/net_init.c | dev->type = ARPHRD_ETHER; |
dev | 129 | drivers/net/net_init.c | dev->hard_header_len = ETH_HLEN; |
dev | 130 | drivers/net/net_init.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 131 | drivers/net/net_init.c | dev->addr_len = ETH_ALEN; |
dev | 133 | drivers/net/net_init.c | dev->broadcast[i]=0xff; |
dev | 137 | drivers/net/net_init.c | dev->flags = IFF_BROADCAST; |
dev | 138 | drivers/net/net_init.c | dev->family = AF_INET; |
dev | 139 | drivers/net/net_init.c | dev->pa_addr = 0; |
dev | 140 | drivers/net/net_init.c | dev->pa_brdaddr = 0; |
dev | 141 | drivers/net/net_init.c | dev->pa_mask = 0; |
dev | 142 | drivers/net/net_init.c | dev->pa_alen = sizeof(unsigned long); |
dev | 149 | drivers/net/net_init.c | (*old_devp)->next = dev; |
dev | 150 | drivers/net/net_init.c | dev->next = 0; |
dev | 152 | drivers/net/net_init.c | return dev; |
dev | 136 | drivers/net/plip.c | extern int plip_probe(int ioaddr, struct device *dev); |
dev | 137 | drivers/net/plip.c | static int plip_open(struct device *dev); |
dev | 138 | drivers/net/plip.c | static int plip_close(struct device *dev); |
dev | 139 | drivers/net/plip.c | static int plip_tx_packet(struct sk_buff *skb, struct device *dev); |
dev | 140 | drivers/net/plip.c | static int plip_header (unsigned char *buff, struct device *dev, |
dev | 150 | drivers/net/plip.c | static void plip_device_clear(struct device *dev); |
dev | 151 | drivers/net/plip.c | static void plip_receiver_error(struct device *dev); |
dev | 152 | drivers/net/plip.c | static void plip_set_physicaladdr(struct device *dev, unsigned long ipaddr); |
dev | 154 | drivers/net/plip.c | static int plip_send_enethdr(struct device *dev, struct ethhdr *eth); |
dev | 155 | drivers/net/plip.c | static int plip_rebuild_enethdr(struct device *dev, struct ethhdr *eth, |
dev | 160 | drivers/net/plip.c | static int plip_receive_packet(struct device *dev); |
dev | 161 | drivers/net/plip.c | static int plip_send_packet(struct device *dev, unsigned char *buf, int length); |
dev | 162 | drivers/net/plip.c | static int plip_send_start(struct device *dev, struct ethhdr *eth); |
dev | 164 | drivers/net/plip.c | static struct enet_statistics *plip_get_stats(struct device *dev); |
dev | 167 | drivers/net/plip.c | plip_init(struct device *dev) |
dev | 169 | drivers/net/plip.c | int port_base = dev->base_addr; |
dev | 188 | drivers/net/plip.c | dev->priv = kmalloc(sizeof(struct netstats), GFP_KERNEL); |
dev | 189 | drivers/net/plip.c | memset(dev->priv, 0, sizeof(struct netstats)); |
dev | 192 | drivers/net/plip.c | dev->buffs[i] = NULL; |
dev | 193 | drivers/net/plip.c | dev->hard_header = &plip_header; |
dev | 194 | drivers/net/plip.c | dev->add_arp = eth_add_arp; |
dev | 195 | drivers/net/plip.c | dev->queue_xmit = dev_queue_xmit; |
dev | 196 | drivers/net/plip.c | dev->rebuild_header = eth_rebuild_header; |
dev | 197 | drivers/net/plip.c | dev->type_trans = eth_type_trans; |
dev | 199 | drivers/net/plip.c | dev->open = &plip_open; |
dev | 200 | drivers/net/plip.c | dev->stop = &plip_close; |
dev | 201 | drivers/net/plip.c | dev->hard_start_xmit = &plip_tx_packet; |
dev | 202 | drivers/net/plip.c | dev->get_stats = &plip_get_stats; |
dev | 205 | drivers/net/plip.c | dev->type = ARPHRD_ETHER; |
dev | 206 | drivers/net/plip.c | dev->hard_header_len = ETH_HLEN; |
dev | 207 | drivers/net/plip.c | dev->mtu = PLIP_MTU; /* PLIP may later negotiate max pkt size */ |
dev | 208 | drivers/net/plip.c | dev->addr_len = ETH_ALEN; |
dev | 209 | drivers/net/plip.c | for (i = 0; i < dev->addr_len; i++) { |
dev | 210 | drivers/net/plip.c | dev->broadcast[i]=0xff; |
dev | 211 | drivers/net/plip.c | dev->dev_addr[i] = 0; |
dev | 214 | drivers/net/plip.c | dev->name, dev->base_addr, dev->irq); |
dev | 229 | drivers/net/plip.c | plip_open(struct device *dev) |
dev | 231 | drivers/net/plip.c | if (dev->irq == 0) |
dev | 232 | drivers/net/plip.c | dev->irq = 7; |
dev | 234 | drivers/net/plip.c | if (request_irq(dev->irq , &plip_interrupt) != 0) { |
dev | 236 | drivers/net/plip.c | PRINTK(("%s: couldn't get IRQ %d.\n", dev->name, dev->irq)); |
dev | 240 | drivers/net/plip.c | irq2dev_map[dev->irq] = dev; |
dev | 242 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 243 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 244 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 245 | drivers/net/plip.c | dev->start = 1; |
dev | 251 | drivers/net/plip.c | plip_close(struct device *dev) |
dev | 253 | drivers/net/plip.c | dev->tbusy = 1; |
dev | 254 | drivers/net/plip.c | dev->start = 0; |
dev | 256 | drivers/net/plip.c | free_irq(dev->irq); |
dev | 257 | drivers/net/plip.c | irq2dev_map[dev->irq] = NULL; |
dev | 259 | drivers/net/plip.c | outb(0x00, dev->base_addr); /* Release the interrupt. */ |
dev | 264 | drivers/net/plip.c | plip_tx_packet(struct sk_buff *skb, struct device *dev) |
dev | 268 | drivers/net/plip.c | if (dev->tbusy || dev->interrupt) { /* Do timeouts, to avoid hangs. */ |
dev | 269 | drivers/net/plip.c | int tickssofar = jiffies - dev->trans_start; |
dev | 272 | drivers/net/plip.c | printk("%s: transmit timed out\n", dev->name); |
dev | 274 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 282 | drivers/net/plip.c | dev_tint(dev); |
dev | 288 | drivers/net/plip.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 289 | drivers/net/plip.c | skb->dev = dev; |
dev | 295 | drivers/net/plip.c | dev->trans_start = jiffies; |
dev | 296 | drivers/net/plip.c | ret_val = plip_send_packet(dev, (unsigned char *)(skb+1), skb->len); |
dev | 299 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 305 | drivers/net/plip.c | plip_header (unsigned char *buff, struct device *dev, |
dev | 309 | drivers/net/plip.c | if (dev->dev_addr[0] == 0) { |
dev | 311 | drivers/net/plip.c | plip_set_physicaladdr(dev, h_source); |
dev | 313 | drivers/net/plip.c | return eth_header(buff, dev, type, h_dest, h_source, len); |
dev | 317 | drivers/net/plip.c | plip_device_clear(struct device *dev) |
dev | 319 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 320 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 321 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_DATA); |
dev | 322 | drivers/net/plip.c | outb(0x10, dev->base_addr + PAR_CONTROL); /* Enable the rx interrupt. */ |
dev | 326 | drivers/net/plip.c | plip_receiver_error(struct device *dev) |
dev | 328 | drivers/net/plip.c | dev->interrupt = 0; |
dev | 329 | drivers/net/plip.c | dev->tbusy = 0; |
dev | 330 | drivers/net/plip.c | outb(0x02, dev->base_addr + PAR_DATA); |
dev | 331 | drivers/net/plip.c | outb(0x10, dev->base_addr + PAR_CONTROL); /* Enable the rx interrupt. */ |
dev | 335 | drivers/net/plip.c | get_byte(struct device *dev) |
dev | 341 | drivers/net/plip.c | val = inb(dev->base_addr + PAR_STATUS); |
dev | 345 | drivers/net/plip.c | val = inb(dev->base_addr + PAR_STATUS); |
dev | 352 | drivers/net/plip.c | val = inb(dev->base_addr + PAR_STATUS); |
dev | 354 | drivers/net/plip.c | outb(0x11, dev->base_addr + PAR_DATA); |
dev | 358 | drivers/net/plip.c | val = inb(dev->base_addr + PAR_STATUS); |
dev | 365 | drivers/net/plip.c | val = inb(dev->base_addr + PAR_STATUS); |
dev | 368 | drivers/net/plip.c | outb(0x01, dev->base_addr + PAR_DATA); |
dev | 383 | drivers/net/plip.c | struct device *dev = irq2dev_map[irq]; |
dev | 386 | drivers/net/plip.c | if (dev == NULL) { |
dev | 390 | drivers/net/plip.c | localstats = (struct netstats*) dev->priv; |
dev | 391 | drivers/net/plip.c | if (dev->tbusy || dev->interrupt) return; |
dev | 392 | drivers/net/plip.c | dev->interrupt = 1; |
dev | 393 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_CONTROL); /* Disable the rx interrupt. */ |
dev | 395 | drivers/net/plip.c | PRINTK2(("%s: interrupt. ", dev->name)); |
dev | 400 | drivers/net/plip.c | while ((inb(dev->base_addr + PAR_STATUS) & 0xf8) != 0xc0) { |
dev | 403 | drivers/net/plip.c | dev->name, inb(dev->base_addr + PAR_STATUS))); |
dev | 404 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 409 | drivers/net/plip.c | if (plip_receive_packet(dev)) { |
dev | 412 | drivers/net/plip.c | plip_receiver_error(dev); |
dev | 414 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 419 | drivers/net/plip.c | plip_receive_packet(struct device *dev) |
dev | 428 | drivers/net/plip.c | localstats = (struct netstats*) dev->priv; |
dev | 430 | drivers/net/plip.c | outb(1, dev->base_addr + PAR_DATA); /* Ack: 'Ready' */ |
dev | 434 | drivers/net/plip.c | plip_type = get_byte(dev); |
dev | 436 | drivers/net/plip.c | length = get_byte(dev) << 8; |
dev | 437 | drivers/net/plip.c | length |= get_byte(dev); |
dev | 444 | drivers/net/plip.c | *eth_p = get_byte(dev); |
dev | 452 | drivers/net/plip.c | h_dest = get_byte(dev); |
dev | 453 | drivers/net/plip.c | h_source = get_byte(dev); |
dev | 454 | drivers/net/plip.c | type = get_byte(dev) << 8; |
dev | 455 | drivers/net/plip.c | type |= get_byte(dev); |
dev | 456 | drivers/net/plip.c | plip_rebuild_enethdr(dev, ð, h_dest, h_source, type); |
dev | 460 | drivers/net/plip.c | PRINTK(("%s: wrong header octet\n", dev->name)); |
dev | 463 | drivers/net/plip.c | if (length > dev->mtu || length < 8) { |
dev | 464 | drivers/net/plip.c | PRINTK2(("%s: bogus packet size %d.\n", dev->name, length)); |
dev | 477 | drivers/net/plip.c | dev->name, sksize)); |
dev | 495 | drivers/net/plip.c | unsigned char new_byte = get_byte(dev); |
dev | 500 | drivers/net/plip.c | if (checksum != get_byte(dev)) { |
dev | 504 | drivers/net/plip.c | } else if(dev_rint((unsigned char *)skb, length, IN_SKBUFF, dev)) { |
dev | 505 | drivers/net/plip.c | printk("%s: rcv buff full.\n", dev->name); |
dev | 515 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_DATA); |
dev | 517 | drivers/net/plip.c | while ( (inb(dev->base_addr + PAR_STATUS) & 0xf8) != 0x80 ) { |
dev | 530 | drivers/net/plip.c | static int send_byte(struct device *dev, unsigned char val) |
dev | 534 | drivers/net/plip.c | if (!(inb(dev->base_addr+PAR_STATUS) & 0x08)) { |
dev | 539 | drivers/net/plip.c | outb(val, dev->base_addr); /* this makes data bits more stable */ |
dev | 540 | drivers/net/plip.c | outb(0x10 | val, dev->base_addr); |
dev | 542 | drivers/net/plip.c | while( inb(dev->base_addr+PAR_STATUS) & 0x80 ) |
dev | 547 | drivers/net/plip.c | outb(0x10 | (val >> 4), dev->base_addr); |
dev | 548 | drivers/net/plip.c | outb(val >> 4, dev->base_addr); |
dev | 550 | drivers/net/plip.c | while( (inb(dev->base_addr+PAR_STATUS) & 0x80) == 0 ) |
dev | 572 | drivers/net/plip.c | plip_send_start(struct device *dev, struct ethhdr *eth) |
dev | 577 | drivers/net/plip.c | struct netstats *localstats = (struct netstats*) dev->priv; |
dev | 582 | drivers/net/plip.c | while ( ((status = inb(dev->base_addr+PAR_STATUS)) & 0x08) == 0 ) { |
dev | 583 | drivers/net/plip.c | dev->tbusy = 1; |
dev | 584 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_CONTROL); /* Disable my rx intr. */ |
dev | 585 | drivers/net/plip.c | outb(0x08, dev->base_addr + PAR_DATA); /* Trigger remote rx intr. */ |
dev | 595 | drivers/net/plip.c | if (plip_receive_packet(dev)) { |
dev | 598 | drivers/net/plip.c | outb(0x02, dev->base_addr + PAR_DATA); |
dev | 600 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_DATA); |
dev | 608 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_DATA); |
dev | 614 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 617 | drivers/net/plip.c | dev->name)); |
dev | 626 | drivers/net/plip.c | plip_send_packet(struct device *dev, unsigned char *buf, int length) |
dev | 633 | drivers/net/plip.c | dev->name, length, buf[0], buf[1], buf[2], buf[3], buf[4])); |
dev | 634 | drivers/net/plip.c | if (length > dev->mtu) { |
dev | 635 | drivers/net/plip.c | printk("%s: packet too big, %d.\n", dev->name, length); |
dev | 638 | drivers/net/plip.c | localstats = (struct netstats*) dev->priv; |
dev | 644 | drivers/net/plip.c | while ( (i = (inb(dev->base_addr+PAR_STATUS) & 0xe8)) != 0x80 ) { |
dev | 663 | drivers/net/plip.c | if (plip_send_start(dev, (struct ethhdr *)buf) < 0) |
dev | 680 | drivers/net/plip.c | send_byte(dev, plip_type); /* send header octet */ |
dev | 690 | drivers/net/plip.c | send_byte(dev, length >> 8); send_byte(dev, length); |
dev | 698 | drivers/net/plip.c | plip_send_enethdr(dev, (struct ethhdr*)buf); |
dev | 702 | drivers/net/plip.c | send_byte(dev, *buf); |
dev | 709 | drivers/net/plip.c | if (send_byte(dev, buf[i]) < 0) { |
dev | 714 | drivers/net/plip.c | send_byte(dev, checksum & 0xff); |
dev | 720 | drivers/net/plip.c | outb(0x00, dev->base_addr + PAR_DATA); |
dev | 723 | drivers/net/plip.c | while ((inb(dev->base_addr + PAR_STATUS) & 0xe8) != 0x80) { |
dev | 731 | drivers/net/plip.c | if (inb(dev->base_addr + PAR_STATUS) & 0x10) { |
dev | 736 | drivers/net/plip.c | plip_device_clear(dev); |
dev | 746 | drivers/net/plip.c | plip_set_physicaladdr(struct device *dev, unsigned long ipaddr) |
dev | 753 | drivers/net/plip.c | unsigned char *addr = dev->dev_addr; |
dev | 757 | drivers/net/plip.c | PRINTK2(("%s: set physical address to %08x\n", dev->name, ipaddr)); |
dev | 779 | drivers/net/plip.c | plip_send_enethdr(struct device *dev, struct ethhdr *eth) |
dev | 781 | drivers/net/plip.c | send_byte(dev, eth->h_dest[ETH_ALEN-1]); |
dev | 782 | drivers/net/plip.c | send_byte(dev, eth->h_source[ETH_ALEN-1]); |
dev | 783 | drivers/net/plip.c | send_byte(dev, eth->h_proto >> 8); |
dev | 784 | drivers/net/plip.c | send_byte(dev, eth->h_proto); |
dev | 789 | drivers/net/plip.c | plip_rebuild_enethdr(struct device *dev, struct ethhdr *eth, |
dev | 794 | drivers/net/plip.c | memcpy(eth->h_dest, dev->dev_addr, ETH_ALEN-1); |
dev | 796 | drivers/net/plip.c | memcpy(eth->h_source, dev->dev_addr, ETH_ALEN-1); |
dev | 823 | drivers/net/plip.c | plip_get_stats(struct device *dev) |
dev | 825 | drivers/net/plip.c | struct netstats *localstats = (struct netstats*) dev->priv; |
dev | 106 | drivers/net/skeleton.c | extern int netcard_probe(struct device *dev); |
dev | 108 | drivers/net/skeleton.c | static int netcard_probe1(struct device *dev, short ioaddr); |
dev | 109 | drivers/net/skeleton.c | static int net_open(struct device *dev); |
dev | 110 | drivers/net/skeleton.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 112 | drivers/net/skeleton.c | static void net_rx(struct device *dev); |
dev | 113 | drivers/net/skeleton.c | static int net_close(struct device *dev); |
dev | 114 | drivers/net/skeleton.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 116 | drivers/net/skeleton.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 120 | drivers/net/skeleton.c | #define tx_done(dev) 1 |
dev | 122 | drivers/net/skeleton.c | extern void chipset_init(struct device *dev, int startp); |
dev | 132 | drivers/net/skeleton.c | netcard_probe(struct device *dev) |
dev | 135 | drivers/net/skeleton.c | int base_addr = dev->base_addr; |
dev | 138 | drivers/net/skeleton.c | return netcard_probe1(dev, base_addr); |
dev | 148 | drivers/net/skeleton.c | dev->base_addr = ioaddr; |
dev | 149 | drivers/net/skeleton.c | if (netcard_probe1(dev, ioaddr) == 0) |
dev | 153 | drivers/net/skeleton.c | dev->base_addr = base_addr; |
dev | 157 | drivers/net/skeleton.c | int netcard_probe1(struct device *dev, short ioaddr) |
dev | 172 | drivers/net/skeleton.c | printk("%s: %s found at %#3x, IRQ %d.\n", dev->name, |
dev | 173 | drivers/net/skeleton.c | "network card", dev->base_addr, dev->irq); |
dev | 180 | drivers/net/skeleton.c | if (dev->irq == -1) |
dev | 182 | drivers/net/skeleton.c | else if (dev->irq < 2) { /* "Auto-IRQ" */ |
dev | 186 | drivers/net/skeleton.c | dev->irq = autoirq_report(0); |
dev | 188 | drivers/net/skeleton.c | printk(" autoirq is %d", dev->irq); |
dev | 189 | drivers/net/skeleton.c | } else if (dev->irq == 2) |
dev | 192 | drivers/net/skeleton.c | dev->irq = 9; |
dev | 194 | drivers/net/skeleton.c | { int irqval = request_irq(dev->irq, &net_interrupt); |
dev | 196 | drivers/net/skeleton.c | printk ("%s: unable to get IRQ %d (irqval=%d).\n", dev->name, |
dev | 197 | drivers/net/skeleton.c | dev->irq, irqval); |
dev | 210 | drivers/net/skeleton.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 211 | drivers/net/skeleton.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 213 | drivers/net/skeleton.c | dev->open = net_open; |
dev | 214 | drivers/net/skeleton.c | dev->stop = net_close; |
dev | 215 | drivers/net/skeleton.c | dev->hard_start_xmit = net_send_packet; |
dev | 216 | drivers/net/skeleton.c | dev->get_stats = net_get_stats; |
dev | 218 | drivers/net/skeleton.c | dev->set_multicast_list = &set_multicast_list; |
dev | 224 | drivers/net/skeleton.c | dev->buffs[i] = NULL; |
dev | 226 | drivers/net/skeleton.c | dev->hard_header = eth_header; |
dev | 227 | drivers/net/skeleton.c | dev->add_arp = eth_add_arp; |
dev | 228 | drivers/net/skeleton.c | dev->queue_xmit = dev_queue_xmit; |
dev | 229 | drivers/net/skeleton.c | dev->rebuild_header = eth_rebuild_header; |
dev | 230 | drivers/net/skeleton.c | dev->type_trans = eth_type_trans; |
dev | 232 | drivers/net/skeleton.c | dev->type = ARPHRD_ETHER; |
dev | 233 | drivers/net/skeleton.c | dev->hard_header_len = ETH_HLEN; |
dev | 234 | drivers/net/skeleton.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 235 | drivers/net/skeleton.c | dev->addr_len = ETH_ALEN; |
dev | 237 | drivers/net/skeleton.c | dev->broadcast[i]=0xff; |
dev | 241 | drivers/net/skeleton.c | dev->flags = IFF_BROADCAST; |
dev | 242 | drivers/net/skeleton.c | dev->family = AF_INET; |
dev | 243 | drivers/net/skeleton.c | dev->pa_addr = 0; |
dev | 244 | drivers/net/skeleton.c | dev->pa_brdaddr = 0; |
dev | 245 | drivers/net/skeleton.c | dev->pa_mask = 0; |
dev | 246 | drivers/net/skeleton.c | dev->pa_alen = sizeof(unsigned long); |
dev | 260 | drivers/net/skeleton.c | net_open(struct device *dev) |
dev | 262 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 263 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 267 | drivers/net/skeleton.c | if (request_irq(dev->irq, &net_interrupt)) { |
dev | 273 | drivers/net/skeleton.c | if (request_dma(dev->dma)) { |
dev | 274 | drivers/net/skeleton.c | free_irq(dev->irq); |
dev | 277 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = dev; |
dev | 284 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 285 | drivers/net/skeleton.c | dev->interrupt = 0; |
dev | 286 | drivers/net/skeleton.c | dev->start = 1; |
dev | 291 | drivers/net/skeleton.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 293 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 294 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 296 | drivers/net/skeleton.c | if (dev->tbusy) { |
dev | 299 | drivers/net/skeleton.c | int tickssofar = jiffies - dev->trans_start; |
dev | 302 | drivers/net/skeleton.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 303 | drivers/net/skeleton.c | tx_done(dev) ? "IRQ conflict" : "network cable problem"); |
dev | 305 | drivers/net/skeleton.c | chipset_init(dev, 1); |
dev | 306 | drivers/net/skeleton.c | dev->tbusy=0; |
dev | 307 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 314 | drivers/net/skeleton.c | dev_tint(dev); |
dev | 320 | drivers/net/skeleton.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 321 | drivers/net/skeleton.c | skb->dev = dev; |
dev | 329 | drivers/net/skeleton.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 330 | drivers/net/skeleton.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 336 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 354 | drivers/net/skeleton.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 358 | drivers/net/skeleton.c | if (dev == NULL) { |
dev | 362 | drivers/net/skeleton.c | dev->interrupt = 1; |
dev | 364 | drivers/net/skeleton.c | ioaddr = dev->base_addr; |
dev | 365 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
dev | 371 | drivers/net/skeleton.c | net_rx(dev); |
dev | 375 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 389 | drivers/net/skeleton.c | net_rx(struct device *dev) |
dev | 391 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 392 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 415 | drivers/net/skeleton.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 422 | drivers/net/skeleton.c | skb->dev = dev; |
dev | 425 | drivers/net/skeleton.c | memcpy((unsigned char *) (skb + 1), (void*)dev->rmem_start, |
dev | 434 | drivers/net/skeleton.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 452 | drivers/net/skeleton.c | net_close(struct device *dev) |
dev | 454 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 455 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 459 | drivers/net/skeleton.c | dev->tbusy = 1; |
dev | 460 | drivers/net/skeleton.c | dev->start = 0; |
dev | 464 | drivers/net/skeleton.c | disable_dma(dev->dma); |
dev | 469 | drivers/net/skeleton.c | free_irq(dev->irq); |
dev | 470 | drivers/net/skeleton.c | free_dma(dev->dma); |
dev | 472 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = 0; |
dev | 483 | drivers/net/skeleton.c | net_get_stats(struct device *dev) |
dev | 485 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 486 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 504 | drivers/net/skeleton.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 506 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 132 | drivers/net/slip.c | sl_initialize(struct slip *sl, struct device *dev) |
dev | 144 | drivers/net/slip.c | sl->line = dev->base_addr; |
dev | 146 | drivers/net/slip.c | sl->dev = dev; |
dev | 156 | drivers/net/slip.c | dev->rmem_end = (unsigned long) NULL; |
dev | 157 | drivers/net/slip.c | dev->rmem_start = (unsigned long) NULL; |
dev | 158 | drivers/net/slip.c | dev->mem_end = (unsigned long) NULL; |
dev | 159 | drivers/net/slip.c | dev->mem_start = (unsigned long) NULL; |
dev | 224 | drivers/net/slip.c | struct device *dev=sl->dev; |
dev | 229 | drivers/net/slip.c | sl->mtu=dev->mtu; |
dev | 230 | drivers/net/slip.c | l=(dev->mtu *2); |
dev | 242 | drivers/net/slip.c | dev->mtu=omtu; |
dev | 254 | drivers/net/slip.c | tf=(unsigned char *)sl->dev->mem_start; |
dev | 255 | drivers/net/slip.c | sl->dev->mem_start=(unsigned long)tb; |
dev | 256 | drivers/net/slip.c | sl->dev->mem_end=(unsigned long) (sl->dev->mem_start + l); |
dev | 257 | drivers/net/slip.c | rf=(unsigned char *)sl->dev->rmem_start; |
dev | 258 | drivers/net/slip.c | sl->dev->rmem_start=(unsigned long)rb; |
dev | 259 | drivers/net/slip.c | sl->dev->rmem_end=(unsigned long) (sl->dev->rmem_start + l); |
dev | 261 | drivers/net/slip.c | sl->xbuff = (unsigned char *) sl->dev->mem_start; |
dev | 262 | drivers/net/slip.c | sl->rbuff = (unsigned char *) sl->dev->rmem_start; |
dev | 263 | drivers/net/slip.c | sl->rend = (unsigned char *) sl->dev->rmem_end; |
dev | 325 | drivers/net/slip.c | sl->dev->tbusy = 1; |
dev | 339 | drivers/net/slip.c | sl->dev->tbusy = 0; |
dev | 385 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "<< \"%s\" recv:\r\n", sl->dev->name)); |
dev | 393 | drivers/net/slip.c | done = dev_rint(sl->rbuff, count, 0, sl->dev); |
dev | 407 | drivers/net/slip.c | dev_tint(sl->dev); |
dev | 419 | drivers/net/slip.c | DPRINTF((DBG_SLIP, ">> \"%s\" sent:\r\n", sl->dev->name)); |
dev | 423 | drivers/net/slip.c | if(sl->mtu != sl->dev->mtu) /* Someone has been ifconfigging */ |
dev | 491 | drivers/net/slip.c | sl_xmit(struct sk_buff *skb, struct device *dev) |
dev | 497 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 500 | drivers/net/slip.c | dev->name, skb, sl->sending)); |
dev | 518 | drivers/net/slip.c | if(!skb->arp && dev->rebuild_header(skb+1,dev)) |
dev | 520 | drivers/net/slip.c | skb->dev=dev; |
dev | 537 | drivers/net/slip.c | sl_type_trans (struct sk_buff *skb, struct device *dev) |
dev | 540 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 550 | drivers/net/slip.c | sl_header(unsigned char *buff, struct device *dev, unsigned short type, |
dev | 554 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 562 | drivers/net/slip.c | memcpy(buff,dev->broadcast,dev->addr_len); /* QST-0 */ |
dev | 572 | drivers/net/slip.c | if(arp_find(buff,daddr,dev, saddr)) |
dev | 580 | drivers/net/slip.c | return ( -dev->hard_header_len); |
dev | 586 | drivers/net/slip.c | memcpy(buff,dev->dev_addr,dev->addr_len); |
dev | 614 | drivers/net/slip.c | sl_add_arp(unsigned long addr, struct sk_buff *skb, struct device *dev) |
dev | 617 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 620 | drivers/net/slip.c | arp_add(addr,((char *)(skb+1))+8,dev); |
dev | 627 | drivers/net/slip.c | sl_rebuild_header(void *buff, struct device *dev) |
dev | 630 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 637 | drivers/net/slip.c | if(arp_find(bp+1,dest,dev,src)) |
dev | 639 | drivers/net/slip.c | memcpy(bp+8,dev->dev_addr,7); |
dev | 653 | drivers/net/slip.c | sl_open(struct device *dev) |
dev | 659 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 664 | drivers/net/slip.c | sl->dev = dev; |
dev | 674 | drivers/net/slip.c | l = (dev->mtu * 2); |
dev | 681 | drivers/net/slip.c | sl->mtu = dev->mtu; |
dev | 682 | drivers/net/slip.c | sl->dev->mem_start = (unsigned long) p; |
dev | 683 | drivers/net/slip.c | sl->dev->mem_end = (unsigned long) (sl->dev->mem_start + l); |
dev | 690 | drivers/net/slip.c | sl->dev->rmem_start = (unsigned long) p; |
dev | 691 | drivers/net/slip.c | sl->dev->rmem_end = (unsigned long) (sl->dev->rmem_start + l); |
dev | 693 | drivers/net/slip.c | sl->xbuff = (unsigned char *) sl->dev->mem_start; |
dev | 694 | drivers/net/slip.c | sl->rbuff = (unsigned char *) sl->dev->rmem_start; |
dev | 695 | drivers/net/slip.c | sl->rend = (unsigned char *) sl->dev->rmem_end; |
dev | 704 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->mem_start); |
dev | 712 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->mem_start); |
dev | 713 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->rmem_start); |
dev | 726 | drivers/net/slip.c | sl_close(struct device *dev) |
dev | 730 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 743 | drivers/net/slip.c | sl_initialize(sl, dev); |
dev | 767 | drivers/net/slip.c | if(sl->mtu!=sl->dev->mtu) /* Argh! mtu change time! - costs us the packet part received at the change */ |
dev | 828 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 843 | drivers/net/slip.c | (void) sl_open(sl->dev); |
dev | 845 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 869 | drivers/net/slip.c | (void) dev_close(sl->dev); |
dev | 871 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 1046 | drivers/net/slip.c | int sl_set_mac_address(struct device *dev, void *addr) |
dev | 1051 | drivers/net/slip.c | memcpy_fromfs(dev->dev_addr,addr,7); /* addr is an AX.25 shifted ASCII mac address */ |
dev | 1076 | drivers/net/slip.c | memcpy_tofs(arg, sl->dev->name, strlen(sl->dev->name) + 1); |
dev | 1088 | drivers/net/slip.c | sl->dev->addr_len=7; /* sizeof an AX.25 addr */ |
dev | 1089 | drivers/net/slip.c | sl->dev->hard_header_len=17; /* We don't do digipeaters */ |
dev | 1090 | drivers/net/slip.c | sl->dev->type=3; /* AF_AX25 not an AF_INET device */ |
dev | 1094 | drivers/net/slip.c | sl->dev->addr_len=0; /* No mac addr in slip mode */ |
dev | 1095 | drivers/net/slip.c | sl->dev->hard_header_len=0; |
dev | 1096 | drivers/net/slip.c | sl->dev->type=0; |
dev | 1102 | drivers/net/slip.c | return sl_set_mac_address(sl->dev,arg); |
dev | 1113 | drivers/net/slip.c | slip_init(struct device *dev) |
dev | 1122 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 1145 | drivers/net/slip.c | sl_initialize(sl, dev); |
dev | 1156 | drivers/net/slip.c | dev->mtu = SL_MTU; |
dev | 1157 | drivers/net/slip.c | dev->hard_start_xmit = sl_xmit; |
dev | 1158 | drivers/net/slip.c | dev->open = sl_open; |
dev | 1159 | drivers/net/slip.c | dev->stop = sl_close; |
dev | 1160 | drivers/net/slip.c | dev->hard_header = sl_header; |
dev | 1161 | drivers/net/slip.c | dev->add_arp = sl_add_arp; |
dev | 1162 | drivers/net/slip.c | dev->type_trans = sl_type_trans; |
dev | 1165 | drivers/net/slip.c | dev->set_mac_address = sl_set_mac_address; |
dev | 1168 | drivers/net/slip.c | dev->hard_header_len = 0; |
dev | 1169 | drivers/net/slip.c | dev->addr_len = 0; |
dev | 1170 | drivers/net/slip.c | dev->type = 0; |
dev | 1172 | drivers/net/slip.c | memcpy(dev->broadcast,ax25_bcast,7); /* Only activated in AX.25 mode */ |
dev | 1173 | drivers/net/slip.c | memcpy(dev->dev_addr,ax25_test,7); /* "" "" "" "" */ |
dev | 1175 | drivers/net/slip.c | dev->queue_xmit = dev_queue_xmit; |
dev | 1176 | drivers/net/slip.c | dev->rebuild_header = sl_rebuild_header; |
dev | 1178 | drivers/net/slip.c | dev->buffs[i] = NULL; |
dev | 1181 | drivers/net/slip.c | dev->flags = 0; |
dev | 1182 | drivers/net/slip.c | dev->family = AF_INET; |
dev | 1183 | drivers/net/slip.c | dev->pa_addr = 0; |
dev | 1184 | drivers/net/slip.c | dev->pa_brdaddr = 0; |
dev | 1185 | drivers/net/slip.c | dev->pa_mask = 0; |
dev | 1186 | drivers/net/slip.c | dev->pa_alen = sizeof(unsigned long); |
dev | 39 | drivers/net/slip.h | struct device *dev; /* easy for intr handling */ |
dev | 75 | drivers/net/slip.h | extern int slip_init(struct device *dev); |
dev | 36 | drivers/net/smc-ultra.c | int ultraprobe(int ioaddr, struct device *dev); |
dev | 37 | drivers/net/smc-ultra.c | int ultraprobe1(int ioaddr, struct device *dev); |
dev | 39 | drivers/net/smc-ultra.c | static int ultra_open(struct device *dev); |
dev | 40 | drivers/net/smc-ultra.c | static void ultra_reset_8390(struct device *dev); |
dev | 41 | drivers/net/smc-ultra.c | static int ultra_block_input(struct device *dev, int count, |
dev | 43 | drivers/net/smc-ultra.c | static void ultra_block_output(struct device *dev, int count, |
dev | 45 | drivers/net/smc-ultra.c | static int ultra_close_card(struct device *dev); |
dev | 60 | drivers/net/smc-ultra.c | int ultra_probe(struct device *dev) |
dev | 63 | drivers/net/smc-ultra.c | unsigned short ioaddr = dev->base_addr; |
dev | 66 | drivers/net/smc-ultra.c | return ! ultraprobe1(ioaddr, dev); |
dev | 74 | drivers/net/smc-ultra.c | && ultraprobe1(*port, dev) == 0) |
dev | 77 | drivers/net/smc-ultra.c | dev->base_addr = ioaddr; |
dev | 81 | drivers/net/smc-ultra.c | int ultraprobe1(int ioaddr, struct device *dev) |
dev | 84 | drivers/net/smc-ultra.c | unsigned char *station_addr = dev->dev_addr; |
dev | 99 | drivers/net/smc-ultra.c | printk("%s: SMC Ultra at %#3x,", dev->name, ioaddr); |
dev | 108 | drivers/net/smc-ultra.c | if (dev->irq < 2) { |
dev | 120 | drivers/net/smc-ultra.c | dev->irq = irq; |
dev | 129 | drivers/net/smc-ultra.c | dev->base_addr = ioaddr+ULTRA_NIC_OFFSET; |
dev | 136 | drivers/net/smc-ultra.c | dev->mem_start = ((addr & 0x0f) << 13) + addr_tbl[(addr >> 6) & 3] ; |
dev | 140 | drivers/net/smc-ultra.c | ethdev_init(dev); |
dev | 148 | drivers/net/smc-ultra.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 149 | drivers/net/smc-ultra.c | dev->mem_end = dev->rmem_end |
dev | 150 | drivers/net/smc-ultra.c | = dev->mem_start + (ei_status.stop_page - START_PG)*256; |
dev | 153 | drivers/net/smc-ultra.c | dev->irq, dev->mem_start, dev->mem_end-1); |
dev | 160 | drivers/net/smc-ultra.c | dev->open = &ultra_open; |
dev | 161 | drivers/net/smc-ultra.c | dev->stop = &ultra_close_card; |
dev | 162 | drivers/net/smc-ultra.c | NS8390_init(dev, 0); |
dev | 168 | drivers/net/smc-ultra.c | ultra_open(struct device *dev) |
dev | 170 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */ |
dev | 172 | drivers/net/smc-ultra.c | if (irqaction(dev->irq, &ei_sigaction)) |
dev | 180 | drivers/net/smc-ultra.c | return ei_open(dev); |
dev | 184 | drivers/net/smc-ultra.c | ultra_reset_8390(struct device *dev) |
dev | 186 | drivers/net/smc-ultra.c | int cmd_port = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC base addr */ |
dev | 202 | drivers/net/smc-ultra.c | ultra_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 204 | drivers/net/smc-ultra.c | void *xfer_start = (void *)(dev->mem_start + ring_offset |
dev | 207 | drivers/net/smc-ultra.c | if (xfer_start + count > (void*) dev->rmem_end) { |
dev | 209 | drivers/net/smc-ultra.c | int semi_count = (void*)dev->rmem_end - xfer_start; |
dev | 212 | drivers/net/smc-ultra.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 213 | drivers/net/smc-ultra.c | return dev->rmem_start + count; |
dev | 221 | drivers/net/smc-ultra.c | ultra_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 225 | drivers/net/smc-ultra.c | = (unsigned char *)dev->mem_start + ((start_page - START_PG)<<8); |
dev | 232 | drivers/net/smc-ultra.c | ultra_close_card(struct device *dev) |
dev | 234 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* CMDREG */ |
dev | 236 | drivers/net/smc-ultra.c | dev->start = 0; |
dev | 237 | drivers/net/smc-ultra.c | dev->tbusy = 1; |
dev | 240 | drivers/net/smc-ultra.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 243 | drivers/net/smc-ultra.c | free_irq(dev->irq); |
dev | 244 | drivers/net/smc-ultra.c | irq2dev_map[dev->irq] = 0; |
dev | 246 | drivers/net/smc-ultra.c | NS8390_init(dev, 0); |
dev | 37 | drivers/net/wd.c | int wd_probe(struct device *dev); |
dev | 38 | drivers/net/wd.c | int wdprobe1(int ioaddr, struct device *dev); |
dev | 40 | drivers/net/wd.c | static int wd_open(struct device *dev); |
dev | 41 | drivers/net/wd.c | static void wd_reset_8390(struct device *dev); |
dev | 42 | drivers/net/wd.c | static int wd_block_input(struct device *dev, int count, |
dev | 44 | drivers/net/wd.c | static void wd_block_output(struct device *dev, int count, |
dev | 46 | drivers/net/wd.c | static int wd_close_card(struct device *dev); |
dev | 69 | drivers/net/wd.c | int wd_probe(struct device *dev) |
dev | 72 | drivers/net/wd.c | short ioaddr = dev->base_addr; |
dev | 77 | drivers/net/wd.c | return ! wdprobe1(ioaddr, dev); |
dev | 84 | drivers/net/wd.c | && wdprobe1(*port, dev)) |
dev | 87 | drivers/net/wd.c | dev->base_addr = ioaddr; |
dev | 91 | drivers/net/wd.c | int wdprobe1(int ioaddr, struct device *dev) |
dev | 94 | drivers/net/wd.c | unsigned char *station_addr = dev->dev_addr; |
dev | 105 | drivers/net/wd.c | printk("%s: WD80x3 at %#3x, ", dev->name, ioaddr); |
dev | 124 | drivers/net/wd.c | dev->mem_start = ((reg5 & 0x1c) + 0xc0) << 12; |
dev | 125 | drivers/net/wd.c | dev->irq = (reg5 & 0xe0) == 0xe0 ? 10 : (reg5 >> 5) + 1; |
dev | 166 | drivers/net/wd.c | dev->mem_start = WD_SHMEM; |
dev | 168 | drivers/net/wd.c | if (dev->mem_start == 0) { |
dev | 173 | drivers/net/wd.c | dev->mem_start = 0xd0000; |
dev | 174 | drivers/net/wd.c | printk(" assigning address %#lx", dev->mem_start); |
dev | 180 | drivers/net/wd.c | dev->mem_start = ((reg0&0x3f) << 13) + (high_addr_bits << 19); |
dev | 186 | drivers/net/wd.c | dev->base_addr = ioaddr+WD_NIC_OFFSET; |
dev | 188 | drivers/net/wd.c | if (dev->irq < 2) { |
dev | 205 | drivers/net/wd.c | dev->irq = autoirq_report(2); |
dev | 209 | drivers/net/wd.c | printk(" autoirq is %d", dev->irq); |
dev | 210 | drivers/net/wd.c | if (dev->irq < 2) |
dev | 211 | drivers/net/wd.c | dev->irq = word16 ? 10 : 5; |
dev | 213 | drivers/net/wd.c | dev->irq = irqmap[((reg4 >> 5) & 0x03) + (reg1 & 0x04)]; |
dev | 214 | drivers/net/wd.c | } else if (dev->irq == 2) /* Fixup bogosity: IRQ2 is really IRQ9 */ |
dev | 215 | drivers/net/wd.c | dev->irq = 9; |
dev | 219 | drivers/net/wd.c | if (irqaction (dev->irq, &ei_sigaction)) { |
dev | 220 | drivers/net/wd.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 226 | drivers/net/wd.c | ethdev_init(dev); |
dev | 235 | drivers/net/wd.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 236 | drivers/net/wd.c | dev->mem_end = dev->rmem_end |
dev | 237 | drivers/net/wd.c | = dev->mem_start + (ei_status.stop_page - WD_START_PG)*256; |
dev | 240 | drivers/net/wd.c | model_name, dev->irq, dev->mem_start, dev->mem_end-1); |
dev | 247 | drivers/net/wd.c | dev->open = &wd_open; |
dev | 248 | drivers/net/wd.c | dev->stop = &wd_close_card; |
dev | 249 | drivers/net/wd.c | NS8390_init(dev, 0); |
dev | 251 | drivers/net/wd.c | return dev->base_addr; |
dev | 255 | drivers/net/wd.c | wd_open(struct device *dev) |
dev | 257 | drivers/net/wd.c | int ioaddr = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 261 | drivers/net/wd.c | ei_status.reg0 = ((dev->mem_start>>13) & 0x3f) | WD_MEMENB; |
dev | 262 | drivers/net/wd.c | ei_status.reg5 = ((dev->mem_start>>19) & 0x1f) | NIC16; |
dev | 268 | drivers/net/wd.c | return ei_open(dev); |
dev | 272 | drivers/net/wd.c | wd_reset_8390(struct device *dev) |
dev | 274 | drivers/net/wd.c | int wd_cmd_port = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 281 | drivers/net/wd.c | outb((((dev->mem_start>>13) & 0x3f)|WD_MEMENB), wd_cmd_port); |
dev | 283 | drivers/net/wd.c | outb(NIC16 | ((dev->mem_start>>19) & 0x1f), wd_cmd_port+WD_CMDREG5); |
dev | 295 | drivers/net/wd.c | wd_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 297 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 298 | drivers/net/wd.c | long xfer_start = dev->mem_start + ring_offset - (WD_START_PG<<8); |
dev | 309 | drivers/net/wd.c | if (xfer_start + count > dev->rmem_end) { |
dev | 311 | drivers/net/wd.c | int semi_count = dev->rmem_end - xfer_start; |
dev | 314 | drivers/net/wd.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 326 | drivers/net/wd.c | wd_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 329 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 330 | drivers/net/wd.c | long shmem = dev->mem_start + ((start_page - WD_START_PG)<<8); |
dev | 344 | drivers/net/wd.c | wd_close_card(struct device *dev) |
dev | 346 | drivers/net/wd.c | int wd_cmdreg = dev->base_addr - WD_NIC_OFFSET; /* WD_CMDREG */ |
dev | 349 | drivers/net/wd.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 350 | drivers/net/wd.c | NS8390_init(dev, 0); |
dev | 974 | drivers/scsi/aha152x.c | int aha152x_biosparam( int size, int dev, int *info_array ) |
dev | 985 | drivers/scsi/aha152x.c | printk("dev=%x, size=%d, ", dev, size); |
dev | 850 | drivers/scsi/aha1542.c | int aha1542_biosparam(int size, int dev, int * ip) |
dev | 494 | drivers/scsi/aha1740.c | int aha1740_biosparam(int size, int dev, int* ip) |
dev | 366 | drivers/scsi/constants.c | int dev = SCpnt->request.dev; |
dev | 400 | drivers/scsi/constants.c | printk( "%s%x: sense key %s\n", devclass, dev, snstext[sense_buffer[2] & 0x0f]); |
dev | 402 | drivers/scsi/constants.c | printk("%s%x: sns = %2x %2x\n", devclass, dev, sense_buffer[0], sense_buffer[2]); |
dev | 430 | drivers/scsi/constants.c | printk("%s%x: old sense key %s\n", devclass, dev, snstext[sense_buffer[0] & 0x0f]); |
dev | 433 | drivers/scsi/constants.c | printk("%s%x: sns = %2x %2x\n", devclass, dev, sense_buffer[0], sense_buffer[2]); |
dev | 1429 | drivers/scsi/fdomain.c | int fdomain_16x0_biosparam( int size, int dev, int *info_array ) |
dev | 1470 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
dev | 396 | drivers/scsi/pas16.c | int pas16_biosparam(int size, int dev, int * ip) |
dev | 177 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
dev | 189 | drivers/scsi/scsi.c | int dev, lun, type; |
dev | 204 | drivers/scsi/scsi.c | for (dev = 0; dev < 8; ++dev) |
dev | 205 | drivers/scsi/scsi.c | if (shpnt->this_id != dev) |
dev | 217 | drivers/scsi/scsi.c | scsi_devices[NR_SCSI_DEVICES].id = dev; |
dev | 233 | drivers/scsi/scsi.c | SCmd.target = dev; |
dev | 236 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 248 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 250 | drivers/scsi/scsi.c | printk("scsi: scan SCSIS id %d lun %d\n", dev, lun); |
dev | 283 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 290 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 355 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 360 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 366 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 438 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 445 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 531 | drivers/scsi/scsi.c | if (req && req->dev <= 0) |
dev | 538 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 573 | drivers/scsi/scsi.c | req->dev = -1; |
dev | 576 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
dev | 598 | drivers/scsi/scsi.c | int dev = -1; |
dev | 612 | drivers/scsi/scsi.c | if (req && (dev = req->dev) <= 0) return NULL; |
dev | 622 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 628 | drivers/scsi/scsi.c | if (req && ((req->dev < 0) || (req->dev != dev))) { |
dev | 632 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
dev | 642 | drivers/scsi/scsi.c | (SCwait->request.dev > 0)); |
dev | 671 | drivers/scsi/scsi.c | req->dev = -1; |
dev | 675 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
dev | 1345 | drivers/scsi/scsi.c | if ((SCpnt1->request.dev > 0) && |
dev | 1601 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
dev | 460 | drivers/scsi/scsi.h | req->dev,req->sector); |
dev | 485 | drivers/scsi/scsi.h | DEVICE_OFF(req->dev); |
dev | 492 | drivers/scsi/scsi.h | req->dev = -1; |
dev | 508 | drivers/scsi/scsi.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 49 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
dev | 55 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
dev | 61 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
dev | 62 | drivers/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
dev | 70 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
dev | 71 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
dev | 80 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
dev | 203 | drivers/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
dev | 79 | drivers/scsi/scsi_ioctl.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 89 | drivers/scsi/scsi_ioctl.c | static int ioctl_internal_command(Scsi_Device *dev, char * cmd) |
dev | 94 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
dev | 99 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 102 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 108 | drivers/scsi/scsi_ioctl.c | if(cmd[0] == ALLOW_MEDIUM_REMOVAL) dev->lockable = 0; |
dev | 112 | drivers/scsi/scsi_ioctl.c | if(dev->removable){ |
dev | 117 | drivers/scsi/scsi_ioctl.c | if (dev->removable){ |
dev | 118 | drivers/scsi/scsi_ioctl.c | dev->changed = 1; |
dev | 125 | drivers/scsi/scsi_ioctl.c | dev->host->host_no, |
dev | 126 | drivers/scsi/scsi_ioctl.c | dev->id, |
dev | 127 | drivers/scsi/scsi_ioctl.c | dev->lun, |
dev | 137 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 142 | drivers/scsi/scsi_ioctl.c | static int ioctl_command(Scsi_Device *dev, void *buffer) |
dev | 174 | drivers/scsi/scsi_ioctl.c | cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5); |
dev | 178 | drivers/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
dev | 183 | drivers/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 186 | drivers/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 204 | drivers/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 211 | drivers/scsi/scsi_ioctl.c | printk("scsi_ioctl : device %d. command = ", dev->id); |
dev | 233 | drivers/scsi/scsi_ioctl.c | int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) |
dev | 237 | drivers/scsi/scsi_ioctl.c | if ((cmd != 0 && dev->index > NR_SCSI_DEVICES)) |
dev | 243 | drivers/scsi/scsi_ioctl.c | put_fs_long(dev->id + (dev->lun << 8) + |
dev | 244 | drivers/scsi/scsi_ioctl.c | (dev->host->host_no << 16), (unsigned long *) arg); |
dev | 248 | drivers/scsi/scsi_ioctl.c | if(!dev->tagged_supported) return -EINVAL; |
dev | 249 | drivers/scsi/scsi_ioctl.c | dev->tagged_queue = 1; |
dev | 250 | drivers/scsi/scsi_ioctl.c | dev->current_tag = 1; |
dev | 254 | drivers/scsi/scsi_ioctl.c | if(!dev->tagged_supported) return -EINVAL; |
dev | 255 | drivers/scsi/scsi_ioctl.c | dev->tagged_queue = 0; |
dev | 256 | drivers/scsi/scsi_ioctl.c | dev->current_tag = 0; |
dev | 259 | drivers/scsi/scsi_ioctl.c | return ioctl_probe(dev->host, arg); |
dev | 262 | drivers/scsi/scsi_ioctl.c | return ioctl_command((Scsi_Device *) dev, arg); |
dev | 264 | drivers/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 266 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 269 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 272 | drivers/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 274 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 277 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 280 | drivers/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 283 | drivers/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 296 | drivers/scsi/scsi_ioctl.c | int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) { |
dev | 301 | drivers/scsi/scsi_ioctl.c | tmp = scsi_ioctl (dev, cmd, arg); |
dev | 15 | drivers/scsi/scsi_ioctl.h | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 16 | drivers/scsi/scsi_ioctl.h | extern int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 144 | drivers/scsi/sd.c | printk("sd%d : rw_intr(%d, %d)\n", MINOR(SCpnt->request.dev), SCpnt->host->host_no, result); |
dev | 156 | drivers/scsi/sd.c | printk("sd%d : %d sectors remain.\n", MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors); |
dev | 199 | drivers/scsi/sd.c | MINOR(SCpnt->request.dev)); |
dev | 251 | drivers/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
dev | 262 | drivers/scsi/sd.c | if(rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->removable) { |
dev | 266 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
dev | 283 | drivers/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
dev | 284 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
dev | 293 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
dev | 294 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
dev | 295 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
dev | 318 | drivers/scsi/sd.c | if (CURRENT != NULL && CURRENT->dev == -1) { |
dev | 339 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(MINOR(CURRENT->dev))].device->index, 0); |
dev | 357 | drivers/scsi/sd.c | rscsi_disks[DEVICE_NR(MINOR(req->dev))].device->index); |
dev | 362 | drivers/scsi/sd.c | if (SCpnt && req->dev == -1) { |
dev | 382 | drivers/scsi/sd.c | int dev, block, this_count; |
dev | 388 | drivers/scsi/sd.c | if(SCpnt->request.dev <= 0) { |
dev | 393 | drivers/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
dev | 398 | drivers/scsi/sd.c | printk("Doing sd request, dev = %d, block = %d\n", dev, block); |
dev | 401 | drivers/scsi/sd.c | if (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
dev | 407 | drivers/scsi/sd.c | block += sd[dev].start_sect; |
dev | 408 | drivers/scsi/sd.c | dev = DEVICE_NR(dev); |
dev | 410 | drivers/scsi/sd.c | if (rscsi_disks[dev].device->changed) |
dev | 421 | drivers/scsi/sd.c | printk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block); |
dev | 427 | drivers/scsi/sd.c | if (!rscsi_disks[dev].device->writeable) |
dev | 479 | drivers/scsi/sd.c | this_count_max = (rscsi_disks[dev].ten ? 0xffff : 0xff); |
dev | 557 | drivers/scsi/sd.c | printk("sd%d : %s %d/%d 512 byte blocks.\n", MINOR(SCpnt->request.dev), |
dev | 564 | drivers/scsi/sd.c | if (rscsi_disks[dev].sector_size == 1024){ |
dev | 571 | drivers/scsi/sd.c | if (rscsi_disks[dev].sector_size == 256){ |
dev | 576 | drivers/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
dev | 608 | drivers/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
dev | 612 | drivers/scsi/sd.c | this_count * rscsi_disks[dev].sector_size, |
dev | 654 | drivers/scsi/sd.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 688 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
dev | 697 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
dev | 713 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
dev | 722 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
dev | 747 | drivers/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
dev | 757 | drivers/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
dev | 759 | drivers/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 762 | drivers/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 770 | drivers/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 930 | drivers/scsi/sd.c | int revalidate_scsidisk(int dev, int maxusage){ |
dev | 937 | drivers/scsi/sd.c | target = DEVICE_NR(MINOR(dev)); |
dev | 19 | drivers/scsi/sd_ioctl.c | int dev = inode->i_rdev; |
dev | 31 | drivers/scsi/sd_ioctl.c | host = rscsi_disks[MINOR(dev) >> 4].device->host; |
dev | 36 | drivers/scsi/sd_ioctl.c | host->hostt->bios_param(rscsi_disks[MINOR(dev) >> 4].capacity, |
dev | 37 | drivers/scsi/sd_ioctl.c | dev, |
dev | 64 | drivers/scsi/sd_ioctl.c | return revalidate_scsidisk(dev, 1); |
dev | 66 | drivers/scsi/sd_ioctl.c | return scsi_ioctl(rscsi_disks[MINOR(dev) >> 4].device , cmd, (void *) arg); |
dev | 1603 | drivers/scsi/seagate.c | int seagate_st0x_biosparam(int size, int dev, int* ip) { |
dev | 1610 | drivers/scsi/seagate.c | disk = rscsi_disks[MINOR(dev) >> 4].device; |
dev | 57 | drivers/scsi/sg.c | int dev = MINOR(inode->i_rdev); |
dev | 58 | drivers/scsi/sg.c | if ((dev<0) || (dev>=NR_SG)) |
dev | 63 | drivers/scsi/sg.c | scsi_generics[dev].timeout=get_fs_long((int *) arg); |
dev | 66 | drivers/scsi/sg.c | return scsi_generics[dev].timeout; |
dev | 68 | drivers/scsi/sg.c | return scsi_ioctl(scsi_generics[dev].device, cmd_in, (void *) arg); |
dev | 74 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 76 | drivers/scsi/sg.c | if (dev>=NR_SG) |
dev | 82 | drivers/scsi/sg.c | while(scsi_generics[dev].users) |
dev | 86 | drivers/scsi/sg.c | interruptible_sleep_on(&scsi_generics[dev].generic_wait); |
dev | 90 | drivers/scsi/sg.c | scsi_generics[dev].exclude=1; |
dev | 93 | drivers/scsi/sg.c | while(scsi_generics[dev].exclude) |
dev | 97 | drivers/scsi/sg.c | interruptible_sleep_on(&scsi_generics[dev].generic_wait); |
dev | 101 | drivers/scsi/sg.c | if (!scsi_generics[dev].users && scsi_generics[dev].pending && scsi_generics[dev].complete) |
dev | 103 | drivers/scsi/sg.c | scsi_free(scsi_generics[dev].buff,scsi_generics[dev].buff_len); |
dev | 104 | drivers/scsi/sg.c | scsi_generics[dev].pending=0; |
dev | 106 | drivers/scsi/sg.c | if (!scsi_generics[dev].users) |
dev | 107 | drivers/scsi/sg.c | scsi_generics[dev].timeout=SG_DEFAULT_TIMEOUT; |
dev | 108 | drivers/scsi/sg.c | scsi_generics[dev].users++; |
dev | 114 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 115 | drivers/scsi/sg.c | scsi_generics[dev].users--; |
dev | 116 | drivers/scsi/sg.c | scsi_generics[dev].exclude=0; |
dev | 117 | drivers/scsi/sg.c | wake_up(&scsi_generics[dev].generic_wait); |
dev | 155 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 157 | drivers/scsi/sg.c | struct scsi_generic *device=&scsi_generics[dev]; |
dev | 188 | drivers/scsi/sg.c | int dev=SCpnt->request.dev; |
dev | 189 | drivers/scsi/sg.c | struct scsi_generic *device=&scsi_generics[dev]; |
dev | 192 | drivers/scsi/sg.c | printk("unexpected done for sg %d\n",dev); |
dev | 193 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
dev | 203 | drivers/scsi/sg.c | SCpnt->request.dev=-1; |
dev | 204 | drivers/scsi/sg.c | wake_up(&scsi_generics[dev].read_wait); |
dev | 209 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
dev | 213 | drivers/scsi/sg.c | struct scsi_generic *device=&scsi_generics[dev]; |
dev | 262 | drivers/scsi/sg.c | SCpnt->request.dev=dev; |
dev | 208 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
dev | 217 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
dev | 218 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
dev | 242 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
dev | 243 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
dev | 244 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
dev | 290 | drivers/scsi/sr.c | if (CURRENT != NULL && CURRENT->dev == -1) { |
dev | 299 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(CURRENT->dev))].device->index, 0); |
dev | 317 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(req->dev))].device->index); |
dev | 322 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
dev | 343 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
dev | 350 | drivers/scsi/sr.c | if(SCpnt->request.dev <= 0) { |
dev | 355 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
dev | 360 | drivers/scsi/sr.c | if (dev >= NR_SR) |
dev | 368 | drivers/scsi/sr.c | if (!scsi_CDs[dev].use) |
dev | 376 | drivers/scsi/sr.c | if (scsi_CDs[dev].device->changed) |
dev | 429 | drivers/scsi/sr.c | this_count_max = (scsi_CDs[dev].ten ? 0xffff : 0xff) << 4; |
dev | 557 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 2048) |
dev | 564 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 512) realcount = realcount << 2; |
dev | 566 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
dev | 571 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 588 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 611 | drivers/scsi/sr.c | realcount * scsi_CDs[dev].sector_size, |
dev | 632 | drivers/scsi/sr.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 655 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
dev | 663 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
dev | 665 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 668 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 676 | drivers/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 19 | drivers/scsi/sr_ioctl.c | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 27 | drivers/scsi/sr_ioctl.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 52 | drivers/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 55 | drivers/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 87 | drivers/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
dev | 97 | drivers/scsi/sr_ioctl.c | int dev = inode->i_rdev; |
dev | 100 | drivers/scsi/sr_ioctl.c | target = MINOR(dev); |
dev | 381 | drivers/scsi/sr_ioctl.c | RO_IOCTLS(dev,arg); |
dev | 107 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) { |
dev | 115 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 117 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
dev | 131 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
dev | 139 | drivers/scsi/st.c | printk("st%d: Error: %x\n", dev, result); |
dev | 151 | drivers/scsi/st.c | static void write_behind_check(int dev) |
dev | 154 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->last_result < 0) { |
dev | 155 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
dev | 156 | drivers/scsi/st.c | sleep_on( &scsi_tapes[dev].waiting ); |
dev | 157 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
dev | 161 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->writing < scsi_tapes[dev].buffer->buffer_bytes) |
dev | 162 | drivers/scsi/st.c | memcpy(scsi_tapes[dev].buffer->b_data, |
dev | 163 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data + scsi_tapes[dev].buffer->writing, |
dev | 164 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes - |
dev | 165 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing); |
dev | 166 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= scsi_tapes[dev].buffer->writing; |
dev | 167 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing = 0; |
dev | 175 | drivers/scsi/st.c | static int flush_write_buffer(int dev) |
dev | 183 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
dev | 184 | drivers/scsi/st.c | write_behind_check(dev); |
dev | 185 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
dev | 187 | drivers/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 188 | drivers/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
dev | 196 | drivers/scsi/st.c | if (scsi_tapes[dev].dirty==1) { |
dev | 197 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 199 | drivers/scsi/st.c | offset = scsi_tapes[dev].buffer->buffer_bytes; |
dev | 200 | drivers/scsi/st.c | transfer = ((offset + scsi_tapes[dev].block_size - 1) / |
dev | 201 | drivers/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
dev | 203 | drivers/scsi/st.c | printk("st%d: Flushing %d bytes.\n", dev, transfer); |
dev | 205 | drivers/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data + offset, 0, transfer - offset); |
dev | 211 | drivers/scsi/st.c | blks = transfer / scsi_tapes[dev].block_size; |
dev | 215 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 217 | drivers/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, transfer, |
dev | 220 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 223 | drivers/scsi/st.c | printk("st%d: Error on flush:\n", dev); |
dev | 230 | drivers/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 231 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 233 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 244 | drivers/scsi/st.c | int dev; |
dev | 247 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 249 | drivers/scsi/st.c | if (scsi_tapes[dev].rw == 2) /* Writing */ |
dev | 250 | drivers/scsi/st.c | return flush_write_buffer(dev); |
dev | 252 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 255 | drivers/scsi/st.c | backspace = (scsi_tapes[dev].buffer->buffer_bytes + |
dev | 256 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer) / scsi_tapes[dev].block_size - |
dev | 257 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->read_pointer + scsi_tapes[dev].block_size - 1) / |
dev | 258 | drivers/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 259 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 260 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 265 | drivers/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 266 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 277 | drivers/scsi/st.c | int dev; |
dev | 283 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 284 | drivers/scsi/st.c | if (dev >= NR_ST) |
dev | 286 | drivers/scsi/st.c | if (scsi_tapes[dev].in_use) { |
dev | 287 | drivers/scsi/st.c | printk("st%d: Device already in use.\n", dev); |
dev | 296 | drivers/scsi/st.c | printk("st%d: No free buffers.\n", dev); |
dev | 301 | drivers/scsi/st.c | scsi_tapes[dev].buffer = st_buffers[i]; |
dev | 302 | drivers/scsi/st.c | scsi_tapes[dev].in_use = 1; |
dev | 305 | drivers/scsi/st.c | scsi_tapes[dev].write_prot = ((flags & O_ACCMODE) == O_RDONLY); |
dev | 307 | drivers/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 308 | drivers/scsi/st.c | scsi_tapes[dev].rw = 0; |
dev | 309 | drivers/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 310 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 312 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 314 | drivers/scsi/st.c | printk("st%d: Tape request not allocated", dev); |
dev | 321 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 323 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 327 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 337 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 339 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 343 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 352 | drivers/scsi/st.c | printk("st%d: No tape.\n", dev); |
dev | 354 | drivers/scsi/st.c | printk("st%d: Error %x.\n", dev, SCpnt->result); |
dev | 355 | drivers/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 356 | drivers/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 357 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 364 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 366 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 369 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 372 | drivers/scsi/st.c | scsi_tapes[dev].max_block = (scsi_tapes[dev].buffer->b_data[1] << 16) | |
dev | 373 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->b_data[2] << 8) | scsi_tapes[dev].buffer->b_data[3]; |
dev | 374 | drivers/scsi/st.c | scsi_tapes[dev].min_block = (scsi_tapes[dev].buffer->b_data[4] << 8) | |
dev | 375 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[5]; |
dev | 377 | drivers/scsi/st.c | printk("st%d: Block limits %d - %d bytes.\n", dev, scsi_tapes[dev].min_block, |
dev | 378 | drivers/scsi/st.c | scsi_tapes[dev].max_block); |
dev | 382 | drivers/scsi/st.c | scsi_tapes[dev].min_block = scsi_tapes[dev].max_block = (-1); |
dev | 384 | drivers/scsi/st.c | printk("st%d: Can't read block limits.\n", dev); |
dev | 392 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 394 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 397 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 402 | drivers/scsi/st.c | printk("st%d: No Mode Sense.\n", dev); |
dev | 404 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = |
dev | 405 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 0; |
dev | 407 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 410 | drivers/scsi/st.c | printk("st%d: Mode sense. Length %d, medium %x, WBS %x, BLL %d\n", dev, |
dev | 411 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[0], scsi_tapes[dev].buffer->b_data[1], |
dev | 412 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[2], scsi_tapes[dev].buffer->b_data[3]); |
dev | 415 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[3] >= 8) { |
dev | 416 | drivers/scsi/st.c | scsi_tapes[dev].drv_buffer = (scsi_tapes[dev].buffer->b_data[2] >> 4) & 7; |
dev | 417 | drivers/scsi/st.c | scsi_tapes[dev].density = scsi_tapes[dev].buffer->b_data[4]; |
dev | 418 | drivers/scsi/st.c | scsi_tapes[dev].block_size = scsi_tapes[dev].buffer->b_data[9] * 65536 + |
dev | 419 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + scsi_tapes[dev].buffer->b_data[11]; |
dev | 421 | drivers/scsi/st.c | printk("st%d: Density %x, tape length: %x, blocksize: %d, drv buffer: %d\n", dev, |
dev | 422 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[4], scsi_tapes[dev].buffer->b_data[5] * |
dev | 423 | drivers/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[6] * 256 + |
dev | 424 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[7], scsi_tapes[dev].buffer->b_data[9] * |
dev | 425 | drivers/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[10] * 256 + |
dev | 426 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[11], |
dev | 427 | drivers/scsi/st.c | scsi_tapes[dev].drv_buffer); |
dev | 429 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size > ST_BUFFER_SIZE) { |
dev | 430 | drivers/scsi/st.c | printk("st%d: Blocksize %d too large for buffer.\n", dev, |
dev | 431 | drivers/scsi/st.c | scsi_tapes[dev].block_size); |
dev | 432 | drivers/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 433 | drivers/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 439 | drivers/scsi/st.c | scsi_tapes[dev].block_size = ST_BLOCK_SIZE; |
dev | 441 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size > 0) { |
dev | 442 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
dev | 443 | drivers/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
dev | 444 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
dev | 445 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
dev | 448 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = 1; |
dev | 449 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = ST_BUFFER_SIZE; |
dev | 451 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 454 | drivers/scsi/st.c | printk("st%d: Block size: %d, buffer size: %d (%d blocks).\n", dev, |
dev | 455 | drivers/scsi/st.c | scsi_tapes[dev].block_size, scsi_tapes[dev].buffer->buffer_size, |
dev | 456 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks); |
dev | 459 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[2] & 0x80) { |
dev | 460 | drivers/scsi/st.c | scsi_tapes[dev].write_prot = 1; |
dev | 462 | drivers/scsi/st.c | printk( "st%d: Write protected\n", dev); |
dev | 473 | drivers/scsi/st.c | int dev; |
dev | 479 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev); |
dev | 480 | drivers/scsi/st.c | rewind = (dev & 0x80) == 0; |
dev | 481 | drivers/scsi/st.c | dev = dev & 127; |
dev | 483 | drivers/scsi/st.c | if ( scsi_tapes[dev].rw == 2) { |
dev | 485 | drivers/scsi/st.c | result = flush_write_buffer(dev); |
dev | 488 | drivers/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
dev | 492 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 498 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 500 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 503 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 506 | drivers/scsi/st.c | printk("st%d: Error on write filemark.\n", dev); |
dev | 511 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 515 | drivers/scsi/st.c | printk("st%d: Buffer flushed, EOF written\n", dev); |
dev | 519 | drivers/scsi/st.c | if ((scsi_tapes[dev].eof == 1) && !scsi_tapes[dev].eof_hit) |
dev | 529 | drivers/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 530 | drivers/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 539 | drivers/scsi/st.c | int dev; |
dev | 545 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 547 | drivers/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 548 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 553 | drivers/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 556 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0 && count > ST_BUFFER_SIZE) |
dev | 559 | drivers/scsi/st.c | if (scsi_tapes[dev].rw == 1) { |
dev | 563 | drivers/scsi/st.c | scsi_tapes[dev].rw = 2; |
dev | 567 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
dev | 568 | drivers/scsi/st.c | write_behind_check(dev); |
dev | 569 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
dev | 571 | drivers/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 572 | drivers/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
dev | 583 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 589 | drivers/scsi/st.c | cmd[1] = (scsi_tapes[dev].block_size != 0); |
dev | 591 | drivers/scsi/st.c | scsi_tapes[dev].rw = 2; |
dev | 596 | drivers/scsi/st.c | scsi_tapes[dev].block_size != 0 && |
dev | 597 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->buffer_bytes + count) > |
dev | 598 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size) |
dev | 600 | drivers/scsi/st.c | (scsi_tapes[dev].block_size == 0 && count > 0) || |
dev | 601 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->buffer_bytes + count) >= |
dev | 602 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size) |
dev | 605 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 608 | drivers/scsi/st.c | do_count = scsi_tapes[dev].buffer->buffer_size - |
dev | 609 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes; |
dev | 610 | drivers/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
dev | 611 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes, b_point, do_count); |
dev | 613 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 616 | drivers/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
dev | 621 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 623 | drivers/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 624 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
dev | 627 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 631 | drivers/scsi/st.c | printk("st%d: Error on write:\n", dev); |
dev | 639 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 648 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 649 | drivers/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 652 | drivers/scsi/st.c | scsi_tapes[dev].dirty = 1; |
dev | 653 | drivers/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
dev | 654 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes,b_point,count); |
dev | 656 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes += count; |
dev | 662 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 667 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes >= ST_WRITE_THRESHOLD || |
dev | 668 | drivers/scsi/st.c | scsi_tapes[dev].block_size == 0) { |
dev | 670 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 671 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing = scsi_tapes[dev].buffer->buffer_bytes; |
dev | 673 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing = (scsi_tapes[dev].buffer->buffer_bytes / |
dev | 674 | drivers/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
dev | 675 | drivers/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 677 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 678 | drivers/scsi/st.c | blks = scsi_tapes[dev].buffer->writing; |
dev | 680 | drivers/scsi/st.c | blks = scsi_tapes[dev].buffer->writing / scsi_tapes[dev].block_size; |
dev | 684 | drivers/scsi/st.c | SCpnt->result = scsi_tapes[dev].buffer->last_result = -1; |
dev | 686 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 688 | drivers/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 689 | drivers/scsi/st.c | scsi_tapes[dev].buffer->writing, |
dev | 694 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 703 | drivers/scsi/st.c | int dev; |
dev | 709 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 711 | drivers/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 712 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 717 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0 && count > ST_BUFFER_SIZE) |
dev | 720 | drivers/scsi/st.c | if (scsi_tapes[dev].rw == 2) { |
dev | 724 | drivers/scsi/st.c | scsi_tapes[dev].rw = 1; |
dev | 728 | drivers/scsi/st.c | if (scsi_tapes[dev].eof) |
dev | 729 | drivers/scsi/st.c | printk("st%d: EOF flag up. Bytes %d\n", dev, |
dev | 730 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes); |
dev | 732 | drivers/scsi/st.c | if ((scsi_tapes[dev].buffer->buffer_bytes == 0) && |
dev | 733 | drivers/scsi/st.c | scsi_tapes[dev].eof == 2) /* EOM or Blank Check */ |
dev | 736 | drivers/scsi/st.c | scsi_tapes[dev].rw = 1; |
dev | 738 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 742 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes == 0 && |
dev | 743 | drivers/scsi/st.c | scsi_tapes[dev].eof == 0) { |
dev | 747 | drivers/scsi/st.c | cmd[1] = (scsi_tapes[dev].block_size != 0); |
dev | 748 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 751 | drivers/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
dev | 752 | drivers/scsi/st.c | bytes = blks * scsi_tapes[dev].block_size; |
dev | 759 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 761 | drivers/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 762 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
dev | 765 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 767 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 768 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 772 | drivers/scsi/st.c | printk("st%d: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n", dev, |
dev | 786 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) { |
dev | 789 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = count - transfer; |
dev | 792 | drivers/scsi/st.c | printk("st%d: Incorrect block size.\n", dev); |
dev | 793 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 798 | drivers/scsi/st.c | scsi_tapes[dev].eof = 2; /* What should be done at EOM ? */ |
dev | 799 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 800 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
dev | 801 | drivers/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 803 | drivers/scsi/st.c | printk("st%d: EOM detected (%d blocks read).\n", dev, |
dev | 804 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks - transfer); |
dev | 808 | drivers/scsi/st.c | scsi_tapes[dev].eof = 1; |
dev | 809 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 810 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 813 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 814 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
dev | 815 | drivers/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 818 | drivers/scsi/st.c | dev, scsi_tapes[dev].buffer->buffer_blocks - transfer, total); |
dev | 824 | drivers/scsi/st.c | printk("st%d: Tape error. Sense key %x\n", dev, |
dev | 828 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 837 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 842 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = bytes; |
dev | 847 | drivers/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes > 0) { |
dev | 849 | drivers/scsi/st.c | if (scsi_tapes[dev].eof) |
dev | 850 | drivers/scsi/st.c | printk("st%d: EOF up. Left %d, needed %d.\n", dev, |
dev | 851 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes, count - total); |
dev | 853 | drivers/scsi/st.c | transfer = scsi_tapes[dev].buffer->buffer_bytes < count - total ? |
dev | 854 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes : count - total; |
dev | 855 | drivers/scsi/st.c | memcpy_tofs(buf, scsi_tapes[dev].buffer->b_data + |
dev | 856 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer,transfer); |
dev | 860 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= transfer; |
dev | 861 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer += transfer; |
dev | 863 | drivers/scsi/st.c | else if (scsi_tapes[dev].eof) { |
dev | 864 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 1; |
dev | 865 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 866 | drivers/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 1) |
dev | 867 | drivers/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 868 | drivers/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 2) |
dev | 873 | drivers/scsi/st.c | if (scsi_tapes[dev].block_size == 0) |
dev | 878 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 888 | drivers/scsi/st.c | int dev = MINOR(inode->i_rdev); |
dev | 895 | drivers/scsi/st.c | dev = dev & 127; |
dev | 907 | drivers/scsi/st.c | printk("st%d: Spacing tape forward %d files.\n", dev, |
dev | 923 | drivers/scsi/st.c | printk("st%d: Spacing tape backward %d files.\n", dev, (-ltmp)); |
dev | 933 | drivers/scsi/st.c | printk("st%d: Spacing tape forward %d blocks.\n", dev, |
dev | 948 | drivers/scsi/st.c | printk("st%d: Spacing tape backward %d blocks.\n", dev, (-ltmp)); |
dev | 952 | drivers/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 960 | drivers/scsi/st.c | printk("st%d: Writing %d filemarks.\n", dev, |
dev | 971 | drivers/scsi/st.c | printk("st%d: Rewinding tape.\n", dev); |
dev | 981 | drivers/scsi/st.c | printk("st%d: Unloading tape.\n", dev); |
dev | 986 | drivers/scsi/st.c | printk("st%d: No op on tape.\n", dev); |
dev | 998 | drivers/scsi/st.c | printk("st%d: Retensioning tape.\n", dev); |
dev | 1005 | drivers/scsi/st.c | printk("st%d: Spacing to end of recorded medium.\n", dev); |
dev | 1009 | drivers/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 1014 | drivers/scsi/st.c | printk("st%d: Erasing tape.\n", dev); |
dev | 1018 | drivers/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
dev | 1038 | drivers/scsi/st.c | printk("st%d: Seeking tape to block %d.\n", dev, arg); |
dev | 1044 | drivers/scsi/st.c | if (scsi_tapes[dev].dirty || scsi_tapes[dev].buffer->buffer_bytes != 0) |
dev | 1048 | drivers/scsi/st.c | (arg < scsi_tapes[dev].min_block || arg > scsi_tapes[dev].max_block || |
dev | 1050 | drivers/scsi/st.c | printk("st%d: Illegal block size.\n", dev); |
dev | 1056 | drivers/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data, 0, 12); |
dev | 1058 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = (arg & 7) << 4; |
dev | 1060 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = |
dev | 1061 | drivers/scsi/st.c | scsi_tapes[dev].drv_buffer << 4; |
dev | 1062 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 8; /* block descriptor length */ |
dev | 1064 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[4] = arg; |
dev | 1066 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[4] = scsi_tapes[dev].density; |
dev | 1070 | drivers/scsi/st.c | ltmp = scsi_tapes[dev].block_size; |
dev | 1071 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] = (ltmp >> 16); |
dev | 1072 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] = (ltmp >> 8); |
dev | 1073 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[11] = ltmp; |
dev | 1077 | drivers/scsi/st.c | printk("st%d: Setting block size to %d bytes.\n", dev, |
dev | 1078 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] * 65536 + |
dev | 1079 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + |
dev | 1080 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[11]); |
dev | 1082 | drivers/scsi/st.c | printk("st%d: Setting density code to %x.\n", dev, |
dev | 1083 | drivers/scsi/st.c | scsi_tapes[dev].buffer->b_data[4]); |
dev | 1086 | drivers/scsi/st.c | (scsi_tapes[dev].buffer->b_data[2] >> 4) & 7); |
dev | 1090 | drivers/scsi/st.c | printk("st%d: Unknown st_ioctl command %x.\n", dev, cmd_in); |
dev | 1094 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 1096 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1098 | drivers/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, ST_BLOCK_SIZE, |
dev | 1101 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 1105 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1113 | drivers/scsi/st.c | scsi_tapes[dev].block_size = arg; |
dev | 1115 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
dev | 1116 | drivers/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
dev | 1117 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
dev | 1118 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
dev | 1121 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = 1; |
dev | 1122 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = ST_BUFFER_SIZE; |
dev | 1124 | drivers/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 1125 | drivers/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 1128 | drivers/scsi/st.c | scsi_tapes[dev].drv_buffer = arg; |
dev | 1130 | drivers/scsi/st.c | scsi_tapes[dev].density = arg; |
dev | 1132 | drivers/scsi/st.c | scsi_tapes[dev].eof = 2; |
dev | 1133 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 1136 | drivers/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 1137 | drivers/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 1150 | drivers/scsi/st.c | int dev = MINOR(inode->i_rdev); |
dev | 1157 | drivers/scsi/st.c | dev = dev & 127; |
dev | 1159 | drivers/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 1160 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 1193 | drivers/scsi/st.c | memcpy_tofs((char *)arg, (char *)scsi_tapes[dev].buffer->mt_status, |
dev | 1199 | drivers/scsi/st.c | printk("st%d: get tape position.\n", dev); |
dev | 1212 | drivers/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 1216 | drivers/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
dev | 1224 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1227 | drivers/scsi/st.c | (void *) scmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 1230 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 1235 | drivers/scsi/st.c | printk("st%d: Can't read tape position.\n", dev); |
dev | 1241 | drivers/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) |
dev | 1242 | drivers/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[0] << 16) |
dev | 1243 | drivers/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[1] << 8) |
dev | 1244 | drivers/scsi/st.c | + scsi_tapes[dev].buffer->b_data[2]; |
dev | 1246 | drivers/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[4] << 24) |
dev | 1247 | drivers/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[5] << 16) |
dev | 1248 | drivers/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[6] << 8) |
dev | 1249 | drivers/scsi/st.c | + scsi_tapes[dev].buffer->b_data[7]; |
dev | 1253 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1259 | drivers/scsi/st.c | return scsi_ioctl(scsi_tapes[dev].device, cmd_in, (void *) arg); |
dev | 295 | drivers/scsi/t128.c | int t128_biosparam(int size, int dev, int * ip) |
dev | 987 | drivers/scsi/ultrastor.c | int ultrastor_biosparam(int size, int dev, int * dkinfo) |
dev | 609 | drivers/scsi/wd7000.c | int wd7000_biosparam(int size, int dev, int* ip) |
dev | 52 | drivers/sound/audio.c | audio_open (int dev, struct fileinfo *file) |
dev | 56 | drivers/sound/audio.c | int dev_type = dev & 0x0f; |
dev | 59 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 66 | drivers/sound/audio.c | if ((ret = DMAbuf_open (dev, mode)) < 0) |
dev | 69 | drivers/sound/audio.c | if (DMAbuf_ioctl (dev, SNDCTL_DSP_SAMPLESIZE, bits, 1) != bits) |
dev | 71 | drivers/sound/audio.c | audio_release (dev, file); |
dev | 75 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 76 | drivers/sound/audio.c | audio_mode[dev] = AM_NONE; |
dev | 82 | drivers/sound/audio.c | audio_release (int dev, struct fileinfo *file) |
dev | 86 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 89 | drivers/sound/audio.c | if (wr_buff_no[dev] >= 0) |
dev | 91 | drivers/sound/audio.c | DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev]); |
dev | 93 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 96 | drivers/sound/audio.c | DMAbuf_release (dev, mode); |
dev | 125 | drivers/sound/audio.c | audio_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 129 | drivers/sound/audio.c | int dev_type = dev & 0x0f; |
dev | 131 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 136 | drivers/sound/audio.c | if (audio_mode[dev] == AM_READ) /* Direction changed */ |
dev | 138 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 141 | drivers/sound/audio.c | audio_mode[dev] = AM_WRITE; |
dev | 145 | drivers/sound/audio.c | if (wr_buff_no[dev] >= 0) |
dev | 147 | drivers/sound/audio.c | DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev]); |
dev | 149 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 156 | drivers/sound/audio.c | if (wr_buff_no[dev] < 0) /* There is no incomplete buffers */ |
dev | 158 | drivers/sound/audio.c | if ((wr_buff_no[dev] = DMAbuf_getwrbuffer (dev, &wr_dma_buf[dev], &wr_buff_size[dev])) < 0) |
dev | 159 | drivers/sound/audio.c | return wr_buff_no[dev]; |
dev | 160 | drivers/sound/audio.c | wr_buff_ptr[dev] = 0; |
dev | 164 | drivers/sound/audio.c | if (l > (wr_buff_size[dev] - wr_buff_ptr[dev])) |
dev | 165 | drivers/sound/audio.c | l = (wr_buff_size[dev] - wr_buff_ptr[dev]); |
dev | 167 | drivers/sound/audio.c | if (!dsp_devs[dev]->copy_from_user) |
dev | 169 | drivers/sound/audio.c | COPY_FROM_USER (&wr_dma_buf[dev][wr_buff_ptr[dev]], buf, p, l); |
dev | 172 | drivers/sound/audio.c | dsp_devs[dev]->copy_from_user (dev, |
dev | 173 | drivers/sound/audio.c | wr_dma_buf[dev], wr_buff_ptr[dev], buf, p, l); |
dev | 184 | drivers/sound/audio.c | translate_bytes (ulaw_dsp, &wr_dma_buf[dev][wr_buff_ptr[dev]], l); |
dev | 189 | drivers/sound/audio.c | wr_buff_ptr[dev] += l; |
dev | 191 | drivers/sound/audio.c | if (wr_buff_ptr[dev] >= wr_buff_size[dev]) |
dev | 193 | drivers/sound/audio.c | if ((err = DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev])) < 0) |
dev | 196 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 205 | drivers/sound/audio.c | audio_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 210 | drivers/sound/audio.c | int dev_type = dev & 0x0f; |
dev | 212 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 216 | drivers/sound/audio.c | if (audio_mode[dev] == AM_WRITE) |
dev | 218 | drivers/sound/audio.c | if (wr_buff_no[dev] >= 0) |
dev | 220 | drivers/sound/audio.c | DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev]); |
dev | 222 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 226 | drivers/sound/audio.c | audio_mode[dev] = AM_READ; |
dev | 230 | drivers/sound/audio.c | if ((buff_no = DMAbuf_getrdbuffer (dev, &dmabuf, &l)) < 0) |
dev | 250 | drivers/sound/audio.c | DMAbuf_rmchars (dev, buff_no, l); |
dev | 260 | drivers/sound/audio.c | audio_ioctl (int dev, struct fileinfo *file, |
dev | 263 | drivers/sound/audio.c | int dev_type = dev & 0x0f; |
dev | 264 | drivers/sound/audio.c | dev = dev >> 4; |
dev | 269 | drivers/sound/audio.c | if (wr_buff_no[dev] >= 0) |
dev | 271 | drivers/sound/audio.c | DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev]); |
dev | 273 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 275 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 279 | drivers/sound/audio.c | if (wr_buff_no[dev] >= 0) |
dev | 281 | drivers/sound/audio.c | DMAbuf_start_output (dev, wr_buff_no[dev], wr_buff_ptr[dev]); |
dev | 283 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 289 | drivers/sound/audio.c | wr_buff_no[dev] = -1; |
dev | 290 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 297 | drivers/sound/audio.c | return DMAbuf_ioctl (dev, cmd, arg, 0); |
dev | 311 | drivers/sound/audio.c | audio_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 317 | drivers/sound/audio.c | audio_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 323 | drivers/sound/audio.c | audio_open (int dev, struct fileinfo *file) |
dev | 329 | drivers/sound/audio.c | audio_release (int dev, struct fileinfo *file) |
dev | 333 | drivers/sound/audio.c | audio_ioctl (int dev, struct fileinfo *file, |
dev | 340 | drivers/sound/audio.c | audio_lseek (int dev, struct fileinfo *file, off_t offset, int orig) |
dev | 61 | drivers/sound/dev_table.h | int (*open) (int dev, int mode); |
dev | 62 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 63 | drivers/sound/dev_table.h | void (*output_block) (int dev, unsigned long buf, |
dev | 65 | drivers/sound/dev_table.h | void (*start_input) (int dev, unsigned long buf, |
dev | 67 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, unsigned int arg, int local); |
dev | 68 | drivers/sound/dev_table.h | int (*prepare_for_input) (int dev, int bufsize, int nbufs); |
dev | 69 | drivers/sound/dev_table.h | int (*prepare_for_output) (int dev, int bufsize, int nbufs); |
dev | 70 | drivers/sound/dev_table.h | void (*reset) (int dev); |
dev | 71 | drivers/sound/dev_table.h | void (*halt_xfer) (int dev); |
dev | 72 | drivers/sound/dev_table.h | int (*has_output_drained)(int dev); |
dev | 73 | drivers/sound/dev_table.h | void (*copy_from_user)(int dev, char *localbuf, int localoffs, |
dev | 78 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, unsigned int arg); |
dev | 86 | drivers/sound/dev_table.h | int (*open) (int dev, int mode); |
dev | 87 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 88 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, unsigned int arg); |
dev | 89 | drivers/sound/dev_table.h | int (*kill_note) (int dev, int voice, int velocity); |
dev | 90 | drivers/sound/dev_table.h | int (*start_note) (int dev, int voice, int note, int velocity); |
dev | 91 | drivers/sound/dev_table.h | int (*set_instr) (int dev, int voice, int instr); |
dev | 92 | drivers/sound/dev_table.h | void (*reset) (int dev); |
dev | 93 | drivers/sound/dev_table.h | void (*hw_control) (int dev, unsigned char *event); |
dev | 94 | drivers/sound/dev_table.h | int (*load_patch) (int dev, int format, snd_rw_buf *addr, |
dev | 96 | drivers/sound/dev_table.h | void (*aftertouch) (int dev, int voice, int pressure); |
dev | 97 | drivers/sound/dev_table.h | void (*controller) (int dev, int voice, int ctrl_num, int value); |
dev | 98 | drivers/sound/dev_table.h | void (*panning) (int dev, int voice, int value); |
dev | 99 | drivers/sound/dev_table.h | int (*pmgr_interface) (int dev, struct patmgr_info *info); |
dev | 104 | drivers/sound/dev_table.h | int (*open) (int dev, int mode, |
dev | 105 | drivers/sound/dev_table.h | void (*inputintr)(int dev, unsigned char data), |
dev | 106 | drivers/sound/dev_table.h | void (*outputintr)(int dev) |
dev | 108 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 109 | drivers/sound/dev_table.h | int (*ioctl) (int dev, unsigned int cmd, unsigned int arg); |
dev | 110 | drivers/sound/dev_table.h | int (*putc) (int dev, unsigned char data); |
dev | 111 | drivers/sound/dev_table.h | int (*start_read) (int dev); |
dev | 112 | drivers/sound/dev_table.h | int (*end_read) (int dev); |
dev | 113 | drivers/sound/dev_table.h | void (*kick)(int dev); |
dev | 114 | drivers/sound/dev_table.h | int (*command) (int dev, unsigned char data); |
dev | 115 | drivers/sound/dev_table.h | int (*buffer_status) (int dev); |
dev | 122 | drivers/sound/dev_table.h | int (*open) (int dev, int mode); |
dev | 123 | drivers/sound/dev_table.h | void (*close) (int dev); |
dev | 124 | drivers/sound/dev_table.h | int (*write) (int dev, snd_rw_buf *data); |
dev | 125 | drivers/sound/dev_table.h | int (*read) (int dev, snd_rw_buf *data); |
dev | 100 | drivers/sound/dmabuf.c | reorganize_buffers (int dev) |
dev | 109 | drivers/sound/dmabuf.c | sr = dsp_devs[dev]->ioctl (dev, SOUND_PCM_READ_RATE, 0, 1); |
dev | 110 | drivers/sound/dmabuf.c | nc = dsp_devs[dev]->ioctl (dev, SOUND_PCM_READ_CHANNELS, 0, 1); |
dev | 111 | drivers/sound/dmabuf.c | sz = dsp_devs[dev]->ioctl (dev, SOUND_PCM_READ_BITS, 0, 1); |
dev | 116 | drivers/sound/dmabuf.c | dev, sr, nc, sz); |
dev | 130 | drivers/sound/dmabuf.c | bsz = sound_buffsizes[dev]; |
dev | 135 | drivers/sound/dmabuf.c | if (sound_buffcounts[dev] == 1 && bsz == sound_buffsizes[dev]) |
dev | 138 | drivers/sound/dmabuf.c | if (dev_subdivision[dev] == 0) |
dev | 139 | drivers/sound/dmabuf.c | dev_subdivision[dev] = 1; /* Default value */ |
dev | 141 | drivers/sound/dmabuf.c | bsz /= dev_subdivision[dev]; /* Use smaller buffers */ |
dev | 145 | drivers/sound/dmabuf.c | while ((sound_buffsizes[dev]*sound_buffcounts[dev])/bsz > MAX_SUB_BUFFERS) |
dev | 148 | drivers/sound/dmabuf.c | dev_buffsize[dev] = bsz; |
dev | 155 | drivers/sound/dmabuf.c | for (i = 0; i < snd_raw_count[dev]; i++) |
dev | 159 | drivers/sound/dmabuf.c | while ((p + bsz) <= sound_buffsizes[dev]) |
dev | 161 | drivers/sound/dmabuf.c | dev_buf[dev][n] = snd_raw_buf[dev][i] + p; |
dev | 162 | drivers/sound/dmabuf.c | dev_buf_phys[dev][n] = snd_raw_buf_phys[dev][i] + p; |
dev | 168 | drivers/sound/dmabuf.c | dev_nbufs[dev] = n; |
dev | 170 | drivers/sound/dmabuf.c | for (i = 0; i < dev_nbufs[dev]; i++) |
dev | 172 | drivers/sound/dmabuf.c | dev_counts[dev][i] = 0; |
dev | 175 | drivers/sound/dmabuf.c | bufferalloc_done[dev] = 1; |
dev | 179 | drivers/sound/dmabuf.c | dma_init_buffers(int dev) |
dev | 181 | drivers/sound/dmabuf.c | RESET_WAIT_QUEUE (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 182 | drivers/sound/dmabuf.c | dev_underrun[dev] = 0; |
dev | 184 | drivers/sound/dmabuf.c | dev_busy[dev] = 1; |
dev | 186 | drivers/sound/dmabuf.c | bufferalloc_done[dev] = 0; |
dev | 188 | drivers/sound/dmabuf.c | dev_active[dev] = dev_qlen[dev] = dev_qtail[dev] = dev_qhead[dev] = 0; |
dev | 189 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = dev_started[dev] = 0; |
dev | 190 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 194 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 198 | drivers/sound/dmabuf.c | if (dev >= num_dspdevs) |
dev | 200 | drivers/sound/dmabuf.c | printk ("PCM device %d not installed.\n", dev); |
dev | 204 | drivers/sound/dmabuf.c | if (dev_busy[dev]) |
dev | 207 | drivers/sound/dmabuf.c | if (!dsp_devs[dev]) |
dev | 209 | drivers/sound/dmabuf.c | printk ("DSP device %d not initialized\n", dev); |
dev | 213 | drivers/sound/dmabuf.c | if (snd_raw_buf[dev][0] == NULL) |
dev | 216 | drivers/sound/dmabuf.c | if ((retval = dsp_devs[dev]->open (dev, mode)) < 0) |
dev | 219 | drivers/sound/dmabuf.c | dev_modes[dev] = mode; |
dev | 220 | drivers/sound/dmabuf.c | dev_subdivision[dev] = 0; |
dev | 222 | drivers/sound/dmabuf.c | dma_init_buffers(dev); |
dev | 223 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_BITS, 8, 1); |
dev | 224 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_CHANNELS, 1, 1); |
dev | 225 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_RATE, DSP_DEFAULT_SPEED, 1); |
dev | 231 | drivers/sound/dmabuf.c | dma_reset (int dev) |
dev | 237 | drivers/sound/dmabuf.c | dsp_devs[dev]->reset (dev); |
dev | 238 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 240 | drivers/sound/dmabuf.c | if ((retval = dsp_devs[dev]->open (dev, dev_modes[dev])) < 0) |
dev | 244 | drivers/sound/dmabuf.c | dma_init_buffers(dev); |
dev | 245 | drivers/sound/dmabuf.c | reorganize_buffers(dev); |
dev | 249 | drivers/sound/dmabuf.c | dma_sync (int dev) |
dev | 255 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_OUTPUT) |
dev | 262 | drivers/sound/dmabuf.c | while ((!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 263 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) && !timed_out) |
dev | 264 | drivers/sound/dmabuf.c | && dev_qlen[dev]) |
dev | 266 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 10 * HZ); |
dev | 278 | drivers/sound/dmabuf.c | if (dsp_devs[dev]->has_output_drained) /* Device has hidden buffers */ |
dev | 280 | drivers/sound/dmabuf.c | while (!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 281 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) |
dev | 282 | drivers/sound/dmabuf.c | && !dsp_devs[dev]->has_output_drained (dev)) |
dev | 284 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], HZ / 4); |
dev | 289 | drivers/sound/dmabuf.c | return dev_qlen[dev]; |
dev | 293 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 296 | drivers/sound/dmabuf.c | if (!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 297 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) |
dev | 298 | drivers/sound/dmabuf.c | && (dma_mode[dev] == DMODE_OUTPUT)) |
dev | 300 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 303 | drivers/sound/dmabuf.c | dsp_devs[dev]->reset (dev); |
dev | 305 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 307 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 308 | drivers/sound/dmabuf.c | dev_busy[dev] = 0; |
dev | 314 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len) |
dev | 319 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_OUTPUT) /* Was output -> direction change */ |
dev | 321 | drivers/sound/dmabuf.c | dma_sync(dev); |
dev | 322 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 323 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 326 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 327 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 329 | drivers/sound/dmabuf.c | if (!dma_mode[dev]) |
dev | 333 | drivers/sound/dmabuf.c | if ((err = dsp_devs[dev]->prepare_for_input (dev, |
dev | 334 | drivers/sound/dmabuf.c | dev_buffsize[dev], dev_nbufs[dev])) < 0) |
dev | 336 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_INPUT; |
dev | 340 | drivers/sound/dmabuf.c | if (!dev_qlen[dev]) |
dev | 342 | drivers/sound/dmabuf.c | if (dev_needs_restart[dev]) |
dev | 344 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 347 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 349 | drivers/sound/dmabuf.c | dsp_devs[dev]->start_input (dev, dev_buf_phys[dev][dev_qtail[dev]], |
dev | 350 | drivers/sound/dmabuf.c | dev_buffsize[dev], 0, |
dev | 351 | drivers/sound/dmabuf.c | !sound_dma_automode[dev] || |
dev | 352 | drivers/sound/dmabuf.c | !dev_started[dev]); |
dev | 353 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 354 | drivers/sound/dmabuf.c | dev_started[dev] = 1; |
dev | 358 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 2 * HZ); |
dev | 359 | drivers/sound/dmabuf.c | if (TIMED_OUT (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 363 | drivers/sound/dmabuf.c | SET_ABORT_FLAG (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 370 | drivers/sound/dmabuf.c | if (!dev_qlen[dev]) |
dev | 373 | drivers/sound/dmabuf.c | *buf = &dev_buf[dev][dev_qhead[dev]][dev_counts[dev][dev_qhead[dev]]]; |
dev | 374 | drivers/sound/dmabuf.c | *len = dev_buffsize[dev] - dev_counts[dev][dev_qhead[dev]]; |
dev | 376 | drivers/sound/dmabuf.c | return dev_qhead[dev]; |
dev | 380 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 382 | drivers/sound/dmabuf.c | int p = dev_counts[dev][dev_qhead[dev]] + c; |
dev | 384 | drivers/sound/dmabuf.c | if (p >= dev_buffsize[dev]) |
dev | 386 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]] = 0; |
dev | 387 | drivers/sound/dmabuf.c | dev_qlen[dev]--; |
dev | 388 | drivers/sound/dmabuf.c | dev_qhead[dev] = (dev_qhead[dev] + 1) % dev_nbufs[dev]; |
dev | 391 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]] = p; |
dev | 397 | drivers/sound/dmabuf.c | DMAbuf_read (int dev, snd_rw_buf * user_buf, int count) |
dev | 407 | drivers/sound/dmabuf.c | if ((buff_no = DMAbuf_getrdbuffer (dev, &dmabuf, &c)) < 0) |
dev | 415 | drivers/sound/dmabuf.c | if ((err = DMAbuf_rmchars (dev, buff_no, c)) < 0) |
dev | 422 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 427 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 432 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 433 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 438 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 439 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 441 | drivers/sound/dmabuf.c | return IOCTL_OUT (arg, dev_buffsize[dev]); |
dev | 450 | drivers/sound/dmabuf.c | fact = dev_subdivision[dev]; |
dev | 455 | drivers/sound/dmabuf.c | if (dev_subdivision[dev] != 0) /* Too late to change */ |
dev | 463 | drivers/sound/dmabuf.c | dev_subdivision[dev] = fact; |
dev | 469 | drivers/sound/dmabuf.c | return dsp_devs[dev]->ioctl (dev, cmd, arg, local); |
dev | 476 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size) |
dev | 481 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_INPUT) /* Was input -> Direction change */ |
dev | 483 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 484 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 487 | drivers/sound/dmabuf.c | if (dev_needs_restart[dev]) /* Restart buffering */ |
dev | 489 | drivers/sound/dmabuf.c | dma_sync(dev); |
dev | 490 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 493 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 0; |
dev | 495 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 496 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 498 | drivers/sound/dmabuf.c | if (!dma_mode[dev]) |
dev | 502 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_OUTPUT; |
dev | 503 | drivers/sound/dmabuf.c | if ((err = dsp_devs[dev]->prepare_for_output (dev, |
dev | 504 | drivers/sound/dmabuf.c | dev_buffsize[dev], dev_nbufs[dev])) < 0) |
dev | 511 | drivers/sound/dmabuf.c | RESET_WAIT_QUEUE (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 513 | drivers/sound/dmabuf.c | if (dev_qlen[dev] == dev_nbufs[dev]) |
dev | 515 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 518 | drivers/sound/dmabuf.c | dev_qlen[dev], dev_nbufs[dev]); |
dev | 523 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 2 * HZ); |
dev | 524 | drivers/sound/dmabuf.c | if (TIMED_OUT (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 528 | drivers/sound/dmabuf.c | SET_ABORT_FLAG (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 530 | drivers/sound/dmabuf.c | else if (PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 535 | drivers/sound/dmabuf.c | if (dev_qlen[dev] == dev_nbufs[dev]) |
dev | 538 | drivers/sound/dmabuf.c | *buf = dev_buf[dev][dev_qtail[dev]]; |
dev | 539 | drivers/sound/dmabuf.c | *size = dev_buffsize[dev]; |
dev | 540 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qtail[dev]] = 0; |
dev | 542 | drivers/sound/dmabuf.c | return dev_qtail[dev]; |
dev | 546 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 548 | drivers/sound/dmabuf.c | if (buff_no != dev_qtail[dev]) |
dev | 549 | drivers/sound/dmabuf.c | printk ("Soundcard warning: DMA buffers out of sync %d != %d\n", buff_no, dev_qtail[dev]); |
dev | 551 | drivers/sound/dmabuf.c | dev_qlen[dev]++; |
dev | 553 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qtail[dev]] = l; |
dev | 555 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = (l != dev_buffsize[dev]); |
dev | 557 | drivers/sound/dmabuf.c | dev_qtail[dev] = (dev_qtail[dev] + 1) % dev_nbufs[dev]; |
dev | 559 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 561 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 562 | drivers/sound/dmabuf.c | dsp_devs[dev]->output_block (dev, dev_buf_phys[dev][dev_qhead[dev]], |
dev | 563 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]], 0, |
dev | 564 | drivers/sound/dmabuf.c | !sound_dma_automode[dev] || !dev_started[dev]); |
dev | 565 | drivers/sound/dmabuf.c | dev_started[dev] = 1; |
dev | 572 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 574 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 586 | drivers/sound/dmabuf.c | if (sound_dma_automode[dev]) |
dev | 594 | drivers/sound/dmabuf.c | set_dma_addr (chan, snd_raw_buf_phys[dev][0]); |
dev | 595 | drivers/sound/dmabuf.c | set_dma_count (chan, sound_buffsizes[dev]); |
dev | 601 | drivers/sound/dmabuf.c | printk ("sound: Invalid DMA mode for device %d\n", dev); |
dev | 604 | drivers/sound/dmabuf.c | snd_raw_buf_phys[dev][0], |
dev | 605 | drivers/sound/dmabuf.c | sound_buffsizes[dev], |
dev | 609 | drivers/sound/dmabuf.c | printk ("sound: Invalid DMA mode for device %d\n", dev); |
dev | 615 | drivers/sound/dmabuf.c | snd_raw_buf_phys[dev][0], count); |
dev | 682 | drivers/sound/dmabuf.c | DMAbuf_outputintr (int dev, int underrun_flag) |
dev | 686 | drivers/sound/dmabuf.c | dev_qlen[dev]--; |
dev | 687 | drivers/sound/dmabuf.c | dev_qhead[dev] = (dev_qhead[dev] + 1) % dev_nbufs[dev]; |
dev | 688 | drivers/sound/dmabuf.c | dev_active[dev] = 0; |
dev | 690 | drivers/sound/dmabuf.c | if (dev_qlen[dev]) |
dev | 692 | drivers/sound/dmabuf.c | dsp_devs[dev]->output_block (dev, dev_buf_phys[dev][dev_qhead[dev]], |
dev | 693 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]], 1, |
dev | 694 | drivers/sound/dmabuf.c | !sound_dma_automode[dev]); |
dev | 695 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 700 | drivers/sound/dmabuf.c | dev_underrun[dev]++; |
dev | 701 | drivers/sound/dmabuf.c | dsp_devs[dev]->halt_xfer (dev); |
dev | 702 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 1; |
dev | 706 | drivers/sound/dmabuf.c | if (SOMEONE_WAITING (dev_sleep_flag[dev])) |
dev | 708 | drivers/sound/dmabuf.c | WAKE_UP (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 714 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 718 | drivers/sound/dmabuf.c | if (!dev_busy[dev]) |
dev | 720 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 722 | drivers/sound/dmabuf.c | else if (dev_qlen[dev] == (dev_nbufs[dev] - 1)) |
dev | 724 | drivers/sound/dmabuf.c | dev_underrun[dev]++; |
dev | 725 | drivers/sound/dmabuf.c | dsp_devs[dev]->halt_xfer (dev); |
dev | 726 | drivers/sound/dmabuf.c | dev_active[dev] = 0; |
dev | 727 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 1; |
dev | 731 | drivers/sound/dmabuf.c | dev_qlen[dev]++; |
dev | 732 | drivers/sound/dmabuf.c | dev_qtail[dev] = (dev_qtail[dev] + 1) % dev_nbufs[dev]; |
dev | 734 | drivers/sound/dmabuf.c | dsp_devs[dev]->start_input (dev, dev_buf_phys[dev][dev_qtail[dev]], |
dev | 735 | drivers/sound/dmabuf.c | dev_buffsize[dev], 1, |
dev | 736 | drivers/sound/dmabuf.c | !sound_dma_automode[dev]); |
dev | 737 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 741 | drivers/sound/dmabuf.c | if (SOMEONE_WAITING (dev_sleep_flag[dev])) |
dev | 743 | drivers/sound/dmabuf.c | WAKE_UP (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 749 | drivers/sound/dmabuf.c | DMAbuf_open_dma (int dev) |
dev | 752 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 771 | drivers/sound/dmabuf.c | DMAbuf_close_dma (int dev) |
dev | 773 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 796 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 802 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 808 | drivers/sound/dmabuf.c | DMAbuf_read (int dev, snd_rw_buf * user_buf, int count) |
dev | 814 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size) |
dev | 820 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len) |
dev | 826 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 832 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 838 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 850 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 874 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 880 | drivers/sound/dmabuf.c | DMAbuf_outputintr (int dev, int underrun_flag) |
dev | 43 | drivers/sound/gus_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 53 | drivers/sound/gus_midi.c | gus_midi_open (int dev, int mode, |
dev | 54 | drivers/sound/gus_midi.c | void (*input) (int dev, unsigned char data), |
dev | 55 | drivers/sound/gus_midi.c | void (*output) (int dev) |
dev | 118 | drivers/sound/gus_midi.c | gus_midi_close (int dev) |
dev | 127 | drivers/sound/gus_midi.c | gus_midi_out (int dev, unsigned char midi_byte) |
dev | 173 | drivers/sound/gus_midi.c | gus_midi_start_read (int dev) |
dev | 179 | drivers/sound/gus_midi.c | gus_midi_end_read (int dev) |
dev | 185 | drivers/sound/gus_midi.c | gus_midi_ioctl (int dev, unsigned cmd, unsigned arg) |
dev | 191 | drivers/sound/gus_midi.c | gus_midi_kick (int dev) |
dev | 196 | drivers/sound/gus_midi.c | gus_midi_buffer_status (int dev) |
dev | 763 | drivers/sound/gus_wave.c | guswave_ioctl (int dev, |
dev | 793 | drivers/sound/gus_wave.c | guswave_set_instr (int dev, int voice, int instr_no) |
dev | 824 | drivers/sound/gus_wave.c | guswave_kill_note (int dev, int voice, int velocity) |
dev | 837 | drivers/sound/gus_wave.c | guswave_aftertouch (int dev, int voice, int pressure) |
dev | 879 | drivers/sound/gus_wave.c | guswave_panning (int dev, int voice, int value) |
dev | 1008 | drivers/sound/gus_wave.c | guswave_controller (int dev, int voice, int ctrl_num, int value) |
dev | 1051 | drivers/sound/gus_wave.c | guswave_start_note (int dev, int voice, int note_num, int volume) |
dev | 1224 | drivers/sound/gus_wave.c | guswave_reset (int dev) |
dev | 1233 | drivers/sound/gus_wave.c | guswave_open (int dev, int mode) |
dev | 1253 | drivers/sound/gus_wave.c | guswave_close (int dev) |
dev | 1263 | drivers/sound/gus_wave.c | guswave_load_patch (int dev, int format, snd_rw_buf * addr, |
dev | 1501 | drivers/sound/gus_wave.c | pmgr_inform (dev, PM_E_PATCH_LOADED, instr, free_sample, 0, 0); |
dev | 1507 | drivers/sound/gus_wave.c | guswave_hw_control (int dev, unsigned char *event) |
dev | 1530 | drivers/sound/gus_wave.c | guswave_set_instr (dev, voice, p1); |
dev | 1685 | drivers/sound/gus_wave.c | gus_sampling_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 1744 | drivers/sound/gus_wave.c | gus_sampling_reset (int dev) |
dev | 1749 | drivers/sound/gus_wave.c | gus_sampling_open (int dev, int mode) |
dev | 1772 | drivers/sound/gus_wave.c | gus_sampling_close (int dev) |
dev | 1897 | drivers/sound/gus_wave.c | gus_transfer_output_block (int dev, unsigned long buf, |
dev | 1932 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf + (chn * count), count, DMA_MODE_WRITE); |
dev | 1937 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 1954 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 1976 | drivers/sound/gus_wave.c | gus_sampling_output_block (int dev, unsigned long buf, int total_count, |
dev | 1982 | drivers/sound/gus_wave.c | pcm_current_dev = dev; |
dev | 1983 | drivers/sound/gus_wave.c | gus_transfer_output_block (dev, buf, total_count, intrflag, 0); |
dev | 1987 | drivers/sound/gus_wave.c | gus_sampling_start_input (int dev, unsigned long buf, int count, |
dev | 1995 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 1999 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 2011 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_input (int dev, int bsize, int bcount) |
dev | 2029 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_output (int dev, int bsize, int bcount) |
dev | 2060 | drivers/sound/gus_wave.c | gus_has_output_drained (int dev) |
dev | 2066 | drivers/sound/gus_wave.c | gus_copy_from_user (int dev, char *localbuf, int localoffs, |
dev | 2133 | drivers/sound/gus_wave.c | guswave_patchmgr (int dev, struct patmgr_info *rec) |
dev | 44 | drivers/sound/midibuf.c | MIDIbuf_open (int dev, struct fileinfo *file) |
dev | 48 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 69 | drivers/sound/midibuf.c | MIDIbuf_release (int dev, struct fileinfo *file) |
dev | 73 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 81 | drivers/sound/midibuf.c | MIDIbuf_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 84 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 91 | drivers/sound/midibuf.c | MIDIbuf_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 93 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 99 | drivers/sound/midibuf.c | MIDIbuf_ioctl (int dev, struct fileinfo *file, |
dev | 102 | drivers/sound/midibuf.c | dev = dev >> 4; |
dev | 108 | drivers/sound/midibuf.c | return midi_devs[0]->ioctl (dev, cmd, arg); |
dev | 113 | drivers/sound/midibuf.c | MIDIbuf_bytes_received (int dev, unsigned char *buf, int count) |
dev | 62 | drivers/sound/mpu401.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 119 | drivers/sound/mpu401.c | mpu401_open (int dev, int mode, |
dev | 120 | drivers/sound/mpu401.c | void (*input) (int dev, unsigned char data), |
dev | 121 | drivers/sound/mpu401.c | void (*output) (int dev) |
dev | 140 | drivers/sound/mpu401.c | mpu401_close (int dev) |
dev | 146 | drivers/sound/mpu401.c | mpu401_out (int dev, unsigned char midi_byte) |
dev | 180 | drivers/sound/mpu401.c | mpu401_command (int dev, unsigned char midi_byte) |
dev | 186 | drivers/sound/mpu401.c | mpu401_start_read (int dev) |
dev | 192 | drivers/sound/mpu401.c | mpu401_end_read (int dev) |
dev | 198 | drivers/sound/mpu401.c | mpu401_ioctl (int dev, unsigned cmd, unsigned arg) |
dev | 204 | drivers/sound/mpu401.c | mpu401_kick (int dev) |
dev | 209 | drivers/sound/mpu401.c | mpu401_buffer_status (int dev) |
dev | 79 | drivers/sound/opl3.c | static int opl3_kill_note (int dev, int voice, int velocity); |
dev | 119 | drivers/sound/opl3.c | opl3_ioctl (int dev, |
dev | 137 | drivers/sound/opl3.c | pmgr_inform (dev, PM_E_PATCH_LOADED, ins.channel, 0, 0, 0); |
dev | 237 | drivers/sound/opl3.c | opl3_kill_note (int dev, int voice, int velocity) |
dev | 283 | drivers/sound/opl3.c | opl3_set_instr (int dev, int voice, int instr_no) |
dev | 429 | drivers/sound/opl3.c | opl3_start_note (int dev, int voice, int note, int volume) |
dev | 653 | drivers/sound/opl3.c | opl3_reset (int dev) |
dev | 674 | drivers/sound/opl3.c | opl3_kill_note (dev, i, 64); |
dev | 692 | drivers/sound/opl3.c | opl3_open (int dev, int mode) |
dev | 707 | drivers/sound/opl3.c | opl3_close (int dev) |
dev | 714 | drivers/sound/opl3.c | opl3_reset (dev); |
dev | 718 | drivers/sound/opl3.c | opl3_hw_control (int dev, unsigned char *event) |
dev | 723 | drivers/sound/opl3.c | opl3_load_patch (int dev, int format, snd_rw_buf * addr, |
dev | 747 | drivers/sound/opl3.c | opl3_panning (int dev, int voice, int pressure) |
dev | 758 | drivers/sound/opl3.c | opl3_aftertouch (int dev, int voice, int pressure) |
dev | 824 | drivers/sound/opl3.c | opl3_controller (int dev, int voice, int ctrl_num, int value) |
dev | 868 | drivers/sound/opl3.c | opl3_patchmgr (int dev, struct patmgr_info *rec) |
dev | 46 | drivers/sound/pas2_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 49 | drivers/sound/pas2_midi.c | pas_midi_open (int dev, int mode, |
dev | 50 | drivers/sound/pas2_midi.c | void (*input) (int dev, unsigned char data), |
dev | 51 | drivers/sound/pas2_midi.c | void (*output) (int dev) |
dev | 108 | drivers/sound/pas2_midi.c | pas_midi_close (int dev) |
dev | 138 | drivers/sound/pas2_midi.c | pas_midi_out (int dev, unsigned char midi_byte) |
dev | 184 | drivers/sound/pas2_midi.c | pas_midi_start_read (int dev) |
dev | 190 | drivers/sound/pas2_midi.c | pas_midi_end_read (int dev) |
dev | 196 | drivers/sound/pas2_midi.c | pas_midi_ioctl (int dev, unsigned cmd, unsigned arg) |
dev | 202 | drivers/sound/pas2_midi.c | pas_midi_kick (int dev) |
dev | 208 | drivers/sound/pas2_midi.c | pas_buffer_status (int dev) |
dev | 314 | drivers/sound/pas2_mixer.c | getmixer (int dev, int chn) |
dev | 318 | drivers/sound/pas2_mixer.c | return (levels[dev] >> 8) & 0x7f; |
dev | 322 | drivers/sound/pas2_mixer.c | return levels[dev] & 0x7f; |
dev | 407 | drivers/sound/pas2_mixer.c | pas_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg) |
dev | 126 | drivers/sound/pas2_pcm.c | pas_pcm_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 189 | drivers/sound/pas2_pcm.c | pas_pcm_reset (int dev) |
dev | 197 | drivers/sound/pas2_pcm.c | pas_pcm_open (int dev, int mode) |
dev | 206 | drivers/sound/pas2_pcm.c | if (!DMAbuf_open_dma (dev)) |
dev | 218 | drivers/sound/pas2_pcm.c | pas_pcm_close (int dev) |
dev | 226 | drivers/sound/pas2_pcm.c | pas_pcm_reset (dev); |
dev | 227 | drivers/sound/pas2_pcm.c | DMAbuf_close_dma (dev); |
dev | 235 | drivers/sound/pas2_pcm.c | pas_pcm_output_block (int dev, unsigned long buf, int count, |
dev | 243 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 246 | drivers/sound/pas2_pcm.c | if (sound_dma_automode[dev] && |
dev | 257 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 259 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 281 | drivers/sound/pas2_pcm.c | pas_pcm_start_input (int dev, unsigned long buf, int count, |
dev | 290 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 301 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 303 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 325 | drivers/sound/pas2_pcm.c | pas_pcm_prepare_for_input (int dev, int bsize, int bcount) |
dev | 330 | drivers/sound/pas2_pcm.c | pas_pcm_prepare_for_output (int dev, int bsize, int bcount) |
dev | 52 | drivers/sound/patmgr.c | pmgr_open (int dev) |
dev | 54 | drivers/sound/patmgr.c | if (dev < 0 || dev >= num_synths) |
dev | 57 | drivers/sound/patmgr.c | if (pmgr_opened[dev]) |
dev | 59 | drivers/sound/patmgr.c | pmgr_opened[dev] = 1; |
dev | 61 | drivers/sound/patmgr.c | RESET_WAIT_QUEUE (server_procs[dev], server_wait_flag[dev]); |
dev | 67 | drivers/sound/patmgr.c | pmgr_release (int dev) |
dev | 70 | drivers/sound/patmgr.c | if (mbox[dev]) /* Killed in action. Inform the client */ |
dev | 73 | drivers/sound/patmgr.c | mbox[dev]->key = PM_ERROR; |
dev | 74 | drivers/sound/patmgr.c | mbox[dev]->parm1 = RET_ERROR (EIO); |
dev | 80 | drivers/sound/patmgr.c | pmgr_opened[dev] = 0; |
dev | 84 | drivers/sound/patmgr.c | pmgr_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 91 | drivers/sound/patmgr.c | printk ("PATMGR%d: Invalid read count\n", dev); |
dev | 95 | drivers/sound/patmgr.c | while (!ok && !PROCESS_ABORTING (server_procs[dev], server_wait_flag[dev])) |
dev | 99 | drivers/sound/patmgr.c | while (!(mbox[dev] && msg_direction[dev] == A_TO_S) && |
dev | 100 | drivers/sound/patmgr.c | !PROCESS_ABORTING (server_procs[dev], server_wait_flag[dev])) |
dev | 102 | drivers/sound/patmgr.c | DO_SLEEP (server_procs[dev], server_wait_flag[dev], 0); |
dev | 105 | drivers/sound/patmgr.c | if (mbox[dev] && msg_direction[dev] == A_TO_S) |
dev | 107 | drivers/sound/patmgr.c | COPY_TO_USER (buf, 0, (char *) mbox[dev], count); |
dev | 108 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 122 | drivers/sound/patmgr.c | pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 128 | drivers/sound/patmgr.c | printk ("PATMGR%d: Write count < 4\n", dev); |
dev | 132 | drivers/sound/patmgr.c | COPY_FROM_USER (mbox[dev], buf, 0, 4); |
dev | 134 | drivers/sound/patmgr.c | if (*(unsigned char *) mbox[dev] == SEQ_FULLSIZE) |
dev | 138 | drivers/sound/patmgr.c | tmp_dev = ((unsigned short *) mbox[dev])[2]; |
dev | 139 | drivers/sound/patmgr.c | if (tmp_dev != dev) |
dev | 142 | drivers/sound/patmgr.c | return synth_devs[dev]->load_patch (dev, *(unsigned short *) mbox[dev], |
dev | 148 | drivers/sound/patmgr.c | printk ("PATMGR%d: Invalid write count\n", dev); |
dev | 159 | drivers/sound/patmgr.c | if (mbox[dev] && !msg_direction[dev]) |
dev | 161 | drivers/sound/patmgr.c | COPY_FROM_USER (&((char *) mbox[dev])[4], buf, 4, count - 4); |
dev | 162 | drivers/sound/patmgr.c | msg_direction[dev] = S_TO_A; |
dev | 176 | drivers/sound/patmgr.c | pmgr_access (int dev, struct patmgr_info *rec) |
dev | 183 | drivers/sound/patmgr.c | if (mbox[dev]) |
dev | 184 | drivers/sound/patmgr.c | printk (" PATMGR: Server %d mbox full. Why?\n", dev); |
dev | 188 | drivers/sound/patmgr.c | mbox[dev] = rec; |
dev | 189 | drivers/sound/patmgr.c | msg_direction[dev] = A_TO_S; |
dev | 191 | drivers/sound/patmgr.c | if (SOMEONE_WAITING (server_wait_flag[dev])) |
dev | 193 | drivers/sound/patmgr.c | WAKE_UP (server_procs[dev], server_wait_flag[dev]); |
dev | 198 | drivers/sound/patmgr.c | if (msg_direction[dev] != S_TO_A) |
dev | 210 | drivers/sound/patmgr.c | mbox[dev] = NULL; |
dev | 211 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 220 | drivers/sound/patmgr.c | pmgr_inform (int dev, int event, unsigned long p1, unsigned long p2, |
dev | 226 | drivers/sound/patmgr.c | if (!pmgr_opened[dev]) |
dev | 231 | drivers/sound/patmgr.c | if (mbox[dev]) |
dev | 232 | drivers/sound/patmgr.c | printk (" PATMGR: Server %d mbox full. Why?\n", dev); |
dev | 235 | drivers/sound/patmgr.c | mbox[dev] = |
dev | 238 | drivers/sound/patmgr.c | mbox[dev]->key = PM_K_EVENT; |
dev | 239 | drivers/sound/patmgr.c | mbox[dev]->command = event; |
dev | 240 | drivers/sound/patmgr.c | mbox[dev]->parm1 = p1; |
dev | 241 | drivers/sound/patmgr.c | mbox[dev]->parm2 = p2; |
dev | 242 | drivers/sound/patmgr.c | mbox[dev]->parm3 = p3; |
dev | 243 | drivers/sound/patmgr.c | msg_direction[dev] = A_TO_S; |
dev | 245 | drivers/sound/patmgr.c | if (SOMEONE_WAITING (server_wait_flag[dev])) |
dev | 247 | drivers/sound/patmgr.c | WAKE_UP (server_procs[dev], server_wait_flag[dev]); |
dev | 251 | drivers/sound/patmgr.c | if (mbox[dev]) |
dev | 252 | drivers/sound/patmgr.c | KERNEL_FREE (mbox[dev]); |
dev | 253 | drivers/sound/patmgr.c | mbox[dev] = NULL; |
dev | 254 | drivers/sound/patmgr.c | msg_direction[dev] = 0; |
dev | 315 | drivers/sound/sb_dsp.c | sb_dsp_output_block (int dev, unsigned long buf, int count, |
dev | 324 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 326 | drivers/sound/sb_dsp.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 359 | drivers/sound/sb_dsp.c | sb_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, |
dev | 370 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 372 | drivers/sound/sb_dsp.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 412 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_input (int dev, int bsize, int bcount) |
dev | 431 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_output (int dev, int bsize, int bcount) |
dev | 448 | drivers/sound/sb_dsp.c | sb_dsp_halt_xfer (int dev) |
dev | 487 | drivers/sound/sb_dsp.c | sb_dsp_open (int dev, int mode) |
dev | 517 | drivers/sound/sb_dsp.c | if (!DMAbuf_open_dma (dev)) |
dev | 532 | drivers/sound/sb_dsp.c | sb_dsp_close (int dev) |
dev | 534 | drivers/sound/sb_dsp.c | DMAbuf_close_dma (dev); |
dev | 543 | drivers/sound/sb_dsp.c | sb_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 595 | drivers/sound/sb_dsp.c | sb_dsp_reset (int dev) |
dev | 59 | drivers/sound/sb_midi.c | sb_midi_open (int dev, int mode, |
dev | 60 | drivers/sound/sb_midi.c | void (*input) (int dev, unsigned char data), |
dev | 61 | drivers/sound/sb_midi.c | void (*output) (int dev) |
dev | 116 | drivers/sound/sb_midi.c | sb_midi_close (int dev) |
dev | 128 | drivers/sound/sb_midi.c | sb_midi_out (int dev, unsigned char midi_byte) |
dev | 150 | drivers/sound/sb_midi.c | sb_midi_start_read (int dev) |
dev | 161 | drivers/sound/sb_midi.c | sb_midi_end_read (int dev) |
dev | 172 | drivers/sound/sb_midi.c | sb_midi_ioctl (int dev, unsigned cmd, unsigned arg) |
dev | 109 | drivers/sound/sb_mixer.c | change_bits(unsigned char *regval, int dev, int chn, int newval) |
dev | 114 | drivers/sound/sb_mixer.c | mask = (1 << (*iomap)[dev][chn].nbits)-1; |
dev | 117 | drivers/sound/sb_mixer.c | shift = (*iomap)[dev][chn].bitoffs-(*iomap)[dev][LEFT_CHN].nbits+1; |
dev | 124 | drivers/sound/sb_mixer.c | sb_mixer_get(int dev) |
dev | 126 | drivers/sound/sb_mixer.c | if (!((1<<dev) & supported_devices)) |
dev | 129 | drivers/sound/sb_mixer.c | return levels[dev]; |
dev | 133 | drivers/sound/sb_mixer.c | sb_mixer_set (int dev, int value) |
dev | 144 | drivers/sound/sb_mixer.c | if (dev > 31) return RET_ERROR(EINVAL); |
dev | 146 | drivers/sound/sb_mixer.c | if (!(supported_devices & (1 << dev))) /* Not supported */ |
dev | 149 | drivers/sound/sb_mixer.c | regoffs = (*iomap)[dev][LEFT_CHN].regno; |
dev | 155 | drivers/sound/sb_mixer.c | change_bits(&val, dev, LEFT_CHN, left); |
dev | 157 | drivers/sound/sb_mixer.c | levels[dev] = left|(left << 8); |
dev | 159 | drivers/sound/sb_mixer.c | if ((*iomap)[dev][RIGHT_CHN].regno != regoffs) /* Change register */ |
dev | 162 | drivers/sound/sb_mixer.c | regoffs = (*iomap)[dev][RIGHT_CHN].regno; |
dev | 170 | drivers/sound/sb_mixer.c | change_bits(&val, dev, RIGHT_CHN, right); |
dev | 173 | drivers/sound/sb_mixer.c | levels[dev] = left | (right << 8); |
dev | 253 | drivers/sound/sb_mixer.c | sb_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg) |
dev | 75 | drivers/sound/sequencer.c | sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 79 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 81 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 82 | drivers/sound/sequencer.c | return pmgr_read (dev - 1, file, buf, count); |
dev | 106 | drivers/sound/sequencer.c | sequencer_midi_output (int dev) |
dev | 132 | drivers/sound/sequencer.c | sequencer_midi_input (int dev, unsigned char data) |
dev | 147 | drivers/sound/sequencer.c | event[2] = dev; |
dev | 154 | drivers/sound/sequencer.c | sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 161 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 163 | drivers/sound/sequencer.c | DEB (printk ("sequencer_write(dev=%d, count=%d)\n", dev, count)); |
dev | 168 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 169 | drivers/sound/sequencer.c | return pmgr_write (dev - 1, file, buf, count); |
dev | 182 | drivers/sound/sequencer.c | dev = *(unsigned short *) &event[2]; |
dev | 183 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 186 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 189 | drivers/sound/sequencer.c | err = synth_devs[dev]->load_patch (dev, *(short *) &event[0], buf, p + 4, c, 0); |
dev | 220 | drivers/sound/sequencer.c | int dev = event[2]; |
dev | 222 | drivers/sound/sequencer.c | if (dev >= num_midis) |
dev | 224 | drivers/sound/sequencer.c | printk ("Sequencer Error: Nonexistent MIDI device %d\n", dev); |
dev | 230 | drivers/sound/sequencer.c | if ((err = midi_devs[dev]->open (dev, mode, |
dev | 234 | drivers/sound/sequencer.c | printk ("Sequencer Error: Unable to open Midi #%d\n", dev); |
dev | 238 | drivers/sound/sequencer.c | midi_opened[dev] = 1; |
dev | 291 | drivers/sound/sequencer.c | int dev = q[2]; |
dev | 293 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 296 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 302 | drivers/sound/sequencer.c | synth_devs[dev]->kill_note (dev, q[3], q[5]); |
dev | 309 | drivers/sound/sequencer.c | synth_devs[dev]->start_note (dev, q[3], q[4], q[5]); |
dev | 313 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, q[3], q[4]); |
dev | 317 | drivers/sound/sequencer.c | synth_devs[dev]->aftertouch (dev, q[3], q[4]); |
dev | 321 | drivers/sound/sequencer.c | synth_devs[dev]->panning (dev, q[3], (char) q[4]); |
dev | 325 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, q[3], q[4], *(short *) &q[5]); |
dev | 407 | drivers/sound/sequencer.c | int dev; |
dev | 409 | drivers/sound/sequencer.c | dev = q[2]; |
dev | 411 | drivers/sound/sequencer.c | if (!midi_devs[dev]->putc (dev, q[1])) |
dev | 424 | drivers/sound/sequencer.c | midi_written[dev] = 1; |
dev | 463 | drivers/sound/sequencer.c | sequencer_open (int dev, struct fileinfo *file) |
dev | 467 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 470 | drivers/sound/sequencer.c | DEB (printk ("sequencer_open(dev=%d)\n", dev)); |
dev | 478 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 482 | drivers/sound/sequencer.c | dev--; |
dev | 483 | drivers/sound/sequencer.c | if (pmgr_present[dev]) |
dev | 485 | drivers/sound/sequencer.c | if ((err = pmgr_open (dev)) < 0) |
dev | 488 | drivers/sound/sequencer.c | pmgr_present[dev] = 1; |
dev | 578 | drivers/sound/sequencer.c | sequencer_release (int dev, struct fileinfo *file) |
dev | 583 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 585 | drivers/sound/sequencer.c | DEB (printk ("sequencer_release(dev=%d)\n", dev)); |
dev | 587 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 589 | drivers/sound/sequencer.c | dev--; |
dev | 590 | drivers/sound/sequencer.c | pmgr_release (dev); |
dev | 591 | drivers/sound/sequencer.c | pmgr_present[dev] = 0; |
dev | 642 | drivers/sound/sequencer.c | midi_outc (int dev, unsigned char data) |
dev | 656 | drivers/sound/sequencer.c | while (n && !midi_devs[dev]->putc (dev, data)) |
dev | 706 | drivers/sound/sequencer.c | sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 712 | drivers/sound/sequencer.c | orig_dev = dev = dev >> 4; |
dev | 718 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 729 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 737 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 761 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 777 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 785 | drivers/sound/sequencer.c | dev = IOCTL_IN (arg); |
dev | 786 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 789 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 792 | drivers/sound/sequencer.c | if (!orig_dev && pmgr_present[dev]) |
dev | 793 | drivers/sound/sequencer.c | pmgr_inform (dev, PM_E_PATCH_RESET, 0, 0, 0, 0); |
dev | 795 | drivers/sound/sequencer.c | return synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 808 | drivers/sound/sequencer.c | int dev = IOCTL_IN (arg); |
dev | 810 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 813 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 816 | drivers/sound/sequencer.c | return IOCTL_OUT (arg, synth_devs[dev]->ioctl (dev, cmd, arg)); |
dev | 822 | drivers/sound/sequencer.c | int dev = IOCTL_IN (arg); |
dev | 824 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 827 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 830 | drivers/sound/sequencer.c | synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 838 | drivers/sound/sequencer.c | int dev; |
dev | 841 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 843 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 846 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 849 | drivers/sound/sequencer.c | return synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 856 | drivers/sound/sequencer.c | int dev; |
dev | 859 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 861 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_midis) |
dev | 864 | drivers/sound/sequencer.c | IOCTL_TO_USER ((char *) arg, 0, (char *) &(midi_devs[dev]->info), sizeof (inf)); |
dev | 872 | drivers/sound/sequencer.c | int dev, err; |
dev | 877 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 879 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 885 | drivers/sound/sequencer.c | if (!synth_devs[dev]->pmgr_interface) |
dev | 891 | drivers/sound/sequencer.c | if ((err = synth_devs[dev]->pmgr_interface (dev, inf)) == -1) |
dev | 906 | drivers/sound/sequencer.c | int dev, err; |
dev | 911 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 913 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 919 | drivers/sound/sequencer.c | if (!pmgr_present[dev]) |
dev | 925 | drivers/sound/sequencer.c | if ((err = pmgr_access (dev, inf)) < 0) |
dev | 941 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 954 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 973 | drivers/sound/sequencer.c | sequencer_select (int dev, struct fileinfo *file, int sel_type, select_table * wait) |
dev | 975 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 1099 | drivers/sound/sequencer.c | sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 1105 | drivers/sound/sequencer.c | sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 1111 | drivers/sound/sequencer.c | sequencer_open (int dev, struct fileinfo *file) |
dev | 1117 | drivers/sound/sequencer.c | sequencer_release (int dev, struct fileinfo *file) |
dev | 1121 | drivers/sound/sequencer.c | sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 1128 | drivers/sound/sequencer.c | sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig) |
dev | 1140 | drivers/sound/sequencer.c | sequencer_select (int dev, struct fileinfo *file, int sel_type, select_table * wait) |
dev | 5 | drivers/sound/sound_calls.h | int DMAbuf_open(int dev, int mode); |
dev | 6 | drivers/sound/sound_calls.h | int DMAbuf_release(int dev, int mode); |
dev | 7 | drivers/sound/sound_calls.h | int DMAbuf_read (int dev, snd_rw_buf *user_buf, int count); |
dev | 8 | drivers/sound/sound_calls.h | int DMAbuf_getwrbuffer(int dev, char **buf, int *size); |
dev | 9 | drivers/sound/sound_calls.h | int DMAbuf_getrdbuffer(int dev, char **buf, int *len); |
dev | 10 | drivers/sound/sound_calls.h | int DMAbuf_rmchars(int dev, int buff_no, int c); |
dev | 11 | drivers/sound/sound_calls.h | int DMAbuf_start_output(int dev, int buff_no, int l); |
dev | 12 | drivers/sound/sound_calls.h | int DMAbuf_ioctl(int dev, unsigned int cmd, unsigned int arg, int local); |
dev | 14 | drivers/sound/sound_calls.h | int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode); |
dev | 18 | drivers/sound/sound_calls.h | void DMAbuf_inputintr(int dev); |
dev | 19 | drivers/sound/sound_calls.h | void DMAbuf_outputintr(int dev, int underflow_flag); |
dev | 25 | drivers/sound/sound_calls.h | int audio_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 26 | drivers/sound/sound_calls.h | int audio_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 27 | drivers/sound/sound_calls.h | int audio_open (int dev, struct fileinfo *file); |
dev | 28 | drivers/sound/sound_calls.h | void audio_release (int dev, struct fileinfo *file); |
dev | 29 | drivers/sound/sound_calls.h | int audio_ioctl (int dev, struct fileinfo *file, |
dev | 31 | drivers/sound/sound_calls.h | int audio_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 38 | drivers/sound/sound_calls.h | int sequencer_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 39 | drivers/sound/sound_calls.h | int sequencer_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 40 | drivers/sound/sound_calls.h | int sequencer_open (int dev, struct fileinfo *file); |
dev | 41 | drivers/sound/sound_calls.h | void sequencer_release (int dev, struct fileinfo *file); |
dev | 42 | drivers/sound/sound_calls.h | int sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 44 | drivers/sound/sound_calls.h | int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 51 | drivers/sound/sound_calls.h | int sequencer_select(int dev, struct fileinfo *file, int sel_type, select_table * wait); |
dev | 58 | drivers/sound/sound_calls.h | int MIDIbuf_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 59 | drivers/sound/sound_calls.h | int MIDIbuf_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 60 | drivers/sound/sound_calls.h | int MIDIbuf_open (int dev, struct fileinfo *file); |
dev | 61 | drivers/sound/sound_calls.h | void MIDIbuf_release (int dev, struct fileinfo *file); |
dev | 62 | drivers/sound/sound_calls.h | int MIDIbuf_ioctl (int dev, struct fileinfo *file, |
dev | 64 | drivers/sound/sound_calls.h | int MIDIbuf_lseek (int dev, struct fileinfo *file, off_t offset, int orig); |
dev | 65 | drivers/sound/sound_calls.h | void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count); |
dev | 74 | drivers/sound/sound_calls.h | int CMIDI_open (int dev, struct fileinfo *file); |
dev | 75 | drivers/sound/sound_calls.h | int CMIDI_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 76 | drivers/sound/sound_calls.h | int CMIDI_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 77 | drivers/sound/sound_calls.h | int CMIDI_close (int dev, struct fileinfo *file); |
dev | 87 | drivers/sound/sound_calls.h | int pro_midi_open(int dev, int mode); |
dev | 88 | drivers/sound/sound_calls.h | void pro_midi_close(int dev); |
dev | 89 | drivers/sound/sound_calls.h | int pro_midi_write(int dev, snd_rw_buf *uio); |
dev | 90 | drivers/sound/sound_calls.h | int pro_midi_read(int dev, snd_rw_buf *uio); |
dev | 182 | drivers/sound/sound_calls.h | int pmgr_open(int dev); |
dev | 183 | drivers/sound/sound_calls.h | void pmgr_release(int dev); |
dev | 184 | drivers/sound/sound_calls.h | int pmgr_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count); |
dev | 185 | drivers/sound/sound_calls.h | int pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count); |
dev | 186 | drivers/sound/sound_calls.h | int pmgr_access(int dev, struct patmgr_info *rec); |
dev | 187 | drivers/sound/sound_calls.h | int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2, |
dev | 211 | drivers/sound/soundcard.c | int dev; |
dev | 213 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 214 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 216 | drivers/sound/soundcard.c | DEB (printk ("sound_read(dev=%d, count=%d)\n", dev, count)); |
dev | 218 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 227 | drivers/sound/soundcard.c | return audio_read (dev, &files[dev], buf, count); |
dev | 231 | drivers/sound/soundcard.c | return sequencer_read (dev, &files[dev], buf, count); |
dev | 236 | drivers/sound/soundcard.c | return MIDIbuf_read (dev, &files[dev], buf, count); |
dev | 240 | drivers/sound/soundcard.c | printk ("Sound: Undefined minor device %d\n", dev); |
dev | 249 | drivers/sound/soundcard.c | int dev; |
dev | 251 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 252 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 254 | drivers/sound/soundcard.c | DEB (printk ("sound_write(dev=%d, count=%d)\n", dev, count)); |
dev | 256 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 260 | drivers/sound/soundcard.c | return sequencer_write (dev, &files[dev], buf, count); |
dev | 266 | drivers/sound/soundcard.c | return audio_write (dev, &files[dev], buf, count); |
dev | 285 | drivers/sound/soundcard.c | int dev, retval; |
dev | 287 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 288 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 290 | drivers/sound/soundcard.c | DEB (printk ("sound_open(dev=%d) : usecount=%d\n", dev, sbc_devices[dev].usecount)); |
dev | 292 | drivers/sound/soundcard.c | if ((dev >= SND_NDEVS) || (dev < 0)) |
dev | 294 | drivers/sound/soundcard.c | printk ("Invalid minor device %d\n", dev); |
dev | 298 | drivers/sound/soundcard.c | if (!soundcard_configured && dev != SND_DEV_CTL && dev != SND_DEV_STATUS) |
dev | 304 | drivers/sound/soundcard.c | files[dev].mode = 0; |
dev | 307 | drivers/sound/soundcard.c | files[dev].mode = OPEN_READWRITE; |
dev | 309 | drivers/sound/soundcard.c | files[dev].mode = OPEN_READ; |
dev | 311 | drivers/sound/soundcard.c | files[dev].mode = OPEN_WRITE; |
dev | 313 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 335 | drivers/sound/soundcard.c | if ((retval = sequencer_open (dev, &files[dev])) < 0) |
dev | 341 | drivers/sound/soundcard.c | if ((retval = MIDIbuf_open (dev, &files[dev])) < 0) |
dev | 349 | drivers/sound/soundcard.c | if ((retval = audio_open (dev, &files[dev])) < 0) |
dev | 354 | drivers/sound/soundcard.c | printk ("Invalid minor device %d\n", dev); |
dev | 358 | drivers/sound/soundcard.c | sbc_devices[dev].usecount++; |
dev | 367 | drivers/sound/soundcard.c | int dev; |
dev | 369 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 370 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 372 | drivers/sound/soundcard.c | DEB (printk ("sound_release(dev=%d)\n", dev)); |
dev | 374 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 387 | drivers/sound/soundcard.c | sequencer_release (dev, &files[dev]); |
dev | 392 | drivers/sound/soundcard.c | MIDIbuf_release (dev, &files[dev]); |
dev | 399 | drivers/sound/soundcard.c | audio_release (dev, &files[dev]); |
dev | 403 | drivers/sound/soundcard.c | printk ("Sound error: Releasing unknown device 0x%02x\n", dev); |
dev | 406 | drivers/sound/soundcard.c | sbc_devices[dev].usecount--; |
dev | 414 | drivers/sound/soundcard.c | int dev; |
dev | 416 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 417 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 419 | drivers/sound/soundcard.c | DEB (printk ("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg)); |
dev | 421 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 429 | drivers/sound/soundcard.c | if (dev >= num_mixers) |
dev | 432 | drivers/sound/soundcard.c | return mixer_devs[dev]->ioctl (dev, cmd, arg); |
dev | 436 | drivers/sound/soundcard.c | return sequencer_ioctl (dev, &files[dev], cmd, arg); |
dev | 442 | drivers/sound/soundcard.c | return audio_ioctl (dev, &files[dev], cmd, arg); |
dev | 447 | drivers/sound/soundcard.c | return MIDIbuf_ioctl (dev, &files[dev], cmd, arg); |
dev | 462 | drivers/sound/soundcard.c | int dev; |
dev | 464 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 465 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 467 | drivers/sound/soundcard.c | DEB (printk ("sound_select(dev=%d, type=0x%x)\n", dev, sel_type)); |
dev | 469 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 472 | drivers/sound/soundcard.c | return sequencer_select (dev, &files[dev], sel_type, wait); |
dev | 611 | drivers/sound/soundcard.c | int i, dev; |
dev | 621 | drivers/sound/soundcard.c | for (dev = 0; dev < num_dspdevs; dev++) /* Enumerate devices */ |
dev | 622 | drivers/sound/soundcard.c | if (sound_buffcounts[dev] > 0 && sound_dsp_dmachan[dev] > 0) |
dev | 624 | drivers/sound/soundcard.c | if (sound_dma_automode[dev]) |
dev | 625 | drivers/sound/soundcard.c | sound_buffcounts[dev] = 1; |
dev | 627 | drivers/sound/soundcard.c | if (sound_dsp_dmachan[dev] > 3 && sound_buffsizes[dev] > 65536) |
dev | 634 | drivers/sound/soundcard.c | if (sound_buffsizes[dev] > dma_pagesize) |
dev | 635 | drivers/sound/soundcard.c | sound_buffsizes[dev] = dma_pagesize; |
dev | 636 | drivers/sound/soundcard.c | sound_buffsizes[dev] &= 0xfffff000; /* Truncate to n*4k */ |
dev | 637 | drivers/sound/soundcard.c | if (sound_buffsizes[dev] < 4096) |
dev | 638 | drivers/sound/soundcard.c | sound_buffsizes[dev] = 4096; |
dev | 642 | drivers/sound/soundcard.c | for (snd_raw_count[dev] = 0; snd_raw_count[dev] < sound_buffcounts[dev]; snd_raw_count[dev]++) |
dev | 644 | drivers/sound/soundcard.c | start_addr = mem_ptr - sound_buffsizes[dev]; |
dev | 645 | drivers/sound/soundcard.c | if (!valid_dma_page (start_addr, sound_buffsizes[dev], dma_pagesize)) |
dev | 649 | drivers/sound/soundcard.c | end_addr = start_addr + sound_buffsizes[dev] - 1; |
dev | 651 | drivers/sound/soundcard.c | snd_raw_buf[dev][snd_raw_count[dev]] = (char *) start_addr; |
dev | 652 | drivers/sound/soundcard.c | snd_raw_buf_phys[dev][snd_raw_count[dev]] = start_addr; |
dev | 25 | fs/block_dev.c | unsigned int dev; |
dev | 29 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 31 | fs/block_dev.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 32 | fs/block_dev.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 44 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 45 | fs/block_dev.c | size = (blk_size[MAJOR(dev)][MINOR(dev)] << BLOCK_SIZE_BITS) >> blocksize_bits; |
dev | 55 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
dev | 57 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
dev | 92 | fs/block_dev.c | unsigned int dev; |
dev | 95 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 97 | fs/block_dev.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 98 | fs/block_dev.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 107 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 108 | fs/block_dev.c | size = blk_size[MAJOR(dev)][MINOR(dev)] << BLOCK_SIZE_BITS; |
dev | 127 | fs/block_dev.c | blocks += read_ahead[MAJOR(dev)] / (blocksize >> 9); |
dev | 147 | fs/block_dev.c | *bhb = getblk(dev, block++, blocksize); |
dev | 92 | fs/buffer.c | static int sync_buffers(dev_t dev, int wait) |
dev | 106 | fs/buffer.c | if (dev && bh->b_dev != dev) |
dev | 150 | fs/buffer.c | void sync_dev(dev_t dev) |
dev | 152 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 153 | fs/buffer.c | sync_supers(dev); |
dev | 154 | fs/buffer.c | sync_inodes(dev); |
dev | 155 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 158 | fs/buffer.c | int fsync_dev(dev_t dev) |
dev | 160 | fs/buffer.c | sync_buffers(dev, 0); |
dev | 161 | fs/buffer.c | sync_supers(dev); |
dev | 162 | fs/buffer.c | sync_inodes(dev); |
dev | 163 | fs/buffer.c | return sync_buffers(dev, 1); |
dev | 191 | fs/buffer.c | void invalidate_buffers(dev_t dev) |
dev | 198 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 201 | fs/buffer.c | if (bh->b_dev == dev) |
dev | 220 | fs/buffer.c | void check_disk_change(dev_t dev) |
dev | 225 | fs/buffer.c | switch(MAJOR(dev)){ |
dev | 227 | fs/buffer.c | if (!(bh = getblk(dev,0,1024))) |
dev | 235 | fs/buffer.c | i = check_scsidisk_media_change(dev, 0); |
dev | 241 | fs/buffer.c | i = check_cdrom_media_change(dev, 0); |
dev | 247 | fs/buffer.c | i = check_cdu31a_media_change(dev, 0); |
dev | 253 | fs/buffer.c | i = check_mcd_media_change(dev, 0); |
dev | 264 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 266 | fs/buffer.c | if (super_blocks[i].s_dev == dev) |
dev | 268 | fs/buffer.c | invalidate_inodes(dev); |
dev | 269 | fs/buffer.c | invalidate_buffers(dev); |
dev | 274 | fs/buffer.c | if (MAJOR(dev) == SCSI_DISK_MAJOR) |
dev | 275 | fs/buffer.c | revalidate_scsidisk(dev, 0); |
dev | 279 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(dev^block))%NR_HASH) |
dev | 280 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
dev | 357 | fs/buffer.c | static struct buffer_head * find_buffer(dev_t dev, int block, int size) |
dev | 361 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
dev | 362 | fs/buffer.c | if (tmp->b_dev==dev && tmp->b_blocknr==block) |
dev | 367 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 380 | fs/buffer.c | struct buffer_head * get_hash_table(dev_t dev, int block, int size) |
dev | 385 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
dev | 389 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
dev | 395 | fs/buffer.c | void set_blocksize(dev_t dev, int size) |
dev | 400 | fs/buffer.c | if (!blksize_size[MAJOR(dev)]) |
dev | 408 | fs/buffer.c | if (blksize_size[MAJOR(dev)][MINOR(dev)] == 0 && size == BLOCK_SIZE) { |
dev | 409 | fs/buffer.c | blksize_size[MAJOR(dev)][MINOR(dev)] = size; |
dev | 412 | fs/buffer.c | if (blksize_size[MAJOR(dev)][MINOR(dev)] == size) |
dev | 414 | fs/buffer.c | sync_buffers(dev, 2); |
dev | 415 | fs/buffer.c | blksize_size[MAJOR(dev)][MINOR(dev)] = size; |
dev | 423 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 429 | fs/buffer.c | if (bh->b_dev == dev && bh->b_size != size) |
dev | 447 | fs/buffer.c | struct buffer_head * getblk(dev_t dev, int block, int size) |
dev | 454 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
dev | 507 | fs/buffer.c | if (find_buffer(dev,block,size)) |
dev | 516 | fs/buffer.c | bh->b_dev=dev; |
dev | 540 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
dev | 544 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
dev | 546 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 564 | fs/buffer.c | struct buffer_head * breada(dev_t dev,int first, ...) |
dev | 573 | fs/buffer.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 574 | fs/buffer.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 576 | fs/buffer.c | if (!(bh = getblk(dev, first, blocksize))) { |
dev | 578 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 584 | fs/buffer.c | tmp = getblk(dev, first, blocksize); |
dev | 702 | fs/buffer.c | dev_t dev, int *b, int size) |
dev | 722 | fs/buffer.c | first = get_hash_table(dev, block, size); |
dev | 743 | fs/buffer.c | dev_t dev, int b[], int size) |
dev | 758 | fs/buffer.c | tmp = get_hash_table(dev, block, size); |
dev | 772 | fs/buffer.c | bh->b_dev = dev; |
dev | 809 | fs/buffer.c | dev_t dev, int *b, int size) |
dev | 817 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
dev | 819 | fs/buffer.c | return check_aligned(bh, address, dev, b, size); |
dev | 820 | fs/buffer.c | return try_to_load_aligned(address, dev, b, size); |
dev | 835 | fs/buffer.c | unsigned long bread_page(unsigned long address, dev_t dev, int b[], int size, int prot) |
dev | 842 | fs/buffer.c | where = try_to_share_buffers(address,dev,b,size); |
dev | 850 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
dev | 189 | fs/ext/freelists.c | dev_t dev; |
dev | 211 | fs/ext/freelists.c | dev = inode->i_dev; |
dev | 229 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
dev | 62 | fs/ext/inode.c | int dev = s->s_dev,block; |
dev | 65 | fs/ext/inode.c | set_blocksize(dev, BLOCK_SIZE); |
dev | 66 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
dev | 91 | fs/ext/inode.c | dev); |
dev | 97 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeblock = bread(dev, |
dev | 108 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeinodeblock = bread(dev, block, BLOCK_SIZE))) { |
dev | 118 | fs/ext/inode.c | s->s_dev = dev; |
dev | 25 | fs/ext2/dcache.c | unsigned short dev; |
dev | 54 | fs/ext2/dcache.c | #define hash(dev,dir) ((dev ^ dir) % HASH_QUEUES) |
dev | 83 | fs/ext2/dcache.c | static struct dir_cache_entry * find_name (int queue, unsigned short dev, |
dev | 89 | fs/ext2/dcache.c | for (p = queue_head[queue]; p != NULL && (p->dev != dev || |
dev | 108 | fs/ext2/dcache.c | p->dev, p->dir, p->name); |
dev | 178 | fs/ext2/dcache.c | void ext2_dcache_invalidate (unsigned short dev) |
dev | 187 | fs/ext2/dcache.c | if (p->dev == dev) { |
dev | 189 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 202 | fs/ext2/dcache.c | unsigned long ext2_dcache_lookup (unsigned short dev, unsigned long dir, |
dev | 216 | fs/ext2/dcache.c | printk ("dcache_lookup (%04x, %lu, %s, %d)\n", dev, dir, our_name, len); |
dev | 218 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 219 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, our_name, len))) { |
dev | 252 | fs/ext2/dcache.c | void ext2_dcache_add (unsigned short dev, unsigned long dir, const char * name, |
dev | 262 | fs/ext2/dcache.c | dev, dir, name, len, ino); |
dev | 266 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 267 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 290 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 293 | fs/ext2/dcache.c | p->dev = dev; |
dev | 312 | fs/ext2/dcache.c | void ext2_dcache_remove (unsigned short dev, unsigned long dir, |
dev | 321 | fs/ext2/dcache.c | printk ("dcache_remove (%04x, %lu, %s, %d)\n", dev, dir, name, len); |
dev | 325 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 326 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 208 | fs/ext2/super.c | int dev = s->s_dev; |
dev | 223 | fs/ext2/super.c | set_blocksize (dev, BLOCK_SIZE); |
dev | 224 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
dev | 245 | fs/ext2/super.c | dev); |
dev | 256 | fs/ext2/super.c | set_blocksize (dev, s->s_blocksize); |
dev | 259 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, s->s_blocksize); |
dev | 328 | fs/ext2/super.c | dev); |
dev | 337 | fs/ext2/super.c | dev); |
dev | 366 | fs/ext2/super.c | s->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1, |
dev | 388 | fs/ext2/super.c | s->s_dev = dev; |
dev | 238 | fs/hpfs/hpfs_fs.c | static unsigned count_one_bitmap(dev_t dev, secno secno); |
dev | 249 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_nth_dirent(dev_t dev, dnode_secno dno, |
dev | 255 | fs/hpfs/hpfs_fs.c | static dnode_secno fnode_dno(dev_t dev, ino_t ino); |
dev | 256 | fs/hpfs/hpfs_fs.c | static struct fnode *map_fnode(dev_t dev, ino_t ino, |
dev | 258 | fs/hpfs/hpfs_fs.c | static struct anode *map_anode(dev_t dev, unsigned secno, |
dev | 260 | fs/hpfs/hpfs_fs.c | static struct dnode *map_dnode(dev_t dev, unsigned secno, |
dev | 262 | fs/hpfs/hpfs_fs.c | static void *map_sector(dev_t dev, unsigned secno, struct buffer_head **bhp); |
dev | 263 | fs/hpfs/hpfs_fs.c | static void *map_4sectors(dev_t dev, unsigned secno, |
dev | 338 | fs/hpfs/hpfs_fs.c | dev_t dev; |
dev | 361 | fs/hpfs/hpfs_fs.c | dev = s->s_dev; |
dev | 362 | fs/hpfs/hpfs_fs.c | set_blocksize(dev, 512); |
dev | 368 | fs/hpfs/hpfs_fs.c | bootblock = map_sector(dev, 0, &bh0); |
dev | 372 | fs/hpfs/hpfs_fs.c | superblock = map_sector(dev, 16, &bh1); |
dev | 376 | fs/hpfs/hpfs_fs.c | spareblock = map_sector(dev, 17, &bh2); |
dev | 491 | fs/hpfs/hpfs_fs.c | root_dno = fnode_dno(dev, s->s_hpfs_root); |
dev | 837 | fs/hpfs/hpfs_fs.c | static unsigned count_one_bitmap(dev_t dev, secno secno) |
dev | 843 | fs/hpfs/hpfs_fs.c | bits = map_4sectors(dev, secno, &qbh); |
dev | 1538 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_nth_dirent(dev_t dev, dnode_secno dno, |
dev | 1544 | fs/hpfs/hpfs_fs.c | struct dnode *dnode = map_dnode(dev, dno, qbh); |
dev | 1568 | fs/hpfs/hpfs_fs.c | static dnode_secno fnode_dno(dev_t dev, ino_t ino) |
dev | 1574 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(dev, ino, &bh); |
dev | 1585 | fs/hpfs/hpfs_fs.c | static struct fnode *map_fnode(dev_t dev, ino_t ino, struct buffer_head **bhp) |
dev | 1594 | fs/hpfs/hpfs_fs.c | fnode = map_sector(dev, ino_secno(ino), bhp); |
dev | 1606 | fs/hpfs/hpfs_fs.c | static struct anode *map_anode(dev_t dev, unsigned secno, |
dev | 1616 | fs/hpfs/hpfs_fs.c | anode = map_sector(dev, secno, bhp); |
dev | 1628 | fs/hpfs/hpfs_fs.c | static struct dnode *map_dnode(dev_t dev, unsigned secno, |
dev | 1638 | fs/hpfs/hpfs_fs.c | dnode = map_4sectors(dev, secno, qbh); |
dev | 1650 | fs/hpfs/hpfs_fs.c | static void *map_sector(dev_t dev, unsigned secno, struct buffer_head **bhp) |
dev | 1654 | fs/hpfs/hpfs_fs.c | if ((*bhp = bh = bread(dev, secno, 512)) != 0) |
dev | 1664 | fs/hpfs/hpfs_fs.c | static void *map_4sectors(dev_t dev, unsigned secno, |
dev | 1679 | fs/hpfs/hpfs_fs.c | qbh->bh[0] = bh = breada(dev, |
dev | 1685 | fs/hpfs/hpfs_fs.c | qbh->bh[1] = bh = bread(dev, secno + 1, 512); |
dev | 1690 | fs/hpfs/hpfs_fs.c | qbh->bh[2] = bh = bread(dev, secno + 2, 512); |
dev | 1695 | fs/hpfs/hpfs_fs.c | qbh->bh[3] = bh = bread(dev, secno + 3, 512); |
dev | 20 | fs/inode.c | static inline int const hashfn(dev_t dev, unsigned int i) |
dev | 22 | fs/inode.c | return (dev ^ i) % NR_IHASH; |
dev | 25 | fs/inode.c | static inline struct inode ** const hash(dev_t dev, int i) |
dev | 27 | fs/inode.c | return hash_table + hashfn(dev, i); |
dev | 158 | fs/inode.c | int fs_may_mount(dev_t dev) |
dev | 167 | fs/inode.c | if (inode->i_dev != dev) |
dev | 176 | fs/inode.c | int fs_may_umount(dev_t dev, struct inode * mount_root) |
dev | 183 | fs/inode.c | if (inode->i_dev != dev || !inode->i_count) |
dev | 192 | fs/inode.c | int fs_may_remount_ro(dev_t dev) |
dev | 200 | fs/inode.c | file->f_inode->i_dev != dev) |
dev | 265 | fs/inode.c | void invalidate_inodes(dev_t dev) |
dev | 274 | fs/inode.c | if (inode->i_dev != dev) |
dev | 277 | fs/inode.c | printk("VFS: inode busy on removed device %d/%d\n", MAJOR(dev), MINOR(dev)); |
dev | 284 | fs/inode.c | void sync_inodes(dev_t dev) |
dev | 291 | fs/inode.c | if (dev && inode->i_dev != dev) |
dev | 210 | fs/isofs/dir.c | cache.dev = inode->i_dev; |
dev | 127 | fs/isofs/inode.c | int dev=s->s_dev; |
dev | 151 | fs/isofs/inode.c | set_blocksize(dev, blocksize); |
dev | 158 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), blocksize))) { |
dev | 161 | fs/isofs/inode.c | dev, iso_blknum); |
dev | 254 | fs/isofs/inode.c | s->s_dev = dev; |
dev | 647 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
dev | 649 | fs/isofs/inode.c | return bread(dev, block, size); |
dev | 229 | fs/isofs/namei.c | if (dir->i_dev == cache.dev && |
dev | 58 | fs/minix/inode.c | int i,dev=s->s_dev,block; |
dev | 63 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
dev | 92 | fs/minix/inode.c | dev); |
dev | 101 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 106 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 123 | fs/minix/inode.c | s->s_dev = dev; |
dev | 392 | fs/namei.c | int do_mknod(const char * filename, int mode, dev_t dev) |
dev | 418 | fs/namei.c | return dir->i_op->mknod(dir,basename,namelen,mode,dev); |
dev | 421 | fs/namei.c | asmlinkage int sys_mknod(const char * filename, int mode, dev_t dev) |
dev | 439 | fs/namei.c | error = do_mknod(tmp,mode,dev); |
dev | 175 | fs/nfs/dir.c | int dev; |
dev | 191 | fs/nfs/dir.c | if (entry->dev == dir->i_dev && entry->inode == dir->i_ino |
dev | 212 | fs/nfs/dir.c | entry->dev = 0; |
dev | 238 | fs/nfs/dir.c | entry->dev = dir->i_dev; |
dev | 251 | fs/nfs/dir.c | int dev; |
dev | 256 | fs/nfs/dir.c | dev = inode->i_dev; |
dev | 260 | fs/nfs/dir.c | dev = entry->dev; |
dev | 267 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 268 | fs/nfs/dir.c | entry->dev = 0; |
dev | 276 | fs/nfs/dir.c | int dev = file->i_dev; |
dev | 282 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 68 | fs/nfs/inode.c | dev_t dev = sb->s_dev; |
dev | 95 | fs/nfs/inode.c | sb->s_dev = dev; |
dev | 24 | fs/open.c | asmlinkage int sys_ustat(int dev, struct ustat * ubuf) |
dev | 366 | fs/proc/array.c | dev_t dev; |
dev | 397 | fs/proc/array.c | dev = map->vm_inode->i_dev; |
dev | 400 | fs/proc/array.c | dev = 0; |
dev | 406 | fs/proc/array.c | MAJOR(dev),MINOR(dev), ino); |
dev | 107 | fs/proc/link.c | unsigned int dev,ino; |
dev | 115 | fs/proc/link.c | dev = inode->i_dev; |
dev | 118 | fs/proc/link.c | i = sprintf(buf,"[%04x]:%u", dev, ino); |
dev | 71 | fs/super.c | void sync_supers(dev_t dev) |
dev | 78 | fs/super.c | if (dev && sb->s_dev != dev) |
dev | 83 | fs/super.c | if (dev && (dev != sb->s_dev)) |
dev | 90 | fs/super.c | static struct super_block * get_super(dev_t dev) |
dev | 94 | fs/super.c | if (!dev) |
dev | 98 | fs/super.c | if (s->s_dev == dev) { |
dev | 100 | fs/super.c | if (s->s_dev == dev) |
dev | 108 | fs/super.c | void put_super(dev_t dev) |
dev | 112 | fs/super.c | if (dev == ROOT_DEV) { |
dev | 114 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 117 | fs/super.c | if (!(sb = get_super(dev))) |
dev | 121 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 128 | fs/super.c | static struct super_block * read_super(dev_t dev,char *name,int flags, |
dev | 134 | fs/super.c | if (!dev) |
dev | 136 | fs/super.c | check_disk_change(dev); |
dev | 137 | fs/super.c | s = get_super(dev); |
dev | 142 | fs/super.c | MAJOR(dev), MINOR(dev), name); |
dev | 151 | fs/super.c | s->s_dev = dev; |
dev | 157 | fs/super.c | s->s_dev = dev; |
dev | 190 | fs/super.c | static void put_unnamed_dev(dev_t dev) |
dev | 192 | fs/super.c | if (!dev) |
dev | 194 | fs/super.c | if (!unnamed_dev_in_use[dev]) { |
dev | 196 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 199 | fs/super.c | unnamed_dev_in_use[dev] = 0; |
dev | 202 | fs/super.c | static int do_umount(dev_t dev) |
dev | 207 | fs/super.c | if (dev==ROOT_DEV) { |
dev | 210 | fs/super.c | if (!(sb=get_super(dev))) |
dev | 219 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
dev | 223 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 224 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
dev | 233 | fs/super.c | put_super(dev); |
dev | 251 | fs/super.c | dev_t dev; |
dev | 265 | fs/super.c | dev = inode->i_rdev; |
dev | 275 | fs/super.c | dev = inode->i_sb->s_dev; |
dev | 278 | fs/super.c | dummy_inode.i_rdev = dev; |
dev | 281 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 285 | fs/super.c | if (!(retval = do_umount(dev)) && dev != ROOT_DEV) { |
dev | 286 | fs/super.c | fops = get_blkfops(MAJOR(dev)); |
dev | 289 | fs/super.c | if (MAJOR(dev) == UNNAMED_MAJOR) |
dev | 290 | fs/super.c | put_unnamed_dev(dev); |
dev | 296 | fs/super.c | fsync_dev(dev); |
dev | 309 | fs/super.c | static int do_mount(dev_t dev, const char * dir, char * type, int flags, void * data) |
dev | 326 | fs/super.c | if (!fs_may_mount(dev)) { |
dev | 330 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
dev | 401 | fs/super.c | dev_t dev; |
dev | 438 | fs/super.c | dev = inode->i_rdev; |
dev | 439 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 444 | fs/super.c | if (!(dev = get_unnamed_dev())) |
dev | 448 | fs/super.c | fops = get_blkfops(MAJOR(dev)); |
dev | 480 | fs/super.c | retval = do_mount(dev,dir_name,t,flags,(void *) page); |
dev | 64 | fs/xiafs/inode.c | int i, z, dev; |
dev | 66 | fs/xiafs/inode.c | dev=s->s_dev; |
dev | 69 | fs/xiafs/inode.c | set_blocksize(dev, BLOCK_SIZE); |
dev | 71 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
dev | 85 | fs/xiafs/inode.c | dev); |
dev | 94 | fs/xiafs/inode.c | set_blocksize(dev, s->s_blocksize); |
dev | 95 | fs/xiafs/inode.c | bh = bread (dev, 0, s->s_blocksize); |
dev | 122 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_imap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 132 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_zmap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 138 | fs/xiafs/inode.c | s->s_dev = dev; |
dev | 339 | include/linux/fs.h | extern int fs_may_mount(dev_t dev); |
dev | 340 | include/linux/fs.h | extern int fs_may_umount(dev_t dev, struct inode * mount_root); |
dev | 341 | include/linux/fs.h | extern int fs_may_remount_ro(dev_t dev); |
dev | 353 | include/linux/fs.h | extern void check_disk_change(dev_t dev); |
dev | 354 | include/linux/fs.h | extern void invalidate_inodes(dev_t dev); |
dev | 355 | include/linux/fs.h | extern void invalidate_buffers(dev_t dev); |
dev | 357 | include/linux/fs.h | extern void sync_inodes(dev_t dev); |
dev | 358 | include/linux/fs.h | extern void sync_dev(dev_t dev); |
dev | 359 | include/linux/fs.h | extern int fsync_dev(dev_t dev); |
dev | 360 | include/linux/fs.h | extern void sync_supers(dev_t dev); |
dev | 368 | include/linux/fs.h | extern int do_mknod(const char * filename, int mode, dev_t dev); |
dev | 377 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
dev | 378 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
dev | 380 | include/linux/fs.h | extern void ll_rw_page(int rw, int dev, int nr, char * buffer); |
dev | 381 | include/linux/fs.h | extern void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buffer); |
dev | 383 | include/linux/fs.h | extern void set_blocksize(dev_t dev, int size); |
dev | 384 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
dev | 385 | include/linux/fs.h | extern unsigned long bread_page(unsigned long addr,dev_t dev,int b[],int size,int prot); |
dev | 386 | include/linux/fs.h | extern struct buffer_head * breada(dev_t dev,int block,...); |
dev | 387 | include/linux/fs.h | extern void put_super(dev_t dev); |
dev | 172 | include/linux/iso_fs.h | extern int isofs_new_block(int dev); |
dev | 173 | include/linux/iso_fs.h | extern int isofs_free_block(int dev, int block); |
dev | 195 | include/linux/iso_fs.h | dev_t dev; /* And this matches */ |
dev | 211 | include/linux/iso_fs.h | extern struct buffer_head * leak_check_bread(int dev, int block, int size); |
dev | 113 | include/linux/msdos_fs.h | static inline struct buffer_head *msdos_sread(int dev,int sector,void **start) |
dev | 117 | include/linux/msdos_fs.h | if (!(bh = bread(dev,sector >> 1, 1024))) |
dev | 509 | include/linux/soundcard.h | #define MIXER_READ(dev) _IOR('M', dev, int) |
dev | 532 | include/linux/soundcard.h | #define MIXER_WRITE(dev) _IOWR('M', dev, int) |
dev | 636 | include/linux/soundcard.h | #define PM_LOAD_PATCH(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 637 | include/linux/soundcard.h | _pm_info.device=dev, _pm_info.data.data8[0]=pgm, \ |
dev | 640 | include/linux/soundcard.h | #define PM_LOAD_PATCHES(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 641 | include/linux/soundcard.h | _pm_info.device=dev, memcpy(_pm_info.data.data8, pgm, 128), \ |
dev | 645 | include/linux/soundcard.h | #define SEQ_START_NOTE(dev, voice, note, vol) {_SEQ_NEEDBUF(8);\ |
dev | 648 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 656 | include/linux/soundcard.h | #define SEQ_STOP_NOTE(dev, voice, note, vol) {_SEQ_NEEDBUF(8);\ |
dev | 659 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 667 | include/linux/soundcard.h | #define SEQ_CHN_PRESSURE(dev, voice, pressure) {_SEQ_NEEDBUF(8);\ |
dev | 670 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 678 | include/linux/soundcard.h | #define SEQ_PANNING(dev, voice, pos) {_SEQ_NEEDBUF(8);\ |
dev | 681 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 689 | include/linux/soundcard.h | #define SEQ_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\ |
dev | 692 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 699 | include/linux/soundcard.h | #define SEQ_PITCHBEND(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) |
dev | 700 | include/linux/soundcard.h | #define SEQ_BENDER_RANGE(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) |
dev | 701 | include/linux/soundcard.h | #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_EXPRESSION, value) |
dev | 702 | include/linux/soundcard.h | #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_MAIN_VOLUME, value) |
dev | 710 | include/linux/soundcard.h | #define SEQ_SET_PATCH(dev, voice, patch) {_SEQ_NEEDBUF(8);\ |
dev | 713 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 276 | include/linux/tpqic02.h | #define TP_DENS(dev) ((MINOR(dev) >> 1) & 0x07) /* tape density */ |
dev | 277 | include/linux/tpqic02.h | #define TP_UNIT(dev) ((MINOR(dev) >> 4) & 0x07) /* unit number */ |
dev | 278 | include/linux/tpqic02.h | #define TP_DIAGS(dev) (MINOR(dev) & 0x80) /* print excessive diagnostics */ |
dev | 117 | include/linux/xd.h | static int xd_reread_partitions (int dev); |
dev | 47 | net/ddi.c | register struct ddi_device *dev; |
dev | 50 | net/ddi.c | dev = devices; |
dev | 51 | net/ddi.c | while (dev->title != NULL) { |
dev | 52 | net/ddi.c | if (strncmp(dev->name, id, DDI_MAXNAME) == 0) { |
dev | 53 | net/ddi.c | PRINTK (("OK at 0x%X\n", dev)); |
dev | 54 | net/ddi.c | return(dev); |
dev | 56 | net/ddi.c | dev++; |
dev | 72 | net/ddi.c | struct ddi_device *dev; |
dev | 84 | net/ddi.c | dev = devices; |
dev | 85 | net/ddi.c | while (dev->title != NULL) { |
dev | 86 | net/ddi.c | (*dev->init)(dev); |
dev | 87 | net/ddi.c | dev++; |
dev | 238 | net/inet/arp.c | if (skb->arp || !skb->dev->rebuild_header(skb+1, skb->dev)) { |
dev | 240 | net/inet/arp.c | skb->dev->queue_xmit(skb, skb->dev, 0); |
dev | 252 | net/inet/arp.c | arp_response(struct arphdr *arp1, struct device *dev, int addrtype) |
dev | 277 | net/inet/arp.c | dev->hard_header_len, GFP_ATOMIC); |
dev | 285 | net/inet/arp.c | (2 * arp1->ar_pln) + dev->hard_header_len; |
dev | 287 | net/inet/arp.c | hlen = dev->hard_header((unsigned char *)(skb+1), dev, |
dev | 308 | net/inet/arp.c | memcpy(ptr2, dev->dev_addr, arp2->ar_hln); |
dev | 327 | net/inet/arp.c | dev->queue_xmit(skb, dev, 0); |
dev | 465 | net/inet/arp.c | arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 479 | net/inet/arp.c | if (arp->ar_hln != dev->addr_len || dev->type != NET16(arp->ar_hrd)) |
dev | 481 | net/inet/arp.c | DPRINTF((DBG_ARP,"ARP: Bad packet received on device \"%s\" !\n", dev->name)); |
dev | 487 | net/inet/arp.c | if (((arp->ar_pro != NET16(0x00CC) && dev->type==3) || (arp->ar_pro != NET16(ETH_P_IP) && dev->type!=3) ) || arp->ar_pln != 4) |
dev | 490 | net/inet/arp.c | DPRINTF((DBG_ARP,"ARP: Non-IP request on device \"%s\" !\n", dev->name)); |
dev | 560 | net/inet/arp.c | ret = arp_response(arp, dev, addr_hint); |
dev | 568 | net/inet/arp.c | arp_send(unsigned long paddr, struct device *dev, unsigned long saddr) |
dev | 576 | net/inet/arp.c | DPRINTF((DBG_ARP, "dev=%s, ", dev->name)); |
dev | 580 | net/inet/arp.c | sizeof(struct arphdr) + (2 * dev->addr_len) + |
dev | 581 | net/inet/arp.c | dev->hard_header_len + |
dev | 592 | net/inet/arp.c | dev->hard_header_len + (2 * dev->addr_len) + 8; |
dev | 595 | net/inet/arp.c | skb->dev = dev; |
dev | 598 | net/inet/arp.c | tmp = dev->hard_header((unsigned char *)(skb+1), dev, |
dev | 605 | net/inet/arp.c | arp->ar_hrd = htons(dev->type); |
dev | 606 | net/inet/arp.c | if(dev->type!=3) /* AX.25 */ |
dev | 610 | net/inet/arp.c | arp->ar_hln = dev->addr_len; |
dev | 615 | net/inet/arp.c | memcpy(ptr, dev->dev_addr, arp->ar_hln); |
dev | 626 | net/inet/arp.c | dev->queue_xmit(skb, dev, 0); |
dev | 632 | net/inet/arp.c | arp_find(unsigned char *haddr, unsigned long paddr, struct device *dev, |
dev | 639 | net/inet/arp.c | DPRINTF((DBG_ARP, "dev=%s, saddr=%s)\n", dev->name, in_ntoa(saddr))); |
dev | 643 | net/inet/arp.c | memcpy(haddr, dev->dev_addr, dev->addr_len); |
dev | 646 | net/inet/arp.c | memcpy(haddr, dev->broadcast, dev->addr_len); |
dev | 660 | net/inet/arp.c | memcpy(haddr, apt->ha, dev->addr_len); |
dev | 676 | net/inet/arp.c | arp_send(paddr, dev, saddr); |
dev | 684 | net/inet/arp.c | arp_add(unsigned long addr, unsigned char *haddr, struct device *dev) |
dev | 690 | net/inet/arp.c | DPRINTF((DBG_ARP, "%d, %d)\n", dev->hard_header_len, dev->type)); |
dev | 703 | net/inet/arp.c | memcpy(apt->ha, haddr , dev->addr_len); |
dev | 706 | net/inet/arp.c | arp_create(addr, haddr, dev->addr_len, dev->type); |
dev | 712 | net/inet/arp.c | arp_add_broad(unsigned long addr, struct device *dev) |
dev | 716 | net/inet/arp.c | arp_add(addr, dev->broadcast, dev); |
dev | 52 | net/inet/arp.h | extern int arp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 55 | net/inet/arp.h | struct device *dev, unsigned long saddr); |
dev | 57 | net/inet/arp.h | struct device *dev); |
dev | 58 | net/inet/arp.h | extern void arp_add_broad(unsigned long addr, struct device *dev); |
dev | 191 | net/inet/dev.c | struct device *dev; |
dev | 215 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 216 | net/inet/dev.c | if (!(dev->flags&IFF_UP)) |
dev | 218 | net/inet/dev.c | if ((dev->pa_addr == 0)/* || (dev->flags&IFF_PROMISC)*/) |
dev | 221 | net/inet/dev.c | if (addr == dev->pa_addr) { |
dev | 227 | net/inet/dev.c | if ((addr & dev->pa_mask) == (dev->pa_addr & dev->pa_mask)) { |
dev | 228 | net/inet/dev.c | if ((addr & ~dev->pa_mask) == 0) { |
dev | 232 | net/inet/dev.c | if (((addr & ~dev->pa_mask) | dev->pa_mask) |
dev | 241 | net/inet/dev.c | if( addr == (dev->pa_addr | 0xffffff00)) { |
dev | 247 | net/inet/dev.c | if( addr == (dev->pa_addr | 0xffff0000)) { |
dev | 253 | net/inet/dev.c | if( addr == (dev->pa_addr | 0xff000000)) { |
dev | 277 | net/inet/dev.c | struct device *dev; |
dev | 279 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 280 | net/inet/dev.c | if (dev->flags & IFF_LOOPBACK) return(dev->pa_addr); |
dev | 338 | net/inet/dev.c | struct device *dev; |
dev | 340 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 341 | net/inet/dev.c | if (strcmp(dev->name, name) == 0) |
dev | 342 | net/inet/dev.c | return(dev); |
dev | 352 | net/inet/dev.c | struct device *dev; |
dev | 354 | net/inet/dev.c | for (dev = dev_base; dev; dev = dev->next) |
dev | 355 | net/inet/dev.c | if ((dev->flags & IFF_UP) && (dev->flags & IFF_POINTOPOINT) && |
dev | 356 | net/inet/dev.c | (addr == dev->pa_dstaddr)) |
dev | 357 | net/inet/dev.c | return dev; |
dev | 358 | net/inet/dev.c | for (dev = dev_base; dev; dev = dev->next) |
dev | 359 | net/inet/dev.c | if ((dev->flags & IFF_UP) && !(dev->flags & IFF_POINTOPOINT) && |
dev | 360 | net/inet/dev.c | (dev->flags & IFF_LOOPBACK ? (addr == dev->pa_addr) : |
dev | 361 | net/inet/dev.c | (dev->pa_mask & addr) == (dev->pa_addr & dev->pa_mask))) |
dev | 364 | net/inet/dev.c | return dev; |
dev | 370 | net/inet/dev.c | dev_open(struct device *dev) |
dev | 374 | net/inet/dev.c | if (dev->open) |
dev | 375 | net/inet/dev.c | ret = dev->open(dev); |
dev | 377 | net/inet/dev.c | dev->flags |= (IFF_UP | IFF_RUNNING); |
dev | 385 | net/inet/dev.c | dev_close(struct device *dev) |
dev | 387 | net/inet/dev.c | if (dev->flags != 0) { |
dev | 389 | net/inet/dev.c | dev->flags = 0; |
dev | 390 | net/inet/dev.c | if (dev->stop) |
dev | 391 | net/inet/dev.c | dev->stop(dev); |
dev | 392 | net/inet/dev.c | rt_flush(dev); |
dev | 393 | net/inet/dev.c | dev->pa_addr = 0; |
dev | 394 | net/inet/dev.c | dev->pa_dstaddr = 0; |
dev | 395 | net/inet/dev.c | dev->pa_brdaddr = 0; |
dev | 396 | net/inet/dev.c | dev->pa_mask = 0; |
dev | 401 | net/inet/dev.c | while((skb=skb_dequeue(&dev->buffs[ct]))!=NULL) |
dev | 414 | net/inet/dev.c | dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) |
dev | 421 | net/inet/dev.c | skb, dev, pri)); |
dev | 423 | net/inet/dev.c | if (dev == NULL) { |
dev | 430 | net/inet/dev.c | skb->dev = dev; |
dev | 433 | net/inet/dev.c | dev->hard_start_xmit(NULL, dev); |
dev | 447 | net/inet/dev.c | if (dev->hard_start_xmit(skb, dev) == 0) { |
dev | 453 | net/inet/dev.c | pri, dev->buffs[pri])); |
dev | 459 | net/inet/dev.c | skb_queue_head(&dev->buffs[pri],skb); |
dev | 461 | net/inet/dev.c | skb_queue_tail(&dev->buffs[pri],skb); |
dev | 499 | net/inet/dev.c | dev_rint(unsigned char *buff, long len, int flags, struct device *dev) |
dev | 507 | net/inet/dev.c | if (dev == NULL || buff == NULL || len <= 0) return(1); |
dev | 521 | net/inet/dev.c | dev->name); |
dev | 533 | net/inet/dev.c | amount = min(len2, (unsigned long) dev->rmem_end - |
dev | 540 | net/inet/dev.c | if ((unsigned long) buff == dev->rmem_end) |
dev | 541 | net/inet/dev.c | buff = (unsigned char *) dev->rmem_start; |
dev | 545 | net/inet/dev.c | skb->dev = dev; |
dev | 558 | net/inet/dev.c | struct device *dev; |
dev | 560 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 561 | net/inet/dev.c | if (!dev->tbusy) { |
dev | 562 | net/inet/dev.c | dev_tint(dev); |
dev | 606 | net/inet/dev.c | skb->h.raw = (unsigned char *) (skb + 1) + skb->dev->hard_header_len; |
dev | 607 | net/inet/dev.c | skb->len -= skb->dev->hard_header_len; |
dev | 619 | net/inet/dev.c | type = skb->dev->type_trans(skb, skb->dev); |
dev | 654 | net/inet/dev.c | ptype->func(skb2, skb->dev, ptype); |
dev | 684 | net/inet/dev.c | void dev_tint(struct device *dev) |
dev | 690 | net/inet/dev.c | while((skb=skb_dequeue(&dev->buffs[i]))!=NULL) |
dev | 695 | net/inet/dev.c | dev->queue_xmit(skb,dev,-i - 1); |
dev | 696 | net/inet/dev.c | if (dev->tbusy) |
dev | 709 | net/inet/dev.c | struct device *dev; |
dev | 720 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 721 | net/inet/dev.c | if(!(dev->flags & IFF_UP)) |
dev | 724 | net/inet/dev.c | strcpy(ifr.ifr_name, dev->name); |
dev | 725 | net/inet/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_family = dev->family; |
dev | 726 | net/inet/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 743 | net/inet/dev.c | char *sprintf_stats(char *buffer, struct device *dev) |
dev | 746 | net/inet/dev.c | struct enet_statistics *stats = (dev->get_stats ? dev->get_stats(dev): NULL); |
dev | 750 | net/inet/dev.c | dev->name, |
dev | 761 | net/inet/dev.c | pos += sprintf(pos, "%6s: No statistics available.\n", dev->name); |
dev | 771 | net/inet/dev.c | struct device *dev; |
dev | 777 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 778 | net/inet/dev.c | pos = sprintf_stats(pos, dev); |
dev | 788 | net/inet/dev.c | struct device *dev; |
dev | 796 | net/inet/dev.c | if ((dev = dev_get(ifr.ifr_name)) == NULL) return(-EINVAL); |
dev | 800 | net/inet/dev.c | ifr.ifr_flags = dev->flags; |
dev | 806 | net/inet/dev.c | int old_flags = dev->flags; |
dev | 807 | net/inet/dev.c | dev->flags = ifr.ifr_flags & ( |
dev | 812 | net/inet/dev.c | if ( (old_flags & IFF_PROMISC) && ((dev->flags & IFF_PROMISC) == 0)) |
dev | 813 | net/inet/dev.c | dev->set_multicast_list(dev,0,NULL); |
dev | 814 | net/inet/dev.c | if ( (dev->flags & IFF_PROMISC) && ((old_flags & IFF_PROMISC) == 0)) |
dev | 815 | net/inet/dev.c | dev->set_multicast_list(dev,-1,NULL); |
dev | 816 | net/inet/dev.c | if ((old_flags & IFF_UP) && ((dev->flags & IFF_UP) == 0)) { |
dev | 817 | net/inet/dev.c | ret = dev_close(dev); |
dev | 819 | net/inet/dev.c | ret = (! (old_flags & IFF_UP) && (dev->flags & IFF_UP)) |
dev | 820 | net/inet/dev.c | ? dev_open(dev) : 0; |
dev | 825 | net/inet/dev.c | &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 827 | net/inet/dev.c | &ifr.ifr_addr).sin_family = dev->family; |
dev | 834 | net/inet/dev.c | dev->pa_addr = (*(struct sockaddr_in *) |
dev | 836 | net/inet/dev.c | dev->family = ifr.ifr_addr.sa_family; |
dev | 837 | net/inet/dev.c | dev->pa_mask = get_mask(dev->pa_addr); |
dev | 838 | net/inet/dev.c | dev->pa_brdaddr = dev->pa_addr | ~dev->pa_mask; |
dev | 843 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_addr.s_addr = dev->pa_brdaddr; |
dev | 845 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_family = dev->family; |
dev | 852 | net/inet/dev.c | dev->pa_brdaddr = (*(struct sockaddr_in *) |
dev | 858 | net/inet/dev.c | &ifr.ifr_dstaddr).sin_addr.s_addr = dev->pa_dstaddr; |
dev | 860 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_family = dev->family; |
dev | 867 | net/inet/dev.c | dev->pa_dstaddr = (*(struct sockaddr_in *) |
dev | 873 | net/inet/dev.c | &ifr.ifr_netmask).sin_addr.s_addr = dev->pa_mask; |
dev | 875 | net/inet/dev.c | &ifr.ifr_netmask).sin_family = dev->family; |
dev | 882 | net/inet/dev.c | dev->pa_mask = (*(struct sockaddr_in *) |
dev | 887 | net/inet/dev.c | ifr.ifr_metric = dev->metric; |
dev | 892 | net/inet/dev.c | dev->metric = ifr.ifr_metric; |
dev | 896 | net/inet/dev.c | ifr.ifr_mtu = dev->mtu; |
dev | 901 | net/inet/dev.c | dev->mtu = ifr.ifr_mtu; |
dev | 913 | net/inet/dev.c | memcpy(ifr.ifr_hwaddr,dev->dev_addr, MAX_ADDR_LEN); |
dev | 929 | net/inet/dev.c | struct ddi_device *dev; |
dev | 935 | net/inet/dev.c | struct device *dev; |
dev | 951 | net/inet/dev.c | dev = dev_get( loopback ? "lo" : ipc.name); |
dev | 952 | net/inet/dev.c | if (dev == NULL) |
dev | 955 | net/inet/dev.c | dev->pa_addr = ipc.paddr; |
dev | 956 | net/inet/dev.c | dev->family = AF_INET; |
dev | 957 | net/inet/dev.c | dev->pa_mask = get_mask(dev->pa_addr); |
dev | 958 | net/inet/dev.c | dev->pa_brdaddr = dev->pa_addr | ~dev->pa_mask; |
dev | 960 | net/inet/dev.c | dev->flags |= IFF_BROADCAST; |
dev | 961 | net/inet/dev.c | dev->pa_brdaddr = ipc.net; |
dev | 966 | net/inet/dev.c | return (dev->flags & IFF_UP != 0) ? dev_close(dev) : 0; |
dev | 968 | net/inet/dev.c | if ((dev->flags & IFF_UP) == 0 |
dev | 969 | net/inet/dev.c | && (retval = dev_open(dev)) != 0) |
dev | 971 | net/inet/dev.c | printk("%s: adding HOST route of %8.8lx.\n", dev->name, |
dev | 973 | net/inet/dev.c | rt_add(RTF_HOST, ipc.paddr, 0, dev); |
dev | 975 | net/inet/dev.c | rt_add(RTF_GATEWAY, ipc.paddr, ipc.router, dev); |
dev | 977 | net/inet/dev.c | dev->name, htonl(ipc.paddr)); |
dev | 1009 | net/inet/dev.c | dev = ddi_map(iflink.id); |
dev | 1010 | net/inet/dev.c | if (dev == NULL) return(-EINVAL); |
dev | 1014 | net/inet/dev.c | dev->name, iflink.stream); |
dev | 1029 | net/inet/dev.c | struct device *dev, *dev2; |
dev | 1037 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev=dev->next) { |
dev | 1038 | net/inet/dev.c | if (dev->init && dev->init(dev)) { |
dev | 1039 | net/inet/dev.c | if (dev2 == NULL) dev_base = dev->next; |
dev | 1040 | net/inet/dev.c | else dev2->next = dev->next; |
dev | 1042 | net/inet/dev.c | dev2 = dev; |
dev | 76 | net/inet/dev.h | int (*init)(struct device *dev); |
dev | 83 | net/inet/dev.h | struct enet_statistics* (*get_stats)(struct device *dev); |
dev | 117 | net/inet/dev.h | int (*open)(struct device *dev); |
dev | 118 | net/inet/dev.h | int (*stop)(struct device *dev); |
dev | 120 | net/inet/dev.h | struct device *dev); |
dev | 122 | net/inet/dev.h | struct device *dev, |
dev | 129 | net/inet/dev.h | struct device *dev); |
dev | 131 | net/inet/dev.h | struct device *dev, int pri); |
dev | 132 | net/inet/dev.h | int (*rebuild_header)(void *eth, struct device *dev); |
dev | 134 | net/inet/dev.h | struct device *dev); |
dev | 136 | net/inet/dev.h | void (*set_multicast_list)(struct device *dev, |
dev | 139 | net/inet/dev.h | int (*set_mac_address)(struct device *dev, void *addr); |
dev | 173 | net/inet/dev.h | extern int dev_open(struct device *dev); |
dev | 174 | net/inet/dev.h | extern int dev_close(struct device *dev); |
dev | 175 | net/inet/dev.h | extern void dev_queue_xmit(struct sk_buff *skb, struct device *dev, |
dev | 181 | net/inet/dev.h | struct device * dev); |
dev | 185 | net/inet/dev.h | extern void dev_tint(struct device *dev); |
dev | 97 | net/inet/eth.c | eth_header(unsigned char *buff, struct device *dev, unsigned short type, |
dev | 110 | net/inet/eth.c | if (dev->flags & IFF_LOOPBACK) { |
dev | 112 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 113 | net/inet/eth.c | memset(eth->h_dest, 0, dev->addr_len); |
dev | 114 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 120 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 121 | net/inet/eth.c | memcpy(eth->h_dest, dev->broadcast, dev->addr_len); |
dev | 122 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 127 | net/inet/eth.c | if (arp_find(eth->h_dest, daddr, dev, saddr)) |
dev | 132 | net/inet/eth.c | return(-dev->hard_header_len); |
dev | 136 | net/inet/eth.c | memcpy(eth->h_source,dev->dev_addr,dev->addr_len); /* This was missing causing chaos if the |
dev | 139 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 146 | net/inet/eth.c | eth_rebuild_header(void *buff, struct device *dev) |
dev | 158 | net/inet/eth.c | if (arp_find(eth->h_dest, dst, dev, src)) return(1); |
dev | 159 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 166 | net/inet/eth.c | eth_add_arp(unsigned long addr, struct sk_buff *skb, struct device *dev) |
dev | 171 | net/inet/eth.c | arp_add(addr, eth->h_source, dev); |
dev | 177 | net/inet/eth.c | eth_type_trans(struct sk_buff *skb, struct device *dev) |
dev | 27 | net/inet/eth.h | extern int eth_header(unsigned char *buff, struct device *dev, |
dev | 30 | net/inet/eth.h | extern int eth_rebuild_header(void *buff, struct device *dev); |
dev | 32 | net/inet/eth.h | struct device *dev); |
dev | 33 | net/inet/eth.h | extern unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev); |
dev | 80 | net/inet/icmp.c | icmp_send(struct sk_buff *skb_in, int type, int code, struct device *dev) |
dev | 89 | net/inet/icmp.c | skb_in, type, code, dev)); |
dev | 92 | net/inet/icmp.c | len = sizeof(struct sk_buff) + dev->hard_header_len + |
dev | 107 | net/inet/icmp.c | iph = (struct iphdr *) ((unsigned char *) iph + dev->hard_header_len); |
dev | 110 | net/inet/icmp.c | offset = ip_build_header(skb, dev->pa_addr, iph->saddr, |
dev | 111 | net/inet/icmp.c | &dev, IPPROTO_ICMP, NULL, len); |
dev | 134 | net/inet/icmp.c | ip_queue_xmit(NULL, dev, skb, 1); |
dev | 204 | net/inet/icmp.c | icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev) |
dev | 214 | net/inet/icmp.c | ip, icmph->un.gateway, dev); |
dev | 218 | net/inet/icmp.c | ip, icmph->un.gateway, dev); |
dev | 236 | net/inet/icmp.c | icmp_echo(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 244 | net/inet/icmp.c | size = sizeof(struct sk_buff) + dev->hard_header_len + 64 + len; |
dev | 257 | net/inet/icmp.c | offset = ip_build_header(skb2, daddr, saddr, &dev, |
dev | 279 | net/inet/icmp.c | ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); |
dev | 288 | net/inet/icmp.c | icmp_info(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 300 | net/inet/icmp.c | icmp_address(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 308 | net/inet/icmp.c | size = sizeof(struct sk_buff) + dev->hard_header_len + 64 + len; |
dev | 321 | net/inet/icmp.c | offset = ip_build_header(skb2, daddr, saddr, &dev, |
dev | 341 | net/inet/icmp.c | memcpy((char *) (icmphr + 1), (char *) &dev->pa_mask, sizeof(dev->pa_mask)); |
dev | 346 | net/inet/icmp.c | ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); |
dev | 355 | net/inet/icmp.c | icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt, |
dev | 392 | net/inet/icmp.c | icmp_redirect(icmph, skb1, dev); |
dev | 395 | net/inet/icmp.c | icmp_echo(icmph, skb1, dev, saddr, daddr, len, opt); |
dev | 402 | net/inet/icmp.c | icmp_info(icmph, skb1, dev, saddr, daddr, len, opt); |
dev | 409 | net/inet/icmp.c | icmp_address(icmph, skb1, dev, saddr, daddr, len, opt); |
dev | 27 | net/inet/icmp.h | struct device *dev); |
dev | 28 | net/inet/icmp.h | extern int icmp_rcv(struct sk_buff *skb1, struct device *dev, |
dev | 172 | net/inet/ip.c | ip_send(struct sk_buff *skb, unsigned long daddr, int len, struct device *dev, |
dev | 181 | net/inet/ip.c | if (dev->hard_header) { |
dev | 182 | net/inet/ip.c | mac = dev->hard_header(ptr, dev, ETH_P_IP, daddr, saddr, len); |
dev | 188 | net/inet/ip.c | skb->dev = dev; |
dev | 201 | net/inet/ip.c | struct device **dev, int type, struct options *opt, int len) |
dev | 216 | net/inet/ip.c | skb, saddr, daddr, *dev, type, opt, len)); |
dev | 221 | net/inet/ip.c | if (*dev == NULL) { |
dev | 226 | net/inet/ip.c | *dev = rt->rt_dev; |
dev | 242 | net/inet/ip.c | tmp = ip_send(skb, raddr, len, *dev, saddr); |
dev | 246 | net/inet/ip.c | skb->dev = *dev; |
dev | 636 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->dev); |
dev | 650 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
dev | 692 | net/inet/ip.c | qp->dev = dev; |
dev | 804 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
dev | 844 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
dev | 853 | net/inet/ip.c | ptr = ((unsigned char *) (skb + 1)) + dev->hard_header_len + ihl; |
dev | 955 | net/inet/ip.c | void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag) |
dev | 966 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
dev | 971 | net/inet/ip.c | hlen += dev->hard_header_len; |
dev | 972 | net/inet/ip.c | mtu = (dev->mtu - hlen); |
dev | 977 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
dev | 985 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
dev | 993 | net/inet/ip.c | icmp_send(skb,ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, dev); |
dev | 1006 | net/inet/ip.c | len = (dev->mtu - hlen - 8); |
dev | 1036 | net/inet/ip.c | skb2->h.raw+=dev->hard_header_len; |
dev | 1049 | net/inet/ip.c | ip_queue_xmit(sk, dev, skb2, 1); |
dev | 1060 | net/inet/ip.c | ip_forward(struct sk_buff *skb, struct device *dev, int is_frag) |
dev | 1074 | net/inet/ip.c | if(dev->flags&IFF_PROMISC) |
dev | 1076 | net/inet/ip.c | if(memcmp((char *)&skb[1],dev->dev_addr,dev->addr_len)) |
dev | 1093 | net/inet/ip.c | icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, dev); |
dev | 1109 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_UNREACH, dev); |
dev | 1128 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, dev); |
dev | 1136 | net/inet/ip.c | if (dev == dev2) |
dev | 1183 | net/inet/ip.c | ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 1223 | net/inet/ip.c | ip_forward(skb, dev, is_frag); |
dev | 1240 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
dev | 1250 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 1307 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
dev | 1321 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 1338 | net/inet/ip.c | ip_queue_xmit(struct sock *sk, struct device *dev, |
dev | 1345 | net/inet/ip.c | if (dev == NULL) { |
dev | 1351 | net/inet/ip.c | skb->dev = dev; |
dev | 1356 | net/inet/ip.c | ptr += dev->hard_header_len; |
dev | 1358 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
dev | 1360 | net/inet/ip.c | if(skb->len > dev->mtu) |
dev | 1363 | net/inet/ip.c | ip_fragment(sk,skb,dev,0); |
dev | 1400 | net/inet/ip.c | if (dev->flags & IFF_UP) { |
dev | 1402 | net/inet/ip.c | dev->queue_xmit(skb, dev, sk->priority); |
dev | 1405 | net/inet/ip.c | dev->queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 1418 | net/inet/ip.c | struct device *dev; |
dev | 1423 | net/inet/ip.c | dev = skb->dev; |
dev | 1425 | net/inet/ip.c | if(dev==NULL) |
dev | 1442 | net/inet/ip.c | if (dev->rebuild_header(skb+1, dev)) { |
dev | 1454 | net/inet/ip.c | if (dev->flags & IFF_UP) { |
dev | 1455 | net/inet/ip.c | if (sk) dev->queue_xmit(skb, dev, sk->priority); |
dev | 58 | net/inet/ip.h | struct device *dev; /* Device - for icmp replies */ |
dev | 71 | net/inet/ip.h | struct device **dev, int type, |
dev | 74 | net/inet/ip.h | extern int ip_rcv(struct sk_buff *skb, struct device *dev, |
dev | 77 | net/inet/ip.h | struct device *dev, struct sk_buff *skb, |
dev | 47 | net/inet/loopback.c | loopback_xmit(struct sk_buff *skb, struct device *dev) |
dev | 49 | net/inet/loopback.c | struct enet_statistics *stats = (struct enet_statistics *)dev->priv; |
dev | 52 | net/inet/loopback.c | DPRINTF((DBG_LOOPB, "loopback_xmit(dev=%X, skb=%X)\n", dev, skb)); |
dev | 53 | net/inet/loopback.c | if (skb == NULL || dev == NULL) return(0); |
dev | 56 | net/inet/loopback.c | if (dev->tbusy != 0) { |
dev | 61 | net/inet/loopback.c | dev->tbusy = 1; |
dev | 64 | net/inet/loopback.c | done = dev_rint((unsigned char *)(skb+1), skb->len, 0, dev); |
dev | 68 | net/inet/loopback.c | done = dev_rint(NULL, 0, 0, dev); |
dev | 72 | net/inet/loopback.c | dev->tbusy = 0; |
dev | 93 | net/inet/loopback.c | get_stats(struct device *dev) |
dev | 95 | net/inet/loopback.c | return (struct enet_statistics *)dev->priv; |
dev | 100 | net/inet/loopback.c | loopback_init(struct device *dev) |
dev | 102 | net/inet/loopback.c | dev->mtu = 2000; /* MTU */ |
dev | 103 | net/inet/loopback.c | dev->tbusy = 0; |
dev | 104 | net/inet/loopback.c | dev->hard_start_xmit = loopback_xmit; |
dev | 105 | net/inet/loopback.c | dev->open = NULL; |
dev | 107 | net/inet/loopback.c | dev->hard_header = eth_header; |
dev | 108 | net/inet/loopback.c | dev->add_arp = NULL; |
dev | 109 | net/inet/loopback.c | dev->hard_header_len = ETH_HLEN; /* 14 */ |
dev | 110 | net/inet/loopback.c | dev->addr_len = ETH_ALEN; /* 6 */ |
dev | 111 | net/inet/loopback.c | dev->type = ARPHRD_ETHER; /* 0x0001 */ |
dev | 112 | net/inet/loopback.c | dev->type_trans = eth_type_trans; |
dev | 113 | net/inet/loopback.c | dev->rebuild_header = eth_rebuild_header; |
dev | 115 | net/inet/loopback.c | dev->hard_header_length = 0; |
dev | 116 | net/inet/loopback.c | dev->add_arp = NULL; |
dev | 117 | net/inet/loopback.c | dev->addr_len = 0; |
dev | 118 | net/inet/loopback.c | dev->type = 0; /* loopback_type (0) */ |
dev | 119 | net/inet/loopback.c | dev->hard_header = NULL; |
dev | 120 | net/inet/loopback.c | dev->type_trans = NULL; |
dev | 121 | net/inet/loopback.c | dev->rebuild_header = NULL; |
dev | 123 | net/inet/loopback.c | dev->queue_xmit = dev_queue_xmit; |
dev | 126 | net/inet/loopback.c | dev->flags = IFF_LOOPBACK; |
dev | 127 | net/inet/loopback.c | dev->family = AF_INET; |
dev | 128 | net/inet/loopback.c | dev->pa_addr = in_aton("127.0.0.1"); |
dev | 129 | net/inet/loopback.c | dev->pa_brdaddr = in_aton("127.255.255.255"); |
dev | 130 | net/inet/loopback.c | dev->pa_mask = in_aton("255.0.0.0"); |
dev | 131 | net/inet/loopback.c | dev->pa_alen = sizeof(unsigned long); |
dev | 132 | net/inet/loopback.c | dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL); |
dev | 133 | net/inet/loopback.c | memset(dev->priv, 0, sizeof(struct enet_statistics)); |
dev | 134 | net/inet/loopback.c | dev->get_stats = get_stats; |
dev | 58 | net/inet/packet.c | packet_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 63 | net/inet/packet.c | skb->dev = dev; |
dev | 64 | net/inet/packet.c | skb->len += dev->hard_header_len; |
dev | 89 | net/inet/packet.c | struct device *dev; |
dev | 113 | net/inet/packet.c | dev = dev_get(saddr.sa_data); |
dev | 114 | net/inet/packet.c | if (dev == NULL) { |
dev | 117 | net/inet/packet.c | if(len>dev->mtu) |
dev | 136 | net/inet/packet.c | if (dev->flags & IFF_UP) dev->queue_xmit(skb, dev, sk->priority); |
dev | 222 | net/inet/packet.c | addr.sa_family = skb->dev->type; |
dev | 223 | net/inet/packet.c | memcpy(addr.sa_data,skb->dev->name, 14); |
dev | 31 | net/inet/protocol.h | int (*handler)(struct sk_buff *skb, struct device *dev, |
dev | 35 | net/inet/protocol.h | int (*frag_handler)(struct sk_buff *skb, struct device *dev, |
dev | 90 | net/inet/raw.c | raw_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 98 | net/inet/raw.c | skb, dev, opt, daddr, len, saddr, redo, protocol)); |
dev | 114 | net/inet/raw.c | skb->dev = dev; |
dev | 139 | net/inet/raw.c | struct device *dev=NULL; |
dev | 216 | net/inet/raw.c | sin.sin_addr.s_addr, &dev, |
dev | 243 | net/inet/raw.c | if(dev!=NULL && skb->len > 4095) |
dev | 250 | net/inet/raw.c | sk->prot->queue_xmit(sk, dev, skb, 1); |
dev | 26 | net/inet/raw.h | extern int raw_rcv(struct sk_buff *skb, struct device *dev, |
dev | 103 | net/inet/route.c | rt_flush(struct device *dev) |
dev | 108 | net/inet/route.c | DPRINTF((DBG_RT, "RT: flushing for dev 0x%08lx (%s)\n", (long)dev, dev->name)); |
dev | 117 | net/inet/route.c | if (r->rt_dev == dev) |
dev | 138 | net/inet/route.c | rt_add(short flags, unsigned long dst, unsigned long gw, struct device *dev) |
dev | 159 | net/inet/route.c | if (gw==dev->pa_addr || gw==dst) |
dev | 167 | net/inet/route.c | rt->rt_dev = dev; |
dev | 182 | net/inet/route.c | rt->rt_dst = (dst & dev->pa_mask); |
dev | 183 | net/inet/route.c | mask=dev->pa_mask; |
dev | 185 | net/inet/route.c | if(rt->rt_dst == (dev->pa_addr & dev->pa_mask)) |
dev | 287 | net/inet/route.c | struct device *dev; |
dev | 306 | net/inet/route.c | dev = dev_check(((struct sockaddr_in *) &r->rt_dst)->sin_addr.s_addr); |
dev | 310 | net/inet/route.c | dev = rt->rt_dev; |
dev | 312 | net/inet/route.c | dev = NULL; |
dev | 318 | net/inet/route.c | r->rt_flags, dev, (dev == NULL) ? "NONE" : dev->name)); |
dev | 320 | net/inet/route.c | if (dev == NULL) return(-ENETUNREACH); |
dev | 323 | net/inet/route.c | (*(struct sockaddr_in *) &r->rt_gateway).sin_addr.s_addr, dev); |
dev | 412 | net/inet/route.c | struct device *dev; |
dev | 434 | net/inet/route.c | dev = dev_get(namebuf); |
dev | 435 | net/inet/route.c | rt.rt_dev = dev; |
dev | 38 | net/inet/route.h | extern void rt_flush(struct device *dev); |
dev | 40 | net/inet/route.h | unsigned long gw, struct device *dev); |
dev | 49 | net/inet/skbuff.h | struct device *dev; |
dev | 386 | net/inet/sock.c | skb->dev = NULL; |
dev | 1683 | net/inet/sock.c | if (sk->prot->rcv) sk->prot->rcv(skb, skb->dev, sk->opt, |
dev | 179 | net/inet/sock.h | struct device **dev, int type, |
dev | 185 | net/inet/sock.h | struct device *dev, struct sk_buff *skb, |
dev | 190 | net/inet/sock.h | int (*rcv)(struct sk_buff *buff, struct device *dev, |
dev | 583 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb,0); |
dev | 597 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 624 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev, |
dev | 665 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 706 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 889 | net/inet/tcp.c | tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev, |
dev | 899 | net/inet/tcp.c | skb->dev = dev; |
dev | 946 | net/inet/tcp.c | prot->queue_xmit(sk, dev, skb,0); |
dev | 980 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 1010 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 1037 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 1453 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 1485 | net/inet/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
dev | 1498 | net/inet/tcp.c | buff->dev = dev; |
dev | 1522 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 1572 | net/inet/tcp.c | struct proto *prot, struct options *opt, struct device *dev) |
dev | 1591 | net/inet/tcp.c | buff->dev = dev; |
dev | 1596 | net/inet/tcp.c | tmp = prot->build_header(buff, saddr, daddr, &dev, IPPROTO_TCP, opt, |
dev | 1635 | net/inet/tcp.c | prot->queue_xmit(NULL, dev, buff, 1); |
dev | 1700 | net/inet/tcp.c | struct options *opt, struct device *dev) |
dev | 1711 | net/inet/tcp.c | sk, skb, daddr, saddr, opt, dev)); |
dev | 1720 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
dev | 1807 | net/inet/tcp.c | newsk->mtu = dev->mtu - HEADER_SIZE; |
dev | 1811 | net/inet/tcp.c | newsk->mtu = dev->mtu - HEADER_SIZE; |
dev | 1814 | net/inet/tcp.c | dev->mtu - HEADER_SIZE); |
dev | 1837 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &dev, |
dev | 1877 | net/inet/tcp.c | ptr[2] =((dev->mtu - HEADER_SIZE) >> 8) & 0xff; |
dev | 1878 | net/inet/tcp.c | ptr[3] =(dev->mtu - HEADER_SIZE) & 0xff; |
dev | 1881 | net/inet/tcp.c | newsk->prot->queue_xmit(newsk, dev, buff, 0); |
dev | 1903 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 2000 | net/inet/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
dev | 2012 | net/inet/tcp.c | buff->dev = dev; |
dev | 2029 | net/inet/tcp.c | prot->queue_xmit(sk, dev, buff, 0); |
dev | 2093 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, skb->free); |
dev | 2197 | net/inet/tcp.c | if (skb->dev->buffs[i] == skb) { |
dev | 2199 | net/inet/tcp.c | skb->dev->buffs[i] = NULL; |
dev | 2201 | net/inet/tcp.c | skb->dev->buffs[i] = skb->next; |
dev | 2424 | net/inet/tcp.c | sk->prot, NULL, skb->dev); |
dev | 2668 | net/inet/tcp.c | unsigned long saddr, struct device *dev) |
dev | 2671 | net/inet/tcp.c | sk, th, saddr, dev)); |
dev | 2768 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 2815 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 2843 | net/inet/tcp.c | ptr[2] = (dev->mtu- HEADER_SIZE) >> 8; |
dev | 2844 | net/inet/tcp.c | ptr[3] = (dev->mtu- HEADER_SIZE) & 0xff; |
dev | 2845 | net/inet/tcp.c | sk->mtu = dev->mtu - HEADER_SIZE; |
dev | 2855 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 2912 | net/inet/tcp.c | tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 2933 | net/inet/tcp.c | if (!dev) { |
dev | 2972 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev); |
dev | 3098 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
dev | 3122 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
dev | 3148 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
dev | 3161 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
dev | 3170 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
dev | 3182 | net/inet/tcp.c | tcp_conn_request(sk, skb, daddr, saddr, opt, dev); |
dev | 3216 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
dev | 3239 | net/inet/tcp.c | sk->prot, opt,dev); |
dev | 3264 | net/inet/tcp.c | sk->prot, opt, dev); |
dev | 3297 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
dev | 3320 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
dev | 3336 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 3356 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 3389 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 140 | net/inet/tcp.h | extern int tcp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 219 | net/inet/udp.c | struct device *dev; |
dev | 248 | net/inet/udp.c | dev = NULL; |
dev | 250 | net/inet/udp.c | saddr, sin->sin_addr.s_addr, dev, IPPROTO_UDP, skb->mem_len)); |
dev | 252 | net/inet/udp.c | &dev, IPPROTO_UDP, sk->opt, skb->mem_len); |
dev | 260 | net/inet/udp.c | saddr = dev->pa_addr; |
dev | 264 | net/inet/udp.c | skb->dev = dev; |
dev | 271 | net/inet/udp.c | if (len > dev->mtu) { |
dev | 276 | net/inet/udp.c | printk("UDP: send: length %d > mtu %d (ignored)\n", len, dev->mtu); |
dev | 295 | net/inet/udp.c | sk->prot->queue_xmit(sk, dev, skb, 1); |
dev | 546 | net/inet/udp.c | udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 559 | net/inet/udp.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, dev); |
dev | 579 | net/inet/udp.c | skb->dev = dev; |
dev | 43 | net/inet/udp.h | extern int udp_rcv(struct sk_buff *skb, struct device *dev, |