11 Sep, 2011

24 commits

  • MEMSETOOBSEL is completely unused and useless. Remove the definition.

    Note: it's probably best not to use this ioctl number in the future for
    MTD, since that may cause conflicts between old kernels and new user
    software (or new kernels and old user software).

    Artem: leave a comment about MEMSETOOBSEL.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • The set_parts and priv members of struct platform_nand_chip where
    removed in commit c36a6ef3845262ade529afb9f458738b1f196f83 but the
    kerneldoc wasn't updated.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Artem Bityutskiy

    Tobias Klauser
     
  • Therefor -> Therefore
    [Intern], [Internal] -> [INTERN]
    [REPLACABLE] -> [REPLACEABLE]
    syndrom, syndom -> syndrome
    ecc -> ECC
    buswith -> buswidth
    endianess -> endianness
    dont -> don't
    occures -> occurs
    independend -> independent
    wihin -> within
    erease -> erase
    blockes -> blocks
    ...

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • mtd_device_register() is a limited version of mtd_device_parse_register.
    Replace it with macro calling mtd_device_parse_register().

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • There is no need to pollute public header with a definition private
    to mtdpart.c. Move it from mtd/partitions.h to mtdpart.c

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • There is no need to export parse_mtd_partitions() now , as it's fully handled
    by registration functions. So move the definition to private header and
    remove respective EXPORT_SYMBOL_GPL.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • There are two different 4KiB pagesize chips
    KFM4G16Q4M series have NOP 4 with version ID 0x0131
    But KFM4G16Q5M has NOP 1 with versoin ID 0x013e

    Note that Q5M means that it has NOP 1.

    Signed-off-by: Kyungmin Park
    Signed-off-by: Artem Bityutskiy

    Kyungmin Park
     
  • All users have been converted to call of_mtd_parse_partitions through
    parse_mtd_partitions() multiplexer. Drop obsolete API.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • Prepare to convert of_mtd_parse_partitions() to usual partitions parser:
    1) Register ofpart parser
    2) Internally don't use passed device for error printing
    3) Add device_node to mtd_part_parser_data struct
    4) Move of_mtd_parse_partitions from __devinit to common text section
    5) add ofpart to the default list of partition parsers

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • Encapsulate last MTD partition parser argument into a separate
    structure. Currently it holds only 'origin' field for RedBoot parser,
    but will be extended in future to contain at least device_node for OF
    devices.

    Amended commentary to make kerneldoc happy

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • Lots (nearly all) mtd drivers contain nearly the similar code that
    calls parse_mtd_partitions, provides some platform-default values, if
    parsing fails, and registers mtd device.

    This is an aim to provide single implementation of this scenario:
    mtd_device_parse_register() which will handle all this parsing and
    defaults.

    Artem: amended comments

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • Drop now unused set_parts from struct platform_nand_data. Also, while we are
    at it, drop long unused priv field from platform_nand_data.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • Add support for MTDPART_OFS_RETAIN: such partitions start at the current
    offset, take as much space as possible, but rain part->size bytes after
    the end of the partitions for other parts. Primarily this is intended
    for ts72xx arm platforms cleanup.

    Artem: tweaked the patch a bit

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • This function is unused now. Drop it.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • physmap_configure() and physmap_set_partitions() have no users in kernel.
    Out of kernel users should have been converted to regular platform device
    long ago. Drop support for this obsolete API.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     
  • In an attempt to improve the documentation of the BBT code, I am expanding
    the comments I left in commit:
    58373ff0afff4cc8ac40608872995f4d87eb72ec
    mtd: nand: more BB Detection refactoring and dynamic scan options

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • After several steps of rearrangement and consolidation, it is probably
    worth re-sequencing the numbers on some of our affected flags in nand.h
    and bbm.h.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • According to our new prefix rules, we should rename NAND_CREATE_EMPTY_BBT
    with a NAND_BBT prefix, i.e., NAND_BBT_CREATE_EMPTY.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • The NAND_CREATE_EMPTY_BBT flag was added by commit:
    453281a973c10bce941b240d1c654d536623b16b
    mtd: nand: introduce NAND_CREATE_EMPTY_BBT
    This flag is not used within the kernel and not explained well, so I
    took the liberty to edit its comments.

    Also, this is a BBT-related flag (and closely tied with NAND_BBT_CREATE)
    so I'm moving it to bbm.h next to NAND_BBT_CREATE, thus requiring that
    we use the flag in nand_chip.bbt_options, *not* in nand_chip.options.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • Recall the recently added prefix requirements:
    * "NAND_" for flags in nand.h, used in nand_chip.options
    * "NAND_BBT_" for flags in bbm.h, used in nand_chip.bbt_options
    or in nand_bbt_descr.options

    Thus, I am changing NAND_USE_FLASH_BBT to NAND_BBT_USE_FLASH.

    Again, this flag is found in bbm.h and so should NOT be used in the
    "nand_chip.options" field.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • This patch works with the following three flags from two headers (nand.h
    and bbm.h):
    (1) NAND_USE_FLASH_BBT (nand.h)
    (2) NAND_USE_FLASH_BBT_NO_OOB (nand.h)
    (3) NAND_BBT_NO_OOB (bbm.h)

    These flags are all related and interdependent, yet they were in
    different headers. Flag (2) is simply the combination of (1) and (3) and
    can be eliminated.

    This patch accomplishes the following:
    * eliminate NAND_USE_FLASH_BBT_NO_OOB (i.e., flag (2))
    * move NAND_USE_FLASH_BBT (i.e., flag (1)) to bbm.h

    It's important to note that because (1) and (3) are now both found in
    bbm.h, they should NOT be used in the "nand_chip.options" field.

    I removed a small section from the mtdnand DocBook because it referes to
    NAND_USE_FLASH_BBT in nand.h, which has been moved to bbm.h.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • This patch handles the problems we've been having with using conflicting
    flags from nand.h and bbm.h in the same nand_chip.options field. We
    should try to separate these two spaces a little more clearly, and so I
    have added a bbt_options field to nand_chip.

    Important notes about nand_chip fields:
    * bbt_options field should contain ONLY flags from bbm.h. They should be
    able to pass safely to a nand_bbt_descr data structure.
    - BBT option flags start with the "NAND_BBT_" prefix.
    * options field should contian ONLY flags from nand.h. Ideally, they
    should not be involved in any BBT related options.
    - NAND chip option flags start with the "NAND_" prefix.
    * Every flag should have a nice comment explaining what the flag is. While
    this is not yet the case on all existing flags, please be sure to write
    one for new flags. Even better, you can help document the code better
    yourself!

    Please try to follow these conventions to make everyone's lives easier.

    Among the flags that are being moved to the new bbt_options field
    throughout various drivers, etc. are:
    * NAND_BBT_SCANLASTPAGE
    * NAND_BBT_SCAN2NDPAGE
    and there will be more to come.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • This patch reverts most of:
    commit 58373ff0afff4cc8ac40608872995f4d87eb72ec
    mtd: nand: more BB Detection refactoring and dynamic scan options

    According to the discussion at:
    http://lists.infradead.org/pipermail/linux-mtd/2011-May/035696.html
    the NAND_BBT_SCANBYTE1AND6 flag, although technically valid, can break
    some existing ECC layouts that use the 6th byte in the OOB for ECC data.
    Furthermore, we apparently do not need to scan both bytes 1 and 6 in
    the OOB region of the devices under consideration; instead, we only need
    to scan one or the other.

    Thus, the NAND_BBT_SCANBYTE1AND6 flag is at best unnecessary and at
    worst a regression.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     

15 Aug, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: remove unused "ddr" parameter in struct mmc_ios
    mmc: dw_mmc: Fix DDR mode support.
    mmc: core: use defined R1_STATE_PRG macro for card status
    mmc: sdhci: use f_max instead of host->clock for timeouts
    mmc: sdhci: move timeout_clk calculation farther down
    mmc: sdhci: check host->clock before using it as a denominator
    mmc: Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK"
    mmc: tmio: eliminate unused variable 'mmc' warning
    mmc: esdhc-imx: fix card interrupt loss on freescale eSDHC
    mmc: sdhci-s3c: Fix build for header change
    mmc: dw_mmc: Fix mask in IDMAC_SET_BUFFER1_SIZE macro
    mmc: cb710: fix possible pci_dev leak in cb710_pci_configure()
    mmc: core: Detect eMMC v4.5 ext_csd entries
    mmc: mmc_test: avoid stalled file in debugfs
    mmc: sdhci-s3c: add BROKEN_ADMA_ZEROLEN_DESC quirk
    mmc: sdhci: pxav3: controller needs 32 bit ADMA addressing
    mmc: sdhci: fix retuning timer wrongly deleted in sdhci_tasklet_finish

    Linus Torvalds
     

14 Aug, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ASoC: Fix compile warning in wm8750.c
    ASoC: omap: Update e-mail address of Jarkko Nikula
    ASoC: SAMSUNG: Add I2S0 internal dma driver
    ASoC: Terminate WM8750 SPI device ID table
    ASoC: Add missing break in WM8994 probe
    ALSA: snd-usb-caiaq: Correct offset fields of outbound iso_frame_desc
    ALSA: azt3328 - adjust error handling code to include debugging code
    ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()
    ALSA: usb-audio - Add quirk for BOSS Micro BR-80
    ASoC: Fix typo in wm8750 spi_ids
    ASoC: Fix warning in Speyside WM8962
    ASoC: Fix SPI driver binding for WM8987
    ASoC: Fix binding of WM8750 on Jive
    ASoC: WM8903: Free IRQ on device removal
    ASoC: Tegra: wm8903 machine driver: Allow re-insertion of module
    ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS

    Linus Torvalds
     
  • "mmc: dw_mmc: Fix DDR mode support" removed the last user.

    Signed-off-by: Jaehoon Chung
    Signed-off-by: Kyungmin Park
    Signed-off-by: Chris Ball

    Jaehoon Chung
     

13 Aug, 2011

1 commit


12 Aug, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
    e1000e: increase driver version number
    e1000e: alternate MAC address update
    e1000e: do not disable receiver on 82574/82583
    e1000e: alternate MAC address does not work on device id 0x1060
    PCnet: Fix section mismatch
    bnx2x: disable dcb on 578xx since not supported yet
    bnx2x: properly clean indirect addresses
    bnx2x: prevent race between undi_unload and load flows
    bnx2x: fix select_queue when FCoE is disabled
    bnx2x: init FCOE FP only once
    ipv4: some rt_iif -> rt_route_iif conversions
    net/bridge/netfilter/ebtables.c: use available error handling code
    net/netlabel/netlabel_kapi.c: add missing cleanup code
    net/irda: sh_sir: tidyup compile warning
    net/irda: sh_sir: add missing header
    net/irda: sh_irda: add missing header
    slcan: ldisc generated skbs are received in softirq context
    scm: Capture the full credentials of the scm sender
    tcp: initialize variable ecn_ok in syncookies path
    drivers/net/wireless/wl1251: add missing kfree
    ...

    Linus Torvalds
     
  • My gmail account got disabled and I'm not going to reopen it.

    Signed-off-by: Jarkko Nikula
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Jarkko Nikula
     
  • The patch http://lkml.org/lkml/2003/7/13/226 introduced an RLIMIT_NPROC
    check in set_user() to check for NPROC exceeding via setuid() and
    similar functions.

    Before the check there was a possibility to greatly exceed the allowed
    number of processes by an unprivileged user if the program relied on
    rlimit only. But the check created new security threat: many poorly
    written programs simply don't check setuid() return code and believe it
    cannot fail if executed with root privileges. So, the check is removed
    in this patch because of too often privilege escalations related to
    buggy programs.

    The NPROC can still be enforced in the common code flow of daemons
    spawning user processes. Most of daemons do fork()+setuid()+execve().
    The check introduced in execve() (1) enforces the same limit as in
    setuid() and (2) doesn't create similar security issues.

    Neil Brown suggested to track what specific process has exceeded the
    limit by setting PF_NPROC_EXCEEDED process flag. With the change only
    this process would fail on execve(), and other processes' execve()
    behaviour is not changed.

    Solar Designer suggested to re-check whether NPROC limit is still
    exceeded at the moment of execve(). If the process was sleeping for
    days between set*uid() and execve(), and the NPROC counter step down
    under the limit, the defered execve() failure because NPROC limit was
    exceeded days ago would be unexpected. If the limit is not exceeded
    anymore, we clear the flag on successful calls to execve() and fork().

    The flag is also cleared on successful calls to set_user() as the limit
    was exceeded for the previous user, not the current one.

    Similar check was introduced in -ow patches (without the process flag).

    v3 - clear PF_NPROC_EXCEEDED on successful calls to set_user().

    Reviewed-by: James Morris
    Signed-off-by: Vasiliy Kulikov
    Acked-by: NeilBrown
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     

10 Aug, 2011

1 commit

  • The patch adds empty function of_get_property for non-dt build, so that
    drivers migrating to dt can save some '#ifdef CONFIG_OF'.

    This also fixes the current Tegra compile problem in linux-next.

    Signed-off-by: Stephen Warren
    Signed-off-by: Grant Likely

    Stephen Warren
     

09 Aug, 2011

4 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    sound: pss - don't use the deprecated function check_region
    ALSA: timer - Add NULL-check for invalid slave timer
    ALSA: timer - Fix Oops at closing slave timer
    ASoC: Acknowledge WM8996 interrupts before acting on them
    ASoC: Rename WM8915 to WM8996
    ALSA: Fix dependency of CONFIG_SND_TEA575X
    ALSA: asihpi - use kzalloc()
    ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3
    ALSA: snd-usb: Fix uninitialized variable usage
    ALSA: hda - Fix a complile warning in patch_via.c
    ALSA: hdspm - Fix uninitialized compile warnings
    ALSA: usb-audio - add quirk for Keith McMillen StringPort
    ALSA: snd-usb: operate on given mixer interface only
    ALSA: snd-usb: avoid dividing by zero on invalid input
    ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
    sound: oss/pas2: Remove CLOCK_TICK_RATE dependency from PAS16 driver
    ALSA: hda - Use auto-parser for ASUS UX50, Eee PC P901, S101 and P1005
    ALSA: hda - Fix digital-mic mono recording on ASUS Eee PC
    ASoC: sgtl5000: fix cache handling
    ASoC: Disable wm_hubs periodic DC servo update

    Linus Torvalds
     
  • In commit 2efaca927f5c ("mm/futex: fix futex writes on archs with SW
    tracking of dirty & young") we forgot about MMU=n. This patch fixes
    that.

    Signed-off-by: Peter Zijlstra
    Acked-by: Benjamin Herrenschmidt
    Acked-by: David Howells
    Link: http://lkml.kernel.org/r/1311761831.24752.413.camel@twins
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Avoid annoying warnings from these functions ("discards qualifiers")
    because they assign 'current_cred()' to a non-const pointer.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Commit 3295514841c2 ("fix rcu annotations noise in cred.h") accidentally
    dropped the const of current->cred inside current_cred() by the
    insertion of a cast to deal with an RCU annotation loss warning from
    sparce.

    Use an appropriate RCU wrapper instead so as not to lose the const.

    Signed-off-by: David Howells
    Reviewed-by: Paul E. McKenney
    cc: Al Viro
    Signed-off-by: Linus Torvalds

    David Howells
     

08 Aug, 2011

4 commits

  • The raw sockets can provide source address for
    routing but their privileges are not considered. We
    can provide non-local source address, make sure the
    FLOWI_FLAG_ANYSRC flag is set if socket has privileges
    for this, i.e. based on hdrincl (IP_HDRINCL) and
    transparent flags.

    Signed-off-by: Julian Anastasov
    Signed-off-by: David S. Miller

    Julian Anastasov
     
  • Currently userland will barf when including linux/netlink.h unless it
    precisely includes sys/socket.h first. The issue is where the
    definition of "sa_family_t" comes from.

    We've been back and forth on how to fix this issue in the past, see:

    http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/622621
    http://thread.gmane.org/gmane.linux.network/143380

    Ben Hutchings suggested we take a hint from how we handle the
    sockaddr_storage type. First we define a "__kernel_sa_family_t"
    to linux/socket.h that is always defined.

    Then if __KERNEL__ is defined, we also define "sa_family_t" as
    equal to "__kernel_sa_family_t".

    Then in places like linux/netlink.h we use __kernel_sa_family_t
    in user visible datastructures.

    Reported-by: Michel Machado
    Signed-off-by: David S. Miller

    David S. Miller
     
  • For marketing reasons the part will be called WM8996. In order to avoid
    user confusion rename the driver to reflect this.

    Signed-off-by: Mark Brown
    Acked-by: Kukjin Kim
    Acked-by: Liam Girdwood

    Mark Brown
     
  • task->cred is declared as __rcu, and access to other tasks' ->cred is,
    indeed, protected. Access to current->cred does not need rcu_dereference()
    at all, since only the task itself can change its ->cred. sparse, of
    course, has no way of knowing that...

    Add force-cast in current_cred(), make current_fsuid() et.al. use it.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro