taglinefilesource code
stuffp291drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp293drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp304drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp305drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1))
stuffp318drivers/cdrom/mcdx.cif ((ti.cdti_trk0 < stuffp->di.n_first)
stuffp319drivers/cdrom/mcdx.c|| (ti.cdti_trk0 > stuffp->di.n_last)
stuffp320drivers/cdrom/mcdx.c|| (ti.cdti_trk1 < stuffp->di.n_first))
stuffp322drivers/cdrom/mcdx.cif (ti.cdti_trk1 > stuffp->di.n_last) ti.cdti_trk1 = stuffp->di.n_last;
stuffp325drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, &ti);
stuffp334drivers/cdrom/mcdx.cif ((stuffp->audiostatus == CDROM_AUDIO_PLAY)
stuffp335drivers/cdrom/mcdx.c&& (-1 == mcdx_hold(stuffp, 1))) return -EIO;
stuffp351drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp356drivers/cdrom/mcdx.creturn mcdx_playtrk(stuffp, NULL);
stuffp366drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp372drivers/cdrom/mcdx.ctp = &stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1];
stuffp373drivers/cdrom/mcdx.celse if (entry.cdte_track > stuffp->di.n_last 
stuffp374drivers/cdrom/mcdx.c|| entry.cdte_track < stuffp->di.n_first) return -EINVAL;
stuffp375drivers/cdrom/mcdx.celse tp = &stuffp->toc[entry.cdte_track - stuffp->di.n_first];
stuffp408drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 2)) return -EIO;
stuffp410drivers/cdrom/mcdx.cTRACE((SUBCHNL, "audiostatus: %x\n", stuffp->audiostatus));
stuffp411drivers/cdrom/mcdx.csub.cdsc_audiostatus = stuffp->audiostatus;
stuffp457drivers/cdrom/mcdx.ctoc.cdth_trk0 = stuffp->di.n_first;
stuffp458drivers/cdrom/mcdx.ctoc.cdth_trk1 = stuffp->di.n_last;
stuffp461drivers/cdrom/mcdx.cstuffp->di.n_first, stuffp->di.n_last));
stuffp467drivers/cdrom/mcdx.cif (stuffp->audiostatus != CDROM_AUDIO_PLAY) return -EINVAL;
stuffp468drivers/cdrom/mcdx.cif (-1 == mcdx_stop(stuffp, 1)) return -EIO;
stuffp469drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PAUSED;
stuffp470drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &stuffp->start, 1))
stuffp485drivers/cdrom/mcdx.cms.addr.msf.minute = bcd2uint(stuffp->multi.msf_last.minute);
stuffp486drivers/cdrom/mcdx.cms.addr.msf.second = bcd2uint(stuffp->multi.msf_last.second);
stuffp487drivers/cdrom/mcdx.cms.addr.msf.frame = bcd2uint(stuffp->multi.msf_last.frame);
stuffp489drivers/cdrom/mcdx.cms.addr.lba = msf2log(&stuffp->multi.msf_last);
stuffp492drivers/cdrom/mcdx.cms.xa_flag = stuffp->xa;
stuffp506drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp507drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp508drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp515drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp516drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp517drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp524drivers/cdrom/mcdx.cif (stuffp->users > 1) return -EBUSY;
stuffp525drivers/cdrom/mcdx.cif (-1 == mcdx_eject(stuffp, 1)) return -EIO;
stuffp530drivers/cdrom/mcdx.cstuffp->eject_sw = arg;
stuffp546drivers/cdrom/mcdx.creturn mcdx_setattentuator(stuffp, &volctrl, 1);
stuffp558drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp574drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(CURRENT->dev)];
stuffp576drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(CURRENT->rq_dev)];
stuffp578drivers/cdrom/mcdx.cTRACE((REQUEST, "do_request() stuffp = %p\n", stuffp));
stuffp587drivers/cdrom/mcdx.cif ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) {
stuffp598drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp611drivers/cdrom/mcdx.cstuffp->errno = 0;
stuffp616drivers/cdrom/mcdx.cstuffp,
stuffp621drivers/cdrom/mcdx.cif (stuffp->errno == MCDX_EOM) {
stuffp650drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp653drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp654drivers/cdrom/mcdx.cif (!stuffp->present) return -ENXIO;
stuffp657drivers/cdrom/mcdx.cif (-1 == mcdx_getstatus(stuffp, 1)) return -EIO;
stuffp664drivers/cdrom/mcdx.cif (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_DOOR) {
stuffp665drivers/cdrom/mcdx.cif (jiffies - stuffp->ejected < ACLOSE_INHIBIT) return -EIO;
stuffp666drivers/cdrom/mcdx.cif (stuffp->autoclose) mcdx_closedoor(stuffp, 1);
stuffp671drivers/cdrom/mcdx.cif (stuffp->xxx < stuffp->changed) {
stuffp679drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_INVALID;
stuffp686drivers/cdrom/mcdx.cans = mcdx_requestmultidiskinfo(stuffp, &stuffp->multi, 6);
stuffp688drivers/cdrom/mcdx.cstuffp->autoclose = 0;
stuffp689drivers/cdrom/mcdx.cmcdx_eject(stuffp, 1);
stuffp695drivers/cdrom/mcdx.cstuffp->autoclose = 1;
stuffp697drivers/cdrom/mcdx.cif (stuffp->multi.multi > 2)
stuffp698drivers/cdrom/mcdx.cWARN(("open() unknown multisession value (%d)\n", stuffp->multi.multi));
stuffp701drivers/cdrom/mcdx.cif (!stuffp->multi.multi)
stuffp702drivers/cdrom/mcdx.cstuffp->multi.msf_last.second = 2;
stuffp705drivers/cdrom/mcdx.cstuffp->multi.multi,
stuffp706drivers/cdrom/mcdx.cstuffp->multi.msf_last.minute,
stuffp707drivers/cdrom/mcdx.cstuffp->multi.msf_last.second,
stuffp708drivers/cdrom/mcdx.cstuffp->multi.msf_last.frame));
stuffp712drivers/cdrom/mcdx.cif (-1 == mcdx_requesttocdata(stuffp, &stuffp->di, 1)) return -EIO;
stuffp714drivers/cdrom/mcdx.cstuffp->lastsector = (CD_FRAMESIZE / 512) 
stuffp715drivers/cdrom/mcdx.c* msf2log(&stuffp->di.msf_leadout) - 1;
stuffp718drivers/cdrom/mcdx.cstuffp->di.n_first,
stuffp719drivers/cdrom/mcdx.cstuffp->di.msf_first.minute,
stuffp720drivers/cdrom/mcdx.cstuffp->di.msf_first.second,
stuffp721drivers/cdrom/mcdx.cstuffp->di.msf_first.frame,
stuffp722drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_first)));
stuffp724drivers/cdrom/mcdx.cstuffp->di.n_last,
stuffp725drivers/cdrom/mcdx.cstuffp->di.msf_leadout.minute,
stuffp726drivers/cdrom/mcdx.cstuffp->di.msf_leadout.second,
stuffp727drivers/cdrom/mcdx.cstuffp->di.msf_leadout.frame,
stuffp728drivers/cdrom/mcdx.cmsf2log(&stuffp->di.msf_leadout)));
stuffp730drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp731drivers/cdrom/mcdx.cTRACE((MALLOC, "open() free toc @ %p\n", stuffp->toc));
stuffp732drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp734drivers/cdrom/mcdx.cstuffp->toc = NULL;
stuffp737drivers/cdrom/mcdx.cif (-1 == mcdx_config(stuffp, 1)) return -EIO;
stuffp745drivers/cdrom/mcdx.cstuffp->xa = 0;
stuffp746drivers/cdrom/mcdx.cstuffp->audio = 0;
stuffp750drivers/cdrom/mcdx.cstuffp->xa ? "XA" : "normal"));
stuffp753drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_setdatamode(stuffp, 
stuffp754drivers/cdrom/mcdx.cstuffp->xa ? MODE2 : MODE1, 1)))
stuffp757drivers/cdrom/mcdx.cif ((stuffp->audio = e_audio(ans))) break; 
stuffp759drivers/cdrom/mcdx.cwhile (0 == (ans = mcdx_transfer(stuffp, buf, 0, 1))) 
stuffp763drivers/cdrom/mcdx.cstuffp->xa = !stuffp->xa; 
stuffp769drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, 
stuffp770drivers/cdrom/mcdx.cstuffp->xa ? RAW : COOKED, 1))
stuffp773drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp777drivers/cdrom/mcdx.cstuffp->xa ? "XA / " : "",
stuffp778drivers/cdrom/mcdx.cstuffp->multi.multi ? "Multi Session" : "Single Session"));
stuffp781drivers/cdrom/mcdx.cstuffp->xxx = jiffies;
stuffp785drivers/cdrom/mcdx.cif (0 == stuffp->users && (-1 == mcdx_lockdoor(stuffp, 1, 1))) 
stuffp788drivers/cdrom/mcdx.cstuffp->users++;
stuffp796drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp800drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[MINOR(ip->i_rdev)];
stuffp802drivers/cdrom/mcdx.cif (0 == --stuffp->users) {
stuffp808drivers/cdrom/mcdx.cif (-1 == mcdx_lockdoor(stuffp, 0, 3))
stuffp812drivers/cdrom/mcdx.cif (stuffp->eject_sw) mcdx_eject(stuffp, 1);
stuffp886drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp889drivers/cdrom/mcdx.cstuffp = mcdx_irq_map[irq];
stuffp891drivers/cdrom/mcdx.cif (stuffp == NULL || !stuffp->busy) {
stuffp897drivers/cdrom/mcdx.cif (0 == (stuffp->introk = 
stuffp898drivers/cdrom/mcdx.c(~(x = inb((unsigned int) stuffp->rreg_status)) & MCDX_RBIT_DTEN))) 
stuffp900drivers/cdrom/mcdx.cirq, x, inb((unsigned int) stuffp->rreg_data)));
stuffp906drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp907drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->busyq);
stuffp913drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp, 
stuffp930drivers/cdrom/mcdx.cwhile (stuffp->lock)
stuffp931drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq);
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->changed = jiffies;
stuffp997drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, timeout, -1, bp)) {
stuffp1009drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1010drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1051drivers/cdrom/mcdx.cstruct s_drive_stuff *stuffp;
stuffp1052drivers/cdrom/mcdx.cstuffp = mcdx_stuffp[i];
stuffp1053drivers/cdrom/mcdx.cif (!stuffp) continue;
stuffp1054drivers/cdrom/mcdx.crelease_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE);
stuffp1055drivers/cdrom/mcdx.cfree_irq(stuffp->irq);
stuffp1056drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1057drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free toc @ %p\n", stuffp->toc));
stuffp1058drivers/cdrom/mcdx.ckfree(stuffp->toc);
stuffp1060drivers/cdrom/mcdx.cTRACE((MALLOC, "cleanup_module() free stuffp @ %p\n", stuffp));
stuffp1062drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1120drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp;
stuffp1123drivers/cdrom/mcdx.csize = sizeof(*stuffp);
stuffp1130drivers/cdrom/mcdx.cif (!(stuffp = kmalloc(size, GFP_KERNEL))) {
stuffp1136drivers/cdrom/mcdx.cstuffp = (struct s_drive_stuff *) mem_start;
stuffp1140drivers/cdrom/mcdx.cTRACE((INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp));
stuffp1143drivers/cdrom/mcdx.cmemset(stuffp, 0, sizeof(*stuffp));
stuffp1144drivers/cdrom/mcdx.cstuffp->autoclose = 1;      /* close the door on open(2) */
stuffp1146drivers/cdrom/mcdx.cstuffp->present = 0;    /* this should be 0 already */
stuffp1147drivers/cdrom/mcdx.cstuffp->toc = NULL;      /* this should be NULL already */
stuffp1148drivers/cdrom/mcdx.cstuffp->changed = jiffies;
stuffp1151drivers/cdrom/mcdx.cstuffp->irq = irq(mcdx_drive_map[drive]);
stuffp1152drivers/cdrom/mcdx.cstuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
stuffp1153drivers/cdrom/mcdx.cstuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1;
stuffp1154drivers/cdrom/mcdx.cstuffp->wreg_hcon = stuffp->wreg_reset + 1;
stuffp1155drivers/cdrom/mcdx.cstuffp->wreg_chn = stuffp->wreg_hcon + 1;
stuffp1158drivers/cdrom/mcdx.cif (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) {
stuffp1162drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq,
stuffp1163drivers/cdrom/mcdx.cstuffp->wreg_data, 
stuffp1164drivers/cdrom/mcdx.cstuffp->wreg_data + MCDX_IO_SIZE - 1));
stuffp1165drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1166drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1171drivers/cdrom/mcdx.cTRACE((INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data));
stuffp1174drivers/cdrom/mcdx.cmcdx_reset(stuffp, HARD, 1);
stuffp1177drivers/cdrom/mcdx.cif (-1 == mcdx_requestversion(stuffp, &version, 4)) {
stuffp1181drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq));
stuffp1182drivers/cdrom/mcdx.cTRACE((MALLOC, "init() free stuffp @ %p\n", stuffp));
stuffp1183drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1190drivers/cdrom/mcdx.cstuffp->readcmd = READDSPEED; 
stuffp1191drivers/cdrom/mcdx.cstuffp->present = DOUBLE | DOOR | MULTI; 
stuffp1194drivers/cdrom/mcdx.cstuffp->readcmd = READSSPEED; 
stuffp1195drivers/cdrom/mcdx.cstuffp->present = SINGLE | DOOR | MULTI;
stuffp1198drivers/cdrom/mcdx.cstuffp->readcmd = READSSPEED;
stuffp1199drivers/cdrom/mcdx.cstuffp->present = SINGLE;
stuffp1202drivers/cdrom/mcdx.cstuffp->present = 0; break;
stuffp1205drivers/cdrom/mcdx.cstuffp->playcmd = READSSPEED;
stuffp1208drivers/cdrom/mcdx.cif (!stuffp->present) {
stuffp1210drivers/cdrom/mcdx.cMCDX, stuffp->wreg_data, stuffp->irq));
stuffp1211drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1219drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, MAJOR_NR));
stuffp1220drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1232drivers/cdrom/mcdx.cmcdx_irq_map[stuffp->irq] = stuffp;
stuffp1233drivers/cdrom/mcdx.cif (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, DEVICE_NAME)) {
stuffp1236drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, stuffp->irq));
stuffp1237drivers/cdrom/mcdx.cstuffp->irq = 0;
stuffp1238drivers/cdrom/mcdx.ckfree(stuffp);
stuffp1241drivers/cdrom/mcdx.crequest_region((unsigned int) stuffp->wreg_data, 
stuffp1248drivers/cdrom/mcdx.cmcdx_delay(stuffp, HZ/2);
stuffp1249drivers/cdrom/mcdx.cfor (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status);
stuffp1254drivers/cdrom/mcdx.coutb(0x50, (unsigned int) stuffp->wreg_chn);  /* irq 11 -> channel register */
stuffp1258drivers/cdrom/mcdx.cmcdx_config(stuffp, 1);
stuffp1260drivers/cdrom/mcdx.cstuffp->minor = drive;
stuffp1264drivers/cdrom/mcdx.cstuffp->wreg_data, stuffp->irq, version.code,
stuffp1266drivers/cdrom/mcdx.cmcdx_stuffp[drive] = stuffp;
stuffp1267drivers/cdrom/mcdx.cTRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp));
stuffp1278drivers/cdrom/mcdx.cstatic int mcdx_transfer(struct s_drive_stuff *stuffp,
stuffp1290drivers/cdrom/mcdx.cif (stuffp->audio) {
stuffp1295drivers/cdrom/mcdx.cwhile (stuffp->lock)
stuffp1296drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->lockq);
stuffp1301drivers/cdrom/mcdx.cif (stuffp->valid
stuffp1302drivers/cdrom/mcdx.c&& (sector >= stuffp->pending)
stuffp1303drivers/cdrom/mcdx.c&& (sector < stuffp->off_direct)) {
stuffp1306drivers/cdrom/mcdx.coff = stuffp->off_requested < (off = sector + nr_sectors)
stuffp1307drivers/cdrom/mcdx.c? stuffp->off_requested : off;
stuffp1309drivers/cdrom/mcdx.cstuffp->lock = current->pid;
stuffp1317drivers/cdrom/mcdx.cwhile (stuffp->busy) {
stuffp1318drivers/cdrom/mcdx.cinterruptible_sleep_on(&stuffp->busyq);
stuffp1324drivers/cdrom/mcdx.cif (((stuffp->busy == 0) && !stuffp->introk)
stuffp1326drivers/cdrom/mcdx.cif ((stuffp->busy == 0) && !stuffp->introk)
stuffp1330drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1331drivers/cdrom/mcdx.cstuffp->busy = 0;
stuffp1332drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1333drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->busyq);
stuffp1334drivers/cdrom/mcdx.cstuffp->errno = MCDX_E;
stuffp1341drivers/cdrom/mcdx.cif (stuffp->xa && (0 == (stuffp->pending & 3))) {
stuffp1344drivers/cdrom/mcdx.cstuffp->pending, HEAD));
stuffp1345drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, HEAD);
stuffp1350drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() read sector %d\n", stuffp->pending));
stuffp1351drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, p, 512); 
stuffp1356drivers/cdrom/mcdx.cif ((stuffp->busy = (3 == (stuffp->pending & 3))) && stuffp->xa) {
stuffp1359drivers/cdrom/mcdx.cstuffp->pending, CD_XA_TAIL));
stuffp1360drivers/cdrom/mcdx.cinsb((unsigned int) stuffp->rreg_data, &dummy[0], CD_XA_TAIL);
stuffp1363drivers/cdrom/mcdx.cif (stuffp->pending == sector) {
stuffp1369drivers/cdrom/mcdx.cwhile (++(stuffp->pending) < off);
stuffp1371drivers/cdrom/mcdx.cstuffp->lock = 0;
stuffp1372drivers/cdrom/mcdx.cwake_up_interruptible(&stuffp->lockq);
stuffp1382drivers/cdrom/mcdx.ccmd[0] = stuffp->readcmd;
stuffp1384drivers/cdrom/mcdx.cstuffp->valid = 1;
stuffp1385drivers/cdrom/mcdx.cstuffp->pending = sector & ~3;
stuffp1388drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() request sector %d\n", stuffp->pending));
stuffp1389drivers/cdrom/mcdx.cif (stuffp->pending > stuffp->lastsector) {
stuffp1391drivers/cdrom/mcdx.cstuffp->pending));
stuffp1392drivers/cdrom/mcdx.cstuffp->errno = MCDX_EOM;
stuffp1397drivers/cdrom/mcdx.cif ((stuffp->off_direct = stuffp->pending + DIRECT_SIZE)
stuffp1398drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1399drivers/cdrom/mcdx.cstuffp->off_direct = stuffp->lastsector + 1;
stuffp1400drivers/cdrom/mcdx.cif ((stuffp->off_requested = stuffp->pending + REQUEST_SIZE)
stuffp1401drivers/cdrom/mcdx.c> stuffp->lastsector + 1)
stuffp1402drivers/cdrom/mcdx.cstuffp->off_requested = stuffp->lastsector + 1;
stuffp1404drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() pending %d\n", stuffp->pending));
stuffp1405drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_dir %d\n", stuffp->off_direct));
stuffp1406drivers/cdrom/mcdx.cTRACE((TRANSFER, "transfer() off_req %d\n", stuffp->off_requested));
stuffp1410drivers/cdrom/mcdx.clog2msf(stuffp->pending / 4, &pending);
stuffp1416drivers/cdrom/mcdx.cstuffp->busy = 1;
stuffp1417drivers/cdrom/mcdx.ccmd[6] = (unsigned char) (stuffp->off_requested - stuffp->pending) / 4;
stuffp1419drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1423drivers/cdrom/mcdx.cstuffp->off_direct = (stuffp->off_direct += done) < stuffp->off_requested
stuffp1424drivers/cdrom/mcdx.c? stuffp->off_direct : stuffp->off_requested;
stuffp1460drivers/cdrom/mcdx.cint mcdx_readtoc(struct s_drive_stuff* stuffp)
stuffp1465drivers/cdrom/mcdx.cif (stuffp->toc) {
stuffp1471drivers/cdrom/mcdx.cstuffp->di.n_last - stuffp->di.n_first + 1));
stuffp1473drivers/cdrom/mcdx.cif (-1 == mcdx_hold(stuffp, 1)) return -1;
stuffp1476drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, TOC, 1)) return -EIO;
stuffp1481drivers/cdrom/mcdx.csize = sizeof(struct s_subqcode) * (stuffp->di.n_last - stuffp->di.n_first + 2);
stuffp1484drivers/cdrom/mcdx.cstuffp->toc = kmalloc(size, GFP_KERNEL);
stuffp1485drivers/cdrom/mcdx.cif (!stuffp->toc) {
stuffp1487drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1498drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 1); 
stuffp1500drivers/cdrom/mcdx.cstuffp->toc[trk].index = 0;
stuffp1506drivers/cdrom/mcdx.cif (-1 == mcdx_requestsubqcode(stuffp, &q, 1)) {
stuffp1507drivers/cdrom/mcdx.cmcdx_setdrivemode(stuffp, DATA, 1);
stuffp1514drivers/cdrom/mcdx.c&& (idx <= stuffp->di.n_last) 
stuffp1516drivers/cdrom/mcdx.c&& (stuffp->toc[idx - stuffp->di.n_first].index == 0)) {
stuffp1517drivers/cdrom/mcdx.cstuffp->toc[idx - stuffp->di.n_first] = q;
stuffp1523drivers/cdrom/mcdx.cmemset(&stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1], 
stuffp1524drivers/cdrom/mcdx.c0, sizeof(stuffp->toc[0]));
stuffp1525drivers/cdrom/mcdx.cstuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1].dt
stuffp1526drivers/cdrom/mcdx.c= stuffp->di.msf_leadout;
stuffp1531drivers/cdrom/mcdx.cif (-1 == mcdx_setdrivemode(stuffp, DATA, 2))
stuffp1537drivers/cdrom/mcdx.ctrk < (stuffp->di.n_last - stuffp->di.n_first + 2); 
stuffp1541drivers/cdrom/mcdx.ctrk + stuffp->di.n_first,
stuffp1542drivers/cdrom/mcdx.cstuffp->toc[trk].control, stuffp->toc[trk].tno, stuffp->toc[trk].index,
stuffp1543drivers/cdrom/mcdx.cstuffp->toc[trk].tt.minute, stuffp->toc[trk].tt.second, stuffp->toc[trk].tt.frame,
stuffp1544drivers/cdrom/mcdx.cstuffp->toc[trk].dt.minute, stuffp->toc[trk].dt.second, stuffp->toc[trk].dt.frame));
stuffp1552drivers/cdrom/mcdx.cmcdx_playmsf(struct s_drive_stuff* stuffp, const struct cdrom_msf* msf)
stuffp1558drivers/cdrom/mcdx.ccmd[0] = stuffp->playcmd;
stuffp1572drivers/cdrom/mcdx.coutsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd);
stuffp1574drivers/cdrom/mcdx.cif (-1 == mcdx_getval(stuffp, 3*HZ, 0, NULL)) {
stuffp1579drivers/cdrom/mcdx.cstuffp->audiostatus = CDROM_AUDIO_PLAY;
stuffp1584drivers/cdrom/mcdx.cmcdx_playtrk(struct s_drive_stuff* stuffp, const struct cdrom_ti* ti)
stuffp1589drivers/cdrom/mcdx.cif (-1 == mcdx_readtoc(stuffp)) return -1;
stuffp1591drivers/cdrom/mcdx.cif (ti) p = &stuffp->toc[ti->cdti_trk0 - stuffp->di.n_first];
stuffp1592drivers/cdrom/mcdx.celse p = &stuffp->start;
stuffp1599drivers/cdrom/mcdx.cp = &stuffp->toc[ti->cdti_trk1 - stuffp->di.n_first + 1];
stuffp1600drivers/cdrom/mcdx.cstuffp->stop = *p;
stuffp1601drivers/cdrom/mcdx.c} else p = &stuffp->stop;
stuffp1607drivers/cdrom/mcdx.creturn mcdx_playmsf(stuffp, &msf);
stuffp1614drivers/cdrom/mcdx.cmcdx_closedoor(struct s_drive_stuff *stuffp, int tries)
stuffp1616drivers/cdrom/mcdx.cif (stuffp->present & DOOR)
stuffp1617drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf8", 1, NULL, 1, 5*HZ, tries);
stuffp1623drivers/cdrom/mcdx.cmcdx_stop(struct s_drive_stuff *stuffp, int tries)
stuffp1624drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\xf0", 1, NULL, 1, 2*HZ, tries); }
stuffp1627drivers/cdrom/mcdx.cmcdx_hold(struct s_drive_stuff *stuffp, int tries)
stuffp1628drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x70", 1, NULL, 1, 2*HZ, tries); }
stuffp1631drivers/cdrom/mcdx.cmcdx_eject(struct s_drive_stuff *stuffp, int tries)
stuffp1633drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1634drivers/cdrom/mcdx.cstuffp->ejected = jiffies;
stuffp1635drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, "\xf6", 1, NULL, 1, 5*HZ, tries);
stuffp1640drivers/cdrom/mcdx.cmcdx_requestsubqcode(struct s_drive_stuff *stuffp, 
stuffp1648drivers/cdrom/mcdx.cstuffp, "\x20", 1, buf, sizeof(buf),
stuffp1665drivers/cdrom/mcdx.cmcdx_requestmultidiskinfo(struct s_drive_stuff *stuffp, struct s_multi *multi, int tries)
stuffp1670drivers/cdrom/mcdx.cif (stuffp->present & MULTI) {
stuffp1671drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x11", 1, buf, sizeof(buf), 2*HZ, tries);
stuffp1684drivers/cdrom/mcdx.cmcdx_requesttocdata(struct s_drive_stuff *stuffp, struct s_diskinfo *info, int tries)
stuffp1688drivers/cdrom/mcdx.cans = mcdx_talk(stuffp, "\x10", 1, buf, sizeof(buf), 2*HZ, tries);
stuffp1701drivers/cdrom/mcdx.cmcdx_setdrivemode(struct s_drive_stuff *stuffp, enum drivemodes mode, int tries)
stuffp1708drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xc2", 1, cmd, sizeof(cmd), 5*HZ, tries)))
stuffp1719drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5*HZ, tries);
stuffp1724drivers/cdrom/mcdx.cmcdx_setdatamode(struct s_drive_stuff *stuffp, enum datamodes mode, int tries)
stuffp1734drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 2, NULL, 1, 5*HZ, tries);
stuffp1738drivers/cdrom/mcdx.cmcdx_config(struct s_drive_stuff *stuffp, int tries)
stuffp1749drivers/cdrom/mcdx.cif (-1 == mcdx_talk(stuffp, cmd, 3, NULL, 1, 1*HZ, tries))
stuffp1755drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, 3, NULL, 1, 1*HZ, tries);
stuffp1759drivers/cdrom/mcdx.cmcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *ver, int tries)
stuffp1764drivers/cdrom/mcdx.cif (-1 == (ans = mcdx_talk(stuffp, "\xdc", 1, buf, sizeof(buf), 2*HZ, tries)))
stuffp1774drivers/cdrom/mcdx.cmcdx_reset(struct s_drive_stuff *stuffp, enum resetmodes mode, int tries)
stuffp1777drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_chn);    /* no dma, no irq -> hardware */
stuffp1778drivers/cdrom/mcdx.coutb(0, (unsigned int) stuffp->wreg_reset);    /* hw reset */
stuffp1780drivers/cdrom/mcdx.c} else return mcdx_talk(stuffp, "\x60", 1, NULL, 1, 5*HZ, tries);
stuffp1784drivers/cdrom/mcdx.cmcdx_lockdoor(struct s_drive_stuff *stuffp, int lock, int tries)
stuffp1787drivers/cdrom/mcdx.cif (stuffp->present & DOOR) {
stuffp1789drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 1, 5*HZ, tries);
stuffp1795drivers/cdrom/mcdx.cmcdx_getstatus(struct s_drive_stuff *stuffp, int tries)
stuffp1796drivers/cdrom/mcdx.c{ return mcdx_talk(stuffp, "\x40", 1, NULL, 1, 5*HZ, tries); }
stuffp1799drivers/cdrom/mcdx.cmcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, char* buf)
stuffp1806drivers/cdrom/mcdx.cwhile (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_STEN) {
stuffp1808drivers/cdrom/mcdx.cmcdx_delay(stuffp, delay);
stuffp1811drivers/cdrom/mcdx.c*buf = (unsigned char) inb((unsigned int) stuffp->rreg_data) & 0xff;
stuffp1818drivers/cdrom/mcdx.cstruct s_drive_stuff* stuffp, 
stuffp1829drivers/cdrom/mcdx.creturn mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 5, 200, tries);