From: Ed L Cashin <ecashin@coraid.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com, Greg K-H <greg@kroah.com>
Subject: [PATCH 2.6.12-rc2] aoe [4/6]: allow multiple aoe devices to have the same mac
Date: Wed, 20 Apr 2005 13:06:00 -0400 [thread overview]
Message-ID: <87is2hnzt3.fsf@coraid.com> (raw)
In-Reply-To: 874qe1pejv.fsf@coraid.com
allow multiple aoe devices to have the same mac
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
diff -u b/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
--- b/drivers/block/aoe/aoedev.c 2005-04-20 11:42:18.000000000 -0400
+++ b/drivers/block/aoe/aoedev.c 2005-04-20 11:42:22.000000000 -0400
@@ -109,25 +109,22 @@
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);
--
Ed L. Cashin <ecashin@coraid.com>
next prev parent reply other threads:[~2005-04-20 17:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 17:02 [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [2/6]: aoe-stat should work for built-in as well as module Ed L Cashin
2005-04-20 17:05 ` [PATCH 2.6.12-rc2] aoe [3/6]: update the documentation to mention aoetools Ed L Cashin
2005-04-20 17:06 ` Ed L Cashin [this message]
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [5/6]: add firmware version to info in sysfs Ed L Cashin
2005-04-20 17:37 ` Randy.Dunlap
2005-04-20 19:13 ` Ed L Cashin
2005-04-20 17:06 ` [PATCH 2.6.12-rc2] aoe [6/6]: update version number to 10 Ed L Cashin
2005-04-20 17:16 ` [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration Randy.Dunlap
2005-04-20 17:27 ` Ed L Cashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87is2hnzt3.fsf@coraid.com \
--to=ecashin@coraid.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox