1. 04 11月, 2011 23 次提交
    • J
      hwmon: (lm90) Make code more readable · b2589ab0
      Jean Delvare 提交于
      Clean up the code to make it more readable:
      * Remove reg_ and new_ prefixes from variable names, they made the
        names longer, causing extra line breaks, while not adding much
        value.
      * Introduce struct device dev* = &client->dev in two functions, to
        avoid repeating client->dev everywhere in these functions.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      b2589ab0
    • J
      hwmon: (lm90) Fix warnings · 8dc089d6
      Jean Delvare 提交于
      With some configuration option combinations, we get the following
      warnings:
      
      drivers/hwmon/lm90.c: In function 'lm90_detect':
      drivers/hwmon/lm90.c:1114: warning: 'chip_id' may be used uninitialized
      in this function
      drivers/hwmon/lm90.c:1114: warning: 'reg_config1' may be used
      uninitialized in this function
      drivers/hwmon/lm90.c:1114: warning: 'reg_convrate' may be used
      uninitialized in this function
      drivers/hwmon/lm90.c:1187: warning: 'reg_emerg2' may be used
      uninitialized in this function
      drivers/hwmon/lm90.c:1187: warning: 'reg_status2' may be used
      uninitialized in this function
      
      We can solve these easily by reading the register values first and
      checking for errors later. These errors should be very rare, even in
      the case of failed detection, so this change has no impact on
      performance. And this makes checkpatch.pl happier.
      Reported-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      8dc089d6
    • J
      hwmon: (ibmaem) Avoid repeated memory allocations · da8ebe4e
      Jean Delvare 提交于
      Preallocate a buffer for the response to sensor reads, and reuse it
      for each read instead of allocating a new one each time. This should
      be faster and should also avoid memory fragmentation.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NDarrick J. Wong <djwong@us.ibm.com>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      da8ebe4e
    • J
      hwmon: (ibmaem) Make instance initializations independent · 9d84c9e8
      Jean Delvare 提交于
      There is no good reason that I can see why the failure to initialize
      one instance should prevent other instances from being initialized.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NDarrick J. Wong <djwong@us.ibm.com>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      9d84c9e8
    • J
      hwmon: (ibmaem) Fix error paths · 547a1c99
      Jean Delvare 提交于
      I am under the impression that error paths in functions
      aem_init_aem1_inst() and aem_init_aem2_inst() are incorrect. In
      several cases, the function returns 0 on error, which I suspect is
      not intended. Fix this by properly tracking error codes.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NDarrick J. Wong <djwong@us.ibm.com>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      547a1c99
    • J
      hwmon: (lm73) Make detection less problematic · 24d6e2a8
      Jean Delvare 提交于
      Word reads can cause trouble with some I2C devices, so do as much
      detection as we can using only byte reads, and only use a word read in
      the end to confirm the positive match. Also properly handle read
      errors.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      Cc: Robert Casanova <robertcasanova@nanometrics.ca>
      24d6e2a8
    • D
      hwmon: Avoid building drivers for powerpc that read/write ISA addresses · 746cdfbf
      Dean Nelson 提交于
      A modprobe of hwmon drivers that read/write ISA addresses on a powerpc results
      in a kernel Oops. These reads/writes are being done via the inb()/in_8() and
      outb()/out_8() macros.
      
      Prevent these drivers from being built for powerpc.
      Signed-off-by: NDean Nelson <dnelson@redhat.com>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      746cdfbf
    • L
      Merge git://git.samba.org/sfrench/cifs-2.6 · 1a67a573
      Linus Torvalds 提交于
      * git://git.samba.org/sfrench/cifs-2.6:
        cifs: Assume passwords are encoded according to iocharset (try #2)
        CIFS: Fix the VFS brlock cache usage in posix locking case
        [CIFS] Update cifs version to 1.76
        CIFS: Remove extra mutex_unlock in cifs_lock_add_if
      1a67a573
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6dbbd925
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
        be2net: Add detect UE feature for Lancer
        be2net: Prevent CQ full condition for Lancer
        be2net: Fix disabling multicast promiscous mode
        be2net: Fix endian issue in RX filter command
        af_packet: de-inline some helper functions
        MAINTAINERS: Add can-gw include to maintained files
        net: Add back alignment for size for __alloc_skb
        net: add missing bh_unlock_sock() calls
        l2tp: fix race in l2tp_recv_dequeue()
        ixgbevf: Update release version
        ixgbe: DCB, return max for IEEE traffic classes
        ixgbe: fix reading of the buffer returned by the firmware
        ixgbe: Fix compiler warnings
        ixgbe: fix smatch splat due to missing NULL check
        ixgbe: fix disabling of Tx laser at probe
        ixgbe: Fix link issues caused by a reset while interface is down
        igb: Fix for I347AT4 PHY cable length unit detection
        e100: make sure vlan support isn't advertised on old adapters
        e1000e: demote a debugging WARN to a debug log message
        net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c
        ...
      6dbbd925
    • P
      be2net: Add detect UE feature for Lancer · e1cfb67a
      Padmanabh Ratnakar 提交于
      Add code to detect UE in case of Lancer.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1cfb67a
    • P
      be2net: Prevent CQ full condition for Lancer · 9372cacb
      Padmanabh Ratnakar 提交于
      Indicate to HW that the CQ is cleaned up before posting new RX buffers.
      This prevents the HW to go into CQ full error condition.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9372cacb
    • P
      be2net: Fix disabling multicast promiscous mode · 1610c79f
      Padmanabh Ratnakar 提交于
      If user tries to disable multicast promiscous mode, the adapter remains
      in this mode as resetting the multicast promiscous mode was missing
      in RX filter command. Fixed this.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1610c79f
    • P
      be2net: Fix endian issue in RX filter command · 016f97b1
      Padmanabh Ratnakar 提交于
      Use cpu_to_le32() for mcast_num field in RX filter command as this
      field is of type u32.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      016f97b1
    • D
      5b67b3c0
    • O
      af_packet: de-inline some helper functions · eea49cc9
      Olof Johansson 提交于
      This popped some compiler errors due to mismatched prototypes. Just
      remove most manual inlines, the compiler should be able to figure out
      what makes sense to inline and not.
      
      net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
      net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
      net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
      net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
      net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
      net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
      net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
      net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Cc: Chetan Loke <loke.chetan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eea49cc9
    • O
      MAINTAINERS: Add can-gw include to maintained files · c49b82da
      Oliver Hartkopp 提交于
      Commit c1aabdf3 (can-gw: add netlink based
      CAN routing) added a new include file that's neither referenced by any of
      the CAN maintainers.
      Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c49b82da
    • T
      net: Add back alignment for size for __alloc_skb · bc417e30
      Tony Lindgren 提交于
      Commit 87fb4b7b (net: more
      accurate skb truesize) changed the alignment of size. This
      can cause problems at least on some machines with NFS root:
      
      Unhandled fault: alignment exception (0x801) at 0xc183a43a
      Internal error: : 801 [#1] PREEMPT
      Modules linked in:
      CPU: 0    Not tainted  (3.1.0-08784-g5eeee4a #733)
      pc : [<c02fbba0>]    lr : [<c02fbb9c>]    psr: 60000013
      sp : c180fef8  ip : 00000000  fp : c181f580
      r10: 00000000  r9 : c044b28c  r8 : 00000001
      r7 : c183a3a0  r6 : c1835be0  r5 : c183a412  r4 : 000001f2
      r3 : 00000000  r2 : 00000000  r1 : ffffffe6  r0 : c183a43a
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 0005317f  Table: 10004000  DAC: 00000017
      Process swapper (pid: 1, stack limit = 0xc180e270)
      Stack: (0xc180fef8 to 0xc1810000)
      fee0:                                                       00000024 00000000
      ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
      ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
      ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
      ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
      ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
      ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
      ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
      ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
      Function entered at [<c02fbba0>] from [<c019dfc4>]
      Function entered at [<c019dfc4>] from [<c01f34f4>]
      Function entered at [<c01f34f4>] from [<c01f4918>]
      Function entered at [<c01f4918>] from [<c0008758>]
      Function entered at [<c0008758>] from [<c04b2224>]
      Function entered at [<c04b2224>] from [<c001056c>]
      Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)
      
      Here PC is at __alloc_skb and &shinfo->dataref is unaligned because
      skb->end can be unaligned without this patch.
      
      As explained by Eric Dumazet <eric.dumazet@gmail.com>, this happens
      only with SLOB, and not with SLAB or SLUB:
      
      * Eric Dumazet <eric.dumazet@gmail.com> [111102 15:56]:
      >
      > Your patch is absolutely needed, I completely forgot about SLOB :(
      >
      > since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
      > power of two.
      >
      > [   60.305763] malloc(size=385)->ffff880112c11e38 ksize=386 -> nsize=2
      > [   60.305921] malloc(size=385)->ffff88007c92ce28 ksize=386 -> nsize=2
      > [   60.306898] malloc(size=656)->ffff88007c44ad28 ksize=656 -> nsize=272
      > [   60.325385] malloc(size=656)->ffff88007c575868 ksize=656 -> nsize=272
      > [   60.325531] malloc(size=656)->ffff88011c777230 ksize=656 -> nsize=272
      > [   60.325701] malloc(size=656)->ffff880114011008 ksize=656 -> nsize=272
      > [   60.346716] malloc(size=385)->ffff880114142008 ksize=386 -> nsize=2
      > [   60.346900] malloc(size=385)->ffff88011c777690 ksize=386 -> nsize=2
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc417e30
    • E
      net: add missing bh_unlock_sock() calls · 918eb399
      Eric Dumazet 提交于
      Simon Kirby reported lockdep warnings and following messages :
      
      [104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
      preempt_count 00000101, exited with 00000102?
      
      [104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
      preempt_count 00000101, exited with 00000102?
      
      Problem comes from commit 0e734419
      (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)
      
      If inet_csk_route_child_sock() returns NULL, we should release socket
      lock before freeing it.
      
      Another lock imbalance exists if __inet_inherit_port() returns an error
      since commit 093d2823 ( tproxy: fix hash locking issue when using
      port redirection in __inet_inherit_port()) a backport is also needed for
      >= 2.6.37 kernels.
      Reported-by: NSimon Kirby <sim@hostway.ca>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Tested-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Balazs Scheidler <bazsi@balabit.hu>
      CC: KOVACS Krisztian <hidden@balabit.hu>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NSimon Kirby <sim@hostway.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      918eb399
    • E
      l2tp: fix race in l2tp_recv_dequeue() · e2e210c0
      Eric Dumazet 提交于
      Misha Labjuk reported panics occurring in l2tp_recv_dequeue()
      
      If we release reorder_q.lock, we must not keep a dangling pointer (tmp),
      since another thread could manipulate reorder_q.
      
      Instead we must restart the scan at beginning of list.
      Reported-by: NMisha Labjuk <spiked.yar@gmail.com>
      Tested-by: NMisha Labjuk <spiked.yar@gmail.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2e210c0
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · d6748066
      Linus Torvalds 提交于
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (37 commits)
        MIPS: O32: Provide definition of registers ta0 .. ta3.
        MIPS: perf: Add Octeon support for hardware perf.
        MIPS: perf: Add support for 64-bit perf counters.
        MIPS: perf: Reorganize contents of perf support files.
        MIPS: perf: Cleanup formatting in arch/mips/kernel/perf_event.c
        MIPS: Add accessor macros for 64-bit performance counter registers.
        MIPS: Add probes for more Octeon II CPUs.
        MIPS: Add more CPU identifiers for Octeon II CPUs.
        MIPS: XLR, XLS: Add comment for smp setup
        MIPS: JZ4740: GPIO: Check correct IRQ in demux handler
        MIPS: JZ4740: GPIO: Simplify IRQ demuxer
        MIPS: JZ4740: Use generic irq chip
        MIPS: Alchemy: remove all CONFIG_SOC_AU1??? defines
        MIPS: Alchemy: kill au1xxx.h header
        MIPS: Alchemy: clean DMA code of CONFIG_SOC_AU1??? defines
        MIPS, IDE: Alchem, au1xxx-ide: Remove pb1200/db1200 header dep
        MIPS: Alchemy: Redo PCI as platform driver
        MIPS: Alchemy: more base address cleanup
        MIPS: Alchemy: rewrite USB platform setup.
        MIPS: Alchemy: abstract USB block control register access
        ...
      
      Fix up trivial conflicts in:
      	arch/mips/alchemy/devboards/db1x00/platform.c
      	drivers/ide/Kconfig
      	drivers/mmc/host/au1xmmc.c
      	drivers/video/Kconfig
      	sound/mips/Kconfig
      d6748066
    • J
      edac: Only build sb_edac on 64-bit · f04c045f
      Josh Boyer 提交于
      The sb_edac driver is marginally useful on a 32-bit kernel, and
      currently has 64-bit divide compile errors when building that config.
      For now, make this build on only for 64-bit kernels.
      Signed-off-by: NJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f04c045f
    • L
      Merge branch 'next' of git://github.com/kernelslacker/cpufreq · 70c9f18c
      Linus Torvalds 提交于
      * 'next' of git://github.com/kernelslacker/cpufreq:
        [CPUFREQ] db8500: support all frequencies
        [CPUFREQ] db8500: remove unneeded for loop iteration over freq_table
        [CPUFREQ] ARM Exynos4210 PM/Suspend compatibility with different bootloaders
        [CPUFREQ] ARM: ux500: send cpufreq notification for all cpus
        [CPUFREQ] e_powersaver: Allow user to lower maximum voltage
        [CPUFREQ] e_powersaver: Check BIOS limit for CPU frequency
        [CPUFREQ] e_powersaver: Additional checks
        [CPUFREQ] exynos4210: Show list of available frequencies
      70c9f18c
    • L
      Merge branch 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6 · a0a4194c
      Linus Torvalds 提交于
      * 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6: (80 commits)
        mfd: Fix missing abx500 header file updates
        mfd: Add missing <linux/io.h> include to intel_msic
        x86, mrst: add platform support for MSIC MFD driver
        mfd: Expose TurnOnStatus in ab8500 sysfs
        mfd: Remove support for early drop ab8500 chip
        mfd: Add support for ab8500 v3.3
        mfd: Add ab8500 interrupt disable hook
        mfd: Convert db8500-prcmu panic() into pr_crit()
        mfd: Refactor db8500-prcmu request_clock() function
        mfd: Rename db8500-prcmu init function
        mfd: Fix db5500-prcmu defines
        mfd: db8500-prcmu voltage domain consumers additions
        mfd: db8500-prcmu reset code retrieval
        mfd: db8500-prcmu tweak for modem wakeup
        mfd: Add db8500-pcmu watchdog accessor functions for watchdog
        mfd: hwacc power state db8500-prcmu accessor
        mfd: Add db8500-prcmu accessors for PLL and SGA clock
        mfd: Move to the new db500 PRCMU API
        mfd: Create a common interface for dbx500 PRCMU drivers
        mfd: Initialize DB8500 PRCMU regs
        ...
      
      Fix up trivial conflicts in
      	arch/arm/mach-imx/mach-mx31moboard.c
      	arch/arm/mach-omap2/board-omap3beagle.c
      	arch/arm/mach-u300/include/mach/irqs.h
      	drivers/mfd/wm831x-spi.c
      a0a4194c
  2. 03 11月, 2011 17 次提交