eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
e824012bc2
commit
cb25a3fb60
@ -976,17 +976,17 @@ static void action_command(EEPRO100State *s)
|
|||||||
|
|
||||||
static void eepro100_cu_command(EEPRO100State * s, uint8_t val)
|
static void eepro100_cu_command(EEPRO100State * s, uint8_t val)
|
||||||
{
|
{
|
||||||
|
cu_state_t cu_state;
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case CU_NOP:
|
case CU_NOP:
|
||||||
/* No operation. */
|
/* No operation. */
|
||||||
break;
|
break;
|
||||||
case CU_START:
|
case CU_START:
|
||||||
if (get_cu_state(s) != cu_idle) {
|
cu_state = get_cu_state(s);
|
||||||
/* Intel documentation says that CU must be idle for the CU
|
if (cu_state != cu_idle && cu_state != cu_suspended) {
|
||||||
* start command. Intel driver for Linux also starts the CU
|
/* Intel documentation says that CU must be idle or suspended
|
||||||
* from suspended state. */
|
* for the CU start command. */
|
||||||
logout("CU state is %u, should be %u\n", get_cu_state(s), cu_idle);
|
logout("unexpected CU state is %u\n", cu_state);
|
||||||
//~ assert(!"wrong CU state");
|
|
||||||
}
|
}
|
||||||
set_cu_state(s, cu_active);
|
set_cu_state(s, cu_active);
|
||||||
s->cu_offset = s->pointer;
|
s->cu_offset = s->pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user