[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcdio-devel] maybe i need more sleep, but isn't this a problem too?
From: |
Robert William Fuller |
Subject: |
[Libcdio-devel] maybe i need more sleep, but isn't this a problem too? |
Date: |
Thu, 08 May 2008 11:33:07 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071019) |
In mmc.c's mmc_read_cd(), shouldn't the CDIO_MMC_SET_READ_LENGTH24(...)
be inside the loop? Otherwise, reads exceeding MAX_CD_READ_BLOCKS will
be incorrect? (Also, shouldn't CDIO_MMC_SET_READ_LENGTH24 be using
i_blocks2?)
excert from mmc.c's mmc_read_cd():
CDIO_MMC_SET_READ_LENGTH24(cdb.field, i_blocks);
if (b_sync) cdb9 |= 128;
if (b_user_data) cdb9 |= 16;
if (b_edc_ecc) cdb9 |= 8;
cdb9 |= (header_codes & 3) << 5;
cdb9 |= (c2_error_information & 3) << 1;
cdb.field[9] = cdb9;
cdb.field[10] = (subchannel_selection & 7);
{
unsigned int j = 0;
int i_ret = DRIVER_OP_SUCCESS;
const uint8_t i_cdb = mmc_get_cmd_len(cdb.field[0]);
while (i_blocks > 0) {
const unsigned i_blocks2 = (i_blocks > MAX_CD_READ_BLOCKS)
? MAX_CD_READ_BLOCKS : i_blocks;
void *p_buf2 = ((char *)p_buf ) + (j * i_blocksize);
CDIO_MMC_SET_READ_LBA (cdb.field, (i_lsn+j));
i_ret = run_mmc_cmd (p_cdio->env, CD_READ_TIMEOUT_MS,
i_cdb, &cdb,
SCSI_MMC_DATA_READ,
i_blocksize * i_blocks2,
p_buf2);