Skip to content

Commit

Permalink
[SCSI] use sysfs configured timeout for EH Start Unit timeout
Browse files Browse the repository at this point in the history
Use the sysfs configurable timeout when issuing a START_UNIT
command from the scsi error handler. This is needed for devices which
take longer than thirty seconds to respond to the start
unit. The problem was observed when sending a start unit
to a disk array device in an ipr RAID adapter, which results
in the adapter firmware sending potentially multiple commands
to physical devices as a result of this command, which ended
up timing out sometimes. This patch does not change the default
value used for this command.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Brian King authored and James Bottomley committed May 6, 2007
1 parent 2a4aa2c commit e555db9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "scsi_logging.h"

#define SENSE_TIMEOUT (10*HZ)
#define START_UNIT_TIMEOUT (30*HZ)

/*
* These should *probably* be handled by the host itself.
Expand Down Expand Up @@ -936,7 +935,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)

for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
START_UNIT_TIMEOUT, 0);
scmd->device->timeout, 0);

if (rtn == SUCCESS)
return 0;
Expand Down

0 comments on commit e555db9

Please sign in to comment.