rpms/hal/F-11 hal-0.5.12-fix-imebus-devices.patch, NONE, 1.1 hal.spec, 1.189, 1.190

Richard Hughes rhughes at fedoraproject.org
Wed Jul 29 13:19:43 UTC 2009


Author: rhughes

Update of /cvs/pkgs/rpms/hal/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24140

Modified Files:
	hal.spec 
Added Files:
	hal-0.5.12-fix-imebus-devices.patch 
Log Message:
* Wed Jul 29 2009 Richard Hughes <rhughes at redhat.com> - 0.5.12-27.20090226git
- hal-0.5.12-fix-imebus-devices.patch: HAL was failing to recognize ehea
  ethernet adapters under /sys/bus/ibmebus.
- Fixes #496820


hal-0.5.12-fix-imebus-devices.patch:
 device.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

--- NEW FILE hal-0.5.12-fix-imebus-devices.patch ---
>From f710e0fda727d102291a44d1ce153ea22eac6c3e Mon Sep 17 00:00:00 2001
From: Pavan Naregundi <pavan at linux.vnet.ibm.com>
Date: Mon, 13 Jul 2009 11:38:27 +0000
Subject: add suport for /sys/bus/ibmebus

HAL was failing to recognize ehea ethernet adapters under /sys/bus/ibmebus.
  https://bugzilla.redhat.com/show_bug.cgi?id=496820

After the patch ehea adapters are under ibmebus in the lshal --tree
 ibmebus/lhea_23c00200
  ibmebus/lhea_23c00200/ethernet_23e00100
    net_00_21_5e_03_1d_21
---
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 653c9fe..2823650 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -758,6 +758,44 @@ firewire_compute_udi (HalDevice *d)
 
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
+static HalDevice *
+ibmebus_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev,  const gchar *parent_path)
+{
+	HalDevice *d;
+
+	d = hal_device_new ();
+	hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+	hal_device_property_set_string (d, "linux.sysfs_path_device", sysfs_path);
+	hal_device_property_set_string (d, "info.bus", "ibmebus");
+	if (parent_dev != NULL) {
+		hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev));
+	} else {
+		hal_device_property_set_string (d, "info.parent", "/org/freedesktop/Hal/devices/computer");
+	}
+
+	hal_util_set_driver (d, "info.linux.driver", sysfs_path);
+
+	hal_util_set_string_from_file (d, "ibmebus.devspec", sysfs_path, "devspec");
+	hal_util_set_string_from_file (d, "ibmebus.type", sysfs_path, "type");
+
+	return d;
+}
+
+
+static gboolean
+ibmebus_compute_udi (HalDevice *d)
+{
+	gchar udi[256];
+
+	hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+			      "/org/freedesktop/Hal/devices/ibmebus%s",
+			      hal_device_property_get_string (d, "ibmebus.devspec"));
+	hal_device_set_udi (d, udi);
+	hal_device_property_set_string (d, "info.udi", udi);
+	return TRUE;
+}
 
 /*--------------------------------------------------------------------------------------------------------------*/
 
@@ -4288,6 +4326,13 @@ static DevHandler dev_handler_firewire = {
 	.remove       = dev_remove
 };
 
+static DevHandler dev_handler_ibmebus = { 
+	.subsystem   = "ibmebus",
+	.add         = ibmebus_add,
+	.compute_udi = ibmebus_compute_udi,
+	.remove      = dev_remove
+};
+
 static DevHandler dev_handler_ide = { 
 	.subsystem   = "ide",
 	.add         = ide_add,
@@ -4610,6 +4655,7 @@ static DevHandler *dev_handlers[] = {
 	&dev_handler_drm,
 	&dev_handler_dvb,
 	&dev_handler_firewire,
+	&dev_handler_ibmebus,
 	&dev_handler_ide,
 	&dev_handler_ieee1394,
 	&dev_handler_input,
--
cgit v0.8.2


Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/F-11/hal.spec,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -p -r1.189 -r1.190
--- hal.spec	27 Mar 2009 05:01:16 -0000	1.189
+++ hal.spec	29 Jul 2009 13:19:43 -0000	1.190
@@ -28,7 +28,7 @@ Summary: Hardware Abstraction Layer
 Name: hal
 Version: 0.5.12
 #Release: 14%{?dist}
-Release: 26.%{?alphatag}%{?dist}
+Release: 27.%{?alphatag}%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 #Source0: http://hal.freedesktop.org/releases/%{name}-%{version}rc1.tar.bz2
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}-%{?alphatag}.tar.gz
@@ -51,6 +51,9 @@ Patch8: hal-fix-udev-dir.patch
 # http://lists.freedesktop.org/archives/hal/2009-March/013125.html
 Patch9: hal-KVM-evdev.patch
 
+# upstream, f710e0fda727d102291a44d1ce153ea22eac6c3e
+Patch10: hal-0.5.12-fix-imebus-devices.patch
+
 License: AFL or GPLv2
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -163,6 +166,7 @@ API docs for HAL.
     --with-eject=%{_sbindir}/eject
 
 # because of patch8
+autoreconf
 automake
 
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@@ -297,6 +301,11 @@ fi
 %{_datadir}/gtk-doc/html/libhal-storage/*
 
 %changelog
+* Wed Jul 29 2009 Richard Hughes <rhughes at redhat.com> - 0.5.12-27.20090226git
+- hal-0.5.12-fix-imebus-devices.patch: HAL was failing to recognize ehea
+  ethernet adapters under /sys/bus/ibmebus.
+- Fixes #496820
+
 * Fri Mar 27 2009 Peter Hutterer <peter.hutterer at redhat.com> - 0.5.12-26.20090226git
 - hal-KVM-evdev.patch: force the evdev driver for American Megatrends KVM
   (#484776)




More information about the fedora-extras-commits mailing list