taglinefilesource code
stuffp281drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp283drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp294drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp295drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1))
stuffp308drivers/cdrom/mcdx.cif ((ti.cdti_trk0 < stuffp->di.n_first)
stuffp309drivers/cdrom/mcdx.c|| (ti.cdti_trk0 > stuffp->di.n_last)
stuffp310drivers/cdrom/mcdx.c|| (ti.cdti_trk1 < stuffp->di.n_first))
stuffp312drivers/cdrom/mcdx.cif (ti.cdti_trk1 > stuffp->di.n_last) ti.cdti_trk1 = stuffp->di.n_last;
stuffp315drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, &ti);
stuffp324drivers/cdrom/mcdx.cif ((stuffp->audiostatus == CDROM_AUDIO_PLAY)
stuffp325drivers/cdrom/mcdx.c&& (-1 == mcdx_hold(stuffp, 1))) return -EIO;
stuffp341drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp346drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, NULL);
stuffp356drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp362drivers/cdrom/mcdx.ctp = &stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1];
stuffp363drivers/cdrom/mcdx.celse if (entry.cdte_track > stuffp->di.n_last 
stuffp364drivers/cdrom/mcdx.c|| entry.cdte_track < stuffp->di.n_first) return -EINVAL;
stuffp365drivers/cdrom/mcdx.celse tp = &stuffp->toc[entry.cdte_track - stuffp->di.n_first];
stuffp398drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 2)) return -EIO;
stuffp400drivers/cdrom/mcdx.cTRACE((SUBCHNL, "audiostatus: %x\n", stuffp->audiostatus));
stuffp401drivers/cdrom/mcdx.csub.cdsc_audiostatus = stuffp->audiostatus;
stuffp447drivers/cdrom/mcdx.ctoc.cdth_trk0 = stuffp->di.n_first;
stuffp448drivers/cdrom/mcdx.ctoc.cdth_trk1 = stuffp->di.n_last;
stuffp451drivers/cdrom/mcdx.cstuffp->di.n_first, stuffp->di.n_last));
stuffp457drivers/cdrom/mcdx.cif (stuffp->audiostatus != CDROM_AUDIO_PLAY) return -EINVAL;
stuffp458drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1)) return -EIO;
stuffp459drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PAUSED;
stuffp460drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &stuffp->start, 1))
stuffp475drivers/cdrom/mcdx.cms.addr.msf.minute = bcd2uint(stuffp->multi.msf_last.minute);
stuffp476drivers/cdrom/mcdx.cms.addr.msf.second = bcd2uint(stuffp->multi.msf_last.second);
stuffp477drivers/cdrom/mcdx.cms.addr.msf.frame = bcd2uint(stuffp->multi.msf_last.frame);
stuffp479drivers/cdrom/mcdx.cms.addr.lba = msf2log(&stuffp->multi.msf_last);
stuffp482drivers/cdrom/mcdx.cms.xa_flag = !!stuffp->multi.multi;
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.cstuffp->multi.msf_last.minute,
stuffp506drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp507drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp514drivers/cdrom/mcdx.cif (stuffp->users > 1) return -EBUSY;
stuffp515drivers/cdrom/mcdx.cif (-1 == mcdx_eject(stuffp, 1)) return -EIO;
stuffp520drivers/cdrom/mcdx.cstuffp->eject_sw = arg;
stuffp536drivers/cdrom/mcdx.creturn mcdx_setattentuator(stuffp, &volctrl, 1);
stuffp548drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp559drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(CURRENT->rq_dev)];
stuffp560drivers/cdrom/mcdx.cTRACE((REQUEST, "do_request() stuffp = %p\n", stuffp));
stuffp565drivers/cdrom/mcdx.cif ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) {
stuffp572drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp585drivers/cdrom/mcdx.cstuffp->status = 0;
stuffp590drivers/cdrom/mcdx.cstuffp,
stuffp596drivers/cdrom/mcdx.cif (stuffp->status & MCDX_ST_EOM) {
stuffp626drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp629drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp630drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp633drivers/cdrom/mcdx.cif (-1 == mcdx_getstatus(stuffp, 1)) return -EIO;
stuffp640drivers/cdrom/mcdx.cif (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_DOOR) {
stuffp641drivers/cdrom/mcdx.cif (jiffies - stuffp->ejected < ACLOSE_INHIBIT) return -EIO;
stuffp642drivers/cdrom/mcdx.cif (stuffp->autoclose) mcdx_closedoor(stuffp, 1);
stuffp647drivers/cdrom/mcdx.cif (stuffp->xxx) {
stuffp655drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp660drivers/cdrom/mcdx.cstuffp, &stuffp->multi, 6)) {
stuffp662drivers/cdrom/mcdx.cstuffp->autoclose = 0;
stuffp666drivers/cdrom/mcdx.cstuffp->autoclose = 1;
stuffp669drivers/cdrom/mcdx.cif (stuffp->multi.multi > 2)
stuffp671drivers/cdrom/mcdx.cstuffp->multi.multi));
stuffp675drivers/cdrom/mcdx.cif (!stuffp->multi.multi)
stuffp676drivers/cdrom/mcdx.cstuffp->multi.msf_last.second = 2;
stuffp679drivers/cdrom/mcdx.cstuffp->multi.multi,
stuffp680drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp681drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp682drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp687drivers/cdrom/mcdx.cif (-1 == mcdx_requesttocdata(stuffp, &stuffp->di, 1)) {
stuffp689drivers/cdrom/mcdx.cstuffp->lastsector = -1;
stuffp693drivers/cdrom/mcdx.cstuffp->lastsector = (CD_FRAMESIZE / 512) 
stuffp694drivers/cdrom/mcdx.c* msf2log(&stuffp->di.msf_leadout) - 1;
stuffp697drivers/cdrom/mcdx.cstuffp->di.n_first,
stuffp698drivers/cdrom/mcdx.cstuffp->di.msf_first.minute,
stuffp699drivers/cdrom/mcdx.cstuffp->di.msf_first.second,
stuffp700drivers/cdrom/mcdx.cstuffp->di.msf_first.frame,
stuffp701drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_first)));
stuffp703drivers/cdrom/mcdx.cstuffp->di.n_last,
stuffp704drivers/cdrom/mcdx.cstuffp->di.msf_leadout.minute,
stuffp705drivers/cdrom/mcdx.cstuffp->di.msf_leadout.second,
stuffp706drivers/cdrom/mcdx.cstuffp->di.msf_leadout.frame,
stuffp707drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_leadout)));
stuffp710drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp711drivers/cdrom/mcdx.cTRACE((MALLOC, "open() free old toc @ %p\n", stuffp->toc));
stuffp712drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp714drivers/cdrom/mcdx.cstuffp->toc = NULL;
stuffp718drivers/cdrom/mcdx.cif (-1 == mcdx_config(stuffp, 1)) return -EIO;
stuffp722drivers/cdrom/mcdx.cWARN(("AAA %x AAA\n", stuffp->readcmd));
stuffp723drivers/cdrom/mcdx.cif (stuffp->readerrs) stuffp->readcmd = READ1X;
stuffp724drivers/cdrom/mcdx.celse stuffp->readcmd = 
stuffp725drivers/cdrom/mcdx.cstuffp->present | SINGLE ? READ1X : READ2X;
stuffp726drivers/cdrom/mcdx.cWARN(("XXX %x XXX\n", stuffp->readcmd));
stuffp730drivers/cdrom/mcdx.cif (stuffp->lastsector >= 0) {
stuffp735drivers/cdrom/mcdx.cstuffp->xa = 0;
stuffp736drivers/cdrom/mcdx.cstuffp->audio = 0;
stuffp740drivers/cdrom/mcdx.cstuffp->introk = 1;
stuffp743drivers/cdrom/mcdx.cstuffp->xa ? "XA" : "normal"));
stuffp746drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_setdatamode(stuffp, 
stuffp747drivers/cdrom/mcdx.cstuffp->xa ? MODE2 : MODE1, 1))) {
stuffp749drivers/cdrom/mcdx.cstuffp->xa = 0;
stuffp753drivers/cdrom/mcdx.cif ((stuffp->audio = e_audio(ans))) break; 
stuffp755drivers/cdrom/mcdx.cwhile (0 == (ans = mcdx_transfer(stuffp, buf, 0, 1))) 
stuffp759drivers/cdrom/mcdx.cstuffp->xa = !stuffp->xa; 
stuffp765drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, 
stuffp766drivers/cdrom/mcdx.cstuffp->xa ? RAW : COOKED, 1))
stuffp769drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp771drivers/cdrom/mcdx.c} else if (stuffp->lastsector >= 0) {
stuffp773drivers/cdrom/mcdx.cstuffp->xa ? "XA / " : "",
stuffp774drivers/cdrom/mcdx.cstuffp->multi.multi ? "Multi Session" : "Single Session"));
stuffp777drivers/cdrom/mcdx.cstuffp->xxx = 0;
stuffp781drivers/cdrom/mcdx.cif (0 == stuffp->users && (-1 == mcdx_lockdoor(stuffp, 1, 1))) 
stuffp784drivers/cdrom/mcdx.cstuffp->users++;
stuffp792drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp796drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp798drivers/cdrom/mcdx.cif (0 == --stuffp->users) {
stuffp806drivers/cdrom/mcdx.cif (-1 == mcdx_lockdoor(stuffp, 0, 3))
stuffp809drivers/cdrom/mcdx.cmcdx_lockdoor(stuffp, 0, 3);
stuffp813drivers/cdrom/mcdx.cif (stuffp->eject_sw) mcdx_eject(stuffp, 1);
stuffp825drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp; 
stuffp830drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(full_dev)];
stuffp831drivers/cdrom/mcdx.cmcdx_getstatus(stuffp, 1);
stuffp833drivers/cdrom/mcdx.cif (stuffp->yyy == 0) return 0;
stuffp835drivers/cdrom/mcdx.cstuffp->yyy = 0;
stuffp876drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp879drivers/cdrom/mcdx.cstuffp = mcdx_irq_map[irq];
stuffp881drivers/cdrom/mcdx.cif (stuffp == NULL ) {
stuffp887drivers/cdrom/mcdx.cb = inb((unsigned int) stuffp->rreg_status);
stuffp888drivers/cdrom/mcdx.cstuffp->introk = ~b & MCDX_RBIT_DTEN;
stuffp896drivers/cdrom/mcdx.cif (!stuffp->introk) {
stuffp900drivers/cdrom/mcdx.cirq, inb((unsigned int) stuffp->rreg_data));
stuffp908drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp909drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->busyq);
stuffp915drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp, 
stuffp932drivers/cdrom/mcdx.cwhile (stuffp->lock) {
stuffp933drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq); 
stuffp935drivers/cdrom/mcdx.cstuffp->lock));
stuffp938drivers/cdrom/mcdx.cstuffp->lock = 1;
stuffp939drivers/cdrom/mcdx.cstuffp->valid = 0;  
stuffp958drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, cmdlen);
stuffp962drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, timeout, 0, bp)) {
stuffp982drivers/cdrom/mcdx.cif (stuffp->audiostatus == CDROM_AUDIO_INVALID)
stuffp983drivers/cdrom/mcdx.cstuffp->audiostatus = 
stuffp985drivers/cdrom/mcdx.celse if (stuffp->audiostatus == CDROM_AUDIO_PLAY 
stuffp987drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_COMPLETED;
stuffp992drivers/cdrom/mcdx.cstuffp->xxx = stuffp->yyy = 1;
stuffp997drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, timeout, 0, bp)) {
stuffp1011drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1012drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1049drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp1050drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[i];
stuffp1051drivers/cdrom/mcdx.cif (!stuffp) continue;
stuffp1052drivers/cdrom/mcdx.crelease_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE);
stuffp1053drivers/cdrom/mcdx.cfree_irq(stuffp->irq, NULL);
stuffp1054drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1055drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free toc @ %p\n", stuffp->toc));
stuffp1056drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp1058drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free stuffp @ %p\n", stuffp));
stuffp1060drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1119drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp;
stuffp1124drivers/cdrom/mcdx.csize = sizeof(*stuffp);
stuffp1130drivers/cdrom/mcdx.cif (!(stuffp = kmalloc(size, GFP_KERNEL))) {
stuffp1135drivers/cdrom/mcdx.cTRACE((INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp));
stuffp1138drivers/cdrom/mcdx.cmemset(stuffp, 0, sizeof(*stuffp));
stuffp1139drivers/cdrom/mcdx.cstuffp->autoclose = 1;      /* close the door on open(2) */
stuffp1141drivers/cdrom/mcdx.cstuffp->present = 0;    /* this should be 0 already */
stuffp1142drivers/cdrom/mcdx.cstuffp->toc = NULL;      /* this should be NULL already */
stuffp1145drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
stuffp1146drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
stuffp1147drivers/cdrom/mcdx.cstuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1;
stuffp1148drivers/cdrom/mcdx.cstuffp->wreg_hcon = stuffp->wreg_reset + 1;
stuffp1149drivers/cdrom/mcdx.cstuffp->wreg_chn = stuffp->wreg_hcon + 1;
stuffp1152drivers/cdrom/mcdx.cif (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) {
stuffp1155drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq,
stuffp1156drivers/cdrom/mcdx.cstuffp->wreg_data, 
stuffp1157drivers/cdrom/mcdx.cstuffp->wreg_data + MCDX_IO_SIZE - 1));
stuffp1158drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1159drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1164drivers/cdrom/mcdx.cTRACE((INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data));
stuffp1167drivers/cdrom/mcdx.cmcdx_reset(stuffp, HARD, 1);
stuffp1170drivers/cdrom/mcdx.cif (-1 == mcdx_requestversion(stuffp, &version, 4)) {
stuffp1174drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq));
stuffp1175drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1176drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1183drivers/cdrom/mcdx.cstuffp->readcmd = READ2X; 
stuffp1184drivers/cdrom/mcdx.cstuffp->present = DOUBLE | DOOR | MULTI; 
stuffp1187drivers/cdrom/mcdx.cstuffp->readcmd = READ1X; 
stuffp1188drivers/cdrom/mcdx.cstuffp->present = SINGLE | DOOR | MULTI;
stuffp1191drivers/cdrom/mcdx.cstuffp->readcmd = READ1X;
stuffp1192drivers/cdrom/mcdx.cstuffp->present = SINGLE;
stuffp1195drivers/cdrom/mcdx.cstuffp->present = 0; break;
stuffp1198drivers/cdrom/mcdx.cstuffp->playcmd = READ1X;
stuffp1201drivers/cdrom/mcdx.cif (!stuffp->present) {
stuffp1203drivers/cdrom/mcdx.cMCDX, stuffp->wreg_data, stuffp->irq));
stuffp1204drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1212drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, MAJOR_NR));
stuffp1213drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1223drivers/cdrom/mcdx.cmcdx_irq_map[stuffp->irq] = stuffp;
stuffp1224drivers/cdrom/mcdx.cif (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, DEVICE_NAME, NULL)) {
stuffp1227drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, stuffp->irq));
stuffp1228drivers/cdrom/mcdx.cstuffp->irq = 0;
stuffp1229drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1232drivers/cdrom/mcdx.crequest_region((unsigned int) stuffp->wreg_data, 
stuffp1239drivers/cdrom/mcdx.cmcdx_delay(stuffp, HZ/2);
stuffp1240drivers/cdrom/mcdx.cfor (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status);
stuffp1245drivers/cdrom/mcdx.coutb(0x50, (unsigned int) stuffp->wreg_chn);  /* irq 11 -> channel register */
stuffp1249drivers/cdrom/mcdx.cmcdx_config(stuffp, 1);
stuffp1251drivers/cdrom/mcdx.cstuffp->minor = drive;
stuffp1255drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, version.code,
stuffp1257drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
stuffp1258drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
stuffp1265drivers/cdrom/mcdx.cmcdx_transfer(struct s_drive_stuff *stuffp,
stuffp1275drivers/cdrom/mcdx.cans = mcdx_xfer(stuffp, p, sector, nr_sectors);
stuffp1278drivers/cdrom/mcdx.cif (-1 == ans) stuffp->readerrs++;
stuffp1281drivers/cdrom/mcdx.cif (stuffp->readerrs && stuffp->readcmd == READ1X) {
stuffp1288drivers/cdrom/mcdx.cstuffp->readcmd = READ1X;
stuffp1289drivers/cdrom/mcdx.creturn mcdx_transfer(stuffp, p, sector, nr_sectors);
stuffp1295drivers/cdrom/mcdx.cstatic int mcdx_xfer(struct s_drive_stuff *stuffp,
stuffp1307drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp1312drivers/cdrom/mcdx.cwhile (stuffp->lock) {
stuffp1313drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq);
stuffp1315drivers/cdrom/mcdx.cstuffp->lock));
stuffp1318drivers/cdrom/mcdx.cif (stuffp->valid
stuffp1319drivers/cdrom/mcdx.c&& (sector >= stuffp->pending)
stuffp1320drivers/cdrom/mcdx.c&& (sector < stuffp->off_direct)) {
stuffp1323drivers/cdrom/mcdx.coff = stuffp->off_requested < (off = sector + nr_sectors)
stuffp1324drivers/cdrom/mcdx.c? stuffp->off_requested : off;
stuffp1326drivers/cdrom/mcdx.cstuffp->lock = current->pid;
stuffp1334drivers/cdrom/mcdx.cwhile (stuffp->introk && stuffp->busy && current->timeout) {
stuffp1335drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->busyq);
stuffp1337drivers/cdrom/mcdx.cstuffp->busy, current->timeout));
stuffp1341drivers/cdrom/mcdx.cif (current->timeout == 0 || !stuffp->introk) {
stuffp1344drivers/cdrom/mcdx.c} else if (!stuffp->introk) { 
stuffp1350drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1351drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp1352drivers/cdrom/mcdx.cstuffp->valid = 0;
stuffp1354drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1361drivers/cdrom/mcdx.cif (stuffp->xa && (0 == (stuffp->pending & 3))) {
stuffp1364drivers/cdrom/mcdx.cstuffp->pending, HEAD));
stuffp1365drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, HEAD);
stuffp1370drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() read sector %d\n", stuffp->pending));
stuffp1371drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, 512); 
stuffp1376drivers/cdrom/mcdx.cif ((stuffp->busy = (3 == (stuffp->pending & 3))) && stuffp->xa) {
stuffp1379drivers/cdrom/mcdx.cstuffp->pending, CD_XA_TAIL));
stuffp1380drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, &dummy[0], CD_XA_TAIL);
stuffp1383drivers/cdrom/mcdx.cif (stuffp->pending == sector) {
stuffp1388drivers/cdrom/mcdx.c} while (++(stuffp->pending) < off);
stuffp1390drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1391drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1401drivers/cdrom/mcdx.ccmd[0] = stuffp->readcmd;
stuffp1403drivers/cdrom/mcdx.cstuffp->valid = 1;
stuffp1404drivers/cdrom/mcdx.cstuffp->pending = sector & ~3;
stuffp1407drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() request sector %d\n", stuffp->pending));
stuffp1408drivers/cdrom/mcdx.cif (stuffp->pending > stuffp->lastsector) {
stuffp1410drivers/cdrom/mcdx.cstuffp->pending));
stuffp1411drivers/cdrom/mcdx.cstuffp->status = MCDX_ST_EOM;
stuffp1412drivers/cdrom/mcdx.cstuffp->valid = 0;
stuffp1417drivers/cdrom/mcdx.cif ((stuffp->off_direct = stuffp->pending + DIRECT_SIZE)
stuffp1418drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1419drivers/cdrom/mcdx.cstuffp->off_direct = stuffp->lastsector + 1;
stuffp1420drivers/cdrom/mcdx.cif ((stuffp->off_requested = stuffp->pending + REQUEST_SIZE)
stuffp1421drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1422drivers/cdrom/mcdx.cstuffp->off_requested = stuffp->lastsector + 1;
stuffp1424drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() pending %d\n", stuffp->pending));
stuffp1425drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_dir %d\n", stuffp->off_direct));
stuffp1426drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_req %d\n", stuffp->off_requested));
stuffp1430drivers/cdrom/mcdx.clog2msf(stuffp->pending / 4, &pending);
stuffp1436drivers/cdrom/mcdx.cstuffp->busy = 1;
stuffp1437drivers/cdrom/mcdx.ccmd[6] = (unsigned char) (stuffp->off_requested - stuffp->pending) / 4;
stuffp1439drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1443drivers/cdrom/mcdx.cstuffp->off_direct = (stuffp->off_direct += done) < stuffp->off_requested
stuffp1444drivers/cdrom/mcdx.c? stuffp->off_direct : stuffp->off_requested;
stuffp1480drivers/cdrom/mcdx.cint mcdx_readtoc(struct s_drive_stuff* stuffp)
stuffp1485drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1491drivers/cdrom/mcdx.cstuffp->di.n_last - stuffp->di.n_first + 1));
stuffp1493drivers/cdrom/mcdx.cif (-1 == mcdx_hold(stuffp, 1)) return -1;
stuffp1496drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, TOC, 1)) return -EIO;
stuffp1501drivers/cdrom/mcdx.csize = sizeof(struct s_subqcode) * (stuffp->di.n_last - stuffp->di.n_first + 2);
stuffp1504drivers/cdrom/mcdx.cstuffp->toc = kmalloc(size, GFP_KERNEL);
stuffp1505drivers/cdrom/mcdx.cif (!stuffp->toc) {
stuffp1507drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1518drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 1); 
stuffp1520drivers/cdrom/mcdx.cstuffp->toc[trk].index = 0;
stuffp1526drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 1)) {
stuffp1527drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1534drivers/cdrom/mcdx.c&& (idx <= stuffp->di.n_last) 
stuffp1536drivers/cdrom/mcdx.c&& (stuffp->toc[idx - stuffp->di.n_first].index == 0)) {
stuffp1537drivers/cdrom/mcdx.cstuffp->toc[idx - stuffp->di.n_first] = q;
stuffp1543drivers/cdrom/mcdx.cmemset(&stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1], 
stuffp1544drivers/cdrom/mcdx.c0, sizeof(stuffp->toc[0]));
stuffp1545drivers/cdrom/mcdx.cstuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1].dt
stuffp1546drivers/cdrom/mcdx.c= stuffp->di.msf_leadout;
stuffp1551drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, DATA, 2))
stuffp1557drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 2); 
stuffp1561drivers/cdrom/mcdx.ctrk + stuffp->di.n_first,
stuffp1562drivers/cdrom/mcdx.cstuffp->toc[trk].control, stuffp->toc[trk].tno, stuffp->toc[trk].index,
stuffp1563drivers/cdrom/mcdx.cstuffp->toc[trk].tt.minute, stuffp->toc[trk].tt.second, stuffp->toc[trk].tt.frame,
stuffp1564drivers/cdrom/mcdx.cstuffp->toc[trk].dt.minute, stuffp->toc[trk].dt.second, stuffp->toc[trk].dt.frame));
stuffp1572drivers/cdrom/mcdx.cmcdx_playmsf(struct s_drive_stuff* stuffp, const struct cdrom_msf* msf)
stuffp1578drivers/cdrom/mcdx.ccmd[0] = stuffp->playcmd;
stuffp1592drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1594drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, 3 * HZ, 0, NULL)) {
stuffp1599drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PLAY;
stuffp1604drivers/cdrom/mcdx.cmcdx_playtrk(struct s_drive_stuff* stuffp, const struct cdrom_ti* ti)
stuffp1609drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp1611drivers/cdrom/mcdx.cif (ti) p = &stuffp->toc[ti->cdti_trk0 - stuffp->di.n_first];
stuffp1612drivers/cdrom/mcdx.celse p = &stuffp->start;
stuffp1619drivers/cdrom/mcdx.cp = &stuffp->toc[ti->cdti_trk1 - stuffp->di.n_first + 1];
stuffp1620drivers/cdrom/mcdx.cstuffp->stop = *p;
stuffp1621drivers/cdrom/mcdx.c} else p = &stuffp->stop;
stuffp1627drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp1634drivers/cdrom/mcdx.cmcdx_closedoor(struct s_drive_stuff *stuffp, int tries)
stuffp1636drivers/cdrom/mcdx.cif (stuffp->present & DOOR)
stuffp1637drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf8", 1, NULL, 1, 5 * HZ, tries);
stuffp1643drivers/cdrom/mcdx.cmcdx_stop(struct s_drive_stuff *stuffp, int tries)
stuffp1644drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\xf0", 1, NULL, 1, 2 * HZ, tries); }
stuffp1647drivers/cdrom/mcdx.cmcdx_hold(struct s_drive_stuff *stuffp, int tries)
stuffp1648drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x70", 1, NULL, 1, 2 * HZ, tries); }
stuffp1651drivers/cdrom/mcdx.cmcdx_eject(struct s_drive_stuff *stuffp, int tries)
stuffp1653drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1654drivers/cdrom/mcdx.cstuffp->ejected = jiffies;
stuffp1655drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf6", 1, NULL, 1, 5 * HZ, tries);
stuffp1660drivers/cdrom/mcdx.cmcdx_requestsubqcode(struct s_drive_stuff *stuffp, 
stuffp1668drivers/cdrom/mcdx.cstuffp, "\x20", 1, buf, sizeof(buf),
stuffp1685drivers/cdrom/mcdx.cmcdx_requestmultidiskinfo(struct s_drive_stuff *stuffp, struct s_multi *multi, int tries)
stuffp1690drivers/cdrom/mcdx.cif (stuffp->present & MULTI) {
stuffp1691drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x11", 1, buf, sizeof(buf), 2 * HZ, tries);
stuffp1704drivers/cdrom/mcdx.cmcdx_requesttocdata(struct s_drive_stuff *stuffp, struct s_diskinfo *info, int tries)
stuffp1708drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x10", 1, buf, sizeof(buf), 2 * HZ, tries);
stuffp1726drivers/cdrom/mcdx.cmcdx_setdrivemode(struct s_drive_stuff *stuffp, enum drivemodes mode, int tries)
stuffp1733drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xc2", 1, cmd, sizeof(cmd), 5 * HZ, tries)))
stuffp1744drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5 * HZ, tries);
stuffp1748drivers/cdrom/mcdx.cmcdx_setdatamode(struct s_drive_stuff *stuffp, enum datamodes mode, int tries)
stuffp1758drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5 * HZ, tries);
stuffp1762drivers/cdrom/mcdx.cmcdx_config(struct s_drive_stuff *stuffp, int tries)
stuffp1773drivers/cdrom/mcdx.cif (-1 == mcdx_talk(stuffp, cmd, 3, NULL, 1, 1 * HZ, tries))
stuffp1779drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 3, NULL, 1, 1 * HZ, tries);
stuffp1783drivers/cdrom/mcdx.cmcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *ver, int tries)
stuffp1788drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xdc", 
stuffp1799drivers/cdrom/mcdx.cmcdx_reset(struct s_drive_stuff *stuffp, enum resetmodes mode, int tries)
stuffp1802drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_chn);    /* no dma, no irq -> hardware */
stuffp1803drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_reset);    /* hw reset */
stuffp1805drivers/cdrom/mcdx.c} else return mcdx_talk(stuffp, "\x60", 1, NULL, 1, 5 * HZ, tries);
stuffp1809drivers/cdrom/mcdx.cmcdx_lockdoor(struct s_drive_stuff *stuffp, int lock, int tries)
stuffp1812drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1814drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 1, 5 * HZ, tries);
stuffp1819drivers/cdrom/mcdx.cmcdx_getstatus(struct s_drive_stuff *stuffp, int tries)
stuffp1820drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x40", 1, NULL, 1, 5 * HZ, tries); }
stuffp1823drivers/cdrom/mcdx.cmcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, char* buf)
stuffp1830drivers/cdrom/mcdx.cwhile (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_STEN) {
stuffp1832drivers/cdrom/mcdx.cmcdx_delay(stuffp, delay);
stuffp1835drivers/cdrom/mcdx.c*buf = (unsigned char) inb((unsigned int) stuffp->rreg_data) & 0xff;
stuffp1842drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp, 
stuffp1853drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 5, 200, tries);