aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoe.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:12:03 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:12:03 -0400
commitc3c661932cd53582c5b03692b99649300977248a (patch)
treede34eb5c85e5534cc23184622a257f7bddbc4376 /drivers/block/aoe/aoe.h
parentc79bea07ec4d3ef087962699fe8b2f6dc5ca7754 (diff)
parenta4b38364093bf2094ff858ad45f490521bb87984 (diff)
Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/aoe-2.6.git/
for 11 aoe bugfix patches.
Diffstat (limited to 'drivers/block/aoe/aoe.h')
-rw-r--r--drivers/block/aoe/aoe.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index db78f826d40c..aa8b547ffafa 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -1,10 +1,15 @@
1/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ 1/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */
2#define VERSION "5" 2#define VERSION "6"
3#define AOE_MAJOR 152 3#define AOE_MAJOR 152
4#define DEVICE_NAME "aoe" 4#define DEVICE_NAME "aoe"
5
6/* set AOE_PARTITIONS to 1 to use whole-disks only
7 * default is 16, which is 15 partitions plus the whole disk
8 */
5#ifndef AOE_PARTITIONS 9#ifndef AOE_PARTITIONS
6#define AOE_PARTITIONS 16 10#define AOE_PARTITIONS 16
7#endif 11#endif
12
8#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor)) 13#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))
9#define AOEMAJOR(sysminor) ((sysminor) / 10) 14#define AOEMAJOR(sysminor) ((sysminor) / 10)
10#define AOEMINOR(sysminor) ((sysminor) % 10) 15#define AOEMINOR(sysminor) ((sysminor) % 10)
@@ -34,13 +39,13 @@ enum {
34struct aoe_hdr { 39struct aoe_hdr {
35 unsigned char dst[6]; 40 unsigned char dst[6];
36 unsigned char src[6]; 41 unsigned char src[6];
37 unsigned char type[2]; 42 __be16 type;
38 unsigned char verfl; 43 unsigned char verfl;
39 unsigned char err; 44 unsigned char err;
40 unsigned char major[2]; 45 __be16 major;
41 unsigned char minor; 46 unsigned char minor;
42 unsigned char cmd; 47 unsigned char cmd;
43 unsigned char tag[4]; 48 __be32 tag;
44}; 49};
45 50
46struct aoe_atahdr { 51struct aoe_atahdr {
@@ -58,8 +63,8 @@ struct aoe_atahdr {
58}; 63};
59 64
60struct aoe_cfghdr { 65struct aoe_cfghdr {
61 unsigned char bufcnt[2]; 66 __be16 bufcnt;
62 unsigned char fwver[2]; 67 __be16 fwver;
63 unsigned char res; 68 unsigned char res;
64 unsigned char aoeccmd; 69 unsigned char aoeccmd;
65 unsigned char cslen[2]; 70 unsigned char cslen[2];
@@ -85,6 +90,7 @@ enum {
85 90
86struct buf { 91struct buf {
87 struct list_head bufs; 92 struct list_head bufs;
93 ulong start_time; /* for disk stats */
88 ulong flags; 94 ulong flags;
89 ulong nframesout; 95 ulong nframesout;
90 char *bufaddr; 96 char *bufaddr;
@@ -125,7 +131,8 @@ struct aoedev {
125 struct timer_list timer; 131 struct timer_list timer;
126 spinlock_t lock; 132 spinlock_t lock;
127 struct net_device *ifp; /* interface ed is attached to */ 133 struct net_device *ifp; /* interface ed is attached to */
128 struct sk_buff *skblist;/* packets needing to be sent */ 134 struct sk_buff *sendq_hd; /* packets needing to be sent, list head */
135 struct sk_buff *sendq_tl;
129 mempool_t *bufpool; /* for deadlock-free Buf allocation */ 136 mempool_t *bufpool; /* for deadlock-free Buf allocation */
130 struct list_head bufq; /* queue of bios to work on */ 137 struct list_head bufq; /* queue of bios to work on */
131 struct buf *inprocess; /* the one we're currently working on */ 138 struct buf *inprocess; /* the one we're currently working on */
@@ -151,7 +158,7 @@ void aoecmd_cfg_rsp(struct sk_buff *);
151 158
152int aoedev_init(void); 159int aoedev_init(void);
153void aoedev_exit(void); 160void aoedev_exit(void);
154struct aoedev *aoedev_bymac(unsigned char *); 161struct aoedev *aoedev_by_aoeaddr(int maj, int min);
155void aoedev_downdev(struct aoedev *d); 162void aoedev_downdev(struct aoedev *d);
156struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong); 163struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong);
157int aoedev_busy(void); 164int aoedev_busy(void);