13 May, 2008

1 commit

  • This adds PROP_CHARGE_COUNTER to the power supply class (documenting it
    as well). The OLPC battery driver uses this for spitting out its ACR
    values (in uAh). We have some rounding errors (the data sheet claims
    416.7, the math actually works out to 416.666667, so we're forced to
    choose between overflows or precision loss. I chose precision loss,
    and stuck w/ data sheet values), but I don't think anyone will care
    that much.

    Signed-off-by: Andres Salomon
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     

04 May, 2008

18 commits

  • Refuse to run with an EC < 0x44. We're playing it safe, and this is a pretty
    old EC version.

    Also, add a comment about why we're checking the EC version.

    Signed-off-by: Andres Salomon
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     
  • Move portions of the massive switch statement into functions. The layout of
    this thing has already caused one bug (a break in the wrong place), it needed
    to shrink.

    Signed-off-by: Andres Salomon
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     
  • This allows you to dump 0x60 bytes from the battery's EEPROM (starting at
    address 0x20). Note that it does an EC command for each byte, so it's pretty
    slow. OTOH, if you want to grab just a single byte from somewhere in the
    EEPROM, you can do something like:

    dd bs=1 count=1 skip=16 if=/sys/class/power_supply/olpc-battery/eeprom | od -x

    Userspace battery collection/logging information needs this.

    Signed-off-by: Andres Salomon
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     
  • This adds serial number support to the OLPC battery driver.

    Signed-off-by: David Woodhouse
    Signed-off-by: Andres Salomon
    Signed-off-by: Anton Vorontsov

    David Woodhouse
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
    clocksource: allow read access to available/current_clocksource
    clocksource: Fix permissions for available_clocksource
    hrtimer: remove duplicate helper function

    Linus Torvalds
     
  • A very small cleanup for mq_open.

    We do not have to call set_close_on_exit if we create the file
    descriptor right away with the flag set. We have a function for this
    now. The resulting code is smaller and a tiny bit faster.

    Signed-off-by: Ulrich Drepper
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • This replaces the duplicated arch-specific versions of "sys_pipe()" with
    one unified implementation. This removes almost 250 lines of duplicated
    code.

    It's marked __weak, so that *if* an architecture wants to override the
    default implementation it can do so by simply having its own replacement
    version, since many architectures use alternate calling conventions for
    the 'pipe()' system call for legacy reasons (ie traditional UNIX
    implementations often return the two file descriptors in registers)

    I still haven't changed the cris version even though Linus says the BKL
    isn't needed. The arch maintainer can easily do it if there are really
    no obstacles.

    Signed-off-by: Ulrich Drepper
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • Linus Torvalds
     
  • * git://git.infradead.org/battery-2.6:
    PMU battery: filenames in sysfs with spaces
    pda_power: add init and exit function callbacks

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes: (24 commits)
    Make constants in kernel/timeconst.h fixed 64 bits
    types: add C99-style constructors to
    xtensa: types: use for the xtensa architecture
    x86: types: use for the x86 architecture
    v850: types: use for the v850 architecture
    sparc64: types: use for the sparc64 architecture
    sparc: types: use for the sparc architecture
    sh: types: use for the sh architecture
    s390: types: use for the s390 architecture
    powerpc: types: use for the powerpc architecture
    parisc: types: use for the parisc architecture
    mn10300: types: use for the mn10300 architecture
    mips: types: use for the mips architecture
    m68k: types: use for the m68k architecture
    m32r: types: use for the m32r architecture
    ia64: types: use for the ia64 architecture
    h8300: types: use for the h8300 architecture
    frv: types: use for the frv architecture
    cris: types: use for the cris architecture
    blackfin: types: use for the blackfin architecture
    ...

    Linus Torvalds
     
  • Many thanks to Martin for his years of hosting. The pci list has moved to
    vger, along with what seems like the rest of the major Linux mailing lists.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Jesse Barnes
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
    slub: #ifdef simplification
    slabinfo: Support printout of the number of fallbacks
    slub: Whitespace cleanup and use of strict_strtoul

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
    rose: Wrong list_lock argument in rose_node seqops
    netns: Fix reassembly timer to use the right namespace
    netns: Fix device renaming for sysfs
    bnx2: Update version to 1.7.5.
    bnx2: Update RV2P firmware for 5709.
    bnx2: Zero out context memory for 5709.
    bnx2: Fix register test on 5709.
    bnx2: Fix remote PHY initial link state.
    bnx2: Refine remote PHY locking.
    bridge: forwarding table information for >256 devices
    tg3: Update version to 3.92
    tg3: Add link state reporting to UMP firmware
    tg3: Fix ethtool loopback test for 5761 BX devices
    tg3: Fix 5761 NVRAM sizes
    tg3: Use constant 500KHz MI clock on adapters with a CPMU
    hci_usb.h: fix hard-to-trigger race
    dccp: ccid2.c, ccid3.c use clamp(), clamp_t()
    net: remove NR_CPUS arrays in net/core/dev.c
    net: use get/put_unaligned_* helpers
    bluetooth: use get/put_unaligned_* helpers
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc32: Delete prom_stdin and prom_stdout.
    sparc32: More memory probing consolidation.
    sparc32: Kill totally unused memory information tables.
    sparc64: Fix syscall restart, for real...
    serial: Fix sparc driver name strings.
    sparc64: Stop creating dummy root PCI host controller devices.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    [POWERPC] Bolt in SLB entry for kernel stack on secondary cpus
    [POWERPC] PS3: Update ps3_defconfig
    [POWERPC] PS3: Remove unsupported wakeup sources
    [POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static
    [POWERPC] PS3: Add time include to lpm
    [POWERPC] Fix slb.c compile warnings
    [POWERPC] Xilinx: Fix compile warnings
    [POWERPC] Squash build warning for print of resource_size_t in fsl_soc.c
    [RAPIDIO] fix current kernel-doc notation
    [POWERPC] 86xx: mpc8610_hpcd: add support for PCI Express x8 slot
    Fix a potential issue in mpc52xx uart driver
    [POWERPC] mpc5200: Allow for fixed speed MII configurations
    [POWERPC] 86xx: Fix the wrong serial1 interrupt for 8610 board

    Linus Torvalds
     
  • There is no harm, when users can read the info and we ask often enough
    during debugging for this kind of information.

    Signed-off-by: Heiko Carstens
    Cc: Andrew Morton
    Cc: John Stultz
    Signed-off-by: Thomas Gleixner

    Heiko Carstens
     
  • File permissions for
    /sys/devices/system/clocksource/clocksource0/available_clocksource
    are 600 which allows write access. But this is in fact a read only
    file. So change permissions to 400.

    Signed-off-by: Heiko Carstens
    Cc: John Stultz
    Cc: Andrew Morton
    Signed-off-by: Thomas Gleixner

    Heiko Carstens
     
  • The helper function hrtimer_callback_running() is used in
    kernel/hrtimer.c as well as in the updated net/can/bcm.c which now
    supports hrtimers. Moving the helper function to hrtimer.h removes the
    duplicate definition in the C-files.

    Signed-off-by: Oliver Hartkopp
    Cc: David Miller
    Signed-off-by: Thomas Gleixner

    Oliver Hartkopp
     

03 May, 2008

21 commits

  • In rose_node_start() as well as in rose_node_stop() __acquires() and
    spin_lock_bh() were wrongly passing rose_neigh_list_lock instead of
    rose_node_list_lock arguments.

    Signed-off-by: Bernard Pidoux
    Signed-off-by: David S. Miller

    Bernard Pidoux
     
  • This trivial fix retrieves the network namespace from frag queue
    and use it to get the network device in the right namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • When a netdev is moved across namespaces with the
    'dev_change_net_namespace' function, the 'device_rename' function is
    used to fixup kobject and refresh the sysfs tree. The device_rename
    function will call kobject_rename and this one will check if there is
    an object with the same name and this is the case because we are
    renaming the object with the same name.

    The use of 'device_rename' seems for me wrong because we usually don't
    rename it but just move it across namespaces. As we just want to do a
    mini "netdev_[un]register", IMO the functions
    'netdev_[un]register_kobject' should be used instead, like an usual
    network device [un]registering.

    This patch replace device_rename by netdev_unregister_kobject,
    followed by netdev_register_kobject.

    The netdev_register_kobject will call device_initialize and will raise
    a warning indicating the device was already initialized. In order to
    fix that, I split the device initialization into a separate function
    and use it together with 'netdev_register_kobject' into
    register_netdevice. So we can safely call 'netdev_register_kobject' in
    'dev_change_net_namespace'.

    This fix will allow to properly use the sysfs per namespace which is
    coming from -mm tree.

    Signed-off-by: Daniel Lezcano
    Acked-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The new RV2P firmware fixes 2 issues:

    1. The jumbo rx buffer page size is now configurable and set to the
    proper PAGE_SIZE. Before, it was assumed to be always 4K.

    2. Driver sometimes would crash when receiving jumbo packets mixed
    with firmware management packets. This was caused by the old
    firmware DMA'ing to the wrong address.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • We should zero out the context memory for 5709 before each reset. When
    we resume after suspend for example, the memory may not be zero and the
    chip may not function correctly.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The register BNX2_CTX_STATUS (0x1004) should be skipped on 5709 as it
    contains reserved bits.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • On some remote PHY blade systems, the driver receives no initial link
    interrupt. As a result, the GMII/MII MAC mode does not get setup properly.
    To fix this problem, we add an initial poll of the link state after chip
    reset.

    With this change, the setting of the initial carrier state in the init
    code can be eliminated.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • bnx2_set_remote_link() should be called under bp->phy_lock to protect
    against concurrent polling and interrupt calls. This change is needed
    by the next patch which will add one initial poll of the remote PHY
    link status.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The forwarding table binary interface (my bad choice), only exposes
    the port number of the first 8 bits. The bridge code was limited to
    256 ports at the time, but now the kernel supports up 1024 ports, so
    the upper bits are lost when doing:

    brctl showmacs

    The fix is to squeeze the extra bits into small hole left in data
    structure, to maintain binary compatiablity.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • This patch updates the version number to 3.92.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • All variants of the 5714, 5715, and 5780 offer a feature called the
    "Universal Management Port". This feature is implemented in firmware
    and is largely transparent to the driver, except...

    It turns out that the UMP firmware needs to know the current status
    of the link. Because the firmware cannot touch the PHY registers while
    the driver is in control of the device, it needs the driver to report
    link status changes through an additional handshaking mechanism.
    Without this handshake, it has been observed in the field that the UMP
    firmware will not operate correctly.

    This patch implements the new handshake with the UMP firmware. Since
    the handshake uses the same mechanism ASF heartbeats use, code was
    added to detect and wait for completion of a pending previous event.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • A CPMU related loopback test bug existed for AX revisions of the 5761.
    While that errata has been fixed, the CPMU still slows down the core
    clock too far to run the loopback test successfully. This patch
    disables the CPMU LINK_SPEED mode just like we do with the AX
    revisions of the 5761 and all revisions of the 5784.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The 5761 NVRAM sizes assigned to the nvram_size member are half as big
    as they should be. This patch corrects the NVRAM sizes and replaces
    the hardcoded constants with preprocessor constants for readability.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The MI clock is not configured correctly on adapters with the CPMU
    present. The tg3 driver has code which statically sets the MI clock to
    be a fraction of the speed at which the core clock is running.
    However, the CPMU can change the adapter's core clock frequency based
    on operating conditions. Consequently, the MI will run slow when the
    core's clock has been slowed down.

    There is a new 500KHz constant frequency clock available on adapters
    with a CPMU. This patch removes the static core clock scaling and
    configures the MI clock to use this new 500KHz clock instead.

    Running the MI clock at slower speeds will not directly result in data
    corruption, but it does challenge the PHY read and write routine timeouts.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • If someone tries to _urb_unlink while _urb_queue_head is running, he'll see
    _urb->queue == NULL and fail to do any locking. Prevent that from happening
    by strategically placed barriers.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Pavel Machek
     
  • Makes the intention of the nested min/max clear.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Remove the fixed size channels[NR_CPUS] array in net/core/dev.c and
    dynamically allocate array based on nr_cpu_ids.

    Signed-off-by: Mike Travis
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Mike Travis
     
  • By changing drivers/power/pmu_battery.c I now have '_' instead of
    ' ' (spaces) in /sys:

    /sys/devices/platform/pmu-battery.0/power_supply/PMU_battery_0
    /sys/class/power_supply/PMU_battery_0

    I'm still not sure if some userspace tool out there uses the old paths and
    will break now.

    Signed-off-by: Christian Kujau
    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Christian Kujau
     
  • This adds init/exit function callbacks to pda_power, to
    provide a place where the platform code can request/free
    GPIOs that it wants to use in the is_ac_online, is_usb_online
    and set_charge functions.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Anton Vorontsov

    Philipp Zabel
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison