Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330194
b: refs/heads/master
c: 7159e96
h: refs/heads/master
v: v3
  • Loading branch information
Ed Cashin authored and Linus Torvalds committed Oct 5, 2012
1 parent 78d3c9c commit 5424b22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bcce1a355c8248fb5661cb78bb14b9e19475cd4
refs/heads/master: 7159e969d1963f19e7550aafd234b0c5361e5d69
2 changes: 0 additions & 2 deletions trunk/drivers/block/aoe/aoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ struct aoe_hdr {
__be32 tag;
};

#define AOE_MAXSHELF (0xffff-1) /* one less than the broadcast shelf address */

struct aoe_atahdr {
unsigned char aflags;
unsigned char errfeat;
Expand Down
17 changes: 11 additions & 6 deletions trunk/drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,22 +1349,27 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
"Check shelf dip switches.\n");
return;
}
if (aoemajor > AOE_MAXSHELF) {
pr_info("aoe: e%ld.%d: shelf number too large\n",
if (aoemajor == 0xffff) {
pr_info("aoe: e%ld.%d: broadcast shelf number invalid\n",
aoemajor, (int) h->minor);
return;
}

d = aoedev_by_aoeaddr(aoemajor, h->minor, 1);
if (d == NULL) {
pr_info("aoe: device allocation failure\n");
if (h->minor == 0xff) {
pr_info("aoe: e%ld.%d: broadcast slot number invalid\n",
aoemajor, (int) h->minor);
return;
}

n = be16_to_cpu(ch->bufcnt);
if (n > aoe_maxout) /* keep it reasonable */
n = aoe_maxout;

d = aoedev_by_aoeaddr(aoemajor, h->minor, 1);
if (d == NULL) {
pr_info("aoe: device allocation failure\n");
return;
}

spin_lock_irqsave(&d->lock, flags);

t = gettgt(d, h->src);
Expand Down

0 comments on commit 5424b22

Please sign in to comment.