hi Alan: 2014-07-09 3:26 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > On Wed, 9 Jul 2014, loody wrote: > >> there is one thing pop in my mind. >> if events_poll_msecs is used for media_change, shouldn't we wrap is READ10? > > No. Why should media change polling use READ(10)? TEST UNIT READY > does a good job of detecting media changes. > >> the difference seems >> 1. change SCSI command >> 2. allocate 512 Byte for 1 sector dummy read >> the periodically trigging flow should be the same. >> >> if you think above is possible, where we should start from? > > Why do you want to make this change? on that usb hard disk, no matter media_change or TEST_UNIT_READY, keep polling the device every 3mins. the disconnection still happen. So I am wondering, I can use the existence wheel, such as echo 40000 > /sys/block/sda/events_poll_ msecs. but what it really do is read sector, not media_change or test_unit_ready. thanks for your kind help -- 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