skb->next = d->skblist; d->skblist = skb; 
skb->next = NULL; if (d->sendq_hd) d->sendq_tl->next = skb; else d->sendq_hd = skb; d->sendq_tl = skb; 
aoecmd_ata_rw(struct aoedev *d, struct frame *f){	struct aoe_hdr *h;	struct aoe_atahdr *ah;	struct buf *buf;	struct sk_buff *skb;	ulong bcnt;	register sector_t sector;	char writebit, extbit;	writebit = 0x10;	extbit = 0x4;	buf = d->inprocess;	sector = buf->sector;	bcnt = buf->bv_resid;	if (bcnt > MAXATADATA)		bcnt = MAXATADATA;	/* initialize the headers & frame */	h = (struct aoe_hdr *) f->data;	ah = (struct aoe_atahdr *) (h+1);	f->ndata = sizeof *h + sizeof *ah;	memset(h, 0, f->ndata);	f->tag = aoehdr_atainit(d, h);	f->waited = 0;	f->buf = buf;	f->bufaddr = buf->bufaddr;	/* set up ata header */	ah->scnt = bcnt >> 9;	ah->lba0 = sector;	ah->lba1 = sector >>= 8;	ah->lba2 = sector >>= 8;	ah->lba3 = sector >>= 8;	if (d->flags & DEVFL_EXT) {		ah->aflags |= AOEAFL_EXT;		ah->lba4 = sector >>= 8;		ah->lba5 = sector >>= 8;	} else {		extbit = 0;		ah->lba3 &= 0x0f;		ah->lba3 |= 0xe0;	/* LBA bit + obsolete 0xa0 */	}	if (bio_data_dir(buf->bio) == WRITE) {		ah->aflags |= AOEAFL_WRITE;		f->writedatalen = bcnt;	} else {		writebit = 0;		f->writedatalen = 0;	}	ah->cmdstat = WIN_READ | writebit | extbit;	/* mark all tracking fields and load out */	buf->nframesout += 1;	buf->bufaddr += bcnt;	buf->bv_resid -= bcnt;/* printk(KERN_INFO "aoe: bv_resid=%ld\n", buf->bv_resid); */	buf->resid -= bcnt;	buf->sector += bcnt >> 9;	if (buf->resid == 0) {		d->inprocess = NULL;	} else if (buf->bv_resid == 0) {		buf->bv++;		buf->bv_resid = buf->bv->bv_len;		buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;	}	skb = skb_prepare(d, f);	if (skb) {		skb->next = d->skblist;		d->skblist = skb;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a4b38364093bf2094ff858ad45f490521bb87984/aoecmd.c/buggy/drivers/block/aoe/aoecmd.c