taglinefilesource code
mseg757drivers/char/ftape/ecc.cint ecc_set_segment_parity(struct memory_segment *mseg)
mseg762drivers/char/ftape/ecc.cparity_bytes = &mseg->data[(mseg->blocks - 3) * SECTOR_SIZE];
mseg764drivers/char/ftape/ecc.cset_parity((unsigned long *) &mseg->data[i], mseg->blocks - 3,
mseg768drivers/char/ftape/ecc.cif (!sanity_check((unsigned long *) &mseg->data[i], mseg->blocks)) {
mseg781drivers/char/ftape/ecc.cint ecc_correct_data(struct memory_segment *mseg)
mseg792drivers/char/ftape/ecc.cmseg->corrected = 0;
mseg796drivers/char/ftape/ecc.cif (!compute_syndromes((unsigned long *) &mseg->data[col],
mseg797drivers/char/ftape/ecc.cmseg->blocks, ss)) {
mseg808drivers/char/ftape/ecc.cif (mseg->read_bad) {
mseg809drivers/char/ftape/ecc.cfor (i = 0; i < mseg->blocks; i++) {
mseg810drivers/char/ftape/ecc.cif (BAD_CHECK(mseg->read_bad, i)) {
mseg850drivers/char/ftape/ecc.cresult = correct_block(&mseg->data[col + sizeof(long) - 1 - i],
mseg851drivers/char/ftape/ecc.cmseg->blocks,
mseg853drivers/char/ftape/ecc.c&mseg->corrected);
mseg855drivers/char/ftape/ecc.cresult = correct_block(&mseg->data[col + i], mseg->blocks,
mseg857drivers/char/ftape/ecc.c&mseg->corrected);
mseg871drivers/char/ftape/ecc.cif (!sanity_check((unsigned long *) &mseg->data[col], mseg->blocks)) {
mseg879drivers/char/ftape/ecc.cif (!compute_syndromes((unsigned long *) &mseg->data[col],
mseg880drivers/char/ftape/ecc.cmseg->blocks, ss)) {
mseg113drivers/char/ftape/ftape-read.cstruct memory_segment mseg;
mseg117drivers/char/ftape/ftape-read.cmseg.read_bad = convert_sector_map(&buffer[tail]);
mseg118drivers/char/ftape/ftape-read.cmseg.marked_bad = 0;  /* not used... */
mseg119drivers/char/ftape/ftape-read.cmseg.blocks = buffer[tail].bytes / SECTOR_SIZE;
mseg120drivers/char/ftape/ftape-read.cmseg.data = buffer[tail].address;
mseg123drivers/char/ftape/ftape-read.cif (mseg.blocks <= 3) {
mseg128drivers/char/ftape/ftape-read.cread_bad = mseg.read_bad;
mseg130drivers/char/ftape/ftape-read.cresult = ecc_correct_data(&mseg);
mseg131drivers/char/ftape/ftape-read.cif (read_bad != 0 || mseg.corrected != 0) {
mseg133drivers/char/ftape/ftape-read.cTRACElx(4, "corrected map:", mseg.corrected);
mseg134drivers/char/ftape/ftape-read.chistory.corrected += count_ones(mseg.corrected);
mseg140drivers/char/ftape/ftape-read.cmemcpy(destination, mseg.data, (mseg.blocks - 3) * SECTOR_SIZE);
mseg141drivers/char/ftape/ftape-read.cif ((read_bad ^ mseg.corrected) & mseg.corrected) {
mseg146drivers/char/ftape/ftape-read.creturn (mseg.blocks - 3) * SECTOR_SIZE;
mseg78drivers/char/ftape/ftape-write.cstruct memory_segment mseg;
mseg86drivers/char/ftape/ftape-write.cmseg.blocks = 0;  /* skip entire segment */
mseg89drivers/char/ftape/ftape-write.cmseg.blocks = SECTORS_PER_SEGMENT - bads;
mseg90drivers/char/ftape/ftape-write.cmseg.data = destination;
mseg91drivers/char/ftape/ftape-write.cmemcpy(mseg.data, source, (mseg.blocks - 3) * SECTOR_SIZE);
mseg92drivers/char/ftape/ftape-write.cresult = ecc_set_segment_parity(&mseg);
mseg96drivers/char/ftape/ftape-write.cresult = (mseg.blocks - 3) * SECTOR_SIZE;