Lines Matching refs:gen
4166 gdth_ioctl_general gen; in ioc_general() local
4172 if (copy_from_user(&gen, arg, sizeof(gdth_ioctl_general))) in ioc_general()
4174 ha = gdth_find_ha(gen.ionode); in ioc_general()
4177 if (gen.data_len + gen.sense_len != 0) { in ioc_general()
4178 if (!(buf = gdth_ioctl_alloc(ha, gen.data_len + gen.sense_len, in ioc_general()
4182 gen.data_len + gen.sense_len)) { in ioc_general()
4183 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); in ioc_general()
4187 if (gen.command.OpCode == GDT_IOCTL) { in ioc_general()
4188 gen.command.u.ioctl.p_param = paddr; in ioc_general()
4189 } else if (gen.command.Service == CACHESERVICE) { in ioc_general()
4192 gen.command.u.cache64.BlockCnt = gen.command.u.cache.BlockCnt; in ioc_general()
4193 gen.command.u.cache64.BlockNo = gen.command.u.cache.BlockNo; in ioc_general()
4194 gen.command.u.cache64.DeviceNo = gen.command.u.cache.DeviceNo; in ioc_general()
4197 gen.command.u.cache64.DestAddr = (ulong64)-1; in ioc_general()
4198 gen.command.u.cache64.sg_canz = 1; in ioc_general()
4199 gen.command.u.cache64.sg_lst[0].sg_ptr = paddr; in ioc_general()
4200 gen.command.u.cache64.sg_lst[0].sg_len = gen.data_len; in ioc_general()
4201 gen.command.u.cache64.sg_lst[1].sg_len = 0; in ioc_general()
4203 gen.command.u.cache64.DestAddr = paddr; in ioc_general()
4204 gen.command.u.cache64.sg_canz = 0; in ioc_general()
4208 gen.command.u.cache.DestAddr = 0xffffffff; in ioc_general()
4209 gen.command.u.cache.sg_canz = 1; in ioc_general()
4210 gen.command.u.cache.sg_lst[0].sg_ptr = (ulong32)paddr; in ioc_general()
4211 gen.command.u.cache.sg_lst[0].sg_len = gen.data_len; in ioc_general()
4212 gen.command.u.cache.sg_lst[1].sg_len = 0; in ioc_general()
4214 gen.command.u.cache.DestAddr = paddr; in ioc_general()
4215 gen.command.u.cache.sg_canz = 0; in ioc_general()
4218 } else if (gen.command.Service == SCSIRAWSERVICE) { in ioc_general()
4222 gen.command.u.raw64.sense_len = gen.command.u.raw.sense_len; in ioc_general()
4223 gen.command.u.raw64.bus = gen.command.u.raw.bus; in ioc_general()
4224 gen.command.u.raw64.lun = gen.command.u.raw.lun; in ioc_general()
4225 gen.command.u.raw64.target = gen.command.u.raw.target; in ioc_general()
4226 memcpy(cmd, gen.command.u.raw.cmd, 16); in ioc_general()
4227 memcpy(gen.command.u.raw64.cmd, cmd, 16); in ioc_general()
4228 gen.command.u.raw64.clen = gen.command.u.raw.clen; in ioc_general()
4229 gen.command.u.raw64.sdlen = gen.command.u.raw.sdlen; in ioc_general()
4230 gen.command.u.raw64.direction = gen.command.u.raw.direction; in ioc_general()
4233 gen.command.u.raw64.sdata = (ulong64)-1; in ioc_general()
4234 gen.command.u.raw64.sg_ranz = 1; in ioc_general()
4235 gen.command.u.raw64.sg_lst[0].sg_ptr = paddr; in ioc_general()
4236 gen.command.u.raw64.sg_lst[0].sg_len = gen.data_len; in ioc_general()
4237 gen.command.u.raw64.sg_lst[1].sg_len = 0; in ioc_general()
4239 gen.command.u.raw64.sdata = paddr; in ioc_general()
4240 gen.command.u.raw64.sg_ranz = 0; in ioc_general()
4242 gen.command.u.raw64.sense_data = paddr + gen.data_len; in ioc_general()
4245 gen.command.u.raw.sdata = 0xffffffff; in ioc_general()
4246 gen.command.u.raw.sg_ranz = 1; in ioc_general()
4247 gen.command.u.raw.sg_lst[0].sg_ptr = (ulong32)paddr; in ioc_general()
4248 gen.command.u.raw.sg_lst[0].sg_len = gen.data_len; in ioc_general()
4249 gen.command.u.raw.sg_lst[1].sg_len = 0; in ioc_general()
4251 gen.command.u.raw.sdata = paddr; in ioc_general()
4252 gen.command.u.raw.sg_ranz = 0; in ioc_general()
4254 gen.command.u.raw.sense_data = (ulong32)paddr + gen.data_len; in ioc_general()
4257 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); in ioc_general()
4262 rval = __gdth_execute(ha->sdev, &gen.command, cmnd, gen.timeout, &gen.info); in ioc_general()
4265 gen.status = rval; in ioc_general()
4268 gen.data_len + gen.sense_len)) { in ioc_general()
4269 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); in ioc_general()
4272 if (copy_to_user(arg, &gen, in ioc_general()
4274 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); in ioc_general()
4277 gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); in ioc_general()