ahci: remove dead reset code
authorJohn Snow <jsnow@redhat.com>
Tue, 1 Sep 2015 20:50:38 +0000 (16:50 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 18 Sep 2015 14:58:56 +0000 (10:58 -0400)
This check is dead due to an earlier conditional.
AHCI does not currently support hotplugging, so
checks to see if devices are present or not are useless.

Remove it.

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1441140641-17631-2-git-send-email-jsnow@redhat.com

hw/ide/ahci.c

index ad05527166535a8e962da81f8b6cd4cbadb54917..0c699a76f294e0088e04efc7257a535938b45cd7 100644 (file)
@@ -602,10 +602,7 @@ static void ahci_reset_port(AHCIState *s, int port)
     }
 
     s->dev[port].port_state = STATE_RUN;
-    if (!ide_state->blk) {
-        pr->sig = 0;
-        ide_state->status = SEEK_STAT | WRERR_STAT;
-    } else if (ide_state->drive_kind == IDE_CD) {
+    if (ide_state->drive_kind == IDE_CD) {
         pr->sig = SATA_SIGNATURE_CDROM;
         ide_state->lcyl = 0x14;
         ide_state->hcyl = 0xeb;