17 Oct, 2008

40 commits

  • * 'docs' of git://git.lwn.net/linux-2.6:
    Document panic_on_unrecovered_nmi sysctl
    Add a reference to paper to SubmittingPatches
    Add kerneldoc documentation for new printk format extensions
    Remove videobook.tmpl
    doc: Test-by?
    Add the development process document
    Documentation/block/data-integrity.txt: Fix section numbers

    Linus Torvalds
     
  • * 'for-linus' of git://neil.brown.name/md:
    md: fix input truncation in safe_delay_store()
    md: check for memory allocation failure in faulty personality
    md: build failure due to missing delay.h
    md: Relax minimum size restrictions on chunk_size.
    md: remove space after function name in declaration and call.
    md: Remove unnecessary #includes, #defines, and function declarations.
    md: Convert remaining 1k representations in linear.c to sectors.
    md: linear.c: Make two local variables sector-based.
    md: linear: Represent dev_info->size and dev_info->offset in sectors.
    md: linear.c: Remove broken debug code.
    md: linear.c: Remove pointless initialization of curr_offset.
    md: linear.c: Fix typo in comment.
    md: Don't try to set an array to 'read-auto' if it is already in that state.
    md: Allow metadata_version to be updated for externally managed metadata.
    md: Fix rdev_size_store with size == 0

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (32 commits)
    Input: wm97xx - update email address for Liam Girdwood
    Input: i8042 - add Thinkpad R31 to nomux list
    Input: move map_to_7segment.h to include/linux
    Input: ads7846 - fix cache line sharing issue
    Input: cm109 - add missing newlines to messages
    Input: document i8042.debug in kernel-parameters.txt
    Input: keyboard - fix potential out of bound access to key_map
    Input: psmouse - add OLPC touchpad driver
    Input: psmouse - tweak PSMOUSE_DEFINE_ATTR to support raw set callbacks
    Input: psmouse - add psmouse_queue_work() for ps/2 extension to make use of
    Input: psmouse - export psmouse_set_state for ps/2 extensions to use
    Input: ads7846 - introduce .gpio_pendown to get pendown state
    Input: ALPS - add signature for DualPoint found in Dell Latitude E6500
    Input: serio_raw - allow attaching to translated (SERIO_I8042XL) ports
    Input: cm109 - don't use obsolete logging macros
    Input: atkbd - expand Latitude's force release quirk to other Dells
    Input: bf54x-keys - add power management support
    Input: atmel_tsadcc - improve accuracy
    Input: convert drivers to use strict_strtoul()
    Input: appletouch - handle geyser 3/4 status bits
    ...

    Linus Torvalds
     
  • With m68k allmodconfig, I get:

    | drivers/rtc/rtc-ds1286.c: In function 'ds1286_rtc_read':
    | drivers/rtc/rtc-ds1286.c:33: error: implicit declaration of function '__raw_readl'
    | drivers/rtc/rtc-ds1286.c: In function 'ds1286_rtc_write':
    | drivers/rtc/rtc-ds1286.c:38: error: implicit declaration of function '__raw_writel'
    | drivers/rtc/rtc-ds1286.c: In function 'ds1286_probe':
    | drivers/rtc/rtc-ds1286.c:345: error: implicit declaration of function 'ioremap'
    | drivers/rtc/rtc-ds1286.c:345: warning: assignment makes pointer from integer without a cast
    | drivers/rtc/rtc-ds1286.c:365: error: implicit declaration of function 'iounmap'

    and

    | drivers/rtc/rtc-m48t35.c: In function 'm48t35_read_time':
    | drivers/rtc/rtc-m48t35.c:59: error: implicit declaration of function 'readb'
    | drivers/rtc/rtc-m48t35.c:60: error: implicit declaration of function 'writeb'
    | drivers/rtc/rtc-m48t35.c: In function 'm48t35_probe':
    | drivers/rtc/rtc-m48t35.c:168: error: implicit declaration of function 'ioremap'
    | drivers/rtc/rtc-m48t35.c:168: warning: assignment makes pointer from integer without a cast
    | drivers/rtc/rtc-m48t35.c:188: error: implicit declaration of function 'iounmap'

    Include to get access to the I/O API.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Thomas Bogendoerfer
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • This adds "panic_on_unrecovered_nmi" sysctl to
    Documentation/filesystems/proc.txt. The text is mainly taken from
    http://readlist.com/lists/vger.kernel.org/linux-kernel/43/217998.html.

    Signed-off-by: Bernhard Walle
    Signed-off-by: Jonathan Corbet

    Bernhard Walle
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: blacklist additional SoundGraph iMon LCD models
    HID: fix/improve help texts for quirk drivers
    HID: fix default building of HID-quirk drivers

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
    decnet: Fix compiler warning in dn_dev.c
    IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
    net/802/fc.c: Fix compilation warnings
    netns: correct mib stats in ip6_route_me_harder()
    netns: fix net_generic array leak
    rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
    rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
    p54usb: Device ID updates
    mac80211: fixme for kernel-doc
    ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
    libertas : Remove unused variable warning for "old_channel" from cmd.c
    mac80211: Fix scan RX processing oops
    orinoco: fix unsafe locking in spectrum_cs_suspend
    orinoco: fix unsafe locking in orinoco_cs_resume
    cfg80211: fix debugfs error handling
    mac80211: fix debugfs netdev rename
    iwlwifi: fix ct kill configuration for 5350
    mac80211: fix HT information element parsing
    p54: Fix compilation problem on PPC
    mac80211: fix debugfs lockup
    ...

    Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (51 commits)
    [ARM] 5308/1: Fix Viper ISA IRQ handling
    [ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error
    [ARM] 5306/1: pxa: fix build error on CM-X270
    [ARM] 5302/1: ARM: OMAP: Revert omap3 WDT changes to avoid merge conflict
    [ARM] 5305/1: ARM: OMAP: Fix compile of McBSP by removing unnecessary check
    [ARM] 5301/1: ARM: OMAP: Add missing irq defines
    ARM: OMAP3: Add default kernel config for OMAP LDP
    ARM: OMAP3: Add basic board support for OMAP LDP
    ARM: OMAP3: Defconfig for the Gumstix Overo board (rev 3)
    ARM: OMAP3: Add support for the Gumstix Overo board (rev 3)
    ARM: OMAP3: Add Beagle defconfig
    ARM: OMAP3: Add minimal Beagle board support
    ARM: OMAP3: Add minimal omap3430 support
    ARM: OMAP2: Fix sparse, checkpatch warnings in OMAP2/3 IRQ code
    ARM: OMAP: Fixes to omap_mcbsp_request function
    ARM: OMAP: Add support for OMAP2430 in McBSP
    ARM: OMAP: Add support for McBSP devices 3 - 5 on 34xx
    ARM: OMAP: Allocate McBSP devices dynamically
    Fix sections for omap-mcbsp platform driver
    [ARM] S3C24XX: Additional include moves
    ...

    Linus Torvalds
     
  • The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
    (d)) but is perhaps more readable.

    An extract of the semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @haskernel@
    @@

    #include

    @depends on haskernel@
    expression n,d;
    @@

    (
    - (n + d - 1) / d
    + DIV_ROUND_UP(n,d)
    |
    - (n + (d - 1)) / d
    + DIV_ROUND_UP(n,d)
    )

    @depends on haskernel@
    expression n,d;
    @@

    - DIV_ROUND_UP((n),d)
    + DIV_ROUND_UP(n,d)

    @depends on haskernel@
    expression n,d;
    @@

    - DIV_ROUND_UP(n,(d))
    + DIV_ROUND_UP(n,d)
    //

    Signed-off-by: Julia Lawall
    Acked-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • Make the needlessly global kretprobe_table_lock() static.

    Signed-off-by: Adrian Bunk
    Acked-by: Ananth N Mavinakayanahalli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Make the needlessly global hp_wmi_notify() static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Add resource_type() and IORESOURCE_TYPE_BITS. They make it easier to add
    more resource types without having to rewrite tons of code.

    Signed-off-by: Magnus Damm
    Cc: Ben Dooks
    Cc: Jean Delvare
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • No functional change. Just return NULL for kzalloc failure immediately,
    rather than wrapping the whole function body in the body of an "if".

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • A few minor updates for the GRU driver.
    - documentation changes found in code reviews
    - changes to #ifdefs to make them recognized by "unifdef"
    (used in simulator testing)
    - change GRU context load/unload to prefetch data

    [akpm@linux-foundation.org: fix typo in comment]
    Signed-off-by: Jack Steiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jack Steiner
     
  • This patchs adds the CONFIG_AIO option which allows to remove support
    for asynchronous I/O operations, that are not necessarly used by
    applications, particularly on embedded devices. As this is a
    size-reduction option, it depends on CONFIG_EMBEDDED. It allows to
    save ~7 kilobytes of kernel code/data:

    text data bss dec hex filename
    1115067 119180 217088 1451335 162547 vmlinux
    1108025 119048 217088 1444161 160941 vmlinux.new
    -7042 -132 0 -7174 -1C06 +/-

    This patch has been originally written by Matt Mackall
    , and is part of the Linux Tiny project.

    [randy.dunlap@oracle.com: build fix]
    Signed-off-by: Thomas Petazzoni
    Cc: Benjamin LaHaise
    Cc: Zach Brown
    Signed-off-by: Matt Mackall
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Petazzoni
     
  • [akpm@linux-foundation.org: minor fixlets and cleanups]
    Signed-off-by: Bernhard Weirich
    Signed-off-by: Evgeniy Polyakov
    Cc: Ben Gardner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Weirich
     
  • Optimize the ds_set_pullup function. For a strong pullup to be sent the
    ds2490 has to have both the strong pullup mode enabled, and the specific
    write operation has to have the SPU bit enabled. Previously the write
    always had the SPU bit enabled and both the duration and model was set
    when a strong pullup was requested. Now the strong pullup mode is enabled
    at initialization time, the delay is updated only when the value changes,
    and the write SPU bit is set only when a strong pullup is required. This
    removes two or three bus transactions per strong pullup request.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Provide some additional details about the status of the driver and the
    ds2490 hardware.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Drop the extra ds_wait_status() in ds_write_block().

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • This replaces some magic numbers with marcos and corrects one marco.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Reset the device in init as it can be in a bad state. This is necessary
    because a block write will wait for data to be placed in the output buffer
    and block any later commands which will keep accumulating and the device
    will not be idle. Another case is removing the ds2490 module while a bus
    search is in progress, somehow a few commands get through, but the input
    transfers fail leaving data in the input buffer. This will cause the next
    read to fail see the note in ds_recv_data.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • ds_reset no longer calls ds_wait_status, the result wasn't used and it
    would only delay the following data operations.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • - add result register #defines
    - rename ds_dump_status to ds_print_msg
    - rename ds_recv_status to ds_dump_status
    - ds_dump_status prints the requested status and no longer reads the
    status, this is because the second status read can return different
    data for example the result register
    - the result register will be printed, though limited to detecting a
    new device, detecting other values such as a short would require
    additional reporting methods
    - ST_EPOF was moved to ds_wait_status to clear the error condition
    sooner

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Simplify and fix ds_touch_bit. If a device is attached in the middle of a
    bus search the status register will return more than the default 16 bytes.
    The additional bytes indicate that it has detected a new device. The way
    ds_wait_status is coded, if it doesn't read 16 status bytes it returns an
    error value. ds_touch_bit then will detect that error and return an
    error. In that case it doesn't read the input buffer and returns
    uninitialized data. It doesn't stop there. The next transaction will not
    expect the extra byte in the input buffer and the short read will cause an
    error and clear out both the old byte and new data in the input buffer.

    Just ignore the value of ds_wait_status. It is still required to wait
    until ds2490 is again idle and there is data to read when ds_recv_data is
    called. This also removes the while loop. None of the other commands
    wait and verify that the issued command is in the status register.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Don't export read and write bit operations, they didn't work, they weren't
    used, and they can't be made to work. The one wire low level bit
    operations expect to set high or low levels, the ds2490 hardware only
    supports complete read or write time slots, better to just comment them
    out.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment
    that it will no longer generate a read back data byte. If there is an
    extra data byte later on then it will cause an error and discard what data
    was there. Corrected operator ordering for ds_send_control.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Add strong pullup support for ds2490 driver, also drop mdelay(750), which
    busy waits, usage in favour of msleep for long delays. Now with msleep
    only being called when the strong pullup is active, one wire bus
    operations are only taking minimal system overhead.

    The new set_pullup will only enable the strong pullup when requested,
    which is expected to be the only write operation that will benefit from a
    strong pullup.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Corrected print message, it was writing not reading, this also prints the
    endpoint used for the write instead of hardcoding it. Failed to write
    1-wire data to ep0x%x: err=%d.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Like the previous w1_io.c reset coments and msleep patch, I don't have the
    hardware to verify the change, but I think it is safe. It also helps to
    see a comment like this in the code. "We'll wait a bit longer just to be
    sure." If they are going to calculate delaying 324.9us, but actually delay
    500us, why not just give up the CPU and sleep? This is designed for a
    battery powered ARM system, avoiding busywaiting has to be good for
    battery life.

    I sent a request for testers March 7, 2008 to the Linux kernel mailing
    list and two developers who have patches for ds1wm.c, but I didn't get
    any respons.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • w1_reset_bus, added some comments about the timing and switched to msleep
    for the later delay. I don't have the hardware to test the sleep after
    reset change. The one wire doesn't have a timing requirement between
    commands so it is fine. I do have the USB hardware and it would be in big
    trouble with 10ms interrupt transfers to find that the reset completed.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • s/printk/dev_dbg/

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Follow the example of other devices (like the joystick device). Pick the
    first available id for each detected device. Currently for USB devices,
    suspending and resuming would cause the number to increment.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • sl->master->mutex and dev->mutex refer to the same mutex variable, but be
    consistent and use the same set of pointers for the lock and unlock calls.
    It is less confusing (and one less pointer dereference this way).

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Removed the w1_family structure member variable need_exit. It was only
    being set and never used. Even if it were to be used it is a polling type
    operation.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Fixed data reading bug by replacing binary attribute with device one.

    Switching the sysfs read from bin_attribute to device_attribute. The data
    is far under PAGE_SIZE so the binary interface isn't required. As the
    device_attribute interface will make one call to w1_therm_read per file
    open and buffer, the result is, the following problems go away.

    buffer overflow:
    Execute a short read on w1_slave and w1_therm_read_bin would still
    return the full string size worth of data clobbering the user space
    buffer when it returned. Switching to device_attribute avoids the
    buffer overflow problems. With the snprintf formatted output dealing
    with short reads without doing a conversion per read would have
    been difficult.
    bad behavior:
    `cat w1_slave` would cause two temperature conversions to take place.
    Previously the code assumed W1_SLAVE_DATA_SIZE would be returned with
    each read. It would not return 0 unless the offset was less
    than W1_SLAVE_DATA_SIZE. The result was the first read did a
    temperature conversion, filled the buffer and returned, the
    offset in the second read would be less than
    W1_SLAVE_DATA_SIZE and also fill the buffer and return, the
    third read would finnally have a big enough offset to return 0
    and cause cat to stop. Now w1_therm_read will be called at
    most once per open.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Fix bug reading the id sysfs file. If less than the full 8 bytes were
    read, the next read would start at the first byte instead of continuing.
    It needed the offset added to memcpy, or the better solution was to
    replace it with the device attribute instead of bin attribute.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Document w1_master_add, w1_master_remove, search_count, and pullup.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Added a new module parameter search_count which allows overriding the
    default search count. -1 continual, 0 disabled, N that many times.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Simplified the logic in w1_slave_found by using the new
    w1_attach_slave_device function to find a slave and mark it as active or
    add the device if the crc checks.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries