summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoedev.c
diff options
context:
space:
mode:
authorecashin@coraid.com <ecashin@coraid.com>2005-04-18 22:00:18 -0700
committerGreg KH <greg@press.kroah.org>2005-04-18 22:00:18 -0700
commit32465c650670c7499548d70fdeed57fab44ee679 (patch)
treeec83b6febfcaa9b2b7c756b9ef38c59c7806ce9b /drivers/block/aoe/aoedev.c
parentfc458dcda27c6d26cb11ef9ee9c1c3599711be94 (diff)
downloadblackbird-op-linux-32465c650670c7499548d70fdeed57fab44ee679.tar.gz
blackbird-op-linux-32465c650670c7499548d70fdeed57fab44ee679.zip
[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;
static spinlock_t devlist_lock;
struct aoedev *
-aoedev_bymac(unsigned char *macaddr)
+aoedev_by_aoeaddr(int maj, int min)
{
struct aoedev *d;
ulong flags;
@@ -21,7 +21,7 @@ aoedev_bymac(unsigned char *macaddr)
spin_lock_irqsave(&devlist_lock, flags);
for (d=devlist; d; d=d->next)
- if (!memcmp(d->addr, macaddr, 6))
+ if (d->aoemajor == maj && d->aoeminor == min)
break;
spin_unlock_irqrestore(&devlist_lock, flags);
@@ -125,7 +125,6 @@ aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bu
d->ifp = ifp;
if (d->sysminor != sysminor
- || memcmp(d->addr, addr, sizeof d->addr)
|| (d->flags & DEVFL_UP) == 0) {
aoedev_downdev(d); /* flushes outstanding frames */
memcpy(d->addr, addr, sizeof d->addr);
OpenPOWER on IntegriCloud