Lines Matching refs:rio2
221 struct aac_raw_io2 *rio2, int sg_max);
225 static int aac_convert_sgraw2(struct aac_raw_io2 *rio2,
3962 struct aac_raw_io2 *rio2, int sg_max)
3979 rio2->sge[i].addrHigh = cpu_to_le32((u32)(addr>>32));
3980 rio2->sge[i].addrLow = cpu_to_le32((u32)(addr & 0xffffffff));
3982 rio2->sge[i].length = cur_size;
3983 rio2->sge[i].flags = 0;
3986 rio2->sgeFirstSize = cur_size;
3988 rio2->sgeNominalSize = cur_size;
3990 } else if ((i+1) < nseg && cur_size != rio2->sgeNominalSize) {
4000 u32 temp = le32_to_cpu(rio2->sge[i-1].length) -
4002 rio2->sge[i-1].length = cpu_to_le32(temp);
4006 rio2->sgeCnt = cpu_to_le32(nseg);
4007 rio2->flags |= cpu_to_le16(RIO2_SG_FORMAT_IEEE1212);
4015 if (rio2->sge[j].length % (i*PAGE_SIZE)) {
4019 nseg_new += (rio2->sge[j].length / (i*PAGE_SIZE));
4025 int ret = aac_convert_sgraw2(rio2, i, nseg, nseg_new);
4031 rio2->flags |= cpu_to_le16(RIO2_SGL_CONFORMANT);
4042 static int aac_convert_sgraw2(struct aac_raw_io2 *rio2, int pages, int nseg, int nseg_new)
4056 for (j = 0; j < rio2->sge[i].length / (pages * PAGE_SIZE); ++j) {
4057 addr_low = rio2->sge[i].addrLow + j * pages * PAGE_SIZE;
4059 sge[pos].addrHigh = rio2->sge[i].addrHigh;
4060 if (addr_low < rio2->sge[i].addrLow)
4067 sge[pos] = rio2->sge[nseg-1];
4068 memcpy(&rio2->sge[1], &sge[1], (nseg_new-1)*sizeof(struct sge_ieee1212));
4071 rio2->sgeCnt = cpu_to_le32(nseg_new);
4072 rio2->flags |= cpu_to_le16(RIO2_SGL_CONFORMANT);
4073 rio2->sgeNominalSize = pages * PAGE_SIZE;