taglinefilesource code
stuffp272drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp274drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp285drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp286drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1))
stuffp299drivers/cdrom/mcdx.cif ((ti.cdti_trk0 < stuffp->di.n_first)
stuffp300drivers/cdrom/mcdx.c|| (ti.cdti_trk0 > stuffp->di.n_last)
stuffp301drivers/cdrom/mcdx.c|| (ti.cdti_trk1 < stuffp->di.n_first))
stuffp303drivers/cdrom/mcdx.cif (ti.cdti_trk1 > stuffp->di.n_last) ti.cdti_trk1 = stuffp->di.n_last;
stuffp306drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, &ti);
stuffp315drivers/cdrom/mcdx.cif ((stuffp->audiostatus == CDROM_AUDIO_PLAY)
stuffp316drivers/cdrom/mcdx.c&& (-1 == mcdx_hold(stuffp, 1))) return -EIO;
stuffp332drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp337drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, NULL);
stuffp347drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp353drivers/cdrom/mcdx.ctp = &stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1];
stuffp354drivers/cdrom/mcdx.celse if (entry.cdte_track > stuffp->di.n_last 
stuffp355drivers/cdrom/mcdx.c|| entry.cdte_track < stuffp->di.n_first) return -EINVAL;
stuffp356drivers/cdrom/mcdx.celse tp = &stuffp->toc[entry.cdte_track - stuffp->di.n_first];
stuffp389drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 2)) return -EIO;
stuffp391drivers/cdrom/mcdx.cTRACE((SUBCHNL, "audiostatus: %x\n", stuffp->audiostatus));
stuffp392drivers/cdrom/mcdx.csub.cdsc_audiostatus = stuffp->audiostatus;
stuffp438drivers/cdrom/mcdx.ctoc.cdth_trk0 = stuffp->di.n_first;
stuffp439drivers/cdrom/mcdx.ctoc.cdth_trk1 = stuffp->di.n_last;
stuffp442drivers/cdrom/mcdx.cstuffp->di.n_first, stuffp->di.n_last));
stuffp448drivers/cdrom/mcdx.cif (stuffp->audiostatus != CDROM_AUDIO_PLAY) return -EINVAL;
stuffp449drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1)) return -EIO;
stuffp450drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PAUSED;
stuffp451drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &stuffp->start, 1))
stuffp466drivers/cdrom/mcdx.cms.addr.msf.minute = bcd2uint(stuffp->multi.msf_last.minute);
stuffp467drivers/cdrom/mcdx.cms.addr.msf.second = bcd2uint(stuffp->multi.msf_last.second);
stuffp468drivers/cdrom/mcdx.cms.addr.msf.frame = bcd2uint(stuffp->multi.msf_last.frame);
stuffp470drivers/cdrom/mcdx.cms.addr.lba = msf2log(&stuffp->multi.msf_last);
stuffp473drivers/cdrom/mcdx.cms.xa_flag = !!stuffp->multi.multi;
stuffp487drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp488drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp489drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp496drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp497drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp498drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp505drivers/cdrom/mcdx.cif (stuffp->users > 1) return -EBUSY;
stuffp506drivers/cdrom/mcdx.cif (-1 == mcdx_eject(stuffp, 1)) return -EIO;
stuffp511drivers/cdrom/mcdx.cstuffp->eject_sw = arg;
stuffp527drivers/cdrom/mcdx.creturn mcdx_setattentuator(stuffp, &volctrl, 1);
stuffp539drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp550drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(CURRENT->rq_dev)];
stuffp551drivers/cdrom/mcdx.cTRACE((REQUEST, "do_request() stuffp = %p\n", stuffp));
stuffp556drivers/cdrom/mcdx.cif ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) {
stuffp563drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp576drivers/cdrom/mcdx.cstuffp->status = 0;
stuffp581drivers/cdrom/mcdx.cstuffp,
stuffp586drivers/cdrom/mcdx.cif (stuffp->status & MCDX_ST_EOM) {
stuffp616drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp619drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp620drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp623drivers/cdrom/mcdx.cif (-1 == mcdx_getstatus(stuffp, 1)) return -EIO;
stuffp630drivers/cdrom/mcdx.cif (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_DOOR) {
stuffp631drivers/cdrom/mcdx.cif (jiffies - stuffp->ejected < ACLOSE_INHIBIT) return -EIO;
stuffp632drivers/cdrom/mcdx.cif (stuffp->autoclose) mcdx_closedoor(stuffp, 1);
stuffp637drivers/cdrom/mcdx.cif (stuffp->xxx) {
stuffp645drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp650drivers/cdrom/mcdx.cstuffp, &stuffp->multi, 6)) {
stuffp652drivers/cdrom/mcdx.cstuffp->autoclose = 0;
stuffp656drivers/cdrom/mcdx.cstuffp->autoclose = 1;
stuffp659drivers/cdrom/mcdx.cif (stuffp->multi.multi > 2)
stuffp661drivers/cdrom/mcdx.cstuffp->multi.multi));
stuffp665drivers/cdrom/mcdx.cif (!stuffp->multi.multi)
stuffp666drivers/cdrom/mcdx.cstuffp->multi.msf_last.second = 2;
stuffp669drivers/cdrom/mcdx.cstuffp->multi.multi,
stuffp670drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp671drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp672drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp677drivers/cdrom/mcdx.cif (-1 == mcdx_requesttocdata(stuffp, &stuffp->di, 1)) {
stuffp679drivers/cdrom/mcdx.cstuffp->lastsector = -1;
stuffp683drivers/cdrom/mcdx.cstuffp->lastsector = (CD_FRAMESIZE / 512) 
stuffp684drivers/cdrom/mcdx.c* msf2log(&stuffp->di.msf_leadout) - 1;
stuffp687drivers/cdrom/mcdx.cstuffp->di.n_first,
stuffp688drivers/cdrom/mcdx.cstuffp->di.msf_first.minute,
stuffp689drivers/cdrom/mcdx.cstuffp->di.msf_first.second,
stuffp690drivers/cdrom/mcdx.cstuffp->di.msf_first.frame,
stuffp691drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_first)));
stuffp693drivers/cdrom/mcdx.cstuffp->di.n_last,
stuffp694drivers/cdrom/mcdx.cstuffp->di.msf_leadout.minute,
stuffp695drivers/cdrom/mcdx.cstuffp->di.msf_leadout.second,
stuffp696drivers/cdrom/mcdx.cstuffp->di.msf_leadout.frame,
stuffp697drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_leadout)));
stuffp700drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp701drivers/cdrom/mcdx.cTRACE((MALLOC, "open() free old toc @ %p\n", stuffp->toc));
stuffp702drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp704drivers/cdrom/mcdx.cstuffp->toc = NULL;
stuffp708drivers/cdrom/mcdx.cif (-1 == mcdx_config(stuffp, 1)) return -EIO;
stuffp712drivers/cdrom/mcdx.cWARN(("AAA %x AAA\n", stuffp->readcmd));
stuffp713drivers/cdrom/mcdx.cif (stuffp->readerrs) stuffp->readcmd = READ1X;
stuffp714drivers/cdrom/mcdx.celse stuffp->readcmd = 
stuffp715drivers/cdrom/mcdx.cstuffp->present | SINGLE ? READ1X : READ2X;
stuffp716drivers/cdrom/mcdx.cWARN(("XXX %x XXX\n", stuffp->readcmd));
stuffp720drivers/cdrom/mcdx.cif (stuffp->lastsector >= 0) {
stuffp725drivers/cdrom/mcdx.cstuffp->xa = 0;
stuffp726drivers/cdrom/mcdx.cstuffp->audio = 0;
stuffp730drivers/cdrom/mcdx.cstuffp->introk = 1;
stuffp733drivers/cdrom/mcdx.cstuffp->xa ? "XA" : "normal"));
stuffp736drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_setdatamode(stuffp, 
stuffp737drivers/cdrom/mcdx.cstuffp->xa ? MODE2 : MODE1, 1))) {
stuffp739drivers/cdrom/mcdx.cstuffp->xa = 0;
stuffp743drivers/cdrom/mcdx.cif ((stuffp->audio = e_audio(ans))) break; 
stuffp745drivers/cdrom/mcdx.cwhile (0 == (ans = mcdx_transfer(stuffp, buf, 0, 1))) 
stuffp749drivers/cdrom/mcdx.cstuffp->xa = !stuffp->xa; 
stuffp755drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, 
stuffp756drivers/cdrom/mcdx.cstuffp->xa ? RAW : COOKED, 1))
stuffp759drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp761drivers/cdrom/mcdx.c} else if (stuffp->lastsector >= 0) {
stuffp763drivers/cdrom/mcdx.cstuffp->xa ? "XA / " : "",
stuffp764drivers/cdrom/mcdx.cstuffp->multi.multi ? "Multi Session" : "Single Session"));
stuffp767drivers/cdrom/mcdx.cstuffp->xxx = 0;
stuffp771drivers/cdrom/mcdx.cif (0 == stuffp->users && (-1 == mcdx_lockdoor(stuffp, 1, 1))) 
stuffp774drivers/cdrom/mcdx.cstuffp->users++;
stuffp782drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp786drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp788drivers/cdrom/mcdx.cif (0 == --stuffp->users) {
stuffp796drivers/cdrom/mcdx.cif (-1 == mcdx_lockdoor(stuffp, 0, 3))
stuffp799drivers/cdrom/mcdx.cmcdx_lockdoor(stuffp, 0, 3);
stuffp803drivers/cdrom/mcdx.cif (stuffp->eject_sw) mcdx_eject(stuffp, 1);
stuffp815drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp; 
stuffp820drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(full_dev)];
stuffp821drivers/cdrom/mcdx.cmcdx_getstatus(stuffp, 1);
stuffp823drivers/cdrom/mcdx.cif (stuffp->yyy == 0) {
stuffp829drivers/cdrom/mcdx.cstuffp->yyy = 0;
stuffp870drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp873drivers/cdrom/mcdx.cstuffp = mcdx_irq_map[irq];
stuffp875drivers/cdrom/mcdx.cif (stuffp == NULL ) {
stuffp881drivers/cdrom/mcdx.cb = inb((unsigned int) stuffp->rreg_status);
stuffp882drivers/cdrom/mcdx.cstuffp->introk = ~b & MCDX_RBIT_DTEN;
stuffp890drivers/cdrom/mcdx.cif (!stuffp->introk) {
stuffp894drivers/cdrom/mcdx.cirq, inb((unsigned int) stuffp->rreg_data)));
stuffp902drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp903drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->busyq);
stuffp909drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp, 
stuffp926drivers/cdrom/mcdx.cwhile (stuffp->lock) {
stuffp927drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq); 
stuffp929drivers/cdrom/mcdx.cstuffp->lock));
stuffp932drivers/cdrom/mcdx.cstuffp->lock = 1;
stuffp933drivers/cdrom/mcdx.cstuffp->valid = 0;  
stuffp952drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, cmdlen);
stuffp956drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, timeout, 0, bp)) {
stuffp976drivers/cdrom/mcdx.cif (stuffp->audiostatus == CDROM_AUDIO_INVALID)
stuffp977drivers/cdrom/mcdx.cstuffp->audiostatus = 
stuffp979drivers/cdrom/mcdx.celse if (stuffp->audiostatus == CDROM_AUDIO_PLAY 
stuffp981drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_COMPLETED;
stuffp986drivers/cdrom/mcdx.cstuffp->xxx = stuffp->yyy = 1;
stuffp991drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, timeout, -1, bp)) {
stuffp1005drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1006drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1043drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp1044drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[i];
stuffp1045drivers/cdrom/mcdx.cif (!stuffp) continue;
stuffp1046drivers/cdrom/mcdx.crelease_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE);
stuffp1047drivers/cdrom/mcdx.cfree_irq(stuffp->irq, NULL);
stuffp1048drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1049drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free toc @ %p\n", stuffp->toc));
stuffp1050drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp1052drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free stuffp @ %p\n", stuffp));
stuffp1054drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1108drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp;
stuffp1113drivers/cdrom/mcdx.csize = sizeof(*stuffp);
stuffp1119drivers/cdrom/mcdx.cif (!(stuffp = kmalloc(size, GFP_KERNEL))) {
stuffp1124drivers/cdrom/mcdx.cTRACE((INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp));
stuffp1127drivers/cdrom/mcdx.cmemset(stuffp, 0, sizeof(*stuffp));
stuffp1128drivers/cdrom/mcdx.cstuffp->autoclose = 1;      /* close the door on open(2) */
stuffp1130drivers/cdrom/mcdx.cstuffp->present = 0;    /* this should be 0 already */
stuffp1131drivers/cdrom/mcdx.cstuffp->toc = NULL;      /* this should be NULL already */
stuffp1134drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
stuffp1135drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
stuffp1136drivers/cdrom/mcdx.cstuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1;
stuffp1137drivers/cdrom/mcdx.cstuffp->wreg_hcon = stuffp->wreg_reset + 1;
stuffp1138drivers/cdrom/mcdx.cstuffp->wreg_chn = stuffp->wreg_hcon + 1;
stuffp1141drivers/cdrom/mcdx.cif (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) {
stuffp1144drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq,
stuffp1145drivers/cdrom/mcdx.cstuffp->wreg_data, 
stuffp1146drivers/cdrom/mcdx.cstuffp->wreg_data + MCDX_IO_SIZE - 1));
stuffp1147drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1148drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1153drivers/cdrom/mcdx.cTRACE((INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data));
stuffp1156drivers/cdrom/mcdx.cmcdx_reset(stuffp, HARD, 1);
stuffp1159drivers/cdrom/mcdx.cif (-1 == mcdx_requestversion(stuffp, &version, 4)) {
stuffp1163drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq));
stuffp1164drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1165drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1172drivers/cdrom/mcdx.cstuffp->readcmd = READ2X; 
stuffp1173drivers/cdrom/mcdx.cstuffp->present = DOUBLE | DOOR | MULTI; 
stuffp1176drivers/cdrom/mcdx.cstuffp->readcmd = READ1X; 
stuffp1177drivers/cdrom/mcdx.cstuffp->present = SINGLE | DOOR | MULTI;
stuffp1180drivers/cdrom/mcdx.cstuffp->readcmd = READ1X;
stuffp1181drivers/cdrom/mcdx.cstuffp->present = SINGLE;
stuffp1184drivers/cdrom/mcdx.cstuffp->present = 0; break;
stuffp1187drivers/cdrom/mcdx.cstuffp->playcmd = READ1X;
stuffp1190drivers/cdrom/mcdx.cif (!stuffp->present) {
stuffp1192drivers/cdrom/mcdx.cMCDX, stuffp->wreg_data, stuffp->irq));
stuffp1193drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1201drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, MAJOR_NR));
stuffp1202drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1212drivers/cdrom/mcdx.cmcdx_irq_map[stuffp->irq] = stuffp;
stuffp1213drivers/cdrom/mcdx.cif (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, DEVICE_NAME, NULL)) {
stuffp1216drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, stuffp->irq));
stuffp1217drivers/cdrom/mcdx.cstuffp->irq = 0;
stuffp1218drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1221drivers/cdrom/mcdx.crequest_region((unsigned int) stuffp->wreg_data, 
stuffp1228drivers/cdrom/mcdx.cmcdx_delay(stuffp, HZ/2);
stuffp1229drivers/cdrom/mcdx.cfor (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status);
stuffp1234drivers/cdrom/mcdx.coutb(0x50, (unsigned int) stuffp->wreg_chn);  /* irq 11 -> channel register */
stuffp1238drivers/cdrom/mcdx.cmcdx_config(stuffp, 1);
stuffp1240drivers/cdrom/mcdx.cstuffp->minor = drive;
stuffp1244drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, version.code,
stuffp1246drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
stuffp1247drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
stuffp1254drivers/cdrom/mcdx.cmcdx_transfer(struct s_drive_stuff *stuffp,
stuffp1264drivers/cdrom/mcdx.cans = mcdx_xfer(stuffp, p, sector, nr_sectors);
stuffp1267drivers/cdrom/mcdx.cif (-1 == ans) stuffp->readerrs++;
stuffp1270drivers/cdrom/mcdx.cif (stuffp->readerrs && stuffp->readcmd == READ1X) {
stuffp1277drivers/cdrom/mcdx.cstuffp->readcmd = READ1X;
stuffp1278drivers/cdrom/mcdx.creturn mcdx_transfer(stuffp, p, sector, nr_sectors);
stuffp1284drivers/cdrom/mcdx.cstatic int mcdx_xfer(struct s_drive_stuff *stuffp,
stuffp1296drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp1301drivers/cdrom/mcdx.cwhile (stuffp->lock) {
stuffp1302drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq);
stuffp1304drivers/cdrom/mcdx.cstuffp->lock));
stuffp1307drivers/cdrom/mcdx.cif (stuffp->valid
stuffp1308drivers/cdrom/mcdx.c&& (sector >= stuffp->pending)
stuffp1309drivers/cdrom/mcdx.c&& (sector < stuffp->off_direct)) {
stuffp1312drivers/cdrom/mcdx.coff = stuffp->off_requested < (off = sector + nr_sectors)
stuffp1313drivers/cdrom/mcdx.c? stuffp->off_requested : off;
stuffp1315drivers/cdrom/mcdx.cstuffp->lock = current->pid;
stuffp1323drivers/cdrom/mcdx.cwhile (stuffp->introk && stuffp->busy && current->timeout) {
stuffp1324drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->busyq);
stuffp1326drivers/cdrom/mcdx.cstuffp->busy, current->timeout));
stuffp1330drivers/cdrom/mcdx.cif (current->timeout == 0 || !stuffp->introk) {
stuffp1333drivers/cdrom/mcdx.c} else if (!stuffp->introk) { 
stuffp1339drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1340drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp1341drivers/cdrom/mcdx.cstuffp->valid = 0;
stuffp1343drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1350drivers/cdrom/mcdx.cif (stuffp->xa && (0 == (stuffp->pending & 3))) {
stuffp1353drivers/cdrom/mcdx.cstuffp->pending, HEAD));
stuffp1354drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, HEAD);
stuffp1359drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() read sector %d\n", stuffp->pending));
stuffp1360drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, 512); 
stuffp1365drivers/cdrom/mcdx.cif ((stuffp->busy = (3 == (stuffp->pending & 3))) && stuffp->xa) {
stuffp1368drivers/cdrom/mcdx.cstuffp->pending, CD_XA_TAIL));
stuffp1369drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, &dummy[0], CD_XA_TAIL);
stuffp1372drivers/cdrom/mcdx.cif (stuffp->pending == sector) {
stuffp1377drivers/cdrom/mcdx.c} while (++(stuffp->pending) < off);
stuffp1379drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1380drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1390drivers/cdrom/mcdx.ccmd[0] = stuffp->readcmd;
stuffp1392drivers/cdrom/mcdx.cstuffp->valid = 1;
stuffp1393drivers/cdrom/mcdx.cstuffp->pending = sector & ~3;
stuffp1396drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() request sector %d\n", stuffp->pending));
stuffp1397drivers/cdrom/mcdx.cif (stuffp->pending > stuffp->lastsector) {
stuffp1399drivers/cdrom/mcdx.cstuffp->pending));
stuffp1400drivers/cdrom/mcdx.cstuffp->status = MCDX_ST_EOM;
stuffp1401drivers/cdrom/mcdx.cstuffp->valid = 0;
stuffp1406drivers/cdrom/mcdx.cif ((stuffp->off_direct = stuffp->pending + DIRECT_SIZE)
stuffp1407drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1408drivers/cdrom/mcdx.cstuffp->off_direct = stuffp->lastsector + 1;
stuffp1409drivers/cdrom/mcdx.cif ((stuffp->off_requested = stuffp->pending + REQUEST_SIZE)
stuffp1410drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1411drivers/cdrom/mcdx.cstuffp->off_requested = stuffp->lastsector + 1;
stuffp1413drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() pending %d\n", stuffp->pending));
stuffp1414drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_dir %d\n", stuffp->off_direct));
stuffp1415drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_req %d\n", stuffp->off_requested));
stuffp1419drivers/cdrom/mcdx.clog2msf(stuffp->pending / 4, &pending);
stuffp1425drivers/cdrom/mcdx.cstuffp->busy = 1;
stuffp1426drivers/cdrom/mcdx.ccmd[6] = (unsigned char) (stuffp->off_requested - stuffp->pending) / 4;
stuffp1428drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1432drivers/cdrom/mcdx.cstuffp->off_direct = (stuffp->off_direct += done) < stuffp->off_requested
stuffp1433drivers/cdrom/mcdx.c? stuffp->off_direct : stuffp->off_requested;
stuffp1469drivers/cdrom/mcdx.cint mcdx_readtoc(struct s_drive_stuff* stuffp)
stuffp1474drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1480drivers/cdrom/mcdx.cstuffp->di.n_last - stuffp->di.n_first + 1));
stuffp1482drivers/cdrom/mcdx.cif (-1 == mcdx_hold(stuffp, 1)) return -1;
stuffp1485drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, TOC, 1)) return -EIO;
stuffp1490drivers/cdrom/mcdx.csize = sizeof(struct s_subqcode) * (stuffp->di.n_last - stuffp->di.n_first + 2);
stuffp1493drivers/cdrom/mcdx.cstuffp->toc = kmalloc(size, GFP_KERNEL);
stuffp1494drivers/cdrom/mcdx.cif (!stuffp->toc) {
stuffp1496drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1507drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 1); 
stuffp1509drivers/cdrom/mcdx.cstuffp->toc[trk].index = 0;
stuffp1515drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 1)) {
stuffp1516drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1523drivers/cdrom/mcdx.c&& (idx <= stuffp->di.n_last) 
stuffp1525drivers/cdrom/mcdx.c&& (stuffp->toc[idx - stuffp->di.n_first].index == 0)) {
stuffp1526drivers/cdrom/mcdx.cstuffp->toc[idx - stuffp->di.n_first] = q;
stuffp1532drivers/cdrom/mcdx.cmemset(&stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1], 
stuffp1533drivers/cdrom/mcdx.c0, sizeof(stuffp->toc[0]));
stuffp1534drivers/cdrom/mcdx.cstuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1].dt
stuffp1535drivers/cdrom/mcdx.c= stuffp->di.msf_leadout;
stuffp1540drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, DATA, 2))
stuffp1546drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 2); 
stuffp1550drivers/cdrom/mcdx.ctrk + stuffp->di.n_first,
stuffp1551drivers/cdrom/mcdx.cstuffp->toc[trk].control, stuffp->toc[trk].tno, stuffp->toc[trk].index,
stuffp1552drivers/cdrom/mcdx.cstuffp->toc[trk].tt.minute, stuffp->toc[trk].tt.second, stuffp->toc[trk].tt.frame,
stuffp1553drivers/cdrom/mcdx.cstuffp->toc[trk].dt.minute, stuffp->toc[trk].dt.second, stuffp->toc[trk].dt.frame));
stuffp1561drivers/cdrom/mcdx.cmcdx_playmsf(struct s_drive_stuff* stuffp, const struct cdrom_msf* msf)
stuffp1567drivers/cdrom/mcdx.ccmd[0] = stuffp->playcmd;
stuffp1581drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1583drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, 3 * HZ, 0, NULL)) {
stuffp1588drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PLAY;
stuffp1593drivers/cdrom/mcdx.cmcdx_playtrk(struct s_drive_stuff* stuffp, const struct cdrom_ti* ti)
stuffp1598drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp1600drivers/cdrom/mcdx.cif (ti) p = &stuffp->toc[ti->cdti_trk0 - stuffp->di.n_first];
stuffp1601drivers/cdrom/mcdx.celse p = &stuffp->start;
stuffp1608drivers/cdrom/mcdx.cp = &stuffp->toc[ti->cdti_trk1 - stuffp->di.n_first + 1];
stuffp1609drivers/cdrom/mcdx.cstuffp->stop = *p;
stuffp1610drivers/cdrom/mcdx.c} else p = &stuffp->stop;
stuffp1616drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp1623drivers/cdrom/mcdx.cmcdx_closedoor(struct s_drive_stuff *stuffp, int tries)
stuffp1625drivers/cdrom/mcdx.cif (stuffp->present & DOOR)
stuffp1626drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf8", 1, NULL, 1, 5 * HZ, tries);
stuffp1632drivers/cdrom/mcdx.cmcdx_stop(struct s_drive_stuff *stuffp, int tries)
stuffp1633drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\xf0", 1, NULL, 1, 2 * HZ, tries); }
stuffp1636drivers/cdrom/mcdx.cmcdx_hold(struct s_drive_stuff *stuffp, int tries)
stuffp1637drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x70", 1, NULL, 1, 2 * HZ, tries); }
stuffp1640drivers/cdrom/mcdx.cmcdx_eject(struct s_drive_stuff *stuffp, int tries)
stuffp1642drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1643drivers/cdrom/mcdx.cstuffp->ejected = jiffies;
stuffp1644drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf6", 1, NULL, 1, 5 * HZ, tries);
stuffp1649drivers/cdrom/mcdx.cmcdx_requestsubqcode(struct s_drive_stuff *stuffp, 
stuffp1657drivers/cdrom/mcdx.cstuffp, "\x20", 1, buf, sizeof(buf),
stuffp1674drivers/cdrom/mcdx.cmcdx_requestmultidiskinfo(struct s_drive_stuff *stuffp, struct s_multi *multi, int tries)
stuffp1679drivers/cdrom/mcdx.cif (stuffp->present & MULTI) {
stuffp1680drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x11", 1, buf, sizeof(buf), 1 * HZ, tries);
stuffp1693drivers/cdrom/mcdx.cmcdx_requesttocdata(struct s_drive_stuff *stuffp, struct s_diskinfo *info, int tries)
stuffp1697drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x10", 1, buf, sizeof(buf), 1 * HZ, tries);
stuffp1715drivers/cdrom/mcdx.cmcdx_setdrivemode(struct s_drive_stuff *stuffp, enum drivemodes mode, int tries)
stuffp1722drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xc2", 1, cmd, sizeof(cmd), 5 * HZ, tries)))
stuffp1733drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5 * HZ, tries);
stuffp1737drivers/cdrom/mcdx.cmcdx_setdatamode(struct s_drive_stuff *stuffp, enum datamodes mode, int tries)
stuffp1747drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5 * HZ, tries);
stuffp1751drivers/cdrom/mcdx.cmcdx_config(struct s_drive_stuff *stuffp, int tries)
stuffp1762drivers/cdrom/mcdx.cif (-1 == mcdx_talk(stuffp, cmd, 3, NULL, 1, 1 * HZ, tries))
stuffp1768drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 3, NULL, 1, 1 * HZ, tries);
stuffp1772drivers/cdrom/mcdx.cmcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *ver, int tries)
stuffp1777drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xdc", 
stuffp1788drivers/cdrom/mcdx.cmcdx_reset(struct s_drive_stuff *stuffp, enum resetmodes mode, int tries)
stuffp1791drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_chn);    /* no dma, no irq -> hardware */
stuffp1792drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_reset);    /* hw reset */
stuffp1794drivers/cdrom/mcdx.c} else return mcdx_talk(stuffp, "\x60", 1, NULL, 1, 5 * HZ, tries);
stuffp1798drivers/cdrom/mcdx.cmcdx_lockdoor(struct s_drive_stuff *stuffp, int lock, int tries)
stuffp1801drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1803drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 1, 5 * HZ, tries);
stuffp1808drivers/cdrom/mcdx.cmcdx_getstatus(struct s_drive_stuff *stuffp, int tries)
stuffp1809drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x40", 1, NULL, 1, 5 * HZ, tries); }
stuffp1812drivers/cdrom/mcdx.cmcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, char* buf)
stuffp1819drivers/cdrom/mcdx.cwhile (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_STEN) {
stuffp1821drivers/cdrom/mcdx.cmcdx_delay(stuffp, delay);
stuffp1824drivers/cdrom/mcdx.c*buf = (unsigned char) inb((unsigned int) stuffp->rreg_data) & 0xff;
stuffp1831drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp, 
stuffp1842drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 5, 200, tries);