1. 04 12月, 2009 11 次提交
    • C
      SUNRPC: Use TCP for local rpcbind upcalls · 2a76b3bf
      Chuck Lever 提交于
      Use TCP with the soft connect semantic for local rpcbind upcalls so
      the kernel can detect immediately if the local rpcbind daemon is not
      running.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      2a76b3bf
    • C
      SUNRPC: Use a cached RPC client and transport for rpcbind upcalls · c526611d
      Chuck Lever 提交于
      The kernel's rpcbind client creates and deletes an rpc_clnt and its
      underlying transport socket for every upcall to the local rpcbind
      daemon.
      
      When starting a typical NFS server on IPv4 and IPv6, the NFS service
      itself does three upcalls (one per version) times two upcalls (one
      per transport) times two upcalls (one per address family), making 12,
      plus another one for the initial call to unregister previous NFS
      services.  Starting the NLM service adds an additional 13 upcalls,
      for similar reasons.
      
      (Currently the NFS service doesn't start IPv6 listeners, but it will
      soon enough).
      
      Instead, let's create an rpc_clnt for rpcbind upcalls during the
      first local rpcbind query, and cache it.  This saves the overhead of
      creating and destroying an rpc_clnt and a socket for every upcall.
      
      The new logic also prevents the kernel from attempting an RPCB_SET or
      RPCB_UNSET if it knows from the start that the local portmapper does
      not support rpcbind protocol version 4.  This will cut down on the
      number of rpcbind upcalls in legacy environments.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      c526611d
    • C
      SUNRPC: Simplify synopsis of rpcb_local_clnt() · 5a462115
      Chuck Lever 提交于
      Clean up: At one point, rpcb_local_clnt() handled IPv6 loopback
      addresses too, but it doesn't any more; only IPv4 loopback is used
      now.  Get rid of the @addr and @addrlen arguments to
      rpcb_local_clnt().
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5a462115
    • C
      SUNRPC: Allow RPCs to fail quickly if the server is unreachable · 09a21c41
      Chuck Lever 提交于
      The kernel sometimes makes RPC calls to services that aren't running.
      Because the kernel's RPC client always assumes the hard retry semantic
      when reconnecting a connection-oriented RPC transport, the underlying
      reconnect logic takes a long while to time out, even though the remote
      may have responded immediately with ECONNREFUSED.
      
      In certain cases, like upcalls to our local rpcbind daemon, or for NFS
      mount requests, we'd like the kernel to fail immediately if the remote
      service isn't reachable.  This allows another transport to be tried
      immediately, or the pending request can be abandoned quickly.
      
      Introduce a per-request flag which controls how call_transmit_status()
      behaves when request transmission fails because the server cannot be
      reached.
      
      We don't want soft connection semantics to apply to other errors.  The
      default case of the switch statement in call_transmit_status() no
      longer falls through; the fall through code is copied to the default
      case, and a "break;" is added.
      
      The transport's connection re-establishment timeout is also ignored for
      such requests.  We want the request to fail immediately, so the
      reconnect delay is skipped.  Additionally, we don't want a connect
      failure here to further increase the reconnect timeout value, since
      this request will not be retried.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      09a21c41
    • C
      SUNRPC: Check explicitly for tk_status == 0 in call_transmit_status() · 206a134b
      Chuck Lever 提交于
      The success case, where task->tk_status == 0, is by far the most
      frequent case in call_transmit_status().
      
      The default: arm of the switch statement in call_transmit_status()
      handles the 0 case.  default: was moved close to the top of the switch
      statement in call_transmit_status() under the theory that the compiler
      places object code for the earliest arms of a switch statement first,
      making the CPU do less work.
      
      The default: arm of a switch statement, however, is executed only
      after all the other cases have been checked.  Even if the compiler
      rearranges the object code, the default: arm is the "last resort",
      meaning all of the other cases have been explicitly exhausted.  That
      makes the current arrangement about as inefficient as it gets for the
      common case.
      
      To fix this, add an explicit check for zero before the switch
      statement.  That forces the compiler to do the zero check first, no
      matter what optimizations it might try to do to the switch statement.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      206a134b
    • C
      NFS: Revert default r/wsize behavior · dd47f96c
      Chuck Lever 提交于
      When the "rsize=" or "wsize=" mount options are not specified,
      text-based mounts have slightly different behavior than legacy binary
      mounts.  Text-based mounts use the smaller of the server's maximum
      and the client's maximum, but binary mounts use the smaller of the
      server's _preferred_ size and the client's maximum.
      
      This difference is actually pretty subtle.  Most servers advertise
      the same value as their maximum and their preferred transfer size, so
      the end result is the same in most cases.
      
      The reason for this difference is that for text-based mounts, if
      r/wsize are not specified, they are set to the largest value supported
      by the client.  For legacy mounts, the values are set to zero if these
      options are not specified.
      
      nfs_server_set_fsinfo() can negotiate the transfer size defaults
      correctly in any case.  There's no need to specify any particular
      value as default in the text-based option parsing logic.
      
      Note that nfs4 doesn't use nfs_server_set_fsinfo(), but the mount.nfs4
      command does set rsize and wsize to 0 if the user didn't specify these
      options.  So, make the same change for text-based NFSv4 mounts.
      
      Thanks to James Pearson <james-p@moving-picture.com> for reporting and
      diagnosing the problem.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      dd47f96c
    • C
      NFS: Display compressed (shorthand) IPv6 in /proc/mounts · d250e190
      Chuck Lever 提交于
      Recent changes to snprintf() introduced the %pI6c formatter, which can
      display an IPv6 address with standard shorthanding.  Use this new
      formatter when displaying IPv6 server addresses in /proc/mounts.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d250e190
    • C
      SUNRPC: Display compressed (shorthand) IPv6 presentation addresses · dd1fd90f
      Chuck Lever 提交于
      Recent changes to snprintf() introduced the %pI6c formatter, which can
      display an IPv6 address with standard shorthanding.  Using a
      shorthanded address can save us a few bytes of memory for each stored
      presentation address, or a few bytes on the wire when sending these in
      a universal address.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      dd1fd90f
    • R
      NFS: reorder nfs4_sequence_regs to remove 8 bytes of padding on 64 bits · a01878aa
      Richard Kennedy 提交于
      reorder nfs4_sequence_args to remove 8 bytes of padding on 64 bit
      builds.
      
      The size of this structure drops to 24 bytes from 32 and reduces the
      text size of nfs.ko.
      On my x86_64 size reports
      
      		text       data     bss
      2.6.32-rc5 	200996	   8512	    432	 209940	  33414	nfs.ko
      +patch 		200884	   8512	    432	 209828	  333a4	nfs.ko
      Signed-off-by: NRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a01878aa
    • J
      NFS: convert proto= option to use netids rather than a protoname · ee671b01
      Jeff Layton 提交于
      Solaris uses netids as values for the proto= option, so that when
      someone specifies "tcp6" they get traffic over TCP + IPv6. Until
      recently, this has never really been an issue for Linux since it didn't
      support NFS over IPv6. The netid and the protocol name were generally
      always the same (modulo any strange configuration in /etc/netconfig).
      
      The solaris manpage documents their proto= option as:
      
          proto= _netid_ | rdma
      
      This patch is intended to bring Linux closer to how the Solaris proto=
      option works, by declaring a static netid mapping in the kernel and
      converting the proto= and mountproto= options to follow it and display
      the proper values in /proc/mounts.
      
      Much of this functionality will need to be provided by a userspace
      mount.nfs patch. Chuck Lever has a patch to change mount.nfs in
      the same way. In principle, we could do *all* of this in userspace but
      that would mean that the options in /proc/mounts may not match the
      options used by userspace.
      
      The alternative to the static mapping here is to add a mechanism to
      upcall to userspace for netid's. I'm not opposed to that option, but
      it'll probably mean more overhead (and quite a bit more code). Rather
      than shoot for that at first, I figured it was probably better to
      start simply.
      
      Comments welcome.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ee671b01
    • J
  2. 03 12月, 2009 16 次提交
  3. 02 12月, 2009 13 次提交
    • D
      [ARM] pxamci: call mmc_remove_host() before freeing resources · 5d6b1edf
      Daniel Mack 提交于
      mmc_remove_host() will cause the mmc core to switch off the bus power by
      eventually calling pxamci_set_ios(). This function uses the regulator or
      the GPIO which have been freed already.
      
      This causes the following Oops on module unload.
      
      [   49.519649] Unable to handle kernel paging request at virtual address 30303a70
      [   49.526878] pgd = c7084000
      [   49.529563] [30303a70] *pgd=00000000
      [   49.533136] Internal error: Oops: 5 [#1]
      [   49.537025] last sysfs file: /sys/devices/platform/pxa27x-ohci/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0/scsi_level
      [   49.547471] Modules linked in: pxamci(-) eeti_ts
      [   49.552061] CPU: 0    Not tainted  (2.6.32-rc8 #322)
      [   49.557001] PC is at regulator_is_enabled+0x3c/0xbc
      [   49.561846] LR is at regulator_is_enabled+0x30/0xbc
      [   49.566691] pc : [<c01a2448>]    lr : [<c01a243c>]    psr: 60000013
      [   49.566702] sp : c7083e70  ip : 30303a30  fp : 00000000
      [   49.578093] r10: c705e200  r9 : c7082000  r8 : c705e2e0
      [   49.583280] r7 : c7061340  r6 : c7061340  r5 : c7083e70  r4 : 00000000
      [   49.589759] r3 : c04dc434  r2 : c04dc434  r1 : c03eecea  r0 : 00000047
      [   49.596241] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [   49.603329] Control: 0000397f  Table: a7084018  DAC: 00000015
      [   49.609031] Process rmmod (pid: 1101, stack limit = 0xc7082278)
      [   49.614908] Stack: (0xc7083e70 to 0xc7084000)
      [   49.619238] 3e60:                                     c7082000 c703c4f8 c705ea00 c04f4074
      [   49.627366] 3e80: 00000000 c705e3a0 ffffffff c0247ddc c70361a0 00000000 c705e3a0 ffffffff
      [   49.635499] 3ea0: c705e200 bf006400 c78c4f00 c705e200 c705e3a0 ffffffff c705e200 ffffffff
      [   49.643633] 3ec0: c04d8ac8 c02476d0 ffffffff c0247c60 c705e200 c0248678 c705e200 c0249064
      [   49.651765] 3ee0: ffffffff bf006204 c04d8ad0 c04d8ad0 c04d8ac8 bf007490 00000880 c00440c4
      [   49.659898] 3f00: 0000b748 c01c5708 bf007490 c01c44c8 c04d8ac8 c04d8afc bf007490 c01c4570
      [   49.668031] 3f20: bf007490 bf00750c c04f4258 c01c37a4 00000000 bf00750c c7083f44 c007b014
      [   49.676162] 3f40: 4000d000 6d617870 08006963 00000001 00000000 c7085000 00000001 00000000
      [   49.684287] 3f60: 4000d000 c7083f8c 00000001 bea01a54 00005401 c7ab1400 c00440c4 00082000
      [   49.692420] 3f80: bf00750c 00000880 c7083f8c 00000000 4000cfa8 00000000 00000880 bea01cc8
      [   49.700552] 3fa0: 00000081 c0043f40 00000000 00000880 bea01cc8 00000880 00000006 00000000
      [   49.708677] 3fc0: 00000000 00000880 bea01cc8 00000081 00000097 0000cca4 0000b748 00000000
      [   49.716802] 3fe0: 4001a4f0 bea01cc0 00018bf4 4001a4fc 20000010 bea01cc8 a063e021 a063e421
      [   49.724958] [<c01a2448>] (regulator_is_enabled+0x3c/0xbc) from [<c0247ddc>] (mmc_regulator_set_ocr+0x14/0xd8)
      [   49.734836] [<c0247ddc>] (mmc_regulator_set_ocr+0x14/0xd8) from [<bf006400>] (pxamci_set_ios+0xd8/0x17c [pxamci])
      [   49.745044] [<bf006400>] (pxamci_set_ios+0xd8/0x17c [pxamci]) from [<c02476d0>] (mmc_power_off+0x50/0x58)
      [   49.754555] [<c02476d0>] (mmc_power_off+0x50/0x58) from [<c0247c60>] (mmc_detach_bus+0x68/0xc4)
      [   49.763207] [<c0247c60>] (mmc_detach_bus+0x68/0xc4) from [<c0248678>] (mmc_stop_host+0xd4/0x1bc)
      [   49.771944] [<c0248678>] (mmc_stop_host+0xd4/0x1bc) from [<c0249064>] (mmc_remove_host+0xc/0x20)
      [   49.780681] [<c0249064>] (mmc_remove_host+0xc/0x20) from [<bf006204>] (pxamci_remove+0xc8/0x174 [pxamci])
      [   49.790211] [<bf006204>] (pxamci_remove+0xc8/0x174 [pxamci]) from [<c01c5708>] (platform_drv_remove+0x1c/0x24)
      [   49.800164] [<c01c5708>] (platform_drv_remove+0x1c/0x24) from [<c01c44c8>] (__device_release_driver+0x7c/0xc4)
      [   49.810110] [<c01c44c8>] (__device_release_driver+0x7c/0xc4) from [<c01c4570>] (driver_detach+0x60/0x8c)
      [   49.819535] [<c01c4570>] (driver_detach+0x60/0x8c) from [<c01c37a4>] (bus_remove_driver+0x90/0xcc)
      [   49.828452] [<c01c37a4>] (bus_remove_driver+0x90/0xcc) from [<c007b014>] (sys_delete_module+0x1d8/0x254)
      [   49.837891] [<c007b014>] (sys_delete_module+0x1d8/0x254) from [<c0043f40>] (ret_fast_syscall+0x0/0x28)
      [   49.847145] Code: eb06c53a e596c030 e1a0500d e59f106c (e59c0040)
      [   49.853566] ---[ end trace b5fa66a00cea142f ]---
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Reported-by: NSven Neumann <s.neumann@raumfeld.com>
      Cc: Pierre Ossman <pierre@ossman.eu>
      Cc: linux-mmc@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: stable@kernel.org
      Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
      5d6b1edf
    • F
      [PATCH] rc32434_wdt: fix compilation failure · 810a90ae
      Florian Fainelli 提交于
      This patch fixes the compilation failure of
      rc32434 due to a bad module parameter description.
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      810a90ae
    • H
      [WATCHDOG] rc32434_wdt.c: use resource_size() · be088b13
      H Hartley Sweeten 提交于
      The size value passed to ioremap_nocache() is not correct.
      Use resource_size() to get the correct value.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Phil Sutter <n0-1@freewrt.org>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      be088b13
    • R
      sysfs: fix SYSFS_DEPRECATED_V2 prompt · e9438e31
      Randy Dunlap 提交于
      The SYSFS_DEPRECATED_V2 says "remove" older, deprecated features, but it
      actually enables them, so correct this confusing, backwards text.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e9438e31
    • J
      rtc-x1205: reset clock to sane state after power failure · cb8799ee
      Johannes Weiner 提交于
      When detecting power failure, the probe function would reset the clock
      time to defined state.
      
      However, the clock's _date_ might still be bogus and a subsequent probe
      fails when sanity-checking these values.
      
      Change the power-failure fixup code to do a full setting of rtc_time,
      including a valid date.
      Signed-off-by: NJohannes Weiner <jw@emlix.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb8799ee
    • J
      rtc-x1205: fix rtc_time to y2k register value conversion · 48a7f774
      Johannes Weiner 提交于
      The possible CCR_Y2K register values are 19 or 20 and struct rtc_time's
      tm_year is in years since 1900.
      
      The function translating rtc_time to register values assumes tm_year to be
      years since first christmas, though, and we end up storing 0 or 1 in the
      CCR_Y2K register, which the hardware does not refuse to do.
      
      A subsequent probing of the clock fails due to the invalid value range in
      the register, though.
      
      [ And if it didn't, reading the clock would yield a bogus year because
        the function translating registers to tm_year is assuming a register
        value of 19 or 20. ]
      
      This fixes the conversion from years since 1900 in tm_year to the
      corresponding CCR_Y2K value of 19 or 20.
      Signed-off-by: NJohannes Weiner <jw@emlix.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      48a7f774
    • P
      aoe: prevent cache aliases · 0a1f127a
      Peter Horton 提交于
      Prevent the AoE block driver from creating cache aliases of page cache
      pages on machines with virtually indexed caches.
      
      Building kernels on an AT91SAM9G20 board without this patch fails with
      segmentation faults after a couple of passes.
      Signed-off-by: NPeter Horton <zero@colonel-panic.org>
      Cc: "Ed L. Cashin" <ecashin@coraid.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0a1f127a
    • A
      gpio: Langwell GPIO driver bugfixes · ca029701
      Alek Du 提交于
      - Remove wrong and unnecessary unmask operation
      
      - Remove extra GEDR reading
      
      This fixes the loss of interrupts which occurs when two or more pins are
      triggered in close succession.
      Signed-off-by: NAlek Du <alek.du@intel.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca029701
    • S
      kbuild: stepping down as maintainer · 97434843
      Sam Ravnborg 提交于
      It has been fun but the last year or more it has been a duty and a burden.
      So I leave it open for others to take over.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Anibal Monsalve Salazar <anibal@debian.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97434843
    • S
      davinci: fb: fix frame buffer driver issues · 3510b8f7
      Sudhakar Rajashekhara 提交于
      Following issues have been addressed on DA8XX/OMAP-L1XX:
      
      a. Screen misalignment during booting when frame buffer console is
         enabled.
      
      b. Driver was configured always in PSEUDOCOLOR mode.  This patch
         dynamically configures the driver either in PSEUDOCOLOUR or TRUECOLOR
         mode depending on bpp.
      
      c. The RED and BLUE offsets were interchanged resulting in wrong
         bootup logo colour.
      
      This patch has been tested on DA830/OMAP-L137 and DA850/OMAP-L138 EVMs.
      Signed-off-by: NSudhakar Rajashekhara <sudhakar.raj@ti.com>
      Cc: Steve Chen <schen@mvista.com>
      Cc: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
      Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3510b8f7
    • D
      drivers/rtc/rtc-pcf50633.c: fix use after free in pcf50633_rtc_probe() · fa00e106
      Dan Carpenter 提交于
      "rtc" is freed and then dereferenced on the next line.  This patch fixes
      that.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NAlessandro Zummo <a.zummo@towertech.it>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa00e106
    • A
      drivers/media/dvb/dvb-core/dvb_frontend.c: needs semaphore.h · 4c4cb1b1
      Andrew Morton 提交于
      Fixes:
      
        v4l/dvb_frontend.c: In function 'dvb_frontend_stop':
        v4l/dvb_frontend.c:707: error: implicit declaration of function 'init_MUTEX'
      
      Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14609
      
      Reported-by: <tstrelar@gmail.com>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c4cb1b1
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · 21278163
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging: update TODO files
        Staging: hv: Fix some missing author names
        Staging: hv: Fix vmbus event handler bug
        Staging: hv: Fix argument order in incorrect memset invocations in hyperv driver.
      21278163