aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJurij Smakov <jurij@wooyd.org>2007-03-09 13:54:03 +0000
committerJurij Smakov <jurij@wooyd.org>2007-03-09 13:54:03 +0000
commitd208b5cb3a2f2a4cd286c1c8e3b29dce4766cdd5 (patch)
tree98647feb4dfd711a845dc80aa83ac8dd70aeda9f
parentc41b90cf46108e961bf9ce2eee37fb4217e8e27d (diff)
downloadkernel_replicant_linux-d208b5cb3a2f2a4cd286c1c8e3b29dce4766cdd5.tar.gz
kernel_replicant_linux-d208b5cb3a2f2a4cd286c1c8e3b29dce4766cdd5.tar.bz2
kernel_replicant_linux-d208b5cb3a2f2a4cd286c1c8e3b29dce4766cdd5.zip
Add bugfix/sparc/eth1394-unaligned-access.patch by Emanuele Roca (plus
backports from 2.6.20) to fix unaligned memory accesses in Firewire eth1394 driver. svn path=/dists/sid/linux-2.6/; revision=8338
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/bugfix/sparc/eth1394-unaligned-access.patch56
-rw-r--r--debian/patches/series/121
3 files changed, 60 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a9c1de8f4bf3..ca87f2bb3c57 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ linux-2.6 (2.6.18.dfsg.1-12) UNRELEASED; urgency=low
* Add bugfix/sparc/e450-boot-failure.patch to fix boot failure on
E450 machines. Thanks to David Miller for the patch and to Daniel
Smolik for testing.
+ * Add bugfix/sparc/eth1394-unaligned-access.patch to fix unaligned
+ memory accesses in the Firewire eth1394 driver. Thanks to Emanuele
+ Roca for the patch.
-- Steve Langasek <vorlon@debian.org> Mon, 5 Mar 2007 00:25:35 -0800
diff --git a/debian/patches/bugfix/sparc/eth1394-unaligned-access.patch b/debian/patches/bugfix/sparc/eth1394-unaligned-access.patch
new file mode 100644
index 000000000000..b83bde33a9e7
--- /dev/null
+++ b/debian/patches/bugfix/sparc/eth1394-unaligned-access.patch
@@ -0,0 +1,56 @@
+Author : Emanuele Rocca <ema@debian.org> plus backports from 2.6.20
+Date : Tue, 27 Feb 2007 00:23:28 +0100
+Message-ID : <20070226232328.GA6779@darkmoon.home>
+Status : included upstream, confirmed working
+Description : fixes unaligned access in ether1394_reset_priv()
+
+diff -aur a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
+--- a/drivers/ieee1394/eth1394.c 2006-09-20 06:42:06.000000000 +0300
++++ b/drivers/ieee1394/eth1394.c 2007-03-09 15:07:18.000000000 +0200
+@@ -65,6 +65,7 @@
+ #include <asm/uaccess.h>
+ #include <asm/delay.h>
+ #include <asm/semaphore.h>
++#include <asm/unaligned.h>
+ #include <net/arp.h>
+
+ #include "csr1212.h"
+@@ -491,7 +492,7 @@
+ int i;
+ struct eth1394_priv *priv = netdev_priv(dev);
+ struct hpsb_host *host = priv->host;
+- u64 guid = *((u64*)&(host->csr.rom->bus_info_data[3]));
++ u64 guid = get_unaligned((u64*)&(host->csr.rom->bus_info_data[3]));
+ u16 maxpayload = 1 << (host->csr.max_rec + 1);
+ int max_speed = IEEE1394_SPEED_MAX;
+
+@@ -894,6 +895,7 @@
+ u16 maxpayload;
+ struct eth1394_node_ref *node;
+ struct eth1394_node_info *node_info;
++ __be64 guid;
+
+ /* Sanity check. MacOSX seems to be sending us 131 in this
+ * field (atleast on my Panther G5). Not sure why. */
+@@ -902,8 +904,9 @@
+
+ maxpayload = min(eth1394_speedto_maxpayload[sspd], (u16)(1 << (max_rec + 1)));
+
++ guid = get_unaligned(&arp1394->s_uniq_id);
+ node = eth1394_find_node_guid(&priv->ip_node_list,
+- be64_to_cpu(arp1394->s_uniq_id));
++ be64_to_cpu(guid));
+ if (!node) {
+ return 0;
+ }
+@@ -1675,8 +1678,9 @@
+ if (max_payload < dg_size + hdr_type_len[ETH1394_HDR_LF_UF])
+ priv->bc_dgl++;
+ } else {
++ __be64 guid = get_unaligned((u64 *)eth->h_dest);
+ node = eth1394_find_node_guid(&priv->ip_node_list,
+- be64_to_cpu(*(u64*)eth->h_dest));
++ be64_to_cpu(guid));
+ if (!node) {
+ ret = -EAGAIN;
+ goto fail;
diff --git a/debian/patches/series/12 b/debian/patches/series/12
index 6ef5fd69e175..583f0c780d7b 100644
--- a/debian/patches/series/12
+++ b/debian/patches/series/12
@@ -1 +1,2 @@
+ bugfix/sparc/e450-boot-failure.patch
++ bugfix/sparc/eth1394-unaligned-access.patch