17 Oct, 2007

1 commit

  • * 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
    Fix memory leak in dm-crypt
    SPARC64: sg chaining support
    SPARC: sg chaining support
    PPC: sg chaining support
    PS3: sg chaining support
    IA64: sg chaining support
    x86-64: enable sg chaining
    x86-64: update pci-gart iommu to sg helpers
    x86-64: update nommu to sg helpers
    x86-64: update calgary iommu to sg helpers
    swiotlb: sg chaining support
    i386: enable sg chaining
    i386 dma_map_sg: convert to using sg helpers
    mmc: need to zero sglist on init
    Panic in blk_rq_map_sg() from CCISS driver
    remove sglist_len
    remove blk_queue_max_phys_segments in libata
    revert sg segment size ifdefs
    Fixup u14-34f ENABLE_SG_CHAINING
    qla1280: enable use_sg_chaining option
    ...

    Linus Torvalds
     

16 Oct, 2007

13 commits

  • LIBATA_MAX_PRD is the maximum number of DMA scatter/gather elements
    permitted by the HBA's DMA engine. It's properly set to
    q->max_hw_segments via the sg_tablesize parameter.

    libata shouldn't call blk_queue_max_phys_segments. Now LIBATA_MAX_PRD
    is equal to SCSI_MAX_PHYS_SEGMENTS by default (both is 128), so
    everything is fine. But if they are changed, some code (like the scsi
    mid layer, sg chaining, etc) might not work properly.

    (Addition from Jens) The basic issue is that the physical segment
    setting is purely a driver issue. And since SCSI is managing the sglist,
    libata has no business changing the setting. All libata should care
    about is the hw segment setting.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • This converts libata to using the sg helpers for looking up sg
    elements, instead of doing it manually.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Fix libata docbook warnings.

    Warning(linux-2.6.23-git8//drivers/ata/libata-scsi.c:3251): No description found for parameter 'dev'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This driver was using hooks that were very recently removed.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Signed-off-by: Kristoffer Ericson
    Signed-off-by: Jeff Garzik

    Kristoffer Ericson
     
  • The strn_pattern_cmp routine does not handle a blank name parameter
    properly. The only patterns which should match a blank name are "*"
    and an explicit "". If the function is passed a blank name in current
    code, it will always match against the patt parameter. The bug manifests
    itself as the device with the empty model name always matching the first
    device in the DMA blacklist, forcing it to revert to PIO mode.

    Signed-off-by: Andrew Paprocki
    Signed-off-by: Jeff Garzik

    Andrew Paprocki
     
  • This patch adds a port map for ICH9 and ICH8 SATA controllers that have only 2 ports available in that mode.

    Signed-off-by: Jason Gaston
    Signed-off-by: Jeff Garzik

    Jason Gaston
     
  • This is a driver for the ATA controller on the Geode CS5536 companion
    chip. The PCI device ID for this device was previously claimed by
    pata_amd.c but the PIO timings were not correct. This driver also
    works around a bug in some BIOSes that handle unaligned access to the
    PCI config registers poorly. Finally, the driver allows fallback to
    using MSR registers for configuration on BIOSes that are truly
    broken.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jeff Garzik

    Martin K. Petersen
     
  • ST9160821AS / 3.CCD does spurious completions too. Blacklist it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • After commands which can change device configuration, EH is scheduled
    to revalidate and reconfigure the device. Host link was incorrectly
    used unconditionally when scheduling EH action. This resulted in
    bogus revalidation request and mismatched configuration between device
    and driver. Fix it.

    This bug was reported by Igor Durdanovic.

    Signed-off-by: Tejun Heo
    Cc: Igor Durdanovic
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Add the Software NCQ support to sata_nv.c for MCP51/MCP55/MCP61 SATA
    controller. NCQ function is disable by default, you can enable it
    with 'swncq=1'. NCQ will be turned off if the drive is Maxtor on
    MCP51 or MCP55 rev 0xa2 platform.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Kuan Luo
    Signed-off-by: Peer Chen
    Cc: Zoltan Boszormenyi
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Kuan Luo
     
  • This patch adds MMIO support to the pata_sil680 for taskfile IOs,
    based on what the old siimage does.

    I haven't bothered changing the chip setup stuff from PCI config
    cycles to MMIO though (siimage does it), I don't think it matters,
    I've only adapted it to use MMIO for taskfile accesses.

    I've tested it on a Cell blade and it seems to work fine.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Jeff Garzik

    Benjamin Herrenschmidt
     

15 Oct, 2007

1 commit


14 Oct, 2007

1 commit


13 Oct, 2007

24 commits

  • * remove pointless pci_dev_to_dev() wrapper. Just directly reference
    the embedded struct device like everyone else does.

    * pata_cs5520: delete cs5520_remove_one(), it was a duplicate of
    ata_pci_remove_one()

    * linux/libata.h: don't bother including linux/pci.h, we don't need it.
    Simply declare 'struct pci_dev' and assume interested parties will
    include the header, as they should be doing anyway.

    * linux/libata.h: consolidate all CONFIG_PCI declarations into a
    single location in the header.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • PMP registers used to be accessed with dedicated accessors ->pmp_read
    and ->pmp_write. During reset, those callbacks are called with the
    port frozen so they should be able to run without depending on
    interrupt delivery. To achieve this, they were implemented polling.

    However, as resetting the host port makes the PMP to isolate fan-out
    ports until SError.X is cleared, resetting fan-out ports while port is
    frozen doesn't buy much additional safety.

    This patch updates libata PMP support such that PMP registers are
    accessed using regular ata_exec_internal() mechanism and kills
    ->pmp_read/write() callbacks. The following changes are made.

    * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(),
    sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which
    are now standalone PMP register access functions.

    * sata_pmp_read/write() returns err_mask instead of rc. This is
    consistent with other functions which issue internal commands and
    allows more detailed error reporting.

    * ahci interrupt handler is modified to ignore BAD_PMP and
    spurious/illegal completion IRQs while reset is in progress. These
    conditions are expected during reset.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Implement ATA_PFLAG_RESETTING. This flag is set while reset is in
    progress. It's set before prereset is called and cleared after reset
    fails or postreset is finished.

    This flag itself doesn't have any function. It will be used by LLDs
    to tell whether reset is in progress if it needs to behave differently
    during reset.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Add @timeout argument to ata_exec_internal[_sg](). If 0, default
    timeout ata_probe_timeout is used.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Asynchronous notification on ICH9 didn't work because it didn't write
    AN FIS into the RX area - it only updates SNotification. Also,
    snooping SDB_FIS RX area is racy against further SDB FIS receptions.
    Let sata_async_notification() determine using SNTF if it's available
    and snoop RX area iff SNTF isn't available

    Signed-off-by: Tejun Heo
    Cc: Kristen Carlson Accardi
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Now that we have pp->intr_mask, move PORT_IRQ_BAD_PMP enabling to
    ahci_pmp_attach/detach() where it belongs.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ahci had problems with NCQ over PMP and NCQ used to be disabled while
    PMP was attached. After fixing the problem, the temporary NCQ
    disabling code wasn't removed completely. Kill the remaining piece.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Tasks in uninterruptible sleep might be woken up by unrelated events
    and should check whether the condition it was waiting for has actually
    triggered. Wrap schedule_timeout_uninterruptible() in loop to achieve
    it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ATA_EHI_NO_AUTOPSY and ATA_EHI_QUIET are used during initial probing
    to skip exception analysis and reporting. Usually, there's nothing to
    report but on some allowed but rare corner cases (e.g. phy status
    changed interrupt when IRQ is enabled on frozen port - this happens if
    IRQ pending status isn't cleared in the IRQ router or controller)
    exception messages get printed.

    Skip reporting if ATA_EHI_QUIET is set.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ehi description field is used to carry LLD specific controller
    description. Sometimes, it's used without clearing before and LLD
    description gets printed with exception information one more time.
    Clear after printing.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • PATA part of all current JMB controllers behave the same way and
    JMicron confirms that all future ones will stay compatible. Drop
    device matching and match only vendor and class.

    Signed-off-by: Tejun Heo
    Cc: Ethan Hsiao
    Cc: Justin Tsai
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ST9160821AS / 3.ALD also does spurious NCQ completions. Disable NCQ.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • On a cable there may be
    eighty wires or perhaps forty
    and we learn about its type
    In the world of ACPI

    So we call the GTM
    And we find the the timing rate
    And we look through it to see
    If eighty wire it must be

    Timing lives in ACPI routines
    ACPI routines, ACPI routines
    Timing lives in ACPI routines
    ACPI routes ACPI routines

    And the drivers last you see
    Picking up unknown pci ids
    and the code begins to work

    Timing lives in ACPI routines
    ACPI routines, ACPI routines
    Timing lives in ACPI routines
    ACPI routes ACPI routines

    [Full speed ahead, Mr Hacker, full speed ahead]
    Full speed over here sir!
    Checking Cable, checking cable
    Aye aye, 80 wire,
    Heaven heaven]

    If we use ACPI (ACPI)
    Every box (every box) has all we need (has all we need)
    Cable type (cable type) and mode timing (mode timing)
    In our ATA (in our ATA) subroutines (subroutines, ha ha)

    Timing lives in ACPI routines
    ACPI routines, ACPI routines
    Timing lives in ACPI routines
    ACPI routes ACPI routines
    Timing lives in ACPI routines
    ACPI routines, ACPI routines
    Timing lives in ACPI routines
    ACPI routes ACPI routines

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Talk to the dark side our driver has to, yes. Much misleading is the
    data. Store it in a structure we do so that it may be parsed.

    Signed-off-by: Alan Cox
    --
    Whats small, old and shouts phrases out of order across mountains ?
    Yodla..
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • HDT722516DLA380 does spurious completion of NCQ commands. Blacklist
    it.

    Signed-off-by: Tejun Heo
    Cc: Frans Pop
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Seagate Barracuda ST380817AS has troubles with NCQ. For example,
    unpacking a tarball on an XFS filesystem gives this:

    ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x2 frozen
    ata1.00: cmd 61/40:00:29:a3:98/00:00:00:00:00/40 tag 0 cdb 0x0 data 32768 out
    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)

    More info here:
    http://lkml.org/lkml/2007/1/21/76

    Blacklist it!

    Signed-off-by: Paolo Ornati
    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Paolo Ornati
     
  • Let's see what explodes.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Some controller variants snoop the ATAPI length value for Packet
    transfers to do state machine and FIFO management. Thus we want to
    set it properly, even for cases where it is otherwise meaningless.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Correct handling of SRST reset sequences. After an SRST it is undefined
    whether the drive has gone back to PIO0. In order to talk safely we should
    talk slowly and carefully until we know.

    Thus when we do the reset if the controller has a pio setup method we call it
    to flip back to PIO 0 and a known state. After the reset completes the
    identify will then be done at the safe speed and the drive/controller will
    pick suitable faster modes and reconfigure the controller to these timings.

    As a side effect it means we force the controller to PIO 0 as we bring it up
    which fixes funnies on a few systems where the BIOS firmware leaves us in an
    interesting choice of modes, or embedded boxes with no firmware which come up
    in random states.

    For smart controllers there is nothing to do - they know about this
    internally.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Modern laptops with hotswap bays still tend to utilise a PATA interface
    on a SATA bridge, generally with the host controller in some legacy
    emulation mode rather than AHCI. This means that the existing hotplug
    code in libata is unable to work. The ACPI specification states that
    these devices can send notifications when hotswapped, which avoids the
    need to obtain notification from the controller. This patch uses the
    existing libata-acpi code and simply registers a notification in order
    to trigger a rescan whenever the firmware signals an event.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Jeff Garzik

    Matthew Garrett
     
  • This is useful when debugging, handling problem systems, or for
    distributions just to get the system installed so it can be sorted
    out later.

    This is a bit smarter than the old IDE one and lets you do

    libata.dma=0 Disable all PATA DMA like old IDE
    libata.dma=1 Disk DMA only
    libata.dma=2 ATAPI DMA only
    libata.dma=4 CF DMA only

    (or combinations thereof - 0,1,3 being the useful ones I suspect)

    (I've split CF as it seems to be a seperate case of pain and suffering
    different to the others and caused by assorted PIO wired adapters etc)

    Signed-off-by: Alan Cox

    [edited to work on SATA too, changing name from 'pata_dma' to 'dma']
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Signed-off-by: Peer Chen
    Signed-off-by: Jeff Garzik

    Peer Chen
     
  • This adds human-readable decoding of the ATA status and error registers
    (similar to what drivers/ide does) as well as the SATA Serror register
    to libata error handling output. This prevents the need to pore
    through standards documents to figure out the meaning of the bits
    in these registers when looking at error reports. Some bits that
    drivers/ide decoded are not decoded here, since the bits are either
    command-dependent or obsolete, and properly parsing them would add
    too much complexity.

    Signed-off-by: Robert Hancock

    [edited slightly to make output a bit more symmetric]
    Signed-off-by: Jeff Garzik

    Robert Hancock
     
  • Of course some controllers lie about PMP support. Black list them.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo