NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-i386/49612: hald on umass detection problem



>Number:         49612
>Category:       port-i386
>Synopsis:       hald on umass detection problem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 27 23:35:00 +0000 2015
>Originator:     sergio lenzi
>Release:        NetBSD 6.1.5_PATCH
>Organization:
http://www.k1.com.br
>Environment:
NetBSD m237.lenzicasa 6.1.5_PATCH NetBSD 6.1.5_PATCH (LZT) #1: Tue Jan 27 13:20:00 BRST 2015  lzt@m237.lenzicasa:/usr/obj/sys/arch/i386/compile/LZT i386
>Description:
hald when compiled from the sources recognizes a MSDOS formatted pen drive only once, (at start) and if the pen-drive is plugged in 

if you remove the pen-drive and plug it in again, it does not recognize the pendrive any more.
if you plug the pen-drive AFTER hald is started, does not regognize the pen-drive either...

The problem is that when you remove the pen-drive, the hal logic removes the umass from hal device and when you plug the pen-drive again, it does not load the umass before loading the scsi (sdx), so the device sd0 (sdx) have no place to go..

Some hal guru is needed to fix it, I built an ugly patch that just
ignores the umass delete.
>How-To-Repeat:
1) plug the pen-drive
2) start hal
3) command: hal-device | grep sd0, shows the pen-drive
4) unplug the pen-drive
5) wait 5 seconds
6) plug the pen-drive
7) command: hal-device | grep sd0, does not show the pen-drive

>Fix:
diff -up hald/netbsd/drvctl.c.orig hald/netbsd/drvctl.c
--- hald/netbsd/drvctl.c.orig   2015-01-27 21:09:39.000000000 -0200
+++ hald/netbsd/drvctl.c        2015-01-27 21:12:00.000000000 -0200
@@ -136,6 +136,10 @@ drvctl_dev_add(gchar *name)
 static void
 drvctl_dev_remove(gchar *name)
 {
+       if (!strncmp(name,"umass",5)) {
+               HAL_INFO (("*****FIXME NOT REMOVING*****: %s", name));
+               return;
+       }
        HAL_INFO (("dev_remove: %s", name));
 
        devinfo_remove_branch (name, NULL);



Home | Main Index | Thread Index | Old Index