On Mon, 7 Jul 2014, loody wrote: > hi Bryn: > > 2014-07-07 17:20 GMT+08:00 Bryn M. Reeves <bmr@xxxxxxxxxx>: > > On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: > >> hi all: > >> we met a USB Hard Disk that will go to suspend if host stop > >> sending scsi command over 5mins. > >> To save the IO, kernel will keep the file in page cache as much as > >> he can and under this circumstances, the scsi command may disappear > >> for a while longer enough to cause the device suspend. > >> > >> is there any kernel config or module parameter can do the dummy > >> read or scsi command periodically? > > > > No but you could set up a simple cron job to call an sg3_utils command. > > > > E.g. issue an sg_read for one sector to the device every 4m: > > > > */4 * * * * sg_read count=1 if=/dev/<disk> > Since my target platform arm embedded system, > does that mean I should include sg_read in my Busybox > or > cross-compile sg_read from sg3_utils? An alternative is to write a positive value, such as 240000, to /sys/block/sdX/events_poll_msecs where X is replaced with the proper drive letter. (240000 ms = 240 s = 4 m.) I'm not sure this will work, but it's worth a try. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html