aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* [MTD NAND] Modify check for modules registering NAND devices without ->ownerDavid Woodhouse2006-05-14
| | | | | | | | Make it work even with compilers which lack the wit to notice that THIS_MODULE is always non-NULL. Use #ifdef MODULE instead. It's only a temporary debugging check anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Remove gratuitous inclusion of ARM-only header from physmap.cDavid Woodhouse2006-05-14
| | | | | | | | | The physmap platform driver conversion added to physmap.c an include of asm/mach/flash.h which is 1) ARM-specific; and 2) isn't actually necessary. Remove it. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtdDavid Woodhouse2006-05-13
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Deal correctly with NOR chips which are smaller than the map windowDavid Woodhouse2006-05-13
| | | | | | | | | | | | We used to calculate the number of chips to be zero, allocate an array of that size, then nasty things would happen when we attempt to access the first object in that zero-sized array. Now, if the number of _full_ chips that would fit into the map is zero, we allocate an array of one anyway, and then artificially reduce the total size of the resulting MTD device to fit in the map. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mtd: fix memory leak in block2mtd_setup()Jesper Juhl2006-05-13
| | | | | | | | | | | | | There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup() We can leak 'name' allocated with kmalloc in 'parse_name' if leave via the 'parse_err' macro since it contains a return but doesn't do any freeing. Spotted by coverity checker as bug 615. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix module refcounting in NAND board drivers.David Woodhouse2006-05-13
| | | | | | | | | The _board_ driver needs to be mtd->owner, and it in turn pins the nand.ko module. Fix them all to actually do that, and fix nand.ko not to overwrite it -- and also to check that the caller sets it, if the caller is a module. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mtd: fix memory leaks in phram_setupJesper Juhl2006-05-13
| | | | | | | | | | | | | | There are two code paths in drivers/mtd/devices/phram.c::phram_setup() that will leak memory. Memory is allocated to the variable 'name' with kmalloc() by the parse_name() function, but if we leave by way of the parse_err() macro, then that memory is never kfree()'d, nor is it ever used with register_device() so it won't be freed later either - leak. Found by the Coverity checker as #593 - simple fix below. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Indent all of drivers/mtd/nand/*.c.David Woodhouse2006-05-13
| | | | | | It was just too painful to deal with. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Reduce paranoia level when scanning for bad blocks on virgin chipsDavid Woodhouse2006-05-13
| | | | | | | | We were scanning for 0xFF through the entire chip -- which takes a while when it's a 512MiB device as I have on my current toy. The specs only say we need to check certain bytes -- so do only that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Update CS553x NAND driver: Hardware ECC support, optimisations.David Woodhouse2006-05-12
| | | | | | | | | | | | | - Implement HW ECC support, - Provide read_buf() and write_buf() routines using memcpy - Use on-flash bad block table - Fix module refcounting - Avoid read/modify/write in hwcontrol() - Minor cosmetic fixes Partly based on code and ideas from Tom Sylla <tom.sylla@amd.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Use vmalloc for buffer when scanning for bad blocks.David Woodhouse2006-05-12
| | | | | | These new chips have 128KiB blocks. Don't try to kmalloc that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Trivial typo fixes in Kconfig files (MTD).Egry Gábor2006-05-12
| | | | | Signed-off-by: Egry Gábor <gaboregry@t-online.hu> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* OneNAND: fix block command typoKyungmin Park2006-05-12
| | | | | | We need to check block cmd only instead with comparing with cmd Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: One-Time Programmable (OTP) supportKyungmin Park2006-05-12
| | | | | | | | | | | | | | One Block of the NAND Flash Array memory is reserved as a One-Time Programmable Block memory area. Also, 1st Block of NAND Flash Array can be used as OTP. The OTP block can be read, programmed and locked using the same operations as any other NAND Flash Array memory block. OTP block cannot be erased. OTP block is fully-guaranteed to be a valid block. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Handle erase correctly in Double Density Package (DDP)Kyungmin Park2006-05-12
| | | | | | | There's erase bug in DDP. We need to add DDP select in erase Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Write oob area with aligned size, mtd->oobsizeKyungmin Park2006-05-12
| | | | | | | | There's some problem with write oob in serveral platform. So we write oob with oobsize aligned (16bytes) instead of 3 bytes (from {2, 3}) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Add write_oob verify functionKyungmin Park2006-05-12
| | | | Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
* OneNand: Fix free byte positions.Jarkko Lavinen2006-05-12
| | | | | | | | Some free byte positions at onenand_oob_64 were wrong. This was also reported by Christian Lehne. 3 byte slots are at 2+16*i and 2 byte slots at 14+16*i. Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
* OneNAND: handle byte access on BufferRAMKyungmin Park2006-05-12
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Add touch_softlock_watchdog()Kyungmin Park2006-05-12
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] Fix invalid default value of CONFIG_MTD_PCMCIA_ANONYMOUS in KconfigJean-Luc Leger2006-05-12
| | | | | | | | | | Default values for boolean and tristate options can only be 'y', 'm' or 'n'. This patch removes wrong default for MTD_PCMCIA_ANONYMOUS. Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix capitalisation in export of old doc2001.c initfuncDavid Woodhouse2006-05-12
| | | | | | | | | | | | | Oops. Stupid StudlyCaps. Again. This driver is doubly-deprecated because is was subsumed into doc2000.c and _also_ we want people to start using the new NAND wrapper for these devices anyway. But ISTR there was still one person using it because something didn't work for them. Must chase that up and then I can kill this. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chipDavid Woodhouse2006-05-11
| | | | | | | This lacks hardware ECC support and a few optimisations we're going to want fairly soon, but it works well enough to mount and use JFFS2. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix capitalisation in export of DiskOnChip Millennium initfuncDavid Woodhouse2006-05-10
| | | | | | Stupid StudlyCaps. Who did that? Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Export cfi_cmdset_0020 and cfi_cmdset_0002 with EXPORT_SYMBOL_GPLDavid Woodhouse2006-05-08
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Remove use of inter_module_crap in NOR flash chip drivers.David Woodhouse2006-05-08
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Fix non-modular case for DiskOnChip probeDavid Woodhouse2006-05-08
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Remove inter_module_xxx() from DiskOnChip drivers.David Woodhouse2006-05-08
| | | | | | Finally putting it back how it was before Keith got at it -- yay :) Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Convert physmap to platform driverLennert Buytenhek2006-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | After dwmw2 let me know it ought to be done, I rewrote the physmap map driver to be a platform driver. I know zilch about the driver model, so I probably botched it in some way, but I've done some tests on an ixp23xx board which uses physmap, and it all seems to work. In order to not break existing physmap users, I've added some compat code that will instantiate a platform device iff CONFIG_MTD_PHYSMAP_LEN is defined and != 0. Also, I've changed the default value for CONFIG_MTD_PHYSMAP_LEN to zero, so that people who inadvertently compile in physmap (or new, platform-style, users of physmap) don't get burned. This works pretty well -- the new physmap driver is a drop-in replacement for the old one, and works on said ixp23xx board without any code changes needed. (This should hold as long as users don't touch 'physmap_map' directly.) Once all physmap users have been converted to instantiate their own platform devices, the compat code can go. (Or we decide that we can change all the in-tree users at the same time, and never merge the compat code.) Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'master' of ↵David Woodhouse2006-05-03
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * forcedeth: fix multi irq issuesAyaz Abdulla2006-05-02
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the issues with multiple irqs. I am resending based on feedback. I decoupled the dma mask for consistent memory and fixed leak with multiple irq in error path. Thanks to Manfred for catching the spin lock problem. Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
| * [PATCH] via-rhine: zero pad short packets on Rhine I ethernet cardsCraig Brind2006-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Rhine I cards disclosing fragments of previously transmitted frames in new transmissions. Before transmission, any socket buffer (skb) shorter than the ethernet minimum length of 60 bytes was zero-padded. On Rhine I cards the data can later be copied into an aligned transmission buffer without copying this padding. This resulted in the transmission of the frame with the extra bytes beyond the provided content leaking the previous contents of this buffer on to the network. Now zero-padding is repeated in the local aligned buffer if one is used. Following a suggestion from the via-rhine maintainer, no attempt is made here to avoid the duplicated effort of padding the skb if it is known that an aligned buffer will definitely be used. This is to make the change "obviously correct" and allow it to be applied to a stable kernel if necessary. There is no change to the flow of control and the changes are only to the Rhine I code path. The patch has run on an in-service Rhine-I host without incident. Frames shorter than 60 bytes are now correctly zero-padded when captured on a separate host. I see no unusual stats reported by ifconfig, and no unusual log messages. Signed-off-by: Craig Brind <craigbrind@gmail.com> Signed-off-by: Roger Luethi <rl@hellgate.ch> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [PATCH] mv643xx_eth: provide sysfs class device symlinkOlaf Hering2006-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sat, Mar 11, Olaf Hering wrote: > Why is the /sys/class/net/eth0/device symlink not created for the > mv643xx_eth driver? Does this work for other platform device drivers? > Seems to work for the ps2 keyboard at least. The SET_NETDEV_DEV has to be done before a call to register_netdev. With the new patch below, the device symlink for the platform device was created. Unfortunately, after the 4 ls commands, the network connection died. No idea if the box crashed or if something else broke, lost remote access. Provide sysfs 'device' in /class/net/ethN Also, set module owner field, like pcnet32 driver does. Signed-off-by: Olaf Hering <olh@suse.de> Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * Merge branch 'for-linus' of ↵Linus Torvalds2006-05-01
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/ipath: tidy up white space in a few files IB/ipath: fix label name in interrupt handler IB/ipath: improve sparse annotation IB/ipath: simplify IB timer usage IB/ipath: simplify RC send posting IB/ipath: prevent hardware from being accessed during reset IB/ipath: fix verbs registration IB/ipath: change handling of PIO buffers IB/ipath: iterate over correct number of ports during reset IB/ipath: set up 32-bit DMA mask if 64-bit setup fails IB/ipath: fix race with exposing reset file IB/mthca: Fix offset in query_gid method
| | * IB/ipath: tidy up white space in a few filesBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: fix label name in interrupt handlerBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | Names that are the opposite of their intended meanings are not so helpful. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: improve sparse annotationBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: simplify IB timer usageBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: simplify RC send postingBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | Remove some unnecessarily complicated tests. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: prevent hardware from being accessed during resetBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | The reset code now turns off the PRESENT flag during a reset, so that other code won't attempt to access a device that's in mid-reset. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: fix verbs registrationBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | Remember when the verbs layer unregisters from the lower-level code. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: change handling of PIO buffersBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Different ipath hardware types have different numbers of buffers available, so we decide on the counts ourselves unless we are specifically overridden with a module parameter. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: iterate over correct number of ports during resetBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: set up 32-bit DMA mask if 64-bit setup failsBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | Some systems do not set up 64-bit maps on systems with 2GB or less of memory installed, so we have to fall back to trying a 32-bit setup. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/ipath: fix race with exposing reset fileBryan O'Sullivan2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | We were accidentally exposing the "reset" sysfs file more than once per device. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| | * IB/mthca: Fix offset in query_gid methodRoland Dreier2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GuidInfo records have 8 byte GUIDs in them, so an index should be multiplied by 8 to get an offset. mthca_query_gid() was incorrectly multiplying by 16. Noticed by Leonid Keller <leonid@mellanox.co.il>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [PATCH] genrtc: fix read on 64-bit platformsAtsushi Nemoto2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix genrtc's read() routine for 64-bit platforms. Current gen_rtc_read() stores 64bit integer and returns 8 even if an user tried to read a 32bit integer. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] RTC: rtc-dev tweak for 64-bit kernelAtsushi Nemoto2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make rtc-dev work well on 64-bit platforms with 32-bit userland. On those platforms, users might try to read 32-bit integer value. This patch make rtc-dev's read() work well for both "int" and "long" size. This tweak is came from genrtc driver. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] s390: fix ipd handlingHeiko Carstens2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Paulo Marques <pmarques@grupopie.com> MAX_IPD_TIME is by a factor of ten too small. Since this means that we allow ten times more IPDs in the intended time frame this could result in a cpu check stop of a physical cpu. Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] Altix: correct ioc3 port orderPat Gefre2006-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently loading the ioc3 as a module will cause the ports to be numbered in reverse order. This mod maintains the proper order of cards for port numbering. Signed-off-by: Patrick Gefre <pfg@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>