linux-kernel-test/drivers
Robert Jarzmik 52c2d9aad4 mtd: docg3 fix in-middle of blocks reads
Corner case reads do not work, and return false data and
ECC. This case is typically seen in a ubifs usage, with a
read of type:
 - docg3 docg3: doc_read_oob(from=14882415, mode=1,
 data=(c30eca40:12), oob=(  (null):0))

This results in the following reads:
 - docg3 docg3: doc_read_data_area(buf=  (null), len=111)
 - docg3 docg3: doc_read_data_area(buf=c30eca40, len=12)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=389)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=0)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=16)

If we suppose that the pages content is :
 - bytes 0 .. 111   : 0x0a
 - bytes 112 .. 255 : 0x0f
Then the returned bytes will be :
 - 111 times 0x0a (correct)
 - 0x0a 2 times and 0x0f 10 times (incorrect, should be
 0x0a,0x0f)
 - 0x0f 389 times (correct)
 - nothing
 - correct OOB

The reason seams that the first 111 bytes read ends between
the 2 docg3 planes, and that the first following read (in
the 12 bytes sequence, read of 16 bit word) returns the byte
of the rightmost plane duplicated in high and lower byte of
the word.

Fix this behaviour by ensuring that if the previous read
ended up in-between the 2 planes, there will be a first 1
byte read to get back to the beginning of leftmost plane.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-29 11:14:51 +03:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-05-05 10:06:06 -07:00
amba ARM: 7366/3: amba: Remove AMBA level regulator support 2012-04-13 14:04:08 +01:00
ata Change summary: 2012-05-03 17:16:52 -07:00
atm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
auxdisplay
base regmap: fix possible memory corruption in regmap_bulk_read() 2012-05-09 15:44:11 +01:00
bcma bcma: use fallback sprom if no on chip sprom is available 2012-04-16 13:32:01 -04:00
block connector/userns: replace netlink uses of cap_raised() with capable() 2012-05-10 23:21:39 -04:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-04-27 15:16:43 -04:00
cdrom
char tty and serial fixes for 3.4-rc2 2012-04-12 15:36:33 -07:00
clk
clocksource Revert "clocksource: Load the ACPI PM clocksource asynchronously" 2012-04-12 00:05:05 +02:00
connector
cpufreq cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS 2012-04-13 17:57:40 -07:00
cpuidle Merge branches 'idle-fix' and 'misc' into release 2012-04-06 21:48:59 -04:00
crypto crypto: talitos - properly lock access to global talitos registers 2012-04-09 15:13:40 +08:00
dca
devfreq
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
edac Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
eisa
firewire Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
firmware efivars: Improve variable validation 2012-05-03 17:19:19 -07:00
gpio gpio/exynos: Fix compiler warnings when non-exynos machines are selected 2012-05-11 18:25:53 -06:00
gpu drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack 2012-05-07 11:02:38 +01:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-04-20 10:39:33 -07:00
hsi HSI: hsi_char: Remove max_data_size from sysfs 2012-04-23 14:23:32 +03:00
hv
hwmon hwmon: (coretemp) Increase CPU core limit 2012-05-01 09:16:14 -07:00
hwspinlock
i2c i2c: mxs: disable QUEUE when sending is done 2012-04-27 16:13:29 +02:00
ide Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
idle simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ieee802154
infiniband A few fixes for regressions introduced in 3.4-rc1: 2012-04-26 15:35:35 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-04-30 10:13:48 -07:00
iommu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
isdn tty and serial fixes for 3.4-rc2 2012-04-12 15:36:33 -07:00
leds drivers/leds: correct __devexit annotations 2012-05-10 15:06:44 -07:00
lguest
macintosh Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-12 12:57:01 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-04-21 12:43:23 -07:00
memstick
message Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mfd mfd: Fix build breakage in omap-usb-host.c 2012-05-01 11:55:04 +02:00
misc Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
mmc Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
mtd mtd: docg3 fix in-middle of blocks reads 2012-05-29 11:14:51 +03:00
net ks8851: Update link status during link change interrupt 2012-05-11 18:23:34 -04:00
nfc
nubus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
of gpio: Fix range check in of_gpio_simple_xlate() 2012-04-10 14:20:56 -06:00
oprofile simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
parisc parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
parport
pci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-05-05 10:06:06 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2012-03-29 16:00:48 -07:00
pinctrl pinctrl: implement pinctrl_check_ops 2012-04-11 09:31:02 +02:00
platform Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-06 12:19:38 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
power Various small bugfixes and enhancements, plus two new drivers: 2012-03-30 16:09:02 -07:00
pps
ps3
ptp
rapidio
regulator regulator: Actually free the regulator in devm_regulator_put() 2012-05-07 13:14:44 +01:00
remoteproc simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
rpmsg
rtc Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-04 15:35:09 -07:00
s390 qeth: Use blkt defaults for OSA Express 4 2012-04-24 00:33:17 -04:00
sbus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scsi [SCSI] virtio_scsi: fix TMF use-after-free 2012-05-10 08:27:06 +01:00
sfi
sh SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
sn
spi spi/spi-bfin5xx: Fix flush of last bit after each spi transfer 2012-04-27 12:20:39 -06:00
ssb
staging staging: ozwpan: Fix bug where kfree is called twice. 2012-04-26 12:40:53 -07:00
target target: Drop incorrect se_lun_acl release for dynamic -> explict ACL conversion 2012-05-11 14:55:19 -07:00
tc
thermal
tty TTY fix for 3.4-rc5 2012-05-02 13:47:49 -07:00
uio
usb USB: ehci-tegra: remove redundant gpio_set_value 2012-05-01 14:11:51 -04:00
uwb uwb: fix error handling 2012-04-18 13:15:51 -07:00
vhost vhost-net: fix handle_rx buffer size 2012-05-11 18:16:57 -04:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-12 12:57:01 -07:00
virt
virtio virtio_balloon: fix handling of PAGE_SIZE != 4k 2012-04-15 11:51:06 +03:00
vlynq
w1
watchdog hpwdt: Only BYTE reads/writes to WD Timer port 0x72 2012-04-26 14:38:07 +02:00
xen xen/Kconfig: fix Kconfig layout 2012-05-07 12:26:28 -04:00
zorro
Kconfig Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00
Makefile Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00