31 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (104 commits)
    [SCSI] fcoe: fix configuration problems
    [SCSI] cxgb3i: fix select/depend problem
    [SCSI] fcoe: fix incorrect use of struct module
    [SCSI] cxgb3i: remove use of skb->sp
    [SCSI] cxgb3i: Add cxgb3i iSCSI driver.
    [SCSI] zfcp: Remove unnecessary warning message
    [SCSI] zfcp: Add support for unchained FSF requests
    [SCSI] zfcp: Remove busid macro
    [SCSI] zfcp: remove DID_DID flag
    [SCSI] zfcp: Simplify mask lookups for incoming RSCNs
    [SCSI] zfcp: Remove initial device data from zfcp_data
    [SCSI] zfcp: fix compile warning
    [SCSI] zfcp: Remove adapter list
    [SCSI] zfcp: Simplify SBAL allocation to fix sparse warnings
    [SCSI] zfcp: register with SCSI layer on ccw registration
    [SCSI] zfcp: Fix message line break
    [SCSI] qla2xxx: changes in multiq code
    [SCSI] eata: fix the data buffer accessors conversion regression
    [SCSI] ibmvfc: Improve async event handling
    [SCSI] lpfc : correct printk types on PPC compiles
    ...

    Linus Torvalds
     

30 Dec, 2008

1 commit


29 Dec, 2008

7 commits

  • This implements support for the Large Block Transfer feature found in Silicon
    Image 311x controllers. This allows transferring bigger contiguous chunks of
    data from system memory and avoids the 64KB boundary restriction of standard
    SFF controllers.

    This is based on a patch from Jeff Garzik (from the sii-lbt branch of
    libata-dev) but includes a few bug fixes: Since the bmdma2 register does not
    implement the status bits, the original bmdma register must be used except
    where the bmdma2 register is required. As well the DMA boundary should be
    31-bit instead of 32-bit since the top bit of the length field is still
    required for the PRD end-of-table flag.

    Signed-off-by: Robert Hancock
    Signed-off-by: Jeff Garzik

    Robert Hancock
     
  • Commit
    ATA: piix, fix pointer deref on suspend
    fixed a possible oops in an ugly manner. Use newly introduced dmi_match()
    to make the code pretty again.

    Signed-off-by: Jiri Slaby
    Cc: Alexandru Romanescu
    Cc: Tejun Heo
    Cc: Alan Cox
    Signed-off-by: Jeff Garzik

    Jiri Slaby
     
  • The patchlet below blacklists NCQ on OCZ CORE v2 SSD drive(s). Even
    though the drive advertises NCQ support with queue depth 1, it responds
    with all-zeroes FIS to NCQ commands which triggers ata error handling
    several times before the kernel decides to disable NCQ on the drive.

    Signed-off-by: Lubomir Bulej
    Signed-off-by: Jeff Garzik

    Lubomir Bulej
     
  • Signed-off-by: Qinghuang Feng

    Qinghuang Feng
     
  • ata_port_detach() first made sure EH saw ATA_PFLAG_UNLOADING and then
    assumed EH context belongs to it and performed detach operation
    itself. However, UNLOADING doesn't disable all of EH and this could
    lead to problems including triggering WARN_ON()'s in EH path.

    This patch makes port detach behave more like other EH actions such
    that ata_port_detach() requests EH to detach and waits for completion.

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

    Tejun Heo
     
  • When restoring SControl during detach, PMP links should be handled
    first as changing SControl of the host link can affect SCR access of
    PMP links.

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

    Tejun Heo
     
  • There currently are the following looping constructs.

    * __ata_port_for_each_link() for all available links
    * ata_port_for_each_link() for edge links
    * ata_link_for_each_dev() for all devices
    * ata_link_for_each_dev_reverse() for all devices in reverse order

    Now there's a need for looping construct which is similar to
    __ata_port_for_each_link() but iterates over PMP links before the host
    link. Instead of adding another one with long name, do the following
    cleanup.

    * Implement and export ata_link_next() and ata_dev_next() which take
    @mode parameter and can be used to build custom loop.
    * Implement ata_for_each_link() and ata_for_each_dev() which take
    looping mode explicitly.

    The following iteration modes are implemented.

    * ATA_LITER_EDGE : loop over edge links
    * ATA_LITER_HOST_FIRST : loop over all links, host link first
    * ATA_LITER_PMP_FIRST : loop over all links, PMP links first

    * ATA_DITER_ENABLED : loop over enabled devices
    * ATA_DITER_ENABLED_REVERSE : loop over enabled devices in reverse order
    * ATA_DITER_ALL : loop over all devices
    * ATA_DITER_ALL_REVERSE : loop over all devices in reverse order

    This change removes exlicit device enabledness checks from many loops
    and makes it clear which ones are iterated over in which direction.

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

    Tejun Heo
     

21 Dec, 2008

1 commit

  • This patch adds MDMA/UDMA support using BestComm for DMA on the MPC5200
    platform. Based heavily on previous work by Freescale (Bernard Kuhn,
    John Rigby) and Domen Puncer.

    With this patch, a SanDisk Extreme IV CF card gets read speeds of
    approximately 26.70 MB/sec.

    Signed-off-by: Tim Yamin
    Signed-off-by: Grant Likely

    Tim Yamin
     

16 Dec, 2008

3 commits


09 Dec, 2008

5 commits

  • Various tags are now way out of date

    Signed-off-by: Jeff Garzik

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

    Alan Cox
     
  • Some systems report SIS 5513 as both vendor/id and subvendor/id
    string. In that case we can't distinguish the system by the id
    svid/sdid and in fact the entry here breaks some boxes. At some
    point we need to find another way to detect the Targa Visionary 1000,
    until then this trades a hang for some users with lower performance
    for others.

    Closes: #12092

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

    Alan Cox
     
  • Hi,

    I've found this issue in the mmotm 2008-12-02-17-08.

    --

    Commit
    ata_piix: add borked Tecra M4 to broken suspend list
    introduced DMI variables checking, but they can be null, so that
    we possibly dereference null.

    Check if they are null and avoid checks in that case.

    Solves:
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
    IP: [] piix_pci_device_suspend+0x117/0x230

    Signed-off-by: Jiri Slaby
    Cc: Jeff Garzik
    Cc: Alexandru Romanescu
    Cc: Tejun Heo
    Signed-off-by: Jeff Garzik

    Jiri Slaby
     
  • pata_hpt366 had its clock detection wrong and detected 25Mhz as 40Mhz
    and vice-versa. Fix it.

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

    Tejun Heo
     

02 Dec, 2008

4 commits

  • Some recent Seagate harddrives have firmware bug which causes FLUSH
    CACHE to timeout under certain circumstances if NCQ is being used.
    This can be worked around by disabling NCQ and fixed by updating the
    firmware. Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
    devices.

    The wiki page has been updated to contain information on this issue.

    http://ata.wiki.kernel.org/index.php/Known_issues

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

    Tejun Heo
     
  • Per definition, this function should return the number of bytes
    consumed. As the original parameter "buflen" is being decremented inside
    the read/write loop, save it in "retlen" at the beginning.

    Signed-off-by: Phil Sutter
    Acked-by: Sergei Shtyltov
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Florian Fainelli
    Signed-off-by: Jeff Garzik

    Phil Sutter
     
  • The original standalone driver uses a custom address for the error
    register. Use it in pata_rb532_cf, too.

    Rename two register definitions:
    - The address offset 0x0800 in fact is the ATA base, not ATA command
    address.
    - The offset 0x0C00 is not a regular ATA data address, but a buffered one
    allowing 4-byte IO.

    Signed-off-by: Phil Sutter
    Signed-off-by: Jeff Garzik

    Phil Sutter
     
  • Tecra M4 sometimes forget what it is and reports bogus data via DMI
    which makes the machine evade broken suspend matching and thus fail
    suspend/resume. This patch updates piix_broken_suspend() such that it
    can match such case. As the borked DMI data is a bit generic,
    matching many entries to make the match more specific is necessary.
    As the usual DMI matching is limited to four entries, this patch uses
    hard coded manual matching.

    This is reported by Alexandru Romanescu.

    Signed-off-by: Tejun Heo
    Cc: Alexandru Romanescu
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

15 Nov, 2008

1 commit

  • Currently libata uses four methods to detect device presence.

    1. PHY status if available.
    2. TF register R/W test (only promotes presence, never demotes)
    3. device signature after reset
    4. IDENTIFY failure detection in SFF state machine

    Combination of the above works well in most cases but recently there
    have been a few reports where a phantom device causes unnecessary
    delay during probe. In both cases, PHY status wasn't available. In
    one case, it passed #2 and #3 and failed IDENTIFY with ATA_ERR which
    didn't qualify as #4. The other failed #2 but as it passed #3 and #4,
    it still caused failure.

    In both cases, phantom device reported diagnostic failure, so these
    cases can be safely worked around by considering any !ATA_DRQ IDENTIFY
    failure as NODEV_HINT if diagnostic failure is set.

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

    Tejun Heo
     

11 Nov, 2008

6 commits

  • ehc->last_reset is used to ensure that resets are not issued too
    close to each other. It's initialized to jiffies minus one minute
    on EH entry. However, when new links are initialized after PMP is
    probed, new links have zero for this timestamp resulting in long wait
    depending on the current jiffies.

    This patch makes last_set considered iff ATA_EHI_DID_RESET is set, in
    which case last_reset is always initialized. As an added precaution,
    WARN_ON() is added so that warning is printed if last_reset is
    in future.

    This problem is spotted and debugged by Shane Huang.

    Signed-off-by: Tejun Heo
    Cc: Shane Huang
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Phillip O'Donnell pointed out that the same
    sign extension bug that was fixed in commit ba14a9c2 ("libata: Avoid
    overflow in ata_tf_to_lba48() when tf->hba_lbal > 127") also appears to
    exist in ata_tf_read_block(). Fix this by adding a cast to u64.

    Signed-off-by: Roland Dreier
    Signed-off-by: Jeff Garzik

    Roland Dreier
     
  • Support for Apacer photo steno pro card.

    Signed-off-by: Marc Pignat
    Signed-off-by: Jeff Garzik

    Marc Pignat
     
  • I posted this last month, but was prompted to do so again in bz#467457

    Add capability flag to support slave devices with pata_sch driver.

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

    Mark Salter
     
  • No arguments named @deadline in cs5535_cable_detect() and
    cs5536_cable_detect(). Remove them.

    Signed-off-by: Qinghuang Feng
    Signed-off-by: Jeff Garzik

    Qinghuang Feng
     
  • This patch reverts the following three commits which convert libata to
    use block layer tagging.

    43a49cbdf31e812c0d8f553d433b09b421f5d52c
    e013e13bf605b9e6b702adffbe2853cfc60e7806
    2fca5ccf97d2c28bcfce44f5b07d85e74e3cd18e

    Although using block layer tagging is the right direction, due to the
    tight coupling among tag number, data structure allocation and
    hardware command slot allocation, libata doesn't work correctly with
    the current conversion.

    The biggest problem is guaranteeing that tag 0 is always used for
    non-NCQ commands. Due to the way blk-tag is implemented and how SCSI
    starts and finishes requests, such guarantee can't be made. I'm not
    sure whether this would actually break any low level driver but it
    doesn't look like a good idea to break such assumption given the
    frailty of ATA controllers.

    So, for the time being, keep using the old dumb in-libata qc
    allocation.

    Signed-off-by: Tejun Heo
    Cc: Jens Axobe
    Cc: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

04 Nov, 2008

6 commits

  • libata restores SControl on detach; however, trying to restore
    non-zero DET can cause undeterministic behavior including PMP device
    going offline till power cycling. Mask off DET when restoring
    SControl.

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

    Tejun Heo
     
  • libata always uses PIO for ATAPI commands when the number of bytes to
    transfer isn't multiple of 16 but quantum DAT72 chokes on odd bytes
    PIO transfers. Implement a horkage to skip the mod16 check and apply
    it to the quantum device.

    This is reported by John Clark in the following thread.

    http://thread.gmane.org/gmane.linux.ide/34748

    Signed-off-by: Tejun Heo
    Cc: John Clark
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Peter Moulder has pointed out that there is a slight chance that a
    negative value might be passed to jiffies_to_msecs() in
    ata_scsi_park_show(). This is fixed by saving the value of jiffies in a
    local variable, thus also reducing code since the volatile variable
    jiffies is accessed only once.

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

    Elias Oltmanns
     
  • All three flavors of sata_nv's are different in how their hardreset
    behaves.

    * generic: Hardreset is not reliable. Link often doesn't come online
    after hardreset.

    * nf2/3: A little bit better - link comes online with longer debounce
    timing. However, nf2/3 can't reliable wait for the first D2H
    Register FIS, so it can't wait for device readiness or classify the
    device after hardreset. Follow-up SRST required.

    * ck804: Hardreset finally works.

    The core layer change to prefer hardreset and follow up changes
    exposed the above issues and caused various detection regressions for
    all three flavors. This patch, hopefully, fixes all the known issues
    and should make sata_nv error handling more reliable.

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

    Tejun Heo
     
  • commit b9d5b89b487517cbd4cb4702da829e07ef9e4432 (sata_via: fix support
    for 5287) accidently (?) removed vt*_prepare_host error handling - restore it

    catched by gcc:
    drivers/ata/sata_via.c: In function 'svia_init_one':
    drivers/ata/sata_via.c:567: warning: 'host' may be used uninitialized in this function

    Signed-off-by: Marcin Slusarz
    Cc: Tejun Heo
    Cc: Joseph Chan
    Cc: Jeff Garzik
    Signed-off-by: Jeff Garzik

    Marcin Slusarz
     
  • Promise ATA engines need to be reset when errors occur.
    That's currently done for errors detected by sata_promise itself,
    but it's not done for errors like timeouts detected outside of
    the low-level driver.

    The effect of this omission is that a timeout tends to result
    in a sequence of failed COMRESETs after which libata EH gives
    up and disables the port. At that point the port's ATA engine
    hangs and even reloading the driver will not resume it.

    To fix this, make sata_promise override ->hardreset on SATA
    ports with code which calls pdc_reset_port() on the port in
    question before calling libata's hardreset. PATA ports don't
    use ->hardreset, so for those we override ->softreset instead.

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

    Mikael Pettersson
     

31 Oct, 2008

4 commits

  • libata currently imposes a UDMA5 max transfer rate and 200 sector max
    transfer size for SATA devices that sit behind a pata-sata bridge. Lots
    of devices have known good bridges that don't need this limit applied.
    The MTRON SSD disks are such devices. Transfer rates are increased by
    20-30% with the restriction removed.

    So add a "blacklist" entry for the MTRON devices, with a flag indicating
    that the bridge is known good.

    Signed-off-by: Jeff Garzik

    Jens Axboe
     
  • 5287 used to be treated as vt6420 but it didn't work. It's new family
    of controllers called vt8251 which hosts four SATA ports as M/S of the
    two ATA ports. This configuration is rather peculiar in that although
    the M/S devices are on the same port, each have its own SCR (or
    equivalent link status/control) registers which screws up the
    port-link-device hierarchy assumed by libata. Another controller
    which falls into this category is ata_piix w/ SIDPR access.

    libata now has facility to deal with this class of controllers named
    slave_link. A low level driver for such controllers can just call
    ata_slave_link_init() on the respective ports and libata will handle
    all the difficult parts like following up with single SRST after
    hardresetting both ports.

    This patch creates new controller class vt8251, implements slave_link
    aware init sequence and config space based SCR access for it and moves
    5287 to the new class.

    This patch is based on Joseph Chan's larger patch which was created
    before slave_link was implemented in libata.

    http://thread.gmane.org/gmane.linux.kernel.commits.mm/40640

    Signed-off-by: Tejun Heo
    Cc: Joseph Chan
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • In ata_tf_to_lba48(), when evaluating

    (tf->hob_lbal & 0xff) << 24

    the expression is promoted to signed int (since int can hold all values
    of u8). However, if hob_lbal is 128 or more, then it is treated as a
    negative signed value and sign-extended when promoted to u64 to | into
    sectors, which leads to the MSB 32 bits of section getting set
    incorrectly.

    For example, Phillip O'Donnell reported
    that a 1.5GB drive caused:

    ata3.00: HPA detected: current 2930277168, native 18446744072344861488

    where 2930277168 == 0xAEA87B30 and 18446744072344861488 == 0xffffffffaea87b30
    which shows the problem when hob_lbal is 0xae.

    Fix this by adding a cast to u64, just as is used by for hob_lbah and
    hob_lbam in the function.

    Reported-by: Phillip O'Donnell
    Signed-off-by: Roland Dreier
    Signed-off-by: Jeff Garzik

    Roland Dreier
     
  • Remove excess kernel-doc function parameter notation from drivers/ata/:

    Warning(drivers/ata/libata-core.c:1622): Excess function parameter or struct member 'fn' description in 'ata_pio_queue_task'
    Warning(drivers/ata/libata-core.c:4655): Excess function parameter or struct member 'err_mask' description in 'ata_qc_complete'
    Warning(drivers/ata/ata_piix.c:751): Excess function parameter or struct member 'udma' description in 'do_pata_set_dmamode'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Jeff Garzik

    Randy Dunlap
     

29 Oct, 2008

1 commit

  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: ahci enclosure management bit mask
    libata: ahci enclosure management led sync
    pata_ninja32: suspend/resume support
    libata: Fix LBA48 on pata_it821x RAID volumes.
    libata: clear saved xfer_mode and ncq_enabled on device detach
    sata_sil24: configure max read request size to 4k
    libata: add missing kernel-doc
    libata: fix device iteration bugs
    ahci: Add support for Promise PDC42819
    ata: Switch all my stuff to a common address

    Linus Torvalds