From 7a38dc0bfb4cc39ed57e120e2224673f3d4d200f Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 6 Apr 2017 15:36:29 +0200 Subject: scsi: scsi_error: count medium access timeout only once per EH run The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single device failure and the following kernel message is displayed: sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining disk! Fix this by making the timeout per EH run, ie the counter will only be increased once per device and EH run. Fixes: 18a4d0a ("[SCSI] Handle disk devices which can not process medium access commands") Cc: Ewan Milne Cc: Lawrence Obermann Cc: Benjamin Block Cc: Steffen Maier Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- drivers/scsi/sd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi/sd.h') diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 4dac35e96a75..0cf9680cb469 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h @@ -106,6 +106,7 @@ struct scsi_disk { unsigned rc_basis: 2; unsigned zoned: 2; unsigned urswrz : 1; + unsigned ignore_medium_access_errors : 1; }; #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev) -- cgit v1.2.3-59-g8ed1b