aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-12-26UBI: add some more commentsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: tweak volumes lockingArtem Bityutskiy
Transform vtbl_mutex to volumes_mutex - this just makes code easier to understand. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: improve internal interfacesArtem Bityutskiy
Pass volume description object to the EBA function which makes more sense, and EBA function do not have to find the volume description object by volume ID. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: bugfix: dont oops with NULL module parameterArtem Bityutskiy
E.g., it oopsed in case of: modprobe ubi mtd = 0 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: remove ubi_devices_cntArtem Bityutskiy
This global variablea is not really needed, remove it Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: create ubi_wl_entry slab on initializationArtem Bityutskiy
Similarly to ltree_entry_slab, it makes more sense to create and destroy ubi_wl_entry slab on module initialization/exit. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: create ltree_entry slab on initializationArtem Bityutskiy
Since the ltree_entry slab cache is a global entity, which is used by all UBI devices, it is more logical to create it on module initialization time and destro on module exit time. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: improve error messagesArtem Bityutskiy
Always print error code with error messages, sometimes it is extremely helpful info. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: remove redundant fieldArtem Bityutskiy
Remove redundant ubi->major field - we have it in ubi->cdev.dev already. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: minor tidy-upsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: silence a warningJesper Juhl
This patch silences the following warning : drivers/mtd/ubi/vmt.c:73: warning: 'ret' may be used uninitialized in this function gcc can't see that we always initialize ret in all situations where it is actually used. The one case where it's not initialized is when we BUG(), but gcc doesn't know that we won't then continue and use an uninitialized 'ret'. This patch results in code that does exactely the same as before, but it also makes gcc shut up, so we generate one less line of warning noise. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: add ubi_leb_map interfaceArtem Bityutskiy
The idea of this interface belongs to Adrian Hunter. The interface is extremely useful when one has to have a guarantee that an LEB will contain all 0xFFs even in case of an unclean reboot. UBI does have an 'ubi_leb_erase()' call which may do this, but it is stupid and ineffecient, because it flushes whole queue. I should be re-worked to just be a pair of unmap, map calls. The user of the interfaci is UBIFS at the moment. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: bugfix: allocate mandatory EBs firstArtem Bityutskiy
First allocate the necessary eraseblocks, then the optional ones. Otherwise it allocates all PEBs for bad EB handling, and fails on then following EBA LEB allocation. Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: fix error code in ubi_io_read()Artem Bityutskiy
When NAND detects an ECC error, it returns -EBADMSG. It does not stop reading requested data if one page has an ECC error, it keeps going and reads all the requested data. If it fails to read all the data, it does not return -EBADMSG, but returns the error code which reflects the reason of the failure. But some drivers may have bugs (e.g., OneNAND had) and stop reading after the first ECC error, so it returns -EBADMSG. In turn, UBI propagates this up to the caller. The caller will treat this as "all the requested data was read, but there was an ECC error". So we change the error code to -EIO if it is -EBADMSG and the read length is less then the requested length. We also add an assertion, so if UBI debugging is enabled, UBI will bug. Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-03[MTD] mtdoops cleanupPeter Korsgaard
Use memcpy instead of open coding a copy loop. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] mtdoops: Document usage in KconfigPeter Korsgaard
Add usage instructions to Kconfig for mtdoops driver. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NAND] Marvell Orion device bus NAND controllerTzachi Perelstein
Driver for the device bus NAND controller in the Marvell Orion family of ARM SoCs. Signed-off-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Jörn Engel <joern@logfs.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Attempt to clean up the JEDEC unlock address confusionDavid Woodhouse
Use a single unlock address, adjust it for the device type in the knowledge that it'll be adjusted back again. This has the desirable effect of masking out the least significant bit of the address for x16 devices. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Fix overflow check in jedec_probeDavid Woodhouse
Having laid the code out so that it's easier to read instead of sticking to the 80-column guideline even when it doesn't make sense, a bug is immediately spotted... we were only checking _one_ of the unlock addresses to see if it runs off the end of the map. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Clean up jedec_probe, remove unlock address arraysDavid Woodhouse
This should have no functional effects -- we've been ignoring all but the first address in the array for a long time, and using it only to indicate which device types are supported. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] Always initialise mutex in new mtd_blktrans_dev.David Woodhouse
We were only initialising the mutex in the case where the new device was automatically allocated the highest minor number. If the caller specified a minor number, or if it filled in a free slot which was made by a previous device deregistering, the mutex wouldn't get initialised when we jumped out of the loop. Reported by Monte Copeland <catboat@texas.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-29[MTD] [NAND] pasemi_nand driverEgor Martovetsky
Plumbing for NAND connected via localbus on PA Semi PWRficient-based boards. From: Egor Martovetsky <egor@pasemi.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] [NAND] S3C2410 correctly set nFCE over resumeBen Dooks
Ensure the nFCE line is de-asserted over suspend and then re-initialised when the system resumes. This is to ensure that the NAND is kept in lowest power mode over suspend (power settings are only specified for nFCE inactive) as well as fixing the Simtec Osiris which relies on nFCE being inactive. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] fix CONFIG_MTD_SHARP_SL if CONFIG_MTD=m Stanislav Brabec
Sharp Zaurus SL-C3200 with CONFIG_MTD=m and CONFIG_MTD_SHARP_SL=y (as it is bool) lost support for the ROM flash. With CONFIG_MTD=y it has no problems. It is caused by losing of compiled code of drivers/mtd/maps/sharpsl-flash.o. It was linked to drivers/mtd/maps/built-in.o and drivers/mtd/built-in.o, but lost and not linked to drivers/built-in.o (because CONFIG_MTD!=y). Patch below fixes this problem by creating sharpsl-flash.ko (and the code works correctly as a module). Signed-off-by: Stanislav Brabec <utx@penguin.cz> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] mtd_dataflash: Incorrect compare-after-write checkAndrew Victor
After writing to a Dataflash page, the built-in compare operation is used to check that the page was successfully written. A logic bug in checking the results of the comparison currently causes the compare to never fail. This bug was originally in the legacy at91_dataflash.c driver. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-26[MTD] [NOR] Prevent erase command invocation on suspended chipAlexander Belyakov
while running stress tests we have met cfi_cmdset_0001.c driver issue. Working on multipartitional devices with erase suspend on write feature enabled it is possible to get erase operation invoked on chip with suspended erase. get_chip() looses information about earlier suspended erase and new erase operation gets issued. New erase operations report successful completion, but blocks remain dirty causing, for example, JFFS2 error messages like: ... Newly-erased block contained word 0x20031985 at offset 0x00200000 Newly-erased block contained word 0x20031985 at offset 0x00280000 Newly-erased block contained word 0x20031985 at offset 0x00240000 ... The patch below fixes that issue. Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-26[MTD] [OneNAND] Do not stop reading for ECC errorsAdrian Hunter
When an ECC error occurs, the read should be completed anyway before returning -EBADMSG. Returning -EBADMSG straight away is incorrect. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-23[MTD] [NOR] Support Intel P3x flash support with CFI version 1.5Alexey Korolev
Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-09[MTD] [NOR] Add support for the SST 39VF1601 flash chipDavid Howells
Add support for the SST 39VF1601 flash chip. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30[MTD] [NOR] More CFI fixups for Atmel chipsHans-Christian Egtvedt
Convert CFI tables from Atmel cmdset_0001 chips to Intel format and set BufWrite timeouts to 0 for Atmel cmdset_0001 and cmdset_0002 chips. Some chips may indicate support for buffered writes even though they only support dual-word writes. The CFI fixup must run before fixup_use_write_buffers for this to work. Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30MTD: small physmap_of partition parsing fixesValentine Barshak
Use of_get_next_child for proper ref counting as suggested by Stephen Rothwell and remove add_mtd_partitions from parse_partitions to avoid duplicate mtd device registration for RedBoot partitions. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Heckled-for-on-IRC-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30[MTD] [NAND] Add Blackfin BF52x support in bf5xx_nand driverMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28[MTD] Skip bad blocks when checking for RedBoot partition tableDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28[MTD] [NAND] Check for RedBoot partitions on CAFÉ NANDDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: ide: add SH-S202J to ivb_list[] drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n hpt366: fix build for CONFIG_HOTPLUG=n cy82c693: fix build for CONFIG_HOTPLUG=n
2007-10-27cirrusfb nonsenseAl Viro
(pointer > 0) is deeply weird; (pointer >= 0) is even dumber... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27scatterlist fallout: mmcAl Viro
#include <scatterlist/scatterlist.h> is an odd thing to do... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27ide/arm/icside: fallout from commit 86f3a492bb09eee5745b93af35f2212179c251fdAl Viro
struct device doesn't have ->dma; it's in struct expansion_card where that struct device is embedded into. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mmc_spi: Fix mmc-over-spi regression mmc: use common byte swap macros mmc: fix cid and csd byte order at91_mci: Fix bad reference
2007-10-27mmc_spi: Fix mmc-over-spi regressionDavid Brownell
Patch 49dce689ad4ef0fd1f970ef762168e4bd46f69a3 changed the sysfs data structures for SPI in a way which broke the MMC-over-SPI host driver. This patch fixes that regression by changing the scheme used to keep from knowingly trying to use a shared bus segment, and updates the adjacent comments slightly to better explain the issue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27mmc: use common byte swap macrosPierre Ossman
Use the more generic byte swapping macros instead of the socket variants. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27mmc: fix cid and csd byte orderPierre Ossman
MMC over SPI sends the CID and CSD registers as data, not responses, which means that the host driver won't do the necessary byte flipping for us. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27at91_mci: Fix bad referencePierre Ossman
The flags parameter got removed in a previous commit, but some references were overlooked. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27[CRYPTO] users: Fix up scatterlist conversion errorsHerbert Xu
This patch fixes the errors made in the users of the crypto layer during the sg_init_table conversion. It also adds a few conversions that were missing altogether. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26[NET]: Marking struct pernet_operations __net_initdata was inappropriateEric W. Biederman
It is not safe to to place struct pernet_operations in a special section. We need struct pernet_operations to last until we call unregister_pernet_subsys. Which doesn't happen until module unload. So marking struct pernet_operations is a disaster for modules in two ways. - We discard it before we call the exit method it points to. - Because I keep struct pernet_operations on a linked list discarding it for compiled in code removes elements in the middle of a linked list and does horrible things for linked insert. So this looks safe assuming __exit_refok is not discarded for modules. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26ide: add SH-S202J to ivb_list[]Bartlomiej Zolnierkiewicz
From the report by Nick Warne. Tested-by: Nick Warne <nick@ukfsn.org> Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-26drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warningsJeff Garzik
* We shouldn't bother with dev->current_state, the PCI API functions we call manage this for us (and do a far better job at it too). * Remove pci_set_power_state(dev, PCI_D0) call in resume, as pci_enable_device() does the same thing. * Check pci_enable_device() return value. If it failed, fail the entire resume and avoid programming timings into the [potentially dead/asleep] chip. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-26drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz
It turns out that const and __{dev}initdata cannot be mixed currently and that generic IDE PCI host driver is also affected by the same issue: On Thursday 25 October 2007, Ralf Baechle wrote: > CC drivers/ide/pci/generic.o > drivers/ide/pci/generic.c:52: error: __setup_str_ide_generic_all_on causes a > +section type conflict [ Also reported by Martijn Uffing <mp3project@sarijopen.student.utwente.nl>. ] This patch workarounds the problem in a bit hackish way but without removing const from generic_chipsets[] (it adds const to __setup() so __setup_str_ide_generic_all becomes const). Now all __{dev}initdata data in generic IDE PCI host driver are read-only so it builds again (driver's .init.data section gets marked as READONLY). Cc: Martijn Uffing <mp3project@sarijopen.student.utwente.nl> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-26hpt366: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz
On Saturday 20 October 2007, Avuton Olrich wrote: > My randconfig script the attached config caught an error on: > drivers/ide/pci/cy82c693.c:439: error: primary causes a section type conflict > > My git tree: c00046c279a2521075250fad682ca0acc10d4fd7 > > Bisected to: > 8562043606430185cad26d085d46adcc7ad67fd1 is first bad commit > commit 8562043606430185cad26d085d46adcc7ad67fd1 > Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Date: Sat Oct 20 00:32:34 2007 +0200 > > ide: constify struct ide_port_info > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> It turns out that const and __{dev}initdata cannot be mixed currently and that hpt366 host driver is also affected by the same issue: > drivers/ide/pci/hpt366.c:1428: error: hpt366_chipsets causes a section type > conflict This patch workarounds the problem by making static struct hpt_info instances const. Now all __devinitdata data in hpt366 host driver are read-only so it builds again (driver's .init.data section gets marked as READONLY). While at it: * Bump driver version. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: "Avuton Olrich" <avuton@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-26cy82c693: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz
On Saturday 20 October 2007, Avuton Olrich wrote: > My randconfig script the attached config caught an error on: > drivers/ide/pci/cy82c693.c:439: error: primary causes a section type conflict > > My git tree: c00046c279a2521075250fad682ca0acc10d4fd7 > > Bisected to: > 8562043606430185cad26d085d46adcc7ad67fd1 is first bad commit > commit 8562043606430185cad26d085d46adcc7ad67fd1 > Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Date: Sat Oct 20 00:32:34 2007 +0200 > > ide: constify struct ide_port_info > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> It turns out that const and __{dev}initdata cannot be mixed currently. This patch workarounds the problem by removing __devinitdata tag from 'primary' variable (which makes 'primary' to be moved from .init.data to .bss section). Now all __devinitdata data in cy82c693 host driver are read-only so it builds again (driver's .init.data section gets marked as READONLY). While at it: * Move 'primary' variable to its only user, init_iops_cy82c693(). * Bump driver version. Cc: "Avuton Olrich" <avuton@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>