diff options
Diffstat (limited to 'drivers/block/aoe/aoedev.c')
-rw-r--r-- | drivers/block/aoe/aoedev.c | 5 |
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; | |||
13 | static spinlock_t devlist_lock; | 13 | static spinlock_t devlist_lock; |
14 | 14 | ||
15 | struct aoedev * | 15 | struct aoedev * |
16 | aoedev_bymac(unsigned char *macaddr) | 16 | aoedev_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); |