NetBSD Problem Report #49612

From  Tue Jan 27 23:34:15 2015
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id A569AA582D
	for <>; Tue, 27 Jan 2015 23:34:15 +0000 (UTC)
Message-Id: <>
Date: Tue, 27 Jan 2015 23:34:14 +0000 (UTC)
Subject: hald on umass detection problem
X-Send-Pr-Version: www-1.0

>Number:         49612
>Category:       pkg
>Synopsis:       hald on umass detection problem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 27 23:35:00 +0000 2015
>Last-Modified:  Wed Jan 28 08:08:58 +0000 2015
>Originator:     sergio lenzi
>Release:        NetBSD 6.1.5_PATCH
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
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.
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

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);



Responsible-Changed-From-To: port-i386-maintainer->pkg-manager
Responsible-Changed-When: Wed, 28 Jan 2015 08:08:58 +0000
hald is not part of the base system, but comes from pkgsrc, so this is a pkg bug report. Refile.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.