if ((qc->cursg_ofs * ATA_SECT_SIZE) == sg_dma_len(&sg[qc->cursg])) { 
if ((qc->cursg_ofs * ATA_SECT_SIZE) == (&sg[qc->cursg])->length) { 
static void ata_pio_sector(struct ata_queued_cmd *qc){	int do_write = (qc->tf.flags & ATA_TFLAG_WRITE);	struct scatterlist *sg = qc->sg;	struct ata_port *ap = qc->ap;	struct page *page;	unsigned int offset;	unsigned char *buf;	if (qc->cursect == (qc->nsect - 1))		ap->pio_task_state = PIO_ST_LAST;	page = sg[qc->cursg].page;	offset = sg[qc->cursg].offset + qc->cursg_ofs * ATA_SECT_SIZE;	/* get the current page and offset */	page = nth_page(page, (offset >> PAGE_SHIFT));	offset %= PAGE_SIZE;	buf = kmap(page) + offset;	qc->cursect++;	qc->cursg_ofs++;	if ((qc->cursg_ofs * ATA_SECT_SIZE) == sg_dma_len(&sg[qc->cursg])) {		qc->cursg++;		qc->cursg_ofs = 0;	}	DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");	/* do the actual data transfer */	do_write = (qc->tf.flags & ATA_TFLAG_WRITE);	ata_data_xfer(ap, buf, ATA_SECT_SIZE, do_write);	kunmap(page);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/32529e0128923e42126b5d14e444c18295a452ba/libata-core.c/clean/drivers/scsi/libata-core.c