Lines Matching refs:toc

164 	 * If a read toc is executed for a CD-R or CD-RW medium where the first
165 * toc has not been recorded yet, it will fail with 05/24/00 (which is a
1064 struct atapi_toc *toc = info->toc;
1074 if (toc == NULL) {
1076 toc = kmalloc(sizeof(struct atapi_toc), GFP_KERNEL);
1077 if (toc == NULL) {
1082 info->toc = toc;
1095 stat = cdrom_read_capacity(drive, &toc->capacity, &sectors_per_frame);
1097 toc->capacity = 0x1fffff;
1099 set_capacity(info->disk, toc->capacity * sectors_per_frame);
1101 drive->probed_capacity = toc->capacity * sectors_per_frame;
1107 stat = ide_cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
1113 toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
1114 toc->hdr.last_track = bcd2bin(toc->hdr.last_track);
1117 ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
1124 stat = ide_cdrom_read_tocentry(drive, toc->hdr.first_track, 1, 0,
1125 (char *)&toc->hdr,
1130 if (stat && toc->hdr.first_track > 1) {
1145 (char *)&toc->hdr,
1153 toc->hdr.first_track = (u8)bin2bcd(CDROM_LEADOUT);
1154 toc->hdr.last_track = (u8)bin2bcd(CDROM_LEADOUT);
1156 toc->hdr.first_track = CDROM_LEADOUT;
1157 toc->hdr.last_track = CDROM_LEADOUT;
1164 toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length);
1167 toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
1168 toc->hdr.last_track = bcd2bin(toc->hdr.last_track);
1174 toc->ent[i].track = bcd2bin(toc->ent[i].track);
1175 msf_from_bcd(&toc->ent[i].addr.msf);
1177 toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute,
1178 toc->ent[i].addr.msf.second,
1179 toc->ent[i].addr.msf.frame);
1182 if (toc->hdr.first_track != CDROM_LEADOUT) {
1189 toc->last_session_lba = be32_to_cpu(ms_tmp.ent.addr.lba);
1193 toc->last_session_lba = msf_to_lba(0, 2, 0); /* 0m 2s 0f */
1204 toc->last_session_lba = msf_to_lba(ms_tmp.ent.addr.msf.minute,
1209 toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track);
1213 if (!stat && (last_written > toc->capacity)) {
1214 toc->capacity = last_written;
1215 set_capacity(info->disk, toc->capacity * sectors_per_frame);
1216 drive->probed_capacity = toc->capacity * sectors_per_frame;
1581 kfree(info->toc);