diff options
Diffstat (limited to 'drivers/block/aoe/aoe.h')
-rw-r--r-- | drivers/block/aoe/aoe.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 6eebcb7be97e..6d111228cfac 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ | 1 | /* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ |
2 | #define VERSION "22" | 2 | #define VERSION "32" |
3 | #define AOE_MAJOR 152 | 3 | #define AOE_MAJOR 152 |
4 | #define DEVICE_NAME "aoe" | 4 | #define DEVICE_NAME "aoe" |
5 | 5 | ||
@@ -65,7 +65,7 @@ struct aoe_atahdr { | |||
65 | struct aoe_cfghdr { | 65 | struct aoe_cfghdr { |
66 | __be16 bufcnt; | 66 | __be16 bufcnt; |
67 | __be16 fwver; | 67 | __be16 fwver; |
68 | unsigned char res; | 68 | unsigned char scnt; |
69 | unsigned char aoeccmd; | 69 | unsigned char aoeccmd; |
70 | unsigned char cslen[2]; | 70 | unsigned char cslen[2]; |
71 | }; | 71 | }; |
@@ -78,12 +78,14 @@ enum { | |||
78 | DEVFL_GDALLOC = (1<<4), /* need to alloc gendisk */ | 78 | DEVFL_GDALLOC = (1<<4), /* need to alloc gendisk */ |
79 | DEVFL_PAUSE = (1<<5), | 79 | DEVFL_PAUSE = (1<<5), |
80 | DEVFL_NEWSIZE = (1<<6), /* need to update dev size in block layer */ | 80 | DEVFL_NEWSIZE = (1<<6), /* need to update dev size in block layer */ |
81 | DEVFL_MAXBCNT = (1<<7), /* d->maxbcnt is not changeable */ | ||
82 | DEVFL_KICKME = (1<<8), | ||
81 | 83 | ||
82 | BUFFL_FAIL = 1, | 84 | BUFFL_FAIL = 1, |
83 | }; | 85 | }; |
84 | 86 | ||
85 | enum { | 87 | enum { |
86 | MAXATADATA = 1024, | 88 | DEFAULTBCNT = 2 * 512, /* 2 sectors */ |
87 | NPERSHELF = 16, /* number of slots per shelf address */ | 89 | NPERSHELF = 16, /* number of slots per shelf address */ |
88 | FREETAG = -1, | 90 | FREETAG = -1, |
89 | MIN_BUFS = 8, | 91 | MIN_BUFS = 8, |
@@ -107,11 +109,9 @@ struct frame { | |||
107 | ulong waited; | 109 | ulong waited; |
108 | struct buf *buf; | 110 | struct buf *buf; |
109 | char *bufaddr; | 111 | char *bufaddr; |
110 | int writedatalen; | 112 | ulong bcnt; |
111 | int ndata; | 113 | sector_t lba; |
112 | 114 | struct sk_buff *skb; | |
113 | /* largest possible */ | ||
114 | unsigned char data[sizeof(struct aoe_hdr) + sizeof(struct aoe_atahdr)]; | ||
115 | }; | 115 | }; |
116 | 116 | ||
117 | struct aoedev { | 117 | struct aoedev { |
@@ -121,9 +121,12 @@ struct aoedev { | |||
121 | ulong sysminor; | 121 | ulong sysminor; |
122 | ulong aoemajor; | 122 | ulong aoemajor; |
123 | ulong aoeminor; | 123 | ulong aoeminor; |
124 | ulong nopen; /* (bd_openers isn't available without sleeping) */ | 124 | u16 nopen; /* (bd_openers isn't available without sleeping) */ |
125 | ulong rttavg; /* round trip average of requests/responses */ | 125 | u16 lasttag; /* last tag sent */ |
126 | u16 rttavg; /* round trip average of requests/responses */ | ||
127 | u16 mintimer; | ||
126 | u16 fw_ver; /* version of blade's firmware */ | 128 | u16 fw_ver; /* version of blade's firmware */ |
129 | u16 maxbcnt; | ||
127 | struct work_struct work;/* disk create work struct */ | 130 | struct work_struct work;/* disk create work struct */ |
128 | struct gendisk *gd; | 131 | struct gendisk *gd; |
129 | request_queue_t blkq; | 132 | request_queue_t blkq; |
@@ -137,8 +140,8 @@ struct aoedev { | |||
137 | mempool_t *bufpool; /* for deadlock-free Buf allocation */ | 140 | mempool_t *bufpool; /* for deadlock-free Buf allocation */ |
138 | struct list_head bufq; /* queue of bios to work on */ | 141 | struct list_head bufq; /* queue of bios to work on */ |
139 | struct buf *inprocess; /* the one we're currently working on */ | 142 | struct buf *inprocess; /* the one we're currently working on */ |
140 | ulong lasttag; /* last tag sent */ | 143 | ushort lostjumbo; |
141 | ulong nframes; /* number of frames below */ | 144 | ushort nframes; /* number of frames below */ |
142 | struct frame *frames; | 145 | struct frame *frames; |
143 | }; | 146 | }; |
144 | 147 | ||
@@ -157,6 +160,7 @@ void aoecmd_cfg(ushort aoemajor, unsigned char aoeminor); | |||
157 | void aoecmd_ata_rsp(struct sk_buff *); | 160 | void aoecmd_ata_rsp(struct sk_buff *); |
158 | void aoecmd_cfg_rsp(struct sk_buff *); | 161 | void aoecmd_cfg_rsp(struct sk_buff *); |
159 | void aoecmd_sleepwork(void *vp); | 162 | void aoecmd_sleepwork(void *vp); |
163 | struct sk_buff *new_skb(ulong); | ||
160 | 164 | ||
161 | int aoedev_init(void); | 165 | int aoedev_init(void); |
162 | void aoedev_exit(void); | 166 | void aoedev_exit(void); |