Re: exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tom Mortensen
Date: Tuesday, September 30, 2008 - 1:47 pm

Don't know if this is the original poster's problem, but if the drive
is spun down, then enabling SMART or trying to read SMART attributes
causes the drive to spin up and the command is delayed until this has
occurred.

The fix is to increase the timeout given to scsi_execute() in
drivers/ata/libata-scsi.c.

ie, current code (2.6.26.5) is:

        /* Good values for timeout and retries?  Values below
           from scsi_ioctl_send_command() for default case... */
        cmd_result = scsi_execute(scsidev, scsi_cmd, data_dir, argbuf, argsize,
                                  sensebuf, (10*HZ), 5, 0);

Should be changed to:

        /* Good values for timeout and retries?  Values below
           from scsi_ioctl_send_command() for default case... */
        cmd_result = scsi_execute(scsidev, scsi_cmd, data_dir, argbuf, argsize,
                                  sensebuf, (30*HZ), 5, 0);

Using a 1TB Hitachi hard drive, this command times out because it
takes this drive about 15 seconds to spin up.  Virtutally all hard
drives spin up in less than 30 sec, but perhaps make this higher in
case there are slower drives out there?

Cheers,
Tom

On Mon, Sep 29, 2008 at 2:13 AM, Tejun Heo <tj@kernel.org> wrote:
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen, Justin Piszcz, (Mon Sep 22, 6:19 am)
Re: exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen, Gwendal Grignou, (Tue Sep 23, 11:14 am)
Re: exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen, Brian Rademacher, (Tue Sep 23, 1:59 pm)
Re: exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen, Tom Mortensen, (Tue Sep 30, 1:47 pm)
Re: exception Emask 0x0 SAct 0x1 / SErr 0x0 action 0x2 frozen, Mr. James W. Laferriere, (Tue Sep 30, 8:50 pm)