Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Move standby on detach after wedges deletion in ...
details: https://anonhg.NetBSD.org/src/rev/5e1807598429
branches: trunk
changeset: 997673:5e1807598429
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Tue Mar 19 06:47:12 2019 +0000
description:
Move standby on detach after wedges deletion in case wedges trigger
I/O on the parent disk. Add debug messages.
diffstat:
sys/dev/ata/wd.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r 8009b04a271b -r 5e1807598429 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Tue Mar 19 06:19:44 2019 +0000
+++ b/sys/dev/ata/wd.c Tue Mar 19 06:47:12 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.443 2018/10/24 19:46:44 jdolecek Exp $ */
+/* $NetBSD: wd.c,v 1.444 2019/03/19 06:47:12 mlelstv Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.443 2018/10/24 19:46:44 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.444 2019/03/19 06:47:12 mlelstv Exp $");
#include "opt_ata.h"
#include "opt_wd.h"
@@ -534,12 +534,12 @@
bufq_free(dksc->sc_bufq);
+ /* Delete all of our wedges. */
+ dkwedge_delall(&dksc->sc_dkdev);
+
if (flags & DETACH_POWEROFF)
wd_standby(wd, AT_POLL);
- /* Delete all of our wedges. */
- dkwedge_delall(&dksc->sc_dkdev);
-
/* Detach from the disk list. */
disk_detach(&dksc->sc_dkdev);
disk_destroy(&dksc->sc_dkdev);
@@ -1729,6 +1729,7 @@
struct ata_xfer *xfer;
int error;
+ aprint_debug_dev(dksc->sc_dev, "standby immediate\n");
xfer = ata_get_xfer(wd->drvp->chnl_softc, true);
xfer->c_ata_c.r_command = WDCC_STANDBY_IMMED;
@@ -1745,6 +1746,8 @@
if (xfer->c_ata_c.flags & AT_ERROR) {
if (xfer->c_ata_c.r_error == WDCE_ABRT) {
/* command not supported */
+ aprint_debug_dev(dksc->sc_dev,
+ "standby immediate not supported\n");
error = ENODEV;
goto out;
}
Home |
Main Index |
Thread Index |
Old Index