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 | 212 | drivers/block/blk.h | #define CURRENT_DEV DEVICE_NR(CURRENT->dev) |
dev | 254 | drivers/block/blk.h | (unsigned long)req->dev, req->sector); |
dev | 276 | drivers/block/blk.h | DEVICE_OFF(req->dev); |
dev | 284 | drivers/block/blk.h | req->dev = -1; |
dev | 300 | drivers/block/blk.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 982 | drivers/block/cdu31a.c | unsigned int dev; |
dev | 1004 | drivers/block/cdu31a.c | if (!(CURRENT) || CURRENT->dev < 0) |
dev | 1010 | drivers/block/cdu31a.c | dev = MINOR(CURRENT->dev); |
dev | 1013 | drivers/block/cdu31a.c | if (dev != 0) |
dev | 1280 | drivers/block/cdu31a.c | unsigned int dev; |
dev | 1291 | drivers/block/cdu31a.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 1292 | drivers/block/cdu31a.c | if (dev != 0) |
dev | 239 | drivers/block/floppy.c | (CURRENT->dev)) |
dev | 679 | drivers/block/floppy.c | int drive = MINOR(CURRENT->dev); |
dev | 997 | drivers/block/floppy.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 1011 | 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 | 283 | drivers/block/hd.c | int dev; |
dev | 287 | drivers/block/hd.c | dev = MINOR(CURRENT->dev) >> 6; |
dev | 290 | drivers/block/hd.c | recalibrate[dev] = 1; |
dev | 294 | drivers/block/hd.c | recalibrate[dev] = 1; |
dev | 344 | drivers/block/hd.c | MINOR(CURRENT->dev), CURRENT->sector, i, CURRENT-> |
dev | 445 | drivers/block/hd.c | unsigned int block,dev; |
dev | 449 | drivers/block/hd.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 457 | drivers/block/hd.c | dev = MINOR(CURRENT->dev); |
dev | 460 | drivers/block/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
dev | 463 | drivers/block/hd.c | block, hd[dev].nr_sects); |
dev | 468 | drivers/block/hd.c | block += hd[dev].start_sect; |
dev | 469 | drivers/block/hd.c | dev >>= 6; |
dev | 470 | drivers/block/hd.c | sec = block % hd_info[dev].sect + 1; |
dev | 471 | drivers/block/hd.c | track = block / hd_info[dev].sect; |
dev | 472 | drivers/block/hd.c | head = track % hd_info[dev].head; |
dev | 473 | drivers/block/hd.c | cyl = track / hd_info[dev].head; |
dev | 476 | drivers/block/hd.c | dev, cyl, head, sec, CURRENT->buffer); |
dev | 488 | drivers/block/hd.c | if (recalibrate[dev]) { |
dev | 489 | drivers/block/hd.c | recalibrate[dev] = 0; |
dev | 490 | drivers/block/hd.c | hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr); |
dev | 497 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr); |
dev | 510 | drivers/block/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr); |
dev | 523 | drivers/block/hd.c | int dev, err; |
dev | 527 | drivers/block/hd.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 528 | drivers/block/hd.c | if (dev >= NR_HD) |
dev | 536 | drivers/block/hd.c | put_fs_byte(hd_info[dev].head, |
dev | 538 | drivers/block/hd.c | put_fs_byte(hd_info[dev].sect, |
dev | 540 | drivers/block/hd.c | put_fs_word(hd_info[dev].cyl, |
dev | 755 | drivers/block/hd.c | static int revalidate_hddisk(int dev, int maxusage) |
dev | 763 | drivers/block/hd.c | target = DEVICE_NR(MINOR(dev)); |
dev | 82 | drivers/block/ll_rw_blk.c | static inline struct request * get_request(int n, int dev) |
dev | 98 | drivers/block/ll_rw_blk.c | if (req->dev < 0) |
dev | 104 | drivers/block/ll_rw_blk.c | req->dev = dev; |
dev | 113 | drivers/block/ll_rw_blk.c | static inline struct request * get_request_wait(int n, int dev) |
dev | 117 | drivers/block/ll_rw_blk.c | while ((req = get_request(n, dev)) == NULL) |
dev | 126 | drivers/block/ll_rw_blk.c | int is_read_only(int dev) |
dev | 130 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 131 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 136 | drivers/block/ll_rw_blk.c | void set_device_ro(int dev,int flag) |
dev | 140 | drivers/block/ll_rw_blk.c | major = MAJOR(dev); |
dev | 141 | drivers/block/ll_rw_blk.c | minor = MINOR(dev); |
dev | 152 | drivers/block/ll_rw_blk.c | static void add_request(struct blk_dev_struct * dev, struct request * req) |
dev | 160 | drivers/block/ll_rw_blk.c | if (!(tmp = dev->current_request)) { |
dev | 161 | drivers/block/ll_rw_blk.c | dev->current_request = req; |
dev | 162 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 176 | drivers/block/ll_rw_blk.c | if (scsi_major(MAJOR(req->dev))) |
dev | 177 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 239 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 253 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 306 | drivers/block/ll_rw_blk.c | void ll_rw_page(int rw, int dev, int page, char * buffer) |
dev | 309 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 312 | drivers/block/ll_rw_blk.c | printk("Trying to read nonexistent block-device %04x (%d)\n",dev,page*8); |
dev | 317 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 318 | drivers/block/ll_rw_blk.c | printk("Can't page to read-only device 0x%X\n",dev); |
dev | 322 | drivers/block/ll_rw_blk.c | req = get_request_wait(NR_REQUEST, dev); |
dev | 349 | drivers/block/ll_rw_blk.c | struct blk_dev_struct * dev; |
dev | 359 | drivers/block/ll_rw_blk.c | dev = NULL; |
dev | 361 | drivers/block/ll_rw_blk.c | dev = blk_dev + major; |
dev | 362 | drivers/block/ll_rw_blk.c | if (!dev || !dev->request_fn) { |
dev | 399 | drivers/block/ll_rw_blk.c | if (!dev->current_request && nr > 1) { |
dev | 400 | drivers/block/ll_rw_blk.c | dev->current_request = &plug; |
dev | 401 | drivers/block/ll_rw_blk.c | plug.dev = -1; |
dev | 418 | drivers/block/ll_rw_blk.c | dev->current_request = plug.next; |
dev | 419 | drivers/block/ll_rw_blk.c | (dev->request_fn)(); |
dev | 432 | drivers/block/ll_rw_blk.c | void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf) |
dev | 437 | drivers/block/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 448 | drivers/block/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 449 | drivers/block/ll_rw_blk.c | printk("Can't swap to read-only device 0x%X\n",dev); |
dev | 458 | drivers/block/ll_rw_blk.c | req = get_request_wait(NR_REQUEST, dev); |
dev | 481 | 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 | 2342 | drivers/block/sbpcd.c | int dev; |
dev | 2350 | drivers/block/sbpcd.c | if ((CURRENT==NULL)||(CURRENT->dev<0)) return; |
dev | 2353 | drivers/block/sbpcd.c | dev = MINOR(CURRENT->dev); |
dev | 2354 | drivers/block/sbpcd.c | if ( (dev<0) || (dev>=NR_SBPCD) ) |
dev | 2356 | drivers/block/sbpcd.c | DPRINTF((DBG_INF,"SBPCD: do_request: bad device: %d\n", dev)); |
dev | 2359 | drivers/block/sbpcd.c | switch_drive(dev); |
dev | 161 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 163 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 164 | drivers/block/xd.c | while (!xd_valid[dev]) |
dev | 167 | drivers/block/xd.c | xd_access[dev]++; |
dev | 185 | drivers/block/xd.c | if (CURRENT_DEV < xd_drives && CURRENT->sector + CURRENT->nr_sectors <= xd[MINOR(CURRENT->dev)].nr_sects) { |
dev | 186 | drivers/block/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
dev | 205 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)),err; |
dev | 207 | drivers/block/xd.c | if (inode && (dev < xd_drives)) |
dev | 212 | drivers/block/xd.c | put_fs_byte(xd_info[dev].heads,(char *) &geometry->heads); |
dev | 213 | drivers/block/xd.c | put_fs_byte(xd_info[dev].sectors,(char *) &geometry->sectors); |
dev | 214 | drivers/block/xd.c | put_fs_word(xd_info[dev].cylinders,(short *) &geometry->cylinders); |
dev | 244 | drivers/block/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 246 | drivers/block/xd.c | if (dev < xd_drives) { |
dev | 247 | drivers/block/xd.c | sync_dev(dev); |
dev | 248 | drivers/block/xd.c | xd_access[dev]--; |
dev | 253 | drivers/block/xd.c | static int xd_reread_partitions(int dev) |
dev | 255 | 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 | 243 | drivers/char/tty_io.c | int dev; |
dev | 247 | drivers/char/tty_io.c | dev = MKDEV(TTY_MAJOR,tty->line); |
dev | 251 | drivers/char/tty_io.c | if (filp->f_rdev != dev) |
dev | 1148 | drivers/char/tty_io.c | int i, dev; |
dev | 1151 | drivers/char/tty_io.c | dev = file->f_rdev; |
dev | 1152 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1153 | drivers/char/tty_io.c | printk("tty_read: bad pseudo-major nr #%d\n", MAJOR(dev)); |
dev | 1156 | drivers/char/tty_io.c | dev = MINOR(dev); |
dev | 1157 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1168 | drivers/char/tty_io.c | (current->tty == dev) && |
dev | 1189 | drivers/char/tty_io.c | int dev, i, is_console; |
dev | 1192 | drivers/char/tty_io.c | dev = file->f_rdev; |
dev | 1194 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1198 | drivers/char/tty_io.c | dev = MINOR(dev); |
dev | 1202 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1207 | drivers/char/tty_io.c | (current->tty == dev) && (tty->pgrp != current->pgrp)) { |
dev | 1231 | drivers/char/tty_io.c | static int init_dev(int dev) |
dev | 1238 | drivers/char/tty_io.c | o_dev = PTY_OTHER(dev); |
dev | 1244 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev) && tty_table[dev] && tty_table[dev]->count) |
dev | 1247 | drivers/char/tty_io.c | if (!tty_table[dev] && !tty) { |
dev | 1250 | drivers/char/tty_io.c | initialize_tty_struct(dev, tty); |
dev | 1253 | drivers/char/tty_io.c | if (!tty_termios[dev] && !tp) { |
dev | 1258 | drivers/char/tty_io.c | initialize_termios(dev, tp); |
dev | 1261 | drivers/char/tty_io.c | if (!termios_locked[dev] && !ltp) { |
dev | 1269 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1297 | drivers/char/tty_io.c | if (!tty_termios[dev]) { |
dev | 1298 | drivers/char/tty_io.c | tty_termios[dev] = tp; |
dev | 1301 | drivers/char/tty_io.c | if (!tty_table[dev]) { |
dev | 1302 | drivers/char/tty_io.c | tty->termios = tty_termios[dev]; |
dev | 1303 | drivers/char/tty_io.c | tty_table[dev] = tty; |
dev | 1306 | drivers/char/tty_io.c | if (!termios_locked[dev]) { |
dev | 1307 | drivers/char/tty_io.c | termios_locked[dev] = ltp; |
dev | 1310 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1324 | drivers/char/tty_io.c | tty_table[dev]->link = tty_table[o_dev]; |
dev | 1325 | drivers/char/tty_io.c | tty_table[o_dev]->link = tty_table[dev]; |
dev | 1327 | drivers/char/tty_io.c | tty_table[dev]->count++; |
dev | 1328 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev)) |
dev | 1352 | drivers/char/tty_io.c | static void release_dev(int dev, struct file * filp) |
dev | 1358 | drivers/char/tty_io.c | tty = tty_table[dev]; |
dev | 1359 | drivers/char/tty_io.c | tp = tty_termios[dev]; |
dev | 1363 | drivers/char/tty_io.c | printk("release_dev: tty_table[%d] was NULL\n", dev); |
dev | 1367 | drivers/char/tty_io.c | printk("release_dev: tty_termios[%d] was NULL\n", dev); |
dev | 1371 | drivers/char/tty_io.c | printk("release_dev of tty%d (tty count=%d)...", dev, tty->count); |
dev | 1373 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1374 | drivers/char/tty_io.c | o_tty = tty_table[PTY_OTHER(dev)]; |
dev | 1375 | drivers/char/tty_io.c | o_tp = tty_termios[PTY_OTHER(dev)]; |
dev | 1377 | drivers/char/tty_io.c | printk("release_dev: pty pair(%d) was NULL\n", dev); |
dev | 1381 | drivers/char/tty_io.c | printk("release_dev: pty pair(%d) termios was NULL\n", dev); |
dev | 1392 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 1395 | drivers/char/tty_io.c | dev, tty->count); |
dev | 1401 | drivers/char/tty_io.c | dev, tty->count); |
dev | 1433 | drivers/char/tty_io.c | tty_table[PTY_OTHER(dev)] = NULL; |
dev | 1434 | drivers/char/tty_io.c | tty_termios[PTY_OTHER(dev)] = NULL; |
dev | 1437 | drivers/char/tty_io.c | tty_table[dev] = NULL; |
dev | 1438 | drivers/char/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1439 | drivers/char/tty_io.c | tty_termios[dev] = NULL; |
dev | 1557 | drivers/char/tty_io.c | int dev; |
dev | 1559 | drivers/char/tty_io.c | dev = filp->f_rdev; |
dev | 1560 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1564 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1565 | drivers/char/tty_io.c | if (!dev) { |
dev | 1569 | drivers/char/tty_io.c | release_dev(dev, filp); |
dev | 1574 | drivers/char/tty_io.c | int dev; |
dev | 1577 | drivers/char/tty_io.c | dev = filp->f_rdev; |
dev | 1578 | drivers/char/tty_io.c | if (MAJOR(dev) != TTY_MAJOR) { |
dev | 1582 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1583 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1585 | drivers/char/tty_io.c | printk("tty_select: tty struct for dev %d was NULL\n", dev); |
dev | 344 | drivers/char/tty_ioctl.c | int dev; |
dev | 352 | drivers/char/tty_ioctl.c | dev = MINOR(file->f_rdev); |
dev | 353 | drivers/char/tty_ioctl.c | tty = TTY_TABLE(dev); |
dev | 356 | drivers/char/tty_ioctl.c | if (IS_A_PTY(dev)) |
dev | 357 | drivers/char/tty_ioctl.c | other_tty = tty_table[PTY_OTHER(dev)]; |
dev | 360 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 362 | drivers/char/tty_ioctl.c | termios_dev = PTY_OTHER(dev); |
dev | 365 | drivers/char/tty_ioctl.c | termios_dev = dev; |
dev | 406 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
dev | 431 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
dev | 476 | drivers/char/tty_ioctl.c | if (p->tty == dev) |
dev | 481 | drivers/char/tty_ioctl.c | current->tty = dev; |
dev | 530 | drivers/char/tty_ioctl.c | if ((current->tty != dev) && !suser()) |
dev | 547 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 570 | drivers/char/tty_ioctl.c | if (IS_A_CONSOLE(dev)) { |
dev | 580 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 582 | drivers/char/tty_ioctl.c | else if (IS_A_PTY_SLAVE(dev)) |
dev | 595 | drivers/char/tty_ioctl.c | if (current->tty != dev) |
dev | 609 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
dev | 633 | drivers/char/tty_ioctl.c | if (!IS_A_PTY_MASTER(dev)) |
dev | 648 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
dev | 59 | drivers/net/3c501.c | int el1_probe(struct device *dev); |
dev | 60 | drivers/net/3c501.c | static int el_open(struct device *dev); |
dev | 61 | drivers/net/3c501.c | static int el_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 63 | drivers/net/3c501.c | static void el_receive(struct device *dev); |
dev | 64 | drivers/net/3c501.c | static void el_reset(struct device *dev); |
dev | 65 | drivers/net/3c501.c | static int el1_close(struct device *dev); |
dev | 66 | drivers/net/3c501.c | static struct enet_statistics *el1_get_stats(struct device *dev); |
dev | 68 | drivers/net/3c501.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 135 | drivers/net/3c501.c | el1_probe(struct device *dev) |
dev | 142 | drivers/net/3c501.c | eldev = dev; /* Store for debugging. */ |
dev | 143 | drivers/net/3c501.c | el_base = dev->base_addr; |
dev | 168 | drivers/net/3c501.c | if (dev->irq < 2) { |
dev | 181 | drivers/net/3c501.c | printk("%s: 3c501 probe failed to detect IRQ line.\n", dev->name); |
dev | 184 | drivers/net/3c501.c | dev->irq = autoirq; |
dev | 189 | drivers/net/3c501.c | dev->base_addr = el_base; |
dev | 190 | drivers/net/3c501.c | memcpy(dev->dev_addr, station_addr, ETH_ALEN); |
dev | 191 | drivers/net/3c501.c | if (dev->mem_start & 0xf) |
dev | 192 | drivers/net/3c501.c | el_debug = dev->mem_start & 0x7; |
dev | 195 | drivers/net/3c501.c | dev->name, dev->base_addr, autoirq ? "auto":"assigned ", dev->irq); |
dev | 201 | drivers/net/3c501.c | dev->open = &el_open; |
dev | 202 | drivers/net/3c501.c | dev->hard_start_xmit = &el_start_xmit; |
dev | 203 | drivers/net/3c501.c | dev->stop = &el1_close; |
dev | 204 | drivers/net/3c501.c | dev->get_stats = &el1_get_stats; |
dev | 206 | drivers/net/3c501.c | dev->set_multicast_list = &set_multicast_list; |
dev | 211 | drivers/net/3c501.c | dev->buffs[i] = NULL; |
dev | 213 | drivers/net/3c501.c | dev->hard_header = eth_header; |
dev | 214 | drivers/net/3c501.c | dev->add_arp = eth_add_arp; |
dev | 215 | drivers/net/3c501.c | dev->queue_xmit = dev_queue_xmit; |
dev | 216 | drivers/net/3c501.c | dev->rebuild_header = eth_rebuild_header; |
dev | 217 | drivers/net/3c501.c | dev->type_trans = eth_type_trans; |
dev | 219 | drivers/net/3c501.c | dev->type = ARPHRD_ETHER; |
dev | 220 | drivers/net/3c501.c | dev->hard_header_len = ETH_HLEN; |
dev | 221 | drivers/net/3c501.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 222 | drivers/net/3c501.c | dev->addr_len = ETH_ALEN; |
dev | 224 | drivers/net/3c501.c | dev->broadcast[i]=0xff; |
dev | 228 | drivers/net/3c501.c | dev->flags = IFF_BROADCAST; |
dev | 229 | drivers/net/3c501.c | dev->family = AF_INET; |
dev | 230 | drivers/net/3c501.c | dev->pa_addr = 0; |
dev | 231 | drivers/net/3c501.c | dev->pa_brdaddr = 0; |
dev | 232 | drivers/net/3c501.c | dev->pa_mask = 0; |
dev | 233 | drivers/net/3c501.c | dev->pa_alen = sizeof(unsigned long); |
dev | 240 | drivers/net/3c501.c | el_open(struct device *dev) |
dev | 244 | drivers/net/3c501.c | printk("%s: Doing el_open()...", dev->name); |
dev | 246 | drivers/net/3c501.c | if (request_irq(dev->irq, &el_interrupt)) { |
dev | 251 | drivers/net/3c501.c | irq2dev_map[dev->irq] = dev; |
dev | 253 | drivers/net/3c501.c | el_reset(dev); |
dev | 255 | drivers/net/3c501.c | dev->start = 1; |
dev | 264 | drivers/net/3c501.c | el_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 267 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 268 | drivers/net/3c501.c | if (jiffies - dev->trans_start < 20) { |
dev | 275 | drivers/net/3c501.c | dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS)); |
dev | 278 | drivers/net/3c501.c | el_reset(dev); |
dev | 285 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 286 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 290 | drivers/net/3c501.c | dev_tint(dev); |
dev | 295 | drivers/net/3c501.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 296 | drivers/net/3c501.c | skb->dev = dev; |
dev | 306 | drivers/net/3c501.c | printk("%s: el_start_xmit(%d)...", dev->name, skb->len); |
dev | 309 | drivers/net/3c501.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 310 | drivers/net/3c501.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 326 | drivers/net/3c501.c | dev->trans_start = jiffies; |
dev | 344 | drivers/net/3c501.c | struct device *dev = eldev; |
dev | 353 | drivers/net/3c501.c | ioaddr = dev->base_addr; |
dev | 358 | drivers/net/3c501.c | printk("%s: el_interrupt() aux=%#02x", dev->name, axsr); |
dev | 359 | drivers/net/3c501.c | if (dev->interrupt) |
dev | 360 | drivers/net/3c501.c | printk("%s: Reentering the interrupt driver!\n", dev->name); |
dev | 361 | drivers/net/3c501.c | dev->interrupt = 1; |
dev | 363 | drivers/net/3c501.c | if (dev->tbusy) { |
dev | 372 | drivers/net/3c501.c | " gp=%03x rp=%03x.\n", dev->name, txsr, axsr, |
dev | 374 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 379 | drivers/net/3c501.c | dev->name); |
dev | 389 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 396 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 416 | drivers/net/3c501.c | dev->name, rxsr); |
dev | 427 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 435 | drivers/net/3c501.c | el_receive(struct device *dev) |
dev | 447 | drivers/net/3c501.c | printk("%s: bogus packet, length=%d\n", dev->name, pkt_len); |
dev | 457 | drivers/net/3c501.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 464 | drivers/net/3c501.c | skb->dev = dev; |
dev | 472 | drivers/net/3c501.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 484 | drivers/net/3c501.c | el_reset(struct device *dev) |
dev | 493 | drivers/net/3c501.c | outb(dev->dev_addr[i], el_base + i); |
dev | 502 | drivers/net/3c501.c | dev->interrupt = 0; |
dev | 503 | drivers/net/3c501.c | dev->tbusy = 0; |
dev | 508 | drivers/net/3c501.c | el1_close(struct device *dev) |
dev | 510 | drivers/net/3c501.c | int ioaddr = dev->base_addr; |
dev | 513 | drivers/net/3c501.c | printk("%s: Shutting down ethercard at %#x.\n", dev->name, ioaddr); |
dev | 515 | drivers/net/3c501.c | dev->tbusy = 1; |
dev | 516 | drivers/net/3c501.c | dev->start = 0; |
dev | 519 | drivers/net/3c501.c | free_irq(dev->irq); |
dev | 521 | drivers/net/3c501.c | irq2dev_map[dev->irq] = 0; |
dev | 527 | drivers/net/3c501.c | el1_get_stats(struct device *dev) |
dev | 540 | 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 | 159 | drivers/net/3c507.c | #define SCB_BASE ((unsigned)64*1024 - (dev->mem_end - dev->mem_start)) |
dev | 194 | drivers/net/3c507.c | #define RX_BUF_END (dev->mem_end - dev->mem_start) |
dev | 275 | drivers/net/3c507.c | extern int el16_probe(struct device *dev); /* Called from Space.c */ |
dev | 277 | drivers/net/3c507.c | static int el16_probe1(struct device *dev, short ioaddr); |
dev | 278 | drivers/net/3c507.c | static int el16_open(struct device *dev); |
dev | 279 | drivers/net/3c507.c | static int el16_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 281 | drivers/net/3c507.c | static void el16_rx(struct device *dev); |
dev | 282 | drivers/net/3c507.c | static int el16_close(struct device *dev); |
dev | 283 | drivers/net/3c507.c | static struct enet_statistics *el16_get_stats(struct device *dev); |
dev | 285 | drivers/net/3c507.c | static void hardware_send_packet(struct device *dev, void *buf, short length); |
dev | 286 | drivers/net/3c507.c | void init_82586_mem(struct device *dev); |
dev | 296 | drivers/net/3c507.c | el16_probe(struct device *dev) |
dev | 300 | drivers/net/3c507.c | int base_addr = dev->base_addr; |
dev | 304 | drivers/net/3c507.c | return el16_probe1(dev, base_addr); |
dev | 324 | drivers/net/3c507.c | && el16_probe1(dev, *port) == 0) |
dev | 335 | drivers/net/3c507.c | && el16_probe1(dev, *port) == 0) |
dev | 343 | drivers/net/3c507.c | int el16_probe1(struct device *dev, short ioaddr) |
dev | 347 | drivers/net/3c507.c | printk("%s: 3c507 at %#x,", dev->name, ioaddr); |
dev | 362 | drivers/net/3c507.c | dev->base_addr = ioaddr; |
dev | 366 | drivers/net/3c507.c | dev->dev_addr[i] = inb(ioaddr + i); |
dev | 367 | drivers/net/3c507.c | printk(" %02x", dev->dev_addr[i]); |
dev | 370 | drivers/net/3c507.c | if ((dev->mem_start & 0xf) > 0) |
dev | 371 | drivers/net/3c507.c | net_debug = dev->mem_start & 7; |
dev | 374 | drivers/net/3c507.c | dev->mem_start = MEM_BASE; |
dev | 375 | drivers/net/3c507.c | dev->mem_end = dev->mem_start + 0x10000; |
dev | 389 | drivers/net/3c507.c | dev->mem_start = base; |
dev | 390 | drivers/net/3c507.c | dev->mem_end = base + size; |
dev | 394 | drivers/net/3c507.c | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; |
dev | 395 | drivers/net/3c507.c | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; |
dev | 397 | drivers/net/3c507.c | printk(", IRQ %d, %sternal xcvr, memory %#x-%#x.\n", dev->irq, |
dev | 398 | drivers/net/3c507.c | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); |
dev | 404 | drivers/net/3c507.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 405 | drivers/net/3c507.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 407 | drivers/net/3c507.c | dev->open = el16_open; |
dev | 408 | drivers/net/3c507.c | dev->stop = el16_close; |
dev | 409 | drivers/net/3c507.c | dev->hard_start_xmit = el16_send_packet; |
dev | 410 | drivers/net/3c507.c | dev->get_stats = el16_get_stats; |
dev | 415 | drivers/net/3c507.c | dev->buffs[i] = NULL; |
dev | 417 | drivers/net/3c507.c | dev->hard_header = eth_header; |
dev | 418 | drivers/net/3c507.c | dev->add_arp = eth_add_arp; |
dev | 419 | drivers/net/3c507.c | dev->queue_xmit = dev_queue_xmit; |
dev | 420 | drivers/net/3c507.c | dev->rebuild_header = eth_rebuild_header; |
dev | 421 | drivers/net/3c507.c | dev->type_trans = eth_type_trans; |
dev | 423 | drivers/net/3c507.c | dev->type = ARPHRD_ETHER; |
dev | 424 | drivers/net/3c507.c | dev->hard_header_len = ETH_HLEN; |
dev | 425 | drivers/net/3c507.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 426 | drivers/net/3c507.c | dev->addr_len = ETH_ALEN; |
dev | 428 | drivers/net/3c507.c | dev->broadcast[i]=0xff; |
dev | 432 | drivers/net/3c507.c | dev->flags = IFF_BROADCAST; |
dev | 433 | drivers/net/3c507.c | dev->family = AF_INET; |
dev | 434 | drivers/net/3c507.c | dev->pa_addr = 0; |
dev | 435 | drivers/net/3c507.c | dev->pa_brdaddr = 0; |
dev | 436 | drivers/net/3c507.c | dev->pa_mask = 0; |
dev | 437 | drivers/net/3c507.c | dev->pa_alen = sizeof(unsigned long); |
dev | 445 | drivers/net/3c507.c | el16_open(struct device *dev) |
dev | 447 | drivers/net/3c507.c | irq2dev_map[dev->irq] = dev; |
dev | 450 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 452 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 453 | drivers/net/3c507.c | dev->interrupt = 0; |
dev | 454 | drivers/net/3c507.c | dev->start = 1; |
dev | 459 | drivers/net/3c507.c | el16_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 461 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 462 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 463 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 465 | drivers/net/3c507.c | if (dev->tbusy) { |
dev | 468 | drivers/net/3c507.c | int tickssofar = jiffies - dev->trans_start; |
dev | 472 | drivers/net/3c507.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 479 | drivers/net/3c507.c | init_82586_mem(dev); |
dev | 487 | drivers/net/3c507.c | dev->tbusy=0; |
dev | 488 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 495 | drivers/net/3c507.c | dev_tint(dev); |
dev | 501 | drivers/net/3c507.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 502 | drivers/net/3c507.c | skb->dev = dev; |
dev | 509 | drivers/net/3c507.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 510 | drivers/net/3c507.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 517 | drivers/net/3c507.c | hardware_send_packet(dev, buf, length); |
dev | 518 | drivers/net/3c507.c | dev->trans_start = jiffies; |
dev | 537 | drivers/net/3c507.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 543 | drivers/net/3c507.c | if (dev == NULL) { |
dev | 547 | drivers/net/3c507.c | dev->interrupt = 1; |
dev | 549 | drivers/net/3c507.c | ioaddr = dev->base_addr; |
dev | 550 | drivers/net/3c507.c | lp = (struct net_local *)dev->priv; |
dev | 551 | drivers/net/3c507.c | shmem = ((ushort*)dev->mem_start); |
dev | 556 | drivers/net/3c507.c | printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); |
dev | 573 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 594 | drivers/net/3c507.c | el16_rx(dev); |
dev | 600 | drivers/net/3c507.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 603 | drivers/net/3c507.c | dev->name, status); |
dev | 610 | drivers/net/3c507.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 616 | drivers/net/3c507.c | dev->name, status); |
dev | 617 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 635 | drivers/net/3c507.c | el16_close(struct device *dev) |
dev | 637 | drivers/net/3c507.c | int ioaddr = dev->base_addr; |
dev | 638 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 640 | drivers/net/3c507.c | dev->tbusy = 1; |
dev | 641 | drivers/net/3c507.c | dev->start = 0; |
dev | 653 | drivers/net/3c507.c | irq2dev_map[dev->irq] = 0; |
dev | 663 | drivers/net/3c507.c | el16_get_stats(struct device *dev) |
dev | 665 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 674 | drivers/net/3c507.c | init_rx_bufs(struct device *dev) |
dev | 676 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 685 | drivers/net/3c507.c | write_ptr = (unsigned short *)(dev->mem_start + cur_rxbuf); |
dev | 713 | drivers/net/3c507.c | (dev->mem_start + lp->rx_tail + 2); |
dev | 720 | drivers/net/3c507.c | init_82586_mem(struct device *dev) |
dev | 722 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 723 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 724 | drivers/net/3c507.c | ushort *shmem = (short*)dev->mem_start; |
dev | 735 | drivers/net/3c507.c | memcpy((void*)dev->mem_end-10, init_words, 10); |
dev | 738 | drivers/net/3c507.c | memcpy((char*)dev->mem_start, init_words + 5, sizeof(init_words) - 10); |
dev | 741 | drivers/net/3c507.c | memcpy((char*)dev->mem_start+SA_OFFSET, dev->dev_addr, |
dev | 742 | drivers/net/3c507.c | sizeof(dev->dev_addr)); |
dev | 748 | drivers/net/3c507.c | init_rx_bufs(dev); |
dev | 762 | drivers/net/3c507.c | "cmd %04x.\n", dev->name, |
dev | 773 | drivers/net/3c507.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 779 | drivers/net/3c507.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 781 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 782 | drivers/net/3c507.c | short ioaddr = dev->base_addr; |
dev | 784 | drivers/net/3c507.c | ushort *write_ptr = (ushort *)(dev->mem_start + tx_block); |
dev | 807 | drivers/net/3c507.c | *(ushort*)(dev->mem_start + lp->tx_cmd_link) = tx_block; |
dev | 817 | drivers/net/3c507.c | dev->name, ioaddr, length, tx_block, lp->tx_head); |
dev | 821 | drivers/net/3c507.c | dev->tbusy = 0; |
dev | 825 | drivers/net/3c507.c | el16_rx(struct device *dev) |
dev | 827 | drivers/net/3c507.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 828 | drivers/net/3c507.c | short *shmem = (short*)dev->mem_start; |
dev | 835 | drivers/net/3c507.c | ushort *read_frame = (short *)(dev->mem_start + rx_head); |
dev | 839 | drivers/net/3c507.c | ushort *data_frame = (short *)(dev->mem_start + data_buffer_addr); |
dev | 845 | drivers/net/3c507.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 865 | drivers/net/3c507.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 872 | drivers/net/3c507.c | skb->dev = dev; |
dev | 881 | drivers/net/3c507.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 894 | drivers/net/3c507.c | *(short*)(dev->mem_start + rx_tail + 2) = 0x0000; |
dev | 75 | drivers/net/3c509.c | static int el3_open(struct device *dev); |
dev | 76 | drivers/net/3c509.c | static int el3_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 78 | drivers/net/3c509.c | static void update_stats(int addr, struct device *dev); |
dev | 79 | drivers/net/3c509.c | static struct enet_statistics *el3_get_stats(struct device *dev); |
dev | 80 | drivers/net/3c509.c | static int el3_rx(struct device *dev); |
dev | 81 | drivers/net/3c509.c | static int el3_close(struct device *dev); |
dev | 83 | drivers/net/3c509.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 88 | drivers/net/3c509.c | int el3_probe(struct device *dev) |
dev | 92 | drivers/net/3c509.c | short *phys_addr = (short *)dev->dev_addr; |
dev | 170 | drivers/net/3c509.c | if (dev->base_addr != 0 |
dev | 171 | drivers/net/3c509.c | && dev->base_addr != (unsigned short)ioaddr) { |
dev | 186 | drivers/net/3c509.c | dev->base_addr = ioaddr; |
dev | 187 | drivers/net/3c509.c | dev->irq = irq; |
dev | 188 | drivers/net/3c509.c | dev->if_port = if_port; |
dev | 189 | drivers/net/3c509.c | snarf_region(dev->base_addr, 16); |
dev | 194 | drivers/net/3c509.c | dev->name, dev->base_addr, current_tag, if_names[dev->if_port]); |
dev | 199 | drivers/net/3c509.c | printk(" %2.2x", dev->dev_addr[i]); |
dev | 200 | drivers/net/3c509.c | printk(", IRQ %d.\n", dev->irq); |
dev | 203 | drivers/net/3c509.c | dev->priv = kmalloc(sizeof(struct el3_private), GFP_KERNEL); |
dev | 204 | drivers/net/3c509.c | memset(dev->priv, 0, sizeof(struct el3_private)); |
dev | 210 | drivers/net/3c509.c | dev->open = &el3_open; |
dev | 211 | drivers/net/3c509.c | dev->hard_start_xmit = &el3_start_xmit; |
dev | 212 | drivers/net/3c509.c | dev->stop = &el3_close; |
dev | 213 | drivers/net/3c509.c | dev->get_stats = &el3_get_stats; |
dev | 215 | drivers/net/3c509.c | dev->set_multicast_list = &set_multicast_list; |
dev | 220 | drivers/net/3c509.c | dev->buffs[i] = NULL; |
dev | 222 | drivers/net/3c509.c | dev->hard_header = eth_header; |
dev | 223 | drivers/net/3c509.c | dev->add_arp = eth_add_arp; |
dev | 224 | drivers/net/3c509.c | dev->queue_xmit = dev_queue_xmit; |
dev | 225 | drivers/net/3c509.c | dev->rebuild_header = eth_rebuild_header; |
dev | 226 | drivers/net/3c509.c | dev->type_trans = eth_type_trans; |
dev | 228 | drivers/net/3c509.c | dev->type = ARPHRD_ETHER; |
dev | 229 | drivers/net/3c509.c | dev->hard_header_len = ETH_HLEN; |
dev | 230 | drivers/net/3c509.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 231 | drivers/net/3c509.c | dev->addr_len = ETH_ALEN; |
dev | 233 | drivers/net/3c509.c | dev->broadcast[i]=0xff; |
dev | 237 | drivers/net/3c509.c | dev->flags = IFF_BROADCAST; |
dev | 238 | drivers/net/3c509.c | dev->family = AF_INET; |
dev | 239 | drivers/net/3c509.c | dev->pa_addr = 0; |
dev | 240 | drivers/net/3c509.c | dev->pa_brdaddr = 0; |
dev | 241 | drivers/net/3c509.c | dev->pa_mask = 0; |
dev | 242 | drivers/net/3c509.c | dev->pa_alen = sizeof(unsigned long); |
dev | 286 | drivers/net/3c509.c | el3_open(struct device *dev) |
dev | 288 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 291 | drivers/net/3c509.c | if (request_irq(dev->irq, &el3_interrupt)) { |
dev | 297 | drivers/net/3c509.c | printk("%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, |
dev | 298 | drivers/net/3c509.c | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); |
dev | 303 | drivers/net/3c509.c | irq2dev_map[dev->irq] = dev; |
dev | 306 | drivers/net/3c509.c | outw((dev->irq << 12) | 0x0f00, ioaddr + 8); |
dev | 312 | drivers/net/3c509.c | outb(dev->dev_addr[i], ioaddr + i); |
dev | 314 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 317 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 331 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 332 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 333 | drivers/net/3c509.c | dev->start = 1; |
dev | 338 | drivers/net/3c509.c | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); |
dev | 344 | drivers/net/3c509.c | el3_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 346 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 347 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 350 | drivers/net/3c509.c | if (dev->tbusy) { |
dev | 351 | drivers/net/3c509.c | int tickssofar = jiffies - dev->trans_start; |
dev | 355 | drivers/net/3c509.c | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS)); |
dev | 356 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 360 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 364 | drivers/net/3c509.c | dev_tint(dev); |
dev | 369 | drivers/net/3c509.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 370 | drivers/net/3c509.c | skb->dev = dev; |
dev | 381 | drivers/net/3c509.c | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); |
dev | 389 | drivers/net/3c509.c | " Tx %2.2x Rx %4.4x.\n", dev->name, status, |
dev | 400 | drivers/net/3c509.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 401 | drivers/net/3c509.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 409 | drivers/net/3c509.c | dev->trans_start = jiffies; |
dev | 411 | drivers/net/3c509.c | dev->tbusy=0; |
dev | 442 | drivers/net/3c509.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 446 | drivers/net/3c509.c | if (dev == NULL) { |
dev | 451 | drivers/net/3c509.c | if (dev->interrupt) |
dev | 452 | drivers/net/3c509.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 453 | drivers/net/3c509.c | dev->interrupt = 1; |
dev | 455 | drivers/net/3c509.c | ioaddr = dev->base_addr; |
dev | 459 | drivers/net/3c509.c | printk("%s: interrupt, status %4.4x.\n", dev->name, status); |
dev | 464 | drivers/net/3c509.c | el3_rx(dev); |
dev | 471 | drivers/net/3c509.c | dev->tbusy = 0; |
dev | 475 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 479 | drivers/net/3c509.c | dev->name, status); |
dev | 487 | drivers/net/3c509.c | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, |
dev | 491 | drivers/net/3c509.c | dev->interrupt = 0; |
dev | 497 | drivers/net/3c509.c | el3_get_stats(struct device *dev) |
dev | 499 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 502 | drivers/net/3c509.c | update_stats(dev->base_addr, dev); |
dev | 512 | drivers/net/3c509.c | static void update_stats(int ioaddr, struct device *dev) |
dev | 514 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 541 | drivers/net/3c509.c | el3_rx(struct device *dev) |
dev | 543 | drivers/net/3c509.c | struct el3_private *lp = (struct el3_private *)dev->priv; |
dev | 544 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 577 | drivers/net/3c509.c | skb->dev = dev; |
dev | 590 | drivers/net/3c509.c | IN_SKBUFF,dev)== 0){ |
dev | 603 | drivers/net/3c509.c | printk("%s: receive buffers full.\n", dev->name); |
dev | 609 | drivers/net/3c509.c | dev->name, sksize); |
dev | 633 | drivers/net/3c509.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 635 | drivers/net/3c509.c | short ioaddr = dev->base_addr; |
dev | 646 | drivers/net/3c509.c | el3_close(struct device *dev) |
dev | 648 | drivers/net/3c509.c | int ioaddr = dev->base_addr; |
dev | 651 | drivers/net/3c509.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 653 | drivers/net/3c509.c | dev->tbusy = 1; |
dev | 654 | drivers/net/3c509.c | dev->start = 0; |
dev | 663 | drivers/net/3c509.c | if (dev->if_port == 3) |
dev | 666 | drivers/net/3c509.c | else if (dev->if_port == 0) { |
dev | 672 | drivers/net/3c509.c | free_irq(dev->irq); |
dev | 679 | drivers/net/3c509.c | irq2dev_map[dev->irq] = 0; |
dev | 681 | drivers/net/3c509.c | update_stats(ioaddr, dev); |
dev | 93 | drivers/net/8390.c | int ei_open(struct device *dev); /* Put into the device structure. */ |
dev | 96 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev); |
dev | 97 | drivers/net/8390.c | static void ei_receive(struct device *dev); |
dev | 98 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev); |
dev | 101 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp); |
dev | 102 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 105 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 114 | drivers/net/8390.c | int ei_open(struct device *dev) |
dev | 116 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 119 | drivers/net/8390.c | printk("%s: Opening a non-existent physical device\n", dev->name); |
dev | 123 | drivers/net/8390.c | irq2dev_map[dev->irq] = dev; |
dev | 124 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 125 | drivers/net/8390.c | dev->start = 1; |
dev | 130 | drivers/net/8390.c | static int ei_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 132 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 133 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 141 | drivers/net/8390.c | if (dev->tbusy) { /* Do timeouts, just like the 8003 driver. */ |
dev | 143 | drivers/net/8390.c | int tickssofar = jiffies - dev->trans_start; |
dev | 149 | drivers/net/8390.c | dev->name, txsr, isr); |
dev | 152 | drivers/net/8390.c | printk("%s: Possible IRQ conflict on IRQ%d?\n", dev->name, dev->irq); |
dev | 155 | drivers/net/8390.c | printk("%s: Possible network cable problem?\n", dev->name); |
dev | 159 | drivers/net/8390.c | ei_reset_8390(dev); |
dev | 160 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 161 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 168 | drivers/net/8390.c | dev_tint(dev); |
dev | 172 | drivers/net/8390.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 173 | drivers/net/8390.c | skb->dev = dev; |
dev | 184 | drivers/net/8390.c | if (set_bit(0, (void*)&dev->tbusy) != 0) { |
dev | 185 | drivers/net/8390.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 202 | drivers/net/8390.c | dev->name, ei_local->tx2, ei_local->lasttx, |
dev | 209 | drivers/net/8390.c | dev->name, ei_local->tx1, ei_local->lasttx, |
dev | 214 | drivers/net/8390.c | dev->name); |
dev | 216 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 220 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, output_page); |
dev | 222 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, output_page); |
dev | 223 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 232 | drivers/net/8390.c | dev->tbusy = (ei_local->tx1 && ei_local->tx2); |
dev | 234 | drivers/net/8390.c | ei_block_output(dev, length, skb->data, ei_local->tx_start_page); |
dev | 235 | drivers/net/8390.c | NS8390_trigger_send(dev, send_length, ei_local->tx_start_page); |
dev | 236 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 237 | drivers/net/8390.c | dev->tbusy = 1; |
dev | 255 | drivers/net/8390.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 260 | drivers/net/8390.c | if (dev == NULL) { |
dev | 264 | drivers/net/8390.c | e8390_base = dev->base_addr; |
dev | 265 | drivers/net/8390.c | ei_local = (struct ei_device *) dev->priv; |
dev | 266 | drivers/net/8390.c | if (dev->interrupt || ei_local->irqlock) { |
dev | 272 | drivers/net/8390.c | dev->name, inb_p(e8390_base + EN0_ISR), |
dev | 277 | drivers/net/8390.c | dev->interrupt = 1; |
dev | 283 | drivers/net/8390.c | printk("%s: interrupt(isr=%#2.2x).\n", dev->name, |
dev | 294 | drivers/net/8390.c | ei_rx_overrun(dev); |
dev | 297 | drivers/net/8390.c | ei_receive(dev); |
dev | 301 | drivers/net/8390.c | ei_tx_intr(dev); |
dev | 303 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 318 | drivers/net/8390.c | printk("%s: unknown interrupt %#2x\n", dev->name, interrupts); |
dev | 322 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 328 | drivers/net/8390.c | static void ei_tx_intr(struct device *dev) |
dev | 330 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 332 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 343 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 345 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6); |
dev | 346 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 357 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 359 | drivers/net/8390.c | NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page); |
dev | 360 | drivers/net/8390.c | dev->trans_start = jiffies; |
dev | 368 | drivers/net/8390.c | dev->name, ei_local->lasttx); |
dev | 371 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 392 | drivers/net/8390.c | static void ei_receive(struct device *dev) |
dev | 394 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 395 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 418 | drivers/net/8390.c | dev->name, this_frame, ei_local->current_page); |
dev | 424 | drivers/net/8390.c | ei_block_input(dev, sizeof(rx_frame), (char *)&rx_frame, |
dev | 447 | drivers/net/8390.c | dev->name, rx_frame.count, rx_frame.status, |
dev | 458 | drivers/net/8390.c | dev->name, sksize); |
dev | 465 | drivers/net/8390.c | skb->dev = dev; |
dev | 467 | drivers/net/8390.c | ei_block_input(dev, pkt_len, (char *) skb->data, |
dev | 476 | drivers/net/8390.c | dev->name, rx_frame.status, rx_frame.next, |
dev | 485 | drivers/net/8390.c | printk("%s: next frame inconsistency, %#2x..", dev->name, |
dev | 507 | drivers/net/8390.c | static void ei_rx_overrun(struct device *dev) |
dev | 509 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 511 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 517 | drivers/net/8390.c | printk("%s: Receiver overrun.\n", dev->name); |
dev | 530 | drivers/net/8390.c | dev->name); |
dev | 531 | drivers/net/8390.c | NS8390_init(dev, 1); |
dev | 536 | drivers/net/8390.c | ei_receive(dev); |
dev | 544 | drivers/net/8390.c | static struct enet_statistics *get_stats(struct device *dev) |
dev | 546 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 547 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 564 | drivers/net/8390.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 566 | drivers/net/8390.c | short ioaddr = dev->base_addr; |
dev | 580 | drivers/net/8390.c | int ethdev_init(struct device *dev) |
dev | 587 | drivers/net/8390.c | if (dev->priv == NULL) { |
dev | 590 | drivers/net/8390.c | dev->priv = kmalloc(sizeof(struct ei_device), GFP_KERNEL); |
dev | 591 | drivers/net/8390.c | memset(dev->priv, 0, sizeof(struct ei_device)); |
dev | 592 | drivers/net/8390.c | ei_local = (struct ei_device *)dev->priv; |
dev | 599 | drivers/net/8390.c | if (dev->open == NULL) |
dev | 600 | drivers/net/8390.c | dev->open = &ei_open; |
dev | 602 | drivers/net/8390.c | dev->hard_start_xmit = &ei_start_xmit; |
dev | 603 | drivers/net/8390.c | dev->get_stats = get_stats; |
dev | 605 | drivers/net/8390.c | dev->set_multicast_list = &set_multicast_list; |
dev | 609 | drivers/net/8390.c | dev->buffs[i] = NULL; |
dev | 611 | drivers/net/8390.c | dev->hard_header = eth_header; |
dev | 612 | drivers/net/8390.c | dev->add_arp = eth_add_arp; |
dev | 613 | drivers/net/8390.c | dev->queue_xmit = dev_queue_xmit; |
dev | 614 | drivers/net/8390.c | dev->rebuild_header = eth_rebuild_header; |
dev | 615 | drivers/net/8390.c | dev->type_trans = eth_type_trans; |
dev | 617 | drivers/net/8390.c | dev->type = ARPHRD_ETHER; |
dev | 618 | drivers/net/8390.c | dev->hard_header_len = ETH_HLEN; |
dev | 619 | drivers/net/8390.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 620 | drivers/net/8390.c | dev->addr_len = ETH_ALEN; |
dev | 622 | drivers/net/8390.c | dev->broadcast[i]=0xff; |
dev | 626 | drivers/net/8390.c | dev->flags = IFF_BROADCAST; |
dev | 627 | drivers/net/8390.c | dev->family = AF_INET; |
dev | 628 | drivers/net/8390.c | dev->pa_addr = 0; |
dev | 629 | drivers/net/8390.c | dev->pa_brdaddr = 0; |
dev | 630 | drivers/net/8390.c | dev->pa_mask = 0; |
dev | 631 | drivers/net/8390.c | dev->pa_alen = sizeof(unsigned long); |
dev | 639 | drivers/net/8390.c | void NS8390_init(struct device *dev, int startp) |
dev | 641 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 642 | drivers/net/8390.c | struct ei_device *ei_local = (struct ei_device *) dev->priv; |
dev | 671 | drivers/net/8390.c | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS + i); |
dev | 681 | drivers/net/8390.c | dev->tbusy = 0; |
dev | 682 | drivers/net/8390.c | dev->interrupt = 0; |
dev | 697 | drivers/net/8390.c | static void NS8390_trigger_send(struct device *dev, unsigned int length, |
dev | 700 | drivers/net/8390.c | int e8390_base = dev->base_addr; |
dev | 707 | 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 | 246 | drivers/net/Space.c | extern int loopback_init(struct device *dev); |
dev | 114 | drivers/net/at1700.c | extern int at1700_probe(struct device *dev); |
dev | 116 | drivers/net/at1700.c | static int at1700_probe1(struct device *dev, short ioaddr); |
dev | 118 | drivers/net/at1700.c | static int net_open(struct device *dev); |
dev | 119 | drivers/net/at1700.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 121 | drivers/net/at1700.c | static void net_rx(struct device *dev); |
dev | 122 | drivers/net/at1700.c | static int net_close(struct device *dev); |
dev | 123 | drivers/net/at1700.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 125 | drivers/net/at1700.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 136 | drivers/net/at1700.c | at1700_probe(struct device *dev) |
dev | 139 | drivers/net/at1700.c | short *port, base_addr = dev->base_addr; |
dev | 142 | drivers/net/at1700.c | return at1700_probe1(dev, base_addr); |
dev | 150 | drivers/net/at1700.c | if (at1700_probe1(dev, ioaddr) == 0) |
dev | 165 | drivers/net/at1700.c | int at1700_probe1(struct device *dev, short ioaddr) |
dev | 170 | drivers/net/at1700.c | unsigned short *station_address = (unsigned short *)dev->dev_addr; |
dev | 201 | drivers/net/at1700.c | printk("%s: AT1700 found at %#3x, IRQ %d, address ", dev->name, |
dev | 204 | drivers/net/at1700.c | dev->base_addr = ioaddr; |
dev | 205 | drivers/net/at1700.c | dev->irq = irq; |
dev | 206 | drivers/net/at1700.c | irq2dev_map[irq] = dev; |
dev | 224 | drivers/net/at1700.c | dev->if_port = setup_value >> 8; |
dev | 225 | drivers/net/at1700.c | printk(" %s interface (%04x).\n", porttype[(dev->if_port>>3) & 3], |
dev | 232 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 245 | drivers/net/at1700.c | outb(dev->if_port, MODE13); |
dev | 254 | drivers/net/at1700.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 255 | drivers/net/at1700.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 257 | drivers/net/at1700.c | dev->open = net_open; |
dev | 258 | drivers/net/at1700.c | dev->stop = net_close; |
dev | 259 | drivers/net/at1700.c | dev->hard_start_xmit = net_send_packet; |
dev | 260 | drivers/net/at1700.c | dev->get_stats = net_get_stats; |
dev | 262 | drivers/net/at1700.c | dev->set_multicast_list = &set_multicast_list; |
dev | 268 | drivers/net/at1700.c | dev->buffs[i] = NULL; |
dev | 270 | drivers/net/at1700.c | dev->hard_header = eth_header; |
dev | 271 | drivers/net/at1700.c | dev->add_arp = eth_add_arp; |
dev | 272 | drivers/net/at1700.c | dev->queue_xmit = dev_queue_xmit; |
dev | 273 | drivers/net/at1700.c | dev->rebuild_header = eth_rebuild_header; |
dev | 274 | drivers/net/at1700.c | dev->type_trans = eth_type_trans; |
dev | 276 | drivers/net/at1700.c | dev->type = ARPHRD_ETHER; |
dev | 277 | drivers/net/at1700.c | dev->hard_header_len = ETH_HLEN; |
dev | 278 | drivers/net/at1700.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 279 | drivers/net/at1700.c | dev->addr_len = ETH_ALEN; |
dev | 281 | drivers/net/at1700.c | dev->broadcast[i]=0xff; |
dev | 285 | drivers/net/at1700.c | dev->flags = IFF_BROADCAST; |
dev | 286 | drivers/net/at1700.c | dev->family = AF_INET; |
dev | 287 | drivers/net/at1700.c | dev->pa_addr = 0; |
dev | 288 | drivers/net/at1700.c | dev->pa_brdaddr = 0; |
dev | 289 | drivers/net/at1700.c | dev->pa_mask = 0; |
dev | 290 | drivers/net/at1700.c | dev->pa_alen = sizeof(unsigned long); |
dev | 336 | drivers/net/at1700.c | static int net_open(struct device *dev) |
dev | 338 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 339 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 347 | drivers/net/at1700.c | outb(dev->dev_addr[i], ioaddr + 8 + i); |
dev | 369 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 370 | drivers/net/at1700.c | dev->interrupt = 0; |
dev | 371 | drivers/net/at1700.c | dev->start = 1; |
dev | 377 | drivers/net/at1700.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 379 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 380 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 382 | drivers/net/at1700.c | if (dev->tbusy) { |
dev | 385 | drivers/net/at1700.c | int tickssofar = jiffies - dev->trans_start; |
dev | 388 | drivers/net/at1700.c | printk("%s: transmit timed out with status %04x, %s?\n", dev->name, |
dev | 392 | drivers/net/at1700.c | dev->name, inw(ioaddr + 0), inw(ioaddr + 2), inw(ioaddr + 4), |
dev | 401 | drivers/net/at1700.c | dev->tbusy=0; |
dev | 402 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 409 | drivers/net/at1700.c | dev_tint(dev); |
dev | 415 | drivers/net/at1700.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 416 | drivers/net/at1700.c | skb->dev = dev; |
dev | 424 | drivers/net/at1700.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 425 | drivers/net/at1700.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 431 | drivers/net/at1700.c | printk("%s: Transmitting a packet of length %d.\n", dev->name, |
dev | 448 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 451 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 468 | drivers/net/at1700.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 472 | drivers/net/at1700.c | if (dev == NULL) { |
dev | 476 | drivers/net/at1700.c | dev->interrupt = 1; |
dev | 478 | drivers/net/at1700.c | ioaddr = dev->base_addr; |
dev | 479 | drivers/net/at1700.c | lp = (struct net_local *)dev->priv; |
dev | 484 | drivers/net/at1700.c | printk("%s: Interrupt with status %04x.\n", dev->name, status); |
dev | 487 | drivers/net/at1700.c | net_rx(dev); |
dev | 496 | drivers/net/at1700.c | dev->trans_start = jiffies; |
dev | 497 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 503 | drivers/net/at1700.c | dev->tbusy = 0; |
dev | 513 | drivers/net/at1700.c | net_rx(struct device *dev) |
dev | 515 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 516 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 524 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), status); |
dev | 546 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 554 | drivers/net/at1700.c | dev->name, pkt_len); |
dev | 562 | drivers/net/at1700.c | skb->dev = dev; |
dev | 569 | drivers/net/at1700.c | printk("%s: Rxed packet of length %d: ", dev->name, pkt_len); |
dev | 579 | drivers/net/at1700.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 604 | drivers/net/at1700.c | dev->name, inb(ioaddr + RX_MODE), i); |
dev | 610 | drivers/net/at1700.c | static int net_close(struct device *dev) |
dev | 612 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 613 | drivers/net/at1700.c | int ioaddr = dev->base_addr; |
dev | 617 | drivers/net/at1700.c | dev->tbusy = 1; |
dev | 618 | drivers/net/at1700.c | dev->start = 0; |
dev | 634 | drivers/net/at1700.c | net_get_stats(struct device *dev) |
dev | 636 | drivers/net/at1700.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 653 | drivers/net/at1700.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 655 | drivers/net/at1700.c | short ioaddr = dev->base_addr; |
dev | 132 | drivers/net/atp.c | extern int atp_probe(struct device *dev); |
dev | 134 | drivers/net/atp.c | static int atp_probe1(struct device *dev, short ioaddr); |
dev | 135 | drivers/net/atp.c | static void init_dev(struct device *dev); |
dev | 136 | drivers/net/atp.c | static void get_node_ID(struct device *dev); |
dev | 138 | drivers/net/atp.c | static int net_open(struct device *dev); |
dev | 139 | drivers/net/atp.c | static void hardware_init(struct device *dev); |
dev | 142 | drivers/net/atp.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 144 | drivers/net/atp.c | static void net_rx(struct device *dev); |
dev | 146 | drivers/net/atp.c | static int net_close(struct device *dev); |
dev | 147 | drivers/net/atp.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 149 | drivers/net/atp.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 160 | drivers/net/atp.c | atp_init(struct device *dev) |
dev | 163 | drivers/net/atp.c | int base_addr = dev->base_addr; |
dev | 166 | drivers/net/atp.c | return atp_probe1(dev, base_addr); |
dev | 175 | drivers/net/atp.c | if (atp_probe1(dev, ioaddr) == 0) |
dev | 182 | drivers/net/atp.c | static int atp_probe1(struct device *dev, short ioaddr) |
dev | 212 | drivers/net/atp.c | dev->irq = 7; |
dev | 214 | drivers/net/atp.c | dev->irq = 5; |
dev | 218 | drivers/net/atp.c | dev->base_addr = ioaddr; |
dev | 221 | drivers/net/atp.c | get_node_ID(dev); |
dev | 224 | drivers/net/atp.c | "%02X:%02X:%02X:%02X:%02X:%02X.\n", dev->name, dev->base_addr, |
dev | 225 | drivers/net/atp.c | dev->irq, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], |
dev | 226 | drivers/net/atp.c | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); |
dev | 235 | drivers/net/atp.c | init_dev(dev); |
dev | 236 | drivers/net/atp.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 237 | drivers/net/atp.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 241 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 246 | drivers/net/atp.c | dev->if_port = (dev->mem_start & 0xf) ? dev->mem_start & 0x7 : 4; |
dev | 247 | drivers/net/atp.c | if (dev->mem_end & 0xf) |
dev | 248 | drivers/net/atp.c | net_debug = dev->mem_end & 7; |
dev | 250 | drivers/net/atp.c | dev->open = net_open; |
dev | 251 | drivers/net/atp.c | dev->stop = net_close; |
dev | 252 | drivers/net/atp.c | dev->hard_start_xmit = net_send_packet; |
dev | 253 | drivers/net/atp.c | dev->get_stats = net_get_stats; |
dev | 255 | drivers/net/atp.c | dev->set_multicast_list = &set_multicast_list; |
dev | 263 | drivers/net/atp.c | static void init_dev(struct device *dev) |
dev | 268 | drivers/net/atp.c | dev->buffs[i] = NULL; |
dev | 270 | drivers/net/atp.c | dev->hard_header = eth_header; |
dev | 271 | drivers/net/atp.c | dev->add_arp = eth_add_arp; |
dev | 272 | drivers/net/atp.c | dev->queue_xmit = dev_queue_xmit; |
dev | 273 | drivers/net/atp.c | dev->rebuild_header = eth_rebuild_header; |
dev | 274 | drivers/net/atp.c | dev->type_trans = eth_type_trans; |
dev | 276 | drivers/net/atp.c | dev->type = ARPHRD_ETHER; |
dev | 277 | drivers/net/atp.c | dev->hard_header_len = ETH_HLEN; |
dev | 278 | drivers/net/atp.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 279 | drivers/net/atp.c | dev->addr_len = ETH_ALEN; |
dev | 281 | drivers/net/atp.c | dev->broadcast[i]=0xff; |
dev | 285 | drivers/net/atp.c | dev->flags = IFF_BROADCAST; |
dev | 286 | drivers/net/atp.c | dev->family = AF_INET; |
dev | 287 | drivers/net/atp.c | dev->pa_addr = 0; |
dev | 288 | drivers/net/atp.c | dev->pa_brdaddr = 0; |
dev | 289 | drivers/net/atp.c | dev->pa_mask = 0; |
dev | 290 | drivers/net/atp.c | dev->pa_alen = sizeof(unsigned long); |
dev | 294 | drivers/net/atp.c | static void get_node_ID(struct device *dev) |
dev | 296 | drivers/net/atp.c | short ioaddr = dev->base_addr; |
dev | 308 | drivers/net/atp.c | ((unsigned short *)dev->dev_addr)[i] = |
dev | 356 | drivers/net/atp.c | static int net_open(struct device *dev) |
dev | 362 | drivers/net/atp.c | if (irq2dev_map[dev->irq] != 0 |
dev | 363 | drivers/net/atp.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 364 | drivers/net/atp.c | || request_irq(dev->irq, &net_interrupt)) { |
dev | 368 | drivers/net/atp.c | hardware_init(dev); |
dev | 369 | drivers/net/atp.c | dev->start = 1; |
dev | 375 | drivers/net/atp.c | static void hardware_init(struct device *dev) |
dev | 377 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 378 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 384 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 389 | drivers/net/atp.c | printk("%s: Reset: current Rx mode %d.\n", dev->name, |
dev | 407 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 408 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 449 | drivers/net/atp.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 451 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 452 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 454 | drivers/net/atp.c | if (dev->tbusy) { |
dev | 457 | drivers/net/atp.c | int tickssofar = jiffies - dev->trans_start; |
dev | 460 | drivers/net/atp.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 465 | drivers/net/atp.c | hardware_init(dev); |
dev | 466 | drivers/net/atp.c | dev->tbusy=0; |
dev | 467 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 474 | drivers/net/atp.c | dev_tint(dev); |
dev | 480 | drivers/net/atp.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 481 | drivers/net/atp.c | skb->dev = dev; |
dev | 489 | drivers/net/atp.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 490 | drivers/net/atp.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 504 | drivers/net/atp.c | write_packet(ioaddr, length, buf, dev->if_port); |
dev | 515 | drivers/net/atp.c | dev->trans_start = jiffies; |
dev | 533 | drivers/net/atp.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 538 | drivers/net/atp.c | if (dev == NULL) { |
dev | 542 | drivers/net/atp.c | dev->interrupt = 1; |
dev | 544 | drivers/net/atp.c | ioaddr = dev->base_addr; |
dev | 545 | drivers/net/atp.c | lp = (struct net_local *)dev->priv; |
dev | 554 | drivers/net/atp.c | if (net_debug > 5) printk("%s: In interrupt ", dev->name); |
dev | 571 | drivers/net/atp.c | net_rx(dev); |
dev | 576 | drivers/net/atp.c | net_rx(dev); |
dev | 577 | drivers/net/atp.c | dev->last_rx = jiffies; |
dev | 591 | drivers/net/atp.c | hardware_init(dev); |
dev | 607 | drivers/net/atp.c | dev->tbusy = 0; |
dev | 612 | drivers/net/atp.c | && jiffies > dev->last_rx + 100) { |
dev | 615 | drivers/net/atp.c | " status %02x CMR1 %02x.\n", dev->name, |
dev | 616 | drivers/net/atp.c | num_tx_since_rx, jiffies - dev->last_rx, status, |
dev | 619 | drivers/net/atp.c | hardware_init(dev); |
dev | 631 | drivers/net/atp.c | write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]); |
dev | 644 | drivers/net/atp.c | dev->interrupt = 0; |
dev | 650 | drivers/net/atp.c | static void net_rx(struct device *dev) |
dev | 652 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 653 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 662 | drivers/net/atp.c | read_block(ioaddr, 8, (unsigned char*)&rx_head, dev->if_port); |
dev | 671 | drivers/net/atp.c | dev->name, rx_head.rx_status); |
dev | 672 | drivers/net/atp.c | hardware_init(dev); |
dev | 682 | drivers/net/atp.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 689 | drivers/net/atp.c | skb->dev = dev; |
dev | 691 | drivers/net/atp.c | read_block(ioaddr, pkt_len, skb->data, dev->if_port); |
dev | 706 | drivers/net/atp.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 741 | drivers/net/atp.c | net_close(struct device *dev) |
dev | 743 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 744 | drivers/net/atp.c | int ioaddr = dev->base_addr; |
dev | 746 | drivers/net/atp.c | dev->tbusy = 1; |
dev | 747 | drivers/net/atp.c | dev->start = 0; |
dev | 755 | drivers/net/atp.c | free_irq(dev->irq); |
dev | 756 | drivers/net/atp.c | irq2dev_map[dev->irq] = 0; |
dev | 767 | drivers/net/atp.c | net_get_stats(struct device *dev) |
dev | 769 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 781 | drivers/net/atp.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 783 | drivers/net/atp.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 784 | drivers/net/atp.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->data, 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 | 253 | drivers/net/depca.c | static int depca_open(struct device *dev); |
dev | 254 | drivers/net/depca.c | static int depca_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 256 | drivers/net/depca.c | static int depca_close(struct device *dev); |
dev | 257 | drivers/net/depca.c | static struct enet_statistics *depca_get_stats(struct device *dev); |
dev | 259 | drivers/net/depca.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 265 | drivers/net/depca.c | static int depca_probe1(struct device *dev, short ioaddr); |
dev | 266 | drivers/net/depca.c | static void depca_init_ring(struct device *dev); |
dev | 267 | drivers/net/depca.c | static int depca_rx(struct device *dev); |
dev | 268 | drivers/net/depca.c | static int depca_tx(struct device *dev); |
dev | 270 | drivers/net/depca.c | static void LoadCSRs(struct device *dev); |
dev | 271 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev); |
dev | 289 | drivers/net/depca.c | int depca_probe(struct device *dev) |
dev | 292 | drivers/net/depca.c | int base_addr = dev->base_addr; |
dev | 297 | drivers/net/depca.c | status = depca_probe1(dev, base_addr); |
dev | 317 | drivers/net/depca.c | while (dev->next != (struct device *)NULL) { |
dev | 318 | drivers/net/depca.c | if (dev->next->base_addr == 0xffe0) break; |
dev | 319 | drivers/net/depca.c | dev = dev->next; /* walk through eth device list */ |
dev | 328 | drivers/net/depca.c | if (dev->next == (struct device *)NULL) { |
dev | 329 | drivers/net/depca.c | dev->next = (struct device *)kmalloc(sizeof(struct device) + 8, |
dev | 341 | drivers/net/depca.c | if ((dev->next != (struct device *)NULL) && |
dev | 343 | drivers/net/depca.c | dev = dev->next; /* point to the new device */ |
dev | 344 | drivers/net/depca.c | dev->name = (char *)(dev + sizeof(struct device)); |
dev | 345 | drivers/net/depca.c | sprintf(dev->name,"eth%d", num_eth); /* New device name */ |
dev | 346 | drivers/net/depca.c | dev->base_addr = ioaddr; /* assign the io address */ |
dev | 347 | drivers/net/depca.c | dev->next = (struct device *)NULL; /* mark the end of list */ |
dev | 348 | drivers/net/depca.c | dev->init = &depca_probe;/* initialisation routine */ |
dev | 351 | drivers/net/depca.c | eth0 = dev; /* remember the first device */ |
dev | 352 | drivers/net/depca.c | status = depca_probe1(dev, ioaddr); |
dev | 358 | drivers/net/depca.c | if (eth0) dev = eth0; /* restore the first device */ |
dev | 361 | drivers/net/depca.c | if (status) dev->base_addr = base_addr; |
dev | 367 | drivers/net/depca.c | depca_probe1(struct device *dev, short ioaddr) |
dev | 408 | drivers/net/depca.c | dev->base_addr = ioaddr; |
dev | 410 | drivers/net/depca.c | printk("%s: DEPCA at %#3x is a %s, ", dev->name, ioaddr, name); |
dev | 429 | drivers/net/depca.c | printk("%2.2x:", dev->dev_addr[i] = inb(DEPCA_PROM + j)); |
dev | 431 | drivers/net/depca.c | printk("%2.2x", dev->dev_addr[i] = inb(DEPCA_PROM + j)); |
dev | 496 | drivers/net/depca.c | dev->priv = (void *)((mem_start + 0x07) & ~0x07); |
dev | 497 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 498 | drivers/net/depca.c | memset(dev->priv, 0, sizeof(struct depca_private)); |
dev | 501 | drivers/net/depca.c | mem_start = ((((unsigned long)dev->priv + |
dev | 544 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 549 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 558 | drivers/net/depca.c | dev->dma = 0; |
dev | 562 | drivers/net/depca.c | if (dev->irq < 2) { |
dev | 568 | drivers/net/depca.c | dev->irq = autoirq_report(1); |
dev | 569 | drivers/net/depca.c | if (dev->irq) { |
dev | 570 | drivers/net/depca.c | printk(" and probed IRQ%d.\n", dev->irq); |
dev | 576 | drivers/net/depca.c | printk(". Assigned IRQ%d.\n", dev->irq); |
dev | 587 | drivers/net/depca.c | dev->open = &depca_open; |
dev | 588 | drivers/net/depca.c | dev->hard_start_xmit = &depca_start_xmit; |
dev | 589 | drivers/net/depca.c | dev->stop = &depca_close; |
dev | 590 | drivers/net/depca.c | dev->get_stats = &depca_get_stats; |
dev | 592 | drivers/net/depca.c | dev->set_multicast_list = &set_multicast_list; |
dev | 595 | drivers/net/depca.c | dev->mem_start = 0; |
dev | 599 | drivers/net/depca.c | dev->buffs[i] = NULL; |
dev | 602 | drivers/net/depca.c | dev->hard_header = eth_header; |
dev | 603 | drivers/net/depca.c | dev->add_arp = eth_add_arp; |
dev | 604 | drivers/net/depca.c | dev->queue_xmit = dev_queue_xmit; |
dev | 605 | drivers/net/depca.c | dev->rebuild_header = eth_rebuild_header; |
dev | 606 | drivers/net/depca.c | dev->type_trans = eth_type_trans; |
dev | 608 | drivers/net/depca.c | dev->type = ARPHRD_ETHER; |
dev | 609 | drivers/net/depca.c | dev->hard_header_len = ETH_HLEN; |
dev | 610 | drivers/net/depca.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 611 | drivers/net/depca.c | dev->addr_len = ETH_ALEN; |
dev | 613 | drivers/net/depca.c | for (i = 0; i < dev->addr_len; i++) { |
dev | 614 | drivers/net/depca.c | dev->broadcast[i]=0xff; |
dev | 618 | drivers/net/depca.c | dev->flags = IFF_BROADCAST; |
dev | 619 | drivers/net/depca.c | dev->family = AF_INET; |
dev | 620 | drivers/net/depca.c | dev->pa_addr = 0; |
dev | 621 | drivers/net/depca.c | dev->pa_brdaddr = 0; |
dev | 622 | drivers/net/depca.c | dev->pa_mask = 0; |
dev | 623 | drivers/net/depca.c | dev->pa_alen = sizeof(unsigned long); |
dev | 634 | drivers/net/depca.c | depca_open(struct device *dev) |
dev | 636 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 637 | drivers/net/depca.c | int i,nicsr,ioaddr = dev->base_addr; |
dev | 639 | drivers/net/depca.c | if (request_irq(dev->irq, &depca_interrupt)) { |
dev | 640 | drivers/net/depca.c | printk("depca_open(): Requested IRQ%d is busy\n",dev->irq); |
dev | 644 | drivers/net/depca.c | irq2dev_map[dev->irq] = dev; |
dev | 655 | drivers/net/depca.c | depca_init_ring(dev); /* initialize the descriptor rings */ |
dev | 656 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 659 | drivers/net/depca.c | printk("%s: depca open with irq %d\n",dev->name,dev->irq); |
dev | 704 | drivers/net/depca.c | dev->tbusy = 0; |
dev | 705 | drivers/net/depca.c | dev->interrupt = 0; |
dev | 706 | drivers/net/depca.c | dev->start = 1; |
dev | 708 | drivers/net/depca.c | InitRestartDepca(dev); /* ignore the return status */ |
dev | 720 | drivers/net/depca.c | depca_init_ring(struct device *dev) |
dev | 722 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 739 | drivers/net/depca.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 754 | drivers/net/depca.c | depca_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 756 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 757 | drivers/net/depca.c | int ioaddr = dev->base_addr; |
dev | 761 | drivers/net/depca.c | if (dev->tbusy) { |
dev | 762 | drivers/net/depca.c | int tickssofar = jiffies - dev->trans_start; |
dev | 768 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 770 | drivers/net/depca.c | depca_init_ring(dev); |
dev | 771 | drivers/net/depca.c | LoadCSRs(dev); |
dev | 772 | drivers/net/depca.c | InitRestartDepca(dev); |
dev | 773 | drivers/net/depca.c | dev->tbusy=0; |
dev | 774 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 780 | drivers/net/depca.c | dev_tint(dev); |
dev | 785 | drivers/net/depca.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 786 | drivers/net/depca.c | skb->dev = dev; |
dev | 798 | drivers/net/depca.c | printk("%s: depca_start_xmit() called, csr0 %4.4x.\n", dev->name, |
dev | 804 | drivers/net/depca.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 805 | drivers/net/depca.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 848 | drivers/net/depca.c | dev->trans_start = jiffies; |
dev | 859 | drivers/net/depca.c | dev->tbusy=0; |
dev | 886 | drivers/net/depca.c | dev->name, entry, (unsigned long) &lp->tx_ring[entry], |
dev | 889 | drivers/net/depca.c | dev->name, pkt[0], pkt[1], pkt[2], pkt[5], pkt[6], |
dev | 896 | drivers/net/depca.c | dev->tbusy=0; |
dev | 914 | drivers/net/depca.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 918 | drivers/net/depca.c | if (dev == NULL) { |
dev | 922 | drivers/net/depca.c | lp = (struct depca_private *)dev->priv; |
dev | 923 | drivers/net/depca.c | ioaddr = dev->base_addr; |
dev | 926 | drivers/net/depca.c | if (dev->interrupt) |
dev | 927 | drivers/net/depca.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 929 | drivers/net/depca.c | dev->interrupt = MASK_INTERRUPTS; |
dev | 944 | drivers/net/depca.c | dev->name, csr0, inw(DEPCA_DATA)); |
dev | 947 | drivers/net/depca.c | depca_rx(dev); |
dev | 950 | drivers/net/depca.c | depca_tx(dev); |
dev | 958 | drivers/net/depca.c | dev->name, inw(DEPCA_ADDR), |
dev | 966 | drivers/net/depca.c | dev->interrupt = UNMASK_INTERRUPTS; |
dev | 971 | drivers/net/depca.c | depca_rx(struct device *dev) |
dev | 973 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 993 | drivers/net/depca.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 1000 | drivers/net/depca.c | skb->dev = dev; |
dev | 1012 | drivers/net/depca.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 1037 | drivers/net/depca.c | depca_tx(struct device *dev) |
dev | 1039 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1044 | drivers/net/depca.c | dev->name, dirty_tx, (lp->cur_tx & lp->rmask)); |
dev | 1076 | drivers/net/depca.c | dev->name, dirty_tx, |
dev | 1084 | drivers/net/depca.c | depca_close(struct device *dev) |
dev | 1086 | drivers/net/depca.c | int ioaddr = dev->base_addr; |
dev | 1088 | drivers/net/depca.c | dev->start = 0; |
dev | 1089 | drivers/net/depca.c | dev->tbusy = 1; |
dev | 1095 | drivers/net/depca.c | dev->name, inw(DEPCA_DATA)); |
dev | 1104 | drivers/net/depca.c | free_irq(dev->irq); |
dev | 1106 | drivers/net/depca.c | irq2dev_map[dev->irq] = 0; |
dev | 1111 | drivers/net/depca.c | static void LoadCSRs(struct device *dev) |
dev | 1113 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1114 | drivers/net/depca.c | int ioaddr = dev->base_addr; |
dev | 1125 | drivers/net/depca.c | static int InitRestartDepca(struct device *dev) |
dev | 1127 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1128 | drivers/net/depca.c | int ioaddr = dev->base_addr; |
dev | 1142 | drivers/net/depca.c | dev->name, i, (long) &lp->init_block, inw(DEPCA_DATA)); |
dev | 1147 | drivers/net/depca.c | dev->name, i, (long) &lp->init_block, inw(DEPCA_DATA)); |
dev | 1154 | drivers/net/depca.c | depca_get_stats(struct device *dev) |
dev | 1156 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
dev | 1172 | drivers/net/depca.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 1174 | drivers/net/depca.c | short ioaddr = dev->base_addr; |
dev | 1175 | drivers/net/depca.c | struct depca_private *lp = (struct depca_private *)dev->priv; |
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 | 338 | drivers/net/eexpress.c | && eexp_probe1(dev, *port) == 0) |
dev | 345 | drivers/net/eexpress.c | int eexp_probe1(struct device *dev, short ioaddr) |
dev | 350 | drivers/net/eexpress.c | printk("%s: EtherExpress at %#x,", dev->name, ioaddr); |
dev | 367 | drivers/net/eexpress.c | dev->base_addr = ioaddr; |
dev | 370 | drivers/net/eexpress.c | dev->dev_addr[i] = ((unsigned char*)station_addr)[5-i]; |
dev | 371 | drivers/net/eexpress.c | printk(" %02x", dev->dev_addr[i]); |
dev | 382 | drivers/net/eexpress.c | dev->irq = irqmap[setupval >> 13]; |
dev | 383 | drivers/net/eexpress.c | dev->if_port = (setupval & 0x1000) == 0 ? AUI : |
dev | 385 | drivers/net/eexpress.c | printk(", IRQ %d, Interface %s.\n", dev->irq, ifmap[dev->if_port]); |
dev | 394 | drivers/net/eexpress.c | if ((dev->mem_start & 0xf) > 0) |
dev | 395 | drivers/net/eexpress.c | net_debug = dev->mem_start & 7; |
dev | 401 | drivers/net/eexpress.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 402 | drivers/net/eexpress.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 404 | drivers/net/eexpress.c | dev->open = eexp_open; |
dev | 405 | drivers/net/eexpress.c | dev->stop = eexp_close; |
dev | 406 | drivers/net/eexpress.c | dev->hard_start_xmit = eexp_send_packet; |
dev | 407 | drivers/net/eexpress.c | dev->get_stats = eexp_get_stats; |
dev | 409 | drivers/net/eexpress.c | dev->set_multicast_list = &set_multicast_list; |
dev | 415 | drivers/net/eexpress.c | dev->buffs[i] = NULL; |
dev | 417 | drivers/net/eexpress.c | dev->hard_header = eth_header; |
dev | 418 | drivers/net/eexpress.c | dev->add_arp = eth_add_arp; |
dev | 419 | drivers/net/eexpress.c | dev->queue_xmit = dev_queue_xmit; |
dev | 420 | drivers/net/eexpress.c | dev->rebuild_header = eth_rebuild_header; |
dev | 421 | drivers/net/eexpress.c | dev->type_trans = eth_type_trans; |
dev | 423 | drivers/net/eexpress.c | dev->type = ARPHRD_ETHER; |
dev | 424 | drivers/net/eexpress.c | dev->hard_header_len = ETH_HLEN; |
dev | 425 | drivers/net/eexpress.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 426 | drivers/net/eexpress.c | dev->addr_len = ETH_ALEN; |
dev | 428 | drivers/net/eexpress.c | dev->broadcast[i]=0xff; |
dev | 432 | drivers/net/eexpress.c | dev->flags = IFF_BROADCAST; |
dev | 433 | drivers/net/eexpress.c | dev->family = AF_INET; |
dev | 434 | drivers/net/eexpress.c | dev->pa_addr = 0; |
dev | 435 | drivers/net/eexpress.c | dev->pa_brdaddr = 0; |
dev | 436 | drivers/net/eexpress.c | dev->pa_mask = 0; |
dev | 437 | drivers/net/eexpress.c | dev->pa_alen = sizeof(unsigned long); |
dev | 447 | drivers/net/eexpress.c | eexp_open(struct device *dev) |
dev | 449 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 451 | drivers/net/eexpress.c | if (dev->irq == 0 || irqrmap[dev->irq] == 0) |
dev | 454 | drivers/net/eexpress.c | if (irq2dev_map[dev->irq] != 0 |
dev | 456 | drivers/net/eexpress.c | || (irq2dev_map[dev->irq] = dev) == 0 |
dev | 457 | drivers/net/eexpress.c | || request_irq(dev->irq, &eexp_interrupt)) { |
dev | 462 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 465 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 467 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 468 | drivers/net/eexpress.c | dev->interrupt = 0; |
dev | 469 | drivers/net/eexpress.c | dev->start = 1; |
dev | 474 | drivers/net/eexpress.c | eexp_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 476 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 477 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 479 | drivers/net/eexpress.c | if (dev->tbusy) { |
dev | 482 | drivers/net/eexpress.c | int tickssofar = jiffies - dev->trans_start; |
dev | 486 | drivers/net/eexpress.c | printk("%s: transmit timed out, %s? ", dev->name, |
dev | 494 | drivers/net/eexpress.c | init_82586_mem(dev); |
dev | 502 | drivers/net/eexpress.c | dev->tbusy=0; |
dev | 503 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 510 | drivers/net/eexpress.c | dev_tint(dev); |
dev | 516 | drivers/net/eexpress.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 517 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 524 | drivers/net/eexpress.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 525 | drivers/net/eexpress.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 531 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 532 | drivers/net/eexpress.c | hardware_send_packet(dev, buf, length); |
dev | 533 | drivers/net/eexpress.c | dev->trans_start = jiffies; |
dev | 535 | drivers/net/eexpress.c | outb(0x08 | irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 553 | drivers/net/eexpress.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 558 | drivers/net/eexpress.c | if (dev == NULL) { |
dev | 562 | drivers/net/eexpress.c | dev->interrupt = 1; |
dev | 564 | drivers/net/eexpress.c | ioaddr = dev->base_addr; |
dev | 565 | drivers/net/eexpress.c | lp = (struct net_local *)dev->priv; |
dev | 570 | drivers/net/eexpress.c | printk("%s: EExp interrupt, status %4.4x.\n", dev->name, status); |
dev | 574 | drivers/net/eexpress.c | outb(irqrmap[dev->irq], ioaddr + SET_IRQ); |
dev | 588 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 609 | drivers/net/eexpress.c | eexp_rx(dev); |
dev | 615 | drivers/net/eexpress.c | if ((status & 0x0700) != 0x0200 && dev->start) { |
dev | 619 | drivers/net/eexpress.c | dev->name, status); |
dev | 634 | drivers/net/eexpress.c | if ((status & 0x0070) != 0x0040 && dev->start) { |
dev | 642 | drivers/net/eexpress.c | dev->name, status, lp->rx_head, lp->rx_tail); |
dev | 653 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 663 | drivers/net/eexpress.c | printk("%s: EExp exiting interrupt, status %4.4x.\n", dev->name, |
dev | 667 | drivers/net/eexpress.c | outb(irqrmap[dev->irq] | 0x08, ioaddr + SET_IRQ); |
dev | 672 | drivers/net/eexpress.c | eexp_close(struct device *dev) |
dev | 674 | drivers/net/eexpress.c | int ioaddr = dev->base_addr; |
dev | 676 | drivers/net/eexpress.c | dev->tbusy = 1; |
dev | 677 | drivers/net/eexpress.c | dev->start = 0; |
dev | 686 | drivers/net/eexpress.c | free_irq(dev->irq); |
dev | 688 | drivers/net/eexpress.c | irq2dev_map[dev->irq] = 0; |
dev | 698 | drivers/net/eexpress.c | eexp_get_stats(struct device *dev) |
dev | 700 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 715 | drivers/net/eexpress.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 717 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 781 | drivers/net/eexpress.c | init_82586_mem(struct device *dev) |
dev | 783 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 784 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 799 | drivers/net/eexpress.c | outsw(ioaddr, dev->dev_addr, 3); |
dev | 809 | drivers/net/eexpress.c | init_rx_bufs(dev); |
dev | 823 | drivers/net/eexpress.c | dev->name, inw(ioaddr + SCB_STATUS), inw(ioaddr + SCB_CMD)); |
dev | 833 | drivers/net/eexpress.c | printk("%s: Initialized 82586, status %04x.\n", dev->name, |
dev | 839 | drivers/net/eexpress.c | static void init_rx_bufs(struct device *dev) |
dev | 841 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 842 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 880 | drivers/net/eexpress.c | hardware_send_packet(struct device *dev, void *buf, short length) |
dev | 882 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 883 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 920 | drivers/net/eexpress.c | "reap %4x status %4.4x.\n", dev->name, ioaddr, length, |
dev | 925 | drivers/net/eexpress.c | dev->tbusy = 0; |
dev | 929 | drivers/net/eexpress.c | eexp_rx(struct device *dev) |
dev | 931 | drivers/net/eexpress.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 932 | drivers/net/eexpress.c | short ioaddr = dev->base_addr; |
dev | 954 | drivers/net/eexpress.c | "next %04x data-buf @%04x %04x.\n", dev->name, rx_head, |
dev | 974 | drivers/net/eexpress.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 981 | drivers/net/eexpress.c | skb->dev = dev; |
dev | 991 | drivers/net/eexpress.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 1007 | drivers/net/eexpress.c | printk("%s: Rx next frame at %#x is %#x instead of %#x.\n", dev->name, |
dev | 1021 | drivers/net/eexpress.c | dev->name, rx_tail, (outw(rx_tail+4, ioaddr + READ_PTR),inw(ioaddr)), |
dev | 48 | drivers/net/hp.c | int hp_probe(struct device *dev); |
dev | 49 | drivers/net/hp.c | int hpprobe1(struct device *dev, int ioaddr); |
dev | 51 | drivers/net/hp.c | static void hp_reset_8390(struct device *dev); |
dev | 52 | drivers/net/hp.c | static int hp_block_input(struct device *dev, int count, |
dev | 54 | drivers/net/hp.c | static void hp_block_output(struct device *dev, int count, |
dev | 56 | drivers/net/hp.c | static void hp_init_card(struct device *dev); |
dev | 67 | drivers/net/hp.c | int hp_probe(struct device *dev) |
dev | 70 | drivers/net/hp.c | short ioaddr = dev->base_addr; |
dev | 73 | drivers/net/hp.c | return hpprobe1(dev, ioaddr); |
dev | 80 | drivers/net/hp.c | if (hpprobe1(dev, *port) == 0) { |
dev | 87 | drivers/net/hp.c | int hpprobe1(struct device *dev, int ioaddr) |
dev | 91 | drivers/net/hp.c | unsigned char *station_addr = dev->dev_addr; |
dev | 115 | drivers/net/hp.c | printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); |
dev | 121 | drivers/net/hp.c | if (dev->irq < 2) { |
dev | 135 | drivers/net/hp.c | dev->irq = *irqp; |
dev | 145 | drivers/net/hp.c | if (dev->irq == 2) |
dev | 146 | drivers/net/hp.c | dev->irq = 9; |
dev | 147 | drivers/net/hp.c | if (irqaction(dev->irq, &ei_sigaction)) { |
dev | 148 | drivers/net/hp.c | printk (" unable to get IRQ %d.\n", dev->irq); |
dev | 157 | drivers/net/hp.c | dev->base_addr = ioaddr + NIC_OFFSET; |
dev | 159 | drivers/net/hp.c | ethdev_init(dev); |
dev | 170 | drivers/net/hp.c | hp_init_card(dev); |
dev | 176 | drivers/net/hp.c | hp_reset_8390(struct device *dev) |
dev | 178 | drivers/net/hp.c | int hp_base = dev->base_addr - NIC_OFFSET; |
dev | 201 | drivers/net/hp.c | printk("%s: hp_reset_8390() did not complete.\n", dev->name); |
dev | 213 | drivers/net/hp.c | hp_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 215 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 241 | drivers/net/hp.c | dev->name, ring_offset + xfer_count, addr); |
dev | 248 | drivers/net/hp.c | hp_block_output(struct device *dev, int count, |
dev | 251 | drivers/net/hp.c | int nic_base = dev->base_addr; |
dev | 298 | drivers/net/hp.c | dev->name, (start_page << 8) + count, addr); |
dev | 306 | drivers/net/hp.c | hp_init_card(struct device *dev) |
dev | 308 | drivers/net/hp.c | int irq = dev->irq; |
dev | 309 | drivers/net/hp.c | NS8390_init(dev, 0); |
dev | 311 | drivers/net/hp.c | dev->base_addr - NIC_OFFSET + HP_CONFIGURE); |
dev | 47 | drivers/net/lance.c | struct device *init_etherdev(struct device *dev, int sizeof_private, |
dev | 209 | drivers/net/lance.c | static int lance_open(struct device *dev); |
dev | 210 | drivers/net/lance.c | static void lance_init_ring(struct device *dev); |
dev | 211 | drivers/net/lance.c | static int lance_start_xmit(struct sk_buff *skb, struct device *dev); |
dev | 212 | drivers/net/lance.c | static int lance_rx(struct device *dev); |
dev | 214 | drivers/net/lance.c | static int lance_close(struct device *dev); |
dev | 215 | drivers/net/lance.c | static struct enet_statistics *lance_get_stats(struct device *dev); |
dev | 217 | drivers/net/lance.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 241 | drivers/net/lance.c | struct device *dev; |
dev | 261 | drivers/net/lance.c | dev = init_etherdev(0, sizeof(struct lance_private) |
dev | 265 | drivers/net/lance.c | printk("%s: LANCE at %#3x,", dev->name, ioaddr); |
dev | 270 | drivers/net/lance.c | printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); |
dev | 272 | drivers/net/lance.c | dev->base_addr = ioaddr; |
dev | 276 | drivers/net/lance.c | dev->priv = (void *)(((int)dev->priv + 7) & ~7); |
dev | 277 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 278 | drivers/net/lance.c | lp->rx_buffs = (long)dev->priv + sizeof(struct lance_private); |
dev | 300 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 316 | drivers/net/lance.c | dev->dma = dma_tbl[(reset_val >> 2) & 3]; |
dev | 317 | drivers/net/lance.c | dev->irq = irq_tbl[(reset_val >> 4) & 7]; |
dev | 318 | drivers/net/lance.c | printk(" HP J2405A IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 321 | drivers/net/lance.c | if (dev->mem_start & 0x07) |
dev | 322 | drivers/net/lance.c | dev->dma = dev->mem_start & 0x07; |
dev | 323 | drivers/net/lance.c | else if (dev->dma == 0) |
dev | 324 | drivers/net/lance.c | dev->dma = LANCE_DMA; |
dev | 328 | drivers/net/lance.c | if (dev->irq < 2) { |
dev | 335 | drivers/net/lance.c | dev->irq = autoirq_report(1); |
dev | 336 | drivers/net/lance.c | if (dev->irq) |
dev | 338 | drivers/net/lance.c | dev->irq, dev->dma); |
dev | 344 | drivers/net/lance.c | printk(" assigned IRQ %d DMA %d.\n", dev->irq, dev->dma); |
dev | 358 | drivers/net/lance.c | dev->open = &lance_open; |
dev | 359 | drivers/net/lance.c | dev->hard_start_xmit = &lance_start_xmit; |
dev | 360 | drivers/net/lance.c | dev->stop = &lance_close; |
dev | 361 | drivers/net/lance.c | dev->get_stats = &lance_get_stats; |
dev | 363 | drivers/net/lance.c | dev->set_multicast_list = &set_multicast_list; |
dev | 371 | drivers/net/lance.c | lance_open(struct device *dev) |
dev | 373 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 374 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 377 | drivers/net/lance.c | if (request_irq(dev->irq, &lance_interrupt)) { |
dev | 381 | drivers/net/lance.c | if (request_dma(dev->dma)) { |
dev | 382 | drivers/net/lance.c | free_irq(dev->irq); |
dev | 385 | drivers/net/lance.c | irq2dev_map[dev->irq] = dev; |
dev | 391 | drivers/net/lance.c | enable_dma(dev->dma); |
dev | 392 | drivers/net/lance.c | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
dev | 406 | drivers/net/lance.c | dev->name, dev->irq, dev->dma, (int) lp->tx_ring, (int) lp->rx_ring, |
dev | 409 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 422 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 423 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 424 | drivers/net/lance.c | dev->start = 1; |
dev | 433 | drivers/net/lance.c | dev->name, i, (int) &lp->init_block, inw(ioaddr+LANCE_DATA)); |
dev | 440 | drivers/net/lance.c | lance_init_ring(struct device *dev) |
dev | 442 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 460 | drivers/net/lance.c | lp->init_block.phys_addr[i] = dev->dev_addr[i]; |
dev | 468 | drivers/net/lance.c | lance_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 470 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 471 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 475 | drivers/net/lance.c | if (dev->tbusy) { |
dev | 476 | drivers/net/lance.c | int tickssofar = jiffies - dev->trans_start; |
dev | 481 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 500 | drivers/net/lance.c | lance_init_ring(dev); |
dev | 503 | drivers/net/lance.c | dev->tbusy=0; |
dev | 504 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 510 | drivers/net/lance.c | dev_tint(dev); |
dev | 515 | drivers/net/lance.c | if (!skb->arp && dev->rebuild_header(skb+1, dev)) { |
dev | 516 | drivers/net/lance.c | skb->dev = dev; |
dev | 527 | drivers/net/lance.c | printk("%s: lance_start_xmit() called, csr0 %4.4x.\n", dev->name, |
dev | 534 | drivers/net/lance.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 535 | drivers/net/lance.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 559 | drivers/net/lance.c | dev->name, (int)(skb+1)); |
dev | 578 | drivers/net/lance.c | dev->trans_start = jiffies; |
dev | 581 | drivers/net/lance.c | dev->tbusy=0; |
dev | 591 | drivers/net/lance.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 595 | drivers/net/lance.c | if (dev == NULL) { |
dev | 600 | drivers/net/lance.c | ioaddr = dev->base_addr; |
dev | 601 | drivers/net/lance.c | lp = (struct lance_private *)dev->priv; |
dev | 602 | drivers/net/lance.c | if (dev->interrupt) |
dev | 603 | drivers/net/lance.c | printk("%s: Re-entering the interrupt handler.\n", dev->name); |
dev | 605 | drivers/net/lance.c | dev->interrupt = 1; |
dev | 607 | drivers/net/lance.c | outw(0x00, dev->base_addr + LANCE_ADDR); |
dev | 608 | drivers/net/lance.c | csr0 = inw(dev->base_addr + LANCE_DATA); |
dev | 611 | drivers/net/lance.c | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); |
dev | 615 | drivers/net/lance.c | dev->name, csr0, inw(dev->base_addr + LANCE_DATA)); |
dev | 618 | drivers/net/lance.c | lance_rx(dev); |
dev | 672 | drivers/net/lance.c | if (dev->tbusy && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { |
dev | 674 | drivers/net/lance.c | dev->tbusy = 0; |
dev | 687 | drivers/net/lance.c | outw(0x0000, dev->base_addr + LANCE_ADDR); |
dev | 688 | drivers/net/lance.c | outw(0x7f40, dev->base_addr + LANCE_DATA); |
dev | 692 | drivers/net/lance.c | dev->name, inw(ioaddr + LANCE_ADDR), |
dev | 693 | drivers/net/lance.c | inw(dev->base_addr + LANCE_DATA)); |
dev | 695 | drivers/net/lance.c | dev->interrupt = 0; |
dev | 700 | drivers/net/lance.c | lance_rx(struct device *dev) |
dev | 702 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 728 | drivers/net/lance.c | printk("%s: Memory squeeze, deferring packet.\n", dev->name); |
dev | 735 | drivers/net/lance.c | skb->dev = dev; |
dev | 743 | drivers/net/lance.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 763 | drivers/net/lance.c | lance_close(struct device *dev) |
dev | 765 | drivers/net/lance.c | int ioaddr = dev->base_addr; |
dev | 766 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 768 | drivers/net/lance.c | dev->start = 0; |
dev | 769 | drivers/net/lance.c | dev->tbusy = 1; |
dev | 778 | drivers/net/lance.c | dev->name, inw(ioaddr+LANCE_DATA)); |
dev | 784 | drivers/net/lance.c | disable_dma(dev->dma); |
dev | 786 | drivers/net/lance.c | free_irq(dev->irq); |
dev | 787 | drivers/net/lance.c | free_dma(dev->dma); |
dev | 789 | drivers/net/lance.c | irq2dev_map[dev->irq] = 0; |
dev | 795 | drivers/net/lance.c | lance_get_stats(struct device *dev) |
dev | 797 | drivers/net/lance.c | struct lance_private *lp = (struct lance_private *)dev->priv; |
dev | 798 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 819 | drivers/net/lance.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 821 | drivers/net/lance.c | short ioaddr = dev->base_addr; |
dev | 32 | drivers/net/ne.c | #define NE_BASE (dev->base_addr) |
dev | 42 | drivers/net/ne.c | int ne_probe(struct device *dev); |
dev | 43 | drivers/net/ne.c | static int neprobe1(int ioaddr, struct device *dev, int verbose); |
dev | 45 | drivers/net/ne.c | static void ne_reset_8390(struct device *dev); |
dev | 46 | drivers/net/ne.c | static int ne_block_input(struct device *dev, int count, |
dev | 48 | drivers/net/ne.c | static void ne_block_output(struct device *dev, const int count, |
dev | 73 | drivers/net/ne.c | int ne_probe(struct device *dev) |
dev | 76 | drivers/net/ne.c | short ioaddr = dev->base_addr; |
dev | 81 | drivers/net/ne.c | return ! neprobe1(ioaddr, dev, 1); |
dev | 88 | drivers/net/ne.c | if (inb_p(*port) != 0xff && neprobe1(*port, dev, 0)) { |
dev | 89 | drivers/net/ne.c | dev->base_addr = *port; |
dev | 93 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 97 | drivers/net/ne.c | static int neprobe1(int ioaddr, struct device *dev, int verbose) |
dev | 174 | drivers/net/ne.c | dev->dev_addr[i] = SA_prom[i]; |
dev | 204 | drivers/net/ne.c | if (dev->irq < 2) { |
dev | 211 | drivers/net/ne.c | dev->irq = autoirq_report(0); |
dev | 213 | drivers/net/ne.c | printk(" autoirq is %d", dev->irq); |
dev | 214 | drivers/net/ne.c | } else if (dev->irq == 2) |
dev | 217 | drivers/net/ne.c | dev->irq = 9; |
dev | 222 | drivers/net/ne.c | int irqval = irqaction (dev->irq, &ei_sigaction); |
dev | 224 | drivers/net/ne.c | printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval); |
dev | 229 | drivers/net/ne.c | dev->base_addr = ioaddr; |
dev | 235 | drivers/net/ne.c | ethdev_init(dev); |
dev | 237 | drivers/net/ne.c | dev->name, name, ioaddr, dev->irq); |
dev | 256 | drivers/net/ne.c | NS8390_init(dev, 0); |
dev | 257 | drivers/net/ne.c | return dev->base_addr; |
dev | 263 | drivers/net/ne.c | ne_reset_8390(struct device *dev) |
dev | 275 | drivers/net/ne.c | printk("%s: ne_reset_8390() did not complete.\n", dev->name); |
dev | 286 | drivers/net/ne.c | ne_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 289 | drivers/net/ne.c | int nic_base = dev->base_addr; |
dev | 295 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock); |
dev | 331 | drivers/net/ne.c | dev->name, ring_offset + xfer_count, addr); |
dev | 338 | drivers/net/ne.c | ne_block_output(struct device *dev, int count, |
dev | 353 | drivers/net/ne.c | dev->name, ei_status.dmaing, ei_status.irqlock); |
dev | 406 | 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->data, 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, skb->data, 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 | 105 | drivers/net/skeleton.c | extern int netcard_probe(struct device *dev); |
dev | 107 | drivers/net/skeleton.c | static int netcard_probe1(struct device *dev, short ioaddr); |
dev | 108 | drivers/net/skeleton.c | static int net_open(struct device *dev); |
dev | 109 | drivers/net/skeleton.c | static int net_send_packet(struct sk_buff *skb, struct device *dev); |
dev | 111 | drivers/net/skeleton.c | static void net_rx(struct device *dev); |
dev | 112 | drivers/net/skeleton.c | static int net_close(struct device *dev); |
dev | 113 | drivers/net/skeleton.c | static struct enet_statistics *net_get_stats(struct device *dev); |
dev | 115 | drivers/net/skeleton.c | static void set_multicast_list(struct device *dev, int num_addrs, void *addrs); |
dev | 119 | drivers/net/skeleton.c | #define tx_done(dev) 1 |
dev | 121 | drivers/net/skeleton.c | extern void chipset_init(struct device *dev, int startp); |
dev | 131 | drivers/net/skeleton.c | netcard_probe(struct device *dev) |
dev | 134 | drivers/net/skeleton.c | int base_addr = dev->base_addr; |
dev | 137 | drivers/net/skeleton.c | return netcard_probe1(dev, base_addr); |
dev | 147 | drivers/net/skeleton.c | dev->base_addr = ioaddr; |
dev | 148 | drivers/net/skeleton.c | if (netcard_probe1(dev, ioaddr) == 0) |
dev | 152 | drivers/net/skeleton.c | dev->base_addr = base_addr; |
dev | 156 | drivers/net/skeleton.c | int netcard_probe1(struct device *dev, short ioaddr) |
dev | 171 | drivers/net/skeleton.c | printk("%s: %s found at %#3x, IRQ %d.\n", dev->name, |
dev | 172 | drivers/net/skeleton.c | "network card", dev->base_addr, dev->irq); |
dev | 179 | drivers/net/skeleton.c | if (dev->irq == -1) |
dev | 181 | drivers/net/skeleton.c | else if (dev->irq < 2) { /* "Auto-IRQ" */ |
dev | 185 | drivers/net/skeleton.c | dev->irq = autoirq_report(0); |
dev | 187 | drivers/net/skeleton.c | printk(" autoirq is %d", dev->irq); |
dev | 188 | drivers/net/skeleton.c | } else if (dev->irq == 2) |
dev | 191 | drivers/net/skeleton.c | dev->irq = 9; |
dev | 193 | drivers/net/skeleton.c | { int irqval = request_irq(dev->irq, &net_interrupt); |
dev | 195 | drivers/net/skeleton.c | printk ("%s: unable to get IRQ %d (irqval=%d).\n", dev->name, |
dev | 196 | drivers/net/skeleton.c | dev->irq, irqval); |
dev | 209 | drivers/net/skeleton.c | dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); |
dev | 210 | drivers/net/skeleton.c | memset(dev->priv, 0, sizeof(struct net_local)); |
dev | 212 | drivers/net/skeleton.c | dev->open = net_open; |
dev | 213 | drivers/net/skeleton.c | dev->stop = net_close; |
dev | 214 | drivers/net/skeleton.c | dev->hard_start_xmit = net_send_packet; |
dev | 215 | drivers/net/skeleton.c | dev->get_stats = net_get_stats; |
dev | 217 | drivers/net/skeleton.c | dev->set_multicast_list = &set_multicast_list; |
dev | 223 | drivers/net/skeleton.c | dev->buffs[i] = NULL; |
dev | 225 | drivers/net/skeleton.c | dev->hard_header = eth_header; |
dev | 226 | drivers/net/skeleton.c | dev->add_arp = eth_add_arp; |
dev | 227 | drivers/net/skeleton.c | dev->queue_xmit = dev_queue_xmit; |
dev | 228 | drivers/net/skeleton.c | dev->rebuild_header = eth_rebuild_header; |
dev | 229 | drivers/net/skeleton.c | dev->type_trans = eth_type_trans; |
dev | 231 | drivers/net/skeleton.c | dev->type = ARPHRD_ETHER; |
dev | 232 | drivers/net/skeleton.c | dev->hard_header_len = ETH_HLEN; |
dev | 233 | drivers/net/skeleton.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 234 | drivers/net/skeleton.c | dev->addr_len = ETH_ALEN; |
dev | 236 | drivers/net/skeleton.c | dev->broadcast[i]=0xff; |
dev | 240 | drivers/net/skeleton.c | dev->flags = IFF_BROADCAST; |
dev | 241 | drivers/net/skeleton.c | dev->family = AF_INET; |
dev | 242 | drivers/net/skeleton.c | dev->pa_addr = 0; |
dev | 243 | drivers/net/skeleton.c | dev->pa_brdaddr = 0; |
dev | 244 | drivers/net/skeleton.c | dev->pa_mask = 0; |
dev | 245 | drivers/net/skeleton.c | dev->pa_alen = sizeof(unsigned long); |
dev | 259 | drivers/net/skeleton.c | net_open(struct device *dev) |
dev | 261 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 262 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 266 | drivers/net/skeleton.c | if (request_irq(dev->irq, &net_interrupt)) { |
dev | 272 | drivers/net/skeleton.c | if (request_dma(dev->dma)) { |
dev | 273 | drivers/net/skeleton.c | free_irq(dev->irq); |
dev | 276 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = dev; |
dev | 283 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 284 | drivers/net/skeleton.c | dev->interrupt = 0; |
dev | 285 | drivers/net/skeleton.c | dev->start = 1; |
dev | 290 | drivers/net/skeleton.c | net_send_packet(struct sk_buff *skb, struct device *dev) |
dev | 292 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 293 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 295 | drivers/net/skeleton.c | if (dev->tbusy) { |
dev | 298 | drivers/net/skeleton.c | int tickssofar = jiffies - dev->trans_start; |
dev | 301 | drivers/net/skeleton.c | printk("%s: transmit timed out, %s?\n", dev->name, |
dev | 302 | drivers/net/skeleton.c | tx_done(dev) ? "IRQ conflict" : "network cable problem"); |
dev | 304 | drivers/net/skeleton.c | chipset_init(dev, 1); |
dev | 305 | drivers/net/skeleton.c | dev->tbusy=0; |
dev | 306 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 313 | drivers/net/skeleton.c | dev_tint(dev); |
dev | 319 | drivers/net/skeleton.c | if (!skb->arp && dev->rebuild_header(skb->data, dev)) { |
dev | 320 | drivers/net/skeleton.c | skb->dev = dev; |
dev | 328 | drivers/net/skeleton.c | if (set_bit(0, (void*)&dev->tbusy) != 0) |
dev | 329 | drivers/net/skeleton.c | printk("%s: Transmitter access conflict.\n", dev->name); |
dev | 335 | drivers/net/skeleton.c | dev->trans_start = jiffies; |
dev | 353 | drivers/net/skeleton.c | struct device *dev = (struct device *)(irq2dev_map[irq]); |
dev | 357 | drivers/net/skeleton.c | if (dev == NULL) { |
dev | 361 | drivers/net/skeleton.c | dev->interrupt = 1; |
dev | 363 | drivers/net/skeleton.c | ioaddr = dev->base_addr; |
dev | 364 | drivers/net/skeleton.c | lp = (struct net_local *)dev->priv; |
dev | 370 | drivers/net/skeleton.c | net_rx(dev); |
dev | 374 | drivers/net/skeleton.c | dev->tbusy = 0; |
dev | 388 | drivers/net/skeleton.c | net_rx(struct device *dev) |
dev | 390 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 391 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 414 | drivers/net/skeleton.c | printk("%s: Memory squeeze, dropping packet.\n", dev->name); |
dev | 421 | drivers/net/skeleton.c | skb->dev = dev; |
dev | 424 | drivers/net/skeleton.c | memcpy(skb->data, (void*)dev->rmem_start, |
dev | 433 | drivers/net/skeleton.c | if (dev_rint((unsigned char*)skb, pkt_len, IN_SKBUFF, dev) != 0) { |
dev | 451 | drivers/net/skeleton.c | net_close(struct device *dev) |
dev | 453 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 454 | drivers/net/skeleton.c | int ioaddr = dev->base_addr; |
dev | 458 | drivers/net/skeleton.c | dev->tbusy = 1; |
dev | 459 | drivers/net/skeleton.c | dev->start = 0; |
dev | 463 | drivers/net/skeleton.c | disable_dma(dev->dma); |
dev | 468 | drivers/net/skeleton.c | free_irq(dev->irq); |
dev | 469 | drivers/net/skeleton.c | free_dma(dev->dma); |
dev | 471 | drivers/net/skeleton.c | irq2dev_map[dev->irq] = 0; |
dev | 482 | drivers/net/skeleton.c | net_get_stats(struct device *dev) |
dev | 484 | drivers/net/skeleton.c | struct net_local *lp = (struct net_local *)dev->priv; |
dev | 485 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 503 | drivers/net/skeleton.c | set_multicast_list(struct device *dev, int num_addrs, void *addrs) |
dev | 505 | drivers/net/skeleton.c | short ioaddr = dev->base_addr; |
dev | 132 | drivers/net/slip.c | sl_initialize(struct slip *sl, struct device *dev) |
dev | 148 | drivers/net/slip.c | sl->line = dev->base_addr; |
dev | 150 | drivers/net/slip.c | sl->dev = dev; |
dev | 160 | drivers/net/slip.c | dev->rmem_end = (unsigned long) NULL; |
dev | 161 | drivers/net/slip.c | dev->rmem_start = (unsigned long) NULL; |
dev | 162 | drivers/net/slip.c | dev->mem_end = (unsigned long) NULL; |
dev | 163 | drivers/net/slip.c | dev->mem_start = (unsigned long) NULL; |
dev | 228 | drivers/net/slip.c | struct device *dev=sl->dev; |
dev | 233 | drivers/net/slip.c | sl->mtu=dev->mtu; |
dev | 234 | drivers/net/slip.c | l=(dev->mtu *2); |
dev | 253 | drivers/net/slip.c | dev->mtu=omtu; |
dev | 265 | drivers/net/slip.c | tf=(unsigned char *)sl->dev->mem_start; |
dev | 266 | drivers/net/slip.c | sl->dev->mem_start=(unsigned long)tb; |
dev | 267 | drivers/net/slip.c | sl->dev->mem_end=(unsigned long) (sl->dev->mem_start + l); |
dev | 268 | drivers/net/slip.c | rf=(unsigned char *)sl->dev->rmem_start; |
dev | 269 | drivers/net/slip.c | sl->dev->rmem_start=(unsigned long)rb; |
dev | 270 | drivers/net/slip.c | sl->dev->rmem_end=(unsigned long) (sl->dev->rmem_start + l); |
dev | 272 | drivers/net/slip.c | sl->xbuff = (unsigned char *) sl->dev->mem_start; |
dev | 273 | drivers/net/slip.c | sl->rbuff = (unsigned char *) sl->dev->rmem_start; |
dev | 274 | drivers/net/slip.c | sl->rend = (unsigned char *) sl->dev->rmem_end; |
dev | 336 | drivers/net/slip.c | sl->dev->tbusy = 1; |
dev | 350 | drivers/net/slip.c | sl->dev->tbusy = 0; |
dev | 408 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "<< \"%s\" recv:\r\n", sl->dev->name)); |
dev | 416 | drivers/net/slip.c | done = dev_rint(sl->rbuff, count, 0, sl->dev); |
dev | 430 | drivers/net/slip.c | dev_tint(sl->dev); |
dev | 442 | drivers/net/slip.c | DPRINTF((DBG_SLIP, ">> \"%s\" sent:\r\n", sl->dev->name)); |
dev | 446 | drivers/net/slip.c | if(sl->mtu != sl->dev->mtu) /* Someone has been ifconfigging */ |
dev | 529 | drivers/net/slip.c | sl_xmit(struct sk_buff *skb, struct device *dev) |
dev | 536 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 539 | drivers/net/slip.c | dev->name, skb, sl->sending)); |
dev | 557 | drivers/net/slip.c | if(!skb->arp && dev->rebuild_header(skb->data,dev)) |
dev | 559 | drivers/net/slip.c | skb->dev=dev; |
dev | 588 | drivers/net/slip.c | sl_type_trans (struct sk_buff *skb, struct device *dev) |
dev | 591 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 601 | drivers/net/slip.c | sl_header(unsigned char *buff, struct device *dev, unsigned short type, |
dev | 605 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 607 | drivers/net/slip.c | return ax25_encapsulate_ip(buff,dev,type,daddr,saddr,len); |
dev | 616 | drivers/net/slip.c | sl_add_arp(unsigned long addr, struct sk_buff *skb, struct device *dev) |
dev | 619 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 622 | drivers/net/slip.c | arp_add(addr,((char *) skb->data)+8,dev); |
dev | 629 | drivers/net/slip.c | sl_rebuild_header(void *buff, struct device *dev) |
dev | 632 | drivers/net/slip.c | struct slip *sl=&sl_ctrl[dev->base_addr]; |
dev | 635 | drivers/net/slip.c | return ax25_rebuild_header(buff,dev); |
dev | 643 | drivers/net/slip.c | sl_open(struct device *dev) |
dev | 649 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 654 | drivers/net/slip.c | sl->dev = dev; |
dev | 664 | drivers/net/slip.c | l = (dev->mtu * 2); |
dev | 679 | drivers/net/slip.c | sl->mtu = dev->mtu; |
dev | 680 | drivers/net/slip.c | sl->dev->mem_start = (unsigned long) p; |
dev | 681 | drivers/net/slip.c | sl->dev->mem_end = (unsigned long) (sl->dev->mem_start + l); |
dev | 688 | drivers/net/slip.c | sl->dev->rmem_start = (unsigned long) p; |
dev | 689 | drivers/net/slip.c | sl->dev->rmem_end = (unsigned long) (sl->dev->rmem_start + l); |
dev | 691 | drivers/net/slip.c | sl->xbuff = (unsigned char *) sl->dev->mem_start; |
dev | 692 | drivers/net/slip.c | sl->rbuff = (unsigned char *) sl->dev->rmem_start; |
dev | 693 | drivers/net/slip.c | sl->rend = (unsigned char *) sl->dev->rmem_end; |
dev | 702 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->mem_start); |
dev | 710 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->mem_start); |
dev | 711 | drivers/net/slip.c | kfree((unsigned char *)sl->dev->rmem_start); |
dev | 717 | drivers/net/slip.c | dev->flags|=IFF_UP; |
dev | 719 | drivers/net/slip.c | if(dev->pa_addr==0) |
dev | 720 | drivers/net/slip.c | dev->pa_addr=ntohl(0xC0000001); |
dev | 728 | drivers/net/slip.c | sl_close(struct device *dev) |
dev | 732 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 745 | drivers/net/slip.c | sl_initialize(sl, dev); |
dev | 769 | drivers/net/slip.c | if(sl->mtu!=sl->dev->mtu) /* Argh! mtu change time! - costs us the packet part received at the change */ |
dev | 830 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 845 | drivers/net/slip.c | (void) sl_open(sl->dev); |
dev | 847 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 855 | drivers/net/slip.c | sl_get_stats(struct device *dev) |
dev | 862 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 902 | drivers/net/slip.c | (void) dev_close(sl->dev); |
dev | 904 | drivers/net/slip.c | tty->line, sl->dev->name)); |
dev | 1079 | drivers/net/slip.c | int sl_set_mac_address(struct device *dev, void *addr) |
dev | 1084 | drivers/net/slip.c | memcpy_fromfs(dev->dev_addr,addr,7); /* addr is an AX.25 shifted ASCII mac address */ |
dev | 1109 | drivers/net/slip.c | memcpy_tofs(arg, sl->dev->name, strlen(sl->dev->name) + 1); |
dev | 1121 | drivers/net/slip.c | sl->dev->addr_len=7; /* sizeof an AX.25 addr */ |
dev | 1122 | drivers/net/slip.c | sl->dev->hard_header_len=17; /* We don't do digipeaters */ |
dev | 1123 | drivers/net/slip.c | sl->dev->type=3; /* AF_AX25 not an AF_INET device */ |
dev | 1127 | drivers/net/slip.c | sl->dev->addr_len=0; /* No mac addr in slip mode */ |
dev | 1128 | drivers/net/slip.c | sl->dev->hard_header_len=0; |
dev | 1129 | drivers/net/slip.c | sl->dev->type=0; |
dev | 1135 | drivers/net/slip.c | return sl_set_mac_address(sl->dev,arg); |
dev | 1146 | drivers/net/slip.c | slip_init(struct device *dev) |
dev | 1155 | drivers/net/slip.c | sl = &sl_ctrl[dev->base_addr]; |
dev | 1179 | drivers/net/slip.c | sl_initialize(sl, dev); |
dev | 1190 | drivers/net/slip.c | dev->mtu = SL_MTU; |
dev | 1191 | drivers/net/slip.c | dev->hard_start_xmit = sl_xmit; |
dev | 1192 | drivers/net/slip.c | dev->open = sl_open; |
dev | 1193 | drivers/net/slip.c | dev->stop = sl_close; |
dev | 1194 | drivers/net/slip.c | dev->hard_header = sl_header; |
dev | 1195 | drivers/net/slip.c | dev->add_arp = sl_add_arp; |
dev | 1196 | drivers/net/slip.c | dev->type_trans = sl_type_trans; |
dev | 1197 | drivers/net/slip.c | dev->get_stats = sl_get_stats; |
dev | 1200 | drivers/net/slip.c | dev->set_mac_address = sl_set_mac_address; |
dev | 1203 | drivers/net/slip.c | dev->hard_header_len = 0; |
dev | 1204 | drivers/net/slip.c | dev->addr_len = 0; |
dev | 1205 | drivers/net/slip.c | dev->type = 0; |
dev | 1207 | drivers/net/slip.c | memcpy(dev->broadcast,ax25_bcast,7); /* Only activated in AX.25 mode */ |
dev | 1208 | drivers/net/slip.c | memcpy(dev->dev_addr,ax25_test,7); /* "" "" "" "" */ |
dev | 1210 | drivers/net/slip.c | dev->queue_xmit = dev_queue_xmit; |
dev | 1211 | drivers/net/slip.c | dev->rebuild_header = sl_rebuild_header; |
dev | 1213 | drivers/net/slip.c | dev->buffs[i] = NULL; |
dev | 1216 | drivers/net/slip.c | dev->flags = 0; |
dev | 1217 | drivers/net/slip.c | dev->family = AF_INET; |
dev | 1218 | drivers/net/slip.c | dev->pa_addr = 0; |
dev | 1219 | drivers/net/slip.c | dev->pa_brdaddr = 0; |
dev | 1220 | drivers/net/slip.c | dev->pa_mask = 0; |
dev | 1221 | drivers/net/slip.c | dev->pa_alen = sizeof(unsigned long); |
dev | 39 | drivers/net/slip.h | struct device *dev; /* easy for intr handling */ |
dev | 76 | 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 | 100 | drivers/net/smc-ultra.c | printk("%s: SMC Ultra at %#3x,", dev->name, ioaddr); |
dev | 119 | drivers/net/smc-ultra.c | if (dev->irq < 2) { |
dev | 130 | drivers/net/smc-ultra.c | dev->irq = irq; |
dev | 139 | drivers/net/smc-ultra.c | dev->base_addr = ioaddr+ULTRA_NIC_OFFSET; |
dev | 145 | drivers/net/smc-ultra.c | dev->mem_start = ((addr & 0x0f) << 13) + addr_tbl[(addr >> 6) & 3] ; |
dev | 149 | drivers/net/smc-ultra.c | ethdev_init(dev); |
dev | 157 | drivers/net/smc-ultra.c | dev->rmem_start = dev->mem_start + TX_PAGES*256; |
dev | 158 | drivers/net/smc-ultra.c | dev->mem_end = dev->rmem_end |
dev | 159 | drivers/net/smc-ultra.c | = dev->mem_start + (ei_status.stop_page - START_PG)*256; |
dev | 162 | drivers/net/smc-ultra.c | dev->irq, dev->mem_start, dev->mem_end-1); |
dev | 169 | drivers/net/smc-ultra.c | dev->open = &ultra_open; |
dev | 170 | drivers/net/smc-ultra.c | dev->stop = &ultra_close_card; |
dev | 171 | drivers/net/smc-ultra.c | NS8390_init(dev, 0); |
dev | 177 | drivers/net/smc-ultra.c | ultra_open(struct device *dev) |
dev | 179 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */ |
dev | 181 | drivers/net/smc-ultra.c | if (irqaction(dev->irq, &ei_sigaction)) |
dev | 187 | drivers/net/smc-ultra.c | return ei_open(dev); |
dev | 191 | drivers/net/smc-ultra.c | ultra_reset_8390(struct device *dev) |
dev | 193 | drivers/net/smc-ultra.c | int cmd_port = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC base addr */ |
dev | 209 | drivers/net/smc-ultra.c | ultra_block_input(struct device *dev, int count, char *buf, int ring_offset) |
dev | 211 | drivers/net/smc-ultra.c | void *xfer_start = (void *)(dev->mem_start + ring_offset |
dev | 214 | drivers/net/smc-ultra.c | if (xfer_start + count > (void*) dev->rmem_end) { |
dev | 216 | drivers/net/smc-ultra.c | int semi_count = (void*)dev->rmem_end - xfer_start; |
dev | 219 | drivers/net/smc-ultra.c | memcpy(buf + semi_count, (char *)dev->rmem_start, count); |
dev | 220 | drivers/net/smc-ultra.c | return dev->rmem_start + count; |
dev | 228 | drivers/net/smc-ultra.c | ultra_block_output(struct device *dev, int count, const unsigned char *buf, |
dev | 232 | drivers/net/smc-ultra.c | = (unsigned char *)dev->mem_start + ((start_page - START_PG)<<8); |
dev | 239 | drivers/net/smc-ultra.c | ultra_close_card(struct device *dev) |
dev | 241 | drivers/net/smc-ultra.c | int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* CMDREG */ |
dev | 243 | drivers/net/smc-ultra.c | dev->start = 0; |
dev | 244 | drivers/net/smc-ultra.c | dev->tbusy = 1; |
dev | 247 | drivers/net/smc-ultra.c | printk("%s: Shutting down ethercard.\n", dev->name); |
dev | 250 | drivers/net/smc-ultra.c | free_irq(dev->irq); |
dev | 251 | drivers/net/smc-ultra.c | irq2dev_map[dev->irq] = 0; |
dev | 253 | 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 | 963 | drivers/scsi/aha152x.c | int aha152x_biosparam( int size, int dev, int *info_array ) |
dev | 974 | drivers/scsi/aha152x.c | printk("dev=%x, size=%d, ", dev, size); |
dev | 902 | drivers/scsi/aha1542.c | int aha1542_biosparam(int size, int dev, int * ip) |
dev | 908 | drivers/scsi/aha1542.c | disk = rscsi_disks[MINOR(dev) >> 4].device; |
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 | 1399 | drivers/scsi/fdomain.c | int fdomain_16x0_biosparam( int size, int dev, int *info_array ) |
dev | 1440 | drivers/scsi/fdomain.c | drive = MINOR(dev) / 16; |
dev | 396 | drivers/scsi/pas16.c | int pas16_biosparam(int size, int dev, int * ip) |
dev | 181 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
dev | 193 | drivers/scsi/scsi.c | int dev, lun, type; |
dev | 208 | drivers/scsi/scsi.c | for (dev = 0; dev < 8; ++dev) |
dev | 209 | drivers/scsi/scsi.c | if (shpnt->this_id != dev) |
dev | 221 | drivers/scsi/scsi.c | scsi_devices[NR_SCSI_DEVICES].id = dev; |
dev | 237 | drivers/scsi/scsi.c | SCmd.target = dev; |
dev | 240 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 252 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 254 | drivers/scsi/scsi.c | printk("scsi: scan SCSIS id %d lun %d\n", dev, lun); |
dev | 287 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 294 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 359 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 364 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 370 | drivers/scsi/scsi.c | shpnt->host_no , dev, lun); |
dev | 442 | drivers/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 449 | drivers/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 538 | drivers/scsi/scsi.c | if (req && req->dev <= 0) |
dev | 545 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 580 | drivers/scsi/scsi.c | req->dev = -1; |
dev | 583 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
dev | 605 | drivers/scsi/scsi.c | int dev = -1; |
dev | 619 | drivers/scsi/scsi.c | if (req && (dev = req->dev) <= 0) return NULL; |
dev | 629 | drivers/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 635 | drivers/scsi/scsi.c | if (req && ((req->dev < 0) || (req->dev != dev))) { |
dev | 639 | drivers/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
dev | 649 | drivers/scsi/scsi.c | (SCwait->request.dev > 0)); |
dev | 678 | drivers/scsi/scsi.c | req->dev = -1; |
dev | 682 | drivers/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
dev | 1358 | drivers/scsi/scsi.c | if ((SCpnt1->request.dev > 0) && |
dev | 1614 | drivers/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
dev | 461 | drivers/scsi/scsi.h | req->dev,req->sector); |
dev | 486 | drivers/scsi/scsi.h | DEVICE_OFF(req->dev); |
dev | 493 | drivers/scsi/scsi.h | req->dev = -1; |
dev | 509 | 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 | 213 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
dev | 222 | drivers/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
dev | 223 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
dev | 247 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host->host_no, |
dev | 248 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
dev | 249 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
dev | 295 | drivers/scsi/sr.c | if (CURRENT != NULL && CURRENT->dev == -1) { |
dev | 304 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(CURRENT->dev))].device->index, 0); |
dev | 322 | drivers/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(req->dev))].device->index); |
dev | 327 | drivers/scsi/sr.c | if (SCpnt && req->dev == -1) { |
dev | 348 | drivers/scsi/sr.c | unsigned int dev, block, realcount; |
dev | 355 | drivers/scsi/sr.c | if(SCpnt->request.dev <= 0) { |
dev | 360 | drivers/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
dev | 365 | drivers/scsi/sr.c | if (dev >= NR_SR) |
dev | 373 | drivers/scsi/sr.c | if (!scsi_CDs[dev].use) |
dev | 381 | drivers/scsi/sr.c | if (scsi_CDs[dev].device->changed) |
dev | 434 | drivers/scsi/sr.c | this_count_max = (scsi_CDs[dev].ten ? 0xffff : 0xff) << 4; |
dev | 562 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 2048) |
dev | 569 | drivers/scsi/sr.c | if (scsi_CDs[dev].sector_size == 512) realcount = realcount << 2; |
dev | 571 | drivers/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
dev | 576 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 593 | drivers/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 616 | drivers/scsi/sr.c | realcount * scsi_CDs[dev].sector_size, |
dev | 637 | drivers/scsi/sr.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 660 | drivers/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
dev | 670 | drivers/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
dev | 672 | drivers/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 675 | drivers/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 683 | 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 | 382 | drivers/scsi/sr_ioctl.c | RO_IOCTLS(dev,arg); |
dev | 123 | drivers/scsi/st.c | int dev = SCpnt->request.dev; |
dev | 131 | drivers/scsi/st.c | printk("st%d: Error: %x\n", dev, result); |
dev | 144 | drivers/scsi/st.c | scsi_tapes[dev].recover_count++; |
dev | 151 | drivers/scsi/st.c | printk("st%d: Recovered %s error (%d).\n", dev, stp, |
dev | 152 | drivers/scsi/st.c | scsi_tapes[dev].recover_count); |
dev | 166 | drivers/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) { |
dev | 188 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 190 | drivers/scsi/st.c | SCpnt->request.dev = 0xffff; |
dev | 204 | drivers/scsi/st.c | write_behind_check(int dev) |
dev | 209 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 234 | drivers/scsi/st.c | flush_write_buffer(int dev) |
dev | 240 | drivers/scsi/st.c | Scsi_Tape *STp = &(scsi_tapes[dev]); |
dev | 244 | drivers/scsi/st.c | write_behind_check(dev); |
dev | 247 | drivers/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 265 | drivers/scsi/st.c | printk("st%d: Flushing %d bytes.\n", dev, transfer); |
dev | 277 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 282 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 285 | drivers/scsi/st.c | printk("st%d: Error on flush.\n", dev); |
dev | 300 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 311 | drivers/scsi/st.c | int dev; |
dev | 316 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 317 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 321 | drivers/scsi/st.c | return flush_write_buffer(dev); |
dev | 353 | drivers/scsi/st.c | int dev; |
dev | 360 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 361 | drivers/scsi/st.c | if (dev >= NR_ST) |
dev | 363 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 365 | drivers/scsi/st.c | printk("st%d: Device already in use.\n", dev); |
dev | 374 | drivers/scsi/st.c | printk("st%d: No free buffers.\n", dev); |
dev | 393 | drivers/scsi/st.c | printk("st%d: Tape request not allocated", dev); |
dev | 400 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 406 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 413 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 419 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 425 | drivers/scsi/st.c | printk("st%d: No tape.\n", dev); |
dev | 427 | drivers/scsi/st.c | printk("st%d: Error %x.\n", dev, SCpnt->result); |
dev | 430 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 437 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 442 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 450 | drivers/scsi/st.c | printk("st%d: Block limits %d - %d bytes.\n", dev, STp->min_block, |
dev | 457 | drivers/scsi/st.c | printk("st%d: Can't read block limits.\n", dev); |
dev | 465 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 470 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 474 | drivers/scsi/st.c | printk("st%d: No Mode Sense.\n", dev); |
dev | 479 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 482 | drivers/scsi/st.c | printk("st%d: Mode sense. Length %d, medium %x, WBS %x, BLL %d\n", dev, |
dev | 495 | drivers/scsi/st.c | dev, STp->density, (STp->buffer)->b_data[5] * 65536 + |
dev | 500 | drivers/scsi/st.c | printk("st%d: Blocksize %d too large for buffer.\n", dev, |
dev | 523 | drivers/scsi/st.c | printk("st%d: Block size: %d, buffer size: %d (%d blocks).\n", dev, |
dev | 531 | drivers/scsi/st.c | printk( "st%d: Write protected\n", dev); |
dev | 543 | drivers/scsi/st.c | int dev; |
dev | 550 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev); |
dev | 551 | drivers/scsi/st.c | rewind = (dev & 0x80) == 0; |
dev | 552 | drivers/scsi/st.c | dev = dev & 127; |
dev | 553 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 557 | drivers/scsi/st.c | result = flush_write_buffer(dev); |
dev | 560 | drivers/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
dev | 570 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 575 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 578 | drivers/scsi/st.c | printk("st%d: Error on write filemark.\n", dev); |
dev | 580 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 584 | drivers/scsi/st.c | printk("st%d: Buffer flushed, EOF written\n", dev); |
dev | 610 | drivers/scsi/st.c | int dev; |
dev | 618 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 619 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 622 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 642 | drivers/scsi/st.c | write_behind_check(dev); |
dev | 645 | drivers/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 713 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 719 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 723 | drivers/scsi/st.c | printk("st%d: Error on write:\n", dev); |
dev | 745 | drivers/scsi/st.c | dev, transfer); |
dev | 752 | drivers/scsi/st.c | printk("st%d: EOM with lost data.\n", dev); |
dev | 759 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 783 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 807 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 815 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 825 | drivers/scsi/st.c | int dev; |
dev | 832 | drivers/scsi/st.c | dev = MINOR(inode->i_rdev) & 127; |
dev | 833 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 836 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 853 | drivers/scsi/st.c | printk("st%d: EOF flag up. Bytes %d\n", dev, |
dev | 883 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 889 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 896 | drivers/scsi/st.c | printk("st%d: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n", dev, |
dev | 923 | drivers/scsi/st.c | printk("st%d: Incorrect block size.\n", dev); |
dev | 924 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 937 | drivers/scsi/st.c | printk("st%d: EOM detected (%d bytes read).\n", dev, |
dev | 952 | drivers/scsi/st.c | dev, (STp->buffer)->buffer_bytes, total); |
dev | 958 | drivers/scsi/st.c | printk("st%d: Tape error while reading.\n", dev); |
dev | 960 | drivers/scsi/st.c | SCpnt->request.dev = -1; |
dev | 969 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 982 | drivers/scsi/st.c | printk("st%d: EOF up. Left %d, needed %d.\n", dev, |
dev | 997 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1010 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1021 | drivers/scsi/st.c | int dev = MINOR(inode->i_rdev); |
dev | 1029 | drivers/scsi/st.c | dev = dev & 127; |
dev | 1030 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1042 | drivers/scsi/st.c | printk("st%d: Spacing tape forward over %d filemarks.\n", dev, |
dev | 1058 | drivers/scsi/st.c | printk("st%d: Spacing tape backward over %d filemarks.\n", dev, (-ltmp)); |
dev | 1068 | drivers/scsi/st.c | printk("st%d: Spacing tape forward %d blocks.\n", dev, |
dev | 1083 | drivers/scsi/st.c | printk("st%d: Spacing tape backward %d blocks.\n", dev, (-ltmp)); |
dev | 1095 | drivers/scsi/st.c | printk("st%d: Writing %d filemarks.\n", dev, |
dev | 1106 | drivers/scsi/st.c | printk("st%d: Rewinding tape.\n", dev); |
dev | 1116 | drivers/scsi/st.c | printk("st%d: Unloading tape.\n", dev); |
dev | 1121 | drivers/scsi/st.c | printk("st%d: No op on tape.\n", dev); |
dev | 1133 | drivers/scsi/st.c | printk("st%d: Retensioning tape.\n", dev); |
dev | 1140 | drivers/scsi/st.c | printk("st%d: Spacing to end of recorded medium.\n", dev); |
dev | 1149 | drivers/scsi/st.c | printk("st%d: Erasing tape.\n", dev); |
dev | 1173 | drivers/scsi/st.c | printk("st%d: Seeking tape to block %d.\n", dev, arg); |
dev | 1185 | drivers/scsi/st.c | printk("st%d: Illegal block size.\n", dev); |
dev | 1212 | drivers/scsi/st.c | printk("st%d: Setting block size to %d bytes.\n", dev, |
dev | 1217 | drivers/scsi/st.c | printk("st%d: Setting density code to %x.\n", dev, |
dev | 1220 | drivers/scsi/st.c | printk("st%d: Setting drive buffer code to %d.\n", dev, |
dev | 1225 | drivers/scsi/st.c | printk("st%d: Unknown st_ioctl command %x.\n", dev, cmd_in); |
dev | 1231 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1236 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 1240 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1286 | drivers/scsi/st.c | int dev = MINOR(inode->i_rdev); |
dev | 1294 | drivers/scsi/st.c | dev = dev & 127; |
dev | 1295 | drivers/scsi/st.c | STp = &(scsi_tapes[dev]); |
dev | 1298 | drivers/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 1337 | drivers/scsi/st.c | printk("st%d: get tape position.\n", dev); |
dev | 1362 | drivers/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1368 | drivers/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &(STp->waiting) ); |
dev | 1373 | drivers/scsi/st.c | printk("st%d: Can't read tape position.\n", dev); |
dev | 1391 | drivers/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 295 | drivers/scsi/t128.c | int t128_biosparam(int size, int dev, int * ip) |
dev | 973 | drivers/scsi/ultrastor.c | int ultrastor_biosparam(int size, int dev, int * dkinfo) |
dev | 610 | 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 | 115 | drivers/sound/dmabuf.c | printk ("SOUND: Invalid PCM parameters[%d] sr=%d, nc=%d, sz=%d\n", dev, sr, nc, sz); |
dev | 129 | drivers/sound/dmabuf.c | bsz = sound_buffsizes[dev]; |
dev | 134 | drivers/sound/dmabuf.c | if (sound_buffcounts[dev] == 1 && bsz == sound_buffsizes[dev]) |
dev | 137 | drivers/sound/dmabuf.c | if (dev_subdivision[dev] == 0) |
dev | 138 | drivers/sound/dmabuf.c | dev_subdivision[dev] = 1; /* Default value */ |
dev | 140 | drivers/sound/dmabuf.c | bsz /= dev_subdivision[dev]; /* Use smaller buffers */ |
dev | 144 | drivers/sound/dmabuf.c | while ((sound_buffsizes[dev]*sound_buffcounts[dev])/bsz > MAX_SUB_BUFFERS) |
dev | 147 | drivers/sound/dmabuf.c | dev_buffsize[dev] = bsz; |
dev | 154 | drivers/sound/dmabuf.c | for (i = 0; i < snd_raw_count[dev]; i++) |
dev | 158 | drivers/sound/dmabuf.c | while ((p + bsz) <= sound_buffsizes[dev]) |
dev | 160 | drivers/sound/dmabuf.c | dev_buf[dev][n] = snd_raw_buf[dev][i] + p; |
dev | 161 | drivers/sound/dmabuf.c | dev_buf_phys[dev][n] = snd_raw_buf_phys[dev][i] + p; |
dev | 167 | drivers/sound/dmabuf.c | dev_nbufs[dev] = n; |
dev | 169 | drivers/sound/dmabuf.c | for (i = 0; i < dev_nbufs[dev]; i++) |
dev | 171 | drivers/sound/dmabuf.c | dev_counts[dev][i] = 0; |
dev | 174 | drivers/sound/dmabuf.c | bufferalloc_done[dev] = 1; |
dev | 178 | drivers/sound/dmabuf.c | dma_init_buffers(int dev) |
dev | 180 | drivers/sound/dmabuf.c | RESET_WAIT_QUEUE (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 181 | drivers/sound/dmabuf.c | dev_underrun[dev] = 0; |
dev | 183 | drivers/sound/dmabuf.c | dev_busy[dev] = 1; |
dev | 185 | drivers/sound/dmabuf.c | bufferalloc_done[dev] = 0; |
dev | 187 | drivers/sound/dmabuf.c | dev_active[dev] = dev_qlen[dev] = dev_qtail[dev] = dev_qhead[dev] = 0; |
dev | 188 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = dev_started[dev] = 0; |
dev | 189 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 193 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 197 | drivers/sound/dmabuf.c | if (dev >= num_dspdevs) |
dev | 199 | drivers/sound/dmabuf.c | printk ("PCM device %d not installed.\n", dev); |
dev | 203 | drivers/sound/dmabuf.c | if (dev_busy[dev]) |
dev | 206 | drivers/sound/dmabuf.c | if (!dsp_devs[dev]) |
dev | 208 | drivers/sound/dmabuf.c | printk ("DSP device %d not initialized\n", dev); |
dev | 213 | drivers/sound/dmabuf.c | sound_dma_malloc(dev); |
dev | 216 | drivers/sound/dmabuf.c | if (snd_raw_buf[dev][0] == NULL) |
dev | 219 | drivers/sound/dmabuf.c | if ((retval = dsp_devs[dev]->open (dev, mode)) < 0) |
dev | 222 | drivers/sound/dmabuf.c | dev_modes[dev] = mode; |
dev | 223 | drivers/sound/dmabuf.c | dev_subdivision[dev] = 0; |
dev | 225 | drivers/sound/dmabuf.c | dma_init_buffers(dev); |
dev | 226 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_BITS, 8, 1); |
dev | 227 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_CHANNELS, 1, 1); |
dev | 228 | drivers/sound/dmabuf.c | dsp_devs[dev]->ioctl (dev, SOUND_PCM_WRITE_RATE, DSP_DEFAULT_SPEED, 1); |
dev | 234 | drivers/sound/dmabuf.c | dma_reset (int dev) |
dev | 240 | drivers/sound/dmabuf.c | dsp_devs[dev]->reset (dev); |
dev | 241 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 243 | drivers/sound/dmabuf.c | if ((retval = dsp_devs[dev]->open (dev, dev_modes[dev])) < 0) |
dev | 247 | drivers/sound/dmabuf.c | dma_init_buffers(dev); |
dev | 248 | drivers/sound/dmabuf.c | reorganize_buffers(dev); |
dev | 252 | drivers/sound/dmabuf.c | dma_sync (int dev) |
dev | 258 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_OUTPUT) |
dev | 265 | drivers/sound/dmabuf.c | while ((!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 266 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) && !timed_out) |
dev | 267 | drivers/sound/dmabuf.c | && dev_qlen[dev]) |
dev | 269 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 10 * HZ); |
dev | 281 | drivers/sound/dmabuf.c | if (dsp_devs[dev]->has_output_drained) /* Device has hidden buffers */ |
dev | 283 | drivers/sound/dmabuf.c | while (!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 284 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) |
dev | 285 | drivers/sound/dmabuf.c | && !dsp_devs[dev]->has_output_drained (dev)) |
dev | 287 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], HZ / 4); |
dev | 292 | drivers/sound/dmabuf.c | return dev_qlen[dev]; |
dev | 296 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 299 | drivers/sound/dmabuf.c | if (!(PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev]) || |
dev | 300 | drivers/sound/dmabuf.c | dmabuf_interrupted[dev]) |
dev | 301 | drivers/sound/dmabuf.c | && (dma_mode[dev] == DMODE_OUTPUT)) |
dev | 303 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 307 | drivers/sound/dmabuf.c | sound_dma_free(dev); |
dev | 310 | drivers/sound/dmabuf.c | dsp_devs[dev]->reset (dev); |
dev | 312 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 314 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 315 | drivers/sound/dmabuf.c | dev_busy[dev] = 0; |
dev | 321 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len) |
dev | 327 | drivers/sound/dmabuf.c | if (!dev_qlen[dev]) |
dev | 329 | drivers/sound/dmabuf.c | if (dev_needs_restart[dev]) |
dev | 331 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 332 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 0; |
dev | 335 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_OUTPUT) /* Was output -> direction change */ |
dev | 337 | drivers/sound/dmabuf.c | dma_sync(dev); |
dev | 338 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 339 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 342 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 343 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 345 | drivers/sound/dmabuf.c | if (!dma_mode[dev]) |
dev | 349 | drivers/sound/dmabuf.c | if ((err = dsp_devs[dev]->prepare_for_input (dev, |
dev | 350 | drivers/sound/dmabuf.c | dev_buffsize[dev], dev_nbufs[dev])) < 0) |
dev | 355 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_INPUT; |
dev | 358 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 360 | drivers/sound/dmabuf.c | dsp_devs[dev]->start_input (dev, dev_buf_phys[dev][dev_qtail[dev]], |
dev | 361 | drivers/sound/dmabuf.c | dev_buffsize[dev], 0, |
dev | 362 | drivers/sound/dmabuf.c | !sound_dma_automode[dev] || |
dev | 363 | drivers/sound/dmabuf.c | !dev_started[dev]); |
dev | 364 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 365 | drivers/sound/dmabuf.c | dev_started[dev] = 1; |
dev | 369 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 2 * HZ); |
dev | 370 | drivers/sound/dmabuf.c | if (TIMED_OUT (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 374 | drivers/sound/dmabuf.c | SET_ABORT_FLAG (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 381 | drivers/sound/dmabuf.c | if (!dev_qlen[dev]) |
dev | 384 | drivers/sound/dmabuf.c | *buf = &dev_buf[dev][dev_qhead[dev]][dev_counts[dev][dev_qhead[dev]]]; |
dev | 385 | drivers/sound/dmabuf.c | *len = dev_buffsize[dev] - dev_counts[dev][dev_qhead[dev]]; |
dev | 387 | drivers/sound/dmabuf.c | return dev_qhead[dev]; |
dev | 391 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 393 | drivers/sound/dmabuf.c | int p = dev_counts[dev][dev_qhead[dev]] + c; |
dev | 395 | drivers/sound/dmabuf.c | if (p >= dev_buffsize[dev]) |
dev | 397 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]] = 0; |
dev | 398 | drivers/sound/dmabuf.c | dev_qlen[dev]--; |
dev | 399 | drivers/sound/dmabuf.c | dev_qhead[dev] = (dev_qhead[dev] + 1) % dev_nbufs[dev]; |
dev | 402 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]] = p; |
dev | 408 | drivers/sound/dmabuf.c | DMAbuf_read (int dev, snd_rw_buf * user_buf, int count) |
dev | 418 | drivers/sound/dmabuf.c | if ((buff_no = DMAbuf_getrdbuffer (dev, &dmabuf, &c)) < 0) |
dev | 426 | drivers/sound/dmabuf.c | if ((err = DMAbuf_rmchars (dev, buff_no, c)) < 0) |
dev | 433 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 438 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 443 | drivers/sound/dmabuf.c | dma_sync (dev); |
dev | 444 | drivers/sound/dmabuf.c | dma_reset (dev); |
dev | 449 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 450 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 452 | drivers/sound/dmabuf.c | return IOCTL_OUT (arg, dev_buffsize[dev]); |
dev | 461 | drivers/sound/dmabuf.c | fact = dev_subdivision[dev]; |
dev | 466 | drivers/sound/dmabuf.c | if (dev_subdivision[dev] != 0) /* Too late to change */ |
dev | 474 | drivers/sound/dmabuf.c | dev_subdivision[dev] = fact; |
dev | 480 | drivers/sound/dmabuf.c | return dsp_devs[dev]->ioctl (dev, cmd, arg, local); |
dev | 487 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size) |
dev | 492 | drivers/sound/dmabuf.c | if (dma_mode[dev] == DMODE_INPUT) /* Was input -> Direction change */ |
dev | 494 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 495 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_NONE; |
dev | 498 | drivers/sound/dmabuf.c | if (dev_needs_restart[dev]) /* Restart buffering */ |
dev | 500 | drivers/sound/dmabuf.c | dma_sync(dev); |
dev | 501 | drivers/sound/dmabuf.c | dma_reset(dev); |
dev | 504 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 0; |
dev | 506 | drivers/sound/dmabuf.c | if (!bufferalloc_done[dev]) |
dev | 507 | drivers/sound/dmabuf.c | reorganize_buffers (dev); |
dev | 509 | drivers/sound/dmabuf.c | if (!dma_mode[dev]) |
dev | 513 | drivers/sound/dmabuf.c | dma_mode[dev] = DMODE_OUTPUT; |
dev | 514 | drivers/sound/dmabuf.c | if ((err = dsp_devs[dev]->prepare_for_output (dev, |
dev | 515 | drivers/sound/dmabuf.c | dev_buffsize[dev], dev_nbufs[dev])) < 0) |
dev | 522 | drivers/sound/dmabuf.c | RESET_WAIT_QUEUE (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 524 | drivers/sound/dmabuf.c | if (dev_qlen[dev] == dev_nbufs[dev]) |
dev | 526 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 529 | drivers/sound/dmabuf.c | dev_qlen[dev], dev_nbufs[dev]); |
dev | 534 | drivers/sound/dmabuf.c | DO_SLEEP (dev_sleeper[dev], dev_sleep_flag[dev], 2 * HZ); |
dev | 535 | drivers/sound/dmabuf.c | if (TIMED_OUT (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 539 | drivers/sound/dmabuf.c | SET_ABORT_FLAG (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 541 | drivers/sound/dmabuf.c | else if (PROCESS_ABORTING (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 546 | drivers/sound/dmabuf.c | if (dev_qlen[dev] == dev_nbufs[dev]) |
dev | 549 | drivers/sound/dmabuf.c | *buf = dev_buf[dev][dev_qtail[dev]]; |
dev | 550 | drivers/sound/dmabuf.c | *size = dev_buffsize[dev]; |
dev | 551 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qtail[dev]] = 0; |
dev | 553 | drivers/sound/dmabuf.c | return dev_qtail[dev]; |
dev | 557 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 559 | drivers/sound/dmabuf.c | if (buff_no != dev_qtail[dev]) |
dev | 560 | drivers/sound/dmabuf.c | printk ("Soundcard warning: DMA buffers out of sync %d != %d\n", buff_no, dev_qtail[dev]); |
dev | 562 | drivers/sound/dmabuf.c | dev_qlen[dev]++; |
dev | 564 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qtail[dev]] = l; |
dev | 566 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = (l != dev_buffsize[dev]); |
dev | 568 | drivers/sound/dmabuf.c | dev_qtail[dev] = (dev_qtail[dev] + 1) % dev_nbufs[dev]; |
dev | 570 | drivers/sound/dmabuf.c | if (!dev_active[dev]) |
dev | 572 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 573 | drivers/sound/dmabuf.c | dsp_devs[dev]->output_block (dev, dev_buf_phys[dev][dev_qhead[dev]], |
dev | 574 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]], 0, |
dev | 575 | drivers/sound/dmabuf.c | !sound_dma_automode[dev] || !dev_started[dev]); |
dev | 576 | drivers/sound/dmabuf.c | dev_started[dev] = 1; |
dev | 583 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 585 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 597 | drivers/sound/dmabuf.c | if (sound_dma_automode[dev]) |
dev | 605 | drivers/sound/dmabuf.c | set_dma_addr (chan, snd_raw_buf_phys[dev][0]); |
dev | 606 | drivers/sound/dmabuf.c | set_dma_count (chan, sound_buffsizes[dev]); |
dev | 612 | 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], |
dev | 616 | drivers/sound/dmabuf.c | sound_buffsizes[dev], |
dev | 621 | drivers/sound/dmabuf.c | printk ("sound: Invalid DMA mode for device %d\n", dev); |
dev | 628 | drivers/sound/dmabuf.c | snd_raw_buf_phys[dev][0], count); |
dev | 695 | drivers/sound/dmabuf.c | DMAbuf_outputintr (int dev, int underrun_flag) |
dev | 699 | drivers/sound/dmabuf.c | dev_qlen[dev]--; |
dev | 700 | drivers/sound/dmabuf.c | dev_qhead[dev] = (dev_qhead[dev] + 1) % dev_nbufs[dev]; |
dev | 701 | drivers/sound/dmabuf.c | dev_active[dev] = 0; |
dev | 703 | drivers/sound/dmabuf.c | if (dev_qlen[dev]) |
dev | 705 | drivers/sound/dmabuf.c | dsp_devs[dev]->output_block (dev, dev_buf_phys[dev][dev_qhead[dev]], |
dev | 706 | drivers/sound/dmabuf.c | dev_counts[dev][dev_qhead[dev]], 1, |
dev | 707 | drivers/sound/dmabuf.c | !sound_dma_automode[dev]); |
dev | 708 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 713 | drivers/sound/dmabuf.c | dev_underrun[dev]++; |
dev | 714 | drivers/sound/dmabuf.c | dsp_devs[dev]->halt_xfer (dev); |
dev | 715 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 1; |
dev | 719 | drivers/sound/dmabuf.c | if (SOMEONE_WAITING (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 721 | drivers/sound/dmabuf.c | WAKE_UP (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 727 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 731 | drivers/sound/dmabuf.c | if (!dev_busy[dev]) |
dev | 733 | drivers/sound/dmabuf.c | dsp_devs[dev]->close (dev); |
dev | 735 | drivers/sound/dmabuf.c | else if (dev_qlen[dev] == (dev_nbufs[dev] - 1)) |
dev | 738 | drivers/sound/dmabuf.c | dev_underrun[dev]++; |
dev | 739 | drivers/sound/dmabuf.c | dsp_devs[dev]->halt_xfer (dev); |
dev | 740 | drivers/sound/dmabuf.c | dev_active[dev] = 0; |
dev | 741 | drivers/sound/dmabuf.c | dev_needs_restart[dev] = 1; |
dev | 745 | drivers/sound/dmabuf.c | dev_qlen[dev]++; |
dev | 746 | drivers/sound/dmabuf.c | dev_qtail[dev] = (dev_qtail[dev] + 1) % dev_nbufs[dev]; |
dev | 748 | drivers/sound/dmabuf.c | dsp_devs[dev]->start_input (dev, dev_buf_phys[dev][dev_qtail[dev]], |
dev | 749 | drivers/sound/dmabuf.c | dev_buffsize[dev], 1, |
dev | 750 | drivers/sound/dmabuf.c | !sound_dma_automode[dev]); |
dev | 751 | drivers/sound/dmabuf.c | dev_active[dev] = 1; |
dev | 755 | drivers/sound/dmabuf.c | if (SOMEONE_WAITING (dev_sleeper[dev], dev_sleep_flag[dev])) |
dev | 757 | drivers/sound/dmabuf.c | WAKE_UP (dev_sleeper[dev], dev_sleep_flag[dev]); |
dev | 763 | drivers/sound/dmabuf.c | DMAbuf_open_dma (int dev) |
dev | 766 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 785 | drivers/sound/dmabuf.c | DMAbuf_close_dma (int dev) |
dev | 787 | drivers/sound/dmabuf.c | int chan = sound_dsp_dmachan[dev]; |
dev | 810 | drivers/sound/dmabuf.c | DMAbuf_open (int dev, int mode) |
dev | 816 | drivers/sound/dmabuf.c | DMAbuf_release (int dev, int mode) |
dev | 822 | drivers/sound/dmabuf.c | DMAbuf_read (int dev, snd_rw_buf * user_buf, int count) |
dev | 828 | drivers/sound/dmabuf.c | DMAbuf_getwrbuffer (int dev, char **buf, int *size) |
dev | 834 | drivers/sound/dmabuf.c | DMAbuf_getrdbuffer (int dev, char **buf, int *len) |
dev | 840 | drivers/sound/dmabuf.c | DMAbuf_rmchars (int dev, int buff_no, int c) |
dev | 846 | drivers/sound/dmabuf.c | DMAbuf_start_output (int dev, int buff_no, int l) |
dev | 852 | drivers/sound/dmabuf.c | DMAbuf_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 864 | drivers/sound/dmabuf.c | DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode) |
dev | 888 | drivers/sound/dmabuf.c | DMAbuf_inputintr (int dev) |
dev | 894 | 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 | 999 | drivers/sound/gus_wave.c | guswave_ioctl (int dev, |
dev | 1029 | drivers/sound/gus_wave.c | guswave_set_instr (int dev, int voice, int instr_no) |
dev | 1071 | drivers/sound/gus_wave.c | guswave_kill_note (int dev, int voice, int note, int velocity) |
dev | 1073 | drivers/sound/gus_wave.c | guswave_kill_note (int dev, int voice, int velocity) |
dev | 1092 | drivers/sound/gus_wave.c | guswave_aftertouch (int dev, int voice, int pressure) |
dev | 1142 | drivers/sound/gus_wave.c | guswave_panning (int dev, int voice, int value) |
dev | 1298 | drivers/sound/gus_wave.c | guswave_controller (int dev, int voice, int ctrl_num, int value) |
dev | 1361 | drivers/sound/gus_wave.c | guswave_start_note2 (int dev, int voice, int note_num, int volume) |
dev | 1580 | drivers/sound/gus_wave.c | guswave_start_note (int dev, int voice, int note_num, int volume) |
dev | 1592 | drivers/sound/gus_wave.c | ret_val = guswave_start_note2 (dev, voice, note_num, volume); |
dev | 1615 | drivers/sound/gus_wave.c | ret_val = guswave_start_note2 (dev, voice, note_num, volume); |
dev | 1619 | drivers/sound/gus_wave.c | voices[voice].dev_pending = dev; |
dev | 1635 | drivers/sound/gus_wave.c | guswave_reset (int dev) |
dev | 1647 | drivers/sound/gus_wave.c | guswave_open (int dev, int mode) |
dev | 1669 | drivers/sound/gus_wave.c | guswave_close (int dev) |
dev | 1679 | drivers/sound/gus_wave.c | guswave_load_patch (int dev, int format, snd_rw_buf * addr, |
dev | 1955 | drivers/sound/gus_wave.c | pmgr_inform (dev, PM_E_PATCH_LOADED, instr, free_sample, 0, 0); |
dev | 1961 | drivers/sound/gus_wave.c | guswave_hw_control (int dev, unsigned char *event) |
dev | 1988 | drivers/sound/gus_wave.c | guswave_set_instr (dev, voice, p1); |
dev | 2170 | drivers/sound/gus_wave.c | gus_sampling_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 2232 | drivers/sound/gus_wave.c | gus_sampling_reset (int dev) |
dev | 2237 | drivers/sound/gus_wave.c | gus_sampling_open (int dev, int mode) |
dev | 2268 | drivers/sound/gus_wave.c | gus_sampling_close (int dev) |
dev | 2468 | drivers/sound/gus_wave.c | gus_transfer_output_block (int dev, unsigned long buf, |
dev | 2505 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf + (chn * count), count, DMA_MODE_WRITE); |
dev | 2510 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 2535 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 2566 | drivers/sound/gus_wave.c | gus_sampling_output_block (int dev, unsigned long buf, int total_count, |
dev | 2572 | drivers/sound/gus_wave.c | pcm_current_dev = dev; |
dev | 2573 | drivers/sound/gus_wave.c | gus_transfer_output_block (dev, buf, total_count, intrflag, 0); |
dev | 2577 | drivers/sound/gus_wave.c | gus_sampling_start_input (int dev, unsigned long buf, int count, |
dev | 2585 | drivers/sound/gus_wave.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 2591 | drivers/sound/gus_wave.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 2609 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_input (int dev, int bsize, int bcount) |
dev | 2629 | drivers/sound/gus_wave.c | gus_sampling_prepare_for_output (int dev, int bsize, int bcount) |
dev | 2660 | drivers/sound/gus_wave.c | gus_has_output_drained (int dev) |
dev | 2666 | drivers/sound/gus_wave.c | gus_copy_from_user (int dev, char *localbuf, int localoffs, |
dev | 2734 | drivers/sound/gus_wave.c | guswave_bender (int dev, int voice, int value) |
dev | 2751 | drivers/sound/gus_wave.c | guswave_patchmgr (int dev, struct patmgr_info *rec) |
dev | 3010 | drivers/sound/gus_wave.c | gus_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg) |
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 | 78 | drivers/sound/opl3.c | static int opl3_kill_note (int dev, int voice, int velocity); |
dev | 118 | drivers/sound/opl3.c | opl3_ioctl (int dev, |
dev | 136 | drivers/sound/opl3.c | pmgr_inform (dev, PM_E_PATCH_LOADED, ins.channel, 0, 0, 0); |
dev | 236 | drivers/sound/opl3.c | opl3_kill_note (int dev, int voice, int velocity) |
dev | 282 | drivers/sound/opl3.c | opl3_set_instr (int dev, int voice, int instr_no) |
dev | 428 | drivers/sound/opl3.c | opl3_start_note (int dev, int voice, int note, int volume) |
dev | 652 | drivers/sound/opl3.c | opl3_reset (int dev) |
dev | 673 | drivers/sound/opl3.c | opl3_kill_note (dev, i, 64); |
dev | 691 | drivers/sound/opl3.c | opl3_open (int dev, int mode) |
dev | 706 | drivers/sound/opl3.c | opl3_close (int dev) |
dev | 713 | drivers/sound/opl3.c | opl3_reset (dev); |
dev | 717 | drivers/sound/opl3.c | opl3_hw_control (int dev, unsigned char *event) |
dev | 722 | drivers/sound/opl3.c | opl3_load_patch (int dev, int format, snd_rw_buf * addr, |
dev | 746 | drivers/sound/opl3.c | opl3_panning (int dev, int voice, int pressure) |
dev | 757 | drivers/sound/opl3.c | opl3_aftertouch (int dev, int voice, int pressure) |
dev | 823 | drivers/sound/opl3.c | opl3_controller (int dev, int voice, int ctrl_num, int value) |
dev | 867 | 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 | 191 | drivers/sound/pas2_pcm.c | pas_pcm_reset (int dev) |
dev | 199 | drivers/sound/pas2_pcm.c | pas_pcm_open (int dev, int mode) |
dev | 208 | drivers/sound/pas2_pcm.c | if (!DMAbuf_open_dma (dev)) |
dev | 220 | drivers/sound/pas2_pcm.c | pas_pcm_close (int dev) |
dev | 228 | drivers/sound/pas2_pcm.c | pas_pcm_reset (dev); |
dev | 229 | drivers/sound/pas2_pcm.c | DMAbuf_close_dma (dev); |
dev | 237 | drivers/sound/pas2_pcm.c | pas_pcm_output_block (int dev, unsigned long buf, int count, |
dev | 245 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 248 | drivers/sound/pas2_pcm.c | if (sound_dma_automode[dev] && |
dev | 259 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 261 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 283 | drivers/sound/pas2_pcm.c | pas_pcm_start_input (int dev, unsigned long buf, int count, |
dev | 292 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 303 | drivers/sound/pas2_pcm.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 305 | drivers/sound/pas2_pcm.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 327 | drivers/sound/pas2_pcm.c | pas_pcm_prepare_for_input (int dev, int bsize, int bcount) |
dev | 332 | 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_procs[dev], 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_procs[dev], 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 | 59 | drivers/sound/sb16_dsp.c | static int sb16_dsp_open (int dev, int mode); |
dev | 60 | drivers/sound/sb16_dsp.c | static void sb16_dsp_close (int dev); |
dev | 61 | drivers/sound/sb16_dsp.c | static void sb16_dsp_output_block (int dev, unsigned long buf, int count,int intrflag, int dma_restart); |
dev | 62 | drivers/sound/sb16_dsp.c | static void sb16_dsp_start_input (int dev, unsigned long buf, int count,int intrflag, int dma_restart); |
dev | 63 | drivers/sound/sb16_dsp.c | static int sb16_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg,int local); |
dev | 64 | drivers/sound/sb16_dsp.c | static int sb16_dsp_prepare_for_input (int dev, int bsize, int bcount); |
dev | 65 | drivers/sound/sb16_dsp.c | static int sb16_dsp_prepare_for_output (int dev, int bsize, int bcount); |
dev | 66 | drivers/sound/sb16_dsp.c | static void sb16_dsp_reset (int dev); |
dev | 67 | drivers/sound/sb16_dsp.c | static void sb16_dsp_halt (int dev); |
dev | 202 | drivers/sound/sb16_dsp.c | sb16_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg,int local) |
dev | 251 | drivers/sound/sb16_dsp.c | sb16_dsp_open (int dev, int mode) |
dev | 294 | drivers/sound/sb16_dsp.c | sb16_dsp_close (int dev) |
dev | 313 | drivers/sound/sb16_dsp.c | sb16_dsp_output_block (int dev, unsigned long buf, int count,int intrflag, int dma_restart) |
dev | 325 | drivers/sound/sb16_dsp.c | int pos,chan=sound_dsp_dmachan[dev]; |
dev | 335 | drivers/sound/sb16_dsp.c | if (sound_dma_automode[dev] && |
dev | 346 | drivers/sound/sb16_dsp.c | sb16_dsp_halt(dev); |
dev | 347 | drivers/sound/sb16_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 367 | drivers/sound/sb16_dsp.c | sb16_dsp_start_input (int dev, unsigned long buf, int count,int intrflag, int dma_restart) |
dev | 379 | drivers/sound/sb16_dsp.c | int pos,chan=sound_dsp_dmachan[dev]; |
dev | 389 | drivers/sound/sb16_dsp.c | if (sound_dma_automode[dev] && |
dev | 400 | drivers/sound/sb16_dsp.c | sb16_dsp_halt(dev); |
dev | 401 | drivers/sound/sb16_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 422 | drivers/sound/sb16_dsp.c | sb16_dsp_prepare_for_input (int dev, int bsize, int bcount) |
dev | 431 | drivers/sound/sb16_dsp.c | sb16_dsp_prepare_for_output (int dev, int bsize, int bcount) |
dev | 447 | drivers/sound/sb16_dsp.c | sb16_dsp_reset (int dev) |
dev | 460 | drivers/sound/sb16_dsp.c | sb16_dsp_halt (int dev) |
dev | 59 | drivers/sound/sb16_midi.c | static void (*midi_input_intr) (int dev, unsigned char data); |
dev | 116 | drivers/sound/sb16_midi.c | sb16midi_open (int dev, int mode, |
dev | 117 | drivers/sound/sb16_midi.c | void (*input) (int dev, unsigned char data), |
dev | 118 | drivers/sound/sb16_midi.c | void (*output) (int dev) |
dev | 136 | drivers/sound/sb16_midi.c | sb16midi_close (int dev) |
dev | 142 | drivers/sound/sb16_midi.c | sb16midi_out (int dev, unsigned char midi_byte) |
dev | 176 | drivers/sound/sb16_midi.c | sb16midi_command (int dev, unsigned char midi_byte) |
dev | 182 | drivers/sound/sb16_midi.c | sb16midi_start_read (int dev) |
dev | 188 | drivers/sound/sb16_midi.c | sb16midi_end_read (int dev) |
dev | 194 | drivers/sound/sb16_midi.c | sb16midi_ioctl (int dev, unsigned cmd, unsigned arg) |
dev | 200 | drivers/sound/sb16_midi.c | sb16midi_kick (int dev) |
dev | 205 | drivers/sound/sb16_midi.c | sb16midi_buffer_status (int dev) |
dev | 319 | drivers/sound/sb_dsp.c | sb_dsp_output_block (int dev, unsigned long buf, int count, |
dev | 328 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE); |
dev | 330 | drivers/sound/sb_dsp.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 363 | drivers/sound/sb_dsp.c | sb_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, |
dev | 374 | drivers/sound/sb_dsp.c | DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ); |
dev | 376 | drivers/sound/sb_dsp.c | if (sound_dsp_dmachan[dev] > 3) |
dev | 416 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_input (int dev, int bsize, int bcount) |
dev | 435 | drivers/sound/sb_dsp.c | sb_dsp_prepare_for_output (int dev, int bsize, int bcount) |
dev | 452 | drivers/sound/sb_dsp.c | sb_dsp_halt_xfer (int dev) |
dev | 491 | drivers/sound/sb_dsp.c | sb_dsp_open (int dev, int mode) |
dev | 521 | drivers/sound/sb_dsp.c | if (!DMAbuf_open_dma (dev)) |
dev | 536 | drivers/sound/sb_dsp.c | sb_dsp_close (int dev) |
dev | 538 | drivers/sound/sb_dsp.c | DMAbuf_close_dma (dev); |
dev | 547 | drivers/sound/sb_dsp.c | sb_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg, int local) |
dev | 601 | 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 | 256 | drivers/sound/sb_mixer.c | sb_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg) |
dev | 77 | drivers/sound/sequencer.c | sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 81 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 83 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 84 | drivers/sound/sequencer.c | return pmgr_read (dev - 1, file, buf, count); |
dev | 108 | drivers/sound/sequencer.c | sequencer_midi_output (int dev) |
dev | 134 | drivers/sound/sequencer.c | sequencer_midi_input (int dev, unsigned char data) |
dev | 149 | drivers/sound/sequencer.c | event[2] = dev; |
dev | 156 | drivers/sound/sequencer.c | sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 163 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 165 | drivers/sound/sequencer.c | DEB (printk ("sequencer_write(dev=%d, count=%d)\n", dev, count)); |
dev | 170 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 171 | drivers/sound/sequencer.c | return pmgr_write (dev - 1, file, buf, count); |
dev | 184 | drivers/sound/sequencer.c | dev = *(unsigned short *) &event[2]; |
dev | 185 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 188 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 191 | drivers/sound/sequencer.c | err = synth_devs[dev]->load_patch (dev, *(short *) &event[0], buf, p + 4, c, 0); |
dev | 222 | drivers/sound/sequencer.c | int dev = event[2]; |
dev | 224 | drivers/sound/sequencer.c | if (dev >= num_midis) |
dev | 226 | drivers/sound/sequencer.c | printk ("Sequencer Error: Nonexistent MIDI device %d\n", dev); |
dev | 232 | drivers/sound/sequencer.c | if ((err = midi_devs[dev]->open (dev, mode, |
dev | 236 | drivers/sound/sequencer.c | printk ("Sequencer Error: Unable to open Midi #%d\n", dev); |
dev | 240 | drivers/sound/sequencer.c | midi_opened[dev] = 1; |
dev | 293 | drivers/sound/sequencer.c | int dev = q[2]; |
dev | 295 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 298 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 304 | drivers/sound/sequencer.c | synth_devs[dev]->kill_note (dev, q[3], q[5]); |
dev | 311 | drivers/sound/sequencer.c | synth_devs[dev]->start_note (dev, q[3], q[4], q[5]); |
dev | 315 | drivers/sound/sequencer.c | synth_devs[dev]->set_instr (dev, q[3], q[4]); |
dev | 319 | drivers/sound/sequencer.c | synth_devs[dev]->aftertouch (dev, q[3], q[4]); |
dev | 323 | drivers/sound/sequencer.c | synth_devs[dev]->panning (dev, q[3], (char) q[4]); |
dev | 327 | drivers/sound/sequencer.c | synth_devs[dev]->controller (dev, q[3], q[4], *(short *) &q[5]); |
dev | 409 | drivers/sound/sequencer.c | int dev; |
dev | 411 | drivers/sound/sequencer.c | dev = q[2]; |
dev | 413 | drivers/sound/sequencer.c | if (!midi_devs[dev]->putc (dev, q[1])) |
dev | 426 | drivers/sound/sequencer.c | midi_written[dev] = 1; |
dev | 465 | drivers/sound/sequencer.c | sequencer_open (int dev, struct fileinfo *file) |
dev | 469 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 472 | drivers/sound/sequencer.c | DEB (printk ("sequencer_open(dev=%d)\n", dev)); |
dev | 480 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 484 | drivers/sound/sequencer.c | dev--; |
dev | 485 | drivers/sound/sequencer.c | if (pmgr_present[dev]) |
dev | 487 | drivers/sound/sequencer.c | if ((err = pmgr_open (dev)) < 0) |
dev | 490 | drivers/sound/sequencer.c | pmgr_present[dev] = 1; |
dev | 580 | drivers/sound/sequencer.c | sequencer_release (int dev, struct fileinfo *file) |
dev | 585 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 587 | drivers/sound/sequencer.c | DEB (printk ("sequencer_release(dev=%d)\n", dev)); |
dev | 589 | drivers/sound/sequencer.c | if (dev) /* Patch manager device */ |
dev | 591 | drivers/sound/sequencer.c | dev--; |
dev | 592 | drivers/sound/sequencer.c | pmgr_release (dev); |
dev | 593 | drivers/sound/sequencer.c | pmgr_present[dev] = 0; |
dev | 644 | drivers/sound/sequencer.c | midi_outc (int dev, unsigned char data) |
dev | 658 | drivers/sound/sequencer.c | while (n && !midi_devs[dev]->putc (dev, data)) |
dev | 709 | drivers/sound/sequencer.c | sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 715 | drivers/sound/sequencer.c | orig_dev = dev = dev >> 4; |
dev | 721 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 732 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 740 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 764 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 780 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 788 | drivers/sound/sequencer.c | dev = IOCTL_IN (arg); |
dev | 789 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 792 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 795 | drivers/sound/sequencer.c | if (!orig_dev && pmgr_present[dev]) |
dev | 796 | drivers/sound/sequencer.c | pmgr_inform (dev, PM_E_PATCH_RESET, 0, 0, 0, 0); |
dev | 798 | drivers/sound/sequencer.c | return synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 811 | drivers/sound/sequencer.c | int dev = IOCTL_IN (arg); |
dev | 813 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 816 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 819 | drivers/sound/sequencer.c | return IOCTL_OUT (arg, synth_devs[dev]->ioctl (dev, cmd, arg)); |
dev | 825 | drivers/sound/sequencer.c | int dev = IOCTL_IN (arg); |
dev | 827 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 830 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev))) |
dev | 833 | drivers/sound/sequencer.c | synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 841 | drivers/sound/sequencer.c | int dev; |
dev | 844 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 846 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 849 | drivers/sound/sequencer.c | if (!(synth_open_mask & (1 << dev)) && !orig_dev) |
dev | 852 | drivers/sound/sequencer.c | return synth_devs[dev]->ioctl (dev, cmd, arg); |
dev | 859 | drivers/sound/sequencer.c | int dev; |
dev | 862 | drivers/sound/sequencer.c | dev = inf.device; |
dev | 864 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_midis) |
dev | 867 | drivers/sound/sequencer.c | IOCTL_TO_USER ((char *) arg, 0, (char *) &(midi_devs[dev]->info), sizeof (inf)); |
dev | 875 | drivers/sound/sequencer.c | int dev, err; |
dev | 880 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 882 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 888 | drivers/sound/sequencer.c | if (!synth_devs[dev]->pmgr_interface) |
dev | 894 | drivers/sound/sequencer.c | if ((err = synth_devs[dev]->pmgr_interface (dev, inf)) == -1) |
dev | 909 | drivers/sound/sequencer.c | int dev, err; |
dev | 914 | drivers/sound/sequencer.c | dev = inf->device; |
dev | 916 | drivers/sound/sequencer.c | if (dev < 0 || dev >= num_synths) |
dev | 922 | drivers/sound/sequencer.c | if (!pmgr_present[dev]) |
dev | 928 | drivers/sound/sequencer.c | if ((err = pmgr_access (dev, inf)) < 0) |
dev | 944 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 957 | drivers/sound/sequencer.c | if (dev) /* Patch manager */ |
dev | 976 | drivers/sound/sequencer.c | sequencer_select (int dev, struct fileinfo *file, int sel_type, select_table * wait) |
dev | 978 | drivers/sound/sequencer.c | dev = dev >> 4; |
dev | 1104 | drivers/sound/sequencer.c | sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 1110 | drivers/sound/sequencer.c | sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) |
dev | 1116 | drivers/sound/sequencer.c | sequencer_open (int dev, struct fileinfo *file) |
dev | 1122 | drivers/sound/sequencer.c | sequencer_release (int dev, struct fileinfo *file) |
dev | 1126 | drivers/sound/sequencer.c | sequencer_ioctl (int dev, struct fileinfo *file, |
dev | 1133 | drivers/sound/sequencer.c | sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig) |
dev | 1145 | 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 | 100 | drivers/sound/sound_calls.h | void sound_dma_malloc(int dev); |
dev | 101 | drivers/sound/sound_calls.h | void sound_dma_free(int dev); |
dev | 104 | drivers/sound/sound_calls.h | int sound_read_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 105 | drivers/sound/sound_calls.h | int sound_write_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); |
dev | 106 | drivers/sound/sound_calls.h | int sound_open_sw (int dev, struct fileinfo *file); |
dev | 107 | drivers/sound/sound_calls.h | void sound_release_sw (int dev, struct fileinfo *file); |
dev | 108 | drivers/sound/sound_calls.h | int sound_ioctl_sw (int dev, struct fileinfo *file, |
dev | 197 | drivers/sound/sound_calls.h | int pmgr_open(int dev); |
dev | 198 | drivers/sound/sound_calls.h | void pmgr_release(int dev); |
dev | 199 | drivers/sound/sound_calls.h | int pmgr_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count); |
dev | 200 | drivers/sound/sound_calls.h | int pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count); |
dev | 201 | drivers/sound/sound_calls.h | int pmgr_access(int dev, struct patmgr_info *rec); |
dev | 202 | drivers/sound/sound_calls.h | int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2, |
dev | 216 | drivers/sound/sound_switch.c | sound_read_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count) |
dev | 218 | drivers/sound/sound_switch.c | DEB (printk ("sound_read_sw(dev=%d, count=%d)\n", dev, count)); |
dev | 220 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 229 | drivers/sound/sound_switch.c | return audio_read (dev, file, buf, count); |
dev | 233 | drivers/sound/sound_switch.c | return sequencer_read (dev, file, buf, count); |
dev | 238 | drivers/sound/sound_switch.c | return MIDIbuf_read (dev, file, buf, count); |
dev | 242 | drivers/sound/sound_switch.c | printk ("Sound: Undefined minor device %d\n", dev); |
dev | 249 | drivers/sound/sound_switch.c | sound_write_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count) |
dev | 252 | drivers/sound/sound_switch.c | DEB (printk ("sound_write_sw(dev=%d, count=%d)\n", dev, count)); |
dev | 254 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 258 | drivers/sound/sound_switch.c | return sequencer_write (dev, file, buf, count); |
dev | 264 | drivers/sound/sound_switch.c | return audio_write (dev, file, buf, count); |
dev | 275 | drivers/sound/sound_switch.c | sound_open_sw (int dev, struct fileinfo *file) |
dev | 278 | drivers/sound/sound_switch.c | DEB (printk ("sound_open_sw(dev=%d) : usecount=%d\n", dev, sbc_devices[dev].usecount)); |
dev | 280 | drivers/sound/sound_switch.c | if ((dev >= SND_NDEVS) || (dev < 0)) |
dev | 282 | drivers/sound/sound_switch.c | printk ("Invalid minor device %d\n", dev); |
dev | 286 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 303 | drivers/sound/sound_switch.c | if ((retval = sequencer_open (dev, file)) < 0) |
dev | 309 | drivers/sound/sound_switch.c | if ((retval = MIDIbuf_open (dev, file)) < 0) |
dev | 317 | drivers/sound/sound_switch.c | if ((retval = audio_open (dev, file)) < 0) |
dev | 322 | drivers/sound/sound_switch.c | printk ("Invalid minor device %d\n", dev); |
dev | 326 | drivers/sound/sound_switch.c | sbc_devices[dev].usecount++; |
dev | 333 | drivers/sound/sound_switch.c | sound_release_sw (int dev, struct fileinfo *file) |
dev | 336 | drivers/sound/sound_switch.c | DEB (printk ("sound_release_sw(dev=%d)\n", dev)); |
dev | 338 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 351 | drivers/sound/sound_switch.c | sequencer_release (dev, file); |
dev | 356 | drivers/sound/sound_switch.c | MIDIbuf_release (dev, file); |
dev | 363 | drivers/sound/sound_switch.c | audio_release (dev, file); |
dev | 367 | drivers/sound/sound_switch.c | printk ("Sound error: Releasing unknown device 0x%02x\n", dev); |
dev | 370 | drivers/sound/sound_switch.c | sbc_devices[dev].usecount--; |
dev | 375 | drivers/sound/sound_switch.c | sound_ioctl_sw (int dev, struct fileinfo *file, |
dev | 378 | drivers/sound/sound_switch.c | DEB (printk ("sound_ioctl_sw(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg)); |
dev | 380 | drivers/sound/sound_switch.c | switch (dev & 0x0f) |
dev | 388 | drivers/sound/sound_switch.c | if ((dev >> 4) >= num_mixers) |
dev | 391 | drivers/sound/sound_switch.c | return mixer_devs[dev >> 4]->ioctl (dev >> 4, cmd, arg); |
dev | 395 | drivers/sound/sound_switch.c | return sequencer_ioctl (dev, file, cmd, arg); |
dev | 401 | drivers/sound/sound_switch.c | return audio_ioctl (dev, file, cmd, arg); |
dev | 406 | drivers/sound/sound_switch.c | return MIDIbuf_ioctl (dev, file, cmd, arg); |
dev | 62 | drivers/sound/soundcard.c | int dev; |
dev | 64 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 65 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 67 | drivers/sound/soundcard.c | return sound_read_sw (dev, &files[dev], buf, count); |
dev | 73 | drivers/sound/soundcard.c | int dev; |
dev | 75 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 76 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 78 | drivers/sound/soundcard.c | return sound_write_sw (dev, &files[dev], buf, count); |
dev | 90 | drivers/sound/soundcard.c | int dev; |
dev | 92 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 93 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 95 | drivers/sound/soundcard.c | if (!soundcard_configured && dev != SND_DEV_CTL && dev != SND_DEV_STATUS) |
dev | 101 | drivers/sound/soundcard.c | files[dev].mode = 0; |
dev | 104 | drivers/sound/soundcard.c | files[dev].mode = OPEN_READWRITE; |
dev | 106 | drivers/sound/soundcard.c | files[dev].mode = OPEN_READ; |
dev | 108 | drivers/sound/soundcard.c | files[dev].mode = OPEN_WRITE; |
dev | 110 | drivers/sound/soundcard.c | return sound_open_sw (dev, &files[dev]); |
dev | 116 | drivers/sound/soundcard.c | int dev; |
dev | 118 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 119 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 121 | drivers/sound/soundcard.c | sound_release_sw (dev, &files[dev]); |
dev | 128 | drivers/sound/soundcard.c | int dev; |
dev | 130 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 131 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 133 | drivers/sound/soundcard.c | return sound_ioctl_sw (dev, &files[dev], cmd, arg); |
dev | 139 | drivers/sound/soundcard.c | int dev; |
dev | 141 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
dev | 142 | drivers/sound/soundcard.c | dev = MINOR (dev); |
dev | 144 | drivers/sound/soundcard.c | DEB (printk ("sound_select(dev=%d, type=0x%x)\n", dev, sel_type)); |
dev | 146 | drivers/sound/soundcard.c | switch (dev & 0x0f) |
dev | 149 | drivers/sound/soundcard.c | return sequencer_select (dev, &files[dev], sel_type, wait); |
dev | 281 | drivers/sound/soundcard.c | int i, dev; |
dev | 291 | drivers/sound/soundcard.c | for (dev = 0; dev < num_dspdevs; dev++) /* Enumerate devices */ |
dev | 292 | drivers/sound/soundcard.c | if (sound_buffcounts[dev] > 0 && sound_dsp_dmachan[dev] > 0) |
dev | 294 | drivers/sound/soundcard.c | if (sound_dma_automode[dev]) |
dev | 295 | drivers/sound/soundcard.c | sound_buffcounts[dev] = 1; |
dev | 297 | drivers/sound/soundcard.c | if (sound_dsp_dmachan[dev] > 3 && sound_buffsizes[dev] > 65536) |
dev | 304 | drivers/sound/soundcard.c | if (sound_buffsizes[dev] > dma_pagesize) |
dev | 305 | drivers/sound/soundcard.c | sound_buffsizes[dev] = dma_pagesize; |
dev | 306 | drivers/sound/soundcard.c | sound_buffsizes[dev] &= 0xfffff000; /* Truncate to n*4k */ |
dev | 307 | drivers/sound/soundcard.c | if (sound_buffsizes[dev] < 4096) |
dev | 308 | drivers/sound/soundcard.c | sound_buffsizes[dev] = 4096; |
dev | 312 | drivers/sound/soundcard.c | for (snd_raw_count[dev] = 0; snd_raw_count[dev] < sound_buffcounts[dev]; snd_raw_count[dev]++) |
dev | 314 | drivers/sound/soundcard.c | start_addr = mem_ptr - sound_buffsizes[dev]; |
dev | 315 | drivers/sound/soundcard.c | if (!valid_dma_page (start_addr, sound_buffsizes[dev], dma_pagesize)) |
dev | 319 | drivers/sound/soundcard.c | end_addr = start_addr + sound_buffsizes[dev] - 1; |
dev | 321 | drivers/sound/soundcard.c | snd_raw_buf[dev][snd_raw_count[dev]] = (char *) start_addr; |
dev | 322 | 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 | 505 | fs/buffer.c | if (find_buffer(dev,block,size)) |
dev | 514 | fs/buffer.c | bh->b_dev=dev; |
dev | 538 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
dev | 542 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
dev | 544 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 562 | fs/buffer.c | struct buffer_head * breada(dev_t dev,int first, ...) |
dev | 571 | fs/buffer.c | if (blksize_size[MAJOR(dev)] && blksize_size[MAJOR(dev)][MINOR(dev)]) |
dev | 572 | fs/buffer.c | blocksize = blksize_size[MAJOR(dev)][MINOR(dev)]; |
dev | 574 | fs/buffer.c | if (!(bh = getblk(dev, first, blocksize))) { |
dev | 576 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 582 | fs/buffer.c | tmp = getblk(dev, first, blocksize); |
dev | 700 | fs/buffer.c | dev_t dev, int *b, int size) |
dev | 720 | fs/buffer.c | first = get_hash_table(dev, block, size); |
dev | 741 | fs/buffer.c | dev_t dev, int b[], int size) |
dev | 756 | fs/buffer.c | tmp = get_hash_table(dev, block, size); |
dev | 770 | fs/buffer.c | bh->b_dev = dev; |
dev | 807 | fs/buffer.c | dev_t dev, int *b, int size) |
dev | 815 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
dev | 817 | fs/buffer.c | return check_aligned(bh, address, dev, b, size); |
dev | 818 | fs/buffer.c | return try_to_load_aligned(address, dev, b, size); |
dev | 833 | fs/buffer.c | unsigned long bread_page(unsigned long address, dev_t dev, int b[], int size, int prot) |
dev | 840 | fs/buffer.c | where = try_to_share_buffers(address,dev,b,size); |
dev | 848 | 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 | 26 | fs/ext2/dcache.c | unsigned short dev; |
dev | 55 | fs/ext2/dcache.c | #define hash(dev,dir) ((dev ^ dir) % HASH_QUEUES) |
dev | 84 | fs/ext2/dcache.c | static struct dir_cache_entry * find_name (int queue, unsigned short dev, |
dev | 90 | fs/ext2/dcache.c | for (p = queue_head[queue]; p != NULL && (p->dev != dev || |
dev | 109 | fs/ext2/dcache.c | p->dev, p->dir, p->name); |
dev | 179 | fs/ext2/dcache.c | void ext2_dcache_invalidate (unsigned short dev) |
dev | 188 | fs/ext2/dcache.c | if (p->dev == dev) { |
dev | 190 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 203 | fs/ext2/dcache.c | unsigned long ext2_dcache_lookup (unsigned short dev, unsigned long dir, |
dev | 217 | fs/ext2/dcache.c | printk ("dcache_lookup (%04x, %lu, %s, %d)\n", dev, dir, our_name, len); |
dev | 219 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 220 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, our_name, len))) { |
dev | 253 | fs/ext2/dcache.c | void ext2_dcache_add (unsigned short dev, unsigned long dir, const char * name, |
dev | 263 | fs/ext2/dcache.c | dev, dir, name, len, ino); |
dev | 267 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 268 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 291 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 294 | fs/ext2/dcache.c | p->dev = dev; |
dev | 313 | fs/ext2/dcache.c | void ext2_dcache_remove (unsigned short dev, unsigned long dir, |
dev | 322 | fs/ext2/dcache.c | printk ("dcache_remove (%04x, %lu, %s, %d)\n", dev, dir, name, len); |
dev | 326 | fs/ext2/dcache.c | queue = hash (dev, dir); |
dev | 327 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 362 | fs/ext2/super.c | int dev = sb->s_dev; |
dev | 377 | fs/ext2/super.c | set_blocksize (dev, BLOCK_SIZE); |
dev | 378 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
dev | 401 | fs/ext2/super.c | MAJOR(dev), MINOR(dev)); |
dev | 412 | fs/ext2/super.c | set_blocksize (dev, sb->s_blocksize); |
dev | 415 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
dev | 488 | fs/ext2/super.c | MAJOR(dev), MINOR(dev)); |
dev | 497 | fs/ext2/super.c | dev); |
dev | 526 | fs/ext2/super.c | sb->u.ext2_sb.s_group_desc[i] = bread (dev, logic_sb_block + i + 1, |
dev | 559 | fs/ext2/super.c | sb->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 | 24 | fs/inode.c | static inline int const hashfn(dev_t dev, unsigned int i) |
dev | 26 | fs/inode.c | return (dev ^ i) % NR_IHASH; |
dev | 29 | fs/inode.c | static inline struct inode_hash_entry * const hash(dev_t dev, int i) |
dev | 31 | fs/inode.c | return hash_table + hashfn(dev, i); |
dev | 162 | fs/inode.c | int fs_may_mount(dev_t dev) |
dev | 171 | fs/inode.c | if (inode->i_dev != dev) |
dev | 180 | fs/inode.c | int fs_may_umount(dev_t dev, struct inode * mount_root) |
dev | 187 | fs/inode.c | if (inode->i_dev != dev || !inode->i_count) |
dev | 196 | fs/inode.c | int fs_may_remount_ro(dev_t dev) |
dev | 204 | fs/inode.c | file->f_inode->i_dev != dev) |
dev | 269 | fs/inode.c | void invalidate_inodes(dev_t dev) |
dev | 278 | fs/inode.c | if (inode->i_dev != dev) |
dev | 281 | fs/inode.c | printk("VFS: inode busy on removed device %d/%d\n", MAJOR(dev), MINOR(dev)); |
dev | 288 | fs/inode.c | void sync_inodes(dev_t dev) |
dev | 295 | fs/inode.c | if (dev && inode->i_dev != dev) |
dev | 212 | fs/isofs/dir.c | cache.dev = inode->i_dev; |
dev | 130 | fs/isofs/inode.c | int dev=s->s_dev; |
dev | 154 | fs/isofs/inode.c | set_blocksize(dev, blocksize); |
dev | 161 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), blocksize))) { |
dev | 164 | fs/isofs/inode.c | dev, iso_blknum); |
dev | 257 | fs/isofs/inode.c | s->s_dev = dev; |
dev | 675 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
dev | 677 | fs/isofs/inode.c | return bread(dev, block, size); |
dev | 229 | fs/isofs/namei.c | if (dir->i_dev == cache.dev && |
dev | 120 | fs/minix/inode.c | int i,dev=s->s_dev,block; |
dev | 125 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
dev | 156 | fs/minix/inode.c | printk("VFS: Can't find a minix filesystem on dev 0x%04x.\n", dev); |
dev | 165 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 170 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 189 | fs/minix/inode.c | s->s_dev = dev; |
dev | 384 | fs/namei.c | int do_mknod(const char * filename, int mode, dev_t dev) |
dev | 411 | fs/namei.c | error = dir->i_op->mknod(dir,basename,namelen,mode,dev); |
dev | 416 | fs/namei.c | asmlinkage int sys_mknod(const char * filename, int mode, dev_t dev) |
dev | 434 | 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 | 394 | fs/proc/array.c | dev_t dev; |
dev | 425 | fs/proc/array.c | dev = map->vm_inode->i_dev; |
dev | 428 | fs/proc/array.c | dev = 0; |
dev | 434 | fs/proc/array.c | MAJOR(dev),MINOR(dev), ino); |
dev | 111 | fs/proc/link.c | unsigned int dev,ino; |
dev | 119 | fs/proc/link.c | dev = inode->i_dev; |
dev | 122 | 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 | 213 | fs/super.c | fsync_dev(dev); |
dev | 220 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
dev | 224 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 225 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
dev | 234 | fs/super.c | put_super(dev); |
dev | 252 | fs/super.c | dev_t dev; |
dev | 266 | fs/super.c | dev = inode->i_rdev; |
dev | 276 | fs/super.c | dev = inode->i_sb->s_dev; |
dev | 279 | fs/super.c | dummy_inode.i_rdev = dev; |
dev | 282 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 286 | fs/super.c | if (!(retval = do_umount(dev)) && dev != ROOT_DEV) { |
dev | 287 | fs/super.c | fops = get_blkfops(MAJOR(dev)); |
dev | 290 | fs/super.c | if (MAJOR(dev) == UNNAMED_MAJOR) |
dev | 291 | fs/super.c | put_unnamed_dev(dev); |
dev | 297 | fs/super.c | fsync_dev(dev); |
dev | 310 | fs/super.c | static int do_mount(dev_t dev, const char * dir, char * type, int flags, void * data) |
dev | 327 | fs/super.c | if (!fs_may_mount(dev)) { |
dev | 331 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
dev | 433 | fs/super.c | dev_t dev; |
dev | 472 | fs/super.c | dev = inode->i_rdev; |
dev | 473 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 478 | fs/super.c | if (!(dev = get_unnamed_dev())) |
dev | 482 | fs/super.c | fops = get_blkfops(MAJOR(dev)); |
dev | 499 | fs/super.c | retval = do_mount(dev,dir_name,t,flags,(void *) page); |
dev | 270 | fs/sysv/inode.c | int dev = sb->s_dev; |
dev | 286 | fs/sysv/inode.c | if ((bh = bread(dev, 1, BLOCK_SIZE)) != NULL) { |
dev | 291 | fs/sysv/inode.c | if ((bh = bread(dev, 0, BLOCK_SIZE)) != NULL) { |
dev | 307 | fs/sysv/inode.c | if ((bh = bread(dev, offsets[i], BLOCK_SIZE)) != NULL) { |
dev | 319 | fs/sysv/inode.c | printk("VFS: unable to read Xenix/SystemV/Coherent superblock on device %d/%d\n",MAJOR(dev),MINOR(dev)); |
dev | 325 | fs/sysv/inode.c | printk("VFS: Found a %s FS (block size = %d) on device %d/%d\n",found,sb->sv_block_size,MAJOR(dev),MINOR(dev)); |
dev | 328 | fs/sysv/inode.c | sb->s_dev = dev; |
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 | 346 | include/linux/fs.h | extern int fs_may_mount(dev_t dev); |
dev | 347 | include/linux/fs.h | extern int fs_may_umount(dev_t dev, struct inode * mount_root); |
dev | 348 | include/linux/fs.h | extern int fs_may_remount_ro(dev_t dev); |
dev | 360 | include/linux/fs.h | extern void check_disk_change(dev_t dev); |
dev | 361 | include/linux/fs.h | extern void invalidate_inodes(dev_t dev); |
dev | 362 | include/linux/fs.h | extern void invalidate_buffers(dev_t dev); |
dev | 364 | include/linux/fs.h | extern void sync_inodes(dev_t dev); |
dev | 365 | include/linux/fs.h | extern void sync_dev(dev_t dev); |
dev | 366 | include/linux/fs.h | extern int fsync_dev(dev_t dev); |
dev | 367 | include/linux/fs.h | extern void sync_supers(dev_t dev); |
dev | 375 | include/linux/fs.h | extern int do_mknod(const char * filename, int mode, dev_t dev); |
dev | 384 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
dev | 385 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
dev | 387 | include/linux/fs.h | extern void ll_rw_page(int rw, int dev, int nr, char * buffer); |
dev | 388 | include/linux/fs.h | extern void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buffer); |
dev | 390 | include/linux/fs.h | extern void set_blocksize(dev_t dev, int size); |
dev | 391 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
dev | 392 | include/linux/fs.h | extern unsigned long bread_page(unsigned long addr,dev_t dev,int b[],int size,int prot); |
dev | 393 | include/linux/fs.h | extern struct buffer_head * breada(dev_t dev,int block,...); |
dev | 394 | 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 | 511 | include/linux/soundcard.h | #define MIXER_READ(dev) _IOR('M', dev, int) |
dev | 534 | include/linux/soundcard.h | #define MIXER_WRITE(dev) _IOWR('M', dev, int) |
dev | 638 | include/linux/soundcard.h | #define PM_LOAD_PATCH(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 639 | include/linux/soundcard.h | _pm_info.device=dev, _pm_info.data.data8[0]=pgm, \ |
dev | 642 | include/linux/soundcard.h | #define PM_LOAD_PATCHES(dev, bank, pgm) (SEQ_DUMPBUF(), _pm_info.command = _PM_LOAD_PATCH, \ |
dev | 643 | include/linux/soundcard.h | _pm_info.device=dev, memcpy(_pm_info.data.data8, pgm, 128), \ |
dev | 647 | include/linux/soundcard.h | #define SEQ_START_NOTE(dev, voice, note, vol) {_SEQ_NEEDBUF(8);\ |
dev | 650 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 658 | include/linux/soundcard.h | #define SEQ_STOP_NOTE(dev, voice, note, vol) {_SEQ_NEEDBUF(8);\ |
dev | 661 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 669 | include/linux/soundcard.h | #define SEQ_CHN_PRESSURE(dev, voice, pressure) {_SEQ_NEEDBUF(8);\ |
dev | 672 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 680 | include/linux/soundcard.h | #define SEQ_PANNING(dev, voice, pos) {_SEQ_NEEDBUF(8);\ |
dev | 683 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 691 | include/linux/soundcard.h | #define SEQ_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\ |
dev | 694 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 701 | include/linux/soundcard.h | #define SEQ_PITCHBEND(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) |
dev | 702 | include/linux/soundcard.h | #define SEQ_BENDER_RANGE(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) |
dev | 703 | include/linux/soundcard.h | #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_EXPRESSION, value) |
dev | 704 | include/linux/soundcard.h | #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_MAIN_VOLUME, value) |
dev | 712 | include/linux/soundcard.h | #define SEQ_SET_PATCH(dev, voice, patch) {_SEQ_NEEDBUF(8);\ |
dev | 715 | include/linux/soundcard.h | _seqbuf[_seqbufptr+2] = (dev);\ |
dev | 352 | include/linux/sysv_fs.h | sysv_bread (struct super_block *sb, int dev, unsigned int block, char* * data) |
dev | 356 | include/linux/sysv_fs.h | if (!(bh = bread (dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE))) |
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 | 243 | net/inet/arp.c | if (skb->arp || !skb->dev->rebuild_header(skb->data, skb->dev)) { |
dev | 245 | net/inet/arp.c | skb->dev->queue_xmit(skb, skb->dev, 0); |
dev | 279 | net/inet/arp.c | arp_response(struct arphdr *arp1, struct device *dev, int addrtype) |
dev | 304 | net/inet/arp.c | dev->hard_header_len, GFP_ATOMIC); |
dev | 312 | net/inet/arp.c | (2 * arp1->ar_pln) + dev->hard_header_len; |
dev | 314 | net/inet/arp.c | hlen = dev->hard_header(skb->data, dev, ETH_P_ARP, src, dst, skb->len); |
dev | 334 | net/inet/arp.c | memcpy(ptr2, dev->dev_addr, arp2->ar_hln); |
dev | 353 | net/inet/arp.c | dev->queue_xmit(skb, dev, 0); |
dev | 510 | net/inet/arp.c | arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 524 | net/inet/arp.c | if (arp->ar_hln != dev->addr_len || dev->type != NET16(arp->ar_hrd)) |
dev | 526 | net/inet/arp.c | DPRINTF((DBG_ARP,"ARP: Bad packet received on device \"%s\" !\n", dev->name)); |
dev | 532 | 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 | 535 | net/inet/arp.c | DPRINTF((DBG_ARP,"ARP: Non-IP request on device \"%s\" !\n", dev->name)); |
dev | 605 | net/inet/arp.c | ret = arp_response(arp, dev, addr_hint); |
dev | 613 | net/inet/arp.c | arp_send(unsigned long paddr, struct device *dev, unsigned long saddr) |
dev | 621 | net/inet/arp.c | DPRINTF((DBG_ARP, "dev=%s, ", dev->name)); |
dev | 625 | net/inet/arp.c | sizeof(struct arphdr) + (2 * dev->addr_len) + |
dev | 626 | net/inet/arp.c | dev->hard_header_len + |
dev | 637 | net/inet/arp.c | dev->hard_header_len + (2 * dev->addr_len) + 8; |
dev | 640 | net/inet/arp.c | skb->dev = dev; |
dev | 643 | net/inet/arp.c | tmp = dev->hard_header(skb->data, dev, ETH_P_ARP, 0, saddr, skb->len); |
dev | 649 | net/inet/arp.c | arp->ar_hrd = htons(dev->type); |
dev | 650 | net/inet/arp.c | if(dev->type!=3) /* AX.25 */ |
dev | 654 | net/inet/arp.c | arp->ar_hln = dev->addr_len; |
dev | 659 | net/inet/arp.c | memcpy(ptr, dev->dev_addr, arp->ar_hln); |
dev | 670 | net/inet/arp.c | dev->queue_xmit(skb, dev, 0); |
dev | 676 | net/inet/arp.c | arp_find(unsigned char *haddr, unsigned long paddr, struct device *dev, |
dev | 683 | net/inet/arp.c | DPRINTF((DBG_ARP, "dev=%s, saddr=%s)\n", dev->name, in_ntoa(saddr))); |
dev | 687 | net/inet/arp.c | memcpy(haddr, dev->dev_addr, dev->addr_len); |
dev | 690 | net/inet/arp.c | memcpy(haddr, dev->broadcast, dev->addr_len); |
dev | 704 | net/inet/arp.c | memcpy(haddr, apt->ha, dev->addr_len); |
dev | 720 | net/inet/arp.c | arp_send(paddr, dev, saddr); |
dev | 728 | net/inet/arp.c | arp_add(unsigned long addr, unsigned char *haddr, struct device *dev) |
dev | 734 | net/inet/arp.c | DPRINTF((DBG_ARP, "%d, %d)\n", dev->hard_header_len, dev->type)); |
dev | 747 | net/inet/arp.c | memcpy(apt->ha, haddr , dev->addr_len); |
dev | 750 | net/inet/arp.c | arp_create(addr, haddr, dev->addr_len, dev->type); |
dev | 756 | net/inet/arp.c | arp_add_broad(unsigned long addr, struct device *dev) |
dev | 760 | 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 | 198 | net/inet/dev.c | struct device *dev; |
dev | 212 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 213 | net/inet/dev.c | if (!(dev->flags & IFF_UP)) |
dev | 215 | net/inet/dev.c | if ((dev->pa_addr == 0)/* || (dev->flags&IFF_PROMISC)*/) |
dev | 218 | net/inet/dev.c | if (addr == dev->pa_addr) |
dev | 221 | net/inet/dev.c | if ((dev->flags & IFF_BROADCAST) && addr == dev->pa_brdaddr) |
dev | 224 | net/inet/dev.c | if (((addr ^ dev->pa_addr) & dev->pa_mask) == 0) { |
dev | 225 | net/inet/dev.c | if ((addr & ~dev->pa_mask) == 0) |
dev | 227 | net/inet/dev.c | if ((addr & ~dev->pa_mask) == ~dev->pa_mask) |
dev | 231 | net/inet/dev.c | if (((addr ^ dev->pa_addr) & mask) == 0) { |
dev | 253 | net/inet/dev.c | struct device *dev; |
dev | 255 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 256 | net/inet/dev.c | if (dev->flags & IFF_LOOPBACK) return(dev->pa_addr); |
dev | 343 | net/inet/dev.c | struct device *dev; |
dev | 345 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 346 | net/inet/dev.c | if (strcmp(dev->name, name) == 0) |
dev | 347 | net/inet/dev.c | return(dev); |
dev | 356 | net/inet/dev.c | struct device *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 | 361 | net/inet/dev.c | if (!(dev->flags & IFF_POINTOPOINT)) |
dev | 363 | net/inet/dev.c | if (addr != dev->pa_dstaddr) |
dev | 365 | net/inet/dev.c | return dev; |
dev | 367 | net/inet/dev.c | for (dev = dev_base; dev; dev = dev->next) { |
dev | 368 | net/inet/dev.c | if (!(dev->flags & IFF_UP)) |
dev | 370 | net/inet/dev.c | if (dev->flags & IFF_POINTOPOINT) |
dev | 372 | net/inet/dev.c | if (dev->pa_mask & (addr ^ dev->pa_addr)) |
dev | 374 | net/inet/dev.c | return dev; |
dev | 382 | net/inet/dev.c | dev_open(struct device *dev) |
dev | 386 | net/inet/dev.c | if (dev->open) |
dev | 387 | net/inet/dev.c | ret = dev->open(dev); |
dev | 389 | net/inet/dev.c | dev->flags |= (IFF_UP | IFF_RUNNING); |
dev | 397 | net/inet/dev.c | dev_close(struct device *dev) |
dev | 399 | net/inet/dev.c | if (dev->flags != 0) { |
dev | 401 | net/inet/dev.c | dev->flags = 0; |
dev | 402 | net/inet/dev.c | if (dev->stop) |
dev | 403 | net/inet/dev.c | dev->stop(dev); |
dev | 404 | net/inet/dev.c | rt_flush(dev); |
dev | 405 | net/inet/dev.c | dev->pa_addr = 0; |
dev | 406 | net/inet/dev.c | dev->pa_dstaddr = 0; |
dev | 407 | net/inet/dev.c | dev->pa_brdaddr = 0; |
dev | 408 | net/inet/dev.c | dev->pa_mask = 0; |
dev | 413 | net/inet/dev.c | while((skb=skb_dequeue(&dev->buffs[ct]))!=NULL) |
dev | 426 | net/inet/dev.c | dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) |
dev | 433 | net/inet/dev.c | skb, dev, pri)); |
dev | 435 | net/inet/dev.c | if (dev == NULL) { |
dev | 442 | net/inet/dev.c | skb->dev = dev; |
dev | 445 | net/inet/dev.c | dev->hard_start_xmit(NULL, dev); |
dev | 459 | net/inet/dev.c | if (dev->hard_start_xmit(skb, dev) == 0) { |
dev | 465 | net/inet/dev.c | pri, dev->buffs[pri])); |
dev | 471 | net/inet/dev.c | skb_queue_head(&dev->buffs[pri],skb); |
dev | 473 | net/inet/dev.c | skb_queue_tail(&dev->buffs[pri],skb); |
dev | 511 | net/inet/dev.c | dev_rint(unsigned char *buff, long len, int flags, struct device *dev) |
dev | 519 | net/inet/dev.c | if (dev == NULL || buff == NULL || len <= 0) return(1); |
dev | 533 | net/inet/dev.c | dev->name); |
dev | 545 | net/inet/dev.c | amount = min(len2, (unsigned long) dev->rmem_end - |
dev | 552 | net/inet/dev.c | if ((unsigned long) buff == dev->rmem_end) |
dev | 553 | net/inet/dev.c | buff = (unsigned char *) dev->rmem_start; |
dev | 557 | net/inet/dev.c | skb->dev = dev; |
dev | 570 | net/inet/dev.c | struct device *dev; |
dev | 572 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 573 | net/inet/dev.c | if (!dev->tbusy) { |
dev | 574 | net/inet/dev.c | dev_tint(dev); |
dev | 619 | net/inet/dev.c | skb->h.raw = skb->data + skb->dev->hard_header_len; |
dev | 620 | net/inet/dev.c | skb->len -= skb->dev->hard_header_len; |
dev | 631 | net/inet/dev.c | type = skb->dev->type_trans(skb, skb->dev); |
dev | 668 | net/inet/dev.c | ptype->func(skb2, skb->dev, ptype); |
dev | 698 | net/inet/dev.c | void dev_tint(struct device *dev) |
dev | 704 | net/inet/dev.c | while((skb=skb_dequeue(&dev->buffs[i]))!=NULL) |
dev | 709 | net/inet/dev.c | dev->queue_xmit(skb,dev,-i - 1); |
dev | 710 | net/inet/dev.c | if (dev->tbusy) |
dev | 723 | net/inet/dev.c | struct device *dev; |
dev | 737 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 738 | net/inet/dev.c | if(!(dev->flags & IFF_UP)) |
dev | 741 | net/inet/dev.c | strcpy(ifr.ifr_name, dev->name); |
dev | 742 | net/inet/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_family = dev->family; |
dev | 743 | net/inet/dev.c | (*(struct sockaddr_in *) &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 760 | net/inet/dev.c | char *sprintf_stats(char *buffer, struct device *dev) |
dev | 763 | net/inet/dev.c | struct enet_statistics *stats = (dev->get_stats ? dev->get_stats(dev): NULL); |
dev | 767 | net/inet/dev.c | dev->name, |
dev | 778 | net/inet/dev.c | pos += sprintf(pos, "%6s: No statistics available.\n", dev->name); |
dev | 788 | net/inet/dev.c | struct device *dev; |
dev | 794 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev = dev->next) { |
dev | 795 | net/inet/dev.c | pos = sprintf_stats(pos, dev); |
dev | 816 | net/inet/dev.c | struct device *dev; |
dev | 826 | net/inet/dev.c | if ((dev = dev_get(ifr.ifr_name)) == NULL) return(-EINVAL); |
dev | 830 | net/inet/dev.c | ifr.ifr_flags = dev->flags; |
dev | 836 | net/inet/dev.c | int old_flags = dev->flags; |
dev | 837 | net/inet/dev.c | dev->flags = ifr.ifr_flags & ( |
dev | 842 | net/inet/dev.c | if ( (old_flags & IFF_PROMISC) && ((dev->flags & IFF_PROMISC) == 0)) |
dev | 843 | net/inet/dev.c | dev->set_multicast_list(dev,0,NULL); |
dev | 844 | net/inet/dev.c | if ( (dev->flags & IFF_PROMISC) && ((old_flags & IFF_PROMISC) == 0)) |
dev | 845 | net/inet/dev.c | dev->set_multicast_list(dev,-1,NULL); |
dev | 846 | net/inet/dev.c | if ((old_flags & IFF_UP) && ((dev->flags & IFF_UP) == 0)) { |
dev | 847 | net/inet/dev.c | ret = dev_close(dev); |
dev | 850 | net/inet/dev.c | ret = (! (old_flags & IFF_UP) && (dev->flags & IFF_UP)) |
dev | 851 | net/inet/dev.c | ? dev_open(dev) : 0; |
dev | 853 | net/inet/dev.c | dev->flags&=~IFF_UP; /* Didnt open so down the if */ |
dev | 859 | net/inet/dev.c | &ifr.ifr_addr).sin_addr.s_addr = dev->pa_addr; |
dev | 861 | net/inet/dev.c | &ifr.ifr_addr).sin_family = dev->family; |
dev | 868 | net/inet/dev.c | dev->pa_addr = (*(struct sockaddr_in *) |
dev | 870 | net/inet/dev.c | dev->family = ifr.ifr_addr.sa_family; |
dev | 871 | net/inet/dev.c | dev->pa_mask = get_mask(dev->pa_addr); |
dev | 872 | net/inet/dev.c | dev->pa_brdaddr = dev->pa_addr | ~dev->pa_mask; |
dev | 877 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_addr.s_addr = dev->pa_brdaddr; |
dev | 879 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_family = dev->family; |
dev | 886 | net/inet/dev.c | dev->pa_brdaddr = (*(struct sockaddr_in *) |
dev | 892 | net/inet/dev.c | &ifr.ifr_dstaddr).sin_addr.s_addr = dev->pa_dstaddr; |
dev | 894 | net/inet/dev.c | &ifr.ifr_broadaddr).sin_family = dev->family; |
dev | 901 | net/inet/dev.c | dev->pa_dstaddr = (*(struct sockaddr_in *) |
dev | 907 | net/inet/dev.c | &ifr.ifr_netmask).sin_addr.s_addr = dev->pa_mask; |
dev | 909 | net/inet/dev.c | &ifr.ifr_netmask).sin_family = dev->family; |
dev | 921 | net/inet/dev.c | dev->pa_mask = mask; |
dev | 926 | net/inet/dev.c | ifr.ifr_metric = dev->metric; |
dev | 931 | net/inet/dev.c | dev->metric = ifr.ifr_metric; |
dev | 935 | net/inet/dev.c | ifr.ifr_mtu = dev->mtu; |
dev | 940 | net/inet/dev.c | dev->mtu = ifr.ifr_mtu; |
dev | 952 | net/inet/dev.c | memcpy(ifr.ifr_hwaddr,dev->dev_addr, MAX_ADDR_LEN); |
dev | 968 | net/inet/dev.c | struct ddi_device *dev; |
dev | 1006 | net/inet/dev.c | dev = ddi_map(iflink.id); |
dev | 1007 | net/inet/dev.c | if (dev == NULL) |
dev | 1012 | net/inet/dev.c | dev->name, iflink.stream); |
dev | 1025 | net/inet/dev.c | struct device *dev, *dev2; |
dev | 1033 | net/inet/dev.c | for (dev = dev_base; dev != NULL; dev=dev->next) { |
dev | 1034 | net/inet/dev.c | if (dev->init && dev->init(dev)) { |
dev | 1035 | net/inet/dev.c | if (dev2 == NULL) dev_base = dev->next; |
dev | 1036 | net/inet/dev.c | else dev2->next = dev->next; |
dev | 1038 | 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 | 98 | net/inet/eth.c | eth_header(unsigned char *buff, struct device *dev, unsigned short type, |
dev | 111 | net/inet/eth.c | if (dev->flags & IFF_LOOPBACK) { |
dev | 113 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 114 | net/inet/eth.c | memset(eth->h_dest, 0, dev->addr_len); |
dev | 115 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 121 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 122 | net/inet/eth.c | memcpy(eth->h_dest, dev->broadcast, dev->addr_len); |
dev | 123 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 128 | net/inet/eth.c | if (arp_find(eth->h_dest, daddr, dev, dev->pa_addr)) |
dev | 133 | net/inet/eth.c | return(-dev->hard_header_len); |
dev | 137 | net/inet/eth.c | memcpy(eth->h_source,dev->dev_addr,dev->addr_len); /* This was missing causing chaos if the |
dev | 140 | net/inet/eth.c | return(dev->hard_header_len); |
dev | 147 | net/inet/eth.c | eth_rebuild_header(void *buff, struct device *dev) |
dev | 159 | net/inet/eth.c | if (arp_find(eth->h_dest, dst, dev, dev->pa_addr /* src */)) return(1); |
dev | 160 | net/inet/eth.c | memcpy(eth->h_source, dev->dev_addr, dev->addr_len); |
dev | 167 | net/inet/eth.c | eth_add_arp(unsigned long addr, struct sk_buff *skb, struct device *dev) |
dev | 172 | net/inet/eth.c | arp_add(addr, eth->h_source, dev); |
dev | 178 | 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 | 81 | net/inet/icmp.c | icmp_send(struct sk_buff *skb_in, int type, int code, struct device *dev) |
dev | 90 | net/inet/icmp.c | skb_in, type, code, dev)); |
dev | 93 | net/inet/icmp.c | len = sizeof(struct sk_buff) + dev->hard_header_len + |
dev | 107 | net/inet/icmp.c | iph = (struct iphdr *) (skb_in->data + 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, skb_in->ip_hdr->tos,255); |
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 | 215 | net/inet/icmp.c | ip, 0, icmph->un.gateway, dev); |
dev | 220 | net/inet/icmp.c | ip, 0, icmph->un.gateway, dev); |
dev | 238 | net/inet/icmp.c | icmp_echo(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 246 | net/inet/icmp.c | size = sizeof(struct sk_buff) + dev->hard_header_len + 64 + len; |
dev | 259 | net/inet/icmp.c | offset = ip_build_header(skb2, daddr, saddr, &dev, |
dev | 281 | net/inet/icmp.c | ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); |
dev | 290 | net/inet/icmp.c | icmp_info(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 302 | net/inet/icmp.c | icmp_address(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, |
dev | 310 | net/inet/icmp.c | size = sizeof(struct sk_buff) + dev->hard_header_len + 64 + len; |
dev | 323 | net/inet/icmp.c | offset = ip_build_header(skb2, daddr, saddr, &dev, |
dev | 343 | net/inet/icmp.c | memcpy((char *) (icmphr + 1), (char *) &dev->pa_mask, sizeof(dev->pa_mask)); |
dev | 348 | net/inet/icmp.c | ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); |
dev | 357 | net/inet/icmp.c | icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt, |
dev | 394 | net/inet/icmp.c | icmp_redirect(icmph, skb1, dev); |
dev | 397 | net/inet/icmp.c | icmp_echo(icmph, skb1, dev, saddr, daddr, len, opt); |
dev | 404 | net/inet/icmp.c | icmp_info(icmph, skb1, dev, saddr, daddr, len, opt); |
dev | 411 | 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 | 183 | net/inet/ip.c | ip_send(struct sk_buff *skb, unsigned long daddr, int len, struct device *dev, |
dev | 192 | net/inet/ip.c | if (dev->hard_header) { |
dev | 193 | net/inet/ip.c | mac = dev->hard_header(ptr, dev, ETH_P_IP, daddr, saddr, len); |
dev | 199 | net/inet/ip.c | skb->dev = dev; |
dev | 212 | net/inet/ip.c | struct device **dev, int type, struct options *opt, int len, int tos, int ttl) |
dev | 227 | net/inet/ip.c | skb, saddr, daddr, *dev, type, opt, len)); |
dev | 232 | net/inet/ip.c | if (*dev == NULL) { |
dev | 237 | net/inet/ip.c | *dev = rt->rt_dev; |
dev | 253 | net/inet/ip.c | tmp = ip_send(skb, raddr, len, *dev, saddr); |
dev | 257 | net/inet/ip.c | skb->dev = *dev; |
dev | 648 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->dev); |
dev | 662 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
dev | 704 | net/inet/ip.c | qp->dev = dev; |
dev | 817 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
dev | 857 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
dev | 866 | net/inet/ip.c | ptr = skb->data + dev->hard_header_len + ihl; |
dev | 968 | net/inet/ip.c | void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag) |
dev | 979 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
dev | 986 | net/inet/ip.c | hlen += dev->hard_header_len; |
dev | 987 | net/inet/ip.c | mtu = (dev->mtu - hlen); |
dev | 992 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
dev | 1000 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
dev | 1008 | net/inet/ip.c | icmp_send(skb,ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, dev); |
dev | 1022 | net/inet/ip.c | len = (dev->mtu - hlen - 8); |
dev | 1064 | net/inet/ip.c | skb2->h.raw+=dev->hard_header_len; |
dev | 1077 | net/inet/ip.c | ip_queue_xmit(sk, dev, skb2, 1); |
dev | 1088 | net/inet/ip.c | ip_forward(struct sk_buff *skb, struct device *dev, int is_frag) |
dev | 1102 | net/inet/ip.c | if(dev->flags&IFF_PROMISC) |
dev | 1104 | net/inet/ip.c | if(memcmp((char *)&skb[1],dev->dev_addr,dev->addr_len)) |
dev | 1121 | net/inet/ip.c | icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, dev); |
dev | 1137 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_UNREACH, dev); |
dev | 1156 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, dev); |
dev | 1164 | net/inet/ip.c | if (dev == dev2) |
dev | 1211 | net/inet/ip.c | ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 1252 | net/inet/ip.c | ip_forward(skb, dev, is_frag); |
dev | 1269 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
dev | 1279 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 1342 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
dev | 1356 | net/inet/ip.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 1373 | net/inet/ip.c | ip_queue_xmit(struct sock *sk, struct device *dev, |
dev | 1380 | net/inet/ip.c | if (dev == NULL) { |
dev | 1386 | net/inet/ip.c | skb->dev = dev; |
dev | 1391 | net/inet/ip.c | ptr += dev->hard_header_len; |
dev | 1394 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
dev | 1396 | net/inet/ip.c | if(skb->len > dev->mtu) |
dev | 1399 | net/inet/ip.c | ip_fragment(sk,skb,dev,0); |
dev | 1435 | net/inet/ip.c | if (dev->flags & IFF_UP) { |
dev | 1437 | net/inet/ip.c | dev->queue_xmit(skb, dev, sk->priority); |
dev | 1440 | net/inet/ip.c | dev->queue_xmit(skb, dev, SOPRI_NORMAL); |
dev | 1453 | net/inet/ip.c | struct device *dev; |
dev | 1460 | net/inet/ip.c | dev = skb->dev; |
dev | 1462 | net/inet/ip.c | if(dev==NULL) |
dev | 1479 | net/inet/ip.c | if (dev->rebuild_header(skb->data, dev)) { |
dev | 1491 | net/inet/ip.c | if (dev->flags & IFF_UP) { |
dev | 1493 | net/inet/ip.c | 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 | 75 | net/inet/ip.h | extern int ip_rcv(struct sk_buff *skb, struct device *dev, |
dev | 78 | 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(skb->data, 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 | 59 | net/inet/packet.c | packet_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 64 | net/inet/packet.c | skb->dev = dev; |
dev | 65 | net/inet/packet.c | skb->len += dev->hard_header_len; |
dev | 90 | net/inet/packet.c | struct device *dev; |
dev | 114 | net/inet/packet.c | dev = dev_get(saddr.sa_data); |
dev | 115 | net/inet/packet.c | if (dev == NULL) { |
dev | 118 | net/inet/packet.c | if(len>dev->mtu) |
dev | 138 | net/inet/packet.c | if (dev->flags & IFF_UP) dev->queue_xmit(skb, dev, sk->priority); |
dev | 224 | net/inet/packet.c | addr.sa_family = skb->dev->type; |
dev | 225 | 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 | 94 | net/inet/raw.c | raw_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 102 | net/inet/raw.c | skb, dev, opt, daddr, len, saddr, redo, protocol)); |
dev | 119 | net/inet/raw.c | skb->dev = dev; |
dev | 144 | net/inet/raw.c | struct device *dev=NULL; |
dev | 221 | net/inet/raw.c | sin.sin_addr.s_addr, &dev, |
dev | 248 | net/inet/raw.c | if(dev!=NULL && skb->len > 4095) |
dev | 255 | 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 | 95 | net/inet/route.c | void rt_flush(struct device *dev) |
dev | 101 | net/inet/route.c | DPRINTF((DBG_RT, "RT: flushing for dev 0x%08lx (%s)\n", (long)dev, dev->name)); |
dev | 106 | net/inet/route.c | if (r->rt_dev != dev) { |
dev | 135 | net/inet/route.c | static unsigned long guess_mask(unsigned long dst, struct device * dev) |
dev | 142 | net/inet/route.c | if ((dst ^ dev->pa_addr) & mask) |
dev | 144 | net/inet/route.c | return dev->pa_mask; |
dev | 167 | net/inet/route.c | unsigned long gw, struct device *dev) |
dev | 176 | net/inet/route.c | if (!((dst ^ dev->pa_addr) & dev->pa_mask)) { |
dev | 177 | net/inet/route.c | mask = dev->pa_mask; |
dev | 184 | net/inet/route.c | mask = guess_mask(dst, dev); |
dev | 187 | net/inet/route.c | if (gw == dev->pa_addr) |
dev | 191 | net/inet/route.c | if (dev != get_gw_dev(gw)) |
dev | 205 | net/inet/route.c | rt->rt_dev = dev; |
dev | 208 | net/inet/route.c | rt->rt_mtu = dev->mtu; |
dev | 258 | net/inet/route.c | struct device * dev = NULL; |
dev | 265 | net/inet/route.c | dev = dev_get(devname); |
dev | 267 | net/inet/route.c | if (!dev) |
dev | 290 | net/inet/route.c | if (!dev) |
dev | 291 | net/inet/route.c | dev = get_gw_dev(gw); |
dev | 292 | net/inet/route.c | } else if (!dev) |
dev | 293 | net/inet/route.c | dev = dev_check(daddr); |
dev | 295 | net/inet/route.c | if (dev == NULL) |
dev | 298 | net/inet/route.c | rt_add(flags, daddr, mask, gw, dev); |
dev | 40 | net/inet/route.h | extern void rt_flush(struct device *dev); |
dev | 42 | net/inet/route.h | unsigned long gw, struct device *dev); |
dev | 49 | net/inet/skbuff.h | struct device *dev; |
dev | 390 | net/inet/sock.c | skb->dev = NULL; |
dev | 1757 | net/inet/sock.c | if (sk->prot->rcv) sk->prot->rcv(skb, skb->dev, sk->opt, |
dev | 202 | net/inet/sock.h | struct device **dev, int type, |
dev | 208 | net/inet/sock.h | struct device *dev, struct sk_buff *skb, |
dev | 213 | net/inet/sock.h | int (*rcv)(struct sk_buff *buff, struct device *dev, |
dev | 642 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, 0); |
dev | 701 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 728 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev, |
dev | 773 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 814 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 1011 | net/inet/tcp.c | tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev, |
dev | 1021 | net/inet/tcp.c | skb->dev = dev; |
dev | 1096 | net/inet/tcp.c | struct device *dev = NULL; |
dev | 1126 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 1153 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 1452 | 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 | 1523 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 1573 | net/inet/tcp.c | struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl) |
dev | 1592 | net/inet/tcp.c | buff->dev = dev; |
dev | 1597 | net/inet/tcp.c | tmp = prot->build_header(buff, saddr, daddr, &dev, IPPROTO_TCP, opt, |
dev | 1636 | net/inet/tcp.c | prot->queue_xmit(NULL, dev, buff, 1); |
dev | 1714 | net/inet/tcp.c | struct options *opt, struct device *dev) |
dev | 1725 | net/inet/tcp.c | sk, skb, daddr, saddr, opt, dev)); |
dev | 1734 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
dev | 1837 | net/inet/tcp.c | if ((saddr ^ daddr) & dev->pa_mask) |
dev | 1844 | net/inet/tcp.c | newsk->mtu = min(newsk->mtu, dev->mtu - HEADER_SIZE); |
dev | 1866 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &dev, |
dev | 1911 | net/inet/tcp.c | newsk->prot->queue_xmit(newsk, dev, buff, 0); |
dev | 1933 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 2021 | net/inet/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
dev | 2033 | net/inet/tcp.c | buff->dev = dev; |
dev | 2051 | net/inet/tcp.c | prot->queue_xmit(sk, dev, buff, 0); |
dev | 2118 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, skb->free); |
dev | 2557 | net/inet/tcp.c | sk->prot, NULL, skb->dev, sk->ip_tos, sk->ip_ttl); |
dev | 2842 | net/inet/tcp.c | unsigned long saddr, struct device *dev) |
dev | 2845 | net/inet/tcp.c | sk, th, saddr, dev)); |
dev | 2942 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 2994 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 3026 | net/inet/tcp.c | if ((sk->saddr ^ sk->daddr) & dev->pa_mask) |
dev | 3033 | net/inet/tcp.c | sk->mtu = min(sk->mtu, dev->mtu - HEADER_SIZE); |
dev | 3050 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 3060 | net/inet/tcp.c | struct options *opt, unsigned long saddr, struct device *dev) |
dev | 3100 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
dev | 3114 | net/inet/tcp.c | tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 3135 | net/inet/tcp.c | if (!dev) { |
dev | 3173 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
dev | 3254 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
dev | 3298 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
dev | 3326 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
dev | 3346 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
dev | 3359 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
dev | 3368 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
dev | 3380 | net/inet/tcp.c | tcp_conn_request(sk, skb, daddr, saddr, opt, dev); |
dev | 3390 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
dev | 3414 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
dev | 3437 | net/inet/tcp.c | sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
dev | 3462 | net/inet/tcp.c | sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
dev | 3509 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
dev | 3532 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
dev | 3548 | net/inet/tcp.c | struct device *dev=NULL; |
dev | 3568 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
dev | 3601 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 3616 | net/inet/tcp.c | struct device *dev; |
dev | 3629 | net/inet/tcp.c | dev = skb->dev; |
dev | 3631 | net/inet/tcp.c | if(dev==NULL) |
dev | 3639 | net/inet/tcp.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
dev | 3641 | net/inet/tcp.c | hlen = (iph->ihl * sizeof(unsigned long)) + dev->hard_header_len; |
dev | 3678 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, skb2, 1); |
dev | 120 | net/inet/tcp.h | extern int tcp_rcv(struct sk_buff *skb, struct device *dev, |
dev | 220 | net/inet/udp.c | struct device *dev; |
dev | 249 | net/inet/udp.c | dev = NULL; |
dev | 251 | net/inet/udp.c | saddr, sin->sin_addr.s_addr, dev, IPPROTO_UDP, skb->mem_len)); |
dev | 253 | net/inet/udp.c | &dev, IPPROTO_UDP, sk->opt, skb->mem_len,sk->ip_tos,sk->ip_ttl); |
dev | 261 | net/inet/udp.c | saddr = dev->pa_addr; |
dev | 265 | net/inet/udp.c | skb->dev = dev; |
dev | 272 | net/inet/udp.c | if (len > dev->mtu) { |
dev | 277 | net/inet/udp.c | printk("UDP: send: length %d > mtu %d (ignored)\n", len, dev->mtu); |
dev | 296 | net/inet/udp.c | sk->prot->queue_xmit(sk, dev, skb, 1); |
dev | 547 | net/inet/udp.c | udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 560 | net/inet/udp.c | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, dev); |
dev | 580 | net/inet/udp.c | skb->dev = dev; |
dev | 43 | net/inet/udp.h | extern int udp_rcv(struct sk_buff *skb, struct device *dev, |