summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-11-03 09:25:02 +0000
committerdes <des@FreeBSD.org>2003-11-03 09:25:02 +0000
commita58f9feb7e9ec69ece64b76d9ea48f66d94e12da (patch)
treec2766dc306603c4e06d35fff7d7fe809709c115e /sys/dev
parent590f57cc6230c30e732dc600ba07910b14540926 (diff)
downloadFreeBSD-src-a58f9feb7e9ec69ece64b76d9ea48f66d94e12da.zip
FreeBSD-src-a58f9feb7e9ec69ece64b76d9ea48f66d94e12da.tar.gz
Move sysctl declarations next to the corresponding tunable declarations.
Add a sysctl declaration for hw.ata.atapi_dma, which had gone MIA (though setting it in loader.conf still worked, it was not visible at runtime) Approved by: sos
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-all.c6
-rw-r--r--sys/dev/ata/ata-disk.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index bc39b10..a04f806 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -76,8 +76,14 @@ static void ata_init(void);
/* sysctl vars */
SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
+SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0,
+ "ATA disk DMA mode control");
TUNABLE_INT("hw.ata.wc", &ata_wc);
+SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0,
+ "ATA disk write caching");
TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma);
+SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0,
+ "ATAPI device DMA mode control");
int ata_dma = 1;
int ata_wc = 1;
int atapi_dma = 0;
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index e0d38bf..926f8f6 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -67,13 +67,6 @@ static int ad_version(u_int16_t);
static MALLOC_DEFINE(M_AD, "AD driver", "ATA disk driver");
static u_int32_t adp_lun_map = 0;
-/* sysctl vars */
-SYSCTL_DECL(_hw_ata);
-SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0,
- "ATA disk DMA mode control");
-SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0,
- "ATA disk write caching");
-
void
ad_attach(struct ata_device *atadev)
{
OpenPOWER on IntegriCloud