From e65e827e136a657b5c3d3666f1e58cfbbea4f7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Thu, 5 Apr 2001 11:13:07 +0000 Subject: [PATCH] Correct the sysctl names to match the tuneables. Proberly flush the tag queue on detach. --- sys/dev/ata/ata-disk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 3531cd71887..b3c3ddbc62d 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -91,9 +91,9 @@ TUNABLE_INT_DECL("hw.ata.tags", 0, ata_tags); SYSCTL_DECL(_hw_ata); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RD, &ata_dma, 0, "ATA disk DMA mode control"); -SYSCTL_INT(_hw_ata, OID_AUTO, ata_wc, CTLFLAG_RD, &ata_wc, 0, +SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RD, &ata_wc, 0, "ATA disk write caching"); -SYSCTL_INT(_hw_ata, OID_AUTO, ata_tags, CTLFLAG_RD, &ata_tags, 0, +SYSCTL_INT(_hw_ata, OID_AUTO, tags, CTLFLAG_RD, &ata_tags, 0, "ATA disk tagged queuing support"); /* defines */ @@ -214,6 +214,7 @@ ad_detach(struct ad_softc *adp, int flush) printf("WARNING! detaching RAID subdisk, danger ahead\n"); ata_printf(adp->controller, adp->unit, "removed from configuration\n"); + ad_invalidatequeue(adp, NULL); TAILQ_FOREACH(request, &adp->controller->ata_queue, chain) { if (request->device != adp) continue; @@ -233,7 +234,7 @@ ad_detach(struct ad_softc *adp, int flush) devstat_remove_entry(&adp->stats); if (flush) { if (ata_command(adp->controller, adp->unit, ATA_C_FLUSHCACHE, - 0, 0, 0, 0, 0, ATA_WAIT_INTR)) + 0, 0, 0, 0, 0, ATA_WAIT_READY)) ata_printf(adp->controller, adp->unit, "flushing cache on detach failed\n"); }