CAM wrapper for ata(4)

Testing CAM wrapper for ata(4) controller driversというメールが流れていたので、カッとなって8-stable(svn rev 20055)な環境に入れてみた。
http://people.freebsd.org/~mav/r200008.patchsvn rev 200115で8-stableにMFCされているのでそれ以降の場合はおそらく不要)
http://people.freebsd.org/~mav/ata-wrap.20091202.patch
を/usr/src/で充ててoptions ATA_CAMをkernelのconfigに入れてmake buildworld buildkernel && make installkernel installworldしてリブートしたらあっさり動いたヽ(´ー`)ノゎーゎー

atapci0:  port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 7.1 on pci0
ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]
〜
Waiting 5 seconds for SCSI devices to settle
(aprobe0:ata0:0:0:0): SIGNATURE: 0000
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0:  ATA/ATAPI-4 device
ada0: 33.300MB/s transfers (UDMA2, PIO size 8192bytes)
ada0: 9671MB (19807200 512 byte sectors: 16H 63S/T 16383C)
Trying to mount root from ufs:/dev/label/rootfs

geom label使っていたのでfstabの書き換えが不要だったのだけどlabel使って無かったらfatab中の/dev/ad?を/dev/ada?にする必要があるはず。

% sudo camcontrol identify ada0
Password:
pass0:  ATA/ATAPI-4 device
pass0: 33.300MB/s transfers (UDMA2, PIO size 8192bytes)

protocol              ATA/ATAPI-4
device model          IBM-DTTA-351010
firmware revision     T56OA73A
serial number         
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         19807200 sectors
LBA48 not supported
PIO supported         PIO4
DMA supported         WDMA2 UDMA2
overlap not supported

Feature                      Support  Enable    Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    no       no
Tagged Command Queuing (TCQ)   yes      yes     31/0x1F
SMART                          yes      yes
microcode download             no       no
security                       yes      no
power management               yes      yes
advanced power management      no       no      0/0x00
automatic acoustic management  no       no      0/0x00  0/0x00
media status notification      no       no
power-up in Standby            no       no
write-read-verify              no       no      0/0x0
unload                         no       no
free-fall                      no       no

古い環境でも問題なく動くっぽいので8.1が出るころにはデフォルトがCAM環境になるのかも???CF adapterが動かないとか言う話も見かけるけど。


追記 12/6
headに入った。そのうちMFCされて8-stableにも入るかもしれない。http://svn.freebsd.org/viewvc/base?view=revision&revision=200171