1. 04 2月, 2009 9 次提交
  2. 03 2月, 2009 31 次提交
    • L
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 52a84ec2
      Linus Torvalds 提交于
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book
        libata: add no penalty retry request for EH device handling routines
        libata: improve probe failure handling
        libata: add @spd_limit to sata_down_spd_limit()
        libata: clear dev->ering in smarter way
        libata: check onlineness before using SPD in sata_down_spd_limit()
        libata: move ata_dev_disable() to libata-eh.c
        libata: fix EH device failure handling
        sata_nv: ck804 has borked hardreset too
        ide/libata: fix ata_id_is_cfa() (take 4)
        libata: fix kernel-doc warnings
        ahci: add a module parameter to ignore the SSS flags for async scanning
        sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742
        [libata] sata_sil: Fix compilation error with libata debugging enabled
      52a84ec2
    • T
      libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book · 9062712f
      Tejun Heo 提交于
      3Gbps is often much more prone to transmission failures.  It's usually
      okay to let EH handle speed down after transmission failures but some
      WD My Book drives completely shutdown after certain transmission
      failures and after it only power cycling can revive them.  Combined
      with the fact that external drives often end up with cable assembly
      which is longer than usual and more likely to have intervening gender,
      this makes these drives very likely to shutdown under certain
      configurations virtually rendering them unusable.
      
      This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book
      such that 1.5Gbps is forced once the device is identified.
      
      Please take a look at the following bz for related reports.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=9913Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9062712f
    • T
      libata: add no penalty retry request for EH device handling routines · cf9a590a
      Tejun Heo 提交于
      Let -EAGAIN from EH device handling routines trigger EH retry without
      consuming its tries count.  This will be used to implement link SPD
      horkage which requires hardreset to adjust SPD without affecting other
      EH decisions.  As it bypasses the forward progress guarantee provided
      by the tries count, the requester is responsible for ensuring forward
      progress.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      cf9a590a
    • T
      libata: improve probe failure handling · c2c7a89c
      Tejun Heo 提交于
      When link is flaky at high speed, it isn't uncommon for a device to
      repeatedly fail probing sequence early after successfully negotiating
      high link speed.  This often leads to consecutive hotplug events
      without successful probing.
      
      This patch improves libata EH such that it remembers probing trials
      and if there have been more than two unsuccessful trials in the past
      60 seconds, slows down link speed to 1.5Gbps.
      
      As link speed negotiation is the duty of the PHY layer proper, the
      goal of this fallback mechanism is to provide the last resort when
      everything else fails, which unfortunately happens not too
      infrequently, so no fancy 6->3->1.5 speeding down or highest
      successful transmission speed seen kind of logics (yet).
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c2c7a89c
    • T
      libata: add @spd_limit to sata_down_spd_limit() · a07d499b
      Tejun Heo 提交于
      Add @spd_limit to sata_down_spd_limit() so that the caller can specify
      the SPD limit it wants.  This parameter doesn't get in the way even
      when it's too low.  The closest possible limit is applied.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a07d499b
    • T
      libata: clear dev->ering in smarter way · 99cf610a
      Tejun Heo 提交于
      dev->ering used to be cleared together with the rest of ata_device in
      ata_dev_init() which is called whenever a probing event occurs.
      dev->ering is about to be used to track probing failures so it needs
      to remain persistent over multiple porbing events.  This patch
      achieves this by doing the following.
      
      * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only
        clear between BEGIN and END.  ering is moved after END.  The split
        of persistent area is to allow hotter items remain at the head.
      
      * ering is explicitly cleared on ata_dev_disable() and when device
        attach succeeds.  So, ering is persistent throug a device's life
        time (unless explicitly cleared of course) and also through periods
        inbetween disablement of an attached device and successful detection
        of the next one.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      99cf610a
    • T
      libata: check onlineness before using SPD in sata_down_spd_limit() · 9913ff8a
      Tejun Heo 提交于
      sata_down_spd_limit() should check whether the link is online before
      using the SPD value to determine how to limit the link speed.  Factor
      out onlineness test and test it from sata_down_spd_limit().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9913ff8a
    • T
      libata: move ata_dev_disable() to libata-eh.c · 678afac6
      Tejun Heo 提交于
      ata_dev_disable() is about to be more tightly integrated into EH
      logic.  Move it to libata-eh.c.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      678afac6
    • T
      libata: fix EH device failure handling · d89293ab
      Tejun Heo 提交于
      The dev->pio_mode > XFER_PIO_0 test is there to avoid unnecessary
      speed down warning messages but it accidentally disabled SATA link spd
      down during configuration phase after reset where PIO mode is always
      zero.
      
      This patch fixes the problem by moving the test where it belongs.
      This makes libata probing sequence behave better when the connection
      is flaky at higher link speeds which isn't too uncommon for eSATA
      devices.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      d89293ab
    • T
      sata_nv: ck804 has borked hardreset too · 8d993eaa
      Tejun Heo 提交于
      While playing with nvraid, I found out that rmmoding and insmoding
      often trigger hardreset failure on the first port (the second one was
      always okay).  Seriously, how diverse can you get with hardreset
      behaviors?  Anyways, make ck804 use noclassify variant too.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      8d993eaa
    • S
      ide/libata: fix ata_id_is_cfa() (take 4) · 2999b58b
      Sergei Shtylyov 提交于
      When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in
      word 82 of the identify data instead the word 83;  it also checks the ATA/PI
      version support in the word 80 (which the CompactFlash specifications have as
      reserved), this having no slightest chance to work on the modern CF cards that
      don't have 0x848A in the word 0...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      2999b58b
    • R
      libata: fix kernel-doc warnings · 5eb66fe0
      Randy Dunlap 提交于
      Fix libata kernel-doc warnings:
      
      Warning(linux-next-20090120//drivers/ata/libata-core.c:4720): Excess function parameter 'dev' description in 'ata_qc_new'
      Warning(linux-next-20090120//drivers/ata/libata-scsi.c:428): No description found for parameter 'ap'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5eb66fe0
    • A
      ahci: add a module parameter to ignore the SSS flags for async scanning · f3d7f23f
      Arjan van de Ven 提交于
      The SSS flag, which directs the OS to spin up one disk at a time
      to not have the PSU blow out, sometimes gets set even when not needed.
      The effect of this is a longer-than-needed boot time.
      
      This patch adds a module parameter that makes the driver ignore SSS
      at least as far as the parallel scan during boot is concerned...
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      f3d7f23f
    • M
      sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742 · 4462254a
      Mark Lord 提交于
      Fix chip type for the Highpoint RocketRAID 1740 and 1742 PCI cards.
      These really do have Marvell 6042 chips on them, rather than the 5081 chip.
      
      Confirmed by multiple (two) users (for the 1740), and by examining
      the product photographs from Highpoint's web site.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      4462254a
    • P
      [libata] sata_sil: Fix compilation error with libata debugging enabled · 41137aa6
      Pasi Kärkkäinen 提交于
      I tried compiling 2.6.29-rc1 and 2.6.29-rc3 with libata debugging enabled
      and got the following error:
      
        CC [M]  drivers/ata/sata_sil.o
      drivers/ata/sata_sil.c: In function 'sil_fill_sg':
      drivers/ata/sata_sil.c:327: error: 'pi' undeclared (first use in this function)
      drivers/ata/sata_sil.c:327: error: (Each undeclared identifier is reported only once
      drivers/ata/sata_sil.c:327: error: for each function it appears in.)
      make[2]: *** [drivers/ata/sata_sil.o] Error 1
      make[1]: *** [drivers/ata] Error 2
      make: *** [drivers] Error 2
      
      include/linux/libata.h has the following enabled:
      
      #define ATA_DEBUG
      #define ATA_VERBOSE_DEBUG
      #define ATA_IRQ_TRAP
      
      This fixes the compilation.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      41137aa6
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · b1792e36
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
        PCI hotplug: Change link order of pciehp & acpiphp
        PCI hotplug: fakephp: Allocate PCI resources before adding the device
        PCI MSI: Fix undefined shift by 32
        PCI PM: Do not wait for buses in B2 or B3 during resume
        PCI PM: Power up devices before restoring their state
        PCI PM: Fix hibernation breakage on EeePC 701
        PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs
        PCI PM: Fix suspend error paths and testing facility breakage
      b1792e36
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 · 859281ff
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        slub: fix per cpu kmem_cache_cpu array memory leak
        kmalloc: return NULL instead of link failure
      859281ff
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 93bfbd71
      Linus Torvalds 提交于
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
        powerpc: Fix oops on some machines due to incorrect pr_debug()
        powerpc/ps3: Printing fixups for l64 to ll64 convserion drivers/net
        powerpc/5200: update device tree binding documentation
        powerpc/5200: Bugfix for PCI mapping of memory and IMMR
        powerpc/5200: update defconfigs
      93bfbd71
    • L
      Merge branch 'sched-fixes-for-linus' of... · 31c952dc
      Linus Torvalds 提交于
      Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched_rt: don't use first_cpu on cpumask created with cpumask_and
        sched: fix buddie group latency
        sched: clear buddies more aggressively
        sched: symmetric sync vs avg_overlap
        sched: fix sync wakeups
        cpuset: fix possible deadlock in async_rebuild_sched_domains
      31c952dc
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · 9e6235e9
      Linus Torvalds 提交于
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (45 commits)
        V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning
        V4L/DVB (10403): saa7134-alsa: saa7130 doesn't support digital audio
        V4L/DVB (10229): ivtv: fix memory leak
        V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.
        V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
        V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo
        V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.
        V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
        V4L/DVB (10287): af9015: fix second FE
        V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock
        V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff
        V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
        V4L/DVB (10257): em28xx: Fix for KWorld 330U Board
        V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
        V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
        V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
        V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.
        V4L/DVB (10243): em28xx: fix compile warning
        V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic
        V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)
        ...
      9e6235e9
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc · 5c350d93
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
        pxamci: enable DMA for write ops after CMD/RESP
        pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())
        ricoh_mmc: Use suspend_late/resume_early
        mmci: Add support for ST Micro derivate
        mmc: Add a MX2/MX3 specific SDHC driver
      5c350d93
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · 017f5178
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
        icside: fix PCB version 6 support (v2)
        tx4939ide: typo fix and minor cleanup
        ide: add CS5536 host driver (v3)
        ide: Force VIA IDE legacy interrupts for AmigaOne boards
        IDE: Unregister and disable devices if initialization fails.
        ide: fix ide_register_port() failure handling
        ide: struct device - replace bus_id with dev_name(), dev_set_name()
        ide-cd: fix DMA for non bio-backed requests
      017f5178
    • L
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb · 17294ab2
      Linus Torvalds 提交于
      * 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
        uwb: lock rc->rsvs_lock with spin_lock_bh()
        wusb: timeout when waiting for ASL/PZL updates in whci-hcd
        uwb: remove unused #include <version.h>'s
        wusb: return -ENOTCONN when resetting a port with no connected device
        uwb: safely remove all reservations
      17294ab2
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 86adf8ad
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        block: add text file detailing queue/ sysfs files
        bio.h: If they MUST be inlined, then use __always_inline
        Fix misleading comment in bio.h
        block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULT
        block: fix oops in blk_queue_io_stat()
      86adf8ad
    • M
      virtio-pci: do not oops on config change if driver not loaded · 3fff0179
      Mark McLoughlin 提交于
      The host really shouldn't be notifying us of config changes
      before the device status is VIRTIO_CONFIG_S_DRIVER or
      VIRTIO_CONFIG_S_DRIVER_OK.
      
      However, if we do happen to be interrupted while we're not
      attached to a driver, we really shouldn't oops. Prevent
      this simply by checking that device->driver is non-NULL
      before trying to notify the driver of config changes.
      
      Problem observed by doing a "set_link virtio.0 down" with
      QEMU before the net driver had been loaded.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3fff0179
    • E
      modules: Use a better scheme for refcounting · 720eba31
      Eric Dumazet 提交于
      Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is
      using a lot of memory.
      
      Each 'struct module' contains an [NR_CPUS] array of full cache lines.
      
      This patch uses existing infrastructure (percpu_modalloc() &
      percpu_modfree()) to allocate percpu space for the refcount storage.
      
      Instead of wasting NR_CPUS*128 bytes (on i386), we now use
      nr_cpu_ids*sizeof(local_t) bytes.
      
      On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce
      size of module files by about 2 Mbytes. (1Kb per module)
      
      Instead of having all refcounters in the same memory node - with TLB misses
      because of vmalloc() - this new implementation permits to have better
      NUMA properties, since each  CPU will use storage on its preferred node,
      thanks to percpu storage.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      720eba31
    • M
      ocfs2: add quota call to ocfs2_remove_btree_range() · fd4ef231
      Mark Fasheh 提交于
      We weren't reclaiming the clusters which get free'd from this function,
      so any user punching holes in a file would still have those bytes accounted
      against him/her. Add the call to vfs_dq_free_space_nodirty() to fix this.
      Interestingly enough, the journal credits calculation already took this into
      account.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Acked-by: NJan Kara <jack@suse.cz>
      fd4ef231
    • S
      ocfs2: Wakeup the downconvert thread after a successful cancel convert · a4b91965
      Sunil Mushran 提交于
      When two nodes holding PR locks on a resource concurrently attempt to
      upconvert the locks to EX, the master sends a BAST to one of the nodes. This
      message tells that node to first cancel convert the upconvert request,
      followed by downconvert to a NL. Only when this lock is downconverted to NL,
      can the master upconvert the first node's lock to EX.
      
      While the fs was doing the cancel convert, it was forgetting to wake up the
      dc thread after a successful cancel, leading to a deadlock.
      Reported-and-Tested-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      a4b91965
    • T
      ocfs2: Access the xattr bucket only before modifying it. · 554e7f9e
      Tao Ma 提交于
      In ocfs2_xattr_value_truncate, we may call b-tree codes which will
      extend the journal transaction. It has a potential problem that it
      may let the already-accessed-but-not-dirtied buffers gone. So we'd
      better access the bucket after we call ocfs2_xattr_value_truncate.
      And as for the root buffer for the xattr value, b-tree code will
      acess and dirty it, so we don't need to worry about it.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      554e7f9e
    • J
      configfs: Silence lockdep on mkdir(), rmdir() and configfs_depend_item() · 0e033342
      Joel Becker 提交于
      When attaching default groups (subdirs) of a new group (in mkdir() or
      in configfs_register()), configfs recursively takes inode's mutexes
      along the path from the parent of the new group to the default
      subdirs. This is needed to ensure that the VFS will not race with
      operations on these sub-dirs. This is safe for the following reasons:
      
      - the VFS allows one to lock first an inode and second one of its
        children (The lock subclasses for this pattern are respectively
        I_MUTEX_PARENT and I_MUTEX_CHILD);
      - from this rule any inode path can be recursively locked in
        descending order as long as it stays under a single mountpoint and
        does not follow symlinks.
      
      Unfortunately lockdep does not know (yet?) how to handle such
      recursion.
      
      I've tried to use Peter Zijlstra's lock_set_subclass() helper to
      upgrade i_mutexes from I_MUTEX_CHILD to I_MUTEX_PARENT when we know
      that we might recursively lock some of their descendant, but this
      usage does not seem to fit the purpose of lock_set_subclass() because
      it leads to several i_mutex locked with subclass I_MUTEX_PARENT by
      the same task.
      
      >From inside configfs it is not possible to serialize those recursive
      locking with a top-level one, because mkdir() and rmdir() are already
      called with inodes locked by the VFS. So using some
      mutex_lock_nest_lock() is not an option.
      
      I am proposing two solutions:
      1) one that wraps recursive mutex_lock()s with
         lockdep_off()/lockdep_on().
      2) (as suggested earlier by Peter Zijlstra) one that puts the
         i_mutexes recursively locked in different classes based on their
         depth from the top-level config_group created. This
         induces an arbitrary limit (MAX_LOCK_DEPTH - 2 == 46) on the
         nesting of configfs default groups whenever lockdep is activated
         but this limit looks reasonably high. Unfortunately, this alos
         isolates VFS operations on configfs default groups from the others
         and thus lowers the chances to detect locking issues.
      
      This patch implements solution 1).
      
      Solution 2) looks better from lockdep's point of view, but fails with
      configfs_depend_item(). This needs to rework the locking
      scheme of configfs_depend_item() by removing the variable lock recursion
      depth, and I think that it's doable thanks to the configfs_dirent_lock.
      For now, let's stick to solution 1).
      Signed-off-by: NLouis Rilling <louis.rilling@kerlabs.com>
      Acked-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      0e033342
    • J
      ocfs2: Fix possible deadlock in ocfs2_write_dquot() · f8afead7
      Jan Kara 提交于
      It could happen that some limit has been set via quotactl() and in parallel
      ->mark_dirty() is called from another thread doing e.g. dquot_alloc_space(). In
      such case ocfs2_write_dquot() must not try to sync the dquot because that needs
      global quota lock but that ranks above transaction start.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      f8afead7