taglinefilesource code
sr_cmd43drivers/scsi/sr_ioctl.cstatic int do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned buflength)
sr_cmd50drivers/scsi/sr_ioctl.c(void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
sr_cmd99drivers/scsi/sr_ioctl.cu_char  sr_cmd[10];
sr_cmd114drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd115drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd116drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd117drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd118drivers/scsi/sr_ioctl.csr_cmd[8] = 0;
sr_cmd119drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd121drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd126drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd127drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd128drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd129drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd130drivers/scsi/sr_ioctl.csr_cmd[8] = 1;
sr_cmd131drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd133drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd146drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_MSF;
sr_cmd147drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd148drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd149drivers/scsi/sr_ioctl.csr_cmd[3] = msf.cdmsf_min0;
sr_cmd150drivers/scsi/sr_ioctl.csr_cmd[4] = msf.cdmsf_sec0;
sr_cmd151drivers/scsi/sr_ioctl.csr_cmd[5] = msf.cdmsf_frame0;
sr_cmd152drivers/scsi/sr_ioctl.csr_cmd[6] = msf.cdmsf_min1;
sr_cmd153drivers/scsi/sr_ioctl.csr_cmd[7] = msf.cdmsf_sec1;
sr_cmd154drivers/scsi/sr_ioctl.csr_cmd[8] = msf.cdmsf_frame1;
sr_cmd155drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd157drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd170drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_TI;
sr_cmd171drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd172drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd173drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd174drivers/scsi/sr_ioctl.csr_cmd[4] = ti.cdti_trk0;
sr_cmd175drivers/scsi/sr_ioctl.csr_cmd[5] = ti.cdti_ind0;
sr_cmd176drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd177drivers/scsi/sr_ioctl.csr_cmd[7] = ti.cdti_trk1;
sr_cmd178drivers/scsi/sr_ioctl.csr_cmd[8] = ti.cdti_ind1;
sr_cmd179drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd181drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd191drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd192drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd193drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd194drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd195drivers/scsi/sr_ioctl.csr_cmd[7] = 0;              /* MSB of length (12) */
sr_cmd196drivers/scsi/sr_ioctl.csr_cmd[8] = 12;             /* LSB of length */
sr_cmd197drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd202drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 12);
sr_cmd227drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd228drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd229drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd230drivers/scsi/sr_ioctl.csr_cmd[6] = tocentry.cdte_track;
sr_cmd231drivers/scsi/sr_ioctl.csr_cmd[7] = 0;             /* MSB of length (12)  */
sr_cmd232drivers/scsi/sr_ioctl.csr_cmd[8] = 12;            /* LSB of length */
sr_cmd233drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd238drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 12);
sr_cmd260drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd261drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd262drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd263drivers/scsi/sr_ioctl.csr_cmd[4] = 0;
sr_cmd265drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd269drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd270drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd271drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd272drivers/scsi/sr_ioctl.csr_cmd[4] = 1;
sr_cmd274drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd285drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd286drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 1;
sr_cmd287drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd288drivers/scsi/sr_ioctl.csr_cmd[4] = 0x02;
sr_cmd290drivers/scsi/sr_ioctl.cif (!(result = do_ioctl(target, sr_cmd, NULL, 255)))
sr_cmd311drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd312drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd313drivers/scsi/sr_ioctl.csr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
sr_cmd314drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd315drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd316drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd321drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, buffer, 28))) {
sr_cmd327drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd328drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd329drivers/scsi/sr_ioctl.csr_cmd[2] = 0x4e;   /* Want the mask for mode page 0xe */
sr_cmd330drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd331drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd332drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd340drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, mask, 28))) {
sr_cmd355drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SELECT;
sr_cmd356drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 0x10;    /* Params are SCSI-2 */
sr_cmd357drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = 0;
sr_cmd358drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd359drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd361drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 28);
sr_cmd372drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_SUBCHANNEL;
sr_cmd373drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd374drivers/scsi/sr_ioctl.csr_cmd[2] = 0x40;    /* I do want the subchannel info */
sr_cmd375drivers/scsi/sr_ioctl.csr_cmd[3] = 0x01;    /* Give me current position info */
sr_cmd376drivers/scsi/sr_ioctl.csr_cmd[4] = sr_cmd[5] = 0;
sr_cmd377drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd378drivers/scsi/sr_ioctl.csr_cmd[7] = 0;
sr_cmd379drivers/scsi/sr_ioctl.csr_cmd[8] = 16;
sr_cmd380drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd385drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 16);