01 Jul, 2009

1 commit

  • The init_IRQ() function is now called with slab allocator initialized.
    Therefore, we must not use the bootmem allocator in xen_init_IRQ().

    Fixes the following boot-time warning:

    ------------[ cut here ]------------
    WARNING: at mm/bootmem.c:535 alloc_arch_preferred_bootmem+0x27/0x45()
    Modules linked in:
    Pid: 0, comm: swapper Not tainted 2.6.30 #1
    Call Trace:
    [] ? warn_slowpath_common+0x73/0xb0
    [] ? pvclock_clocksource_read+0x49/0x90
    [] ? alloc_arch_preferred_bootmem+0x27/0x45
    [] ? ___alloc_bootmem_nopanic+0x39/0xc9
    [] ? ___alloc_bootmem+0x9/0x2f
    [] ? xen_init_IRQ+0x25/0x61
    [] ? start_kernel+0x1b5/0x29e
    ---[ end trace 4eaa2a86a8e2da22 ]---

    Acked-by: Jeremy Fitzhardinge
    Tested-by: Christian Kujau
    Reported-by: Christian Kujau
    Signed-off-by: Pekka Enberg
    Cc: lists@nerdbynature.de
    Cc: jeremy.fitzhardinge@citrix.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Pekka Enberg
     

30 Jun, 2009

6 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
    ide: memory overrun in ide_get_identity_ioctl() on big endian machines using ioctl HDIO_OBSOLETE_IDENTITY
    ide: fix resume for CONFIG_BLK_DEV_IDEACPI=y
    ide-cd: handle fragmented packet commands gracefully
    ide: always kill the whole request on error
    ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests

    Linus Torvalds
     
  • …tl HDIO_OBSOLETE_IDENTITY

    This patch fixes a memory overrun in function ide_get_identity_ioctl() which
    chooses the size of a memory buffer depending on the ioctl command that led
    to the function call, however, passes that buffer to a function which needs the
    buffer size to be always chosen unconditionally.

    Due to conditional compilation the memory overrun can only happen on big endian
    machines. The error can be triggered using ioctl HDIO_OBSOLETE_IDENTITY. Usage
    of ioctl HDIO_GET_IDENTITY is safe.

    Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
    Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Christian Engelmayer
     
  • commit 2f0d0fd2a605666d38e290c5c0d2907484352dc4 ("ide-acpi: cleanup
    do_drive_get_GTF()") didn't account for the lack of hwif->acpidata
    check in generic_ide_suspend() [ indirect user of do_drive_get_GTF()
    through ide_acpi_exec_tfs() ] resulting in broken resume when ACPI
    support is enabled but ACPI data is unavailable.

    Fix it by adding ide_port_acpi() helper for checking if port needs
    ACPI handling and cleaning generic_ide_{suspend,resume}() to use it
    instead of hiding hwif->acpidata and ide_noacpi checks in IDE ACPI
    helpers (this should help in preventing similar bugs in the future).

    While at it:
    - kill superfluous debugging printks in ide_acpi_{get,push}_timing()

    Reported-and-tested-by: Etienne Basset
    Also-reported-and-tested-by: Jeff Chua
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     
  • * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
    backlight: Fix tdo24m crash on kmalloc

    Linus Torvalds
     
  • FYI, there's a post-rc1 build regression with certain configs:

    drivers/built-in.o: In function `pci_hp_deregister':
    (.text+0xb166): undefined reference to `pci_hp_remove_module_link'
    drivers/built-in.o: In function `pci_hp_deregister':
    (.text+0xb19f): undefined reference to `pci_destroy_slot'
    drivers/built-in.o: In function `__pci_hp_register':
    (.text+0xb583): undefined reference to `pci_create_slot'
    drivers/built-in.o: In function `__pci_hp_register':
    (.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
    make: *** [.tmp_vmlinux1] Error 1

    Caused by:

    | 2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit
    | commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc
    | Date: Thu Jun 25 13:25:36 2009 +0200
    |
    | eeepc-laptop: Register as a pci-hotplug device

    which changed the driver to use the PCI hotplug infrastructure, but
    didn't do a good job on the Kconfig rules.

    Signed-off-by: Ingo Molnar
    Acked-by: Randy Dunlap
    Acked-by: Len Brown
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Currently we reinit the ldisc on final tty close which is what the old code
    did to ensure that if the device retained its termios settings then it had the
    right ldisc. tty_ldisc_reinit does that but also leaves us with the reset
    ldisc reference which is then leaked.

    At this point we know the port will be recycled so we can kill the ldisc
    off completely rather than try and add another ldisc free up when the kref
    count hits zero.

    At this point it is safe to keep the ldisc closed as tty_ldisc waiting
    methods are only used from the user side, and as the final close we are
    the last such reference. Interrupt/driver side methods will always use the
    non wait version and get back a NULL.

    Found with kmemleak and investigated/identified by Catalin Marinas.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

29 Jun, 2009

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    be2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames.
    gro: Flush GRO packets in napi_disable_pending path
    inet: Call skb_orphan before tproxy activates
    mac80211: Use rcu_barrier() on unload.
    sunrpc: Use rcu_barrier() on unload.
    bridge: Use rcu_barrier() instead of syncronize_net() on unload.
    ipv6: Use rcu_barrier() on module unload.
    decnet: Use rcu_barrier() on module unload.
    sky2: Fix checksum endianness
    mdio add missing GPL flag
    sh_eth: remove redundant test on unsigned
    fsl_pq_mdio: Fix fsl_pq_mdio to work with modules
    ipv6: avoid wraparound for expired preferred lifetime
    tcp: missing check ACK flag of received segment in FIN-WAIT-2 state
    atl1*: add device_set_wakeup_enable to atl1*_set_wol
    Phonet: generate Netlink RTM_DELADDR when destroying a device
    Phonet: publicize the Netlink notification function
    Revert "veth: prevent oops caused by netdev destructor"
    cpmac: fix compilation failure introduced with netdev_ops conversion
    ipsec: Fix name of CAST algorithm

    Linus Torvalds
     
  • While testing the driver on PPC, we ran into a crash with LRO, Jumbo frames.
    With CONFIG_PPC_64K_PAGES configured (a default in PPC), MAX_SKB_FRAGS drops to 3 and we were crossing the array limits on skb_shinfo(skb)->frags[].
    Now we coalesce the frags from the same physical page into one slot in
    skb_shinfo(skb)->frags[] and go to the next index when the frag is from

    different physical page.

    This patch is against the net-2.6 tree.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • * git://git.infradead.org/iommu-2.6:
    intel-iommu: fix Identity Mapping to be arch independent

    Linus Torvalds
     
  • * 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
    leds: Futher document blink_set
    leds: Add options to have GPIO LEDs start on or keep their state
    leds: LED driver for National Semiconductor LP3944 Funlight Chip
    leds: pca9532 - Indent using tabs, not spaces.
    leds: Remove an orphan Kconfig entry
    leds: Further document parameters for blink_set()
    leds: alix-leds2 fixed for Award BIOS
    leds: leds-gpio - fix a section mismatch
    leds: add the sysfs interface into the leds-bd2802 driver for changing wave pattern and led current.
    leds: change the license information
    leds: fix led-bd2802 errors while resuming

    Linus Torvalds
     

27 Jun, 2009

5 commits

  • There are some devices in the wild that clear the DRQ bit during the
    last word of a packet command and therefore could use a "second chance"
    for that last word of data to be xferred instead of simply failing the
    request. Do that by attempting to suck in those last bytes in PIO mode.

    In addition, the ATA_ERR bit has to be cleared for we cannot be sure the
    data is valid otherwise.

    See http://bugzilla.kernel.org/show_bug.cgi?id=13399 for details.

    Signed-off-by: Borislav Petkov
    Acked-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Borislav Petkov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    amd64_edac: misc small cleanups
    amd64_edac: fix ecc_enable_override handling
    amd64_edac: check only ECC bit in amd64_determine_edac_cap

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (29 commits)
    powerpc/rtas: Fix watchdog driver temperature read functionality
    powerpc/mm: Fix potential access to freed pages when using hugetlbfs
    powerpc/440: Fix warning early debug code
    powerpc/of: Fix usage of dev_set_name() in of_device_alloc()
    powerpc/pasemi: Use raw spinlock in SMP TB sync
    powerpc: Use one common impl. of RTAS timebase sync and use raw spinlock
    powerpc/rtas: Turn rtas lock into a raw spinlock
    powerpc: Add irqtrace support for 32-bit powerpc
    powerpc/BSR: Fix BSR to allow mmap of small BSR on 64k kernel
    powerpc/BSR: add 4096 byte BSR size
    powerpc: Map more memory early on 601 processors
    powerpc/pmac: Fix DMA ops for MacIO devices
    powerpc/mm: Make k(un)map_atomic out of line
    powerpc: Fix mpic alloc warning
    powerpc: Fix output from show_regs
    powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP
    powerpc/amigaone: Limit ISA I/O range to 4k in the device tree
    powerpc/warp: Platform fix for i2c change
    powerpc: Have git ignore generated files from dtc compile
    powerpc/mpic: Fix mapping of "DCR" based MPIC variants
    ...

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: video: prevent NULL deref in acpi_get_pci_dev()
    eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go
    eeepc-laptop: get the right value for CMSG
    eeepc-laptop: makes get_acpi() returns -ENODEV
    eeepc-laptop: right parent device
    eeepc-laptop: rfkill refactoring
    eeepc-laptop.c: use pr_fmt and pr_
    eeepc-laptop: Register as a pci-hotplug device

    Linus Torvalds
     
  • sky2 driver on PowerPC targets floods kernel log with following errors:

    eth1: hw csum failure.
    Call Trace:
    [ef84b8a0] [c00075e4] show_stack+0x50/0x160 (unreliable)
    [ef84b8d0] [c02fa178] netdev_rx_csum_fault+0x3c/0x5c
    [ef84b8f0] [c02f6920] __skb_checksum_complete_head+0x7c/0x84
    [ef84b900] [c02f693c] __skb_checksum_complete+0x14/0x24
    [ef84b910] [c0337e08] tcp_v4_rcv+0x4c8/0x6f8
    [ef84b940] [c031a9c8] ip_local_deliver+0x98/0x210
    [ef84b960] [c031a788] ip_rcv+0x38c/0x534
    [ef84b990] [c0300338] netif_receive_skb+0x260/0x36c
    [ef84b9c0] [c025de00] sky2_poll+0x5dc/0xcf8
    [ef84ba20] [c02fb7fc] net_rx_action+0xc0/0x144

    The NIC is Yukon-2 EC chip revision 1.

    Converting checksum field from le16 to CPU byte order fixes the issue.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     

26 Jun, 2009

24 commits

  • - cleanup debug calls
    - shorten function names
    - cleanup error exit paths

    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • amd64_check_ecc_enabled() returns non-zero status when ECC
    checking/correcting is disabled and this fails further loading of the
    driver even when 'ecc_enable_override' boot param is used.

    Fix that by clearing return status in that case.

    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • Checking whether the machine is using ECC enabled DRAM is done through
    testing the DimmEccEn bit in the DRAM Cfg Low register (F2x[1,0]90). Do
    that instead of testing all bits from the DimmEccEn upwards.

    Also, remove mci->edac_cap assignment and use value returned from
    amd64_determine_edac_cap().

    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • Drop the e820 scanning and use existing function for finding valid
    RAM regions to add to 1:1 mapping.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • * Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_kill_rq()
    and ide_floppy_do_request() for failed requests.
    [ bugfix part ]

    * Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_do_devset()
    and ide_complete_drive_reset(). Then remove ide_rq_bytes().
    [ cleanup part ]

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     
  • Such requests should be failed with -EIO (like all other requests
    in this function) instead of being completed successfully.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     
  • Using the RTAS watchdog driver to read out the temperature crashes
    on a PXCAB:

    Unable to handle kernel paging request for data at address 0xfe347b50
    Faulting instruction address: 0xc00000000001af64
    Oops: Kernel access of bad area, sig: 11 [#1]

    The wrong usage of "(void *)__pa(&temperature)" in rtas_call() is
    removed by using the function rtas_get_sensor() which does the
    right thing.

    Signed-off-by: Adrian Reber
    Acked-by: Utz Bacher
    Signed-off-by: Benjamin Herrenschmidt

    Adrian Reber
     
  • On Mon, Nov 17, 2008 at 01:26:13AM -0600, Sonny Rao wrote:
    > On Fri, Nov 07, 2008 at 04:28:29PM +1100, Paul Mackerras wrote:
    > > Sonny Rao writes:
    > >
    > > > Fix the BSR driver to allow small BSR devices, which are limited to a
    > > > single 4k space, on a 64k page kernel. Previously the driver would
    > > > reject the mmap since the size was smaller than PAGESIZE (or because
    > > > the size was greater than the size of the device). Now, we check for
    > > > this case use remap_4k_pfn(). Also, take out code to set vm_flags,
    > > > as the remap_pfn functions will do this for us.
    > >
    > > Thanks.
    > >
    > > Do we know that the BSR size will always be 4k if it's not a multiple
    > > of 64k? Is it possible that we could get 8k, 16k or 32k or BSRs?
    > > If it is possible, what does the user need to be able to do? Do they
    > > just want to map 4k, or might then want to map the whole thing?
    >
    >
    > Hi Paul, I took a look at changing the driver to reject a request for
    > mapping more than a single 4k page, however the only indication we get
    > of the requested size in the mmap function is the vma size, and this
    > is always one page at minimum. So, it's not possible to determine if
    > the user wants one 4k page or more. As I noted in my first response,
    > there is only one case where this is even possible and I don't think
    > it is a significant concern.
    >
    > I did notice that I left out the check to see if the user is trying to
    > map more than the device length, so I fixed that. Here's the revised
    > patch.

    Alright, I've reworked this now so that if we get one of these cases
    where there's a bsr that's > 4k and < 64k on a 64k kernel we'll only
    advertise that it is a 4k BSR to userspace. I think this is the best
    solution since user programs are only supposed to look at sysfs to
    determine how much can be mapped, and libbsr does this as well.

    Please consider for 2.6.31 as a fix, thanks.

    Signed-off-by: Benjamin Herrenschmidt

    Sonny Rao
     
  • Add a 4096 byte BSR size which will be used on new machines. Also, remove
    the warning when we run into an unknown size, as this can spam the kernel
    log excessively.

    Signed-off-by: Sonny Rao
    Signed-off-by: Benjamin Herrenschmidt

    Sonny Rao
     
  • The macio_dev's created to map devices inside the MacIO ASICs
    don't have proper dma_ops. This causes crashes on some machines
    since the SCSI code calls dma_map_* on our behalf using the
    device we hang from.

    This fixes it by copying the parent PCI device dma_ops into
    the macio_dev when creating it.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • ref: http://thread.gmane.org/gmane.linux.kernel/857228/focus=857468

    When the ACPI video driver initializes, it does a namespace walk
    looking for for supported devices. When we find an appropriate
    handle, we walk up the ACPI tree looking for a PCI root bus, and
    then walk back down the PCI bus, assuming that every device
    inbetween is a P2P bridge.

    This assumption is not correct, and is reported broken on at
    least:

    Dell Latitude E6400
    ThinkPad X61
    Dell XPS M1330

    Add a NULL deref check to prevent boot panics.

    Reported-by: Alessandro Suardi
    Signed-off-by: Troy Moure
    Signed-off-by: Alex Chiang
    Signed-off-by: Len Brown

    Troy Moure
     
  • Signed-off-by: Janne Grunau
    Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Corentin Chary
     
  • CMSG is an ACPI method used to find features available on
    an Eee PC. But some features are never repported, even if present.

    If the getter of a feature is present, this patch will set
    the corresponding bit in cmsg.

    Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Corentin Chary
     
  • If there is there is no getter defined, get_acpi()
    will return -ENODEV.

    Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Corentin Chary
     
  • Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Corentin Chary
     
  • Refactor rfkill code, because we'll add another
    rfkill for wwan3g later.

    Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Corentin Chary
     
  • Convert the unusual printk(EEEPC_ uses to
    the more standard pr_fmt and pr_(.

    Signed-off-by: Joe Perches
    Signed-off-by: Corentin Chary
    Signed-off-by: Len Brown

    Joe Perches
     
  • The eee contains a logically (but not physically) hotpluggable PCIe slot.
    Currently this is handled by adding or removing the PCI device in response
    to rfkill events, but if a user has forced pciehp to bind to it (with the
    force=1 argument) then both drivers will try to handle the event and
    hilarity (in the form of oopses) will ensue. This can be avoided by having
    eee-laptop register the slot as a hotplug slot. Only one of pciehp and
    eee-laptop will successfully register this, avoiding the problem.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Corentin Chary
    Tested-by: Darren Salt
    Signed-off-by: Randy Dunlap
    Signed-off-by: Len Brown

    Corentin Chary
     
  • Add missing GPL flag and description.

    mdio: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint

    Signed-off-by: Nicolas Reinecke das-labor.org>
    Acked-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Nicolas Reinecke
     
  • Unsigned boguscnt cannot be less than 0.

    Signed-off-by: Roel Kluin
    Signed-off-by: David S. Miller

    roel kluin
     
  • This patch fixes the case when ucc_geth or gianfar are compiled
    as modules. Without this patch the call to phy_connect() fails.

    Signed-off-by: Ionut Nicu
    Acked-by: Andy Fleming
    Signed-off-by: David S. Miller

    Ionut Nicu
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (28 commits)
    drm: remove unused #include 's
    drm/radeon: fix driver initialization order so radeon kms can be builtin
    drm: Fix shifts which were miscalculated when converting from bitfields.
    drm/radeon: Clear surface registers at initialization time.
    drm/radeon: Don't initialize acceleration related fields of struct fb_info.
    drm/radeon: fix radeon kms framebuffer device
    drm/i915: initialize fence registers to zero when loading GEM
    drm/i915: Fix HDMI regression introduced in new chipset support
    drm/i915: fix LFP data fetch
    drm/i915: set TV detection mode when tv is already connected
    drm/i915: Catch up to obj_priv->page_list rename in disabled debug code.
    drm/i915: Fix size_t handling in off-by-default debug printfs
    drm/i915: Don't change the blank/sync width when calculating scaled modes
    drm/i915: Add support for changing LVDS panel fitting using an output property.
    drm/i915: correct suspend/resume ordering
    drm/i915: Add missing dependency on Intel AGP support.
    drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O.
    drm/i915: Clarify error returns from display port aux channel I/O
    drm/i915: Add CLKCFG register definition
    drm/i915: Split array of DAC limits into separate structures.
    ...

    Linus Torvalds
     
  • This commit 335f8514f200e63d689113d29cb7253a5c282967 has stopped
    properly checking if there is any usb serial associated with the tty in
    the close function. It happens the close function is called by releasing
    the terminal right after opening the device fails.

    As an example, open fails with a non-existing device, when probe has
    never been called, because the device has never been plugged. This is
    common in systems with static modules and no udev.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Thadeu Lima de Souza Cascardo
     
  • This commit 10077d4a6674f535abdbe25cdecb1202af7948f1 has stopped
    checking if there was a valid acm device associated to the tty, which is
    not true right after open fails and tty subsystem tries to close the
    device.

    As an example, open fails with a non-existing device, when probe has
    never been called, because the device has never been plugged. This is
    common in systems with static modules and no udev.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Thadeu Lima de Souza Cascardo