Permalink
Switch branches/tags
Commits on Nov 22, 2010
  1. libahci: fix result_tf handling after an ATA PIO data-in command

    htejun authored and gregkh committed Oct 15, 2010
    commit 6ad6019 upstream.
    
    ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
    command.  The host is supposed to take the TF and E_Status of the
    preceding PIO Setup FIS.  Update ahci_qc_fill_rtf() such that it takes
    TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
    command.
    
    Without this patch, result_tf for such a command is filled with the
    content of the previous D2H Reg FIS which belongs to a previous
    command, which can make the command incorrectly seen as failed.
    
    * Patch updated to grab the whole TF + E_Status from PIO Setup FIS
      instead of just E_Status as suggested by Robert Hancock.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Mark Lord <kernel@teksavvy.com>
    Cc: Robert Hancock <hancockrwd@gmail.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Oct 29, 2010
  1. ubd: fix incorrect sector handling during request restart

    htejun authored and gregkh committed Oct 15, 2010
    commit 4752690 upstream.
    
    Commit f81f2f7 (ubd: drop unnecessary rq->sector manipulation)
    dropped request->sector manipulation in preparation for global request
    handling cleanup; unfortunately, it incorrectly assumed that the
    updated sector wasn't being used.
    
    ubd tries to issue as many requests as possible to io_thread.  When
    issuing fails due to memory pressure or other reasons, the device is
    put on the restart list and issuing stops.  On IO completion, devices
    on the restart list are scanned and IO issuing is restarted.
    
    ubd issues IOs sg-by-sg and issuing can be stopped in the middle of a
    request, so each device on the restart queue needs to remember where
    to restart in its current request.  ubd needs to keep track of the
    issue position itself because,
    
    * blk_rq_pos(req) is now updated by the block layer to keep track of
      _completion_ position.
    
    * Multiple io_req's for the current request may be in flight, so it's
      difficult to tell where blk_rq_pos(req) currently is.
    
    Add ubd->rq_pos to keep track of the issue position and use it to
    correctly restart io_req issue.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Richard Weinberger <richard@nod.at>
    Tested-by: Richard Weinberger <richard@nod.at>
    Tested-by: Chris Frey <cdfrey@foursquare.net>
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  2. ahci: fix module refcount breakage introduced by libahci split

    htejun authored and gregkh committed Sep 21, 2010
    commit fad16e7 upstream.
    
    libata depends on scsi_host_template for module reference counting and
    sht's should be owned by each low level driver.  During libahci split,
    the sht was left with libahci.ko leaving the actual low level drivers
    not reference counted.  This made ahci and ahci_platform always
    unloadable even while they're being actively used.
    
    Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
    each low level ahci driver.
    
    stable: only applicable to 2.6.35.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Pedro Francisco <pedrogfrancisco@gmail.com>
    Tested-by: Michael Tokarev <mjt@tls.msk.ru>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Sep 27, 2010
  1. percpu: fix pcpu_last_unit_cpu

    htejun authored and gregkh committed Sep 21, 2010
    commit 46b30ea upstream.
    
    pcpu_first/last_unit_cpu are used to track which cpu has the first and
    last units assigned.  This in turn is used to determine the span of a
    chunk for man/unmap cache flushes and whether an address belongs to
    the first chunk or not in per_cpu_ptr_to_phys().
    
    When the number of possible CPUs isn't power of two, a chunk may
    contain unassigned units towards the end of a chunk.  The logic to
    determine pcpu_last_unit_cpu was incorrect when there was an unused
    unit at the end of a chunk.  It failed to ignore the unused unit and
    assigned the unused marker NR_CPUS to pcpu_last_unit_cpu.
    
    This was discovered through kdump failure which was caused by
    malfunctioning per_cpu_ptr_to_phys() on a kvm setup with 50 possible
    CPUs by CAI Qian.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: CAI Qian <caiqian@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Sep 20, 2010
  1. ahci: fix hang on failed softreset

    htejun authored and gregkh committed Aug 27, 2010
    commit f1f5a80 upstream.
    
    ahci_do_softreset() compared the current time and deadline in reverse
    when calculating timeout for SRST issue.  The result is that if
    @deadline is in future, SRST is issued with 0 timeout, which hasn't
    caused any problem because it later waits for DRDY with the correct
    timeout.  If deadline is already exceeded by the time SRST is about to
    be issued, the timeout calculation underflows and if the device
    doesn't respond, timeout doesn't trigger for a _very_ long time.
    
    Reverse the incorrect comparison order.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Anssi Hannula <anssi.hannula@iki.fi>
    Tested-by: Gwendal Grignou <gwendal@google.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  2. libata: skip EH autopsy and recovery during suspend

    htejun authored and gregkh committed Sep 7, 2010
    commit e2f3d75 upstream.
    
    For some mysterious reason, certain hardware reacts badly to usual EH
    actions while the system is going for suspend.  As the devices won't
    be needed until the system is resumed, ask EH to skip usual autopsy
    and recovery and proceed directly to suspend.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Tested-by: Stephan Diestelhorst <stephan.diestelhorst@amd.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  3. pata_cmd64x: revert commit d62f557

    htejun authored and gregkh committed Aug 17, 2010
    commit aba8a08 upstream.
    
    Commit d62f557 (pata_cmd64x: fix handling of address setup timings)
    incorrectly called ata_timing_compute() on UDMA mode on 0 @ut leading
    to devide by zero fault.  Revert it until better fix is available.
    This is reported in bko#16607 by Milan Kocian who also root caused it.
    
      https://bugzilla.kernel.org/show_bug.cgi?id=16607
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-and-root-caused-by: Milan Kocian <milan.kocian@wq.cz>
    Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Aug 13, 2010
  1. bio, fs: update RWA_MASK, READA and SWRITE to match the corresponding…

    htejun authored and gregkh committed Aug 3, 2010
    … BIO_RW_* bits
    
    commit aca27ba upstream.
    
    Commit a82afdf (block: use the same failfast bits for bio and request)
    moved BIO_RW_* bits around such that they match up with REQ_* bits.
    Unfortunately, fs.h hard coded RW_MASK, RWA_MASK, READ, WRITE, READA
    and SWRITE as 0, 1, 2 and 3, and expected them to match with BIO_RW_*
    bits.  READ/WRITE didn't change but BIO_RW_AHEAD was moved to bit 4
    instead of bit 1, breaking RWA_MASK, READA and SWRITE.
    
    This patch updates RWA_MASK, READA and SWRITE such that they match the
    BIO_RW_* bits again.  A follow up patch will update the definitions to
    directly use BIO_RW_* bits so that this kind of breakage won't happen
    again.
    
    Neil also spotted missing RWA_MASK conversion.
    
    Stable: The offending commit a82afdf was released with v2.6.32, so
    this patch should be applied to all kernels since then but it must
    _NOT_ be applied to kernels earlier than that.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-and-bisected-by: Vladislav Bolkhovitin <vst@vlnb.net>
    Root-caused-by: Neil Brown <neilb@suse.de>
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  2. PCI: disable MSI on VIA K8M800

    htejun authored and gregkh committed May 23, 2010
    commit 549e156 upstream.
    
    MSI delivery from on-board ahci controller doesn't work on K8M800.  At
    this point, it's unclear whether the culprit is with the ahci
    controller or the host bridge.  Given the track record and considering
    the rather minimal impact of MSI, disabling it seems reasonable.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Rainer Hurtado Navarro <publio.escipion.el.africano@gmail.com>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  3. ata_piix: fix locking around SIDPR access

    htejun authored and gregkh committed Jul 20, 2010
    commit 213373c upstream.
    
    SIDPR window registers are shared across ports and as each access is
    done in two steps, accesses to different ports under EH may race.
    This primarily is caused by incorrect host locking in EH context and
    should be fixed by defining locking requirements for each EH operation
    which can be used during EH and enforcing them but for now work around
    the problem by adding a dedicated SIDPR lock and grabbing it for each
    SIDPR access.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Mark Knecht <markknecht@gmail.com>
    Reported-by: Paul Check <paul@thechecks.ca>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Aug 10, 2010
  1. block_dev: always serialize exclusive open attempts

    htejun authored and gregkh committed Aug 4, 2010
    commit e75aa85 upstream.
    
    bd_prepare_to_claim() incorrectly allowed multiple attempts for
    exclusive open to progress in parallel if the attempting holders are
    identical.  This triggered BUG_ON() as reported in the following bug.
    
      https://bugzilla.kernel.org/show_bug.cgi?id=16393
    
    __bd_abort_claiming() is used to finish claiming blocks and doesn't
    work if multiple openers are inside a claiming block.  Allowing
    multiple parallel open attempts to continue doesn't gain anything as
    those are serialized down in the call chain anyway.  Fix it by always
    allowing only single open attempt in a claiming block.
    
    This problem can easily be reproduced by adding a delay after
    bd_prepare_to_claim() and attempting to mount two partitions of a
    disk.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commits on Jul 1, 2010
  1. ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1

    htejun authored and Jeff Garzik committed Jun 22, 2010
    IDE mode of MCP89 on MBP 7,1 doesn't set DMA enable bits in the BMDMA
    status register.  Make the following changes to work around the problem.
    
    * Instead of using hard coded 1 in id->driver_data as class code
      match, use ATA_GEN_CLASS_MATCH and carry the matched id in
      host->private_data.
    
    * Instead of matching PCI_VENDOR_ID_CENATEK, use ATA_GEN_FORCE_DMA
      flag in id instead.
    
    * Add ATA_GEN_FORCE_DMA to the id entry of MBP 7,1.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Peer Chen <pchen@nvidia.com>
    Cc: stable@kernel.org
    Reported-by: Anders Østhus <grapz666@gmail.com>
    Reported-by: Andreas Graf <andreas_graf@csgraf.de>
    Reported-by: Benoit Gschwind <gschwind@gnu-log.net>
    Reported-by: Damien Cassou <damien.cassou@gmail.com>
    Reported-by: tixetsal@juno.com
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  2. ahci,ata_generic: let ata_generic handle new MBP w/ MCP89

    htejun authored and Jeff Garzik committed Jun 17, 2010
    For yet unknown reason, MCP89 on MBP 7,1 doesn't work w/ ahci under
    linux but the controller doesn't require explicit mode setting and
    works fine with ata_generic.  Make ahci ignore the controller on MBP
    7,1 and let ata_generic take it for now.
    
    Reported in bko#15923.
    
      https://bugzilla.kernel.org/show_bug.cgi?id=15923
    
    NVIDIA is investigating why ahci mode doesn't work.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Peer Chen <pchen@nvidia.com>
    Cc: stable@kernel.org
    Reported-by: Anders Østhus <grapz666@gmail.com>
    Reported-by: Andreas Graf <andreas_graf@csgraf.de>
    Reported-by: Benoit Gschwind <gschwind@gnu-log.net>
    Reported-by: Damien Cassou <damien.cassou@gmail.com>
    Reported-by: tixetsal@juno.com
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Commits on Jun 28, 2010
  1. acpi: update gfp/slab.h includes

    htejun authored and Stephen Rothwell committed Mar 29, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Len Brown <lenb@kernel.org>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  2. ocfs2: update gfp/slab.h includes

    htejun authored and Stephen Rothwell committed Mar 29, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Joel Becker <joel.becker@oracle.com>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  3. davinci: update gfp/slab.h includes

    htejun authored and Stephen Rothwell committed Mar 29, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Kevin Hilman <khilman@deeprootsystems.com>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  4. arm: update gfp/slab.h includes

    htejun authored and Stephen Rothwell committed Mar 29, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Russell King <linux@arm.linux.org.uk>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  5. v4l-dvb: update gfp/slab.h includes

    htejun authored and Stephen Rothwell committed Mar 29, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Commits on Jun 18, 2010
  1. percpu: fix first chunk match in per_cpu_ptr_to_phys()

    htejun committed Jun 18, 2010
    per_cpu_ptr_to_phys() determines whether the passed in @addr belongs
    to the first_chunk or not by just matching the address against the
    address range of the base unit (unit0, used by cpu0).  When an adress
    from another cpu was passed in, it will always determine that the
    address doesn't belong to the first chunk even when it does.  This
    makes the function return a bogus physical address which may lead to
    crash.
    
    This problem was discovered by Cliff Wickman while investigating a
    crash during kdump on a SGI UV system.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Cliff Wickman <cpw@sgi.com>
    Tested-by: Cliff Wickman <cpw@sgi.com>
    Cc: stable@kernel.org
Commits on Jun 7, 2010
  1. ahci: redo stopping DMA engines on empty ports

    htejun authored and Jeff Garzik committed Jun 7, 2010
    Commit 96d6030 (ahci: Turn off DMA engines when there's no device)
    implemented stopping DMA engines on empty ports but it used single
    sampling of status registers to determine device presence which led to
    disabling of DMA engines on occupied ports.  Do it after all EH
    actions are complete using device presence state determined by EH.
    This avoids spurious disabling of DMA engines and simplifies the code.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
    Cc: Matthew Garrett <mjg@redhat.com>
    Cc: Robert Hancock <hancockrwd@gmail.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  2. ahci: add pci quirk for JMB362

    htejun authored and Jeff Garzik committed Jun 3, 2010
    JMB362 is a new variant of jmicron controller which is similar to
    JMB360 but has two SATA ports instead of one.  As there is no PATA
    port, single function AHCI mode can be used as in JMB360.  Add pci
    quirk for JMB362.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Aries Lee <arieslee@jmicron.com>
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  3. sata_via: explain the magic fix

    htejun authored and Jeff Garzik committed Jun 3, 2010
    Add Joseph Chan's explanation of the problem and workaround to the
    VT6421 magic fix.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Joseph Chan <JosephChan@via.com.tw>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Commits on Jun 2, 2010
  1. libata: implement on-demand HPA unlocking

    htejun authored and Jeff Garzik committed May 15, 2010
    Implement ata_scsi_unlock_native_capacity() which will be called
    through SCSI layer when block layer notices that partitions on a
    device extend beyond the end of the device.  It requests EH to unlock
    HPA, waits for completion and returns the current device capacity.
    
    This allows libata to unlock HPA on demand instead of having to decide
    whether to unlock upfront.  Unlocking on demand is safer than
    unlocking by upfront because some BIOSes write private data to the
    area beyond HPA limit.  This was suggested by Ben Hutchings.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Suggested-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  2. libata: use the enlarged capacity after late HPA unlock

    htejun authored and Jeff Garzik committed May 15, 2010
    After late HPA unlock, libata kept using the original capacity
    ignoring the new larger native capacity.  Enlarging device on the fly
    doesn't cause any harm.  Use the larger native capacity instead.  This
    will enable on-demand HPA unlocking.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  3. SCSI: implement sd_unlock_native_capacity()

    htejun authored and Jeff Garzik committed May 15, 2010
    Implement sd_unlock_native_capacity() method which calls into
    hostt->unlock_native_capacity() if implemented.  This will be invoked
    by block layer if partitions extend beyond the end of the device and
    can be used to implement, for example, on-demand ATA host protected
    area unlocking.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  4. sata_nv: don't diddle with nIEN on mcp55

    htejun authored and Jeff Garzik committed Jun 1, 2010
    On mcp55, nIEN gets stuck once set and liteon blueray rom iHOS104-08
    violates ATA specification and fails to set I on D2H Reg FIS if nIEN
    is set when the command was issued.  When the other party is following
    the spec, both devices can work fine but when the two flaws are put
    together, they can't talk to each other.
    
    mcp55 has its own IRQ masking mechanism and there's no reason to mess
    with nIEN in the first place.  Fix it by dropping nIEN diddling from
    nv_mcp55_freeze/thaw().
    
    This was originally reported by Cengiz.  Although Cengiz hasn't
    verified the fix yet, I could reproduce this problem and verfiy the
    fix.  Even if Cengiz is experiencing different or additional problems,
    this patch is needed.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Cengiz Günay <cgunay@emory.edu>
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  5. sata_via: magic vt6421 fix for transmission problems w/ WD drives

    htejun authored and Jeff Garzik committed May 31, 2010
    vt6421 has problems talking to recent WD drives.  It causes a lot of
    transmission errors while high bandwidth transfer as reported in the
    following bugzilla entry.
    
      https://bugzilla.kernel.org/show_bug.cgi?id=15173
    
    Joseph Chan provided the following fix.  I don't have any idea what it
    does but I can verify the issue is gone with the patch applied.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Originally-from: Joseph Chan <JosephChan@via.com.tw>
    Reported-by: Jorrit Tijben <sjorrit@gmail.com>
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Commits on May 27, 2010
  1. gpio: Update gfp/slab.h includes for rdc321x

    htejun authored and sameo committed Apr 2, 2010
    Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
    gfp.h or slab.h is included as necessary.
    
    Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
Commits on May 25, 2010
  1. libata: implement dump_id force param

    htejun authored and Jeff Garzik committed May 23, 2010
    Add dump_id libata.force parameter.  If specified, libata dumps full
    IDENTIFY data during device configuration.  This is to aid debugging.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Larry Baker <baker@usgs.gov>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  2. libata: disable ATAPI AN by default

    htejun authored and Jeff Garzik committed May 19, 2010
    There are ATAPI devices which raise AN when hit by commands issued by
    open().  This leads to infinite loop of AN -> MEDIA_CHANGE uevent ->
    udev open() to check media -> AN.
    
    Both ACS and SerialATA standards don't define in which case ATAPI
    devices are supposed to raise or not raise AN.  They both list media
    insertion event as a possible use case for ATAPI ANs but there is no
    clear description of what constitutes such events.  As such, it seems
    a bit too naive to export ANs directly to userland as MEDIA_CHANGE
    events without further verification (which should behave similarly to
    windows as it apparently is the only thing that some hardware vendors
    are testing against).
    
    This patch adds libata.atapi_an module parameter and disables ATAPI AN
    by default for now.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Cc: Nick Bowler <nbowler@elliptictech.com>
    Cc: David Zeuthen <david@fubar.dk>
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  3. libata-sff: make BMDMA optional

    htejun authored and Jeff Garzik committed May 19, 2010
    Make BMDMA optional depending on new config variable CONFIG_ATA_BMDMA.
    In Kconfig, drivers are grouped into five groups - non-SFF native, SFF
    w/ custom DMA interface, SFF w/ BMDMA, PIO-only SFF, and generic
    fallback / legacy ones.  Kconfig and Makefile are reorganized
    according to the groups and ordered alphabetically inside each group.
    
    ata_ioports.bmdma_addr and ata_port.bmdma_prd[_dma] are put into
    CONFIG_ATA_BMDMA, as are all bmdma related ops, variables and
    functions.
    
    This increase the binary size slightly when BMDMA is enabled but on
    both native-only and PIO-only configurations the size is slightly
    reduced.  Either way, the size difference is insignificant.  This
    change is more meaningful to signify the separation between SFF and
    BMDMA and as a tool to verify the separation.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  4. libata-sff: kill dummy BMDMA ops from sata_qstor and pata_octeon_cf

    htejun authored and Jeff Garzik committed May 19, 2010
    Now that SFF and BMDMA are completely separate, sata_qstor and
    pata_octeon_cf which inherit from ata_sff_port_ops don't need to worry
    about BMDMA ops being called.  Kill the dummy BMDMA ops.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  5. libata-sff: separate out BMDMA init

    htejun authored and Jeff Garzik committed May 19, 2010
    Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
    from their SFF counterparts.  SFF ones no longer try to initialize
    BMDMA or set PCI master.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  6. libata-sff: separate out BMDMA irq handler

    htejun authored and Jeff Garzik committed May 19, 2010
    Separate out BMDMA irq handler from SFF irq handler.  The misnamed
    host_intr() functions are renamed to ata_sff_port_intr() and
    ata_bmdma_port_intr().  Common parts are factored into
    __ata_sff_port_intr() and __ata_sff_interrupt() and used by sff and
    bmdma interrupt routines.
    
    All BMDMA drivers now use ata_bmdma_interrupt() or
    ata_bmdma_port_intr() while all non-BMDMA SFF ones use
    ata_sff_interrupt() or ata_sff_port_intr().
    
    For now, ata_pci_sff_init_one() uses ata_bmdma_interrupt() as it's
    used by both SFF and BMDMA drivers.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  7. libata-sff: ata_sff_irq_clear() is BMDMA specific

    htejun authored and Jeff Garzik committed May 19, 2010
    ata_sff_irq_clear() is BMDMA specific.  Rename it to
    ata_bmdma_irq_clear(), move it to ata_bmdma_port_ops and make
    ->sff_irq_clear() optional.
    
    Note: ata_bmdma_irq_clear() is actually only needed by ata_piix and
          possibly by sata_sil.  This should be moved to respective low
          level drivers later.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>