struct scatterlist *sg = qc->sg; 
struct scatterlist *sg = qc->__sg; 
static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes){	int do_write = (qc->tf.flags & ATA_TFLAG_WRITE);	struct scatterlist *sg = qc->sg;	struct ata_port *ap = qc->ap;	struct page *page;	unsigned char *buf;	unsigned int offset, count;	if (qc->curbytes + bytes >= qc->nbytes)		ap->pio_task_state = PIO_ST_LAST;next_sg:	if (unlikely(qc->cursg >= qc->n_elem)) {		/*		 * The end of qc->sg is reached and the device expects		 * more data to transfer. In order not to overrun qc->sg		 * and fulfill length specified in the byte count register,		 *    - for read case, discard trailing data from the device		 *    - for write case, padding zero data to the device		 */		u16 pad_buf[1] = { 0 };		unsigned int words = bytes >> 1;		unsigned int i;		if (words) /* warning if bytes > 1 */			printk(KERN_WARNING "ata%u: %u bytes trailing data\n",			       ap->id, bytes);		for (i = 0; i < words; i++)			ata_data_xfer(ap, (unsigned char*)pad_buf, 2, do_write);		ap->pio_task_state = PIO_ST_LAST;		return;	}	sg = &qc->sg[qc->cursg];	page = sg->page;	offset = sg->offset + qc->cursg_ofs;	/* get the current page and offset */	page = nth_page(page, (offset >> PAGE_SHIFT));	offset %= PAGE_SIZE;	/* don't overrun current sg */	count = min(sg->length - qc->cursg_ofs, bytes);	/* don't cross page boundaries */	count = min(count, (unsigned int)PAGE_SIZE - offset);	buf = kmap(page) + offset;	bytes -= count;	qc->curbytes += count;	qc->cursg_ofs += count;	if (qc->cursg_ofs == sg->length) {		qc->cursg++;		qc->cursg_ofs = 0;	}	DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");	/* do the actual data transfer */	ata_data_xfer(ap, buf, count, do_write);	kunmap(page);	if (bytes)		goto next_sg;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cedc9a478d8c6265879dc3839ef3d4849a709184/libata-core.c/buggy/drivers/scsi/libata-core.c