From 7f3999c875ae12124294dacf1d3f04b51b57a09d Mon Sep 17 00:00:00 2001 From: Patrick Mansfield Date: Sat, 10 Jan 2004 04:04:50 -0500 Subject: [PATCH] [PATCH] Re: 2.6.1-rc1: SCSI: `TIMEOUT' redefined On Tue, Jan 06, 2004 at 07:33:25PM +0100, Adrian Bunk wrote: > On Wed, Dec 31, 2003 at 12:36:49AM -0800, Linus Torvalds wrote: > >... > > Summary of changes from v2.6.0 to v2.6.1-rc1 > > ============================================ > >... > > Patrick Mansfield: > > o consolidate and log scsi command on send and completion > >... > > This adds a #define TIMEOUT to scsi.h conflicting with a different > TIMEOUT #define in drivers/scsi/eata_generic.h: Sorry Adrian, here is a patch renaming TIMEOUT to TIMEOUT_ERROR. Still not a good name for the usage in SCSI core, but it does not conflict, and matches the other names for the IO completion results (SUCCESS, FAILED, etc., they and others should really be prefixed with at least SCSI). eata does not use the TIMEOUT it defines, but there are enough defines of TIMEOUT that it could be a problem in other drivers. Only compile tested for eata driver. --- drivers/scsi/scsi.c | 2 +- drivers/scsi/scsi_error.c | 2 +- include/scsi/scsi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 7ebb7fd2a728c..2e47da56a08e7 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -441,7 +441,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) case FAILED: printk("FAILED "); break; - case TIMEOUT: + case TIMEOUT_ERROR: /* * If called via scsi_times_out. */ diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index b547f6bd629bc..a09bbdd01cc57 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -164,7 +164,7 @@ int scsi_delete_timer(struct scsi_cmnd *scmd) **/ void scsi_times_out(struct scsi_cmnd *scmd) { - scsi_log_completion(scmd, TIMEOUT); + scsi_log_completion(scmd, TIMEOUT_ERROR); if (unlikely(!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) { panic("Error handler thread not present at %p %p %s %d", scmd, scmd->device->host, __FILE__, __LINE__); diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 55250d85e2c06..8cbd95d04f3a8 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -302,7 +302,7 @@ struct scsi_lun { #define QUEUED 0x2004 #define SOFT_ERROR 0x2005 #define ADD_TO_MLQUEUE 0x2006 -#define TIMEOUT 0x2007 +#define TIMEOUT_ERROR 0x2007 /* * Midlevel queue return values. -- 2.53.0