Merge branch 'master' of /usr/src/ntfs-2.6/
[powerpc.git] / drivers / block / aoe / aoe.h
index cb5dca3..881c48d 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
-#define VERSION "6"
+#define VERSION "14"
 #define AOE_MAJOR 152
 #define DEVICE_NAME "aoe"
 
@@ -7,12 +7,12 @@
  * default is 16, which is 15 partitions plus the whole disk
  */
 #ifndef AOE_PARTITIONS
-#define AOE_PARTITIONS 16
+#define AOE_PARTITIONS (16)
 #endif
 
-#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))
-#define AOEMAJOR(sysminor) ((sysminor) / 10)
-#define AOEMINOR(sysminor) ((sysminor) % 10)
+#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * NPERSHELF + (aoeminor))
+#define AOEMAJOR(sysminor) ((sysminor) / NPERSHELF)
+#define AOEMINOR(sysminor) ((sysminor) % NPERSHELF)
 #define WHITESPACE " \t\v\f\n"
 
 enum {
@@ -39,13 +39,13 @@ enum {
 struct aoe_hdr {
        unsigned char dst[6];
        unsigned char src[6];
-       unsigned char type[2];
+       __be16 type;
        unsigned char verfl;
        unsigned char err;
-       unsigned char major[2];
+       __be16 major;
        unsigned char minor;
        unsigned char cmd;
-       unsigned char tag[4];
+       __be32 tag;
 };
 
 struct aoe_atahdr {
@@ -63,8 +63,8 @@ struct aoe_atahdr {
 };
 
 struct aoe_cfghdr {
-       unsigned char bufcnt[2];
-       unsigned char fwver[2];
+       __be16 bufcnt;
+       __be16 fwver;
        unsigned char res;
        unsigned char aoeccmd;
        unsigned char cslen[2];
@@ -83,13 +83,14 @@ enum {
 
 enum {
        MAXATADATA = 1024,
-       NPERSHELF = 10,
+       NPERSHELF = 16,         /* number of slots per shelf address */
        FREETAG = -1,
        MIN_BUFS = 8,
 };
 
 struct buf {
        struct list_head bufs;
+       ulong start_time;       /* for disk stats */
        ulong flags;
        ulong nframesout;
        char *bufaddr;
@@ -130,7 +131,8 @@ struct aoedev {
        struct timer_list timer;
        spinlock_t lock;
        struct net_device *ifp; /* interface ed is attached to */
-       struct sk_buff *skblist;/* packets needing to be sent */
+       struct sk_buff *sendq_hd; /* packets needing to be sent, list head */
+       struct sk_buff *sendq_tl;
        mempool_t *bufpool;     /* for deadlock-free Buf allocation */
        struct list_head bufq;  /* queue of bios to work on */
        struct buf *inprocess;  /* the one we're currently working on */