Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293
b: refs/heads/master
c: 32465c6
h: refs/heads/master
i:
  291: 280a089
v: v3
  • Loading branch information
ecashin@coraid.com authored and Greg KH committed Apr 19, 2005
1 parent 01e3a82 commit 37eb832
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc458dcda27c6d26cb11ef9ee9c1c3599711be94
refs/heads/master: 32465c650670c7499548d70fdeed57fab44ee679
2 changes: 1 addition & 1 deletion trunk/drivers/block/aoe/aoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void aoecmd_cfg_rsp(struct sk_buff *);

int aoedev_init(void);
void aoedev_exit(void);
struct aoedev *aoedev_bymac(unsigned char *);
struct aoedev *aoedev_by_aoeaddr(int maj, int min);
void aoedev_downdev(struct aoedev *d);
struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong);
int aoedev_busy(void);
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,15 @@ aoecmd_ata_rsp(struct sk_buff *skb)
register long n;
ulong flags;
char ebuf[128];

u16 aoemajor;

hin = (struct aoe_hdr *) skb->mac.raw;
d = aoedev_bymac(hin->src);
aoemajor = __be16_to_cpu(*((u16 *) hin->major));
d = aoedev_by_aoeaddr(aoemajor, hin->minor);
if (d == NULL) {
snprintf(ebuf, sizeof ebuf, "aoecmd_ata_rsp: ata response "
"for unknown device %d.%d\n",
__be16_to_cpu(*((u16 *) hin->major)),
hin->minor);
aoemajor, hin->minor);
aoechr_error(ebuf);
return;
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/block/aoe/aoedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ 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;

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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 37eb832

Please sign in to comment.