11 Aug, 2010

1 commit

  • * git://git.infradead.org/mtd-2.6: (79 commits)
    mtd: Remove obsolete include
    mtd: Update copyright notices
    jffs2: Update copyright notices
    mtd-physmap: add support users can assign the probe type in board files
    mtd: remove redwood map driver
    mxc_nand: Add v3 (i.MX51) Support
    mxc_nand: support 8bit ecc
    mxc_nand: fix correct_data function
    mxc_nand: add V1_V2 namespace to registers
    mxc_nand: factor out a check_int function
    mxc_nand: make some internally used functions overwriteable
    mxc_nand: rework get_dev_status
    mxc_nand: remove 0xe00 offset from registers
    mtd: denali: Add multi connected NAND support
    mtd: denali: Remove set_ecc_config function
    mtd: denali: Remove unuseful code in get_xx_nand_para functions
    mtd: denali: Remove device_info_tag structure
    mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip
    mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips
    mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips
    ...

    Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to
    redwood driver removal.

    Linus Torvalds
     

09 Aug, 2010

2 commits


04 Aug, 2010

1 commit

  • For no-mmu systems mmap() on RAM/ROM devices already works
    but for systems with mmu it probably was not tested and
    doesn't work.

    This patch allows using mmap() on MTD RAM/ROM devices on systems
    with MMU. It has been tested on mpc5121e based platform with
    MR0A16A MRAM device attached over LocalBus.

    Signed-off-by: Anatolij Gustschin
    Acked-by: Mike Frysinger
    Signed-off-by: David Woodhouse

    Anatolij Gustschin
     

02 Aug, 2010

1 commit


08 Jun, 2010

1 commit

  • * git://git.infradead.org/~dwmw2/mtd-2.6.35:
    jffs2: update ctime when changing the file's permission by setfacl
    jffs2: Fix NFS race by using insert_inode_locked()
    jffs2: Fix in-core inode leaks on error paths
    mtd: Fix NAND submenu
    mtd/r852: update card detect early.
    mtd/r852: Fixes in case of DMA timeout
    mtd/r852: register IRQ as last step
    drivers/mtd: Use memdup_user
    docbook: make mtd nand module init static

    Linus Torvalds
     

24 May, 2010

1 commit

  • * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
    uml: Pushdown the bkl from harddog_kern ioctl
    sunrpc: Pushdown the bkl from sunrpc cache ioctl
    sunrpc: Pushdown the bkl from ioctl
    autofs4: Pushdown the bkl from ioctl
    uml: Convert to unlocked_ioctls to remove implicit BKL
    ncpfs: BKL ioctl pushdown
    coda: Clean-up whitespace problems in pioctl.c
    coda: BKL ioctl pushdown
    drivers: Push down BKL into various drivers
    isdn: Push down BKL into ioctl functions
    scsi: Push down BKL into ioctl functions
    dvb: Push down BKL into ioctl functions
    smbfs: Push down BKL into ioctl function
    coda/psdev: Remove BKL from ioctl function
    um/mmapper: Remove BKL usage
    sn_hwperf: Kill BKL usage
    hfsplus: Push down BKL into ioctl function

    Linus Torvalds
     

22 May, 2010

1 commit

  • Use memdup_user when user data is immediately copied into the
    allocated region.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression from,to,size,flag;
    position p;
    identifier l1,l2;
    @@

    - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
    + to = memdup_user(from,size);
    if (
    - to==NULL
    + IS_ERR(to)
    || ...) {

    }
    - if (copy_from_user(to, from, size) != 0) {
    -
    - }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David Woodhouse

    Julia Lawall
     

18 May, 2010

1 commit

  • We cannot modify file->f_mapping->backing_dev_info, because it will corrupt
    backing device of device node inode, since file->f_mapping is equal to
    inode->i_mapping (see __dentry_open() in fs/open.c).

    Let's introduce separate inode for MTD device with appropriate backing
    device.

    [dwmw2: Refactor to keep it all entirely within mtdchar.c; use iget_locked()]

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Jan Kara
    Signed-off-by: David Woodhouse

    Kirill A. Shutemov
     

17 May, 2010

1 commit

  • These are the last remaining device drivers using
    the ->ioctl file operation in the drivers directory
    (except from v4l drivers).

    [fweisbec: drop i8k pushdown as it has been done from
    procfs pushdown branch already]

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Frederic Weisbecker

    Arnd Bergmann
     

25 Feb, 2010

4 commits


29 May, 2009

5 commits


04 Apr, 2009

1 commit

  • Update driver model support in the MTD framework, so it fits
    better into the current udev-based hotplug framework:

    - Each mtd_info now has a device node. MTD drivers should set
    the dev.parent field to point to the physical device, before
    setting up partitions or otherwise declaring MTDs.

    - Those device nodes always map to /sys/class/mtdX device nodes,
    which no longer depend on MTD_CHARDEV.

    - Those mtdX sysfs nodes have a "starter set" of attributes;
    it's not yet sufficient to replace /proc/mtd.

    - Enabling MTD_CHARDEV provides /sys/class/mtdXro/ nodes and the
    /sys/class/mtd*/dev attributes (for udev, mdev, etc).

    - Include a MODULE_ALIAS_CHARDEV_MAJOR macro. It'll work with
    udev creating the /dev/mtd* nodes, not just a static rootfs.

    So the sysfs structure is pretty much what you'd expect, except
    that readonly chardev nodes are a bit quirky.

    Signed-off-by: David Brownell
    Signed-off-by: David Woodhouse

    David Brownell
     

24 Mar, 2009

1 commit


21 Mar, 2009

1 commit


10 Dec, 2008

1 commit

  • MTD internal API presently uses 32-bit values to represent
    device size. This patch updates them to 64-bits but leaves
    the external API unchanged. Extending the external API
    is a separate issue for several reasons. First, no one
    needs it at the moment. Secondly, whether the implementation
    is done with IOCTLs, sysfs or both is still debated. Thirdly
    external API changes require the internal API to be accepted
    first.

    Note that although the MTD API will be able to support 64-bit
    device sizes, existing drivers do not and are not required
    to do so, although NAND base has been updated.

    In general, changing from 32-bit to 64-bit values cause little
    or no changes to the majority of the code with the following
    exceptions:
    - printk message formats
    - division and modulus of 64-bit values
    - NAND base support
    - 32-bit local variables used by mtdpart and mtdconcat
    - naughtily assuming one structure maps to another
    in MEMERASE ioctl

    Signed-off-by: Adrian Hunter
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Adrian Hunter
     

21 Oct, 2008

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • * git://git.infradead.org/mtd-2.6: (69 commits)
    Revert "[MTD] m25p80.c code cleanup"
    [MTD] [NAND] GPIO driver depends on ARM... for now.
    [MTD] [NAND] sh_flctl: fix compile error
    [MTD] [NOR] AT49BV6416 has swapped erase regions
    [MTD] [NAND] GPIO NAND flash driver
    [MTD] cmdlineparts documentation change - explain where mtd-id comes from
    [MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection
    [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
    [JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash
    [MTD] mtdoops: Fix a bug where block may not be erased
    [MTD] mtdoops: Add a magic number to logged kernel oops
    [MTD] mtdoops: Fix an off by one error
    [JFFS2] Correct parameter names of jffs2_compress() in comments
    [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
    [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
    [MTD] [MAPS] Remove unused variable after ROM API cleanup.
    [MTD] m25p80.c extended jedec support (v2)
    [MTD] remove unused mtd parameter in of_mtd_parse_partitions()
    [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
    [MTD] [NAND] driver extension to support NAND on TQM85xx modules
    ...

    Linus Torvalds
     

17 Oct, 2008

1 commit


02 Sep, 2008

1 commit

  • The MEMGETREGIONINFO ioctl() in mtdchar.c was clobbering user memory by
    overwriting more than intended, due the size of struct mtd_erase_region_info
    changing in commit 0ecbc81adfcb9f15f86b05ff576b342ce81bbef8 ('Support
    for auto locking flash on power up').

    Fix avoids this by copying struct members one by one with put_user(), as there
    is no longer a convenient struct to use the size of as the length argument to
    copy_to_user().

    Signed-off-by: Zev Weiss
    Signed-off-by: David Woodhouse

    Zev Weiss
     

02 Aug, 2008

1 commit

  • Now that we can tell when we have one of the newer DataFlash chips,
    optionally expose the 128 bytes of OTP memory they provide. Tested
    on at45db642 revision B and D chips.

    Switch mtdchar over to a generic HAVE_MTD_OTP flag instead of adding
    another #ifdef for each type of chip whose driver has OTP support.

    Signed-off-by: David Brownell
    Cc: Bryan Wu
    Cc: Michael Hennerich
    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    David Brownell
     

25 Jul, 2008

1 commit


22 Jul, 2008

1 commit


11 Jul, 2008

2 commits

  • Use einfo, oinfo for the inner erase_info and otp_info structs used in
    individual case statements.

    drivers/mtd/mtdchar.c:582:26: warning: symbol 'info' shadows an earlier one
    drivers/mtd/mtdchar.c:380:23: originally declared here
    drivers/mtd/mtdchar.c:596:26: warning: symbol 'info' shadows an earlier one
    drivers/mtd/mtdchar.c:380:23: originally declared here
    drivers/mtd/mtdchar.c:704:19: warning: symbol 'info' shadows an earlier one
    drivers/mtd/mtdchar.c:380:23: originally declared here

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Harvey Harrison
     
  • The copy_to_user was casting away the address space to get the offset of
    the length member. Use offsetof() instead and add it to the void __user
    *argp.

    drivers/mtd/mtdchar.c:527:23: warning: cast removes address space of expression
    drivers/mtd/mtdchar.c:527:23: warning: incorrect type in argument 1 (different address spaces)
    drivers/mtd/mtdchar.c:527:23: expected void [noderef] *to
    drivers/mtd/mtdchar.c:527:23: got unsigned int *

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Harvey Harrison
     

21 Jun, 2008

1 commit


05 Jun, 2008

1 commit

  • Once upon a time, the MTD repository was using CVS.

    This patch therefore removes all usages of the no longer updated CVS
    keywords from the MTD code.

    This also includes code that printed them to the user.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David Woodhouse

    Adrian Bunk
     

03 Feb, 2008

1 commit


25 Jan, 2008

1 commit


08 Jan, 2008

1 commit

  • "include/linux/mtd/mtd.h" declares "mtd_oob_ops.retlen" as size_t, which
    is 64 bits on targets with a 64 bit addressing. The MEMWRITEOOB ioctl
    calls copy_to_user() to write it back to "mtd_oob_buf.length", which is
    declared in "include/linux/mtd-abi.h" as uint32_t. Since powerpc is a
    big endian architecture, this only copies the upper 32 bits of the
    address, which is always 0.

    Signed-off-by: David Scidmore
    Signed-off-by: David Woodhouse

    David Scidmore
     

23 Aug, 2007

1 commit


12 Aug, 2007

1 commit

  • sh:

    drivers/mtd/mtdchar.c: In function `mtd_mmap':
    drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type
    drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function)
    drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only once

    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

29 Jun, 2007

1 commit