OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [ide/] [raid/] [ataraid.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
   ataraid.h  Copyright (C) 2001 Red Hat, Inc. All rights reserved.
3
 
4
   This program is free software; you can redistribute it and/or modify
5
   it under the terms of the GNU General Public License as published by
6
   the Free Software Foundation; either version 2, or (at your option)
7
   any later version.
8
 
9
   You should have received a copy of the GNU General Public License
10
   (for example /usr/src/linux/COPYING); if not, write to the Free
11
   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
12
 
13
   Authors:     Arjan van de Ven <arjanv@redhat.com>
14
 
15
 
16
*/
17
 
18
#include <linux/module.h>
19
#include <linux/init.h>
20
#include <linux/kernel.h>
21
#include <asm/semaphore.h>
22
#include <linux/blkdev.h>
23
#include <linux/blkpg.h>
24
#include <linux/genhd.h>
25
#include <linux/ioctl.h>
26
 
27
#include <linux/ide.h>
28
#include <asm/uaccess.h>
29
 
30
#define ATAMAJOR 114
31
#define SHIFT 4
32
#define MINOR_MASK 15
33
#define MAJOR_MASK 15
34
 
35
 
36
/* raid_device_operations is a light struct block_device_operations with an
37
   added method for make_request */
38
struct raid_device_operations {
39
        int (*open) (struct inode *, struct file *);
40
        int (*release) (struct inode *, struct file *);
41
        int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
42
        int (*make_request) (request_queue_t *q, int rw, struct buffer_head * bh);
43
};
44
 
45
 
46
struct geom {
47
        unsigned char heads;
48
        unsigned int cylinders;
49
        unsigned char sectors;
50
};
51
 
52
/* structure for the splitting of bufferheads */
53
 
54
struct ataraid_bh_private {
55
        struct buffer_head *parent;
56
        atomic_t count;
57
};
58
 
59
extern struct gendisk ataraid_gendisk;
60
 
61
extern int ataraid_get_device(struct raid_device_operations *fops);
62
extern void ataraid_release_device(int device);
63
extern int get_blocksize(kdev_t dev);
64
extern void ataraid_register_disk(int device,long size);
65
extern struct buffer_head *ataraid_get_bhead(void);
66
extern struct ataraid_bh_private *ataraid_get_private(void);
67
extern void ataraid_end_request(struct buffer_head *bh, int uptodate);
68
 
69
 
70
 
71
 
72
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.