Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncqfixes]: src/sys/dev/ic move atastart() call after xfer deact...
details: https://anonhg.NetBSD.org/src/rev/ea9760aed674
branches: jdolecek-ncqfixes
changeset: 1025096:ea9760aed674
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Oct 07 15:44:47 2018 +0000
description:
move atastart() call after xfer deactivation during ATA command completion,
so that it's executed after the slot is freed
diffstat:
sys/dev/ic/ahcisata_core.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r e2d4cc371300 -r ea9760aed674 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c Sun Oct 07 15:42:47 2018 +0000
+++ b/sys/dev/ic/ahcisata_core.c Sun Oct 07 15:44:47 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.62.2.7 2018/10/04 17:59:35 jdolecek Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.62.2.8 2018/10/07 15:44:47 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.62.2.7 2018/10/04 17:59:35 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.62.2.8 2018/10/07 15:44:47 jdolecek Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -1233,6 +1233,9 @@
achp->ahcic_cmds_active &= ~(1U << xfer->c_slot);
ata_deactivate_xfer(chp, xfer);
+ if ((ata_c->flags & (AT_TIMEOU|AT_ERROR)) == 0)
+ atastart(chp);
+
return 0;
}
@@ -1243,7 +1246,6 @@
struct ahci_channel *achp = (struct ahci_channel *)chp;
struct ata_command *ata_c = &xfer->c_ata_c;
uint16_t *idwordbuf;
- int flags = ata_c->flags;
int i;
AHCIDEBUG_PRINT(("ahci_cmd_done channel %d flags %#x/%#x\n",
@@ -1273,9 +1275,6 @@
ata_c->flags |= AT_XFDONE;
ahci_cmd_done_end(chp, xfer);
-
- if ((flags & (AT_TIMEOU|AT_ERROR)) == 0)
- atastart(chp);
}
static void
Home |
Main Index |
Thread Index |
Old Index