From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Marshall Date: Wed, 06 Apr 2005 11:06:37 +0000 Subject: RE: USB card reader media detection Message-Id: <001e01c53a98$b429b780$f601a8c0@SenatorPalmer> List-Id: References: <000701c536af$9e5e8b20$f601a8c0@SenatorPalmer> In-Reply-To: <000701c536af$9e5e8b20$f601a8c0@SenatorPalmer> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi Greg, Many thanks. > You need to poll the device :( Yes, I am now using the TEST UNIT READY command which seems to be working. Thanks for the input! Kind Regards, Andrew Marshall -----Original Message----- From: Greg KH [mailto:greg@kroah.com] Sent: 05 April 2005 18:52 To: Andrew Marshall Cc: linux-hotplug-devel@lists.sourceforge.net Subject: Re: USB card reader media detection On Fri, Apr 01, 2005 at 12:40:34PM +0100, Andrew Marshall wrote: > Hi all, > > I would very much appreciate any assistance anyone can offer on the > following: > > I am currently running version 2.4.22 of the Kernel and am writing an > application that needs to cope with the removal of card media form a USB > flash card reader. > > Hotplug informs me when the card reader itself is added with my intention > being to scan for partition entries at the newly created dev/scsi entry > > e.g /dev/scsi/host0/bus0/target0/lun0/part1 > > and mount any partitions detected. > > This works fine -- but I also need to detect when a memory card has been > removed. Sorry, will not work properly, as not all devices report when a card has been added or removed. You need to poll the device :( Good luck, greg k-h ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel