20 May, 2008

23 commits

  • Minor coding-style fixes for sata_promise:
    - remove stray blank lines
    - fix checkpatch.pl errors; warnings about long lines
    remain, but I don't intend to address those at this time
    - remove two inline directives: neither is essential and
    both functions are trivially inlinable anyway by virtue
    of being static and having a single unique call site
    - fix comment in pdc_interrupt(): the bits in PDC_INT_SEQMASK
    denote SEQIDs not tags, the distinction becomes important
    when NCQ gets implemented

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Jeff Garzik

    Mikael Pettersson
     
  • This patch cleans up sata_promise's mmio accesses.

    In sata_promise there are three distinct mmio address spaces:
    1. global registers, offsets from host->iomap[PDC_MMIO_BAR]
    2. per-port ATA registers, offsets from ap->ioaddr.cmd_addr
    3. per-port SATA registers, offsets from ap->ioaddr.scr_addr

    The driver currently often fails to indicate which address space
    a given mmio base pointer refers to, which is a source of bugs
    and confusion (see recent pdc_thaw() irq clearing bug; it's also
    been an obstacle for the pending NCQ extensions).

    To reduce these problems, adopt a coding style where the name of
    a base pointer always indicates which address space it refers to:
    1. global registers: host_mmio
    2. per-port ATA registers: ata_mmio
    3. per-port SATA registers: sata_mmio

    Also rearrange register offset definitions to clearly indicate
    which address space they belong to, and add a symbolic definition
    for the previously hard-coded PHYMODE4 register.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Jeff Garzik

    Mikael Pettersson
     
  • This patch fixes two bugs in sata_promise's irq status clearing paths:
    1. When clearing the irq status for a specific port, the driver
    read the global SEQMASK register. This is wrong because that
    clears the irq status for _all_ ports.
    2. pdc_thaw() incorrectly added the PDC_INT_SEQMASK host register
    offset to a per-port ata engine base address. This resulted in
    it reading the unrelated PDC_PKT_SUBMIT register, which did not
    have the desired irq status clearing effect.

    In both cases the fix is to read from the port's Command/Status
    register. This also matches what Promise's own driver does.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Jeff Garzik

    Mikael Pettersson
     
  • Use the kernel-provided clamp_val() macro.

    FIT was always applied to a member of struct ata_timing (unsigned short)
    and two constants. clamp_val will not cast to short anymore.

    Signed-off-by: Harvey Harrison
    Cc: Jeff Garzik
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Harvey Harrison
     
  • Check for an empty request queue before stopping EDMA after a FBS-NCQ error,
    as per recommendation from the Marvell datasheet.

    This ensures that the EDMA won't suddenly become active again
    just after our subsequent check of the empty/idle bits.

    Also bump DRV_VERSION.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Part five of simplifying/fixing handling of the main_irq_mask register
    to resolve unexpected interrupt issues observed in 2.6.26-rc*.

    Keep a cached copy of the main_irq_mask so that we don't have
    to stall the CPU to read it on every pass through mv_interrupt.

    This significantly speeds up interrupt handling, both for sata_mv,
    and for any other driver/device sharing the same PCI IRQ line.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Part four of simplifying/fixing handling of the main_irq_mask register
    to resolve unexpected interrupt issues observed in 2.6.26-rc*.

    Ignore masked IRQs in mv_interrupt().
    This prevents "unexpected device interrupt while idle" messages.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Part three of simplifying/fixing handling of the main_irq_mask register
    to resolve unexpected interrupt issues observed in 2.6.26-rc*.

    Partially fix a reported bug whereby we sometimes miss seeing drives on
    a port-multiplier, as reported by Gwendal Grignou .

    The problem was that we were receiving unexpected interrupts
    during EH from POLLed commands while accessing port-multiplier registers.
    These unexpected interrupts can be prevented by masking the DONE_IRQ bit
    for the port whenever not operating in EDMA mode.

    Also fix port_stop() to mask all port interrupts.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Part two of simplifying/fixing handling of the main_irq_mask register
    to resolve unexpected interrupt issues observed in 2.6.26-rc*.

    Consolidate all updates of the host main_irq_mask register
    into a single function. This simplifies maintenance,
    and also prepares the way for caching it (later).

    No functionality changes in this update.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Part one of simplifying/fixing handling of the main_irq_mask register
    to resolve unexpected interrupt issues observed in 2.6.26-rc*.

    Don't blindly enable port IRQs at host init time.
    Instead, enable only the bits that we want,
    which in this case is simply the PCI_ERR bit.

    The per-port bits can wait until the ports are reset/probed for devices.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Now that we handle the FIS_IRQ_CAUSE register correctly,
    we can also now handle SATA asynchronous notification events.

    So enable them, but only for the more modern GenIIe chips.
    (older chips have unaddressed errata issues related to this).

    This fixes hot plug/unplug for port-muliplier ports.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Group all of the flags for GenIIe devices into a common definition,
    to ensure that any updates to them are shared by all GenIIe devices.

    This will help make future maintenance somewhat simpler.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Fix handling of the FIS_IRQ_CAUSE register in sata_mv.

    This register exists *only* on GenIIe devices, so don't bother
    writing to it on older chips. Also, it has to be read/cleared
    in mv_err_intr() before clearing the main ERR_IRQ_CAUSE register.

    This keeps sata_mv from getting stuck forever on certain error types.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Always request a softreset after hardreset succeeds.

    This fixes a regression reported by Martin Michlmayr .

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Remove an explicit memset(.., 0, ...) to a variable allocated with
    kzalloc (i.e. 'info').

    Signed-off-by: Christophe Jaillet
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Jeff Garzik

    Christophe Jaillet
     
  • Set ATAPI host state machine to control IDE device terminate sequence.
    Some IDE harddisk may assert terminate sequence in the middle of a
    formal DMA transaction and resume later. Bit DETECT_TERM in ATAPI_CTRL
    register determines whether the ATAPI host state machine or the kernel
    driver should take care of this case.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Bryan Wu
    Signed-off-by: Jeff Garzik

    Sonic Zhang
     
  • * 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/i915: save and restore dsparb and d_state registers.
    drm/i915: fix off by one in VGA save/restore of AR & CR regs.
    drm: disable tasklets not IRQs when taking the drm lock spinlock
    Revert "drm/vbl rework: rework how the drm deals with vblank."

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    Don't clean bounds.h and asm-offsets.h
    kconfig: incorrect 'len' field initialisation ?
    kernel-doc: allow unnamed bit-fields
    kbuild: filter away debug symbols from kernel symbols
    Remove *.rej pattern from .gitignore
    MAINTAINERS: document names of new kbuild trees
    kbuild: disable modpost warnings for linkonce sections
    kbuild: escape meta characters in regular expression in make TAGS

    Linus Torvalds
     
  • Since 97965478a66fbdf0f4ad5e4ecc4828f0cb548a45 ("mm: Get rid of __ZONE_COUNT")
    mmzone.h includes bounds.h.
    Calling make clean after make prepare removes bounds.h
    again so when building external modules this fails.

    Signed-off-by: Jan Blunck
    Signed-off-by: Sam Ravnborg
    --

    Jan Blunck
     
  • 1) The field 'len' of the 'gstr' structure seems to track the size of the memory
    already allocated for the "growable string". So the value of this field should be
    the same as the 'malloc()' just above, shouldn't it ?

    Signed-off-by: Christophe Jaillet
    Signed-off-by: Sam Ravnborg

    Christophe Jaillet
     
  • Allow for unnamed bit-fields and skip them instead of printing an
    erroneous warning message for them, such as:

    Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32'

    which contains:

    struct tm_scsw {
    u32 :1;

    Signed-off-by: Randy Dunlap
    Signed-off-by: Sam Ravnborg

    Randy Dunlap
     
  • Andi Kleen
    reported that he saw a lot of symbols like this:

    0000000000000b24 N DW.aio.h.903a6d92.2
    0000000000000bce N DW.task_io_accounting.h.8d8de327.0
    0000000000000bec N DW.hrtimer.h.c23659c6.0

    in his System.map / kallsyms output.

    Simple solution is to skip all debugging
    symbols (they are marked 'N').

    Signed-off-by: Sam Ravnborg
    Cc: Paulo Marques

    Sam Ravnborg
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    snd-pcsp: silent misleading warning
    snd-pcsp: depend on CONFIG_EXPERIMENTAL
    snd-pcsp: put back the compatibility code for the older alsa-libs
    snd-pcsp: adjust help texts to frighten users

    Linus Torvalds
     

19 May, 2008

17 commits