camcontrol: error sending command

I wanted to disable power management and apm on my wd caviar black, but somehow the camcontrol command does not work

Code:
/sbin/camcontrol cmd ada5 -a "EF C2 00 00 00 00 00 00 00 00 00 00" -v
camcontrol: error sending command
(pass5:ahcich2:0:0:0): SETFEATURES. ACB: ef c2 00 00 00 00 00 00 00 00 00 00
(pass5:ahcich2:0:0:0): CAM status: ATA Status Error
(pass5:ahcich2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass5:ahcich2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00

I have tried this on FreeBSD9 amd64. Afterwards I have upgraded to RC3, but the problem remains the same.

Any suggestions on this one?
 
Sorry I forgot to mention, I did try both commands.
This one as well:
Code:
camcontrol cmd ada4 -a "EF 85 00 00 00 00 00 00 00 00 00 00" -v
camcontrol: error sending command
(pass4:mvsch3:0:0:0): SETFEATURES. ACB: ef 85 00 00 00 00 00 00 00 00 00 00
(pass4:mvsch3:0:0:0): CAM status: ATA Status Error
(pass4:mvsch3:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass4:mvsch3:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00

I tried both commands with two wd caviar black, each on different controllers.

Code:
camcontrol identify ada4
pass4: <WDC WD2002FAEX-007BA0 05.01D05> ATA-8 SATA 3.x device
pass4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD2002FAEX-007BA0
firmware revision     05.01D05
serial number         WD-WCAY00278223
WWN                   50014ee25c67c6a8
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       3907029168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no

Code:
camcontrol identify ada5
pass5: <WDC WD2002FAEX-007BA0 05.01D05> ATA-8 SATA 3.x device
pass5: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD2002FAEX-007BA0
firmware revision     05.01D05
serial number         WD-WCAY00215529
WWN                   50014ee25c5d2ed8
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       3907029168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
 
The answer is here:
Code:
advanced power management      no       no
automatic acoustic management  no       no

You can't disable feature that is not supported.
 
Thanks to clear that out.
So then I got the command wrong as I actually want to turn off
Code:
power management               yes      yes

So where can I find the hexadecimal command to turn this off?
 
I'm wondering about the same thing: I'd like to know the commands to enable/disable:
* advanced power management;
* automatic acoustic management.

Much obliged.
 
HRM, it's becoming a cliché: I found the answer shortly after asking the question. :)

crsd said:
> I'm trying to replace sysutils/ataidle which doesn't work with new
> acpi(4). May be somebody could tell me args for
>
>
Code:
camcontrol cmd ada0 -a cmd XX XX XX XX XX XX XX XX
>
> to disable APM and acoustic management (AAM) for my HDD?

To set APM level:
Code:
camcontrol cmd ada0 -a "EF 05 00 00 00 00 00 00 00 00 xx 00"
To disable it:
Code:
camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00"

To set AAM level:
Code:
camcontrol cmd ada0 -a "EF 42 00 00 00 00 00 00 00 00 xx 00"
To disable it:
Code:
camcontrol cmd ada0 -a "EF C2 00 00 00 00 00 00 00 00 00 00"

You can check result with:
Code:
camcontrol identify ada0

So there you have it.

Aside question for the mods: I had to use {code} tags because it seems that {cmd} tags do not work within {quote} tags. Is this correct and ok for me to do?
 
Back
Top