summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
committerrodrigc <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
commitc78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf (patch)
tree16473b900b3a85275f2aa26cac205be19c9e2d2c /sys/dev
parent0616806cd05505bb43dc4c0bc664c801fdb9e539 (diff)
downloadFreeBSD-src-c78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf.zip
FreeBSD-src-c78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf.tar.gz
Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined. This sysctl can be queried by feature_present(3). Query for this feature in /sbin/atacontrol and /usr/sbin/burncd. If these utilities detect that ATA_CAM is enabled, then these utilities will error out. These utilities are compatible with the old ATA driver, but are incomptible with the new ATA_CAM driver. By erroring out, we give end-users an idea as to what remedies to use, and reduce the need for them to file PR's. For atacontrol, camcontrol must be used instead, and for burncd, alternative utilties from the ports collection must be used such as sysutils/cdrtools. In future, maybe someone can re-write burncd to work with ATA_CAM, but at least for now, we give a somewhat useful error message to end users. PR: 160979 Reviewed by: jh, Arnaud Lacombe <lacombar at gmail dot com> Reported by: Joe Barbish <fbsd8 at a1poweruser dot com> MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-all.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 90b87e1..34453ad 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0,
TUNABLE_INT("hw.ata.setmax", &ata_setmax);
SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
"ATA disk set max native address");
+#ifdef ATA_CAM
+FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
+#endif
/*
* newbus device interface related functions
OpenPOWER on IntegriCloud