Commit 927f11df authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] clean up SCSI_TIMEOUT usage

 - qlogicfc.c abuses SCSI_TIEMOUT although it's not part of the scsi
   core, give it it's own ISP_TIMEOUT define
 - avoid redefining timeouts #ifdef DEBUG, that's a cause for heisenbugs
   just waiting to happen
 - now SCSI_TIMEOUT is private to scsi_scan.c, move it there
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 30281091
......@@ -100,6 +100,7 @@
#define DEFAULT_LOOP_COUNT 1000000000
#define ISP_TIMEOUT (2*HZ)
/* End Configuration section ************************************************ */
#include <linux/module.h>
......@@ -1305,7 +1306,7 @@ int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
cmd->control_flags = cpu_to_le16(CFLAG_READ);
if (Cmnd->device->tagged_supported) {
if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * SCSI_TIMEOUT)) {
if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) {
cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG);
hostdata->tag_ages[Cmnd->device->id] = jiffies;
} else
......
......@@ -40,12 +40,6 @@
#define FALSE 0
#endif
#ifdef DEBUG
#define SCSI_TIMEOUT (5*HZ)
#else
#define SCSI_TIMEOUT (2*HZ)
#endif
struct Scsi_Host;
struct scsi_cmnd;
struct scsi_device;
......
......@@ -31,20 +31,15 @@
#include "scsi_priv.h"
#include "scsi_logging.h"
#ifdef DEBUG
#define SENSE_TIMEOUT SCSI_TIMEOUT
#else
#define SENSE_TIMEOUT (10*HZ)
#endif
#define START_UNIT_TIMEOUT (30*HZ)
#define SENSE_TIMEOUT (10*HZ)
#define START_UNIT_TIMEOUT (30*HZ)
/*
* These should *probably* be handled by the host itself.
* Since it is allowed to sleep, it probably should.
*/
#define BUS_RESET_SETTLE_TIME 10*HZ
#define HOST_RESET_SETTLE_TIME 10*HZ
#define BUS_RESET_SETTLE_TIME (10*HZ)
#define HOST_RESET_SETTLE_TIME (10*HZ)
/* called with shost->host_lock held */
void scsi_eh_wakeup(struct Scsi_Host *shost)
......
......@@ -44,6 +44,11 @@
#define ALLOC_FAILURE_MSG KERN_ERR "%s: Allocation failure during" \
" SCSI scanning, some SCSI devices might not be configured\n"
/*
* Default timeout
*/
#define SCSI_TIMEOUT (2*HZ)
/*
* Prefix values for the SCSI id's (stored in driverfs name field)
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment