hysteresis for CAM_RESRC_UNAVAIL

mjacob at freebsd.org mjacob at freebsd.org
Tue Sep 26 09:00:47 PDT 2006


This showed up on one of the lists- we just retrt BUSY and 
CAM_RESRC_UNAVAIL right away.

Below is a patch where I added a half second delay between retries. Does 
this seem okay and/or should it be longer delays as the timeout count 
goes down? Should BUSY be included?

Index: cam_periph.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/cam_periph.c,v
retrieving revision 1.62
diff -u -r1.62 cam_periph.c
--- cam_periph.c	24 May 2006 15:22:21 -0000	1.62
+++ cam_periph.c	26 Sep 2006 15:54:52 -0000
@@ -1699,6 +1699,12 @@
  		}
  		break;
  	case CAM_RESRC_UNAVAIL:
+		/*
+		 * Wait a half second for the resource shortage to abate.
+		 */
+		relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT;
+		timeout = 500;
+		/* FALLTHROUGH */
  	case CAM_BUSY:
  		/* timeout??? */
  	default:


More information about the freebsd-scsi mailing list