Bug fix: On some drives the request for minimum speed yielded maximum speed
This commit is contained in:
parent
ee98f13df1
commit
b8b67164b4
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2013.02.26.080127"
|
#define Cdrskin_timestamP "2013.03.04.211258"
|
||||||
|
@ -4250,14 +4250,22 @@ int mmc_get_write_performance(struct burn_drive *d)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* first command execution to learn number of descriptors and
|
/* first command execution to learn number of descriptors and
|
||||||
dxfer_len */
|
dxfer_len
|
||||||
|
*/
|
||||||
ret = mmc_get_write_performance_al(d, &alloc_len, &max_descr);
|
ret = mmc_get_write_performance_al(d, &alloc_len, &max_descr);
|
||||||
|
if (max_descr > 0 && ret > 0) {
|
||||||
|
/* Some drives announce only 1 descriptor if asked for 0.
|
||||||
|
So ask twice for non-0 descriptors.
|
||||||
|
*/
|
||||||
|
ret = mmc_get_write_performance_al(d, &alloc_len, &max_descr);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
fprintf(stderr,"LIBBURN_DEBUG: ACh alloc_len = %d , ret = %d\n",
|
fprintf(stderr,"LIBBURN_DEBUG: ACh alloc_len = %d , ret = %d\n",
|
||||||
alloc_len, ret);
|
alloc_len, ret);
|
||||||
*/
|
*/
|
||||||
if (max_descr > 0 && ret > 0)
|
if (max_descr > 0 && ret > 0)
|
||||||
/* second execution with announced length */
|
/* final execution with announced length */
|
||||||
|
max_descr = (alloc_len - 8) / 16;
|
||||||
ret = mmc_get_write_performance_al(d, &alloc_len, &max_descr);
|
ret = mmc_get_write_performance_al(d, &alloc_len, &max_descr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user