diff --git a/README.md b/README.md index 6142823..88fc33c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The version number of this driver is unrelated to the version numbers of Linux kernels. Just use the latest aoe driver with your 2.6 or 3.x Linux kernel. -[This driver is available on github.](https://github.com/ecashin/aoe) +[This driver is available on github.](https://github.com/OpenAoE/aoe) Please see linux/Documentation/aoe.txt for basic information and EtherDrive-2.6-HOWTO.sgml for more. diff --git a/linux/drivers/block/aoe/aoecmd.c b/linux/drivers/block/aoe/aoecmd.c index 3aaf1be..9ec9db3 100644 --- a/linux/drivers/block/aoe/aoecmd.c +++ b/linux/drivers/block/aoe/aoecmd.c @@ -1550,7 +1550,8 @@ addtgt(struct aoedev *d, char *addr, ulong nframes) memcpy(t->addr, addr, sizeof t->addr); t->ifp = t->ifs; aoecmd_wreset(t); - t->maxout = t->nframes / 2; + if (t->nframes > 1) + t->maxout = t->nframes / 2; INIT_LIST_HEAD(&t->ffree); return *tt = t; @@ -1653,6 +1654,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb) n = be16_to_cpu(ch->bufcnt); if (n > aoe_maxout) /* keep it reasonable */ n = aoe_maxout; + else if (n == 0) { + pr_warn_ratelimited("aoe: e%ld.%d has zero bufcnt %s\n", + aoemajor, h->minor, "and cannot be used"); + return; + } d = aoedev_by_aoeaddr(aoemajor, h->minor, 1); if (d == NULL) {