summaryrefslogtreecommitdiff
path: root/drivers/block/aoe
diff options
context:
space:
mode:
authorEd L Cashin <ecashin@coraid.com>2005-04-29 18:24:22 +0400
committerGreg KH <gregkh@suse.de>2005-05-04 10:34:54 +0400
commit93d489fc56f819d8805d80ae83cbafc5e5719804 (patch)
tree946adcae0abe20dc6d9d58682ea2d6980efd1a4c /drivers/block/aoe
parent67d9f84786cc4fd42cb40c9474c248eadaff15c6 (diff)
downloadlinux-93d489fc56f819d8805d80ae83cbafc5e5719804.tar.xz
[PATCH] aoe: allow multiple aoe devices to have the same mac
allow multiple aoe devices to have the same mac Signed-off-by: Ed L. Cashin <ecashin@coraid.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -u b/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r--drivers/block/aoe/aoedev.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index ec16c64dd114..6e231c5a1199 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -109,25 +109,22 @@ aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bu
spin_lock_irqsave(&devlist_lock, flags);
for (d=devlist; d; d=d->next)
- if (d->sysminor == sysminor
- || memcmp(d->addr, addr, sizeof d->addr) == 0)
+ if (d->sysminor == sysminor)
break;
if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) {
spin_unlock_irqrestore(&devlist_lock, flags);
printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
return NULL;
- }
+ } /* if newdev, (d->flags & DEVFL_UP) == 0 for below */
spin_unlock_irqrestore(&devlist_lock, flags);
spin_lock_irqsave(&d->lock, flags);
d->ifp = ifp;
-
- if (d->sysminor != sysminor
- || (d->flags & DEVFL_UP) == 0) {
+ memcpy(d->addr, addr, sizeof d->addr);
+ if ((d->flags & DEVFL_UP) == 0) {
aoedev_downdev(d); /* flushes outstanding frames */
- memcpy(d->addr, addr, sizeof d->addr);
d->sysminor = sysminor;
d->aoemajor = AOEMAJOR(sysminor);
d->aoeminor = AOEMINOR(sysminor);