gnu_linux: Use internal routine to set the speed.

mmc.c: add more debug_ variables for new enums and extern vars in mmc.h
set speed is in the write direction not read
This commit is contained in:
rocky
2006-04-03 19:31:18 +00:00
parent 93bb7fdb74
commit 10b57b2ddd
2 changed files with 11 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: gnu_linux.c,v 1.20 2006/03/18 00:53:20 rocky Exp $
$Id: gnu_linux.c,v 1.21 2006/04/03 19:31:18 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -27,7 +27,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: gnu_linux.c,v 1.20 2006/03/18 00:53:20 rocky Exp $";
static const char _rcsid[] = "$Id: gnu_linux.c,v 1.21 2006/04/03 19:31:18 rocky Exp $";
#include <string.h>
@@ -1472,7 +1472,11 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode)
.run_mmc_cmd = run_mmc_cmd_linux,
.set_arg = set_arg_linux,
.set_blocksize = set_blocksize_mmc,
#if 1
.set_speed = set_speed_linux,
#else
.set_speed = set_speed_mmc,
#endif
};
_data = calloc (1, sizeof (_img_private_t));

View File

@@ -1,6 +1,6 @@
/* Common Multimedia Command (MMC) routines.
$Id: mmc.c,v 1.30 2006/02/13 11:00:53 rocky Exp $
$Id: mmc.c,v 1.31 2006/04/03 19:31:18 rocky Exp $
Copyright (C) 2004, 2005, 2006 Rocky Bernstein <rocky@panix.com>
@@ -56,6 +56,9 @@ cdio_mmc_feature_profile_t debug_cdio_mmc_feature_profile;
cdio_mmc_get_conf_t debug_cdio_mmc_get_conf;
cdio_mmc_gpcmd_t debug_cdio_mmc_gpcmd;
cdio_mmc_read_sub_state_t debug_cdio_mmc_read_sub_state;
cdio_mmc_read_cd_type_t debug_cdio_mmc_read_cd_type;
cdio_mmc_readtoc_t debug_cdio_mmc_readtoc;
cdio_mmc_mode_page_t debug_cdio_mmc_mode_page;
/*************************************************************************
MMC CdIo Operations which a driver may use.
@@ -1363,7 +1366,7 @@ mmc_set_speed( const CdIo_t *p_cdio, int i_speed )
the maximum allowable speed.
*/
CDIO_MMC_SET_LEN16(cdb.field, 4, 0xffff);
return mmc_run_cmd(p_cdio, 2000, &cdb, SCSI_MMC_DATA_READ,
return mmc_run_cmd(p_cdio, 2000, &cdb, SCSI_MMC_DATA_WRITE,
sizeof(buf), buf);
}