taglinefilesource code
sr_cmd41drivers/scsi/sr_ioctl.cstatic int do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned buflength)
sr_cmd51drivers/scsi/sr_ioctl.c(void *) sr_cmd, buffer, buflength, sr_ioctl_done, 
sr_cmd93drivers/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_cmd140drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_MSF;
sr_cmd141drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd142drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd143drivers/scsi/sr_ioctl.csr_cmd[3] = msf.cdmsf_min0;
sr_cmd144drivers/scsi/sr_ioctl.csr_cmd[4] = msf.cdmsf_sec0;
sr_cmd145drivers/scsi/sr_ioctl.csr_cmd[5] = msf.cdmsf_frame0;
sr_cmd146drivers/scsi/sr_ioctl.csr_cmd[6] = msf.cdmsf_min1;
sr_cmd147drivers/scsi/sr_ioctl.csr_cmd[7] = msf.cdmsf_sec1;
sr_cmd148drivers/scsi/sr_ioctl.csr_cmd[8] = msf.cdmsf_frame1;
sr_cmd149drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd151drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd164drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO10;
sr_cmd165drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd166drivers/scsi/sr_ioctl.csr_cmd[2] = blk.from >> 24;
sr_cmd167drivers/scsi/sr_ioctl.csr_cmd[3] = blk.from >> 16;
sr_cmd168drivers/scsi/sr_ioctl.csr_cmd[4] = blk.from >> 8;
sr_cmd169drivers/scsi/sr_ioctl.csr_cmd[5] = blk.from;
sr_cmd170drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd171drivers/scsi/sr_ioctl.csr_cmd[7] = blk.len >> 8;
sr_cmd172drivers/scsi/sr_ioctl.csr_cmd[8] = blk.len;
sr_cmd173drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd175drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd188drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_PLAYAUDIO_TI;
sr_cmd189drivers/scsi/sr_ioctl.csr_cmd[1] = scsi_CDs[target].device->lun << 5;
sr_cmd190drivers/scsi/sr_ioctl.csr_cmd[2] = 0;
sr_cmd191drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd192drivers/scsi/sr_ioctl.csr_cmd[4] = ti.cdti_trk0;
sr_cmd193drivers/scsi/sr_ioctl.csr_cmd[5] = ti.cdti_ind0;
sr_cmd194drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd195drivers/scsi/sr_ioctl.csr_cmd[7] = ti.cdti_trk1;
sr_cmd196drivers/scsi/sr_ioctl.csr_cmd[8] = ti.cdti_ind1;
sr_cmd197drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd199drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
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);
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] = 0;
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_cmd245drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_TOC;
sr_cmd246drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) |
sr_cmd248drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
sr_cmd249drivers/scsi/sr_ioctl.csr_cmd[6] = tocentry.cdte_track;
sr_cmd250drivers/scsi/sr_ioctl.csr_cmd[7] = 0;             /* MSB of length (12)  */
sr_cmd251drivers/scsi/sr_ioctl.csr_cmd[8] = 12;            /* LSB of length */
sr_cmd252drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd257drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 12);
sr_cmd282drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd283drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd284drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd285drivers/scsi/sr_ioctl.csr_cmd[4] = 0;
sr_cmd287drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd291drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd292drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 1;
sr_cmd293drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd294drivers/scsi/sr_ioctl.csr_cmd[4] = 1;
sr_cmd296drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, NULL, 255);
sr_cmd300drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd301drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5);
sr_cmd302drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd303drivers/scsi/sr_ioctl.csr_cmd[4] = 0x03;
sr_cmd305drivers/scsi/sr_ioctl.cif ((result = do_ioctl(target, sr_cmd, NULL, 255)))
sr_cmd326drivers/scsi/sr_ioctl.csr_cmd[0] = START_STOP;
sr_cmd327drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 1;
sr_cmd328drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
sr_cmd329drivers/scsi/sr_ioctl.csr_cmd[4] = 0x02;
sr_cmd331drivers/scsi/sr_ioctl.cif (!(result = do_ioctl(target, sr_cmd, NULL, 255)))
sr_cmd352drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd353drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd354drivers/scsi/sr_ioctl.csr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
sr_cmd355drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd356drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd357drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd362drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, buffer, 28))) {
sr_cmd368drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd369drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd370drivers/scsi/sr_ioctl.csr_cmd[2] = 0x4e;   /* Want the mask for mode page 0xe */
sr_cmd371drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd372drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd373drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd381drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, mask, 28))) {
sr_cmd396drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SELECT;
sr_cmd397drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 0x10;    /* Params are SCSI-2 */
sr_cmd398drivers/scsi/sr_ioctl.csr_cmd[2] = sr_cmd[3] = 0;
sr_cmd399drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd400drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd402drivers/scsi/sr_ioctl.cresult = do_ioctl (target, sr_cmd, buffer, 28);
sr_cmd418drivers/scsi/sr_ioctl.csr_cmd[0] = MODE_SENSE;
sr_cmd419drivers/scsi/sr_ioctl.csr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
sr_cmd420drivers/scsi/sr_ioctl.csr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
sr_cmd421drivers/scsi/sr_ioctl.csr_cmd[3] = 0;
sr_cmd422drivers/scsi/sr_ioctl.csr_cmd[4] = 28;
sr_cmd423drivers/scsi/sr_ioctl.csr_cmd[5] = 0;
sr_cmd428drivers/scsi/sr_ioctl.cif ((result = do_ioctl (target, sr_cmd, buffer, 28))) {
sr_cmd451drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_SUBCHANNEL;
sr_cmd452drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
sr_cmd453drivers/scsi/sr_ioctl.csr_cmd[2] = 0x40;    /* I do want the subchannel info */
sr_cmd454drivers/scsi/sr_ioctl.csr_cmd[3] = 0x01;    /* Give me current position info */
sr_cmd455drivers/scsi/sr_ioctl.csr_cmd[4] = sr_cmd[5] = 0;
sr_cmd456drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd457drivers/scsi/sr_ioctl.csr_cmd[7] = 0;
sr_cmd458drivers/scsi/sr_ioctl.csr_cmd[8] = 16;
sr_cmd459drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd464drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 16);
sr_cmd493drivers/scsi/sr_ioctl.csr_cmd[0] = SCMD_READ_SUBCHANNEL;
sr_cmd494drivers/scsi/sr_ioctl.csr_cmd[1] = ((scsi_CDs[target].device->lun) << 5);
sr_cmd495drivers/scsi/sr_ioctl.csr_cmd[2] = 0x40;    /* I do want the subchannel info */
sr_cmd496drivers/scsi/sr_ioctl.csr_cmd[3] = 0x02;    /* Give me medium catalog number info */
sr_cmd497drivers/scsi/sr_ioctl.csr_cmd[4] = sr_cmd[5] = 0;
sr_cmd498drivers/scsi/sr_ioctl.csr_cmd[6] = 0;
sr_cmd499drivers/scsi/sr_ioctl.csr_cmd[7] = 0;
sr_cmd500drivers/scsi/sr_ioctl.csr_cmd[8] = 24;
sr_cmd501drivers/scsi/sr_ioctl.csr_cmd[9] = 0;
sr_cmd506drivers/scsi/sr_ioctl.cresult = do_ioctl(target, sr_cmd, buffer, 24);