summaryrefslogtreecommitdiffstats
path: root/target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-15 12:56:39 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-15 12:56:39 +0000
commit47fedb5947414d3b46786a94186b123295ba0f48 (patch)
tree66f5f78c1b6ca8383418b4cd3f5444c4f4716459 /target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch
parent474e65cbab6cad7dbf74b7cb62acb02aa12403a3 (diff)
[rb532] add 2.6.28 patches and kernel config
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14884 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch')
-rw-r--r--target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch b/target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch
new file mode 100644
index 000000000..7a25bcb68
--- /dev/null
+++ b/target/linux/rb532/patches-2.6.28/006-pata_rb532_cf_fix_prototype.patch
@@ -0,0 +1,19 @@
+Per definition, this function should return the number of bytes
+consumed. Also take care of the unlikely case when buflen is not a
+multiple of four; while transferring, the division cuts the remaining
+bytes, so alter the return value accordingly.
+
+Signed-off-by: Phil Sutter <n0-1@freewrt.org>
+---
+diff -urN linux-2.6.28.7/drivers/ata/pata_rb532_cf.c linux-2.6.28.7.new/drivers/ata/pata_rb532_cf.c
+--- linux-2.6.28.7/drivers/ata/pata_rb532_cf.c 2009-03-15 13:29:09.000000000 +0100
++++ linux-2.6.28.7.new/drivers/ata/pata_rb532_cf.c 2009-03-15 13:29:46.000000000 +0100
+@@ -88,7 +88,7 @@
+ readsl(ioaddr, buf, buflen / sizeof(u32));
+
+ rb532_pata_finish_io(adev->link->ap);
+- return retlen;
++ return buflen - (buflen % sizeof(u32));;
+ }
+
+ static void rb532_pata_freeze(struct ata_port *ap)