__be32_to_cpu(*((u32 *) hin->tag)), 
be32_to_cpu(hin->tag), 
aoecmd_ata_rsp(struct sk_buff *skb){	struct aoedev *d;	struct aoe_hdr *hin;	struct aoe_atahdr *ahin, *ahout;	struct frame *f;	struct buf *buf;	struct sk_buff *sl;	register long n;	ulong flags;	char ebuf[128];	u16 aoemajor;	hin = (struct aoe_hdr *) skb->mac.raw;	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",			 aoemajor, hin->minor);		aoechr_error(ebuf);		return;	}	spin_lock_irqsave(&d->lock, flags);	f = getframe(d, __be32_to_cpu(*((u32 *) hin->tag)));	if (f == NULL) {		spin_unlock_irqrestore(&d->lock, flags);		snprintf(ebuf, sizeof ebuf,			"%15s e%d.%d    tag=%08x@%08lx\n",			"unexpected rsp",			__be16_to_cpu(*((u16 *) hin->major)),			hin->minor,			__be32_to_cpu(*((u32 *) hin->tag)),			jiffies);		aoechr_error(ebuf);		return;	}	calc_rttavg(d, tsince(f->tag));	ahin = (struct aoe_atahdr *) (hin+1);	ahout = (struct aoe_atahdr *) (f->data + sizeof(struct aoe_hdr));	buf = f->buf;	if (ahin->cmdstat & 0xa9) {	/* these bits cleared on success */		printk(KERN_CRIT "aoe: aoecmd_ata_rsp: ata error cmd=%2.2Xh "			"stat=%2.2Xh from e%ld.%ld\n", 			ahout->cmdstat, ahin->cmdstat,			d->aoemajor, d->aoeminor);		if (buf)			buf->flags |= BUFFL_FAIL;	} else {		switch (ahout->cmdstat) {		case WIN_READ:		case WIN_READ_EXT:			n = ahout->scnt << 9;			if (skb->len - sizeof *hin - sizeof *ahin < n) {				printk(KERN_CRIT "aoe: aoecmd_ata_rsp: runt "					"ata data size in read.  skb->len=%d\n",					skb->len);				/* fail frame f?  just returning will rexmit. */				spin_unlock_irqrestore(&d->lock, flags);				return;			}			memcpy(f->bufaddr, ahin+1, n);		case WIN_WRITE:		case WIN_WRITE_EXT:			break;		case WIN_IDENTIFY:			if (skb->len - sizeof *hin - sizeof *ahin < 512) {				printk(KERN_INFO "aoe: aoecmd_ata_rsp: runt data size "					"in ataid.  skb->len=%d\n", skb->len);				spin_unlock_irqrestore(&d->lock, flags);				return;			}			ataid_complete(d, (char *) (ahin+1));			/* d->flags |= DEVFL_WC_UPDATE; */			break;		default:			printk(KERN_INFO "aoe: aoecmd_ata_rsp: unrecognized "			       "outbound ata command %2.2Xh for %d.%d\n", 			       ahout->cmdstat,			       __be16_to_cpu(*((u16 *) hin->major)),			       hin->minor);		}	}	if (buf) {		buf->nframesout -= 1;		if (buf->nframesout == 0 && buf->resid == 0) {			n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;			bio_endio(buf->bio, buf->bio->bi_size, n);			mempool_free(buf, d->bufpool);		}	}	f->buf = NULL;	f->tag = FREETAG;	aoecmd_work(d);	sl = d->skblist;	d->skblist = NULL;	spin_unlock_irqrestore(&d->lock, flags);	aoenet_xmit(sl);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/63e9cc5d6fbe8b58ea1ee96439d356cbf726fbc0/aoecmd.c/buggy/drivers/block/aoe/aoecmd.c