# ATA_CAM and ahci



## Sylhouette (Aug 5, 2010)

Hello all.

One simple question regarding ahci

I want to use the ahci on my system, so i set ahci_load="YES" to my boot loader.conf.

And i have the adax in my dmesg now.
But do i need to recompile my kernel with the line  options ATA_CAM set.

Or is it so that if i set the line options ATA_CAM in my kernel, i do not need the ahci_laod="YES" line in loader.conf.

regards,
Syl


----------



## fronclynne (Aug 5, 2010)

ATA_CAM makes all of your ATA devices available through cam(4), but has no effect on the actual underlying driver.

ahci(4) provides proper SATA support (along with NCQ, so ostensibly speeding things up a bit) & puts your SATA devices under cam(3), but it has no effect on any other (non-serial) ATA devices (CD/DVD players, etc).

So, definitely keep ahci(4), & do as you wish with ATA_CAM.  If you decide to add ATA_CAM, though, you might as well add "device ahci" to your kernel conf as well, so you don't have to load it as a module.


----------



## jem (Aug 5, 2010)

```
ahci_load="YES"
```
 was all I needed in my loader.conf.  My adaX disks are all queryable with camcontrol.


----------



## phoenix (Aug 6, 2010)

ata is the existing ATA driver architecture for IDE/ATAPI/SATA devices (disks, floppies, tape drives, CD/DVD drives, etc).

ahci is a new driver architecture for AHCI-compliant SATA controllers.  This is (hopefully) the future for SATA controller support in FreeBSD.  This uses the existing CAM system in FreeBSD, finally merging ATA/SCSI support under one roof.

ATA_CAM is a compatibility shim that bridges the above two worlds.  ATA_CAM makes the old ata-based driver available via the CAM system.  However, it's still the old ata driver, so no new features are added (no NCQ support, for example).  This is a temporary solution to aid in the migration from the old ata framework to the new CAM-based ahci framework.

IOW, if your hardware is supported by the ahci driver, then you want to use that.

If you have hardware that is not supported by ahci (like an IDE CD/DVD drive), but you want to use the same set of tools (camcontrol) and the same naming convention (adaX) for working with them, then add ATA_CAM support.

Hope that clears things up a bit.


----------



## Sylhouette (Aug 6, 2010)

Yes it does clearify things.

Thanks all for the answers.

Gr
Syl


----------

