03 Sep, 2013

1 commit


25 Aug, 2013

2 commits


24 Aug, 2013

1 commit

  • Binding ACPI handle to SCSI device has several drawbacks, namely:
    1 During ATA device initialization time, ACPI handle will be needed
    while SCSI devices are not created yet. So each time ACPI handle is
    needed, instead of retrieving the handle by ACPI_HANDLE macro,
    a namespace scan is performed to find the handle for the corresponding
    ATA device. This is inefficient, and also expose a restriction on
    calling path not holding any lock.
    2 The binding to SCSI device tree makes code complex, while at the same
    time doesn't bring us any benefit. All ACPI handlings are still done
    in ATA module, not in SCSI.

    Rework the ATA ACPI binding code to bind ACPI handle to ATA transport
    devices(ATA port and ATA device). The binding needs to be done only once,
    since the ATA transport devices do not go away with hotplug. And due to
    this, the flush_work call in hotplug handler for ATA bay is no longer
    needed.

    Tested on an Intel test platform for binding and runtime power off for
    ODD(ZPODD) and hard disk; on an ASUS S400C for binding and normal boot
    and S3, where its SATA port node has _SDD and _GTF control methods when
    configured as an AHCI controller and its PATA device node has _GTF
    control method when configured as an IDE controller. SATA PMP binding
    and ATA hotplug is not tested.

    Signed-off-by: Aaron Lu
    Tested-by: Dirk Griesbach
    Signed-off-by: Tejun Heo

    Aaron Lu
     

04 Jul, 2013

1 commit

  • Pull libata updates from Tejun Heo:
    "Overview of changes:

    - The rest of maintainer email address updates.

    - Some core updates - more robust default behavior for port
    multipliers, better error reporting for SG_IO commands, and a way
    to better work around now ancient and probably pretty rare PATA ->
    SATA bridges with ATAPI devices.

    - sata_rcar stabilization.

    - Some hardware PCI ID additions and one-off low level driver
    updates."

    * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits)
    AHCI: use ATA_BUSY
    libata-zpodd: must use ata_tf_init()
    ahci: AHCI-mode SATA patch for Intel Coleto Creek DeviceIDs
    ata_piix: IDE-mode SATA patch for Intel Coleto Creek DeviceIDs
    libata: cleanup SAT error translation
    ahci: sata: add support for exynos5440 sata
    libata: skip SRST for all SIMG [34]7x port-multipliers
    ahci: remove pmp link online check in FBS EH
    sata highbank: add bit-banged SGPIO driver support
    ahci: make ahci_transmit_led_message into a function pointer
    sata_rcar: fix compilation warning in sata_rcar_thaw()
    sata_highbank: increase retry count but shorten duration for Calxeda controller
    ata: use pci_get_drvdata()
    ipr: qc_fill_rtf() method should not store alternate status register
    sata_rcar: add 'base' local variable to some functions
    sata_rcar: correct 'sata_rcar_sht'
    sata_rcar: kill superfluous code in sata_rcar_bmdma_fill_sg()
    libata: do not limit R-Car SATA driver to shmobile
    ata: use platform_{get,set}_drvdata()
    AHCI: Make distinct names for ports in /proc/interrupts
    ...

    Linus Torvalds
     

03 Jul, 2013

1 commit

  • libata/for-3.10-fixes never got submitted during v3.10 cycle. Merge
    it into for-3.11 so that it can be routed together with other changes
    scheduled for v3.11.

    Three trivial conflicts in drivers/ata/sata_rcar.c. All are caused by
    1b20f6a9ad ("sata_rcar: add 'base' local variable to some functions")
    conflicting with logic updates in for-3.10-fixes. The offending
    commit simply adds local variable @base on functions which
    dereferences sata_rcar_priv->base multiple times. The resolutions are
    trivial - applying s/priv->base/base/ in the conflicting logic
    updates.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

28 Jun, 2013

1 commit

  • * pm-assorted:
    PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt
    PM / QoS: Add dev_pm_qos_request tracepoints
    PM / QoS: Add pm_qos_request tracepoints
    PM / QoS: Add pm_qos_update_target/flags tracepoints
    PM / QoS: Update Documentation/power/pm_qos_interface.txt
    PM / Sleep: Print last wakeup source on failed wakeup_count write
    PM / QoS: correct the valid range of pm_qos_class
    PM / wakeup: Adjust messaging for wake events during suspend
    PM / Runtime: Update .runtime_idle() callback documentation
    PM / Runtime: Rework the "runtime idle" helper routine
    PM / Hibernate: print physical addresses consistently with other parts of kernel

    Rafael J. Wysocki
     

25 Jun, 2013

1 commit

  • Commit 30dcf76acc69 "libata: migrate ACPI code over to new bindings"
    mistakenly dropped the code to register hotplug notificaion handler
    for ATA port/devices, causing regression for people using ATA bay,
    as kernel bug #59871 shows.

    Fix this by adding back the hotplug notification handler registration
    code. Since this code has to be run once and notification needs to
    be installed on every ATA port/devices handle no matter if there is
    actual device attached, we can't do this in binding time for ATA
    device ACPI handle, as the binding only occurs when a SCSI device is
    created, i.e. there is device attached. So introduce the
    ata_acpi_hotplug_init() function to loop scan all ATA ACPI handles
    and if it is available, install the notificaion handler for it during
    ATA init time.

    With the ATA ACPI handle binding to SCSI device tree, it is possible
    now that when the SCSI hotplug work removes the SCSI device, the ACPI
    unbind function will find that the corresponding ACPI device has
    already been deleted by dock driver, causing a scaring message like:
    [ 128.263966] scsi 4:0:0:0: Oops, 'acpi_handle' corrupt
    Fix this by waiting for SCSI hotplug task finish in our notificaion
    handler, so that the removal of ACPI device done in ACPI unbind
    function triggered by the removal of SCSI device is run earlier when
    ACPI device is still available.

    [rjw: Rebased]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=59871
    Reported-bisected-and-tested-by: Dirk Griesbach
    Signed-off-by: Aaron Lu
    Acked-by: Tejun Heo
    Cc: 3.6+
    Signed-off-by: Rafael J. Wysocki

    Aaron Lu
     

04 Jun, 2013

1 commit

  • The "runtime idle" helper routine, rpm_idle(), currently ignores
    return values from .runtime_idle() callbacks executed by it.
    However, it turns out that many subsystems use
    pm_generic_runtime_idle() which checks the return value of the
    driver's callback and executes pm_runtime_suspend() for the device
    unless that value is not 0. If that logic is moved to rpm_idle()
    instead, pm_generic_runtime_idle() can be dropped and its users
    will not need any .runtime_idle() callbacks any more.

    Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
    routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
    ata_port_runtime_idle(), respectively, as well as a few drivers'
    ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
    been returned by the .runtime_idle() callback executed by it.

    To reduce overall code bloat, make the changes described above.

    Tested-by: Mika Westerberg
    Tested-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Kevin Hilman
    Reviewed-by: Ulf Hansson
    Acked-by: Alan Stern

    Rafael J. Wysocki
     

22 May, 2013

2 commits

  • Some device require DMADIR to be enabled, but are not detected as such
    by atapi_id_dmadir. One such example is "Asus Serillel 2"
    SATA-host-to-PATA-device bridge: the bridge itself requires DMADIR,
    even if the bridged device does not.

    As atapi_dmadir module parameter can cause problems with some devices
    (as per Tejun Heo's memory), enabling it globally may not be possible
    depending on the hardware.

    This patch adds atapi_dmadir in the form of a "force" horkage value,
    allowing global, per-bus and per-device control.

    Signed-off-by: Vincent Pelletier
    Signed-off-by: Tejun Heo

    Vincent Pelletier
     
  • libata honors DMADIR for regular commands, but not for internal commands
    used (among other) during device initialisation.

    This makes SATA-host-to-PATA-device bridges based on Silicon Image SiL3611
    (such as "Abit Serillel 2") end up disabled when used with an ATAPI device
    after a few tries.

    Log output of the bridge being hot-plugged with an ATAPI drive:

    [ 9631.212901] ata1: exception Emask 0x10 SAct 0x0 SErr 0x40c0000 action 0xe frozen
    [ 9631.212913] ata1: irq_stat 0x00000040, connection status changed
    [ 9631.212923] ata1: SError: { CommWake 10B8B DevExch }
    [ 9631.212939] ata1: hard resetting link
    [ 9632.104962] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    [ 9632.106393] ata1.00: ATAPI: PIONEER DVD-RW DVR-115, 1.06, max UDMA/33
    [ 9632.106407] ata1.00: applying bridge limits
    [ 9632.108151] ata1.00: configured for UDMA/33
    [ 9637.105303] ata1.00: qc timeout (cmd 0xa0)
    [ 9637.105324] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
    [ 9637.105335] ata1: hard resetting link
    [ 9638.044599] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    [ 9638.047878] ata1.00: configured for UDMA/33
    [ 9643.044933] ata1.00: qc timeout (cmd 0xa0)
    [ 9643.044953] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
    [ 9643.044963] ata1: limiting SATA link speed to 1.5 Gbps
    [ 9643.044971] ata1.00: limiting speed to UDMA/33:PIO3
    [ 9643.044979] ata1: hard resetting link
    [ 9643.984225] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    [ 9643.987471] ata1.00: configured for UDMA/33
    [ 9648.984591] ata1.00: qc timeout (cmd 0xa0)
    [ 9648.984612] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
    [ 9648.984619] ata1.00: disabled
    [ 9649.000593] ata1: hard resetting link
    [ 9649.939902] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    [ 9649.955864] ata1: EH complete

    With this patch, the drive enumerates correctly when libata is loaded with
    atapi_dmadir=1:

    [ 9891.810863] ata1: exception Emask 0x10 SAct 0x0 SErr 0x40c0000 action 0xe frozen
    [ 9891.810874] ata1: irq_stat 0x00000040, connection status changed
    [ 9891.810884] ata1: SError: { CommWake 10B8B DevExch }
    [ 9891.810900] ata1: hard resetting link
    [ 9892.762105] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    [ 9892.763544] ata1.00: ATAPI: PIONEER DVD-RW DVR-115, 1.06, max UDMA/33, DMADIR
    [ 9892.763558] ata1.00: applying bridge limits
    [ 9892.765393] ata1.00: configured for UDMA/33
    [ 9892.786063] ata1: EH complete
    [ 9892.792062] scsi 0:0:0:0: CD-ROM PIONEER DVD-RW DVR-115 1.06 PQ: 0 ANSI: 5
    [ 9892.798455] sr2: scsi3-mmc drive: 12x/12x writer dvd-ram cd/rw xa/form2 cdda tray
    [ 9892.798837] sr 0:0:0:0: Attached scsi CD-ROM sr2
    [ 9892.799109] sr 0:0:0:0: Attached scsi generic sg6 type 5

    Based on a patch by Csaba Halász on linux-ide:
    http://marc.info/?l=linux-ide&m=136121147832295&w=2

    tj: minor formatting changes.

    Signed-off-by: Vincent Pelletier
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Vincent Pelletier
     

15 May, 2013

2 commits

  • While registering host controller track port number based upon number
    of ports available on the controller, export port_no attribute through
    /sys. This patch is needed by udev for composing persistent links in
    /dev/disk/by-path.

    /sys/devices/pci0000:00/0000:00:1f.2/ata8/ata_port/ata8
    total 0
    lrwxrwxrwx. 1 root root 0 Mar 6 12:43 device -> ../../../ata8
    -r--r--r--. 1 root root 4096 Mar 6 12:43 idle_irq
    -r--r--r--. 1 root root 4096 Mar 6 12:43 nr_pmp_links
    -r--r--r--. 1 root root 4096 Mar 6 12:43 port_no
    drwxr-xr-x. 2 root root 0 Mar 6 12:42 power
    lrwxrwxrwx. 1 root root 0 Mar 6 12:41 subsystem -> ../../../../../../class/ata_port
    -rw-r--r--. 1 root root 4096 Mar 6 12:40 uevent
    1

    Signed-off-by: David Milburn
    Signed-off-by: Tejun Heo

    David Milburn
     
  • Jeff moved on to a greener pasture.

    s/Maintained by: Jeff Garzik/Maintained by: Tejun Heo/g

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

    Tejun Heo
     

04 Apr, 2013

2 commits

  • Commit 803739d25c2343da6d2f95eebdcbc08bf67097d4 ("[libata] replace
    sata_settings with devslp_timing"), which was also Cc: stable, used a
    stack buffer to receive data from ata_read_log_page(), which triggers
    the following warning:
    ahci 0000:00:1f.2: DMA-API: device driver maps memory fromstack [addr=ffff880140469948]

    Fix this by using ap->sector_buf instead of a stack buffer.

    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    David Woodhouse
     
  • The Slimtype DVD A DS8A8SH drive locks up when max sector is smaller than
    65535, and the blow backtrace is observed on locking up:

    INFO: task flush-8:32:1130 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    flush-8:32 D ffffffff8180cf60 0 1130 2 0x00000000
    ffff880273aef618 0000000000000046 0000000000000005 ffff880273aee000
    ffff880273aee000 ffff880273aeffd8 ffff880273aee010 ffff880273aee000
    ffff880273aeffd8 ffff880273aee000 ffff88026e842ea0 ffff880274a10000
    Call Trace:
    [] schedule+0x5d/0x70
    [] io_schedule+0x8c/0xd0
    [] get_request+0x731/0x7d0
    [] ? cfq_allow_merge+0x50/0x90
    [] ? wake_up_bit+0x40/0x40
    [] ? bio_attempt_back_merge+0x33/0x110
    [] blk_queue_bio+0x23a/0x3f0
    [] generic_make_request+0xc6/0x120
    [] submit_bio+0x138/0x160
    [] ? bio_alloc_bioset+0x96/0x120
    [] submit_bh+0x1f1/0x220
    [] __block_write_full_page+0x228/0x340
    [] ? attach_nobh_buffers+0xc0/0xc0
    [] ? I_BDEV+0x10/0x10
    [] ? I_BDEV+0x10/0x10
    [] block_write_full_page_endio+0xe6/0x100
    [] block_write_full_page+0x15/0x20
    [] blkdev_writepage+0x18/0x20
    [] __writepage+0x17/0x40
    [] write_cache_pages+0x34a/0x4a0
    [] ? set_page_dirty+0x70/0x70
    [] generic_writepages+0x51/0x80
    [] do_writepages+0x20/0x50
    [] __writeback_single_inode+0xa6/0x2b0
    [] writeback_sb_inodes+0x311/0x4d0
    [] __writeback_inodes_wb+0x86/0xd0
    [] wb_writeback+0x1a3/0x330
    [] ? _raw_spin_lock_irqsave+0x3f/0x50
    [] ? get_nr_inodes+0x52/0x70
    [] wb_do_writeback+0x1dc/0x260
    [] ? schedule_timeout+0x204/0x240
    [] bdi_writeback_thread+0x102/0x2b0
    [] ? wb_do_writeback+0x260/0x260
    [] kthread+0xc0/0xd0
    [] ? kthread_worker_fn+0x1b0/0x1b0
    [] ret_from_fork+0x7c/0xb0
    [] ? kthread_worker_fn+0x1b0/0x1b0

    The above trace was triggered by
    "dd if=/dev/zero of=/dev/sr0 bs=2048 count=32768"

    It was previously working by accident, since another bug introduced
    by 4dce8ba94c7 (libata: Use 'bool' return value for ata_id_XXX) caused
    all drives to use maxsect=65535.

    Cc: stable@vger.kernel.org
    Signed-off-by: Shan Hai
    Signed-off-by: Jeff Garzik

    Shan Hai
     

26 Jan, 2013

3 commits

  • For system freeze, if the port is already runtime suspended, leave it
    alone and just return. The port will be resumed on thaw before it will
    be used.

    And since we will call get_noresume for every device during prepare
    phase, and the port is resumed during thaw phase, it can't be in runtime
    suspended state during the poweroff phase. So remove the
    runtime_suspended check in poweroff callback.

    And for all suspend(freeze/suspend/poweroff/etc.), there is no need to
    touch the device, so set no_autopsy and no_recovery for them all.

    Signed-off-by: Aaron Lu
    Signed-off-by: Jeff Garzik

    Aaron Lu
     
  • We need to do different things for system PM and runtime PM, e.g. we do
    not need to enable runtime wake for ZPODD when we are doing system
    suspend, etc.

    Currently, we use PMSG_SUSPEND for both system suspend and runtime
    suspend and PMSG_ON for both system resume and runtime resume. Change
    this by using PMSG_AUTO_SUSPEND for runtime suspend and PMSG_AUTO_RESUME
    for runtime resume. And since PMSG_ON means no transition, it is changed
    to PMSG_RESUME for ata port's system resume.

    The ata_acpi_set_state is modified accordingly, and the sata case and
    pata case is seperated for easy reading.

    Signed-off-by: Aaron Lu
    Signed-off-by: Jeff Garzik

    Aaron Lu
     
  • This reverts commit 1757d902b029a29dfcef63609964385cf8865b5a.

    Discussion continues upstream.

    Jeff Garzik
     

22 Jan, 2013

2 commits

  • For ODDs, the upper layer will poll for media change every few
    seconds, which will make it enter and leave suspend state very
    often. And as each suspend will also cause a hard/soft reset,
    the gain of runtime suspend is very little while the ODD may
    malfunction after constantly being reset. So the idle callback
    here will not proceed to suspend if a non-ZPODD capable ODD is
    attached to the port.

    Signed-off-by: Aaron Lu
    Acked-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Aaron Lu
     
  • The ODD can be enabled for ZPODD if the following three conditions are
    satisfied:
    1 The ODD supports device attention;
    2 The platform can runtime power off the ODD through ACPI;
    3 The ODD is either slot type or drawer type.
    For such ODDs, zpodd_init is called and a new structure is allocated for
    it to store ZPODD related stuffs.

    And the zpodd_dev_enabled function is used to test if ZPODD is currently
    enabled for this ODD.

    A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code.

    Signed-off-by: Aaron Lu
    Acked-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Aaron Lu
     

15 Jan, 2013

2 commits

  • As low-level drivers register their host controller(s), keep track
    of the number of controllers and export thru /sys in a
    format so that udev can better match up port numbers with a
    specific controller.

    # pwd
    /sys/devices/pci0000:00
    # find . -name 'ata*' -print

    (2nd controller with port multiplier attached)

    ./0000:00:1e.0/0000:05:01.0/ata2.7
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7/dev7.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.0/dev7.0.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.0/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.1/dev7.1.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.1/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.2/dev7.2.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.2/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.3/dev7.3.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.3/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.4/dev7.4.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.4/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.5/dev7.5.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.5/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.6/dev7.6.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.6/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.7/dev7.7.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.7/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.8/dev7.8.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.8/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.9/dev7.9.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.9/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/ata_port
    ./0000:00:1e.0/0000:05:01.0/ata2.7/ata_port/ata2.7
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.10/dev7.10.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.10/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.11/dev7.11.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.11/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.12/dev7.12.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.12/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.13/dev7.13.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.13/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.14/dev7.14.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.14/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.8
    ./0000:00:1e.0/0000:05:01.0/ata2.8/link8/dev8.0/ata_device
    ./0000:00:1e.0/0000:05:01.0/ata2.8/link8/ata_link
    ./0000:00:1e.0/0000:05:01.0/ata2.8/ata_port
    ./0000:00:1e.0/0000:05:01.0/ata2.8/ata_port/ata2.8

    (1st controller)

    ./0000:00:1f.2/ata1.1
    ./0000:00:1f.2/ata1.1/link1/dev1.0/ata_device
    ./0000:00:1f.2/ata1.1/link1/ata_link
    ./0000:00:1f.2/ata1.1/ata_port
    ./0000:00:1f.2/ata1.1/ata_port/ata1.1
    ./0000:00:1f.2/ata1.2
    ./0000:00:1f.2/ata1.2/link2/dev2.0/ata_device
    ./0000:00:1f.2/ata1.2/link2/ata_link
    ./0000:00:1f.2/ata1.2/ata_port
    ./0000:00:1f.2/ata1.2/ata_port/ata1.2
    ./0000:00:1f.2/ata1.3
    ./0000:00:1f.2/ata1.3/link3/dev3.0/ata_device
    ./0000:00:1f.2/ata1.3/link3/ata_link
    ./0000:00:1f.2/ata1.3/ata_port
    ./0000:00:1f.2/ata1.3/ata_port/ata1.3
    ./0000:00:1f.2/ata1.4
    ./0000:00:1f.2/ata1.4/link4/dev4.0/ata_device
    ./0000:00:1f.2/ata1.4/link4/ata_link
    ./0000:00:1f.2/ata1.4/ata_port
    ./0000:00:1f.2/ata1.4/ata_port/ata1.4
    ./0000:00:1f.2/ata1.5
    ./0000:00:1f.2/ata1.5/link5/dev5.0/ata_device
    ./0000:00:1f.2/ata1.5/link5/ata_link
    ./0000:00:1f.2/ata1.5/ata_port
    ./0000:00:1f.2/ata1.5/ata_port/ata1.5
    ./0000:00:1f.2/ata1.6
    ./0000:00:1f.2/ata1.6/link6/dev6.0/ata_device
    ./0000:00:1f.2/ata1.6/link6/ata_link
    ./0000:00:1f.2/ata1.6/ata_port
    ./0000:00:1f.2/ata1.6/ata_port/ata1.6

    Signed-off-by: David Milburn
    Signed-off-by: Jeff Garzik

    David Milburn
     
  • NCQ capability was used to check availability of SATA Settings page
    from Identify Device Data Log, which contains DevSlp timing variables.
    It does not work on some HDDs and leads to error messages.

    IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
    because it is only the sufficient condition of Identify Device data
    log, not the necessary condition.

    This patch replaced ata_device->sata_settings with ->devslp_timing
    to only save DevSlp timing variables(8 bytes), instead of the whole
    SATA Settings page(512 bytes).

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881

    Reported-by: Borislav Petkov
    Signed-off-by: Shane Huang
    Cc: stable@vger.kernel.org
    Signed-off-by: Jeff Garzik

    Shane Huang
     

14 Dec, 2012

1 commit

  • This reverts commit de90cd71f68e947d3bd6c3f2ef5731ead010a768.

    Shane Huang writes:

    Please suspend this patch because I just received two new
    DevSlp drives but found word 78 bit 5 is _not_ set.

    I'm checking with the drive vendor whether he gave me
    the wrong information. If bit 5 is not the necessary and
    sufficient condition, I will implement another patch to
    replace ata_device->sata_settings into ->devslp_timing.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

04 Dec, 2012

1 commit


03 Dec, 2012

3 commits

  • This relatively simple boiler-plate code is repeated in several platform
    drivers. We should implement a common version in libata.

    Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     
  • ata_device->dma_mode's initial value is zero, which is not a valid dma
    mode, but ata_dma_enabled will return true for this value. This patch
    sets dma_mode to 0xff in reset function, so that ata_dma_enabled will
    not return true for this case, or it will cause problem for pata_acpi.

    The corrsponding bugzilla page is at:
    https://bugzilla.kernel.org/show_bug.cgi?id=49151

    Reported-by: Phillip Wood
    Signed-off-by: Aaron Lu
    Tested-by: Szymon Janc
    Tested-by: Dutra Julio
    Acked-by: Alan Cox
    Cc:
    Signed-off-by: Jeff Garzik

    Aaron Lu
     
  • NCQ capability was used to check availability of SATA Settings page
    from Identify Device Data Log, which contains DevSlp timing variables.
    It does not work on some HDDs and leads to error messages.
    IDENTIFY word 78 bit 5(Hardware Feature Control) should be used.

    Quoting SATA spec 3.1:
    If Hardware Feature Control is supported, then:
    a) IDENTIFY DEVICE data word 78 bit 5 (see 13.2.1.18) shall be
    set to one;
    b) the SET FEATURES Select Hardware Feature Control subcommand
    shall be supported (see 13.3.8);
    c) page 08h of the Identify Device Data log (see 13.7.7) shall
    be supported;

    This patch is not tested on SATA HDD with DevSlp supported.

    Reported-by: Borislav Petkov
    Signed-off-by: Shane Huang
    Signed-off-by: Jeff Garzik

    Shane Huang
     

16 Nov, 2012

1 commit


03 Oct, 2012

2 commits

  • Pull first round of SCSI updates from James Bottomley:
    "This is a large set of updates, mostly for drivers (qla2xxx [including
    support for new 83xx based card], qla4xxx, mpt2sas, bfa, zfcp, hpsa,
    be2iscsi, isci, lpfc, ipr, ibmvfc, ibmvscsi, megaraid_sas).

    There's also a rework for tape adding virtually unlimited numbers of
    tape drives plus a set of dif fixes for sd and a fix for a live lock
    on hot remove of SCSI devices.

    This round includes a signed tag pull of isci-for-3.6

    Signed-off-by: James Bottomley "

    Fix up trivial conflict in drivers/scsi/qla2xxx/qla_nx.c due to new PCI
    helper function use in a function that was removed by this pull.

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (198 commits)
    [SCSI] st: remove st_mutex
    [SCSI] sd: Ensure we correctly disable devices with unknown protection type
    [SCSI] hpsa: gen8plus Smart Array IDs
    [SCSI] qla4xxx: Update driver version to 5.03.00-k1
    [SCSI] qla4xxx: Disable generating pause frames for ISP83XX
    [SCSI] qla4xxx: Fix double clearing of risc_intr for ISP83XX
    [SCSI] qla4xxx: IDC implementation for Loopback
    [SCSI] qla4xxx: update copyrights in LICENSE.qla4xxx
    [SCSI] qla4xxx: Fix panic while rmmod
    [SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
    [SCSI] qla4xxx: Prevent MSI/MSI-X falling back to INTx for ISP82XX
    [SCSI] qla4xxx: Update idc reg in case of PCI AER
    [SCSI] qla4xxx: Fix double IDC locking in qla4_8xxx_error_recovery
    [SCSI] qla4xxx: Clear interrupt while unloading driver for ISP83XX
    [SCSI] qla4xxx: Print correct IDC version
    [SCSI] qla4xxx: Added new mbox cmd to pass driver version to FW
    [SCSI] scsi_dh_alua: Enable STPG for unavailable ports
    [SCSI] scsi_remove_target: fix softlockup regression on hot remove
    [SCSI] ibmvscsi: Fix host config length field overflow
    [SCSI] ibmvscsi: Remove backend abstraction
    ...

    Linus Torvalds
     
  • Pull libata changes from Jeff Garzik:
    "Minor libata updates, nothing notable.

    1) Apply -- and then revert -- the FUA feature. Caused disk
    corruption in linux-next, proving it cannot be turned on by
    default.

    Net effect to upstream tree: zero

    2) New AHCI platform driver sata_highbank

    3) Improve SCSI MODE SENSE handling; support MODE SELECT

    4) AHCI: support aggressive device sleep (power mgmt)

    5) sata_fsl: minor fix

    6) pata_arasan: clk support"

    * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    sata_mv: Fix warnings when no PCI
    [libata] Makefile: Fix build error in sata_highbank
    [libata] export ata_dev_set_feature()
    libata-core: use ATA_LBA in ata_build_rw_tf()
    ata/ahci_platform: Add clock framework support
    pata_arasan: add Device Tree probing capability
    pata_arasan: Add clk_{un}prepare() support
    ata: add platform driver for Calxeda AHCI controller
    sata_fsl: add workaround for data length mismatch on freescale V2 controller
    ahci: implement aggressive SATA device sleep support
    ata: define enum constants for IDENTIFY DEVICE
    Revert "libata: enable SATA disk fua detection on default"
    [libata] scsi: implement MODE SELECT command
    [libata] scsi: support MODE SENSE request for changeable and default parameters
    [libata] scsi: Remove unlikely() from FUA check
    libata: enable SATA disk fua detection on default

    Linus Torvalds
     

02 Oct, 2012

1 commit


13 Sep, 2012

4 commits

  • Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Since READ/WRITE FPDMA QUEUED commands are 48-bit, bit 6 of the device register
    means LBA, the same as for READ/WRITE DMA EXT commands. So use ATA_LBA instead
    of the bare number in ata_build_rw_tf()'s branch dedicated to the NCQ commands.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal.
    This feature enables an HBA and SATA storage device to enter the DevSleep
    interface state, enabling lower power SATA-based systems.

    Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as
    soon as there are no commands outstanding to the device and the port
    specific Device Sleep idle timer has expired. This enables autonomous
    entry into the DevSleep interface state without waiting for software
    in power sensitive systems.

    This patch enables Aggressive Device Sleep only if both host controller
    and device support it.

    Tested on AMD reference board together with Device Sleep supported device
    sample.

    Signed-off-by: Shane Huang
    Reviewed-by: Aaron Lu
    Signed-off-by: Jeff Garzik

    Shane Huang
     
  • It caused several reported regressions.

    This reverts commit 91895b786e631ab47b618c901231f22b5a44115b.

    Jeff Garzik
     

25 Aug, 2012

1 commit


24 Aug, 2012

3 commits

  • libsas and ipr pass flags to ata_host_init that are meant for the port.

    ata_host flags:
    ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */
    ATA_HOST_STARTED = (1 << 1), /* Host started */
    ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */
    ATA_HOST_IGNORE_ATA = (1 << 3), /* Ignore ATA devices on this host. */

    flags passed by libsas:
    ATA_FLAG_SATA = (1 << 1),
    ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
    ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */

    The only one that aliases is ATA_HOST_STARTED which is a 'don't care' in
    the libsas and ipr cases since ata_hosts from these sources are not
    registered with libata.

    Reported-by: Hannes Reinecke
    Signed-off-by: Dan Williams
    Acked-by: Brian King
    Acked-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Reuse ata_port_{suspend|resume}_common for sas. This path is chosen
    over adding coordination between ata-tranport and sas-transport because
    libsas wants to revalidate the domain at resume-time at the host level.
    It can not validate links have resumed properly until libata has had a
    chance to perform its revalidation, and any sane placing of an ata_port
    in the sas-transport model would delay it's resumption until after the
    host.

    Export the common portion of port suspend/resume (bypass pm_runtime),
    and allow sas to perform these operations asynchronously (similar to the
    libsas async-ata probe implmentation). Async operation is determined by
    having an external, rather than stack based, location for storing the
    result of the operation.

    Signed-off-by: Dan Williams
    Reviewed-by: Jacek Danecki
    Acked-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Hotplug testing with libsas currently encounters a 55 second wait for
    link recovery to give up. In the case where the user trusts the
    response time of their devices permit the recovery attempts to be
    limited to one.

    Signed-off-by: Dan Williams
    Acked-by: Jeff Garzik
    Acked-by: Tejun Heo
    Signed-off-by: James Bottomley

    Dan Williams
     

18 Aug, 2012

1 commit

  • Currently, SATA disk fua detection is disabled on default because most of
    devices don't support this feature at that time. With the development of
    technology, more and more SATA disks support this feature. So now we can enable
    this detection on default.

    Although fua detection is defined as a kernel module parameter, it is too hard
    to set its value because it must be loaded and set before system starts up.
    That needs to modify initrd file. So it is inconvenient for administrator who
    needs to manage a huge number of servers.

    Signed-off-by: Zheng Liu
    Signed-off-by: Jeff Garzik

    Zheng Liu