From f3de36f7f33f6f7d244190d75cbb47427725b3e2 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 22 Sep 2010 20:05:23 -0700 Subject: [PATCH] kernel - Fix bug in recent AHCI driver adjustment * The recent adjustment of the driver to help deal with breakage in the newer AMD chipsets also failed to check for pending commands after a normal completion. Fix the brainfart. --- sys/dev/disk/ahci/ahci.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/disk/ahci/ahci.c b/sys/dev/disk/ahci/ahci.c index ef411744e0..3e85f1a9a5 100644 --- a/sys/dev/disk/ahci/ahci.c +++ b/sys/dev/disk/ahci/ahci.c @@ -2902,6 +2902,15 @@ failall: * Cleanup. Will not be set if non-blocking. */ switch(need) { + case NEED_NOTHING: + /* + * If operating normally and not stopped the interrupt was + * probably just a normal completion and we may be able to + * issue more commands. + */ + if (stopped == 0 && ap->ap_state != AP_S_FATAL_ERROR) + ahci_issue_pending_commands(ap, NULL); + break; case NEED_RESTART: /* * A recoverable error occured and we can restart outstanding -- 2.41.0