assert(sg != NULL); 
assert(qc->__sg != NULL); 
static void ata_fill_sg(struct ata_queued_cmd *qc){	struct scatterlist *sg = qc->sg;	struct ata_port *ap = qc->ap;	unsigned int idx, nelem;	assert(sg != NULL);	assert(qc->n_elem > 0);	idx = 0;	for (nelem = qc->n_elem; nelem; nelem--,sg++) {		u32 addr, offset;		u32 sg_len, len;		/* determine if physical DMA addr spans 64K boundary.		 * Note h/w doesn't support 64-bit, so we unconditionally		 * truncate dma_addr_t to u32.		 */		addr = (u32) sg_dma_address(sg);		sg_len = sg_dma_len(sg);		while (sg_len) {			offset = addr & 0xffff;			len = sg_len;			if ((offset + sg_len) > 0x10000)				len = 0x10000 - offset;			ap->prd[idx].addr = cpu_to_le32(addr);			ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff);			VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);			idx++;			sg_len -= len;			addr += len;		}	}	if (idx)		ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cedc9a478d8c6265879dc3839ef3d4849a709184/libata-core.c/clean/drivers/scsi/libata-core.c