taglinefilesource code
sr_cmd39drivers/scsi/sr_ioctl.cstatic int do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned buflength)
sr_cmd46drivers/scsi/sr_ioctl.c(void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
sr_cmd95drivers/scsi/sr_ioctl.cu_char   sr_cmd[10];
sr_cmd110drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd111drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd112drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd113drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd114drivers/scsi/sr_ioctl.csr_cmd[8] = 0;
sr_cmd115drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd117drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd122drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd123drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd124drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd125drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd126drivers/scsi/sr_ioctl.csr_cmd[8] = 1;
sr_cmd127drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd129drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd138drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_MSF;
sr_cmd139drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd140drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd141drivers/scsi/sr_ioctl.csr_cmd[3] = msf.cdmsf_min0;
sr_cmd142drivers/scsi/sr_ioctl.csr_cmd[4] = msf.cdmsf_sec0;
sr_cmd143drivers/scsi/sr_ioctl.csr_cmd[5] = msf.cdmsf_frame0;
sr_cmd144drivers/scsi/sr_ioctl.csr_cmd[6] = msf.cdmsf_min1;
sr_cmd145drivers/scsi/sr_ioctl.csr_cmd[7] = msf.cdmsf_sec1;
sr_cmd146drivers/scsi/sr_ioctl.csr_cmd[8] = msf.cdmsf_frame1;
sr_cmd147drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd149drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd158drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_TI;
sr_cmd159drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd160drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd161drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd162drivers/scsi/sr_ioctl.csr_cmd[4] = ti.cdti_trk0;
sr_cmd163drivers/scsi/sr_ioctl.csr_cmd[5] = ti.cdti_ind0;
sr_cmd164drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd165drivers/scsi/sr_ioctl.csr_cmd[7] = ti.cdti_trk1;
sr_cmd166drivers/scsi/sr_ioctl.csr_cmd[8] = ti.cdti_ind1;
sr_cmd167drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd169drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd179drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd180drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd181drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd182drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd183drivers/scsi/sr_ioctl.csr_cmd[7] = 0;              /* MSB of length (12) */
sr_cmd184drivers/scsi/sr_ioctl.csr_cmd[8] = 12;             /* LSB of length */
sr_cmd185drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd190drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 12);
sr_cmd213drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd214drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd215drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd216drivers/scsi/sr_ioctl.csr_cmd[6] = tocentry.cdte_track;
sr_cmd217drivers/scsi/sr_ioctl.csr_cmd[7] = 0;             /* MSB of length (12)  */
sr_cmd218drivers/scsi/sr_ioctl.csr_cmd[8] = 12;            /* LSB of length */
sr_cmd219drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd224drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 12);
sr_cmd246drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd247drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd248drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd249drivers/scsi/sr_ioctl.csr_cmd[4] = 0;
sr_cmd251drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd255drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd256drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd257drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd258drivers/scsi/sr_ioctl.csr_cmd[4] = 1;
sr_cmd260drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd267drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd268drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 1;
sr_cmd269drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd270drivers/scsi/sr_ioctl.csr_cmd[4] = 0x02;
sr_cmd272drivers/scsi/sr_ioctl.cif (!(result = do_ioctl(target, sr_cmd, NULL, 255)))
sr_cmd287drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd288drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd289drivers/scsi/sr_ioctl.csr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
sr_cmd290drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd291drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd292drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd297drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, buffer, 28))) {
sr_cmd303drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd304drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd305drivers/scsi/sr_ioctl.csr_cmd[2] = 0x4e;   /* Want the mask for mode page 0xe */
sr_cmd306drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd307drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd308drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd316drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, mask, 28))) {
sr_cmd331drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SELECT;
sr_cmd332drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 0x10;    /* Params are SCSI-2 */
sr_cmd333drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = 0;
sr_cmd334drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd335drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd337drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 28);
sr_cmd348drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_SUBCHANNEL;
sr_cmd349drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd350drivers/scsi/sr_ioctl.csr_cmd[2] = 0x40;    /* I do want the subchannel info */
sr_cmd351drivers/scsi/sr_ioctl.csr_cmd[3] = 0x01;    /* Give me current position info */
sr_cmd352drivers/scsi/sr_ioctl.csr_cmd[4] = sr_cmd[5] = 0;
sr_cmd353drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd354drivers/scsi/sr_ioctl.csr_cmd[7] = 0;
sr_cmd355drivers/scsi/sr_ioctl.csr_cmd[8] = 16;
sr_cmd356drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd361drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 16);