tag | line | file | source code |
stuffp | 266 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp = mcdx_stuffp[MINOR(ip->i_rdev)]; |
stuffp | 268 | drivers/block/mcdx.c | if (!stuffp->present) return -ENXIO; |
stuffp | 278 | drivers/block/mcdx.c | if (-1 == mcdx_stop(stuffp, 1)) |
stuffp | 306 | drivers/block/mcdx.c | if ((stuffp->toc == NULL) && (0 != (ans = mcdx_readtoc(stuffp)))) return ans; |
stuffp | 312 | drivers/block/mcdx.c | tp = &stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1]; |
stuffp | 313 | drivers/block/mcdx.c | else if (entry.cdte_track > stuffp->di.n_last |
stuffp | 314 | drivers/block/mcdx.c | || entry.cdte_track < stuffp->di.n_first) return -EINVAL; |
stuffp | 315 | drivers/block/mcdx.c | else tp = &stuffp->toc[entry.cdte_track - stuffp->di.n_first]; |
stuffp | 345 | drivers/block/mcdx.c | if (-1 == mcdx_requestsubqcode(stuffp, &q, 1)) return -EIO; |
stuffp | 347 | drivers/block/mcdx.c | TRACE((IOCTL, "audiostatus: %x\n", stuffp->audiostatus)); |
stuffp | 348 | drivers/block/mcdx.c | sub.cdsc_audiostatus = stuffp->audiostatus; |
stuffp | 379 | drivers/block/mcdx.c | toc.cdth_trk0 = stuffp->di.n_first; |
stuffp | 380 | drivers/block/mcdx.c | toc.cdth_trk1 = stuffp->di.n_last; |
stuffp | 383 | drivers/block/mcdx.c | stuffp->di.n_first, stuffp->di.n_last)); |
stuffp | 389 | drivers/block/mcdx.c | if (stuffp->audiostatus != CDROM_AUDIO_PLAY) return -EINVAL; |
stuffp | 390 | drivers/block/mcdx.c | if (-1 == mcdx_stop(stuffp, 1)) return -EIO; |
stuffp | 391 | drivers/block/mcdx.c | if (-1 == mcdx_requestsubqcode(stuffp, &stuffp->start, 1)) |
stuffp | 405 | drivers/block/mcdx.c | ms.addr.msf.minute = bcd2uint(stuffp->multi.msf_last.minute); |
stuffp | 406 | drivers/block/mcdx.c | ms.addr.msf.second = bcd2uint(stuffp->multi.msf_last.second); |
stuffp | 407 | drivers/block/mcdx.c | ms.addr.msf.frame = bcd2uint(stuffp->multi.msf_last.frame); |
stuffp | 409 | drivers/block/mcdx.c | ms.addr.lba = msf2log(&stuffp->multi.msf_last); |
stuffp | 412 | drivers/block/mcdx.c | ms.xa_flag = stuffp->xa; |
stuffp | 426 | drivers/block/mcdx.c | stuffp->multi.msf_last.minute, |
stuffp | 427 | drivers/block/mcdx.c | stuffp->multi.msf_last.second, |
stuffp | 428 | drivers/block/mcdx.c | stuffp->multi.msf_last.frame)); |
stuffp | 436 | drivers/block/mcdx.c | stuffp->multi.msf_last.minute, |
stuffp | 437 | drivers/block/mcdx.c | stuffp->multi.msf_last.second, |
stuffp | 438 | drivers/block/mcdx.c | stuffp->multi.msf_last.frame)); |
stuffp | 445 | drivers/block/mcdx.c | if (stuffp->users > 1) return -EBUSY; |
stuffp | 446 | drivers/block/mcdx.c | if (-1 == mcdx_eject(stuffp, 1)) return -EIO; |
stuffp | 459 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp; |
stuffp | 470 | drivers/block/mcdx.c | stuffp = mcdx_stuffp[MINOR(CURRENT->dev)]; |
stuffp | 471 | drivers/block/mcdx.c | TRACE((REQUEST, "do_request() stuffp = %p\n", stuffp)); |
stuffp | 476 | drivers/block/mcdx.c | if ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp->present)) { |
stuffp | 482 | drivers/block/mcdx.c | if (stuffp->audio) { |
stuffp | 495 | drivers/block/mcdx.c | stuffp->errno = 0; |
stuffp | 500 | drivers/block/mcdx.c | stuffp, |
stuffp | 505 | drivers/block/mcdx.c | if (stuffp->errno == MCDX_EOM) { |
stuffp | 532 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp; |
stuffp | 536 | drivers/block/mcdx.c | stuffp = mcdx_stuffp[MINOR(ip->i_rdev)]; |
stuffp | 537 | drivers/block/mcdx.c | if (!stuffp->present) return -ENXIO; |
stuffp | 541 | drivers/block/mcdx.c | if (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_DOOR) |
stuffp | 542 | drivers/block/mcdx.c | mcdx_closedoor(stuffp, 1); |
stuffp | 545 | drivers/block/mcdx.c | if (changed < stuffp->changed) { |
stuffp | 556 | drivers/block/mcdx.c | if (-1 == mcdx_requestmultidiskinfo(stuffp, &stuffp->multi, 6)) |
stuffp | 559 | drivers/block/mcdx.c | if (stuffp->multi.multi > 2) |
stuffp | 560 | drivers/block/mcdx.c | WARN(("open() unknown multisession value (%d)\n", stuffp->multi.multi)); |
stuffp | 563 | drivers/block/mcdx.c | if (!stuffp->multi.multi) |
stuffp | 564 | drivers/block/mcdx.c | stuffp->multi.msf_last.second = 2; |
stuffp | 567 | drivers/block/mcdx.c | stuffp->multi.multi, |
stuffp | 568 | drivers/block/mcdx.c | stuffp->multi.msf_last.minute, |
stuffp | 569 | drivers/block/mcdx.c | stuffp->multi.msf_last.second, |
stuffp | 570 | drivers/block/mcdx.c | stuffp->multi.msf_last.frame)); |
stuffp | 575 | drivers/block/mcdx.c | if (-1 == mcdx_requesttocdata(stuffp, &stuffp->di, 1)) return -EIO; |
stuffp | 577 | drivers/block/mcdx.c | stuffp->lastsector = (CD_FRAMESIZE / 512) * msf2log(&stuffp->di.msf_leadout) - 1; |
stuffp | 580 | drivers/block/mcdx.c | stuffp->di.n_first, |
stuffp | 581 | drivers/block/mcdx.c | stuffp->di.msf_first.minute, |
stuffp | 582 | drivers/block/mcdx.c | stuffp->di.msf_first.second, |
stuffp | 583 | drivers/block/mcdx.c | stuffp->di.msf_first.frame, |
stuffp | 584 | drivers/block/mcdx.c | msf2log(&stuffp->di.msf_first))); |
stuffp | 586 | drivers/block/mcdx.c | stuffp->di.n_last, |
stuffp | 587 | drivers/block/mcdx.c | stuffp->di.msf_leadout.minute, |
stuffp | 588 | drivers/block/mcdx.c | stuffp->di.msf_leadout.second, |
stuffp | 589 | drivers/block/mcdx.c | stuffp->di.msf_leadout.frame, |
stuffp | 590 | drivers/block/mcdx.c | msf2log(&stuffp->di.msf_leadout))); |
stuffp | 592 | drivers/block/mcdx.c | if (stuffp->toc) { |
stuffp | 593 | drivers/block/mcdx.c | TRACE((MALLOC, "open() free toc @ %p\n", stuffp->toc)); |
stuffp | 594 | drivers/block/mcdx.c | kfree(stuffp->toc); |
stuffp | 596 | drivers/block/mcdx.c | stuffp->toc = NULL; |
stuffp | 599 | drivers/block/mcdx.c | if (-1 == mcdx_config(stuffp, 1)) return -EIO; |
stuffp | 607 | drivers/block/mcdx.c | stuffp->xa = 0; |
stuffp | 608 | drivers/block/mcdx.c | stuffp->audio = 0; |
stuffp | 612 | drivers/block/mcdx.c | stuffp->xa ? "XA" : "normal")); |
stuffp | 615 | drivers/block/mcdx.c | if (-1 == (ans = mcdx_setdatamode(stuffp, |
stuffp | 616 | drivers/block/mcdx.c | stuffp->xa ? MODE2 : MODE1, 1))) |
stuffp | 619 | drivers/block/mcdx.c | if ((stuffp->audio = e_audio(ans))) break; |
stuffp | 621 | drivers/block/mcdx.c | while (0 == (ans = mcdx_transfer(stuffp, buf, 0, 1))) |
stuffp | 625 | drivers/block/mcdx.c | stuffp->xa = !stuffp->xa; |
stuffp | 631 | drivers/block/mcdx.c | if (-1 == mcdx_setdrivemode(stuffp, |
stuffp | 632 | drivers/block/mcdx.c | stuffp->xa ? RAW : COOKED, 1)) |
stuffp | 635 | drivers/block/mcdx.c | if (stuffp->audio) { |
stuffp | 639 | drivers/block/mcdx.c | stuffp->xa ? "XA / " : "", |
stuffp | 640 | drivers/block/mcdx.c | stuffp->multi.multi ? "Multi Session" : "Single Session")); |
stuffp | 643 | drivers/block/mcdx.c | changed = stuffp->changed; |
stuffp | 646 | drivers/block/mcdx.c | if (-1 == mcdx_lockdoor(stuffp, 1, 1)) return -EIO; |
stuffp | 648 | drivers/block/mcdx.c | stuffp->users++; |
stuffp | 656 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp; |
stuffp | 660 | drivers/block/mcdx.c | stuffp = mcdx_stuffp[MINOR(ip->i_rdev)]; |
stuffp | 662 | drivers/block/mcdx.c | if (0 == --stuffp->users) { |
stuffp | 668 | drivers/block/mcdx.c | if (-1 == mcdx_lockdoor(stuffp, 0, 1)) |
stuffp | 729 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp; |
stuffp | 732 | drivers/block/mcdx.c | stuffp = mcdx_irq_map[irq]; |
stuffp | 734 | drivers/block/mcdx.c | if (!stuffp->busy) { |
stuffp | 740 | drivers/block/mcdx.c | if (0 == (stuffp->introk = |
stuffp | 741 | drivers/block/mcdx.c | (~(x = inb((unsigned int) stuffp->rreg_status)) & MCDX_RBIT_DTEN))) |
stuffp | 743 | drivers/block/mcdx.c | irq, x, inb((unsigned int) stuffp->rreg_data))); |
stuffp | 749 | drivers/block/mcdx.c | stuffp->busy = 0; |
stuffp | 750 | drivers/block/mcdx.c | wake_up_interruptible(&stuffp->busyq); |
stuffp | 756 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp, |
stuffp | 770 | drivers/block/mcdx.c | while (stuffp->lock) |
stuffp | 771 | drivers/block/mcdx.c | interruptible_sleep_on(&stuffp->lockq); |
stuffp | 773 | drivers/block/mcdx.c | stuffp->lock = 1; |
stuffp | 774 | drivers/block/mcdx.c | stuffp->valid = 0; |
stuffp | 791 | drivers/block/mcdx.c | outsb((unsigned int) stuffp->wreg_data, cmd, cmdlen); |
stuffp | 799 | drivers/block/mcdx.c | while ((inb((unsigned int) stuffp->rreg_status)) & MCDX_RBIT_STEN) { |
stuffp | 801 | drivers/block/mcdx.c | mcdx_delay(stuffp, DELAY); |
stuffp | 811 | drivers/block/mcdx.c | *bp++ = st = (unsigned char) inb((unsigned int) stuffp->rreg_data); |
stuffp | 816 | drivers/block/mcdx.c | stuffp->audiostatus = e_audiobusy(st) ? |
stuffp | 822 | drivers/block/mcdx.c | stuffp->changed = jiffies; |
stuffp | 833 | drivers/block/mcdx.c | *bp++ = (unsigned char) inb((unsigned int) stuffp->rreg_data); |
stuffp | 847 | drivers/block/mcdx.c | stuffp->lock = 0; |
stuffp | 848 | drivers/block/mcdx.c | wake_up_interruptible(&stuffp->lockq); |
stuffp | 886 | drivers/block/mcdx.c | struct s_drive_stuff *stuffp; |
stuffp | 887 | drivers/block/mcdx.c | stuffp = mcdx_stuffp[i]; |
stuffp | 888 | drivers/block/mcdx.c | if (!stuffp) continue; |
stuffp | 889 | drivers/block/mcdx.c | release_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE); |
stuffp | 890 | drivers/block/mcdx.c | free_irq(stuffp->irq); |
stuffp | 891 | drivers/block/mcdx.c | if (stuffp->toc) { |
stuffp | 892 | drivers/block/mcdx.c | TRACE((MALLOC, "cleanup_module() free toc @ %p\n", stuffp->toc)); |
stuffp | 893 | drivers/block/mcdx.c | kfree(stuffp->toc); |
stuffp | 895 | drivers/block/mcdx.c | TRACE((MALLOC, "cleanup_module() free stuffp @ %p\n", stuffp)); |
stuffp | 897 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 953 | drivers/block/mcdx.c | struct s_drive_stuff* stuffp; |
stuffp | 956 | drivers/block/mcdx.c | TRACE((MALLOC, "init() malloc %d bytes\n", sizeof(*stuffp))); |
stuffp | 958 | drivers/block/mcdx.c | if (!(stuffp = kmalloc(sizeof(*stuffp), GFP_KERNEL))) { |
stuffp | 963 | drivers/block/mcdx.c | TRACE((INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp)); |
stuffp | 966 | drivers/block/mcdx.c | memset(stuffp, 0, sizeof(*stuffp)); |
stuffp | 968 | drivers/block/mcdx.c | stuffp->present = 0; /* this should be 0 already */ |
stuffp | 969 | drivers/block/mcdx.c | stuffp->toc = NULL; /* this should be NULL already */ |
stuffp | 970 | drivers/block/mcdx.c | stuffp->changed = jiffies; |
stuffp | 973 | drivers/block/mcdx.c | stuffp->irq = irq(mcdx_drive_map[drive]); |
stuffp | 974 | drivers/block/mcdx.c | stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); |
stuffp | 975 | drivers/block/mcdx.c | stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1; |
stuffp | 976 | drivers/block/mcdx.c | stuffp->wreg_hcon = stuffp->wreg_reset + 1; |
stuffp | 977 | drivers/block/mcdx.c | stuffp->wreg_chn = stuffp->wreg_hcon + 1; |
stuffp | 980 | drivers/block/mcdx.c | if (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) { |
stuffp | 982 | drivers/block/mcdx.c | stuffp->wreg_data, stuffp->wreg_data + MCDX_IO_SIZE - 1)); |
stuffp | 983 | drivers/block/mcdx.c | stuffp->wreg_data = 0; |
stuffp | 984 | drivers/block/mcdx.c | TRACE((MALLOC, "init() free stuffp @ %p\n", stuffp)); |
stuffp | 985 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 990 | drivers/block/mcdx.c | TRACE((INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data)); |
stuffp | 993 | drivers/block/mcdx.c | mcdx_reset(stuffp, HARD, 1); |
stuffp | 996 | drivers/block/mcdx.c | if (-1 == mcdx_requestversion(stuffp, &version, 2)) { |
stuffp | 998 | drivers/block/mcdx.c | TRACE((MALLOC, "init() free stuffp @ %p\n", stuffp)); |
stuffp | 999 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 1005 | drivers/block/mcdx.c | stuffp->readcmd = READDSPEED; |
stuffp | 1006 | drivers/block/mcdx.c | stuffp->present = DOUBLE | DOOR | MULTI; |
stuffp | 1009 | drivers/block/mcdx.c | stuffp->readcmd = READSSPEED; |
stuffp | 1010 | drivers/block/mcdx.c | stuffp->present = SINGLE | DOOR | MULTI; |
stuffp | 1013 | drivers/block/mcdx.c | stuffp->readcmd = READSSPEED; |
stuffp | 1014 | drivers/block/mcdx.c | stuffp->present = SINGLE; |
stuffp | 1017 | drivers/block/mcdx.c | stuffp->present = 0; break; |
stuffp | 1021 | drivers/block/mcdx.c | if (!stuffp->present) { |
stuffp | 1023 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 1031 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 1043 | drivers/block/mcdx.c | mcdx_irq_map[stuffp->irq] = stuffp; |
stuffp | 1044 | drivers/block/mcdx.c | if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, MCD)) { |
stuffp | 1046 | drivers/block/mcdx.c | DEVICE_NAME "\n", stuffp->irq); |
stuffp | 1047 | drivers/block/mcdx.c | stuffp->irq = 0; |
stuffp | 1048 | drivers/block/mcdx.c | kfree(stuffp); |
stuffp | 1051 | drivers/block/mcdx.c | request_region((unsigned long) (unsigned int) stuffp->wreg_data, MCDX_IO_SIZE, MCD); |
stuffp | 1056 | drivers/block/mcdx.c | mcdx_delay(stuffp, 50); |
stuffp | 1057 | drivers/block/mcdx.c | for (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status); |
stuffp | 1062 | drivers/block/mcdx.c | outb(0x50, (unsigned int) stuffp->wreg_chn); /* irq 11 -> channel register */ |
stuffp | 1066 | drivers/block/mcdx.c | mcdx_config(stuffp, 1); |
stuffp | 1068 | drivers/block/mcdx.c | stuffp->minor = drive; |
stuffp | 1072 | drivers/block/mcdx.c | stuffp->wreg_data, stuffp->irq, version.code, version.ver); |
stuffp | 1073 | drivers/block/mcdx.c | mcdx_stuffp[drive] = stuffp; |
stuffp | 1074 | drivers/block/mcdx.c | TRACE((INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp)); |
stuffp | 1081 | drivers/block/mcdx.c | static int mcdx_transfer(struct s_drive_stuff *stuffp, |
stuffp | 1093 | drivers/block/mcdx.c | if (stuffp->audio) { |
stuffp | 1098 | drivers/block/mcdx.c | while (stuffp->lock) |
stuffp | 1099 | drivers/block/mcdx.c | interruptible_sleep_on(&stuffp->lockq); |
stuffp | 1101 | drivers/block/mcdx.c | if (stuffp->valid |
stuffp | 1102 | drivers/block/mcdx.c | && (sector >= stuffp->pending) |
stuffp | 1103 | drivers/block/mcdx.c | && (sector < stuffp->off_direct)) { |
stuffp | 1106 | drivers/block/mcdx.c | off = stuffp->off_requested < (off = sector + nr_sectors) |
stuffp | 1107 | drivers/block/mcdx.c | ? stuffp->off_requested : off; |
stuffp | 1109 | drivers/block/mcdx.c | stuffp->lock = current->pid; |
stuffp | 1117 | drivers/block/mcdx.c | while (stuffp->busy) { |
stuffp | 1118 | drivers/block/mcdx.c | interruptible_sleep_on(&stuffp->busyq); |
stuffp | 1128 | drivers/block/mcdx.c | if (((stuffp->busy == 0) && !stuffp->introk) |
stuffp | 1131 | drivers/block/mcdx.c | if ((stuffp->busy == 0) && !stuffp->introk) |
stuffp | 1138 | drivers/block/mcdx.c | stuffp->lock = 0; |
stuffp | 1139 | drivers/block/mcdx.c | stuffp->busy = 0; |
stuffp | 1140 | drivers/block/mcdx.c | wake_up_interruptible(&stuffp->lockq); |
stuffp | 1141 | drivers/block/mcdx.c | wake_up_interruptible(&stuffp->busyq); |
stuffp | 1142 | drivers/block/mcdx.c | stuffp->errno = MCDX_E; |
stuffp | 1149 | drivers/block/mcdx.c | if (stuffp->xa && (0 == (stuffp->pending & 3))) { |
stuffp | 1152 | drivers/block/mcdx.c | stuffp->pending, HEAD)); |
stuffp | 1153 | drivers/block/mcdx.c | insb((unsigned int) stuffp->rreg_data, p, HEAD); |
stuffp | 1158 | drivers/block/mcdx.c | TRACE((TRANSFER, "transfer() read sector %d\n", stuffp->pending)); |
stuffp | 1159 | drivers/block/mcdx.c | insb((unsigned int) stuffp->rreg_data, p, 512); |
stuffp | 1164 | drivers/block/mcdx.c | if ((stuffp->busy = (3 == (stuffp->pending & 3))) && stuffp->xa) { |
stuffp | 1167 | drivers/block/mcdx.c | stuffp->pending, CD_XA_TAIL)); |
stuffp | 1168 | drivers/block/mcdx.c | insb((unsigned int) stuffp->rreg_data, &dummy[0], CD_XA_TAIL); |
stuffp | 1171 | drivers/block/mcdx.c | if (stuffp->pending == sector) { |
stuffp | 1177 | drivers/block/mcdx.c | while (++(stuffp->pending) < off); |
stuffp | 1179 | drivers/block/mcdx.c | stuffp->lock = 0; |
stuffp | 1180 | drivers/block/mcdx.c | wake_up_interruptible(&stuffp->lockq); |
stuffp | 1190 | drivers/block/mcdx.c | cmd[0] = stuffp->readcmd; |
stuffp | 1192 | drivers/block/mcdx.c | stuffp->valid = 1; |
stuffp | 1193 | drivers/block/mcdx.c | stuffp->pending = sector & ~3; |
stuffp | 1196 | drivers/block/mcdx.c | TRACE((TRANSFER, "transfer() request sector %d\n", stuffp->pending)); |
stuffp | 1197 | drivers/block/mcdx.c | if (stuffp->pending > stuffp->lastsector) { |
stuffp | 1199 | drivers/block/mcdx.c | stuffp->pending); |
stuffp | 1200 | drivers/block/mcdx.c | stuffp->errno = MCDX_EOM; |
stuffp | 1205 | drivers/block/mcdx.c | if ((stuffp->off_direct = stuffp->pending + DIRECT_SIZE) |
stuffp | 1206 | drivers/block/mcdx.c | > stuffp->lastsector + 1) |
stuffp | 1207 | drivers/block/mcdx.c | stuffp->off_direct = stuffp->lastsector + 1; |
stuffp | 1208 | drivers/block/mcdx.c | if ((stuffp->off_requested = stuffp->pending + REQUEST_SIZE) |
stuffp | 1209 | drivers/block/mcdx.c | > stuffp->lastsector + 1) |
stuffp | 1210 | drivers/block/mcdx.c | stuffp->off_requested = stuffp->lastsector + 1; |
stuffp | 1212 | drivers/block/mcdx.c | TRACE((TRANSFER, "transfer() pending %d\n", stuffp->pending)); |
stuffp | 1213 | drivers/block/mcdx.c | TRACE((TRANSFER, "transfer() off_dir %d\n", stuffp->off_direct)); |
stuffp | 1214 | drivers/block/mcdx.c | TRACE((TRANSFER, "transfer() off_req %d\n", stuffp->off_requested)); |
stuffp | 1218 | drivers/block/mcdx.c | log2msf(stuffp->pending / 4, &pending); |
stuffp | 1224 | drivers/block/mcdx.c | stuffp->busy = 1; |
stuffp | 1225 | drivers/block/mcdx.c | cmd[6] = (unsigned char) (stuffp->off_requested - stuffp->pending) / 4; |
stuffp | 1227 | drivers/block/mcdx.c | outsb((unsigned int) stuffp->wreg_data, cmd, sizeof cmd); |
stuffp | 1231 | drivers/block/mcdx.c | stuffp->off_direct = (stuffp->off_direct += done) < stuffp->off_requested |
stuffp | 1232 | drivers/block/mcdx.c | ? stuffp->off_direct : stuffp->off_requested; |
stuffp | 1268 | drivers/block/mcdx.c | int mcdx_readtoc(struct s_drive_stuff* stuffp) |
stuffp | 1272 | drivers/block/mcdx.c | stuffp->di.n_last - stuffp->di.n_first + 1)); |
stuffp | 1275 | drivers/block/mcdx.c | if (stuffp->toc) { |
stuffp | 1282 | drivers/block/mcdx.c | if (-1 == mcdx_setdrivemode(stuffp, TOC, 1)) return -EIO; |
stuffp | 1287 | drivers/block/mcdx.c | size = sizeof(struct s_subqcode) * (stuffp->di.n_last - stuffp->di.n_first + 2); |
stuffp | 1290 | drivers/block/mcdx.c | stuffp->toc = kmalloc(size, GFP_KERNEL); |
stuffp | 1291 | drivers/block/mcdx.c | if (!stuffp->toc) { |
stuffp | 1293 | drivers/block/mcdx.c | mcdx_setdrivemode(stuffp, DATA, 1); |
stuffp | 1304 | drivers/block/mcdx.c | trk < (stuffp->di.n_last - stuffp->di.n_first + 1); |
stuffp | 1306 | drivers/block/mcdx.c | stuffp->toc[trk].index = 0; |
stuffp | 1312 | drivers/block/mcdx.c | if (-1 == mcdx_requestsubqcode(stuffp, &q, 1)) { |
stuffp | 1313 | drivers/block/mcdx.c | mcdx_setdrivemode(stuffp, DATA, 1); |
stuffp | 1320 | drivers/block/mcdx.c | && (idx <= stuffp->di.n_last) |
stuffp | 1322 | drivers/block/mcdx.c | && (stuffp->toc[idx - stuffp->di.n_first].index == 0)) { |
stuffp | 1323 | drivers/block/mcdx.c | stuffp->toc[idx - stuffp->di.n_first] = q; |
stuffp | 1328 | drivers/block/mcdx.c | memset(&stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1], |
stuffp | 1329 | drivers/block/mcdx.c | 0, sizeof(stuffp->toc[0])); |
stuffp | 1330 | drivers/block/mcdx.c | stuffp->toc[stuffp->di.n_last - stuffp->di.n_first + 1].dt |
stuffp | 1331 | drivers/block/mcdx.c | = stuffp->di.msf_leadout; |
stuffp | 1336 | drivers/block/mcdx.c | if (-1 == mcdx_setdrivemode(stuffp, DATA, 2)) |
stuffp | 1342 | drivers/block/mcdx.c | trk < (stuffp->di.n_last - stuffp->di.n_first + 2); |
stuffp | 1346 | drivers/block/mcdx.c | trk + stuffp->di.n_first, |
stuffp | 1347 | drivers/block/mcdx.c | stuffp->toc[trk].control, stuffp->toc[trk].tno, stuffp->toc[trk].index, |
stuffp | 1348 | drivers/block/mcdx.c | stuffp->toc[trk].tt.minute, stuffp->toc[trk].tt.second, stuffp->toc[trk].tt.frame, |
stuffp | 1349 | drivers/block/mcdx.c | stuffp->toc[trk].dt.minute, stuffp->toc[trk].dt.second, stuffp->toc[trk].dt.frame)); |
stuffp | 1360 | drivers/block/mcdx.c | mcdx_closedoor(struct s_drive_stuff *stuffp, int tries) |
stuffp | 1362 | drivers/block/mcdx.c | if (stuffp->present & DOOR) |
stuffp | 1363 | drivers/block/mcdx.c | return mcdx_talk(stuffp, "\xf8", 1, NULL, 0, 500, tries); |
stuffp | 1369 | drivers/block/mcdx.c | mcdx_stop(struct s_drive_stuff *stuffp, int tries) |
stuffp | 1370 | drivers/block/mcdx.c | { return mcdx_talk(stuffp, "\xf0", 1, NULL, 0, 200, tries); } |
stuffp | 1373 | drivers/block/mcdx.c | mcdx_eject(struct s_drive_stuff *stuffp, int tries) |
stuffp | 1375 | drivers/block/mcdx.c | if (stuffp->present & DOOR) |
stuffp | 1376 | drivers/block/mcdx.c | return mcdx_talk(stuffp, "\xf6", 1, NULL, 0, 500, tries); |
stuffp | 1382 | drivers/block/mcdx.c | mcdx_requestsubqcode(struct s_drive_stuff *stuffp, struct s_subqcode *sub, int tries) |
stuffp | 1386 | drivers/block/mcdx.c | ans = mcdx_talk(stuffp, "\x20", 1, buf, sizeof(buf), 200, tries); |
stuffp | 1400 | drivers/block/mcdx.c | mcdx_requestmultidiskinfo(struct s_drive_stuff *stuffp, struct s_multi *multi, int tries) |
stuffp | 1405 | drivers/block/mcdx.c | if (stuffp->present & MULTI) { |
stuffp | 1406 | drivers/block/mcdx.c | ans = mcdx_talk(stuffp, "\x11", 1, buf, sizeof(buf), 200, tries); |
stuffp | 1419 | drivers/block/mcdx.c | mcdx_requesttocdata(struct s_drive_stuff *stuffp, struct s_diskinfo *info, int tries) |
stuffp | 1423 | drivers/block/mcdx.c | ans = mcdx_talk(stuffp, "\x10", 1, buf, sizeof(buf), 200, tries); |
stuffp | 1436 | drivers/block/mcdx.c | mcdx_setdrivemode(struct s_drive_stuff *stuffp, enum drivemodes mode, int tries) |
stuffp | 1443 | drivers/block/mcdx.c | if (-1 == (ans = mcdx_talk(stuffp, "\xc2", 1, cmd, sizeof(cmd), 500, tries))) |
stuffp | 1454 | drivers/block/mcdx.c | return mcdx_talk(stuffp, cmd, 2, NULL, 0, 500, tries); |
stuffp | 1459 | drivers/block/mcdx.c | mcdx_setdatamode(struct s_drive_stuff *stuffp, enum datamodes mode, int tries) |
stuffp | 1469 | drivers/block/mcdx.c | return mcdx_talk(stuffp, cmd, 2, NULL, 0, 500, tries); |
stuffp | 1473 | drivers/block/mcdx.c | mcdx_config(struct s_drive_stuff *stuffp, int tries) |
stuffp | 1484 | drivers/block/mcdx.c | if (-1 == mcdx_talk(stuffp, cmd, 3, NULL, 0, 100, tries)) |
stuffp | 1490 | drivers/block/mcdx.c | return mcdx_talk(stuffp, cmd, 3, NULL, 0, 100, tries); |
stuffp | 1494 | drivers/block/mcdx.c | mcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *ver, int tries) |
stuffp | 1499 | drivers/block/mcdx.c | if (-1 == (ans = mcdx_talk(stuffp, "\xdc", 1, buf, sizeof(buf), 200, tries))) |
stuffp | 1509 | drivers/block/mcdx.c | mcdx_reset(struct s_drive_stuff *stuffp, enum resetmodes mode, int tries) |
stuffp | 1512 | drivers/block/mcdx.c | outb(0, (unsigned int) stuffp->wreg_chn); /* no dma, no irq -> hardware */ |
stuffp | 1513 | drivers/block/mcdx.c | outb(0, (unsigned int) stuffp->wreg_reset); /* hw reset */ |
stuffp | 1515 | drivers/block/mcdx.c | } else return mcdx_talk(stuffp, "\x60", 1, NULL, 0, 500, tries); |
stuffp | 1519 | drivers/block/mcdx.c | mcdx_lockdoor(struct s_drive_stuff *stuffp, int lock, int tries) |
stuffp | 1522 | drivers/block/mcdx.c | if (stuffp->present & DOOR) { |
stuffp | 1524 | drivers/block/mcdx.c | return mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 0, 500, tries); |
stuffp | 1531 | drivers/block/mcdx.c | mcdx_getstatus(struct s_drive_stuff *stuffp, int tries) |
stuffp | 1532 | drivers/block/mcdx.c | { return mcdx_talk(stuffp, "\x40", 1, NULL, 0, 500, tries); } |