aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* Merge branch 'upstream' of git://git.infradead.org/~dedekind/ubi-2.6Linus Torvalds2007-07-18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://git.infradead.org/~dedekind/ubi-2.6: (28 commits) UBI: fix compile warning UBI: fix error handling in erase worker UBI: fix comments UBI: remove unneeded error checks UBI: cleanup usage of try_module_get UBI: fix overflow bug UBI: bugfix in max_sqnum calculation UBI: bugfix in sqnum calculation UBI: fix signed-unsigned multiplication UBI: fix bug in atomic_leb_change() UBI: fix message UBI: fix debugging stuff UBI: bugfix in error path UBI: use is_power_of_2() UBI: fix freeing ubi->vtbl while unloading UBI: fix MAINTAINERS UBI: bugfix in ubi_leb_change() UBI: kill homegrown endian macros UBI: cleanup ioctl handling UBI: error path bugfix ...
| * UBI: fix compile warningPaul Mundt2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | cdev.c whines in current git: drivers/mtd/ubi/cdev.c: In function `major_to_device': drivers/mtd/ubi/cdev.c:67: warning: control reaches end of non-void function Shut it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix error handling in erase workerArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | Do not switch to read-only mode in case of -EINTR and some other obvious cases. Switch to RO mode only when we do not know what is the error. Reported-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix commentsArtem Bityutskiy2007-07-18
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: remove unneeded error checksArtem Bityutskiy2007-07-18
| | | | | | | | | | | | Pointed to by viro. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup usage of try_module_getFernando Luis Vázquez Cao2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not offer real protection against unexpected driver unloads, since we could be preempted before try_modules_get gets executed. It is the caller who should manipulate the refcounts. Besides, ubi_get_device_info is an exported symbol which guarantees protection when accessed through symbol_get. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix overflow bugVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was experiencing overflows in multiplications for volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes. vol->used_bytes is long long however its 2 operands vol->used_ebs & vol->usable_leb_size are int. So their multiplication for larger values causes integer overflows. Typecasting them solves the problem. My machine & flash details: 64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3. mtd size = 6GB, volume size= 5GB, peb_size = 4MB. heres patch which does the fix. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in max_sqnum calculationArtem Bityutskiy2007-07-18
| | | | | | | | | | | | Do not zero max_sqnum after a new volume has been found. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in sqnum calculationBrijesh Singh2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Hi,I came across problem of having two leb with same sequence no.This happens when we continuously write one block again and again and reboot machine before background thread erases those blocks. The problem here was,when we find two blocks with same sequence no,we take the higher one,but we were not updating max seq no,so next block may have the same seqnum. This patch solves this problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix signed-unsigned multiplicationBrijesh Singh2007-07-18
| | | | | | | | | | | | | | | | | | There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix bug in atomic_leb_change()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | atomic_leb_change() is only allowed for dynamic volumes, so set the volume type correctly. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix messageVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | Increase UBI devices couter after the message, not before. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix debugging stuffArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Do not check volumes which are currently in use because thay may be in inconsistent state. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in error pathArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | When volume creation fails, we have to set ubi->volumes[vol_id] back to NULL. This patch also tweaks some debugging stuff. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use is_power_of_2()Vignesh Babu2007-07-18
| | | | | | | | | | | | | | | | Replacing (n & (n-1)) in the context of power of 2 checks with is_power_of_2 Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix freeing ubi->vtbl while unloadingVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | | | ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(), but it is freed in build.c with kfree() Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in ubi_leb_change()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Do not call 'ubi_wl_put_peb()' if the LEB was unmapped. Reported-by: Gabor Loki <loki@inf.u-szeged.hu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: kill homegrown endian macrosChristoph Hellwig2007-07-18
| | | | | | | | | | | | | | | | Kill UBI's homegrown endianess handling and replace it with the standard kernel endianess handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup ioctl handlingChristoph Hellwig2007-07-18
| | | | | | | | | | | | | | | | - don't do access_ok + get/put user but use the proper macro - remove useless checks Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: error path bugfixArtem Bityutskiy2007-07-18
| | | | | | | | | | | | No need to unlock the lock, this will be done at out_unlock. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: minor comma fixArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use coma at the the last elements of structure initializer. Daniel Stone's explanation: Because it turns: - .attr = foo + .attr = foo, + .bar = baz into: + .bar = baz, i.e., far less likely to screw up a merge. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use vmalloc for large buffersArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | UBI allocates temporary buffers of PEB size, which may be 256KiB. Use vmalloc instead of kmalloc for such big temporary buffers. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: add few more commentsArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Add few comments above ubi_scan_add_used() to explain why it is so complex. Requested by Satyam Sharma <satyam.sharma@gmail.com>. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: set correct gluebi device sizeArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | In case of static volumes, make emulated MTD device size to be equivalent to data size, rather then volume size. Reported-by: John Smith <john@arrows.demon.co.uk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: do not let to read too muchArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | In case of static volumes it is prohibited to read more data then available. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix error path in create_vtbl()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | | | | | There were several bugs in volume table creation error path. Thanks to Satyam Sharma <satyam.sharma@gmail.com> and Florin Malita <fmalita@gmail.com> for finding and analysing them: http://lkml.org/lkml/2007/5/3/274 This patch makes ubi_scan_add_to_list() static and renames it to add_to_list(), just because it is not needed outside scan.c anymore. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix dereference after kfreeFlorin Malita2007-07-18
| | | | | | | | | | | | | | | | Coverity (CID 1614) spotted new_seb being dereferenced after kfree() in create_vtbl's write_error path. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix memory leak in checking codeArtem Bityutskiy2007-07-18
| | | | | | | | | | Reported-by: Eric Sesterhenn / Snakebyte <snakebyte@gmx.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* | Merge branch 'master' of ↵Linus Torvalds2007-07-18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) [NETFILTER]: xt_connlimit needs to depend on nf_conntrack [NETFILTER]: ipt_iprange.h must #include <linux/types.h> [IrDA]: Fix IrDA build failure [ATM]: nicstar needs virt_to_bus [NET]: move __dev_addr_discard adjacent to dev_addr_discard for readability [NET]: merge dev_unicast_discard and dev_mc_discard into one [NET]: move dev_mc_discard from dev_mcast.c to dev.c [NETLINK]: negative groups in netlink_setsockopt [PPPOL2TP]: Reset meta-data in xmit function [PPPOL2TP]: Fix use-after-free [PKT_SCHED]: Some typo fixes in net/sched/Kconfig [XFRM]: Fix crash introduced by struct dst_entry reordering [TCP]: remove unused argument to cong_avoid op [ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a Kconfig variable [ATM]: [drivers] ioremap balanced with iounmap [ATM]: [lanai] sram_test_word() must be __devinit [ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro. [ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS. [ATM]: Replacing kmalloc/memset combination with kzalloc. [NET]: gen_estimator deadlock fix ...
| * | [ATM]: nicstar needs virt_to_busStephen Rothwell2007-07-18
| | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [PPPOL2TP]: Reset meta-data in xmit functionPatrick McHardy2007-07-18
| | | | | | | | | | | | | | | | | | | | | Reset netfilter data and IP CB, fix dst_entry leak. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [PPPOL2TP]: Fix use-after-freePatrick McHardy2007-07-18
| | | | | | | | | | | | | | | | | | | | | Don't use skb->len after passing it to ip_queue_xmit. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a ↵Robert P. J. Day2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | Kconfig variable Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: chas williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [ATM]: [drivers] ioremap balanced with iounmapAmol Lad2007-07-18
| | | | | | | | | | | | | | | | | | Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: chas williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [ATM]: [lanai] sram_test_word() must be __devinitAdrian Bunk2007-07-18
| | | | | | | | | | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: chas williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro.Robert P. J. Day2007-07-18
| | | | | | | | | | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: chas williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [BNX2]: Update version to 1.6.3.Michael Chan2007-07-18
| | | | | | | | | | | | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [BNX2]: Use constants for stats ticks.Michael Chan2007-07-18
| | | | | | | | | | | | | | | | | | | | | Change all stats related magic numbers to constants. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [BNX2]: Add delay before reading firmware version.Michael Chan2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The management firmware may still be loading during bnx2_init_one() because of the D3hot -> D0 transition and the firmware version may not be available without waiting a bit. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [BNX2]: Support NVRAM on 5709.Michael Chan2007-07-18
| |/ | | | | | | | | | | | | | | | | | | | | The NVRAM interface is slightly modified on the 5709. To properly support it, we need to change the buffered flag in the flash data structure into multiple flags to indicate buffered operation, address translation, and the use of write enable (WREN). The 5709 flash only requires the buffered operation bit to be set. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵Linus Torvalds2007-07-18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Set vio->desc_buf to NULL after freeing. [SPARC]: Mark sparc and sparc64 as not having virt_to_bus [SPARC64]: Fix reset handling in VNET driver. [SPARC64]: Handle reset events in vio_link_state_change(). [SPARC64]: Handle LDC resets properly in domain-services driver. [SPARC64]: Massively simplify VIO device layer and support hot add/remove. [SPARC64]: Simplify VNET probing. [SPARC64]: Simplify VDC device probing. [SPARC64]: Add basic infrastructure for MD add/remove notification.
| * | [SPARC64]: Fix reset handling in VNET driver.David S. Miller2007-07-18
| | | | | | | | | | | | | | | | | | | | | In vnet_event(), if the channel was reset, try to get the link going again by invoking vio_port_up() after dropping the lock. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [SPARC64]: Simplify VNET probing.David S. Miller2007-07-18
| | | | | | | | | | | | | | | | | | | | | Only probe on the vdc-port VIO devices, create parent vnet objects on-demand. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [SPARC64]: Simplify VDC device probing.David S. Miller2007-07-18
| |/ | | | | | | | | | | | | We just need to match on the vdc-port nodes, the parent is really not interesting at all. Signed-off-by: David S. Miller <davem@davemloft.net>
* | xen: add virtual network device driverJeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The network device frontend driver allows the kernel to access network devices exported exported by a virtual machine containing a physical network device driver. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Jeff Garzik <jeff@garzik.org> Cc: Ian Pratt <ian.pratt@xensource.com> Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Keir Fraser <Keir.Fraser@cl.cam.ac.uk> Cc: netdev@vger.kernel.org
* | xen: add virtual block device driver.Jeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | The block device frontend driver allows the kernel to access block devices exported exported by a virtual machine containing a physical block device driver. Signed-off-by: Ian Pratt <ian.pratt@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <axboe@kernel.dk>
* | xen: add the Xenbus sysfs and virtual device hotplug driverJeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This communicates with the machine control software via a registry residing in a controlling virtual machine. This allows dynamic creation, destruction and modification of virtual device configurations (network devices, block devices and CPUS, to name some examples). [ Greg, would you mind giving this a review? Thanks -J ] Signed-off-by: Ian Pratt <ian.pratt@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Greg KH <greg@kroah.com>
* | xen: Add grant table supportJeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Xen 'grant table' driver which allows granting of access to selected local memory pages by other virtual machines and, symmetrically, the mapping of remote memory pages which other virtual machines have granted access to. This driver is a prerequisite for many of the Xen virtual device drivers, which grant the 'device driver domain' restricted and temporary access to only those memory pages that are currently involved in I/O operations. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ian Pratt <ian.pratt@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
* | xen: use the hvc console infrastructure for Xen consoleJeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a Xen back-end for hvc console. * * * Add early printk support via hvc console, enable using "earlyprintk=xen" on the kernel command line. From: Gerd Hoffmann <kraxel@suse.de> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Olof Johansson <olof@lixom.net>
* | usermodehelper: Tidy up waitingJeremy Fitzhardinge2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than using a tri-state integer for the wait flag in call_usermodehelper_exec, define a proper enum, and use that. I've preserved the integer values so that any callers I've missed should still work OK. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Andi Kleen <ak@suse.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Joel Becker <joel.becker@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: David Howells <dhowells@redhat.com>