On Fri, 9 Jun 2006, James Bottomley wrote: > > Ultimately this boils down to how you want to represent "No medium > > present" in the SCSI core. What do you think is the bets way? > > Well ... that's where I think we follow the CD people, since they're the > ones who have this occurring the most often. Okay, I'll wait for Jens to take a look and make a recommendation. BTW, the stimulus for this work came from a user with a USB flash card reader. The reader implements 4 different LUNs (for the different sorts of flash technology) and hald polls each LUN every 2 seconds. Lack of early detection for no-medium-present means that each poll ends up generating 8 SCSI commands; hence 16 commands get sent per second. Not only is this aesthetically displeasing, on this user's system some low-quality USB hardware was chewing up a high percentage of the total PCI bandwidth because of the frequent requests. Poorly-selected timeouts in the USB host controller driver contributed to the problem as well. The final result was that on an unloaded system doing nothing at all, the CPU load was nevertheless up to 40%! Changing hardware and updating the USB host driver helped the user, but I still think it's a good idea to eliminate the useless commands. Alan Stern - : 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