taglinefilesource code
sr_cmd41drivers/scsi/sr_ioctl.cstatic int do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned buflength)
sr_cmd48drivers/scsi/sr_ioctl.c(void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
sr_cmd95drivers/scsi/sr_ioctl.cu_char   sr_cmd[10];
sr_cmd108drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd109drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd110drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd111drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd112drivers/scsi/sr_ioctl.csr_cmd[8] = 0;
sr_cmd113drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd115drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd120drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PAUSE_RESUME;
sr_cmd121drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd122drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = 0;
sr_cmd123drivers/scsi/sr_ioctl.csr_cmd[5] = sr_cmd[6] = sr_cmd[7] = 0;
sr_cmd124drivers/scsi/sr_ioctl.csr_cmd[8] = 1;
sr_cmd125drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd127drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd136drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_MSF;
sr_cmd137drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd138drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd139drivers/scsi/sr_ioctl.csr_cmd[3] = msf.cdmsf_min0;
sr_cmd140drivers/scsi/sr_ioctl.csr_cmd[4] = msf.cdmsf_sec0;
sr_cmd141drivers/scsi/sr_ioctl.csr_cmd[5] = msf.cdmsf_frame0;
sr_cmd142drivers/scsi/sr_ioctl.csr_cmd[6] = msf.cdmsf_min1;
sr_cmd143drivers/scsi/sr_ioctl.csr_cmd[7] = msf.cdmsf_sec1;
sr_cmd144drivers/scsi/sr_ioctl.csr_cmd[8] = msf.cdmsf_frame1;
sr_cmd145drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd147drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd156drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_TI;
sr_cmd157drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd158drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd159drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd160drivers/scsi/sr_ioctl.csr_cmd[4] = ti.cdti_trk0;
sr_cmd161drivers/scsi/sr_ioctl.csr_cmd[5] = ti.cdti_ind0;
sr_cmd162drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd163drivers/scsi/sr_ioctl.csr_cmd[7] = ti.cdti_trk1;
sr_cmd164drivers/scsi/sr_ioctl.csr_cmd[8] = ti.cdti_ind1;
sr_cmd165drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd167drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd177drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd178drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd179drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd180drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd181drivers/scsi/sr_ioctl.csr_cmd[7] = 0;              /* MSB of length (12) */
sr_cmd182drivers/scsi/sr_ioctl.csr_cmd[8] = 12;             /* LSB of length */
sr_cmd183drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd188drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 12);
sr_cmd209drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd210drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd211drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd212drivers/scsi/sr_ioctl.csr_cmd[6] = tocentry.cdte_track;
sr_cmd213drivers/scsi/sr_ioctl.csr_cmd[7] = 0;             /* MSB of length (12)  */
sr_cmd214drivers/scsi/sr_ioctl.csr_cmd[8] = 12;            /* LSB of length */
sr_cmd215drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd220drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 12);
sr_cmd240drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd241drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd242drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd243drivers/scsi/sr_ioctl.csr_cmd[4] = 0;
sr_cmd245drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd249drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd250drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd251drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd252drivers/scsi/sr_ioctl.csr_cmd[4] = 1;
sr_cmd254drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd261drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd262drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 1;
sr_cmd263drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd264drivers/scsi/sr_ioctl.csr_cmd[4] = 0x02;
sr_cmd266drivers/scsi/sr_ioctl.cif (!(result = do_ioctl(target, sr_cmd, NULL, 255)))
sr_cmd281drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd282drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd283drivers/scsi/sr_ioctl.csr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
sr_cmd284drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd285drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd286drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd291drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, buffer, 28))) {
sr_cmd297drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd298drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd299drivers/scsi/sr_ioctl.csr_cmd[2] = 0x4e;   /* Want the mask for mode page 0xe */
sr_cmd300drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd301drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd302drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd310drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, mask, 28))) {
sr_cmd325drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SELECT;
sr_cmd326drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 0x10;    /* Params are SCSI-2 */
sr_cmd327drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = 0;
sr_cmd328drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd329drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd331drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 28);
sr_cmd342drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_SUBCHANNEL;
sr_cmd343drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd344drivers/scsi/sr_ioctl.csr_cmd[2] = 0x40;    /* I do want the subchannel info */
sr_cmd345drivers/scsi/sr_ioctl.csr_cmd[3] = 0x01;    /* Give me current position info */
sr_cmd346drivers/scsi/sr_ioctl.csr_cmd[4] = sr_cmd[5] = 0;
sr_cmd347drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd348drivers/scsi/sr_ioctl.csr_cmd[7] = 0;
sr_cmd349drivers/scsi/sr_ioctl.csr_cmd[8] = 16;
sr_cmd350drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd355drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 16);