12 Jan, 2012

18 commits

  • Add pm_caps into platform_data. This is power management, usually
    for SDIO device such as SDIO WLAN.

    Signed-off-by: Sangwook Lee
    Acked-by: Kukjin Kim
    Signed-off-by: Chris Ball

    Sangwook Lee
     
  • sdhci-s3c updates pm_caps from platform data for SDIO PM.

    Signed-off-by: Sangwook Lee
    Signed-off-by: Chris Ball

    Sangwook Lee
     
  • Add a function mmc_detect_card_removed() which upper layers can use to
    determine immediately if a card has been removed. This function should
    be called after an I/O request fails so that all queued I/O requests
    can be errored out immediately instead of waiting for the card device
    to be removed.

    Signed-off-by: Adrian Hunter
    Acked-by: Sujit Reddy Thumma
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • Signed-off-by: Cong Wang
    Acked-by: Guennadi Liakhovetski
    Signed-off-by: Chris Ball

    Cong Wang
     
  • This patch converts the drivers in drivers/mmc/host/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Signed-off-by: Axel Lin
    Acked-by: "Michał Mirosław"
    Acked-by: David Brown
    Acked-by: Viresh Kumar
    Acked-by: Guennadi Liakhovetski
    Acked-by: Sascha Hauer
    Acked-by: Wolfram Sang
    Acked-by: Anton Vorontsov
    Signed-off-by: Chris Ball

    Axel Lin
     
  • In ancient times it was necessary to manually initialize the bus field of an
    spi_driver to spi_bus_type. These days this is done in spi_driver_register(),
    so we can drop the manual assignment.

    The patch was generated using the following coccinelle semantic patch:
    //
    @@
    identifier _driver;
    @@
    struct spi_driver _driver = {
    .driver = {
    - .bus = &spi_bus_type,
    },
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Chris Ball

    Lars-Peter Clausen
     
  • Replace ilog2(__rounddown_pow_of_two(x)) with the equivalent but much
    simpler fls(x) - 1.

    Reported-by: Andrew Morton
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • If the read or write buffer size associated with the command sent
    through the mmc_blk_ioctl is zero, do not prepare data buffer.

    This enables a ioctl(2) call to for instance send a MMC_SWITCH to set
    a byte in the ext_csd.

    Signed-off-by: Johan Rudholm
    Signed-off-by: Chris Ball

    Johan Rudholm
     
  • 1ms is enough for hardware to change the clock to stable.
    100ms is too long in the tasklet.

    Signed-off-by: Tony Lin
    CC: Xiaobo Xie
    CC: Anton Vorontsov
    Signed-off-by: Chris Ball

    Tony Lin
     
  • If max_seg_size is unaligned, mmc_test_map_sg() may create sg element
    sizes that are not aligned with 512 byte. Fix, align max_seg_size at
    mmc_test_area_init().

    Signed-off-by: Per Forlin
    Signed-off-by: Chris Ball

    Per Forlin
     
  • Signed-off-by: Per Forlin
    Signed-off-by: Chris Ball

    Per Forlin
     
  • This patch adds support for sdio UHS cards per the version 3.0
    spec.

    UHS mode is only enabled for version 3.0 cards when both the
    host and the controller support UHS modes.

    1.8v signaling support is removed if both the card and the
    host do not support UHS. This is done to maintain
    compatibility and some system/card combinations break when
    1.8v signaling is enabled when the host does not support UHS.

    Signed-off-by: Philip Rakity
    Signed-off-by: Aaron Lu
    Reviewed-by: Arindam Nath
    Tested-by: Bing Zhao
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • Suspend/Resume is missing from sdhci-spear driver. This patch adds
    support for suspend/resume for this driver.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Chris Ball

    Viresh Kumar
     
  • Current clock gating framework disables the MCI clock as soon as the
    request is completed and enables it when a request arrives. This aggressive
    clock gating framework, when enabled, cause following issues:

    When there are back-to-back requests from the Queue layer, we unnecessarily
    end up disabling and enabling the clocks between these requests since 8MCLK
    clock cycles is a very short duration compared to the time delay between
    back to back requests reaching the MMC layer. This overhead can effect the
    overall performance depending on how long the clock enable and disable
    calls take which is platform dependent. For example on some platforms we
    can have clock control not on the local processor, but on a different
    subsystem and the time taken to perform the clock enable/disable can add
    significant overhead.

    Also if the host controller driver decides to disable the host clock too
    when mmc_set_ios function is called with ios.clock=0, it adds additional
    delay and it is highly possible that the next request had already arrived
    and unnecessarily blocked in enabling the clocks. This is seen frequently
    when the processor is executing at high speeds and in multi-core platforms
    thus reduces the overall throughput compared to if clock gating is
    disabled.

    Fix this by delaying turning off the clocks by posting request on
    delayed workqueue. Also cancel the unscheduled pending work, if any,
    when there is access to card.

    sysfs entry is provided to tune the delay as needed, default
    value set to 200ms.

    Signed-off-by: Sujit Reddy Thumma
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Sujit Reddy Thumma
     
  • No functional change; adds macros for card manufacturer IDs.

    Signed-off-by: Chris Ball
    Cc: Andrei E. Warkentin
    Cc: Stefan Nilsson XK

    Chris Ball
     
  • This patch is to expose the actual SDCLK frequency in
    /sys/kernel/debug/mmcX/ios entry.

    For example, if the max clk for a normal speed card is 20MHz this
    is reported in /sys/kernel/debug/mmcX/ios. Unfortunately the actual
    SDCLK frequency (i.e. Baseclock / divisor) is not reported at all:
    for example, in that case, on Arasan HC, it should be 48/4=12 (MHz).

    Signed-off-by: Giuseppe Cavallaro
    Acked-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Giuseppe CAVALLARO
     
  • This patch allows any block size to be set on the SDIO link,
    and still have an arbitrary sized packet (adjusted in size by
    using sdio_align_size) transferred in an optimal way
    (preferably one transfer).

    Previously if the block size was larger than the default of
    512 bytes and the transfer size was exactly one block size
    (possibly thanks to using sdio_align_size to get an optimal
    transfer size), it was sent as a number of byte transfers instead
    of one block transfer. Also if the number of blocks was
    (max_blocks * N) + 1, the tranfer would be conducted with a number
    of blocks and finished off with a number of byte transfers.

    When doing this change it was also possible to break out the quirk
    for broken byte mode in a much cleaner way, and collect the logic of
    when to do byte or block transfer in one function instead of two.

    Signed-off-by: Stefan Nilsson XK
    Signed-off-by: Ulf Hansson
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Stefan Nilsson XK
     
  • Add new macros for the high speed 50MHz case, rather than having
    a confusing reuse of the value for UHS SDR50, which is 100MHz.

    Reported-by: Aaron Lu
    Signed-off-by: Chris Ball

    Qiang Liu
     

24 Dec, 2011

14 commits


23 Dec, 2011

8 commits

  • "! --connbytes 23:42" should match if the packet/byte count is not in range.

    As there is no explict "invert match" toggle in the match structure,
    userspace swaps the from and to arguments
    (i.e., as if "--connbytes 42:23" were given).

    However, "what = 42" will always be false.

    Change things so we use "||" in case "from" is larger than "to".

    This change may look like it breaks backwards compatibility when "to" is 0.
    However, older iptables binaries will refuse "connbytes 42:0",
    and current releases treat it to mean "! --connbytes 0:42",
    so we should be fine.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • This closes races where btrfs is calling d_instantiate too soon during
    inode creation. All of the callers of btrfs_add_nondir are updated to
    instantiate after the inode is fully setup in memory.

    Signed-off-by: Al Viro
    Signed-off-by: Chris Mason

    Al Viro
     
  • Dan Carpenter noticed that we were doing a double unlock on the worker
    lock, and sometimes picking a worker thread without the lock held.

    This fixes both errors.

    Signed-off-by: Chris Mason
    Reported-by: Dan Carpenter

    Chris Mason
     
  • skb->truesize might be big even for a small packet.

    Its even bigger after commit 87fb4b7b533 (net: more accurate skb
    truesize) and big MTU.

    We should allow queueing at least one packet per receiver, even with a
    low RCVBUF setting.

    Reported-by: Michal Simek
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Setting a large rps_flow_cnt like (1 << 30) on 32-bit platform will
    cause a kernel oops due to insufficient bounds checking.

    if (count > 1<<< 30) * 8 will overflow
    32 bits.

    This patch replaces the magic number (1 << 30) with a symbolic bound.

    Suggested-by: Eric Dumazet
    Signed-off-by: Xi Wang
    Signed-off-by: David S. Miller

    Xi Wang
     
  • Chris Boot reported crashes occurring in ipv6_select_ident().

    [ 461.457562] RIP: 0010:[] []
    ipv6_select_ident+0x31/0xa7

    [ 461.578229] Call Trace:
    [ 461.580742]
    [ 461.582870] [] ? udp6_ufo_fragment+0x124/0x1a2
    [ 461.589054] [] ? ipv6_gso_segment+0xc0/0x155
    [ 461.595140] [] ? skb_gso_segment+0x208/0x28b
    [ 461.601198] [] ? ipv6_confirm+0x146/0x15e
    [nf_conntrack_ipv6]
    [ 461.608786] [] ? nf_iterate+0x41/0x77
    [ 461.614227] [] ? dev_hard_start_xmit+0x357/0x543
    [ 461.620659] [] ? nf_hook_slow+0x73/0x111
    [ 461.626440] [] ? br_parse_ip_options+0x19a/0x19a
    [bridge]
    [ 461.633581] [] ? dev_queue_xmit+0x3af/0x459
    [ 461.639577] [] ? br_dev_queue_push_xmit+0x72/0x76
    [bridge]
    [ 461.646887] [] ? br_nf_post_routing+0x17d/0x18f
    [bridge]
    [ 461.653997] [] ? nf_iterate+0x41/0x77
    [ 461.659473] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.665485] [] ? nf_hook_slow+0x73/0x111
    [ 461.671234] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.677299] [] ?
    nf_bridge_update_protocol+0x20/0x20 [bridge]
    [ 461.684891] [] ? nf_ct_zone+0xa/0x17 [nf_conntrack]
    [ 461.691520] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.697572] [] ? NF_HOOK.constprop.8+0x3c/0x56
    [bridge]
    [ 461.704616] [] ?
    nf_bridge_push_encap_header+0x1c/0x26 [bridge]
    [ 461.712329] [] ? br_nf_forward_finish+0x8a/0x95
    [bridge]
    [ 461.719490] [] ?
    nf_bridge_pull_encap_header+0x1c/0x27 [bridge]
    [ 461.727223] [] ? br_nf_forward_ip+0x1c0/0x1d4 [bridge]
    [ 461.734292] [] ? nf_iterate+0x41/0x77
    [ 461.739758] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.746203] [] ? nf_hook_slow+0x73/0x111
    [ 461.751950] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.758378] [] ? NF_HOOK.constprop.4+0x56/0x56
    [bridge]

    This is caused by bridge netfilter special dst_entry (fake_rtable), a
    special shared entry, where attaching an inetpeer makes no sense.

    Problem is present since commit 87c48fa3b46 (ipv6: make fragment
    identifications less predictable)

    Introduce DST_NOPEER dst flag and make sure ipv6_select_ident() and
    __ip_select_ident() fallback to the 'no peer attached' handling.

    Reported-by: Chris Boot
    Tested-by: Chris Boot
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Userspace may not provide TCA_OPTIONS, in fact tc currently does
    so not do so if no arguments are specified on the command line.
    Return EINVAL instead of panicing.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Commit 618f9bc74a039da76 (net: Move mtu handling down to the protocol
    depended handlers) forgot the bridge netfilter case, adding a NULL
    dereference in ip_fragment().

    Reported-by: Chris Boot
    CC: Steffen Klassert
    Signed-off-by: Eric Dumazet
    Acked-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Eric Dumazet