aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoenet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/aoe/aoenet.c')
-rw-r--r--drivers/block/aoe/aoenet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 9626e0f5da9d..aab6d91a2c22 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -8,6 +8,7 @@
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <linux/netdevice.h> 9#include <linux/netdevice.h>
10#include <linux/moduleparam.h> 10#include <linux/moduleparam.h>
11#include <asm/unaligned.h>
11#include "aoe.h" 12#include "aoe.h"
12 13
13#define NECODES 5 14#define NECODES 5
@@ -123,7 +124,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
123 skb_push(skb, ETH_HLEN); /* (1) */ 124 skb_push(skb, ETH_HLEN); /* (1) */
124 125
125 h = (struct aoe_hdr *) skb->mac.raw; 126 h = (struct aoe_hdr *) skb->mac.raw;
126 n = be32_to_cpu(h->tag); 127 n = be32_to_cpu(get_unaligned(&h->tag));
127 if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31)) 128 if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31))
128 goto exit; 129 goto exit;
129 130
@@ -133,7 +134,7 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
133 n = 0; 134 n = 0;
134 if (net_ratelimit()) 135 if (net_ratelimit())
135 printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n", 136 printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n",
136 be16_to_cpu(h->major), h->minor, 137 be16_to_cpu(get_unaligned(&h->major)), h->minor,
137 h->err, aoe_errlist[n]); 138 h->err, aoe_errlist[n]);
138 goto exit; 139 goto exit;
139 } 140 }