Skip to contentSkip to conversation

SATA timeout value

DISCUSSION Russell Sloan 2 participants 2 messages Apr 23, 2007 libata

lore
Share & tools
lore
#0 lore raw

I'm using SG_IO and I'm curently passing in:
sg_io_hdr_t.timeout = 5;

This should be a 5 ms timeout, correct? I've tried a few different values, from 5 to 1000 and it still takes 90+ seconds for it to timeout and return to my program.

I will try HDIO and see if that behaves any differently.

Quoted 10 lines · Russell Sloan

Hi everyone,

Can someone point me to the area in the SATA code that is responsible for timing out while checking on a drive connection?

I have a drive that shuts its SATA interface down while it is doing a Security Erase, and then powers back up when it's done. When I poll the drive asking for its status during the Erase, it is "not there" but the driver takes quite a while to report back. I'd like to reduce the time that the driver spends checking for the drive.

What tool do you use to issue the query? If the program uses SG_IO, the timeout is specified by the program. If it uses something else (one of HDIO ioctls), timeouts are hardcoded in the ioctl functions in libata-scsi.c - currently 10secs.

Signature · 5 lines
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 6 lines · Russell Sloan

I'm using SG_IO and I'm curently passing in:
sg_io_hdr_t.timeout = 5;

This should be a 5 ms timeout, correct? I've tried a few different values, from 5 to 1000 and it still takes 90+ seconds for it to timeout and return to my program.

I will try HDIO and see if that behaves any differently.

It might be retrying. Can you post dmesg after the command?

Signature · 1 line
tejun