Skip site navigation (1)Skip section navigation (2)
Date:      15 Mar 2001 22:47:33 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        =?iso-8859-1?q?S=F8ren?= Schmidt <sos@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-disk.c ata-dma.c ata-raid.c atapi-all.c atapi-all.h atapi-cd.c atapi-fd.c atapi-tape.c
Message-ID:  <xzpn1amzoui.fsf@flood.ping.uio.no>
In-Reply-To: Dag-Erling Smorgrav's message of "15 Mar 2001 22:30:26 %2B0100"
References:  <200103151536.f2FFaQx27458@freefall.freebsd.org> <xzpr8zyzpn1.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Dag-Erling Smorgrav <des@ofug.org> writes:
> These tunables should be exported as read-only sysctls...

Patch attached.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=ata-sysctl.diff

Index: ata-all.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v
retrieving revision 1.109
diff -u -r1.109 ata-all.c
--- ata-all.c	2001/03/15 15:36:25	1.109
+++ ata-all.c	2001/03/15 21:38:22
@@ -94,6 +94,9 @@
 #define MASTER	0
 #define SLAVE	1
 
+/* sysctl subtree */
+SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
+
 int
 ata_probe(device_t dev)
 {
Index: ata-disk.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.96
diff -u -r1.96 ata-disk.c
--- ata-disk.c	2001/03/15 15:36:25	1.96
+++ ata-disk.c	2001/03/15 21:43:58
@@ -41,6 +41,7 @@
 #include <sys/disk.h>
 #include <sys/devicestat.h>
 #include <sys/cons.h>
+#include <sys/sysctl.h>
 #include <vm/vm.h>
 #include <vm/pmap.h>
 #include <machine/md_var.h>
@@ -86,6 +87,14 @@
 TUNABLE_INT_DECL("hw.ata.ata_dma", 1, ata_dma);
 TUNABLE_INT_DECL("hw.ata.wc", 0, ata_wc);
 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,
+	"DMA mode support for ATA devices");
+SYSCTL_INT(_hw_ata, OID_AUTO, ata_wc, CTLFLAG_RD, &ata_wc, 0,
+	"Write caching");
+SYSCTL_INT(_hw_ata, OID_AUTO, ata_tags, CTLFLAG_RD, &ata_tags, 0,
+	"Tagged queuing support");
 
 /* defines */
 #define	AD_MAX_RETRIES	3
Index: atapi-all.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/atapi-all.c,v
retrieving revision 1.66
diff -u -r1.66 atapi-all.c
--- atapi-all.c	2001/03/15 15:36:25	1.66
+++ atapi-all.c	2001/03/15 21:44:56
@@ -37,6 +37,7 @@
 #include <sys/bus.h>
 #include <sys/malloc.h>
 #include <sys/bio.h>
+#include <sys/sysctl.h>
 #include <machine/bus.h>
 #include <sys/rman.h>
 #include <dev/ata/ata-all.h>
@@ -54,6 +55,10 @@
 static MALLOC_DEFINE(M_ATAPI, "ATAPI generic", "ATAPI driver generic layer");
 static int atapi_dma;
 TUNABLE_INT_DECL("hw.ata.atapi_dma", 0, atapi_dma);
+
+SYSCTL_DECL(_hw_ata);
+SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RD, &atapi_dma, 0,
+	"DMA mode support for ATAPI devices");
 
 /* defines */
 #define ATAPI_MAX_RETRIES  	3

--=-=-=--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpn1amzoui.fsf>