Separately determining the maximum speeds for writing and reading

This commit is contained in:
Thomas Schmitt 2013-10-09 09:24:09 +00:00
parent 0f3131cf0c
commit 1b114e4be2
2 changed files with 15 additions and 9 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2013.10.03.100011"
#define Cdrskin_timestamP "2013.10.09.092306"

View File

@ -2797,15 +2797,21 @@ void mmc_set_speed(struct burn_drive *d, int r, int w)
if (r <= 0 || w <= 0) {
/* ts A70712 : now searching for best speed descriptor */
if (w > 0 && r <= 0)
if (r <= 0) {
burn_drive_get_best_speed(d, r, &best_sd, 1 | 2);
else
if (best_sd != NULL) {
r = best_sd->read_speed;
end_lba = best_sd->end_lba;
}
}
if (w <= 0) {
burn_drive_get_best_speed(d, w, &best_sd, 2);
if (best_sd != NULL) {
w = best_sd->write_speed;
d->nominal_write_speed = w;
r = best_sd->read_speed;
end_lba = best_sd->end_lba;
if (best_sd != NULL) {
w = best_sd->write_speed;
d->nominal_write_speed = w;
if (end_lba < best_sd->end_lba)
end_lba = best_sd->end_lba;
}
}
}
@ -4150,7 +4156,7 @@ static int mmc_get_write_performance_al(struct burn_drive *d,
struct burn_speed_descriptor *sd;
/* A61225 : 1 = report about speed descriptors */
static int speed_debug = 0;
static int speed_debug = 1;
BURN_ALLOC_MEM(buf, struct buffer, 1);
BURN_ALLOC_MEM(c, struct command, 1);