aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoedev.c
diff options
context:
space:
mode:
authorecashin@coraid.com <ecashin@coraid.com>2005-04-19 01:00:18 -0400
committerGreg KH <greg@press.kroah.org>2005-04-19 01:00:18 -0400
commit32465c650670c7499548d70fdeed57fab44ee679 (patch)
treeec83b6febfcaa9b2b7c756b9ef38c59c7806ce9b /drivers/block/aoe/aoedev.c
parentfc458dcda27c6d26cb11ef9ee9c1c3599711be94 (diff)
[PATCH] aoe 2/12: allow multiple aoe devices with same MAC
allow multiple aoe devices with same MAC addr Signed-off-by: Ed L. Cashin <ecashin@coraid.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/aoe/aoedev.c')
-rw-r--r--drivers/block/aoe/aoedev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index 240abaec159b..a40a78a7f44a 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -13,7 +13,7 @@ static struct aoedev *devlist;
13static spinlock_t devlist_lock; 13static spinlock_t devlist_lock;
14 14
15struct aoedev * 15struct aoedev *
16aoedev_bymac(unsigned char *macaddr) 16aoedev_by_aoeaddr(int maj, int min)
17{ 17{
18 struct aoedev *d; 18 struct aoedev *d;
19 ulong flags; 19 ulong flags;
@@ -21,7 +21,7 @@ aoedev_bymac(unsigned char *macaddr)
21 spin_lock_irqsave(&devlist_lock, flags); 21 spin_lock_irqsave(&devlist_lock, flags);
22 22
23 for (d=devlist; d; d=d->next) 23 for (d=devlist; d; d=d->next)
24 if (!memcmp(d->addr, macaddr, 6)) 24 if (d->aoemajor == maj && d->aoeminor == min)
25 break; 25 break;
26 26
27 spin_unlock_irqrestore(&devlist_lock, flags); 27 spin_unlock_irqrestore(&devlist_lock, flags);
@@ -125,7 +125,6 @@ aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bu
125 d->ifp = ifp; 125 d->ifp = ifp;
126 126
127 if (d->sysminor != sysminor 127 if (d->sysminor != sysminor
128 || memcmp(d->addr, addr, sizeof d->addr)
129 || (d->flags & DEVFL_UP) == 0) { 128 || (d->flags & DEVFL_UP) == 0) {
130 aoedev_downdev(d); /* flushes outstanding frames */ 129 aoedev_downdev(d); /* flushes outstanding frames */
131 memcpy(d->addr, addr, sizeof d->addr); 130 memcpy(d->addr, addr, sizeof d->addr);