Fix all fo the bugs I introduced "improving" the code of others.
mmc_ll_cmds.c: mmc_mode_select and mmc_get_configuration now work. mmc_hl_cmds.c: bug introduced by turning a var into a pointer to that variable.
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
if ( ! p_cdio ) return DRIVER_OP_UNINIT; \
|
||||
if ( ! p_cdio->op.run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; \
|
||||
\
|
||||
memset (p_buf, 0, i_size); \
|
||||
CDIO_MMC_SET_COMMAND(cdb.field, mmc_cmd)
|
||||
|
||||
/* Boilerplate initialization code to setup running MMC read command
|
||||
|
||||
@@ -83,7 +83,7 @@ mmc_get_disctype( const CdIo_t *p_cdio, unsigned int i_timeout_ms,
|
||||
q = p+4;
|
||||
*p_disctype = CDIO_MMC_DISCTYPE_NO_DISC;
|
||||
|
||||
while ((p_disctype == CDIO_MMC_DISCTYPE_NO_DISC) &&
|
||||
while ((CDIO_MMC_DISCTYPE_NO_DISC == *p_disctype) &&
|
||||
(q < p + profiles_list_length)) {
|
||||
profile_number = CDIO_MMC_GET_LEN16(q);
|
||||
profile_active = q[2] & 0x01;
|
||||
|
||||
@@ -74,9 +74,9 @@ mmc_get_configuration(const CdIo_t *p_cdio, void *p_buf,
|
||||
|
||||
{
|
||||
MMC_CMD_SETUP(CDIO_MMC_GPCMD_GET_CONFIGURATION);
|
||||
CDIO_MMC_SET_READ_LENGTH8(cdb.field, i_size);
|
||||
if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms;
|
||||
cdb.field[1] = return_type & 0x3;
|
||||
|
||||
CDIO_MMC_SET_LEN16(cdb.field, 2, i_starting_feature_number);
|
||||
return MMC_RUN_CMD(SCSI_MMC_DATA_READ, i_timeout_ms);
|
||||
}
|
||||
@@ -289,7 +289,6 @@ mmc_read_cd(const CdIo_t *p_cdio, void *p_buf1, lsn_t i_lsn,
|
||||
{
|
||||
void *p_buf = p_buf1;
|
||||
uint8_t cdb9 = 0;
|
||||
const unsigned int i_size = i_blocksize * i_blocks;
|
||||
const unsigned int i_timeout = mmc_timeout_ms * (MAX_CD_READ_BLOCKS/2);
|
||||
|
||||
MMC_CMD_SETUP(CDIO_MMC_GPCMD_READ_CD);
|
||||
|
||||
Reference in New Issue
Block a user