Lines Matching refs:toc

162 	 * If a read toc is executed for a CD-R or CD-RW medium where the first
163 * toc has not been recorded yet, it will fail with 05/24/00 (which is a
955 struct atapi_toc *toc = info->toc;
965 if (toc == NULL) {
967 toc = kmalloc(sizeof(struct atapi_toc), GFP_KERNEL);
968 if (toc == NULL) {
973 info->toc = toc;
986 stat = cdrom_read_capacity(drive, &toc->capacity, &sectors_per_frame,
989 toc->capacity = 0x1fffff;
991 set_capacity(info->disk, toc->capacity * sectors_per_frame);
993 drive->probed_capacity = toc->capacity * sectors_per_frame;
999 stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
1005 toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
1006 toc->hdr.last_track = bcd2bin(toc->hdr.last_track);
1009 ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
1016 stat = cdrom_read_tocentry(drive, toc->hdr.first_track, 1, 0,
1017 (char *)&toc->hdr,
1022 if (stat && toc->hdr.first_track > 1) {
1037 (char *)&toc->hdr,
1046 toc->hdr.first_track = (u8)bin2bcd(CDROM_LEADOUT);
1047 toc->hdr.last_track = (u8)bin2bcd(CDROM_LEADOUT);
1049 toc->hdr.first_track = CDROM_LEADOUT;
1050 toc->hdr.last_track = CDROM_LEADOUT;
1057 toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length);
1060 toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
1061 toc->hdr.last_track = bcd2bin(toc->hdr.last_track);
1067 toc->ent[i].track = bcd2bin(toc->ent[i].track);
1068 msf_from_bcd(&toc->ent[i].addr.msf);
1070 toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute,
1071 toc->ent[i].addr.msf.second,
1072 toc->ent[i].addr.msf.frame);
1075 if (toc->hdr.first_track != CDROM_LEADOUT) {
1082 toc->last_session_lba = be32_to_cpu(ms_tmp.ent.addr.lba);
1086 toc->last_session_lba = msf_to_lba(0, 2, 0); /* 0m 2s 0f */
1097 toc->last_session_lba = msf_to_lba(ms_tmp.ent.addr.msf.minute,
1102 toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track);
1106 if (!stat && (last_written > toc->capacity)) {
1107 toc->capacity = last_written;
1108 set_capacity(info->disk, toc->capacity * sectors_per_frame);
1109 drive->probed_capacity = toc->capacity * sectors_per_frame;
1563 kfree(info->toc);