aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
committerCraig Rodrigues <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
commit8d1a3b69984170fec588a65051aee1a9ec50d2b8 (patch)
tree16473b900b3a85275f2aa26cac205be19c9e2d2c /sys
parenta131219c6e9c9ae883313867aba00f3d058e3612 (diff)
downloadsrc-8d1a3b69984170fec588a65051aee1a9ec50d2b8.tar.gz
src-8d1a3b69984170fec588a65051aee1a9ec50d2b8.zip
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
Notes
Notes: svn path=/head/; revision=226179
Diffstat (limited to 'sys')
-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 90b87e118bd3..34453ad3d17b 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