summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2005-01-18 22:27:24 +0000
committerMarinus Schraal <foser@gentoo.org>2005-01-18 22:27:24 +0000
commitdfff8bbc3f0cb967ddbdff9c86889281004e0a5c (patch)
treeb5bb386417b6356915491435d456e32df5531f7c /sys-apps/hal/files
parentAdded ROOT to dosym. (diff)
downloadhistorical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.tar.gz
historical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.tar.bz2
historical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.zip
add lockup fix for some wireless devices
Diffstat (limited to 'sys-apps/hal/files')
-rw-r--r--sys-apps/hal/files/digest-hal-0.4.5-r21
-rw-r--r--sys-apps/hal/files/hal-0.4.5-net_lockup.patch72
-rw-r--r--sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch98
3 files changed, 171 insertions, 0 deletions
diff --git a/sys-apps/hal/files/digest-hal-0.4.5-r2 b/sys-apps/hal/files/digest-hal-0.4.5-r2
new file mode 100644
index 000000000000..c4ca2b2c74d4
--- /dev/null
+++ b/sys-apps/hal/files/digest-hal-0.4.5-r2
@@ -0,0 +1 @@
+MD5 780d0bf4849c83ea4f8ab9b4102229c2 hal-0.4.5.tar.gz 1343158
diff --git a/sys-apps/hal/files/hal-0.4.5-net_lockup.patch b/sys-apps/hal/files/hal-0.4.5-net_lockup.patch
new file mode 100644
index 000000000000..3cca147332fe
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.5-net_lockup.patch
@@ -0,0 +1,72 @@
+===================================================================
+RCS file: /cvs/hal/hal/hald/linux/Attic/net_class_device.c,v
+retrieving revision 1.21.2.3
+retrieving revision 1.21.2.4
+diff -u -r1.21.2.3 -r1.21.2.4
+--- net_class_device.c 2005/01/07 03:07:45 1.21.2.3
++++ net_class_device.c 2005/01/17 20:00:30 1.21.2.4
+@@ -152,6 +152,8 @@
+ int res;
+ guint16 link_word;
+
++ HAL_INFO (("Entering"));
++
+ ifname = hal_device_property_get_string (d, "net.interface");
+
+ sockfd = socket (AF_INET, SOCK_DGRAM, 0);
+@@ -217,6 +219,8 @@
+ int res;
+ guint16 status_word;
+
++ HAL_INFO (("Entering"));
++
+ ifname = hal_device_property_get_string (d, "net.interface");
+
+ sockfd = socket (AF_INET, SOCK_DGRAM, 0);
+@@ -340,7 +344,12 @@
+ if (hal_device_has_capability (d, "net.80203")) {
+ if (!hal_device_property_get_bool (d, "net.80203.link")) {
+ hal_device_property_set_bool (d, "net.80203.link", TRUE);
++#ifdef SYSFS_CARRIER_ENABLE
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_rate (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+ }
+ } else {
+@@ -617,7 +626,20 @@
+ if (!is_80211 && media_type == ARPHRD_ETHER) {
+ /* TODO: for some reason IFF_RUNNING isn't exported in flags */
+ /*hal_device_property_set_bool (d, "net.80203.link", flags & IFF_RUNNING);*/
++#ifdef SYSFS_CARRIER_ENABLE
++ attr = sysfs_get_classdev_attr (class_device, "carrier");
++ if (attr != NULL) {
++ int have_link;
++
++ have_link = parse_dec (attr->value);
++ HAL_INFO (("According to sysfs link status is %d", have_link));
++ hal_device_property_set_bool (d, "net.80203.link", have_link != 0);
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++ }
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_link (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+ }
+
+@@ -653,7 +675,12 @@
+
+ if (hal_device_has_property (d, "net.80203.link") &&
+ hal_device_property_get_bool (d, "net.80203.link")) {
++#ifdef SYSFS_CARRIER_ENABLE
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_rate (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+
+ hal_device_property_set_int (d, "net.arp_proto_hw_id", media_type);
diff --git a/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch b/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch
new file mode 100644
index 000000000000..9bd6bf0399de
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch
@@ -0,0 +1,98 @@
+===================================================================
+RCS file: /cvs/hal/hal/hald/linux/volume_id/Attic/volume_id.c,v
+retrieving revision 1.45.2.4
+retrieving revision 1.45.2.6
+diff -u -r1.45.2.4 -r1.45.2.6
+--- volume_id.c 2005/01/12 02:05:31 1.45.2.4
++++ volume_id.c 2005/01/17 15:25:00 1.45.2.6
+@@ -774,6 +774,8 @@
+ #define FAT16_MAX 0xfff5
+ #define FAT_ATTR_VOLUME_ID 0x08
+ #define FAT_ATTR_DIR 0x10
++#define FAT_ATTR_LONG_NAME 0x0f
++#define FAT_ATTR_MASK 0x3f
+ #define FAT_ENTRY_FREE 0xe5
+ static int probe_vfat(struct volume_id *id, __u64 off)
+ {
+@@ -859,6 +861,9 @@
+ /* believe only that's fat, don't trust the version
+ * the cluster_count will tell us
+ */
++ if (strncmp(vs->sysid, "NTFS", 4) == 0)
++ return -1;
++
+ if (strncmp(vs->type.fat32.magic, "MSWIN", 5) == 0)
+ goto valid;
+
+@@ -956,7 +961,7 @@
+
+ dir = (struct vfat_dir_entry*) buf;
+
+- for (i = 0; i <= root_dir_entries; i++) {
++ for (i = 0; i < root_dir_entries; i++) {
+ /* end marker */
+ if (dir[i].name[0] == 0x00) {
+ dbg("end of dir");
+@@ -967,7 +972,15 @@
+ if (dir[i].name[0] == FAT_ENTRY_FREE)
+ continue;
+
++ /* long name */
++ if ((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME)
++ continue;
++
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) == FAT_ATTR_VOLUME_ID) {
++ /* labels do not have file data */
++ if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0)
++ continue;
++
+ dbg("found ATTR_VOLUME_ID id in root dir");
+ label = dir[i].name;
+ break;
+@@ -976,6 +989,10 @@
+ dbg("skip dir entry");
+ }
+
++ vs = (struct vfat_super_block *) get_buffer(id, off, 0x200);
++ if (vs == NULL)
++ return -1;
++
+ if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ set_label_raw(id, label, 11);
+ set_label_string(id, label, 11);
+@@ -1015,7 +1032,7 @@
+ count = buf_size / sizeof(struct vfat_dir_entry);
+ dbg("expected entries 0x%x", count);
+
+- for (i = 0; i <= count; i++) {
++ for (i = 0; i < count; i++) {
+ /* end marker */
+ if (dir[i].name[0] == 0x00) {
+ dbg("end of dir");
+@@ -1026,7 +1043,15 @@
+ if (dir[i].name[0] == FAT_ENTRY_FREE)
+ continue;
+
++ /* long name */
++ if ((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME)
++ continue;
++
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) == FAT_ATTR_VOLUME_ID) {
++ /* labels do not have file data */
++ if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0)
++ continue;
++
+ dbg("found ATTR_VOLUME_ID id in root dir");
+ label = dir[i].name;
+ goto fat32_label;
+@@ -1050,6 +1075,10 @@
+ dbg("reached maximum follow count of root cluster chain, give up");
+
+ fat32_label:
++ vs = (struct vfat_super_block *) get_buffer(id, off, 0x200);
++ if (vs == NULL)
++ return -1;
++
+ if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ set_label_raw(id, label, 11);
+ set_label_string(id, label, 11);