Lines Matching refs:rio2
220 struct aac_raw_io2 *rio2, int sg_max);
224 static int aac_convert_sgraw2(struct aac_raw_io2 *rio2,
3926 struct aac_raw_io2 *rio2, int sg_max)
3943 rio2->sge[i].addrHigh = cpu_to_le32((u32)(addr>>32));
3944 rio2->sge[i].addrLow = cpu_to_le32((u32)(addr & 0xffffffff));
3946 rio2->sge[i].length = cur_size;
3947 rio2->sge[i].flags = 0;
3950 rio2->sgeFirstSize = cur_size;
3952 rio2->sgeNominalSize = cur_size;
3954 } else if ((i+1) < nseg && cur_size != rio2->sgeNominalSize) {
3964 u32 temp = le32_to_cpu(rio2->sge[i-1].length) -
3966 rio2->sge[i-1].length = cpu_to_le32(temp);
3970 rio2->sgeCnt = cpu_to_le32(nseg);
3971 rio2->flags |= cpu_to_le16(RIO2_SG_FORMAT_IEEE1212);
3979 if (rio2->sge[j].length % (i*PAGE_SIZE)) {
3983 nseg_new += (rio2->sge[j].length / (i*PAGE_SIZE));
3989 int ret = aac_convert_sgraw2(rio2, i, nseg, nseg_new);
3995 rio2->flags |= cpu_to_le16(RIO2_SGL_CONFORMANT);
4006 static int aac_convert_sgraw2(struct aac_raw_io2 *rio2, int pages, int nseg, int nseg_new)
4020 for (j = 0; j < rio2->sge[i].length / (pages * PAGE_SIZE); ++j) {
4021 addr_low = rio2->sge[i].addrLow + j * pages * PAGE_SIZE;
4023 sge[pos].addrHigh = rio2->sge[i].addrHigh;
4024 if (addr_low < rio2->sge[i].addrLow)
4031 sge[pos] = rio2->sge[nseg-1];
4032 memcpy(&rio2->sge[1], &sge[1], (nseg_new-1)*sizeof(struct sge_ieee1212));
4035 rio2->sgeCnt = cpu_to_le32(nseg_new);
4036 rio2->flags |= cpu_to_le16(RIO2_SGL_CONFORMANT);
4037 rio2->sgeNominalSize = pages * PAGE_SIZE;