> > + switch (gen.command.OpCode) { > > + case GDT_IOCTL: > > + gen.command.u.ioctl.p_param = paddr; > > + break; > > + case CACHESERVICE: > > + gdth_ioc_cacheservice(ha, &gen, paddr); > > + break; > > + case SCSIRAWSERVICE: > > + gdth_ioc_scsiraw(ha, &gen, paddr); > > + break; > > + default: > > + goto out_free_buf; > > } > > - } > > AFAICT, CACHESERVICE never gets assigned to command.OpCode. Thanks, fixed. > > - } > > - gdth_ioctl_free(ha, gen.data_len+gen.sense_len, buf, paddr); > > - return 0; > > + return 0; > > This appears to be wrong also. I think you wanted, > return rval; Also fixed.