diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-11-15 23:15:58 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-11-15 23:15:58 +0000 |
commit | f7d2258cfbea08236098a38142bfae3d616d6a78 (patch) | |
tree | 873fdd8f5aa73c58191e88b2930a61ae0a44b213 /target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch | |
parent | eab51e2e0d43981f864c048eaed99d2ecf87f540 (diff) |
Add 2.6.27 support to rb532, nand is not recognized, needs to be sorted out
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13224 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch')
-rw-r--r-- | target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch b/target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch new file mode 100644 index 000000000..1a7cbd0ef --- /dev/null +++ b/target/linux/rb532/patches-2.6.27/006-pata_rb532_cf_fix_prototype.patch @@ -0,0 +1,35 @@ +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> +--- + drivers/ata/pata_rb532_cf.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c +index b919012..95a0d66 100644 +--- a/drivers/ata/pata_rb532_cf.c ++++ b/drivers/ata/pata_rb532_cf.c +@@ -75,7 +75,7 @@ static void rb532_pata_exec_command(struct ata_port *ap, + rb532_pata_finish_io(ap); + } + +-static void rb532_pata_data_xfer(struct ata_device *adev, ++static unsigned int rb532_pata_data_xfer(struct ata_device *adev, + unsigned char *buf, unsigned int buflen, int write_data) + { + struct ata_port *ap = adev->link->ap; +@@ -87,6 +87,7 @@ static void rb532_pata_data_xfer(struct ata_device *adev, + readsl(ioaddr, buf, buflen / sizeof(u32)); + + rb532_pata_finish_io(adev->link->ap); ++ return buflen - (buflen % sizeof(u32)); + } + + static void rb532_pata_freeze(struct ata_port *ap) +-- +1.5.6.4 + + |