tag | line | file | source code |
dev | 23 | fs/block_dev.c | unsigned int dev; |
dev | 27 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 28 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 29 | fs/block_dev.c | size = blk_size[MAJOR(dev)][MINOR(dev)]; |
dev | 39 | fs/block_dev.c | bh = getblk(dev, block, BLOCK_SIZE); |
dev | 41 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
dev | 73 | fs/block_dev.c | unsigned int dev; |
dev | 76 | fs/block_dev.c | dev = inode->i_rdev; |
dev | 78 | fs/block_dev.c | if (blk_size[MAJOR(dev)]) |
dev | 79 | fs/block_dev.c | size = blk_size[MAJOR(dev)][MINOR(dev)] << BLOCK_SIZE_BITS; |
dev | 98 | fs/block_dev.c | blocks += read_ahead[MAJOR(dev)] / (BLOCK_SIZE >> 9); |
dev | 118 | fs/block_dev.c | *bhb = getblk(dev, block++, BLOCK_SIZE); |
dev | 75 | fs/buffer.c | static void sync_buffers(dev_t dev) |
dev | 82 | fs/buffer.c | if (dev && bh->b_dev != dev) |
dev | 92 | fs/buffer.c | void sync_dev(dev_t dev) |
dev | 94 | fs/buffer.c | sync_buffers(dev); |
dev | 95 | fs/buffer.c | sync_supers(dev); |
dev | 96 | fs/buffer.c | sync_inodes(dev); |
dev | 97 | fs/buffer.c | sync_buffers(dev); |
dev | 111 | fs/buffer.c | void invalidate_buffers(dev_t dev) |
dev | 118 | fs/buffer.c | if (bh->b_dev != dev) |
dev | 121 | fs/buffer.c | if (bh->b_dev == dev) |
dev | 140 | fs/buffer.c | void check_disk_change(dev_t dev) |
dev | 145 | fs/buffer.c | switch(MAJOR(dev)){ |
dev | 147 | fs/buffer.c | if (!(bh = getblk(dev,0,1024))) |
dev | 155 | fs/buffer.c | i = check_scsidisk_media_change(dev, 0); |
dev | 161 | fs/buffer.c | i = check_cdrom_media_change(dev, 0); |
dev | 172 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 174 | fs/buffer.c | if (super_block[i].s_dev == dev) |
dev | 176 | fs/buffer.c | invalidate_inodes(dev); |
dev | 177 | fs/buffer.c | invalidate_buffers(dev); |
dev | 182 | fs/buffer.c | if (MAJOR(dev) == 8) |
dev | 183 | fs/buffer.c | revalidate_scsidisk(dev, 0); |
dev | 187 | fs/buffer.c | #define _hashfn(dev,block) (((unsigned)(dev^block))%NR_HASH) |
dev | 188 | fs/buffer.c | #define hash(dev,block) hash_table[_hashfn(dev,block)] |
dev | 265 | fs/buffer.c | static struct buffer_head * find_buffer(dev_t dev, int block, int size) |
dev | 269 | fs/buffer.c | for (tmp = hash(dev,block) ; tmp != NULL ; tmp = tmp->b_next) |
dev | 270 | fs/buffer.c | if (tmp->b_dev==dev && tmp->b_blocknr==block) |
dev | 275 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 288 | fs/buffer.c | struct buffer_head * get_hash_table(dev_t dev, int block, int size) |
dev | 293 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
dev | 297 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
dev | 314 | fs/buffer.c | struct buffer_head * getblk(dev_t dev, int block, int size) |
dev | 321 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
dev | 372 | fs/buffer.c | if (find_buffer(dev,block,size)) |
dev | 380 | fs/buffer.c | bh->b_dev=dev; |
dev | 404 | fs/buffer.c | struct buffer_head * bread(dev_t dev, int block, int size) |
dev | 408 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
dev | 410 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 428 | fs/buffer.c | struct buffer_head * breada(dev_t dev,int first, ...) |
dev | 434 | fs/buffer.c | if (!(bh = getblk(dev, first, 1024))) { |
dev | 436 | fs/buffer.c | MAJOR(dev), MINOR(dev)); |
dev | 442 | fs/buffer.c | tmp = getblk(dev, first, 1024); |
dev | 504 | fs/buffer.c | static inline unsigned long try_to_share_buffers(unsigned long address, dev_t dev, int b[], int size) |
dev | 521 | fs/buffer.c | unsigned long bread_page(unsigned long address, dev_t dev, int b[], int size, int prot) |
dev | 530 | fs/buffer.c | where = try_to_share_buffers(address,dev,b,size); |
dev | 537 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
dev | 61 | fs/ext/inode.c | int dev = s->s_dev,block; |
dev | 64 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
dev | 88 | fs/ext/inode.c | dev); |
dev | 94 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeblock = bread(dev, |
dev | 105 | fs/ext/inode.c | if (!(s->u.ext_sb.s_firstfreeinodeblock = bread(dev, block, BLOCK_SIZE))) { |
dev | 115 | fs/ext/inode.c | s->s_dev = dev; |
dev | 23 | fs/ext2/dcache.c | unsigned short dev; |
dev | 52 | fs/ext2/dcache.c | #define hash(dev,dir) ((dev ^ dir) % HASH_QUEUES) |
dev | 81 | fs/ext2/dcache.c | static struct dir_cache_entry *find_name (int queue, unsigned short dev, |
dev | 87 | fs/ext2/dcache.c | for (p = queue_head[queue]; p!= NULL && (p->dev != dev || |
dev | 105 | fs/ext2/dcache.c | p->dev, p->dir, p->name); |
dev | 171 | fs/ext2/dcache.c | void ext2_dcache_invalidate (unsigned short dev) |
dev | 180 | fs/ext2/dcache.c | if (p->dev == dev) { |
dev | 182 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 197 | fs/ext2/dcache.c | unsigned long ext2_dcache_lookup (unsigned short dev, unsigned long dir, |
dev | 211 | fs/ext2/dcache.c | printk ("dcache_lookup (%04x, %d, %s, %d)\n", dev, dir, our_name, len); |
dev | 213 | fs/ext2/dcache.c | queue = hash(dev, dir); |
dev | 214 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, our_name, len))) { |
dev | 249 | fs/ext2/dcache.c | void ext2_dcache_add (unsigned short dev, unsigned long dir, const char *name, |
dev | 259 | fs/ext2/dcache.c | dev, dir, name, len, ino); |
dev | 263 | fs/ext2/dcache.c | queue = hash(dev, dir); |
dev | 264 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 287 | fs/ext2/dcache.c | remove_from_queue (hash (p->dev, p->dir), p); |
dev | 290 | fs/ext2/dcache.c | p->dev = dev; |
dev | 311 | fs/ext2/dcache.c | void ext2_dcache_remove (unsigned short dev, unsigned long dir, |
dev | 320 | fs/ext2/dcache.c | printk ("dcache_remove (%04x, %d, %s, %d)\n", dev, dir, name, len); |
dev | 324 | fs/ext2/dcache.c | queue = hash(dev, dir); |
dev | 325 | fs/ext2/dcache.c | if ((p = find_name (queue, dev, dir, name, len))) { |
dev | 120 | fs/ext2/inode.c | int dev = s->s_dev; |
dev | 128 | fs/ext2/inode.c | if (!(bh = bread (dev, 1, BLOCK_SIZE))) { |
dev | 198 | fs/ext2/inode.c | dev); |
dev | 221 | fs/ext2/inode.c | s->u.ext2_sb.s_group_desc[i] = bread (dev, i + 2, s->s_blocksize); |
dev | 242 | fs/ext2/inode.c | s->s_dev = dev; |
dev | 72 | fs/inode.c | int fs_may_mount(dev_t dev) |
dev | 77 | fs/inode.c | if (inode->i_dev != dev) |
dev | 86 | fs/inode.c | int fs_may_umount(dev_t dev, struct inode * mount_root) |
dev | 91 | fs/inode.c | if (inode->i_dev==dev && inode->i_count) |
dev | 157 | fs/inode.c | void invalidate_inodes(dev_t dev) |
dev | 165 | fs/inode.c | if (inode->i_dev == dev) { |
dev | 168 | fs/inode.c | MAJOR(dev), MINOR(dev)); |
dev | 176 | fs/inode.c | void sync_inodes(dev_t dev) |
dev | 181 | fs/inode.c | if (dev && inode->i_dev != dev) |
dev | 198 | fs/isofs/dir.c | cache.dev = inode->i_dev; |
dev | 100 | fs/isofs/inode.c | int dev=s->s_dev; |
dev | 121 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-ISOFS_BUFFER_BITS), ISOFS_BUFFER_SIZE))) { |
dev | 124 | fs/isofs/inode.c | dev, iso_blknum); |
dev | 215 | fs/isofs/inode.c | s->s_dev = dev; |
dev | 577 | fs/isofs/inode.c | struct buffer_head * leak_check_bread(int dev, int block, int size){ |
dev | 579 | fs/isofs/inode.c | return bread(dev, block, size); |
dev | 214 | fs/isofs/namei.c | if (dir->i_dev == cache.dev && |
dev | 56 | fs/minix/inode.c | int i,dev=s->s_dev,block; |
dev | 61 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
dev | 89 | fs/minix/inode.c | dev); |
dev | 98 | fs/minix/inode.c | if ((s->u.minix_sb.s_imap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 103 | fs/minix/inode.c | if ((s->u.minix_sb.s_zmap[i]=bread(dev,block,BLOCK_SIZE)) != NULL) |
dev | 120 | fs/minix/inode.c | s->s_dev = dev; |
dev | 381 | fs/namei.c | int do_mknod(const char * filename, int mode, dev_t dev) |
dev | 407 | fs/namei.c | return dir->i_op->mknod(dir,basename,namelen,mode,dev); |
dev | 410 | fs/namei.c | int sys_mknod(const char * filename, int mode, dev_t dev) |
dev | 419 | fs/namei.c | error = do_mknod(tmp,mode,dev); |
dev | 174 | fs/nfs/dir.c | int dev; |
dev | 190 | fs/nfs/dir.c | if (entry->dev == dir->i_dev && entry->inode == dir->i_ino |
dev | 211 | fs/nfs/dir.c | entry->dev = 0; |
dev | 237 | fs/nfs/dir.c | entry->dev = dir->i_dev; |
dev | 250 | fs/nfs/dir.c | int dev; |
dev | 255 | fs/nfs/dir.c | dev = inode->i_dev; |
dev | 259 | fs/nfs/dir.c | dev = entry->dev; |
dev | 266 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 267 | fs/nfs/dir.c | entry->dev = 0; |
dev | 275 | fs/nfs/dir.c | int dev = file->i_dev; |
dev | 281 | fs/nfs/dir.c | if (entry->dev == dev && entry->fattr.fileid == fileid) |
dev | 66 | fs/nfs/inode.c | dev_t dev = sb->s_dev; |
dev | 92 | fs/nfs/inode.c | sb->s_dev = dev; |
dev | 24 | fs/open.c | int sys_ustat(int dev, struct ustat * ubuf) |
dev | 96 | fs/proc/link.c | unsigned int dev,ino; |
dev | 104 | fs/proc/link.c | dev = inode->i_dev; |
dev | 107 | fs/proc/link.c | i = sprintf(buf,"[%04x]:%u", dev, ino); |
dev | 67 | fs/super.c | void sync_supers(dev_t dev) |
dev | 74 | fs/super.c | if (dev && sb->s_dev != dev) |
dev | 79 | fs/super.c | if (dev && (dev != sb->s_dev)) |
dev | 86 | fs/super.c | static struct super_block * get_super(dev_t dev) |
dev | 90 | fs/super.c | if (!dev) |
dev | 94 | fs/super.c | if (s->s_dev == dev) { |
dev | 96 | fs/super.c | if (s->s_dev == dev) |
dev | 104 | fs/super.c | void put_super(dev_t dev) |
dev | 108 | fs/super.c | if (dev == ROOT_DEV) { |
dev | 110 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 113 | fs/super.c | if (!(sb = get_super(dev))) |
dev | 117 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 124 | fs/super.c | static struct super_block * read_super(dev_t dev,char *name,int flags, |
dev | 130 | fs/super.c | if (!dev) |
dev | 132 | fs/super.c | check_disk_change(dev); |
dev | 133 | fs/super.c | s = get_super(dev); |
dev | 138 | fs/super.c | MAJOR(dev), MINOR(dev), name); |
dev | 147 | fs/super.c | s->s_dev = dev; |
dev | 153 | fs/super.c | s->s_dev = dev; |
dev | 186 | fs/super.c | static void put_unnamed_dev(dev_t dev) |
dev | 188 | fs/super.c | if (!dev) |
dev | 190 | fs/super.c | if (!unnamed_dev_in_use[dev]) { |
dev | 192 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 195 | fs/super.c | unnamed_dev_in_use[dev] = 0; |
dev | 198 | fs/super.c | static int do_umount(dev_t dev) |
dev | 202 | fs/super.c | if (dev==ROOT_DEV) |
dev | 204 | fs/super.c | if (!(sb=get_super(dev)) || !(sb->s_covered)) |
dev | 208 | fs/super.c | MAJOR(dev), MINOR(dev)); |
dev | 209 | fs/super.c | if (!fs_may_umount(dev, sb->s_mounted)) |
dev | 218 | fs/super.c | put_super(dev); |
dev | 236 | fs/super.c | dev_t dev; |
dev | 247 | fs/super.c | dev = inode->i_rdev; |
dev | 257 | fs/super.c | dev = inode->i_sb->s_dev; |
dev | 260 | fs/super.c | dummy_inode.i_rdev = dev; |
dev | 266 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 270 | fs/super.c | if (!(retval = do_umount(dev))) { |
dev | 271 | fs/super.c | fops = blkdev_fops[MAJOR(dev)]; |
dev | 274 | fs/super.c | if (MAJOR(dev) == UNNAMED_MAJOR) |
dev | 275 | fs/super.c | put_unnamed_dev(dev); |
dev | 281 | fs/super.c | sync_dev(dev); |
dev | 294 | fs/super.c | static int do_mount(dev_t dev, const char * dir, char * type, int flags, void * data) |
dev | 311 | fs/super.c | if (!fs_may_mount(dev)) { |
dev | 315 | fs/super.c | sb = read_super(dev,type,flags,data,0); |
dev | 369 | fs/super.c | dev_t dev; |
dev | 406 | fs/super.c | dev = inode->i_rdev; |
dev | 407 | fs/super.c | if (MAJOR(dev) >= MAX_BLKDEV) { |
dev | 412 | fs/super.c | if (!(dev = get_unnamed_dev())) |
dev | 416 | fs/super.c | fops = blkdev_fops[MAJOR(dev)]; |
dev | 438 | fs/super.c | retval = do_mount(dev,dir_name,t,flags,(void *) page); |
dev | 63 | fs/xiafs/inode.c | int i, z, dev; |
dev | 65 | fs/xiafs/inode.c | dev=s->s_dev; |
dev | 67 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
dev | 81 | fs/xiafs/inode.c | dev); |
dev | 108 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_imap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 118 | fs/xiafs/inode.c | if (!(s->u.xiafs_sb.s_zmap_buf[i]=bread(dev, z++, XIAFS_ZSIZE(s)))) |
dev | 124 | fs/xiafs/inode.c | s->s_dev = dev; |
dev | 326 | include/linux/fs.h | extern int fs_may_mount(dev_t dev); |
dev | 327 | include/linux/fs.h | extern int fs_may_umount(dev_t dev, struct inode * mount_root); |
dev | 339 | include/linux/fs.h | extern void check_disk_change(dev_t dev); |
dev | 340 | include/linux/fs.h | extern void invalidate_inodes(dev_t dev); |
dev | 341 | include/linux/fs.h | extern void invalidate_buffers(dev_t dev); |
dev | 343 | include/linux/fs.h | extern int ticks_to_floppy_on(unsigned int dev); |
dev | 344 | include/linux/fs.h | extern void floppy_on(unsigned int dev); |
dev | 345 | include/linux/fs.h | extern void floppy_off(unsigned int dev); |
dev | 346 | include/linux/fs.h | extern void sync_inodes(dev_t dev); |
dev | 347 | include/linux/fs.h | extern void sync_dev(dev_t dev); |
dev | 348 | include/linux/fs.h | extern void sync_supers(dev_t dev); |
dev | 356 | include/linux/fs.h | extern int do_mknod(const char * filename, int mode, dev_t dev); |
dev | 363 | include/linux/fs.h | extern struct buffer_head * get_hash_table(dev_t dev, int block, int size); |
dev | 364 | include/linux/fs.h | extern struct buffer_head * getblk(dev_t dev, int block, int size); |
dev | 366 | include/linux/fs.h | extern void ll_rw_page(int rw, int dev, int nr, char * buffer); |
dev | 367 | include/linux/fs.h | extern void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buffer); |
dev | 369 | include/linux/fs.h | extern struct buffer_head * bread(dev_t dev, int block, int size); |
dev | 370 | include/linux/fs.h | extern unsigned long bread_page(unsigned long addr,dev_t dev,int b[],int size,int prot); |
dev | 371 | include/linux/fs.h | extern struct buffer_head * breada(dev_t dev,int block,...); |
dev | 372 | include/linux/fs.h | extern void put_super(dev_t dev); |
dev | 161 | include/linux/iso_fs.h | extern int isofs_new_block(int dev); |
dev | 162 | include/linux/iso_fs.h | extern int isofs_free_block(int dev, int block); |
dev | 188 | include/linux/iso_fs.h | dev_t dev; /* And this matches */ |
dev | 204 | 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 | 108 | include/linux/xd.h | extern void resetup_one_dev (struct gendisk *dev,unsigned int drive); |
dev | 119 | include/linux/xd.h | static int xd_reread_partitions (int dev); |
dev | 25 | kernel/blk_drv/blk.h | int dev; /* -1 if no request */ |
dev | 45 | kernel/blk_drv/blk.h | ((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \ |
dev | 74 | kernel/blk_drv/blk.h | extern int is_read_only(int dev); |
dev | 75 | kernel/blk_drv/blk.h | extern void set_device_ro(int dev,int flag); |
dev | 83 | kernel/blk_drv/blk.h | #define RO_IOCTLS(dev,where) \ |
dev | 85 | kernel/blk_drv/blk.h | set_device_ro((dev),get_fs_long((long *) (where))); return 0; \ |
dev | 87 | kernel/blk_drv/blk.h | if (!__err) put_fs_long(is_read_only(dev),(long *) (where)); return __err; } |
dev | 172 | kernel/blk_drv/blk.h | #define CURRENT_DEV DEVICE_NR(CURRENT->dev) |
dev | 219 | kernel/blk_drv/blk.h | printk("dev %04x, sector %d\n",req->dev,req->sector); |
dev | 241 | kernel/blk_drv/blk.h | DEVICE_OFF(req->dev); |
dev | 249 | kernel/blk_drv/blk.h | req->dev = -1; |
dev | 265 | kernel/blk_drv/blk.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 228 | kernel/blk_drv/floppy.c | (CURRENT->dev)) |
dev | 600 | kernel/blk_drv/floppy.c | int drive = MINOR(CURRENT->dev); |
dev | 928 | kernel/blk_drv/floppy.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 942 | kernel/blk_drv/floppy.c | if (MAJOR(CURRENT->dev) != MAJOR_NR) |
dev | 36 | kernel/blk_drv/genhd.c | static void extended_partition(struct gendisk *hd, int dev) |
dev | 43 | kernel/blk_drv/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 49 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) |
dev | 84 | kernel/blk_drv/genhd.c | dev = ((hd->major) << 8) | current_minor; |
dev | 93 | kernel/blk_drv/genhd.c | static void check_partition(struct gendisk *hd, unsigned int dev) |
dev | 105 | kernel/blk_drv/genhd.c | first_sector = hd->part[MINOR(dev)].start_sect; |
dev | 106 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) { |
dev | 107 | kernel/blk_drv/genhd.c | printk(" unable to read partition table of device %04x\n",dev); |
dev | 160 | kernel/blk_drv/genhd.c | void resetup_one_dev(struct gendisk *dev, int drive) |
dev | 163 | kernel/blk_drv/genhd.c | int start = drive<<dev->minor_shift; |
dev | 164 | kernel/blk_drv/genhd.c | int j = start + dev->max_p; |
dev | 165 | kernel/blk_drv/genhd.c | int major = dev->major << 8; |
dev | 167 | kernel/blk_drv/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 168 | kernel/blk_drv/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 171 | kernel/blk_drv/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 174 | kernel/blk_drv/genhd.c | static void setup_dev(struct gendisk *dev) |
dev | 177 | kernel/blk_drv/genhd.c | int j = dev->max_nr * dev->max_p; |
dev | 178 | kernel/blk_drv/genhd.c | int major = dev->major << 8; |
dev | 183 | kernel/blk_drv/genhd.c | dev->part[i].start_sect = 0; |
dev | 184 | kernel/blk_drv/genhd.c | dev->part[i].nr_sects = 0; |
dev | 186 | kernel/blk_drv/genhd.c | dev->init(); |
dev | 187 | kernel/blk_drv/genhd.c | for (drive=0 ; drive<dev->nr_real ; drive++) { |
dev | 188 | kernel/blk_drv/genhd.c | current_minor = 1+(drive<<dev->minor_shift); |
dev | 189 | kernel/blk_drv/genhd.c | check_partition(dev, major+(drive<<dev->minor_shift)); |
dev | 192 | kernel/blk_drv/genhd.c | dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); |
dev | 193 | kernel/blk_drv/genhd.c | blk_size[dev->major] = dev->sizes; |
dev | 273 | kernel/blk_drv/hd.c | int dev; |
dev | 277 | kernel/blk_drv/hd.c | dev = MINOR(CURRENT->dev) >> 6; |
dev | 280 | kernel/blk_drv/hd.c | recalibrate[dev] = 1; |
dev | 284 | kernel/blk_drv/hd.c | recalibrate[dev] = 1; |
dev | 334 | kernel/blk_drv/hd.c | MINOR(CURRENT->dev), CURRENT->sector, i, CURRENT-> |
dev | 435 | kernel/blk_drv/hd.c | unsigned int block,dev; |
dev | 439 | kernel/blk_drv/hd.c | if (CURRENT && CURRENT->dev < 0) return; |
dev | 447 | kernel/blk_drv/hd.c | dev = MINOR(CURRENT->dev); |
dev | 450 | kernel/blk_drv/hd.c | if (dev >= (NR_HD<<6) || block >= hd[dev].nr_sects) { |
dev | 453 | kernel/blk_drv/hd.c | block, hd[dev].nr_sects); |
dev | 458 | kernel/blk_drv/hd.c | block += hd[dev].start_sect; |
dev | 459 | kernel/blk_drv/hd.c | dev >>= 6; |
dev | 460 | kernel/blk_drv/hd.c | sec = block % hd_info[dev].sect + 1; |
dev | 461 | kernel/blk_drv/hd.c | track = block / hd_info[dev].sect; |
dev | 462 | kernel/blk_drv/hd.c | head = track % hd_info[dev].head; |
dev | 463 | kernel/blk_drv/hd.c | cyl = track / hd_info[dev].head; |
dev | 466 | kernel/blk_drv/hd.c | dev, cyl, head, sec, CURRENT->buffer); |
dev | 478 | kernel/blk_drv/hd.c | if (recalibrate[dev]) { |
dev | 479 | kernel/blk_drv/hd.c | recalibrate[dev] = 0; |
dev | 480 | kernel/blk_drv/hd.c | hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr); |
dev | 487 | kernel/blk_drv/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr); |
dev | 500 | kernel/blk_drv/hd.c | hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr); |
dev | 513 | kernel/blk_drv/hd.c | int dev, err; |
dev | 517 | kernel/blk_drv/hd.c | dev = MINOR(inode->i_rdev) >> 6; |
dev | 518 | kernel/blk_drv/hd.c | if (dev >= NR_HD) |
dev | 526 | kernel/blk_drv/hd.c | put_fs_byte(hd_info[dev].head, |
dev | 528 | kernel/blk_drv/hd.c | put_fs_byte(hd_info[dev].sect, |
dev | 530 | kernel/blk_drv/hd.c | put_fs_word(hd_info[dev].cyl, |
dev | 736 | kernel/blk_drv/hd.c | static int revalidate_hddisk(int dev, int maxusage) |
dev | 744 | kernel/blk_drv/hd.c | target = DEVICE_NR(MINOR(dev)); |
dev | 66 | kernel/blk_drv/ll_rw_blk.c | int is_read_only(int dev) |
dev | 70 | kernel/blk_drv/ll_rw_blk.c | major = MAJOR(dev); |
dev | 71 | kernel/blk_drv/ll_rw_blk.c | minor = MINOR(dev); |
dev | 76 | kernel/blk_drv/ll_rw_blk.c | void set_device_ro(int dev,int flag) |
dev | 80 | kernel/blk_drv/ll_rw_blk.c | major = MAJOR(dev); |
dev | 81 | kernel/blk_drv/ll_rw_blk.c | minor = MINOR(dev); |
dev | 92 | kernel/blk_drv/ll_rw_blk.c | static void add_request(struct blk_dev_struct * dev, struct request * req) |
dev | 100 | kernel/blk_drv/ll_rw_blk.c | if (!(tmp = dev->current_request)) { |
dev | 101 | kernel/blk_drv/ll_rw_blk.c | dev->current_request = req; |
dev | 102 | kernel/blk_drv/ll_rw_blk.c | (dev->request_fn)(); |
dev | 116 | kernel/blk_drv/ll_rw_blk.c | if(MAJOR(req->dev) == 8 || |
dev | 117 | kernel/blk_drv/ll_rw_blk.c | MAJOR(req->dev) == 9 || |
dev | 118 | kernel/blk_drv/ll_rw_blk.c | MAJOR(req->dev) == 11) |
dev | 119 | kernel/blk_drv/ll_rw_blk.c | (dev->request_fn)(); |
dev | 166 | kernel/blk_drv/ll_rw_blk.c | if (req->dev == bh->b_dev && |
dev | 191 | kernel/blk_drv/ll_rw_blk.c | if (req->dev < 0) |
dev | 205 | kernel/blk_drv/ll_rw_blk.c | req->dev = bh->b_dev; |
dev | 220 | kernel/blk_drv/ll_rw_blk.c | void ll_rw_page(int rw, int dev, int page, char * buffer) |
dev | 223 | kernel/blk_drv/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 226 | kernel/blk_drv/ll_rw_blk.c | printk("Trying to read nonexistent block-device %04x (%d)\n",dev,page*8); |
dev | 231 | kernel/blk_drv/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 232 | kernel/blk_drv/ll_rw_blk.c | printk("Can't page to read-only device 0x%X\n",dev); |
dev | 239 | kernel/blk_drv/ll_rw_blk.c | if (req->dev<0) |
dev | 247 | kernel/blk_drv/ll_rw_blk.c | req->dev = dev; |
dev | 272 | kernel/blk_drv/ll_rw_blk.c | struct blk_dev_struct * dev; |
dev | 313 | kernel/blk_drv/ll_rw_blk.c | plug.dev = -1; |
dev | 323 | kernel/blk_drv/ll_rw_blk.c | dev = major+blk_dev; |
dev | 324 | kernel/blk_drv/ll_rw_blk.c | (dev->request_fn)(); |
dev | 329 | kernel/blk_drv/ll_rw_blk.c | void ll_rw_swap_file(int rw, int dev, unsigned int *b, int nb, char *buf) |
dev | 333 | kernel/blk_drv/ll_rw_blk.c | unsigned int major = MAJOR(dev); |
dev | 344 | kernel/blk_drv/ll_rw_blk.c | if (rw == WRITE && is_read_only(dev)) { |
dev | 345 | kernel/blk_drv/ll_rw_blk.c | printk("Can't swap to read-only device 0x%X\n",dev); |
dev | 354 | kernel/blk_drv/ll_rw_blk.c | if (req->dev<0) |
dev | 361 | kernel/blk_drv/ll_rw_blk.c | req->dev = dev; |
dev | 382 | kernel/blk_drv/ll_rw_blk.c | request[i].dev = -1; |
dev | 32 | kernel/blk_drv/ramdisk.c | if ((MINOR(CURRENT->dev) != 1) || (addr+len > rd_start+rd_length)) { |
dev | 775 | kernel/blk_drv/scsi/aha1542.c | int aha1542_biosparam(int size, int dev, int* info){ |
dev | 481 | kernel/blk_drv/scsi/aha1740.c | int aha1740_biosparam(int size, int dev, int* info) |
dev | 1289 | kernel/blk_drv/scsi/fdomain.c | int fdomain_16x0_biosparam( int size, int dev, int *info ) |
dev | 1322 | kernel/blk_drv/scsi/fdomain.c | drive = MINOR(dev) / 16; |
dev | 148 | kernel/blk_drv/scsi/scsi.c | SCpnt->request.dev = 0xfffe; |
dev | 160 | kernel/blk_drv/scsi/scsi.c | int host_nr , dev, lun, type; |
dev | 175 | kernel/blk_drv/scsi/scsi.c | for (dev = 0; dev < 8; ++dev) |
dev | 176 | kernel/blk_drv/scsi/scsi.c | if (scsi_hosts[host_nr].this_id != dev) |
dev | 180 | kernel/blk_drv/scsi/scsi.c | scsi_devices[NR_SCSI_DEVICES].id = dev; |
dev | 191 | kernel/blk_drv/scsi/scsi.c | SCmd.target = dev; |
dev | 194 | kernel/blk_drv/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 204 | kernel/blk_drv/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 230 | kernel/blk_drv/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 237 | kernel/blk_drv/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 288 | kernel/blk_drv/scsi/scsi.c | host_nr , dev, lun); |
dev | 293 | kernel/blk_drv/scsi/scsi.c | host_nr , dev, lun); |
dev | 299 | kernel/blk_drv/scsi/scsi.c | host_nr , dev, lun); |
dev | 327 | kernel/blk_drv/scsi/scsi.c | SCmd.request.dev = 0xffff; /* Mark not busy */ |
dev | 334 | kernel/blk_drv/scsi/scsi.c | while (SCmd.request.dev != 0xfffe); |
dev | 424 | kernel/blk_drv/scsi/scsi.c | if (req && req->dev <= 0) |
dev | 432 | kernel/blk_drv/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 443 | kernel/blk_drv/scsi/scsi.c | req->dev = -1; |
dev | 445 | kernel/blk_drv/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy, but no request */ |
dev | 466 | kernel/blk_drv/scsi/scsi.c | int host, dev = -1; |
dev | 477 | kernel/blk_drv/scsi/scsi.c | if (req && (dev = req->dev) <= 0) return NULL; |
dev | 487 | kernel/blk_drv/scsi/scsi.c | if(SCpnt->request.dev < 0) break; |
dev | 493 | kernel/blk_drv/scsi/scsi.c | if (req && ((req->dev < 0) || (req->dev != dev))) { |
dev | 497 | kernel/blk_drv/scsi/scsi.c | if (!SCpnt || SCpnt->request.dev >= 0) /* Might have changed */ |
dev | 507 | kernel/blk_drv/scsi/scsi.c | (SCwait->request.dev > 0)); |
dev | 511 | kernel/blk_drv/scsi/scsi.c | req->dev = -1; |
dev | 514 | kernel/blk_drv/scsi/scsi.c | SCpnt->request.dev = 0xffff; /* Busy */ |
dev | 1135 | kernel/blk_drv/scsi/scsi.c | if ((SCpnt1->request.dev > 0) && |
dev | 1395 | kernel/blk_drv/scsi/scsi.c | SCpnt->request.dev = -1; /* Mark not busy */ |
dev | 457 | kernel/blk_drv/scsi/scsi.h | printk("dev %04x, sector %d\n",req->dev,req->sector); |
dev | 482 | kernel/blk_drv/scsi/scsi.h | DEVICE_OFF(req->dev); |
dev | 489 | kernel/blk_drv/scsi/scsi.h | req->dev = -1; |
dev | 505 | kernel/blk_drv/scsi/scsi.h | if (MAJOR(CURRENT->dev) != MAJOR_NR) \ |
dev | 49 | kernel/blk_drv/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
dev | 55 | kernel/blk_drv/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
dev | 61 | kernel/blk_drv/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xfff0) != ((target + NR_REAL) << 4) +(MAJOR_NR << 8)){ \ |
dev | 62 | kernel/blk_drv/scsi/scsi_debug.c | printk("Dev #s %x %x ",SCpnt->request.dev, target); \ |
dev | 70 | kernel/blk_drv/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) > npart) panic ("Bad partition"); \ |
dev | 71 | kernel/blk_drv/scsi/scsi_debug.c | if ((SCpnt->request.dev & 0xf) != 0) start = starts[(SCpnt->request.dev & 0xf) - 1]; \ |
dev | 80 | kernel/blk_drv/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
dev | 203 | kernel/blk_drv/scsi/scsi_debug.c | if(NR_REAL < 0) NR_REAL = (SCpnt->request.dev >> 4) & 0x0f; |
dev | 28 | kernel/blk_drv/scsi/scsi_ioctl.c | static int ioctl_probe(int dev, void *buffer) |
dev | 34 | kernel/blk_drv/scsi/scsi_ioctl.c | if ((temp = scsi_hosts[dev].present) && buffer) { |
dev | 36 | kernel/blk_drv/scsi/scsi_ioctl.c | string = scsi_hosts[dev].info(); |
dev | 79 | kernel/blk_drv/scsi/scsi_ioctl.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 89 | kernel/blk_drv/scsi/scsi_ioctl.c | static int ioctl_internal_command(Scsi_Device *dev, char * cmd) |
dev | 94 | kernel/blk_drv/scsi/scsi_ioctl.c | host = dev->host_no; |
dev | 96 | kernel/blk_drv/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
dev | 101 | kernel/blk_drv/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 104 | kernel/blk_drv/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 110 | kernel/blk_drv/scsi/scsi_ioctl.c | if(cmd[0] == ALLOW_MEDIUM_REMOVAL) dev->lockable = 0; |
dev | 114 | kernel/blk_drv/scsi/scsi_ioctl.c | if(dev->removable){ |
dev | 119 | kernel/blk_drv/scsi/scsi_ioctl.c | if (dev->removable){ |
dev | 120 | kernel/blk_drv/scsi/scsi_ioctl.c | dev->changed = 1; |
dev | 127 | kernel/blk_drv/scsi/scsi_ioctl.c | dev->host_no, |
dev | 128 | kernel/blk_drv/scsi/scsi_ioctl.c | dev->id, |
dev | 129 | kernel/blk_drv/scsi/scsi_ioctl.c | dev->lun, |
dev | 139 | kernel/blk_drv/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 144 | kernel/blk_drv/scsi/scsi_ioctl.c | static int ioctl_command(Scsi_Device *dev, void *buffer) |
dev | 175 | kernel/blk_drv/scsi/scsi_ioctl.c | host = dev->host_no; |
dev | 176 | kernel/blk_drv/scsi/scsi_ioctl.c | cmd[1] = ( cmd[1] & 0x1f ) | (dev->lun << 5); |
dev | 180 | kernel/blk_drv/scsi/scsi_ioctl.c | SCpnt = allocate_device(NULL, dev->index, 1); |
dev | 186 | kernel/blk_drv/scsi/scsi_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 189 | kernel/blk_drv/scsi/scsi_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 197 | kernel/blk_drv/scsi/scsi_ioctl.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 204 | kernel/blk_drv/scsi/scsi_ioctl.c | printk("scsi_ioctl : device %d. command = ", dev->id); |
dev | 225 | kernel/blk_drv/scsi/scsi_ioctl.c | int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg) |
dev | 229 | kernel/blk_drv/scsi/scsi_ioctl.c | if ((cmd != 0 && dev->index > NR_SCSI_DEVICES)) |
dev | 231 | kernel/blk_drv/scsi/scsi_ioctl.c | if ((cmd == 0 && dev->host_no > max_scsi_hosts)) |
dev | 237 | kernel/blk_drv/scsi/scsi_ioctl.c | put_fs_long(dev->id + (dev->lun << 8) + |
dev | 238 | kernel/blk_drv/scsi/scsi_ioctl.c | (dev->host_no << 16), (long *) arg); |
dev | 241 | kernel/blk_drv/scsi/scsi_ioctl.c | return ioctl_probe(dev->host_no, arg); |
dev | 243 | kernel/blk_drv/scsi/scsi_ioctl.c | return ioctl_command((Scsi_Device *) dev, arg); |
dev | 245 | kernel/blk_drv/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 247 | kernel/blk_drv/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 250 | kernel/blk_drv/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 253 | kernel/blk_drv/scsi/scsi_ioctl.c | if (!dev->removable || !dev->lockable) return 0; |
dev | 255 | kernel/blk_drv/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 258 | kernel/blk_drv/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 261 | kernel/blk_drv/scsi/scsi_ioctl.c | scsi_cmd[1] = dev->lun << 5; |
dev | 264 | kernel/blk_drv/scsi/scsi_ioctl.c | return ioctl_internal_command((Scsi_Device *) dev, scsi_cmd); |
dev | 144 | kernel/blk_drv/scsi/sd.c | printk("sd%d : rw_intr(%d, %x)\n", MINOR(SCpnt->request.dev), SCpnt->host, result); |
dev | 156 | kernel/blk_drv/scsi/sd.c | printk("sd%d : %d sectors remain.\n", MINOR(SCpnt->request.dev), SCpnt->request.nr_sectors); |
dev | 199 | kernel/blk_drv/scsi/sd.c | MINOR(SCpnt->request.dev)); |
dev | 257 | kernel/blk_drv/scsi/sd.c | if rscsi_disks[DEVICE_NR(SCpnt->request.dev)].remap |
dev | 271 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
dev | 287 | kernel/blk_drv/scsi/sd.c | if (rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten) { |
dev | 288 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
dev | 297 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->host_no, |
dev | 298 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->id, |
dev | 299 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(SCpnt->request.dev)].device->lun, result); |
dev | 326 | kernel/blk_drv/scsi/sd.c | if (CURRENT != NULL && CURRENT->dev == -1) { |
dev | 346 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(MINOR(CURRENT->dev))].device->index, 0); |
dev | 364 | kernel/blk_drv/scsi/sd.c | rscsi_disks[DEVICE_NR(MINOR(req->dev))].device->index); |
dev | 389 | kernel/blk_drv/scsi/sd.c | int dev, block, this_count; |
dev | 395 | kernel/blk_drv/scsi/sd.c | if(SCpnt->request.dev <= 0) |
dev | 398 | kernel/blk_drv/scsi/sd.c | dev = MINOR(SCpnt->request.dev); |
dev | 403 | kernel/blk_drv/scsi/sd.c | printk("Doing sd request, dev = %d, block = %d\n", dev, block); |
dev | 406 | kernel/blk_drv/scsi/sd.c | if (dev >= (NR_SD << 4) || block + SCpnt->request.nr_sectors > sd[dev].nr_sects) |
dev | 412 | kernel/blk_drv/scsi/sd.c | block += sd[dev].start_sect; |
dev | 413 | kernel/blk_drv/scsi/sd.c | dev = DEVICE_NR(dev); |
dev | 415 | kernel/blk_drv/scsi/sd.c | if (rscsi_disks[dev].device->changed) |
dev | 426 | kernel/blk_drv/scsi/sd.c | printk("sd%d : real dev = /dev/sd%d, block = %d\n", MINOR(SCpnt->request.dev), dev, block); |
dev | 432 | kernel/blk_drv/scsi/sd.c | if (!rscsi_disks[dev].device->writeable) |
dev | 485 | kernel/blk_drv/scsi/sd.c | this_count_max = (rscsi_disks[dev].ten ? 0xffff : 0xff); |
dev | 563 | kernel/blk_drv/scsi/sd.c | printk("sd%d : %s %d/%d 512 byte blocks.\n", MINOR(SCpnt->request.dev), |
dev | 570 | kernel/blk_drv/scsi/sd.c | if (rscsi_disks[dev].sector_size == 1024){ |
dev | 577 | kernel/blk_drv/scsi/sd.c | if (rscsi_disks[dev].sector_size == 256){ |
dev | 582 | kernel/blk_drv/scsi/sd.c | if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten) |
dev | 614 | kernel/blk_drv/scsi/sd.c | SCpnt->transfersize = rscsi_disks[dev].sector_size; |
dev | 618 | kernel/blk_drv/scsi/sd.c | this_count * rscsi_disks[dev].sector_size, |
dev | 660 | kernel/blk_drv/scsi/sd.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 689 | kernel/blk_drv/scsi/sd.c | SCpnt->request.dev = 0xffff; /* Mark as really busy again */ |
dev | 699 | kernel/blk_drv/scsi/sd.c | while(SCpnt->request.dev != 0xfffe); |
dev | 701 | kernel/blk_drv/scsi/sd.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 704 | kernel/blk_drv/scsi/sd.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 712 | kernel/blk_drv/scsi/sd.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 866 | kernel/blk_drv/scsi/sd.c | int revalidate_scsidisk(int dev, int maxusage){ |
dev | 873 | kernel/blk_drv/scsi/sd.c | target = DEVICE_NR(MINOR(dev)); |
dev | 14 | kernel/blk_drv/scsi/sd_ioctl.c | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 19 | kernel/blk_drv/scsi/sd_ioctl.c | int dev = inode->i_rdev; |
dev | 30 | kernel/blk_drv/scsi/sd_ioctl.c | host = rscsi_disks[MINOR(dev) >> 4].device->host_no; |
dev | 35 | kernel/blk_drv/scsi/sd_ioctl.c | scsi_hosts[host].bios_param(rscsi_disks[MINOR(dev) >> 4].capacity, |
dev | 36 | kernel/blk_drv/scsi/sd_ioctl.c | dev, |
dev | 56 | kernel/blk_drv/scsi/sd_ioctl.c | return revalidate_scsidisk(dev, 1); |
dev | 58 | kernel/blk_drv/scsi/sd_ioctl.c | return scsi_ioctl(rscsi_disks[MINOR(dev) >> 4].device , cmd, (void *) arg); |
dev | 1398 | kernel/blk_drv/scsi/seagate.c | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 1400 | kernel/blk_drv/scsi/seagate.c | int seagate_st0x_biosparam(int size, int dev, int* info) { |
dev | 1408 | kernel/blk_drv/scsi/seagate.c | disk = rscsi_disks[MINOR(dev) >> 4].device; |
dev | 207 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->changed = 1; |
dev | 216 | kernel/blk_drv/scsi/sr.c | if (scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten) { |
dev | 217 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].ten = 0; |
dev | 241 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->host_no, |
dev | 242 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->id, |
dev | 243 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(SCpnt->request.dev)].device->lun, |
dev | 283 | kernel/blk_drv/scsi/sr.c | if (CURRENT != NULL && CURRENT->dev == -1) { |
dev | 292 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(CURRENT->dev))].device->index, 0); |
dev | 311 | kernel/blk_drv/scsi/sr.c | scsi_CDs[DEVICE_NR(MINOR(req->dev))].device->index); |
dev | 337 | kernel/blk_drv/scsi/sr.c | unsigned int dev, block, realcount; |
dev | 344 | kernel/blk_drv/scsi/sr.c | if(SCpnt->request.dev <= 0) |
dev | 347 | kernel/blk_drv/scsi/sr.c | dev = MINOR(SCpnt->request.dev); |
dev | 352 | kernel/blk_drv/scsi/sr.c | if (dev >= NR_SR) |
dev | 360 | kernel/blk_drv/scsi/sr.c | if (!scsi_CDs[dev].use) |
dev | 368 | kernel/blk_drv/scsi/sr.c | if (scsi_CDs[dev].device->changed) |
dev | 422 | kernel/blk_drv/scsi/sr.c | this_count_max = (scsi_CDs[dev].ten ? 0xffff : 0xff) << 4; |
dev | 550 | kernel/blk_drv/scsi/sr.c | if (scsi_CDs[dev].sector_size == 2048) |
dev | 557 | kernel/blk_drv/scsi/sr.c | if (scsi_CDs[dev].sector_size == 512) realcount = realcount << 2; |
dev | 559 | kernel/blk_drv/scsi/sr.c | if (((realcount > 0xff) || (block > 0x1fffff)) && scsi_CDs[dev].ten) |
dev | 564 | kernel/blk_drv/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 581 | kernel/blk_drv/scsi/sr.c | this_count = realcount * (scsi_CDs[dev].sector_size >> 9); |
dev | 597 | kernel/blk_drv/scsi/sr.c | realcount * scsi_CDs[dev].sector_size, |
dev | 618 | kernel/blk_drv/scsi/sr.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 655 | kernel/blk_drv/scsi/sr.c | SCpnt->request.dev = 0xffff; /* Mark as really busy */ |
dev | 663 | kernel/blk_drv/scsi/sr.c | while(SCpnt->request.dev != 0xfffe); |
dev | 665 | kernel/blk_drv/scsi/sr.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 668 | kernel/blk_drv/scsi/sr.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 676 | kernel/blk_drv/scsi/sr.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 18 | kernel/blk_drv/scsi/sr_ioctl.c | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); |
dev | 26 | kernel/blk_drv/scsi/sr_ioctl.c | req->dev = 0xfffe; /* Busy, but indicate request done */ |
dev | 51 | kernel/blk_drv/scsi/sr_ioctl.c | if (SCpnt->request.dev != 0xfffe){ |
dev | 54 | kernel/blk_drv/scsi/sr_ioctl.c | while (SCpnt->request.dev != 0xfffe) schedule(); |
dev | 86 | kernel/blk_drv/scsi/sr_ioctl.c | SCpnt->request.dev = -1; /* Deallocate */ |
dev | 96 | kernel/blk_drv/scsi/sr_ioctl.c | int dev = inode->i_rdev; |
dev | 99 | kernel/blk_drv/scsi/sr_ioctl.c | target = MINOR(dev); |
dev | 351 | kernel/blk_drv/scsi/sr_ioctl.c | RO_IOCTLS(dev,arg); |
dev | 96 | kernel/blk_drv/scsi/st.c | if ((st_nbr = SCpnt->request.dev) < NR_ST && st_nbr >= 0) { |
dev | 104 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; |
dev | 106 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = 0xffff; |
dev | 120 | kernel/blk_drv/scsi/st.c | static void decode_sns(int dev, char *sense_buffer) |
dev | 133 | kernel/blk_drv/scsi/st.c | printk( "st%d: sense key %s\n", dev, snstext[sense_buffer[2] & 0x0f]); |
dev | 136 | kernel/blk_drv/scsi/st.c | printk("st%d: old sense key %s\n", dev, snstext[sense_buffer[0] & 0x0f]); |
dev | 138 | kernel/blk_drv/scsi/st.c | printk("st%d: sns = %2x %2x\n", dev, sense_buffer[0], sense_buffer[2]); |
dev | 147 | kernel/blk_drv/scsi/st.c | static int st_chk_result(int dev, int result, char *sense) |
dev | 152 | kernel/blk_drv/scsi/st.c | printk("st%d: Error: %x\n", dev, result); |
dev | 153 | kernel/blk_drv/scsi/st.c | decode_sns(dev, sense); |
dev | 164 | kernel/blk_drv/scsi/st.c | static void write_behind_check(int dev) |
dev | 167 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result < 0) { |
dev | 168 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
dev | 169 | kernel/blk_drv/scsi/st.c | sleep_on( &scsi_tapes[dev].waiting ); |
dev | 170 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (- scsi_tapes[dev].buffer->writing); |
dev | 174 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing < scsi_tapes[dev].buffer->buffer_bytes) |
dev | 175 | kernel/blk_drv/scsi/st.c | memcpy(scsi_tapes[dev].buffer->b_data, |
dev | 176 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data + scsi_tapes[dev].buffer->writing, |
dev | 177 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes - |
dev | 178 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing); |
dev | 179 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= scsi_tapes[dev].buffer->writing; |
dev | 180 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = 0; |
dev | 188 | kernel/blk_drv/scsi/st.c | static int flush_write_buffer(int dev) |
dev | 196 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
dev | 197 | kernel/blk_drv/scsi/st.c | write_behind_check(dev); |
dev | 198 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
dev | 200 | kernel/blk_drv/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 201 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
dev | 209 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].dirty==1) { |
dev | 210 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 212 | kernel/blk_drv/scsi/st.c | offset = scsi_tapes[dev].buffer->buffer_bytes; |
dev | 213 | kernel/blk_drv/scsi/st.c | transfer = ((offset + scsi_tapes[dev].block_size - 1) / |
dev | 214 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
dev | 216 | kernel/blk_drv/scsi/st.c | printk("st%d: Flushing %d bytes.\n", dev, transfer); |
dev | 218 | kernel/blk_drv/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data + offset, 0, transfer - offset); |
dev | 224 | kernel/blk_drv/scsi/st.c | blks = transfer / scsi_tapes[dev].block_size; |
dev | 228 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 230 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, transfer, |
dev | 233 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 236 | kernel/blk_drv/scsi/st.c | printk("st%d: Error on flush:\n", dev); |
dev | 238 | kernel/blk_drv/scsi/st.c | st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 243 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 244 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 246 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 257 | kernel/blk_drv/scsi/st.c | int dev; |
dev | 260 | kernel/blk_drv/scsi/st.c | dev = inode->i_rdev & 127; |
dev | 262 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 2) /* Writing */ |
dev | 263 | kernel/blk_drv/scsi/st.c | return flush_write_buffer(dev); |
dev | 265 | kernel/blk_drv/scsi/st.c | backspace = (scsi_tapes[dev].buffer->buffer_bytes + |
dev | 266 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer) / scsi_tapes[dev].block_size - |
dev | 267 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->read_pointer + scsi_tapes[dev].block_size - 1) / |
dev | 268 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 269 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 270 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 275 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 276 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 287 | kernel/blk_drv/scsi/st.c | int dev; |
dev | 293 | kernel/blk_drv/scsi/st.c | dev = inode->i_rdev & 127; |
dev | 294 | kernel/blk_drv/scsi/st.c | if (dev >= NR_ST) |
dev | 296 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].in_use) { |
dev | 297 | kernel/blk_drv/scsi/st.c | printk("st%d: Device already in use.\n", dev); |
dev | 306 | kernel/blk_drv/scsi/st.c | printk("st%d: No free buffers.\n", dev); |
dev | 311 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer = st_buffers[i]; |
dev | 312 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 1; |
dev | 315 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].write_prot = ((flags & O_ACCMODE) == O_RDONLY); |
dev | 317 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 318 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 0; |
dev | 319 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 320 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 322 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 324 | kernel/blk_drv/scsi/st.c | printk("st%d: Tape request not allocated", dev); |
dev | 331 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 333 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 336 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 341 | kernel/blk_drv/scsi/st.c | decode_sns(dev, SCpnt->sense_buffer); |
dev | 346 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 348 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 351 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 356 | kernel/blk_drv/scsi/st.c | decode_sns(dev, SCpnt->sense_buffer); |
dev | 360 | kernel/blk_drv/scsi/st.c | printk("st%d: No tape.\n", dev); |
dev | 362 | kernel/blk_drv/scsi/st.c | printk("st%d: Error %x.\n", dev, SCpnt->result); |
dev | 363 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 364 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 365 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 372 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 374 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 377 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 380 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].max_block = (scsi_tapes[dev].buffer->b_data[1] << 16) | |
dev | 381 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->b_data[2] << 8) | scsi_tapes[dev].buffer->b_data[3]; |
dev | 382 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].min_block = (scsi_tapes[dev].buffer->b_data[4] << 8) | |
dev | 383 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[5]; |
dev | 385 | kernel/blk_drv/scsi/st.c | printk("st%d: Block limits %d - %d bytes.\n", dev, scsi_tapes[dev].min_block, |
dev | 386 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].max_block); |
dev | 390 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].min_block = scsi_tapes[dev].max_block = (-1); |
dev | 392 | kernel/blk_drv/scsi/st.c | printk("st%d: Can't read block limits.\n", dev); |
dev | 400 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 402 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 405 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 407 | kernel/blk_drv/scsi/st.c | i = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 410 | kernel/blk_drv/scsi/st.c | printk("st%d: No Mode Sense.\n", dev); |
dev | 412 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = |
dev | 413 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 0; |
dev | 415 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 418 | kernel/blk_drv/scsi/st.c | printk("st%d: Mode sense. Length %d, medium %x, WBS %x, BLL %d\n", dev, |
dev | 419 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[0], scsi_tapes[dev].buffer->b_data[1], |
dev | 420 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2], scsi_tapes[dev].buffer->b_data[3]); |
dev | 423 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[3] >= 8) { |
dev | 424 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = scsi_tapes[dev].buffer->b_data[9] * 65536 + |
dev | 425 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + scsi_tapes[dev].buffer->b_data[11]; |
dev | 427 | kernel/blk_drv/scsi/st.c | printk("st%d: Density %x, tape length: %x, blocksize: %d\n", dev, |
dev | 428 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4], scsi_tapes[dev].buffer->b_data[5] * |
dev | 429 | kernel/blk_drv/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[6] * 256 + |
dev | 430 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[7], scsi_tapes[dev].buffer->b_data[9] * |
dev | 431 | kernel/blk_drv/scsi/st.c | 65536 + scsi_tapes[dev].buffer->b_data[10] * 256 + |
dev | 432 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11]); |
dev | 434 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].block_size > ST_BUFFER_SIZE) { |
dev | 435 | kernel/blk_drv/scsi/st.c | printk("st%d: Blocksize %d too large for buffer.\n", dev, |
dev | 436 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size); |
dev | 437 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 438 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 442 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].block_size == 0) { |
dev | 443 | kernel/blk_drv/scsi/st.c | printk("st%d: Fixing block size to 512 bytes.\n", dev); |
dev | 445 | kernel/blk_drv/scsi/st.c | printk("st%d: Can't set fixed block size.\n", dev); |
dev | 446 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 447 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 450 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = ST_BLOCK_SIZE; |
dev | 454 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = ST_BLOCK_SIZE; |
dev | 456 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
dev | 457 | kernel/blk_drv/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
dev | 458 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
dev | 459 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
dev | 460 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 463 | kernel/blk_drv/scsi/st.c | printk("st%d: Block size: %d, buffer size: %d (%d blocks).\n", dev, |
dev | 464 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size, scsi_tapes[dev].buffer->buffer_size, |
dev | 465 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks); |
dev | 468 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->b_data[2] & 0x80) { |
dev | 469 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].write_prot = 1; |
dev | 471 | kernel/blk_drv/scsi/st.c | printk( "st%d: Write protected\n", dev); |
dev | 482 | kernel/blk_drv/scsi/st.c | int dev; |
dev | 488 | kernel/blk_drv/scsi/st.c | dev = inode->i_rdev; |
dev | 489 | kernel/blk_drv/scsi/st.c | rewind = (dev & 0x80) == 0; |
dev | 490 | kernel/blk_drv/scsi/st.c | dev = dev & 127; |
dev | 492 | kernel/blk_drv/scsi/st.c | if ( scsi_tapes[dev].rw == 2) { |
dev | 494 | kernel/blk_drv/scsi/st.c | result = flush_write_buffer(dev); |
dev | 497 | kernel/blk_drv/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
dev | 501 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 507 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 509 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 512 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 515 | kernel/blk_drv/scsi/st.c | printk("st%d: Error on write filemark:\n", dev); |
dev | 517 | kernel/blk_drv/scsi/st.c | st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 520 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 524 | kernel/blk_drv/scsi/st.c | printk("st%d: Buffer flushed, EOF written\n", dev); |
dev | 528 | kernel/blk_drv/scsi/st.c | if ((scsi_tapes[dev].eof == 1) && !scsi_tapes[dev].eof_hit) |
dev | 538 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->in_use = 0; |
dev | 539 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].in_use = 0; |
dev | 548 | kernel/blk_drv/scsi/st.c | int dev; |
dev | 554 | kernel/blk_drv/scsi/st.c | dev = inode->i_rdev & 127; |
dev | 556 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 557 | kernel/blk_drv/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 562 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 565 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 1) { |
dev | 569 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 2; |
dev | 573 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->writing) { |
dev | 574 | kernel/blk_drv/scsi/st.c | write_behind_check(dev); |
dev | 575 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->last_result) { |
dev | 577 | kernel/blk_drv/scsi/st.c | printk("st%d: Async write error %x.\n", dev, |
dev | 578 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->last_result); |
dev | 589 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 597 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 2; |
dev | 600 | kernel/blk_drv/scsi/st.c | while((scsi_tapes[dev].buffer->buffer_bytes + count) >= |
dev | 601 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size) { |
dev | 602 | kernel/blk_drv/scsi/st.c | do_count = scsi_tapes[dev].buffer->buffer_size - |
dev | 603 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes; |
dev | 604 | kernel/blk_drv/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
dev | 605 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes,b_point,do_count); |
dev | 607 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
dev | 612 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 614 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 615 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
dev | 618 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 622 | kernel/blk_drv/scsi/st.c | printk("st%d: Error on write:\n", dev); |
dev | 623 | kernel/blk_drv/scsi/st.c | st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 630 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 639 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = 0; |
dev | 640 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 643 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 1; |
dev | 644 | kernel/blk_drv/scsi/st.c | memcpy_fromfs(scsi_tapes[dev].buffer->b_data + |
dev | 645 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes,b_point,count); |
dev | 647 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes += count; |
dev | 651 | kernel/blk_drv/scsi/st.c | do_count = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 653 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; |
dev | 658 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes >= ST_WRITE_THRESHOLD) { |
dev | 660 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing = (scsi_tapes[dev].buffer->buffer_bytes / |
dev | 661 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size) * scsi_tapes[dev].block_size; |
dev | 662 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].dirty = 0; |
dev | 664 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->writing / scsi_tapes[dev].block_size; |
dev | 668 | kernel/blk_drv/scsi/st.c | SCpnt->result = scsi_tapes[dev].buffer->last_result = -1; |
dev | 670 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 672 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 673 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->writing, |
dev | 678 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 687 | kernel/blk_drv/scsi/st.c | int dev; |
dev | 693 | kernel/blk_drv/scsi/st.c | dev = inode->i_rdev & 127; |
dev | 695 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 696 | kernel/blk_drv/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 701 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].rw == 2) { |
dev | 705 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 1; |
dev | 709 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].eof) |
dev | 710 | kernel/blk_drv/scsi/st.c | printk("st%d: EOF flag up. Bytes %d\n", dev, |
dev | 711 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes); |
dev | 713 | kernel/blk_drv/scsi/st.c | if ((scsi_tapes[dev].buffer->buffer_bytes == 0) && |
dev | 714 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof == 2) /* EOM or Blank Check */ |
dev | 717 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].rw = 1; |
dev | 719 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 723 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes == 0 && |
dev | 724 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof == 0) { |
dev | 729 | kernel/blk_drv/scsi/st.c | blks = scsi_tapes[dev].buffer->buffer_blocks; |
dev | 735 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 737 | kernel/blk_drv/scsi/st.c | (void *) cmd, scsi_tapes[dev].buffer->b_data, |
dev | 738 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size, |
dev | 741 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 743 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 744 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 748 | kernel/blk_drv/scsi/st.c | printk("st%d: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n", dev, |
dev | 762 | kernel/blk_drv/scsi/st.c | printk("st%d: Incorrect block size.\n", dev); |
dev | 763 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 767 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 2; /* What should be done at EOM ? */ |
dev | 768 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 769 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
dev | 770 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 772 | kernel/blk_drv/scsi/st.c | printk("st%d: EOM detected (%d blocks read).\n", dev, |
dev | 773 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks - transfer); |
dev | 777 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 1; |
dev | 778 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 779 | kernel/blk_drv/scsi/st.c | (scsi_tapes[dev].buffer->buffer_blocks - transfer) * |
dev | 780 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size; |
dev | 783 | kernel/blk_drv/scsi/st.c | dev, scsi_tapes[dev].buffer->buffer_blocks - transfer, total); |
dev | 789 | kernel/blk_drv/scsi/st.c | printk("st%d: Tape error. Sense key %x\n", dev, |
dev | 791 | kernel/blk_drv/scsi/st.c | decode_sns(dev, SCpnt->sense_buffer); |
dev | 793 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; |
dev | 801 | kernel/blk_drv/scsi/st.c | transfer = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 802 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 807 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 808 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size; |
dev | 812 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].buffer->buffer_bytes > 0) { |
dev | 814 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].eof) |
dev | 815 | kernel/blk_drv/scsi/st.c | printk("st%d: EOF up. Left %d, needed %d.\n", dev, |
dev | 816 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes, count - total); |
dev | 818 | kernel/blk_drv/scsi/st.c | transfer = scsi_tapes[dev].buffer->buffer_bytes < count - total ? |
dev | 819 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes : count - total; |
dev | 820 | kernel/blk_drv/scsi/st.c | memcpy_tofs(buf, scsi_tapes[dev].buffer->b_data + |
dev | 821 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer,transfer); |
dev | 825 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes -= transfer; |
dev | 826 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer += transfer; |
dev | 828 | kernel/blk_drv/scsi/st.c | else if (scsi_tapes[dev].eof) { |
dev | 829 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 1; |
dev | 830 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 831 | kernel/blk_drv/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 1) |
dev | 832 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 833 | kernel/blk_drv/scsi/st.c | if (total == 0 && scsi_tapes[dev].eof == 2) |
dev | 840 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 850 | kernel/blk_drv/scsi/st.c | int dev = inode->i_rdev; |
dev | 857 | kernel/blk_drv/scsi/st.c | dev = dev & 127; |
dev | 869 | kernel/blk_drv/scsi/st.c | printk("st%d: Spacing tape forward %d files.\n", dev, |
dev | 885 | kernel/blk_drv/scsi/st.c | printk("st%d: Spacing tape backward %d files.\n", dev, (-ltmp)); |
dev | 895 | kernel/blk_drv/scsi/st.c | printk("st%d: Spacing tape forward %d blocks.\n", dev, |
dev | 910 | kernel/blk_drv/scsi/st.c | printk("st%d: Spacing tape backward %d blocks.\n", dev, (-ltmp)); |
dev | 914 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 922 | kernel/blk_drv/scsi/st.c | printk("st%d: Writing %d filemarks.\n", dev, |
dev | 933 | kernel/blk_drv/scsi/st.c | printk("st%d: Rewinding tape.\n", dev); |
dev | 943 | kernel/blk_drv/scsi/st.c | printk("st%d: Unloading tape.\n", dev); |
dev | 948 | kernel/blk_drv/scsi/st.c | printk("st%d: No op on tape.\n", dev); |
dev | 960 | kernel/blk_drv/scsi/st.c | printk("st%d: Retensioning tape.\n", dev); |
dev | 967 | kernel/blk_drv/scsi/st.c | printk("st%d: Spacing to end of recorded medium.\n", dev); |
dev | 971 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].write_prot) |
dev | 976 | kernel/blk_drv/scsi/st.c | printk("st%d: Erasing tape.\n", dev); |
dev | 980 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
dev | 1000 | kernel/blk_drv/scsi/st.c | printk("st%d: Seeking tape to block %d.\n", dev, arg); |
dev | 1005 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].dirty || scsi_tapes[dev].buffer->buffer_bytes != 0) |
dev | 1008 | kernel/blk_drv/scsi/st.c | (arg < scsi_tapes[dev].min_block || arg > scsi_tapes[dev].max_block || |
dev | 1010 | kernel/blk_drv/scsi/st.c | printk("st%d: Illegal block size.\n", dev); |
dev | 1016 | kernel/blk_drv/scsi/st.c | memset(scsi_tapes[dev].buffer->b_data, 0, 12); |
dev | 1017 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[2] = 0x10; /* buffered mode */ |
dev | 1018 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[3] = 8; /* block descriptor length */ |
dev | 1022 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4] = arg; |
dev | 1023 | kernel/blk_drv/scsi/st.c | ltmp = scsi_tapes[dev].block_size; |
dev | 1025 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] = (ltmp >> 16); |
dev | 1026 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] = (ltmp >> 8); |
dev | 1027 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11] = ltmp; |
dev | 1031 | kernel/blk_drv/scsi/st.c | printk("st%d: Setting block size to %d bytes.\n", dev, |
dev | 1032 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[9] * 65536 + |
dev | 1033 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[10] * 256 + |
dev | 1034 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[11]); |
dev | 1036 | kernel/blk_drv/scsi/st.c | printk("st%d: Setting density code to %x.\n", dev, |
dev | 1037 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->b_data[4]); |
dev | 1041 | kernel/blk_drv/scsi/st.c | printk("st%d: Unknown st_ioctl command %x.\n", dev, cmd_in); |
dev | 1045 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 1047 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1049 | kernel/blk_drv/scsi/st.c | (void *) cmd, (void *) scsi_tapes[dev].buffer->b_data, ST_BLOCK_SIZE, |
dev | 1052 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 1054 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1056 | kernel/blk_drv/scsi/st.c | ioctl_result = st_chk_result(dev, SCpnt->result, SCpnt->sense_buffer); |
dev | 1064 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].block_size = arg; |
dev | 1065 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks = |
dev | 1066 | kernel/blk_drv/scsi/st.c | ST_BUFFER_SIZE / scsi_tapes[dev].block_size; |
dev | 1067 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_size = |
dev | 1068 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_blocks * scsi_tapes[dev].block_size; |
dev | 1069 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->buffer_bytes = |
dev | 1070 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].buffer->read_pointer = 0; |
dev | 1073 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 2; |
dev | 1074 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 1077 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof = 0; |
dev | 1078 | kernel/blk_drv/scsi/st.c | scsi_tapes[dev].eof_hit = 0; |
dev | 1091 | kernel/blk_drv/scsi/st.c | int dev = inode->i_rdev; |
dev | 1098 | kernel/blk_drv/scsi/st.c | dev = dev & 127; |
dev | 1100 | kernel/blk_drv/scsi/st.c | if (!scsi_tapes[dev].in_use) { |
dev | 1101 | kernel/blk_drv/scsi/st.c | printk("st%d: Incorrect device.\n", dev); |
dev | 1134 | kernel/blk_drv/scsi/st.c | memcpy_tofs((char *)arg, (char *)scsi_tapes[dev].buffer->mt_status, |
dev | 1140 | kernel/blk_drv/scsi/st.c | printk("st%d: get tape position.\n", dev); |
dev | 1153 | kernel/blk_drv/scsi/st.c | SCpnt = allocate_device(NULL, scsi_tapes[dev].device->index, 1); |
dev | 1157 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) { |
dev | 1165 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = dev; |
dev | 1168 | kernel/blk_drv/scsi/st.c | (void *) scmd, (void *) scsi_tapes[dev].buffer->b_data, |
dev | 1171 | kernel/blk_drv/scsi/st.c | if (SCpnt->request.dev == dev) sleep_on( &scsi_tapes[dev].waiting ); |
dev | 1176 | kernel/blk_drv/scsi/st.c | printk("st%d: Can't read tape position.\n", dev); |
dev | 1182 | kernel/blk_drv/scsi/st.c | if (scsi_tapes[dev].device->scsi_level < SCSI_2) |
dev | 1183 | kernel/blk_drv/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[0] << 16) |
dev | 1184 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[1] << 8) |
dev | 1185 | kernel/blk_drv/scsi/st.c | + scsi_tapes[dev].buffer->b_data[2]; |
dev | 1187 | kernel/blk_drv/scsi/st.c | mt_pos.mt_blkno = (scsi_tapes[dev].buffer->b_data[4] << 24) |
dev | 1188 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[5] << 16) |
dev | 1189 | kernel/blk_drv/scsi/st.c | + (scsi_tapes[dev].buffer->b_data[6] << 8) |
dev | 1190 | kernel/blk_drv/scsi/st.c | + scsi_tapes[dev].buffer->b_data[7]; |
dev | 1194 | kernel/blk_drv/scsi/st.c | SCpnt->request.dev = -1; /* Mark as not busy */ |
dev | 1200 | kernel/blk_drv/scsi/st.c | return scsi_ioctl(scsi_tapes[dev].device, cmd_in, (void *) arg); |
dev | 494 | kernel/blk_drv/scsi/ultrastor.c | int ultrastor_biosparam(int size, int dev, int *info) |
dev | 600 | kernel/blk_drv/scsi/wd7000.c | int wd7000_biosparam(int size, int dev, int* info) |
dev | 152 | kernel/blk_drv/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 154 | kernel/blk_drv/xd.c | if (dev < xd_drives) { |
dev | 155 | kernel/blk_drv/xd.c | while (!xd_valid[dev]) |
dev | 158 | kernel/blk_drv/xd.c | xd_access[dev]++; |
dev | 176 | kernel/blk_drv/xd.c | if (CURRENT_DEV < xd_drives && CURRENT->sector + CURRENT->nr_sectors <= xd[MINOR(CURRENT->dev)].nr_sects) { |
dev | 177 | kernel/blk_drv/xd.c | block = CURRENT->sector + xd[MINOR(CURRENT->dev)].start_sect; |
dev | 196 | kernel/blk_drv/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)),err; |
dev | 198 | kernel/blk_drv/xd.c | if (inode && (dev < xd_drives)) |
dev | 203 | kernel/blk_drv/xd.c | put_fs_byte(xd_info[dev].heads,(char *) &geometry->heads); |
dev | 204 | kernel/blk_drv/xd.c | put_fs_byte(xd_info[dev].sectors,(char *) &geometry->sectors); |
dev | 205 | kernel/blk_drv/xd.c | put_fs_word(xd_info[dev].cylinders,(short *) &geometry->cylinders); |
dev | 228 | kernel/blk_drv/xd.c | int dev = DEVICE_NR(MINOR(inode->i_rdev)); |
dev | 230 | kernel/blk_drv/xd.c | if (dev < xd_drives) { |
dev | 231 | kernel/blk_drv/xd.c | sync_dev(dev); |
dev | 232 | kernel/blk_drv/xd.c | xd_access[dev]--; |
dev | 239 | kernel/blk_drv/xd.c | static int xd_reread_partitions(int dev) |
dev | 241 | kernel/blk_drv/xd.c | int target = DEVICE_NR(MINOR(dev)),start = target << xd_gendisk.minor_shift,partition; |
dev | 235 | kernel/chr_drv/tty_io.c | int dev; |
dev | 239 | kernel/chr_drv/tty_io.c | dev = 0x0400 + tty->line; |
dev | 244 | kernel/chr_drv/tty_io.c | if (filp->f_rdev != dev) |
dev | 922 | kernel/chr_drv/tty_io.c | int i, dev; |
dev | 925 | kernel/chr_drv/tty_io.c | dev = file->f_rdev; |
dev | 926 | kernel/chr_drv/tty_io.c | if (MAJOR(dev) != 4) { |
dev | 927 | kernel/chr_drv/tty_io.c | printk("tty_read: bad pseudo-major nr #%d\n", MAJOR(dev)); |
dev | 930 | kernel/chr_drv/tty_io.c | dev = MINOR(dev); |
dev | 931 | kernel/chr_drv/tty_io.c | tty = TTY_TABLE(dev); |
dev | 936 | kernel/chr_drv/tty_io.c | (current->tty == dev) && |
dev | 955 | kernel/chr_drv/tty_io.c | int dev, i, is_console; |
dev | 958 | kernel/chr_drv/tty_io.c | dev = file->f_rdev; |
dev | 960 | kernel/chr_drv/tty_io.c | if (MAJOR(dev) != 4) { |
dev | 964 | kernel/chr_drv/tty_io.c | dev = MINOR(dev); |
dev | 968 | kernel/chr_drv/tty_io.c | tty = TTY_TABLE(dev); |
dev | 972 | kernel/chr_drv/tty_io.c | (current->tty == dev) && (tty->pgrp != current->pgrp)) { |
dev | 994 | kernel/chr_drv/tty_io.c | static int init_dev(int dev) |
dev | 1001 | kernel/chr_drv/tty_io.c | o_dev = PTY_OTHER(dev); |
dev | 1006 | kernel/chr_drv/tty_io.c | if (IS_A_PTY_MASTER(dev) && tty_table[dev] && tty_table[dev]->count) |
dev | 1009 | kernel/chr_drv/tty_io.c | if (!tty_table[dev] && !tty) { |
dev | 1013 | kernel/chr_drv/tty_io.c | initialize_tty_struct(dev, tty); |
dev | 1016 | kernel/chr_drv/tty_io.c | if (!tty_termios[dev] && !tp) { |
dev | 1020 | kernel/chr_drv/tty_io.c | initialize_termios(dev, tp); |
dev | 1023 | kernel/chr_drv/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1040 | kernel/chr_drv/tty_io.c | if (!tty_termios[dev]) { |
dev | 1041 | kernel/chr_drv/tty_io.c | tty_termios[dev] = tp; |
dev | 1044 | kernel/chr_drv/tty_io.c | if (!tty_table[dev]) { |
dev | 1045 | kernel/chr_drv/tty_io.c | tty->termios = tty_termios[dev]; |
dev | 1046 | kernel/chr_drv/tty_io.c | tty_table[dev] = tty; |
dev | 1049 | kernel/chr_drv/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1059 | kernel/chr_drv/tty_io.c | tty_table[dev]->link = tty_table[o_dev]; |
dev | 1060 | kernel/chr_drv/tty_io.c | tty_table[o_dev]->link = tty_table[dev]; |
dev | 1062 | kernel/chr_drv/tty_io.c | tty_table[dev]->count++; |
dev | 1063 | kernel/chr_drv/tty_io.c | if (IS_A_PTY_MASTER(dev)) |
dev | 1083 | kernel/chr_drv/tty_io.c | static void release_dev(int dev, struct file * filp) |
dev | 1089 | kernel/chr_drv/tty_io.c | tty = tty_table[dev]; |
dev | 1090 | kernel/chr_drv/tty_io.c | tp = tty_termios[dev]; |
dev | 1094 | kernel/chr_drv/tty_io.c | printk("release_dev: tty_table[%d] was NULL\n", dev); |
dev | 1098 | kernel/chr_drv/tty_io.c | printk("release_dev: tty_termios[%d] was NULL\n", dev); |
dev | 1101 | kernel/chr_drv/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1102 | kernel/chr_drv/tty_io.c | o_tty = tty_table[PTY_OTHER(dev)]; |
dev | 1103 | kernel/chr_drv/tty_io.c | o_tp = tty_termios[PTY_OTHER(dev)]; |
dev | 1105 | kernel/chr_drv/tty_io.c | printk("release_dev: pty pair(%d) was NULL\n", dev); |
dev | 1109 | kernel/chr_drv/tty_io.c | printk("release_dev: pty pair(%d) termios was NULL\n", dev); |
dev | 1120 | kernel/chr_drv/tty_io.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 1123 | kernel/chr_drv/tty_io.c | dev, tty->count); |
dev | 1129 | kernel/chr_drv/tty_io.c | dev, tty->count); |
dev | 1151 | kernel/chr_drv/tty_io.c | tty_table[PTY_OTHER(dev)] = NULL; |
dev | 1152 | kernel/chr_drv/tty_io.c | tty_termios[PTY_OTHER(dev)] = NULL; |
dev | 1155 | kernel/chr_drv/tty_io.c | tty_table[dev] = NULL; |
dev | 1156 | kernel/chr_drv/tty_io.c | if (IS_A_PTY(dev)) { |
dev | 1157 | kernel/chr_drv/tty_io.c | tty_termios[dev] = NULL; |
dev | 1254 | kernel/chr_drv/tty_io.c | int dev; |
dev | 1256 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
dev | 1257 | kernel/chr_drv/tty_io.c | if (MAJOR(dev) != 4) { |
dev | 1261 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1262 | kernel/chr_drv/tty_io.c | if (!dev) { |
dev | 1266 | kernel/chr_drv/tty_io.c | release_dev(dev, filp); |
dev | 1271 | kernel/chr_drv/tty_io.c | int dev; |
dev | 1274 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
dev | 1275 | kernel/chr_drv/tty_io.c | if (MAJOR(dev) != 4) { |
dev | 1279 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
dev | 1280 | kernel/chr_drv/tty_io.c | tty = TTY_TABLE(dev); |
dev | 1282 | kernel/chr_drv/tty_io.c | printk("tty_select: tty struct for dev %d was NULL\n", dev); |
dev | 310 | kernel/chr_drv/tty_ioctl.c | int dev; |
dev | 318 | kernel/chr_drv/tty_ioctl.c | dev = MINOR(file->f_rdev); |
dev | 319 | kernel/chr_drv/tty_ioctl.c | tty = TTY_TABLE(dev); |
dev | 322 | kernel/chr_drv/tty_ioctl.c | if (IS_A_PTY(dev)) |
dev | 323 | kernel/chr_drv/tty_ioctl.c | other_tty = tty_table[PTY_OTHER(dev)]; |
dev | 327 | kernel/chr_drv/tty_ioctl.c | termios_dev = dev; |
dev | 328 | kernel/chr_drv/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) { |
dev | 330 | kernel/chr_drv/tty_ioctl.c | termios_dev = PTY_OTHER(dev); |
dev | 393 | kernel/chr_drv/tty_ioctl.c | current->tty = dev; |
dev | 437 | kernel/chr_drv/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 455 | kernel/chr_drv/tty_ioctl.c | if (IS_A_CONSOLE(dev)) { |
dev | 465 | kernel/chr_drv/tty_ioctl.c | if (IS_A_PTY_MASTER(dev)) |
dev | 467 | kernel/chr_drv/tty_ioctl.c | else if (IS_A_PTY_SLAVE(dev)) |
dev | 501 | kernel/chr_drv/tty_ioctl.c | if (!IS_A_PTY_MASTER(dev)) |
dev | 36 | net/tcp/Space.c | extern int loopback_init(struct device *dev); |
dev | 125 | net/tcp/arp.c | if (!skb->dev->rebuild_header (skb+1, skb->dev)) |
dev | 130 | net/tcp/arp.c | skb->dev->queue_xmit (skb, skb->dev, 0); |
dev | 242 | net/tcp/arp.c | arp_response (struct arp *arp1, struct device *dev) |
dev | 250 | net/tcp/arp.c | 2*arp1->hlen + 2*arp1->plen + dev->hard_header_len, |
dev | 257 | net/tcp/arp.c | 2*arp1->plen + dev->hard_header_len; |
dev | 259 | net/tcp/arp.c | 2*arp1->plen + dev->hard_header_len; |
dev | 261 | net/tcp/arp.c | tmp = dev->hard_header((unsigned char *)(skb+1), dev, |
dev | 272 | net/tcp/arp.c | memcpy(arp_sourceh(arp2), dev->dev_addr, arp1->hlen); |
dev | 285 | net/tcp/arp.c | dev->queue_xmit (skb, dev, 0); |
dev | 364 | net/tcp/arp.c | arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 375 | net/tcp/arp.c | if (arp->hlen != dev->addr_len || dev->type !=NET16( arp->hrd)) |
dev | 416 | net/tcp/arp.c | ret = arp_response(arp, dev); |
dev | 422 | net/tcp/arp.c | arp_snd (unsigned long paddr, struct device *dev, unsigned long saddr) |
dev | 428 | net/tcp/arp.c | PRINTK (("arp_snd (paddr=%X, dev=%X, saddr=%X)\n",paddr, dev, saddr)); |
dev | 434 | net/tcp/arp.c | skb = arp_malloc (sizeof (*arp) + sizeof (*skb) + dev->hard_header_len + |
dev | 435 | net/tcp/arp.c | 2*dev->addr_len+8, GFP_ATOMIC); |
dev | 441 | net/tcp/arp.c | skb->mem_len = sizeof (*arp) + sizeof (*skb) + dev->hard_header_len + |
dev | 442 | net/tcp/arp.c | 2*dev->addr_len+8; |
dev | 444 | net/tcp/arp.c | skb->dev = dev; |
dev | 445 | net/tcp/arp.c | skb->len = sizeof (*arp) + dev->hard_header_len + 2*dev->addr_len+8; |
dev | 448 | net/tcp/arp.c | tmp = dev->hard_header ((unsigned char *)(skb+1), dev, |
dev | 457 | net/tcp/arp.c | arp->hrd = net16(dev->type); |
dev | 459 | net/tcp/arp.c | arp->hlen = dev->addr_len; |
dev | 464 | net/tcp/arp.c | memcpy (arp_sourceh(arp), dev->dev_addr, dev->addr_len); |
dev | 465 | net/tcp/arp.c | memcpy (arp_targeth(arp), dev->broadcast, dev->addr_len); |
dev | 468 | net/tcp/arp.c | dev->queue_xmit (skb, dev, 0); |
dev | 472 | net/tcp/arp.c | arp_find(unsigned char *haddr, unsigned long paddr, struct device *dev, |
dev | 477 | net/tcp/arp.c | haddr, paddr, dev, saddr)); |
dev | 480 | net/tcp/arp.c | memcpy (haddr, dev->dev_addr, dev->addr_len); |
dev | 493 | net/tcp/arp.c | memcpy (haddr, apt->hard, dev->addr_len); |
dev | 509 | net/tcp/arp.c | arp_snd(paddr,dev,saddr); |
dev | 515 | net/tcp/arp.c | arp_add (unsigned long addr, unsigned char *haddr, struct device *dev) |
dev | 523 | net/tcp/arp.c | memcpy (apt->hard, haddr , dev->addr_len); |
dev | 526 | net/tcp/arp.c | create_arp (addr, haddr, dev->addr_len); |
dev | 530 | net/tcp/arp.c | arp_add_broad (unsigned long addr, struct device *dev) |
dev | 532 | net/tcp/arp.c | arp_add (addr, dev->broadcast , dev); |
dev | 78 | net/tcp/arp.h | int arp_find (unsigned char *, unsigned long, struct device *dev, |
dev | 80 | net/tcp/arp.h | void arp_add_broad (unsigned long, struct device *dev); |
dev | 82 | net/tcp/arp.h | void arp_add (unsigned long addr, unsigned char *haddr, struct device *dev); |
dev | 157 | net/tcp/dev.c | struct device *dev; |
dev | 158 | net/tcp/dev.c | for (dev = dev_base; dev != NULL; dev=dev->next) |
dev | 160 | net/tcp/dev.c | if (strcmp (dev->name, name) == 0) return (dev); |
dev | 166 | net/tcp/dev.c | dev_queue_xmit (struct sk_buff *skb, struct device *dev, int pri) |
dev | 172 | net/tcp/dev.c | PRINTK (("dev_queue_xmit (skb=%X, dev=%X, pri = %d)\n", skb, dev, pri)); |
dev | 174 | net/tcp/dev.c | if (dev == NULL) |
dev | 180 | net/tcp/dev.c | skb->dev = dev; |
dev | 184 | net/tcp/dev.c | dev->hard_start_xmit (NULL, dev); |
dev | 200 | net/tcp/dev.c | if (dev->hard_start_xmit(skb, dev) == 0) |
dev | 206 | net/tcp/dev.c | PRINTK (("dev_queue_xmit dev->buffs[%d]=%X\n",pri, dev->buffs[pri])); |
dev | 209 | net/tcp/dev.c | if (dev->buffs[pri] == NULL) |
dev | 211 | net/tcp/dev.c | dev->buffs[pri]=skb; |
dev | 219 | net/tcp/dev.c | skb->next = (struct sk_buff *)dev->buffs[pri]; |
dev | 220 | net/tcp/dev.c | skb->prev = (struct sk_buff *)dev->buffs[pri]->prev; |
dev | 223 | net/tcp/dev.c | dev->buffs[pri] = skb; |
dev | 227 | net/tcp/dev.c | skb2= (struct sk_buff *)dev->buffs[pri]; |
dev | 257 | net/tcp/dev.c | struct device * dev) |
dev | 263 | net/tcp/dev.c | if (dev == NULL || buff == NULL || len <= 0) return (1); |
dev | 285 | net/tcp/dev.c | amount = min (len, (unsigned long) dev->rmem_end - |
dev | 291 | net/tcp/dev.c | if ((unsigned long)buff == dev->rmem_end) |
dev | 292 | net/tcp/dev.c | buff = (unsigned char *)dev->rmem_start; |
dev | 297 | net/tcp/dev.c | skb->dev = dev; |
dev | 326 | net/tcp/dev.c | struct device *dev; |
dev | 328 | net/tcp/dev.c | for (dev = dev_base; dev != NULL; dev=dev->next) |
dev | 330 | net/tcp/dev.c | if (!dev->tbusy) |
dev | 332 | net/tcp/dev.c | dev_tint (dev); |
dev | 375 | net/tcp/dev.c | skb->h.raw = (unsigned char *)(skb+1) + skb->dev->hard_header_len; |
dev | 376 | net/tcp/dev.c | skb->len -= skb->dev->hard_header_len; |
dev | 379 | net/tcp/dev.c | type = skb->dev->type_trans ((struct sk_buff *)skb, skb->dev); |
dev | 407 | net/tcp/dev.c | ptype->func (skb2, skb->dev, ptype); |
dev | 432 | net/tcp/dev.c | dev_tint( struct device *dev) |
dev | 438 | net/tcp/dev.c | while (dev->buffs[i]!=NULL) |
dev | 441 | net/tcp/dev.c | skb=(struct sk_buff *)dev->buffs[i]; |
dev | 447 | net/tcp/dev.c | dev->buffs[i] = NULL; |
dev | 456 | net/tcp/dev.c | dev->buffs[i] = NULL; |
dev | 470 | net/tcp/dev.c | dev->buffs[i] = NULL; |
dev | 474 | net/tcp/dev.c | dev->buffs[i]= skb->next; |
dev | 483 | net/tcp/dev.c | dev->queue_xmit (skb, dev, -i-1); |
dev | 484 | net/tcp/dev.c | if (dev->tbusy) |
dev | 73 | net/tcp/dev.h | int (*init)(struct device *dev); |
dev | 77 | net/tcp/dev.h | int (*open)(struct device *dev); |
dev | 78 | net/tcp/dev.h | int (*stop)(struct device *dev); |
dev | 79 | net/tcp/dev.h | int (*hard_start_xmit) (struct sk_buff *skb, struct device *dev); |
dev | 80 | net/tcp/dev.h | int (*hard_header) (unsigned char *buff, struct device *dev, |
dev | 84 | net/tcp/dev.h | struct device *dev); |
dev | 85 | net/tcp/dev.h | void (*queue_xmit)(struct sk_buff *skb, struct device *dev, int pri); |
dev | 86 | net/tcp/dev.h | int (*rebuild_header)(void *eth, struct device *dev); |
dev | 87 | net/tcp/dev.h | unsigned short (*type_trans) (struct sk_buff *skb, struct device *dev); |
dev | 88 | net/tcp/dev.h | void (*send_packet)(struct sk_buff *skb, struct device *dev); /* no longer |
dev | 118 | net/tcp/dev.h | void dev_queue_xmit (struct sk_buff *skb, struct device *dev, int pri); |
dev | 119 | net/tcp/dev.h | int dev_rint (unsigned char *buff, long len, int flags, struct device *dev); |
dev | 120 | net/tcp/dev.h | void dev_tint ( struct device *dev); |
dev | 88 | net/tcp/eth.c | eth_hard_header (unsigned char *buff, struct device *dev, |
dev | 95 | net/tcp/eth.c | memcpy (eth->saddr, dev->dev_addr, dev->addr_len); |
dev | 98 | net/tcp/eth.c | memset (eth->daddr, 0xff, dev->addr_len); |
dev | 101 | net/tcp/eth.c | if (!arp_find (eth->daddr, daddr, dev, saddr)) |
dev | 113 | net/tcp/eth.c | eth_rebuild_header (void *buff, struct device *dev) |
dev | 117 | net/tcp/eth.c | if (arp_find(eth->daddr, *(unsigned long*)eth->daddr, dev, |
dev | 120 | net/tcp/eth.c | memcpy (eth->saddr, dev->dev_addr, dev->addr_len); |
dev | 125 | net/tcp/eth.c | eth_add_arp (unsigned long addr, struct sk_buff *skb, struct device *dev) |
dev | 129 | net/tcp/eth.c | arp_add (addr, eh->saddr, dev); |
dev | 133 | net/tcp/eth.c | eth_type_trans (struct sk_buff *skb, struct device *dev) |
dev | 94 | net/tcp/eth.h | int eth_hard_header (unsigned char *buff, struct device *dev, |
dev | 98 | net/tcp/eth.h | int eth_rebuild_header(void *eth, struct device *dev); |
dev | 100 | net/tcp/eth.h | struct device *dev); |
dev | 101 | net/tcp/eth.h | unsigned short eth_type_trans (struct sk_buff *skb, struct device *dev); |
dev | 120 | net/tcp/icmp.c | icmp_reply (struct sk_buff *skb_in, int type, int code, struct device *dev) |
dev | 129 | net/tcp/icmp.c | skb_in, type, code, dev)); |
dev | 135 | net/tcp/icmp.c | dev->hard_header_len; |
dev | 148 | net/tcp/icmp.c | iph = (struct ip_header *)((unsigned char *)iph + dev->hard_header_len); |
dev | 152 | net/tcp/icmp.c | &dev, IPPROTO_ICMP, NULL, len ); |
dev | 171 | net/tcp/icmp.c | ip_queue_xmit (NULL, dev, skb, 1); |
dev | 178 | net/tcp/icmp.c | icmp_rcv(struct sk_buff *skb1, struct device *dev, struct options *opt, |
dev | 267 | net/tcp/icmp.c | rt->dev = dev; |
dev | 280 | net/tcp/icmp.c | size = sizeof( struct sk_buff ) + dev->hard_header_len + 64 + len; |
dev | 294 | net/tcp/icmp.c | offset = ip_build_header( skb, daddr, saddr, &dev, IPPROTO_ICMP, opt, len ); |
dev | 321 | net/tcp/icmp.c | ip_queue_xmit( (volatile struct sock *)NULL, dev, skb, 1 ); |
dev | 71 | net/tcp/icmp.h | icmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 76 | net/tcp/icmp.h | icmp_reply (struct sk_buff *skb_in, int type, int code, struct device *dev); |
dev | 242 | net/tcp/ip.c | (long) rt, (long) rt->next, (long) rt->dev, |
dev | 243 | net/tcp/ip.c | rt->dev->name, in_ntoa(rt->net)); |
dev | 267 | net/tcp/ip.c | PRINTK (("IP: %X via %s (%X)\n", daddr, rt->dev->name, rt->router)); |
dev | 269 | net/tcp/ip.c | return (rt->dev); |
dev | 277 | net/tcp/ip.c | del_devroute (struct device *dev) |
dev | 283 | net/tcp/ip.c | (long) dev, dev->name)); |
dev | 288 | net/tcp/ip.c | (long) r, (long) r->next, (long) p, (long) r->dev, |
dev | 289 | net/tcp/ip.c | r->dev->name, in_ntoa(r->net))); |
dev | 290 | net/tcp/ip.c | if (r->dev == dev) |
dev | 382 | net/tcp/ip.c | struct device *dev; |
dev | 390 | net/tcp/ip.c | dev = get_dev (ipc.name); |
dev | 398 | net/tcp/ip.c | if (dev == NULL) return (-EINVAL); |
dev | 405 | net/tcp/ip.c | PRINTK (("new broadcast for %s: %08X\n", dev->name, ipc.net)); |
dev | 406 | net/tcp/ip.c | arp_add_broad (ipc.net, dev); |
dev | 410 | net/tcp/ip.c | rt->dev = dev; |
dev | 418 | net/tcp/ip.c | PRINTK (("new router for %s: %08X\n", dev->name, ipc.router)); |
dev | 422 | net/tcp/ip.c | rt->dev = dev; |
dev | 427 | net/tcp/ip.c | if (dev->loopback) |
dev | 433 | net/tcp/ip.c | rt->dev = dev; |
dev | 473 | net/tcp/ip.c | dev->up = ipc.up; |
dev | 474 | net/tcp/ip.c | if (dev->up) |
dev | 476 | net/tcp/ip.c | if (dev->open) |
dev | 477 | net/tcp/ip.c | dev->open(dev); |
dev | 481 | net/tcp/ip.c | if (dev->stop) |
dev | 482 | net/tcp/ip.c | dev->stop(dev); |
dev | 483 | net/tcp/ip.c | del_devroute(dev); /* clear routing table for dev */ |
dev | 515 | net/tcp/ip.c | unsigned long daddr, struct device **dev, int type, |
dev | 527 | net/tcp/ip.c | skb, saddr, daddr, *dev, type, opt, len)); |
dev | 530 | net/tcp/ip.c | if (*dev == NULL) |
dev | 532 | net/tcp/ip.c | *dev = ip_route(&optmem,daddr, &raddr); |
dev | 533 | net/tcp/ip.c | if (*dev == NULL) |
dev | 549 | net/tcp/ip.c | if ((*dev)->hard_header) |
dev | 551 | net/tcp/ip.c | tmp = (*dev)->hard_header(buff, *dev, ETHERTYPE_IP, raddr, saddr, len); |
dev | 568 | net/tcp/ip.c | skb->dev = *dev; |
dev | 811 | net/tcp/ip.c | ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 852 | net/tcp/ip.c | icmp_reply (skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 891 | net/tcp/ip.c | ipprot->handler (skb2, dev, &opt, iph->daddr, |
dev | 898 | net/tcp/ip.c | icmp_reply (skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, dev); |
dev | 914 | net/tcp/ip.c | ip_queue_xmit (volatile struct sock *sk, struct device *dev, |
dev | 921 | net/tcp/ip.c | if (dev == NULL) |
dev | 928 | net/tcp/ip.c | skb->dev = dev; |
dev | 932 | net/tcp/ip.c | ptr += dev->hard_header_len; |
dev | 934 | net/tcp/ip.c | iph->tot_len = net16(skb->len-dev->hard_header_len); |
dev | 967 | net/tcp/ip.c | if (dev->up) |
dev | 971 | net/tcp/ip.c | dev->queue_xmit(skb, dev, sk->priority); |
dev | 975 | net/tcp/ip.c | dev->queue_xmit (skb, dev, SOPRI_NORMAL); |
dev | 990 | net/tcp/ip.c | struct device *dev; |
dev | 996 | net/tcp/ip.c | dev = skb->dev; |
dev | 1001 | net/tcp/ip.c | if (dev->rebuild_header ((struct enet_header *)(skb+1),dev)) |
dev | 1011 | net/tcp/ip.c | if (dev->up) |
dev | 1013 | net/tcp/ip.c | dev->queue_xmit(skb, dev, sk->priority); |
dev | 1015 | net/tcp/ip.c | dev->queue_xmit(skb, dev, SOPRI_NORMAL ); |
dev | 52 | net/tcp/ip.h | struct device *dev; |
dev | 138 | net/tcp/ip.h | int (*handler) (struct sk_buff *skb, struct device *dev, |
dev | 176 | net/tcp/ip.h | unsigned long daddr, struct device **dev, int type, |
dev | 178 | net/tcp/ip.h | void ip_queue_xmit (volatile struct sock *sk, struct device *dev, |
dev | 181 | net/tcp/ip.h | int ip_rcv(struct sk_buff *buff, struct device *dev, struct packet_type *); |
dev | 86 | net/tcp/loopback.c | loopback_xmit(struct sk_buff *skb, struct device *dev) |
dev | 89 | net/tcp/loopback.c | if (!skb || !dev) return 0; |
dev | 90 | net/tcp/loopback.c | PRINTK (("loopback_xmit (dev = %X)\n", dev)); |
dev | 92 | net/tcp/loopback.c | if (dev->tbusy != 0) |
dev | 97 | net/tcp/loopback.c | dev->tbusy = 1; |
dev | 100 | net/tcp/loopback.c | done = dev_rint ((unsigned char *)(skb+1), skb->len, 0, dev); |
dev | 107 | net/tcp/loopback.c | done = dev_rint (NULL, 0, 0, dev); |
dev | 110 | net/tcp/loopback.c | dev->tbusy = 0; |
dev | 116 | net/tcp/loopback.c | loopback_init(struct device *dev) |
dev | 120 | net/tcp/loopback.c | dev->mtu = 2000; /* mtu */ |
dev | 121 | net/tcp/loopback.c | dev->tbusy = 0; |
dev | 122 | net/tcp/loopback.c | dev->hard_start_xmit = loopback_xmit; |
dev | 123 | net/tcp/loopback.c | dev->open = NULL; |
dev | 124 | net/tcp/loopback.c | dev->hard_header = eth_hard_header; |
dev | 125 | net/tcp/loopback.c | dev->add_arp = NULL; |
dev | 126 | net/tcp/loopback.c | dev->hard_header_len = sizeof (struct enet_header); |
dev | 127 | net/tcp/loopback.c | dev->addr_len = ETHER_ADDR_LEN; |
dev | 128 | net/tcp/loopback.c | dev->type = ETHER_TYPE; |
dev | 129 | net/tcp/loopback.c | dev->queue_xmit = dev_queue_xmit; |
dev | 130 | net/tcp/loopback.c | dev->rebuild_header = eth_rebuild_header; |
dev | 131 | net/tcp/loopback.c | dev->type_trans = eth_type_trans; |
dev | 132 | net/tcp/loopback.c | dev->loopback = 1; |
dev | 42 | net/tcp/pack_type.c | extern int arp_rcv (struct sk_buff *skb, struct device *dev, |
dev | 54 | net/tcp/pack_type.c | extern int ip_rcv (struct sk_buff *skb, struct device *dev, |
dev | 76 | net/tcp/packet.c | packet_rcv (struct sk_buff *skb, struct device *dev, struct packet_type *pt) |
dev | 81 | net/tcp/packet.c | skb->dev = dev; |
dev | 82 | net/tcp/packet.c | skb->len += dev->hard_header_len; |
dev | 138 | net/tcp/packet.c | struct device *dev; |
dev | 170 | net/tcp/packet.c | dev = get_dev (saddr.sa_data); |
dev | 171 | net/tcp/packet.c | if (dev == NULL) |
dev | 180 | net/tcp/packet.c | if (dev->up) |
dev | 181 | net/tcp/packet.c | dev->queue_xmit (skb, dev, sk->priority); |
dev | 291 | net/tcp/packet.c | addr.sa_family = skb->dev->type; |
dev | 292 | net/tcp/packet.c | memcpy (addr.sa_data,skb->dev->name, 14); |
dev | 36 | net/tcp/protocols.c | int udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 44 | net/tcp/protocols.c | int tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 51 | net/tcp/protocols.c | int icmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 137 | net/tcp/raw.c | raw_rcv (struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 146 | net/tcp/raw.c | skb, dev, opt, daddr, len, saddr, redo, protocol)); |
dev | 164 | net/tcp/raw.c | skb->dev = dev; |
dev | 231 | net/tcp/raw.c | struct device *dev=NULL; |
dev | 302 | net/tcp/raw.c | sin.sin_addr.s_addr, &dev, |
dev | 315 | net/tcp/raw.c | sk->prot->queue_xmit (sk, dev, skb, 1); |
dev | 561 | net/tcp/sock.c | if (skb->dev && skb->dev->buffs[i] == skb) |
dev | 571 | net/tcp/sock.c | skb->dev->buffs[i]= skb->next; |
dev | 594 | net/tcp/sock.c | if (skb->dev && skb->dev->buffs[i] == skb) |
dev | 604 | net/tcp/sock.c | skb->dev->buffs[i]= NULL; |
dev | 611 | net/tcp/sock.c | skb->dev = NULL; |
dev | 879 | net/tcp/sock.c | struct device *dev, *dev2; |
dev | 905 | net/tcp/sock.c | for (dev = dev_base; dev != NULL; dev=dev->next) |
dev | 907 | net/tcp/sock.c | if (dev->init && dev->init(dev)) |
dev | 910 | net/tcp/sock.c | dev_base = dev->next; |
dev | 912 | net/tcp/sock.c | dev2->next = dev->next; |
dev | 916 | net/tcp/sock.c | dev2 = dev; |
dev | 1869 | net/tcp/sock.c | sk->prot->rcv(skb, skb->dev, sk->opt, |
dev | 130 | net/tcp/sock.h | unsigned long daddr, struct device **dev, int type, |
dev | 135 | net/tcp/sock.h | void (*queue_xmit) (volatile struct sock *sk, struct device *dev, |
dev | 140 | net/tcp/sock.h | int (*rcv)(struct sk_buff *buff, struct device *dev, struct options *opt, |
dev | 171 | net/tcp/sock.h | struct device *dev; |
dev | 557 | net/tcp/tcp.c | sk->prot->queue_xmit (sk, skb->dev, skb,0); |
dev | 572 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 599 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, sk->saddr, daddr, &dev, |
dev | 641 | net/tcp/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 679 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 882 | net/tcp/tcp.c | tmp = prot->build_header (skb, sk->saddr, sk->daddr, &dev, |
dev | 893 | net/tcp/tcp.c | skb->dev = dev; |
dev | 953 | net/tcp/tcp.c | prot->queue_xmit (sk, dev, skb,0); |
dev | 984 | net/tcp/tcp.c | struct device *dev = NULL; |
dev | 1014 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, sk->saddr, sk->daddr, &dev, |
dev | 1041 | net/tcp/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 1432 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 1470 | net/tcp/tcp.c | tmp = prot->build_header (buff,sk->saddr, sk->daddr, &dev, |
dev | 1483 | net/tcp/tcp.c | buff->dev = dev; |
dev | 1512 | net/tcp/tcp.c | sk->prot->queue_xmit (sk, dev, buff,0); |
dev | 1553 | net/tcp/tcp.c | struct proto *prot, struct options *opt, struct device *dev) |
dev | 1569 | net/tcp/tcp.c | buff->dev = dev; |
dev | 1573 | net/tcp/tcp.c | tmp = prot->build_header (buff, saddr, daddr, &dev, IPPROTO_TCP, opt, |
dev | 1596 | net/tcp/tcp.c | prot->queue_xmit(NULL, dev, buff, 1); |
dev | 1609 | net/tcp/tcp.c | unsigned long saddr, struct options *opt, struct device *dev) |
dev | 1621 | net/tcp/tcp.c | sk, skb, daddr, saddr, opt, dev)); |
dev | 1631 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, sk->prot, opt, dev); |
dev | 1727 | net/tcp/tcp.c | dev->mtu-HEADER_SIZE); |
dev | 1750 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, newsk->saddr, newsk->daddr, &dev, |
dev | 1789 | net/tcp/tcp.c | ptr[2]=((dev->mtu - HEADER_SIZE) >> 8) & 0xff; |
dev | 1790 | net/tcp/tcp.c | ptr[3]=(dev->mtu - HEADER_SIZE) & 0xff; |
dev | 1793 | net/tcp/tcp.c | newsk->prot->queue_xmit(newsk, dev, buff, 0); |
dev | 1829 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 1923 | net/tcp/tcp.c | tmp = prot->build_header (buff,sk->saddr, sk->daddr, &dev, |
dev | 1936 | net/tcp/tcp.c | buff->dev = dev; |
dev | 1954 | net/tcp/tcp.c | prot->queue_xmit(sk, dev, buff, 0); |
dev | 2013 | net/tcp/tcp.c | sk->prot->queue_xmit (sk, skb->dev, skb, skb->free); |
dev | 2086 | net/tcp/tcp.c | if (skb->dev->buffs[i] == skb) |
dev | 2089 | net/tcp/tcp.c | skb->dev->buffs[i] = NULL; |
dev | 2091 | net/tcp/tcp.c | skb->dev->buffs[i] = skb->next; |
dev | 2176 | net/tcp/tcp.c | if (oskb->dev->buffs[i] == oskb) |
dev | 2179 | net/tcp/tcp.c | oskb->dev->buffs[i]= NULL; |
dev | 2181 | net/tcp/tcp.c | oskb->dev->buffs[i] = oskb->next; |
dev | 2332 | net/tcp/tcp.c | sk->prot, NULL, skb->dev); |
dev | 2532 | net/tcp/tcp.c | unsigned long saddr, struct device *dev) |
dev | 2535 | net/tcp/tcp.c | sk, th, saddr, dev)); |
dev | 2591 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, sk->saddr, sk->daddr, &dev, |
dev | 2641 | net/tcp/tcp.c | sk->prot->queue_xmit (sk, dev, buff,0); |
dev | 2709 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 2743 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, sk->saddr, sk->daddr, &dev, |
dev | 2771 | net/tcp/tcp.c | ptr[2]=(dev->mtu- HEADER_SIZE) >> 8; |
dev | 2772 | net/tcp/tcp.c | ptr[3]=(dev->mtu- HEADER_SIZE) & 0xff; |
dev | 2773 | net/tcp/tcp.c | sk->mtu = dev->mtu - HEADER_SIZE; |
dev | 2780 | net/tcp/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
dev | 2854 | net/tcp/tcp.c | tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 2878 | net/tcp/tcp.c | if (!dev) |
dev | 2912 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, &tcp_prot, opt,dev); |
dev | 3047 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, sk->prot, opt,dev); |
dev | 3076 | net/tcp/tcp.c | if (th->fin && tcp_fin (sk, th, saddr, dev)) |
dev | 3107 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, sk->prot, opt,dev); |
dev | 3122 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, sk->prot, opt,dev ); |
dev | 3142 | net/tcp/tcp.c | tcp_conn_request (sk, skb, daddr, saddr, opt, dev); |
dev | 3180 | net/tcp/tcp.c | tcp_reset (daddr, saddr, th, sk->prot, opt, dev); |
dev | 3207 | net/tcp/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
dev | 3232 | net/tcp/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
dev | 3264 | net/tcp/tcp.c | tcp_fin(sk, th, saddr, dev); |
dev | 3292 | net/tcp/tcp.c | tcp_fin (sk, th, saddr, dev); |
dev | 3307 | net/tcp/tcp.c | struct device *dev=NULL; |
dev | 3325 | net/tcp/tcp.c | tmp = sk->prot->build_header (buff, sk->saddr, sk->daddr, &dev, |
dev | 3355 | net/tcp/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
dev | 324 | net/tcp/udp.c | struct device *dev=NULL; |
dev | 415 | net/tcp/udp.c | sin.sin_addr.s_addr, &dev, |
dev | 427 | net/tcp/udp.c | amt = min (len + tmp + sizeof (*uh), dev->mtu); |
dev | 430 | net/tcp/udp.c | amt, dev, dev->mtu)); |
dev | 458 | net/tcp/udp.c | sk->prot->queue_xmit (sk, dev, skb, 1); |
dev | 642 | net/tcp/udp.c | udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, |
dev | 653 | net/tcp/udp.c | if (dev->add_arp) dev->add_arp (saddr, skb, dev); |
dev | 663 | net/tcp/udp.c | icmp_reply (skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, dev); |
dev | 682 | net/tcp/udp.c | skb->dev = dev; |
dev | 128 | net/tcp/we.c | wd_start(struct device *dev) |
dev | 139 | net/tcp/we.c | dev->start = 1; |
dev | 143 | net/tcp/we.c | wd8003_open(struct device *dev) |
dev | 178 | net/tcp/we.c | outb_p(dev->dev_addr[i],WD_PAR0+i); |
dev | 185 | net/tcp/we.c | outb_p(dev->broadcast[i],WD_MAR0+i); |
dev | 192 | net/tcp/we.c | wd_start(dev); |
dev | 198 | net/tcp/we.c | wdget(volatile struct wd_ring *ring, struct device *dev) |
dev | 210 | net/tcp/we.c | return (dev_rint(fptr, len, 0, dev)); |
dev | 214 | net/tcp/we.c | wd8003_start_xmit(struct sk_buff *skb, struct device *dev) |
dev | 220 | net/tcp/we.c | if (dev->tbusy) |
dev | 223 | net/tcp/we.c | if (jiffies - dev->trans_start < 30) |
dev | 231 | net/tcp/we.c | dev->tbusy = 1; |
dev | 236 | net/tcp/we.c | wd_trs(dev); |
dev | 241 | net/tcp/we.c | if (skb->dev != dev) |
dev | 250 | net/tcp/we.c | if ( dev->rebuild_header (skb+1, dev)) |
dev | 253 | net/tcp/we.c | if (skb->dev == dev) |
dev | 258 | net/tcp/we.c | dev->tbusy = 0; |
dev | 264 | net/tcp/we.c | memcpy ((unsigned char *)dev->mem_start, skb+1, skb->len); |
dev | 269 | net/tcp/we.c | dev->trans_start = jiffies; |
dev | 279 | net/tcp/we.c | if (!(dev->interrupt)) |
dev | 299 | net/tcp/we.c | wd_put_bnd(unsigned char bnd, struct device *dev ) |
dev | 316 | net/tcp/we.c | wd_get_bnd( struct device *dev ) |
dev | 334 | net/tcp/we.c | wd_get_cur( struct device *dev ) |
dev | 356 | net/tcp/we.c | wd_rcv( struct device *dev ) |
dev | 367 | net/tcp/we.c | cur = wd_get_cur( dev ); |
dev | 368 | net/tcp/we.c | bnd = wd_get_bnd( dev ); |
dev | 378 | net/tcp/we.c | ring = (volatile struct wd_ring *) (dev->mem_start + (pkt << 8)); |
dev | 392 | net/tcp/we.c | done = wdget( ring, dev ); /* get the packet */ |
dev | 400 | net/tcp/we.c | wd_put_bnd(bnd, dev); |
dev | 403 | net/tcp/we.c | cur = wd_get_cur(dev); |
dev | 414 | net/tcp/we.c | if( ( bnd = wd_get_cur( dev ) - 1 ) < WD_TXBS ) |
dev | 416 | net/tcp/we.c | wd_put_bnd( bnd, dev ); |
dev | 423 | net/tcp/we.c | done = dev_rint(NULL, 0,0, dev); |
dev | 438 | net/tcp/we.c | wd_rx_over( struct device *dev ) |
dev | 451 | net/tcp/we.c | wd_rcv( dev ); /* clear out received packets */ |
dev | 467 | net/tcp/we.c | wd_trs( struct device *dev ) |
dev | 479 | net/tcp/we.c | dev->tbusy = 0; |
dev | 484 | net/tcp/we.c | len = dev_tint( (unsigned char *)dev->mem_start, dev ); |
dev | 496 | net/tcp/we.c | dev->tbusy = 0 |
dev | 522 | net/tcp/we.c | struct device *dev; |
dev | 529 | net/tcp/we.c | for (dev = dev_base; dev != NULL; dev = dev->next) |
dev | 531 | net/tcp/we.c | if (dev->irq == irq) break; |
dev | 533 | net/tcp/we.c | if (dev == NULL) |
dev | 549 | net/tcp/we.c | dev->interrupt = 1; |
dev | 557 | net/tcp/we.c | printk("\nwd8013 overrun bnd = %d, cur = %d", wd_get_bnd( dev ), wd_get_cur( dev ) ); |
dev | 558 | net/tcp/we.c | wd_rx_over( dev ); /* performs wd_rcv() as well */ |
dev | 562 | net/tcp/we.c | wd_rcv( dev ); |
dev | 568 | net/tcp/we.c | wd_trs( dev ); |
dev | 601 | net/tcp/we.c | wd_trs( dev ); |
dev | 626 | net/tcp/we.c | dev->interrupt = 0; |
dev | 639 | net/tcp/we.c | wd8003_init(struct device *dev) |
dev | 650 | net/tcp/we.c | printk ("Warning WD8013 board not found at i/o = %X.\n",dev->base_addr); |
dev | 657 | net/tcp/we.c | dev->mtu = 1500; /* eth_mtu */ |
dev | 658 | net/tcp/we.c | dev->hard_start_xmit = wd8003_start_xmit; |
dev | 659 | net/tcp/we.c | dev->open = wd8003_open; |
dev | 660 | net/tcp/we.c | dev->hard_header = eth_hard_header; |
dev | 661 | net/tcp/we.c | dev->add_arp = eth_add_arp; |
dev | 662 | net/tcp/we.c | dev->type_trans = eth_type_trans; |
dev | 663 | net/tcp/we.c | dev->hard_header_len = sizeof (struct enet_header); |
dev | 664 | net/tcp/we.c | dev->addr_len = ETHER_ADDR_LEN; |
dev | 665 | net/tcp/we.c | dev->type = ETHER_TYPE; |
dev | 666 | net/tcp/we.c | dev->queue_xmit = dev_queue_xmit; |
dev | 667 | net/tcp/we.c | dev->rebuild_header = eth_rebuild_header; |
dev | 669 | net/tcp/we.c | dev->buffs[i] = NULL; |
dev | 693 | net/tcp/we.c | for (i = dev->mem_start; i < dev->mem_end; i++) |
dev | 699 | net/tcp/we.c | if( (i - dev->mem_start) > 4096 ) |
dev | 706 | net/tcp/we.c | max_pages = ( i - dev->mem_start )/256; |
dev | 709 | net/tcp/we.c | dev->rmem_end = i; |
dev | 710 | net/tcp/we.c | dev->mem_end = i; |
dev | 717 | net/tcp/we.c | dev->dev_addr[i]=inb_p(WD_ROM+i); |
dev | 718 | net/tcp/we.c | dev->broadcast[i]=0xff; |
dev | 719 | net/tcp/we.c | printk ("%2.2X ",dev->dev_addr[i]); |
dev | 727 | net/tcp/we.c | dev->tbusy = 0; |
dev | 728 | net/tcp/we.c | dev->interrupt = 0; |
dev | 730 | net/tcp/we.c | if (irqaction (dev->irq, &wd8003_sigaction)) |
dev | 732 | net/tcp/we.c | printk ("Unable to get IRQ%d for wd8013 board\n", dev->irq); |
dev | 125 | net/tcp/wereg.h | #define WD_MEM (dev->mem_start) |
dev | 126 | net/tcp/wereg.h | #define WD_BUFFEND (dev->mem_end) |
dev | 128 | net/tcp/wereg.h | #define WD_BASE (dev->base_addr) |