1. 12 12月, 2011 17 次提交
  2. 09 12月, 2011 5 次提交
  3. 08 12月, 2011 11 次提交
    • N
      md/raid5: never wait for bad-block acks on failed device. · 9283d8c5
      NeilBrown 提交于
      Once a device is failed we really want to completely ignore it.
      It should go away soon anyway.
      
      In particular the presence of bad blocks on it should not cause us to
      block as we won't be trying to write there anyway.
      
      So as soon as we can check if a device is Faulty, do so and pretend
      that it is already gone if it is Faulty.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      9283d8c5
    • N
      md: ensure new badblocks are handled promptly. · 8bd2f0a0
      NeilBrown 提交于
      When we mark blocks as bad we need them to be acknowledged by the
      metadata handler promptly.
      
      For an in-kernel metadata handler that was already being done.  But
      for an external metadata handler we need to alert it of the change by
      sending a notification through the sysfs file.  This adds that
      notification.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      8bd2f0a0
    • N
      md: bad blocks shouldn't cause a Blocked status on a Faulty device. · 52c64152
      NeilBrown 提交于
      Once a device is marked Faulty the badblocks - whether acknowledged or
      not - become irrelevant.  So they shouldn't cause the device to be
      marked as Blocked.
      
      Without this patch, a process might write "-blocked" to clear the
      Blocked status, but while that will correctly fail the device, it
      won't remove the apparent 'blocked' status.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      52c64152
    • N
      md: take a reference to mddev during sysfs access. · af8a2434
      NeilBrown 提交于
      
      When we are accessing an mddev via sysfs we know that the
      mddev cannot disappear because it has an embedded kobj which
      is refcounted by sysfs.
      And we also take the mddev_lock.
      However this is not enough.
      
      The final mddev_put could have been called and the
      mddev_delayed_delete is waiting for sysfs to let go so it can destroy
      the kobj and mddev.
      In this state there are a lot of changes that should not be attempted.
      
      To to guard against this we:
       - initialise mddev->all_mddevs in on last put so the state can be
         easily detected.
       - in md_attr_show and md_attr_store, check ->all_mddevs under
         all_mddevs_lock and mddev_get the mddev if it still appears to
         be active.
      
      This means that if we get to sysfs as the mddev is being deleted we
      will get -EBUSY.
      
      rdev_attr_store and rdev_attr_show are similar but already have
      sufficient protection.  They check that rdev->mddev still points to
      mddev after taking mddev_lock.  As this is cleared  before delayed
      removal which can only be requested under the mddev_lock, this
      ensure the rdev and mddev are still alive.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      af8a2434
    • N
      md: refine interpretation of "hold_active == UNTIL_IOCTL". · 1d23f178
      NeilBrown 提交于
      We like md devices to disappear when they really are not needed.
      However it is not possible to tell from the current state whether it
      is needed or not.  We can only tell from recent history of changes.
      
      In particular immediately after we create an md device it looks very
      similar to immediately after we have finished with it.
      
      So we always preserve a newly created md device until something
      significant happens.  This state is stored in 'hold_active'.
      
      The normal case is to keep it until an ioctl happens, as that will
      normally either activate it, or explicitly de-activate it.  If it
      doesn't then it was probably created by mistake and it is now time to
      get rid of it.
      
      We can also modify an array via sysfs (instead of via ioctl) and we
      currently treat any change via sysfs like an ioctl as a sign that if
      it now isn't more active, it should be destroyed.
      However this is not appropriate as changes made via sysfs are more
      gradual so we should look for a more definitive change.
      
      So this patch only clears 'hold_active' from UNTIL_IOCTL to clear when
      the array_state is changed via sysfs.  Other changes via sysfs
      are ignored.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      1d23f178
    • A
      PM / Driver core: leave runtime PM enabled during system shutdown · fe6b91f4
      Alan Stern 提交于
      Disabling all runtime PM during system shutdown turns out not to be a
      good idea, because some devices may need to be woken up from a
      low-power state at that time.
      
      The whole point of disabling runtime PM for system shutdown was to
      prevent untimely runtime-suspend method calls.  This patch (as1504)
      accomplishes the same result by incrementing the usage count for each
      device and waiting for ongoing runtime-PM callbacks to finish.  This
      is what we already do during system suspend and hibernation, which
      makes sense since the shutdown method is pretty much a legacy analog
      of the pm->poweroff method.
      
      This fixes a recent regression on some OMAP systems introduced by
      commit af8db150 (PM / driver core:
      disable device's runtime PM during shutdown).
      Reported-and-tested-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      fe6b91f4
    • M
      spi/gpio: fix section mismatch warning · c65b53ba
      Manuel Lauss 提交于
      Fixes:
      The function __devinit spi_gpio_probe() references
      a function __init spi_gpio_alloc.isra.4().
      If spi_gpio_alloc.isra.4 is only used by spi_gpio_probe then
      annotate spi_gpio_alloc.isra.4 with a matching annotation.
      
      [wsa: fix spi_gpio_request(), too]
      Signed-off-by: NManuel Lauss <manuel.lauss@googlemail.com>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      c65b53ba
    • J
      spi/fsl-espi: disable CONFIG_SPI_FSL_ESPI=m build · d9ddcec3
      Jiri Slaby 提交于
      When spi_fsl_espi is chosen to be built as a module, there is a build
      error because we test only CONFIG_SPI_FSL_ESPI in declaration of
      struct mpc8xxx_spi in drivers/spi/spi_fsl_lib.h. Also some called
      functions are not exported.
      
      So we forbid CONFIG_SPI_FSL_ESPI to be tristate here.
      
      The error looks like:
      drivers/spi/spi_fsl_espi.c: In function 'fsl_espi_bufs':
      drivers/spi/spi_fsl_espi.c:232: error: 'struct mpc8xxx_spi' has no member named 'len'
      ...
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NKumar Gala <galak@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      d9ddcec3
    • A
      spi/nuc900: Include linux/module.h · 00d2952c
      Axel Lin 提交于
      Include linux/module.h to fix below build error:
      
        CC      drivers/spi/spi-nuc900.o
      drivers/spi/spi-nuc900.c:484: error: 'THIS_MODULE' undeclared here (not in a function)
      drivers/spi/spi-nuc900.c:489: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-nuc900.c:489: warning: data definition has no type or storage class
      drivers/spi/spi-nuc900.c:489: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/spi/spi-nuc900.c:489: warning: function declaration isn't a prototype
      drivers/spi/spi-nuc900.c:490: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-nuc900.c:490: warning: data definition has no type or storage class
      drivers/spi/spi-nuc900.c:490: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/spi/spi-nuc900.c:490: warning: function declaration isn't a prototype
      drivers/spi/spi-nuc900.c:491: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-nuc900.c:491: warning: data definition has no type or storage class
      drivers/spi/spi-nuc900.c:491: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/spi/spi-nuc900.c:491: warning: function declaration isn't a prototype
      drivers/spi/spi-nuc900.c:492: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-nuc900.c:492: warning: data definition has no type or storage class
      drivers/spi/spi-nuc900.c:492: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
      drivers/spi/spi-nuc900.c:492: warning: function declaration isn't a prototype
      make[2]: *** [drivers/spi/spi-nuc900.o] Error 1
      make[1]: *** [drivers/spi] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      00d2952c
    • G
      spi/ath79: fix compile error due to missing include · 807cc4b1
      Gabor Juhos 提交于
      Whithout including 'linux/module.h' spi-ath79 driver fails to compile
      with the these errors:
      
      drivers/spi/spi-ath79.c:273:12: error: 'THIS_MODULE' undeclared here (not in a function)
      drivers/spi/spi-ath79.c:278:20: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-ath79.c:278:1: warning: data definition has no type or storage class
      drivers/spi/spi-ath79.c:278:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/spi/spi-ath79.c:278:20: warning: function declaration isn't a prototype
      drivers/spi/spi-ath79.c:279:15: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-ath79.c:279:1: warning: data definition has no type or storage class
      drivers/spi/spi-ath79.c:279:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/spi/spi-ath79.c:279:15: warning: function declaration isn't a prototype
      drivers/spi/spi-ath79.c:280:16: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-ath79.c:280:1: warning: data definition has no type or storage class
      drivers/spi/spi-ath79.c:280:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/spi/spi-ath79.c:280:16: warning: function declaration isn't a prototype
      drivers/spi/spi-ath79.c:281:14: error: expected declaration specifiers or '...' before string constant
      drivers/spi/spi-ath79.c:281:1: warning: data definition has no type or storage class
      drivers/spi/spi-ath79.c:281:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
      drivers/spi/spi-ath79.c:281:14: warning: function declaration isn't a prototype
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      807cc4b1
    • A
      of/irq: Get rid of NO_IRQ usage · 77a7300a
      Anton Vorontsov 提交于
      PPC32/64 defines NO_IRQ to zero, so no problems expected.
      ARM defines NO_IRQ to -1, but OF code relies on IRQ domains support,
      which returns correct ('0') value in 'no irq' case. So everything
      should be fine.
      
      Other arches might break if some of their OF drivers rely on NO_IRQ
      being not 0. If so, the drivers must be fixed, finally.
      
      [ Rob Herring points out that microblaze should be fixed, and has posted
        a patch for testing for that.   - Linus ]
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      77a7300a
  4. 07 12月, 2011 3 次提交
  5. 06 12月, 2011 4 次提交