From owner-freebsd-gnome@FreeBSD.ORG Fri Feb 9 21:03:14 2007 Return-Path: X-Original-To: gnome@freebsd.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0ECA16A407; Fri, 9 Feb 2007 21:03:13 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from mirapoint3.brutele.be (mirapoint3.brutele.be [212.68.199.148]) by mx1.freebsd.org (Postfix) with ESMTP id 4388613C478; Fri, 9 Feb 2007 21:03:13 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-244-81.brutele.be (host-212-68-244-81.brutele.be [212.68.244.81]) by mirapoint3.brutele.be (MOS 3.7.5a-GA) with ESMTP id ACX03682; Fri, 9 Feb 2007 22:03:10 +0100 (CET) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 0DAA0556B; Fri, 9 Feb 2007 22:03:10 +0100 (CET) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id A98F031; Fri, 9 Feb 2007 22:03:09 +0100 (CET) Date: Fri, 9 Feb 2007 22:02:53 +0100 From: Jean-Yves Lefort To: Michael Nottebrock Message-Id: <20070209220253.9f6b6d28.jylefort@FreeBSD.org> In-Reply-To: <200702090952.27005.lofi@freebsd.org> References: <200702090634.56455.lofi@freebsd.org> <200702090758.18317.lofi@freebsd.org> <1171007171.67014.28.camel@shumai.marcuscom.com> <200702090952.27005.lofi@freebsd.org> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__9_Feb_2007_22_02_53_+0100_l.C3AOdIH3E782SG" X-Junkmail-Status: score=10/50, host=mirapoint3.brutele.be X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090207.45CCE18F.0021,ss=1,fgs=0, ip=212.68.244.81, so=2006-05-09 23:27:51, dmn=5.2.125/2006-10-10 Cc: gnome@freebsd.org Subject: Re: HAL on FreeBSD 5.5 redux X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 21:03:14 -0000 --Signature=_Fri__9_Feb_2007_22_02_53_+0100_l.C3AOdIH3E782SG Content-Type: multipart/mixed; boundary="Multipart=_Fri__9_Feb_2007_22_02_53_+0100_cneT6LJJIS8tB+n_" --Multipart=_Fri__9_Feb_2007_22_02_53_+0100_cneT6LJJIS8tB+n_ Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Fri, 9 Feb 2007 09:52:18 +0100 Michael Nottebrock wrote: > On Friday, 9. February 2007 08:46, Joe Marcus Clarke wrote: > > On Fri, 2007-02-09 at 07:58 +0100, Michael Nottebrock wrote: > > > On Friday, 9. February 2007 06:52, Joe Marcus Clarke wrote: > > > > There was a recent change that went into HAL to favor atapicam > > > > installations over those without. I wonder if this could be causing > > > > problems. Please provide an lshal. > > > > > > Oh, and I really should mention this, the atapicam devices work fine with > > > the current HAL, the problems are just with the atapicd devices (i.e. > > > with atapicam turned off, that was the regression testing I did). > > > > Something just occurred to me. Give this patch a try, and see if it > > helps. > > That patch fixes the probing of the atapicd devices. Excellent! > > It uncovers a different problem though: HAL appears to only hide/ignore acd0 > if both atapicam and atapicd are enabled - when I boot with a cdrom loaded > into my second drive, the volume shows up in the media manager twice, for cd1 > *and* acd1. The volume on acd1 disappears though when I eject and reload the > disc. > > There is also an hald-addon-storage process of acd1: > > [lofi@kiste]:0:~ > ps auxwww | grep hald-addon > root 942 0,0 0,1 2776 1468 ?? S 9:40am 0:00,16 > hald-addon-storage: /dev/cd0 (hald-addon-storage) > root 947 0,0 0,1 2780 1476 ?? S 9:40am 0:00,15 > hald-addon-storage: /dev/cd1 (hald-addon-storage) > root 969 0,0 0,1 2776 1472 ?? S 9:40am 0:00,21 > hald-addon-storage: /dev/acd1 (hald-addon-storage) I think I should map atapicam devices to SCSI devices by target ID, not by target LUN. Please test the attached patch. -- Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Multipart=_Fri__9_Feb_2007_22_02_53_+0100_cneT6LJJIS8tB+n_ Content-Type: text/plain; name="hal-scsi.diff" Content-Disposition: attachment; filename="hal-scsi.diff" Content-Transfer-Encoding: quoted-printable Index: hf-scsi.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /space/cvs/marcuscom-cvs/hal/hald/freebsd/hf-scsi.c,v retrieving revision 1.28 diff -u -r1.28 hf-scsi.c --- hf-scsi.c 1 Jan 2007 22:43:23 -0000 1.28 +++ hf-scsi.c 9 Feb 2007 21:00:45 -0000 @@ -271,13 +271,13 @@ } =20 static HalDevice * -hf_scsi_get_atapi_device (HalDevice *ata_channel, int lun) +hf_scsi_get_atapi_device (HalDevice *ata_channel, int target_id) { HalDevice *device =3D NULL; GList *l; =20 g_return_val_if_fail(HAL_IS_DEVICE(ata_channel), NULL); - g_return_val_if_fail(lun =3D=3D 0 || lun =3D=3D 1, NULL); /* ATA master = or slave*/ + g_return_val_if_fail(target_id =3D=3D 0 || target_id =3D=3D 1, NULL); /*= ATA master or slave */ =20 /* * If there's an ATAPI device it will be in hf_ata_pending_devices, @@ -294,7 +294,7 @@ if (driver && (! strcmp(driver, "acd") || ! strcmp(driver, "ast") ||= ! strcmp(driver, "afd"))) { device =3D child; - if (lun =3D=3D 0) + if (target_id =3D=3D 0) break; /* we wanted the first device, done */ } } @@ -334,7 +334,7 @@ ata_channel =3D hf_scsi_get_ata_channel(parent); if (ata_channel) { - atapi_device =3D hf_scsi_get_atapi_device(ata_channel, (*match)->targe= t_lun); + atapi_device =3D hf_scsi_get_atapi_device(ata_channel, (*match)->targe= t_id); if (atapi_device) { char *cam_devname; --Multipart=_Fri__9_Feb_2007_22_02_53_+0100_cneT6LJJIS8tB+n_-- --Signature=_Fri__9_Feb_2007_22_02_53_+0100_l.C3AOdIH3E782SG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFzOGNyzD7UaO4AGoRAnffAJ9rYFEuXUso4pnhdCi3FdOWoTBE1wCcDDYI Q7gcEoQ2JzlWo/pbXIWptXA= =h8OW -----END PGP SIGNATURE----- --Signature=_Fri__9_Feb_2007_22_02_53_+0100_l.C3AOdIH3E782SG--