linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb card reader not detect hotplug of sd/cf cards
@ 2007-06-18  7:42 Manfred Gruber
  2007-06-18 12:00 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Manfred Gruber @ 2007-06-18  7:42 UTC (permalink / raw)
  To: linux-hotplug

hi !

I have problem with a SMSC USB2227/2228 card reader on a embedded device that 
it does not detect hotplugging of the cards.

if no sd/cf card is in the slot at booting i get (2.6.22-rc4):

hub 1-0:1.0: USB hub found                                                                                                                                                                                       
hub 1-0:1.0: 3 ports detected                                                                                                                                                                                    
Initializing USB Mass Storage driver...                                                                                                                                                                          
usb 1-2: new low speed USB device using ep93xx-ohci and address 2                                                                                                                                                
usb 1-2: configuration #1 chosen from 1 choice                                                                                                                                                                   
usb 1-3: new full speed USB device using ep93xx-ohci and address 3                                                                                                                                               
usb 1-3: configuration #1 chosen from 1 choice                                                                                                                                                                   
hub 1-3:1.0: USB hub found                                                                                                                                                                                       
hub 1-3:1.0: 4 ports detected                                                                                                                                                                                    
usb 1-3.1: new full speed USB device using ep93xx-ohci and address 4                                                                                                                                             
usb 1-3.1: configuration #1 chosen from 1 choice                                                                                                                                                                 
scsi1 : SCSI emulation for USB Mass Storage devices                                                                                                                                                              
usbcore: registered new interface driver usb-storage                                                                                                                                                             
USB Mass Storage support registered.                             
...
scsi 1:0:0:0: Direct-Access     Generic  Flash HS-CF      4.44 PQ: 0 ANSI: 0                                                                                                                                     
sd 1:0:0:0: Attached scsi removable disk sda                                                                                                                                                                     
sd 1:0:0:0: Attached scsi generic sg0 type 0                                                                                                                                                                     
scsi 1:0:0:1: Direct-Access     Generic  Flash HS-MS      4.44 PQ: 0 ANSI: 0                                                                                                                                     
sd 1:0:0:1: Attached scsi removable disk sdb                                                                                                                                                                     
sd 1:0:0:1: Attached scsi generic sg1 type 0                                                                                                                                                                     
scsi 1:0:0:2: Direct-Access     Generic  Flash HS-SM      4.44 PQ: 0 ANSI: 0                                                                                                                                     
sd 1:0:0:2: Attached scsi removable disk sdc                                                                                                                                                                     
sd 1:0:0:2: Attached scsi generic sg2 type 0                                                                                                                                                                     
scsi 1:0:0:3: Direct-Access     Generic  Flash HS-SD/MMC  4.44 PQ: 0 ANSI: 0                                                                                                                                     
sd 1:0:0:3: Attached scsi removable disk sdd                                                                                                                                                                     
sd 1:0:0:3: Attached scsi generic sg3 type 0             

if I then insert a card i have to do:

echo 1 > /sys/block/sdd/device/rescan                                                                                                                                                            
SCSI device sdd: 62720 512-byte hdwr sectors (32 MB)                                                                                                                                                             
sdd: Write Protect is off                                                                                                                                                                                        
sdd: assuming drive cache: write through

and then the device is there.

are there on normal linux workstations some daemons running which detect 
hotpluging of such devices periodically or how is this handled.

my problem is that on my workstation hotplugging of cards gets detected, but 
on the embedded device not.

so dose someone have an idea what to do, or make a small daemon which dose a 
echo 1 > /sys/block/sdX/device/rescan periodicall ?

or are there already some daemons which do this job ?

thanks a lot for help

regards 
manfred 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: usb card reader not detect hotplug of sd/cf cards
  2007-06-18  7:42 usb card reader not detect hotplug of sd/cf cards Manfred Gruber
@ 2007-06-18 12:00 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2007-06-18 12:00 UTC (permalink / raw)
  To: linux-hotplug

On 6/18/07, Manfred Gruber <m.gruber@tirol.com> wrote:
> I have problem with a SMSC USB2227/2228 card reader on a embedded device that
> it does not detect hotplugging of the cards.
>
> if no sd/cf card is in the slot at booting i get (2.6.22-rc4):
>
> if I then insert a card i have to do:
>
> echo 1 > /sys/block/sdd/device/rescan
> SCSI device sdd: 62720 512-byte hdwr sectors (32 MB)
> sdd: Write Protect is off
> sdd: assuming drive cache: write through
>
> and then the device is there.
>
> are there on normal linux workstations some daemons running which detect
> hotpluging of such devices periodically or how is this handled.
>
> my problem is that on my workstation hotplugging of cards gets detected, but
> on the embedded device not.
>
> so dose someone have an idea what to do, or make a small daemon which dose a
> echo 1 > /sys/block/sdX/device/rescan periodicall ?
>
> or are there already some daemons which do this job ?

Usually it is HAL (hald) which polls for media changes. You have to
open() the the device node (/dev/sdX) every few seconds and media
changes will be recognized.

Kay

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-18 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-18  7:42 usb card reader not detect hotplug of sd/cf cards Manfred Gruber
2007-06-18 12:00 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).