Skip to contentSkip to conversation

hw/ide.c and WIN_STANDBYNOW1

PATCH New Magnus Damm 1 participant 1 message Jul 21, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/ide.c and WIN_STANDBYNOW1

Hi,

This stupid little fix adds dummy support for WIN_STANDBYNOW1. It is probably not the right way to do it, though. I'm happy with it because it makes my linux-2.6 kernel shut up.

Thanks.

/ magnus - not subscribed, please cc

Here's output from linux-2.6.8-rc2 with/without the patch:

with patch:

/ # poweroff

The system is going down NOW !!
Sending SIGTERM to all processes.
Sending SIGKILL to all processes.
Shutdown: hda
Power down.

without patch:

/ # poweroff

The system is going down NOW !!
Sending SIGTERM to all processes.
Sending SIGKILL to all processes.
Shutdown: hda
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
ide0: reset: success
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
ide0: reset: success
hda: task_no_data_intr: status=0x41 { DriveReady Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError } Power down.

Index: hw/ide.c
===================================================================
RCS file: /cvsroot/qemu/qemu/hw/ide.c,v
retrieving revision 1.26

ide.c +4 -0
diff -u -r1.26 ide.c
@@ -1567,6 +1567,10 @@
                 goto abort_cmd;
             }
             break;
+	case WIN_STANDBYNOW1:
+	    s->status = READY_STAT;
+            ide_set_irq(s);
+            break;
             /* ATAPI commands */
         case WIN_PIDENTIFY:
             if (s->is_cdrom) {