Change execution order of ATA_OP_STANDBYNOW commands
Brought to you by:
ideguy
I have an external RAID storage device (RAIDON GR3630-2S-SB3) connected via USB.
That device goes into standby mode with commad ATA_OP_STANDBYNOW1, but wakes up immediately with command ATA_OP_STANDBYNOW2. As a result the command "hdparm -y ..." does not work for the storage device itself.
If I change the execution order it works as expected:
if (set_standbynow) {
__u8 args1[4] = {ATA_OP_STANDBYNOW1,0,0,0};
__u8 args2[4] = {ATA_OP_STANDBYNOW2,0,0,0};
if (get_standbynow)
printf(" issuing standby command\n");
if (do_drive_cmd(fd, args2, 0) && do_drive_cmd(fd, args1, 0)) {
err = errno;
perror(" HDIO_DRIVE_CMD(standby) failed");
}
}
So.. which order should it be? What you posted above matches what is already in hdparm.c
Thanks.