28 Nov, 2013

1 commit

  • After commit bcdde7e221a8 (sysfs: make __sysfs_remove_dir() recursive)
    Mika Westerberg sees traces analogous to the one below in Thunderbolt
    hot-remove testing:

    WARNING: CPU: 0 PID: 4 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
    sysfs group ffffffff81c6f1e0 not found for kobject 'host7'
    Modules linked in:
    CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 3.12.0+ #13
    Hardware name: /D33217CK, BIOS GKPPT10H.86A.0042.2013.0422.1439 04/22/2013
    Workqueue: kacpi_hotplug acpi_hotplug_work_fn
    0000000000000009 ffff8801002459b0 ffffffff817daab1 ffff8801002459f8
    ffff8801002459e8 ffffffff810436b8 0000000000000000 ffffffff81c6f1e0
    ffff88006d440358 ffff88006d440188 ffff88006e8b4c28 ffff880100245a48
    Call Trace:
    [] dump_stack+0x45/0x56
    [] warn_slowpath_common+0x78/0xa0
    [] warn_slowpath_fmt+0x47/0x50
    [] ? sysfs_get_dirent_ns+0x49/0x70
    [] sysfs_remove_group+0xc6/0xd0
    [] dpm_sysfs_remove+0x3e/0x50
    [] device_del+0x40/0x1b0
    [] device_unregister+0xd/0x20
    [] scsi_remove_host+0xba/0x110
    [] ata_host_detach+0xc6/0x100
    [] ata_pci_remove_one+0x18/0x20
    [] pci_device_remove+0x28/0x60
    [] __device_release_driver+0x64/0xd0
    [] device_release_driver+0x1e/0x30
    [] bus_remove_device+0xf7/0x140
    [] device_del+0x121/0x1b0
    [] pci_stop_bus_device+0x94/0xa0
    [] pci_stop_bus_device+0x3b/0xa0
    [] pci_stop_bus_device+0x3b/0xa0
    [] pci_stop_and_remove_bus_device+0xd/0x20
    [] trim_stale_devices+0x73/0xe0
    [] trim_stale_devices+0xbb/0xe0
    [] trim_stale_devices+0xbb/0xe0
    [] acpiphp_check_bridge+0x7e/0xd0
    [] hotplug_event+0xcd/0x160
    [] hotplug_event_work+0x25/0x60
    [] acpi_hotplug_work_fn+0x17/0x22
    [] process_one_work+0x17a/0x430
    [] worker_thread+0x119/0x390
    [] ? manage_workers.isra.25+0x2a0/0x2a0
    [] kthread+0xcd/0xf0
    [] ? kthread_create_on_node+0x180/0x180
    [] ret_from_fork+0x7c/0xb0
    [] ? kthread_create_on_node+0x180/0x180

    The source of this problem is that SCSI hosts are removed from
    ATA ports after calling ata_tport_delete() which removes the
    port's sysfs directory, among other things. Now, after commit
    bcdde7e221a8, the sysfs directory is removed along with all of
    its subdirectories that include the SCSI host's sysfs directory
    and its subdirectories at this point. Consequently, when
    device_del() is finally called for any child device of the SCSI
    host and tries to remove its "power" group (which is already
    gone then), it triggers the above warning.

    To make the warnings go away, change the removal ordering in
    ata_port_detach() so that the SCSI host is removed from the
    port before ata_tport_delete() is called.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=65281
    Reported-and-tested-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki
    Tested-by: Jingoo Han
    Signed-off-by: Tejun Heo

    Rafael J. Wysocki
     

23 Nov, 2013

4 commits


21 Nov, 2013

2 commits

  • Pull more ACPI and power management updates from Rafael Wysocki:

    - ACPI-based device hotplug fixes for issues introduced recently and a
    fix for an older error code path bug in the ACPI PCI host bridge
    driver

    - Fix for recently broken OMAP cpufreq build from Viresh Kumar

    - Fix for a recent hibernation regression related to s2disk

    - Fix for a locking-related regression in the ACPI EC driver from
    Puneet Kumar

    - System suspend error code path fix related to runtime PM and runtime
    PM documentation update from Ulf Hansson

    - cpufreq's conservative governor fix from Xiaoguang Chen

    - New processor IDs for intel_idle and turbostat and removal of an
    obsolete Kconfig option from Len Brown

    - New device IDs for the ACPI LPSS (Low-Power Subsystem) driver and
    ACPI-based PCI hotplug (ACPIPHP) cleanup from Mika Westerberg

    - Removal of several ACPI video DMI blacklist entries that are not
    necessary any more from Aaron Lu

    - Rework of the ACPI companion representation in struct device and code
    cleanup related to that change from Rafael J Wysocki, Lan Tianyu and
    Jarkko Nikula

    - Fixes for assigning names to ACPI-enumerated I2C and SPI devices from
    Jarkko Nikula

    * tag 'pm+acpi-2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
    PCI / hotplug / ACPI: Drop unused acpiphp_debug declaration
    ACPI / scan: Set flags.match_driver in acpi_bus_scan_fixed()
    ACPI / PCI root: Clear driver_data before failing enumeration
    ACPI / hotplug: Fix PCI host bridge hot removal
    ACPI / hotplug: Fix acpi_bus_get_device() return value check
    cpufreq: governor: Remove fossil comment in the cpufreq_governor_dbs()
    ACPI / video: clean up DMI table for initial black screen problem
    ACPI / EC: Ensure lock is acquired before accessing ec struct members
    PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
    ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac
    spi: Use stable dev_name for ACPI enumerated SPI slaves
    i2c: Use stable dev_name for ACPI enumerated I2C slaves
    ACPI: Provide acpi_dev_name accessor for struct acpi_device device name
    ACPI / bind: Use (put|get)_device() on ACPI device objects too
    ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro
    ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node
    cpufreq: OMAP: Fix compilation error 'r & ret undeclared'
    PM / Runtime: Fix error path for prepare
    PM / Runtime: Update documentation around probe|remove|suspend
    cpufreq: conservative: set requested_freq to policy max when it is over policy max
    ...

    Linus Torvalds
     
  • Pull slave-dmaengine changes from Vinod Koul:
    "This brings for slave dmaengine:

    - Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
    dmaengine can only transfer and not verify validaty of dma
    transfers

    - Bunch of fixes across drivers:

    - cppi41 driver fixes from Daniel

    - 8 channel freescale dma engine support and updated bindings from
    Hongbo

    - msx-dma fixes and cleanup by Markus

    - DMAengine updates from Dan:

    - Bartlomiej and Dan finalized a rework of the dma address unmap
    implementation.

    - In the course of testing 1/ a collection of enhancements to
    dmatest fell out. Notably basic performance statistics, and
    fixed / enhanced test control through new module parameters
    'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
    Linus [Walleij] for their review.

    - Testing the raid related corner cases of 1/ triggered bugs in
    the recently added 16-source operation support in the ioatdma
    driver.

    - Some minor fixes / cleanups to mv_xor and ioatdma"

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
    dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
    dma: mv_xor: Remove unneeded NULL address check
    ioat: fix ioat3_irq_reinit
    ioat: kill msix_single_vector support
    raid6test: add new corner case for ioatdma driver
    ioatdma: clean up sed pool kmem_cache
    ioatdma: fix selection of 16 vs 8 source path
    ioatdma: fix sed pool selection
    ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
    dmatest: verbose mode
    dmatest: convert to dmaengine_unmap_data
    dmatest: add a 'wait' parameter
    dmatest: add basic performance metrics
    dmatest: add support for skipping verification and random data setup
    dmatest: use pseudo random numbers
    dmatest: support xor-only, or pq-only channels in tests
    dmatest: restore ability to start test at module load and init
    dmatest: cleanup redundant "dmatest: " prefixes
    dmatest: replace stored results mechanism, with uniform messages
    Revert "dmatest: append verify result to results"
    ...

    Linus Torvalds
     

16 Nov, 2013

1 commit

  • Pull dmaengine changes from Dan

    1/ Bartlomiej and Dan finalized a rework of the dma address unmap
    implementation.

    2/ In the course of testing 1/ a collection of enhancements to dmatest
    fell out. Notably basic performance statistics, and fixed / enhanced
    test control through new module parameters 'run', 'wait', 'noverify',
    and 'verbose'. Thanks to Andriy and Linus for their review.

    3/ Testing the raid related corner cases of 1/ triggered bugs in the
    recently added 16-source operation support in the ioatdma driver.

    4/ Some minor fixes / cleanups to mv_xor and ioatdma.

    Conflicts:
    drivers/dma/dmatest.c

    Signed-off-by: Vinod Koul

    Vinod Koul
     

15 Nov, 2013

3 commits

  • Use this new function to make code more comprehensible, since we are
    reinitialzing the completion, not initializing.

    [akpm@linux-foundation.org: linux-next resyncs]
    Signed-off-by: Wolfram Sang
    Acked-by: Linus Walleij (personally at LCE13)
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • Modify struct acpi_dev_node to contain a pointer to struct acpi_device
    associated with the given device object (that is, its ACPI companion
    device) instead of an ACPI handle corresponding to it. Introduce two
    new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
    ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
    ACPI_HANDLE() macro to take the above changes into account.
    Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
    use ACPI_COMPANION_SET() instead. For some of them who used to
    pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
    introduce a helper routine acpi_preset_companion() doing an
    equivalent thing.

    The main motivation for doing this is that there are things
    represented by struct acpi_device objects that don't have valid
    ACPI handles (so called fixed ACPI hardware features, such as
    power and sleep buttons) and we would like to create platform
    device objects for them and "glue" them to their ACPI companions
    in the usual way (which currently is impossible due to the
    lack of valid ACPI handles). However, there are more reasons
    why it may be useful.

    First, struct acpi_device pointers allow of much better type checking
    than void pointers which are ACPI handles, so it should be more
    difficult to write buggy code using modified struct acpi_dev_node
    and the new macros. Second, the change should help to reduce (over
    time) the number of places in which the result of ACPI_HANDLE() is
    passed to acpi_bus_get_device() in order to obtain a pointer to the
    struct acpi_device associated with the given "physical" device,
    because now that pointer is returned by ACPI_COMPANION() directly.
    Finally, the change should make it easier to write generic code that
    will build both for CONFIG_ACPI set and unset without adding explicit
    compiler directives to it.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Tested-by: Mika Westerberg # on Haswell
    Reviewed-by: Mika Westerberg
    Reviewed-by: Aaron Lu # for ATA and SDIO part

    Rafael J. Wysocki
     
  • Remove no longer needed DMA unmap flags:
    - DMA_COMPL_SKIP_SRC_UNMAP
    - DMA_COMPL_SKIP_DEST_UNMAP
    - DMA_COMPL_SRC_UNMAP_SINGLE
    - DMA_COMPL_DEST_UNMAP_SINGLE

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Acked-by: Jon Mason
    Acked-by: Mark Brown
    [djbw: clean up straggling skip unmap flags in ntb]
    Signed-off-by: Dan Williams

    Bartlomiej Zolnierkiewicz
     

14 Nov, 2013

1 commit

  • Pull DMA mask updates from Russell King:
    "This series cleans up the handling of DMA masks in a lot of drivers,
    fixing some bugs as we go.

    Some of the more serious errors include:
    - drivers which only set their coherent DMA mask if the attempt to
    set the streaming mask fails.
    - drivers which test for a NULL dma mask pointer, and then set the
    dma mask pointer to a location in their module .data section -
    which will cause problems if the module is reloaded.

    To counter these, I have introduced two helper functions:
    - dma_set_mask_and_coherent() takes care of setting both the
    streaming and coherent masks at the same time, with the correct
    error handling as specified by the API.
    - dma_coerce_mask_and_coherent() which resolves the problem of
    drivers forcefully setting DMA masks. This is more a marker for
    future work to further clean these locations up - the code which
    creates the devices really should be initialising these, but to fix
    that in one go along with this change could potentially be very
    disruptive.

    The last thing this series does is prise away some of Linux's addition
    to "DMA addresses are physical addresses and RAM always starts at
    zero". We have ARM LPAE systems where all system memory is above 4GB
    physical, hence having DMA masks interpreted by (eg) the block layers
    as describing physical addresses in the range 0..DMAMASK fails on
    these platforms. Santosh Shilimkar addresses this in this series; the
    patches were copied to the appropriate people multiple times but were
    ignored.

    Fixing this also gets rid of some ARM weirdness in the setup of the
    max*pfn variables, and brings ARM into line with every other Linux
    architecture as far as those go"

    * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
    ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
    ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
    ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
    ARM: DMA-API: better handing of DMA masks for coherent allocations
    ARM: 7857/1: dma: imx-sdma: setup dma mask
    DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
    DMA-API: dcdbas: update DMA mask handing
    DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
    DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
    DMA-API: crypto: remove last references to 'static struct device *dev'
    DMA-API: crypto: fix ixp4xx crypto platform device support
    DMA-API: others: use dma_set_coherent_mask()
    DMA-API: staging: use dma_set_coherent_mask()
    DMA-API: usb: use new dma_coerce_mask_and_coherent()
    DMA-API: usb: use dma_set_coherent_mask()
    DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
    DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
    DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
    ...

    Linus Torvalds
     

13 Nov, 2013

1 commit

  • Pull libata changes from Tejun Heo:
    "Nothing too interesting. Only two minor fixes in libata core. Most
    changes are specific to hardware which isn't too common"

    * 'for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    ahci: Add Device IDs for Intel Wildcat Point-LP
    sata_rcar: Convert to clk_prepare/unprepare
    drivers/libata: Set max sector to 65535 for Slimtype DVD A DS8A9SH drive
    libata: Add some missing command descriptions
    sata_highbank: clear whole array in highbank_initialize_phys()
    ahci: disabled FBS prior to issuing software reset
    libata: Fix display of sata speed
    ahci: imx: setup power saving methods
    ata_piix: minor typo and a printk fix
    ahci: Changing two module params with static and __read_mostly

    Linus Torvalds
     

12 Nov, 2013

1 commit

  • Pull devicetree updates from Rob Herring:
    "DeviceTree updates for 3.13. This is a bit larger pull request than
    usual for this cycle with lots of clean-up.

    - Cross arch clean-up and consolidation of early DT scanning code.
    - Clean-up and removal of arch prom.h headers. Makes arch specific
    prom.h optional on all but Sparc.
    - Addition of interrupts-extended property for devices connected to
    multiple interrupt controllers.
    - Refactoring of DT interrupt parsing code in preparation for
    deferred probe of interrupts.
    - ARM cpu and cpu topology bindings documentation.
    - Various DT vendor binding documentation updates"

    * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
    powerpc: add missing explicit OF includes for ppc
    dt/irq: add empty of_irq_count for !OF_IRQ
    dt: disable self-tests for !OF_IRQ
    of: irq: Fix interrupt-map entry matching
    MIPS: Netlogic: replace early_init_devtree() call
    of: Add Panasonic Corporation vendor prefix
    of: Add Chunghwa Picture Tubes Ltd. vendor prefix
    of: Add AU Optronics Corporation vendor prefix
    of/irq: Fix potential buffer overflow
    of/irq: Fix bug in interrupt parsing refactor.
    of: set dma_mask to point to coherent_dma_mask
    of: add vendor prefix for PHYTEC Messtechnik GmbH
    DT: sort vendor-prefixes.txt
    of: Add vendor prefix for Cadence
    of: Add empty for_each_available_child_of_node() macro definition
    arm/versatile: Fix versatile irq specifications.
    of/irq: create interrupts-extended property
    microblaze/pci: Drop PowerPC-ism from irq parsing
    of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
    of/irq: Use irq_of_parse_and_map()
    ...

    Linus Torvalds
     

11 Nov, 2013

1 commit

  • Commit b5b4bb3f6a11f9 (of: only include prom.h on sparc) removed implicit
    includes of of_*.h headers by powerpc's prom.h. Some components were
    missed in initial clean-up patch, so add the necessary includes to fix
    powerpc builds.

    Signed-off-by: Rob Herring
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Tejun Heo
    Cc: Matt Mackall
    Cc: Herbert Xu
    Cc: "David S. Miller"
    Cc: Vinod Koul
    Cc: Dan Williams
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-ide@vger.kernel.org
    Cc: linux-crypto@vger.kernel.org

    Rob Herring
     

05 Nov, 2013

1 commit


31 Oct, 2013

2 commits


30 Oct, 2013

1 commit


28 Oct, 2013

1 commit

  • The "Slimtype DVD A DS8A9SH" drive locks up with following backtrace when
    the max sector is smaller than 65535 bytes, fix it by adding a quirk to set
    the max sector to 65535 bytes.

    INFO: task flush-11:0:663 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    flush-11:0 D 00000000ffff5ceb 0 663 2 0x00000000
    ffff88026d3b1710 0000000000000046 0000000000000001 0000000000000000
    ffff88026f2530c0 ffff88026d365860 ffff88026d3b16e0 ffffffff812ffd52
    ffff88026d4fd3d0 0000000100000001 ffff88026d3b16f0 ffff88026d3b1fd8
    Call Trace:
    [] ? cfq_may_queue+0x52/0xf0
    [] schedule+0x18/0x30
    [] io_schedule+0x42/0x60
    [] get_request_wait+0xeb/0x1f0
    [] ? autoremove_wake_function+0x0/0x40
    [] ? elv_merge+0x42/0x210
    [] __make_request+0x8e/0x4e0
    [] generic_make_request+0x21e/0x5e0
    [] submit_bio+0x5d/0xd0
    [] submit_bh+0xf2/0x130
    [] __block_write_full_page+0x1dc/0x3a0
    [] ? end_buffer_async_write+0x0/0x120
    [] ? blkdev_get_block+0x0/0x70
    [] ? blkdev_get_block+0x0/0x70
    [] ? end_buffer_async_write+0x0/0x120
    [] block_write_full_page_endio+0xde/0x100
    [] block_write_full_page+0x10/0x20
    [] blkdev_writepage+0x13/0x20
    [] __writepage+0x15/0x40
    [] write_cache_pages+0x1cf/0x3e0
    [] ? __writepage+0x0/0x40
    [] generic_writepages+0x22/0x30
    [] do_writepages+0x1f/0x40
    [] writeback_single_inode+0xe7/0x3b0
    [] writeback_sb_inodes+0x184/0x280
    [] writeback_inodes_wb+0x6b/0x1a0
    [] wb_writeback+0x23b/0x2a0
    [] wb_do_writeback+0x17d/0x190
    [] bdi_writeback_task+0x4b/0xe0
    [] ? bdi_start_fn+0x0/0x100
    [] bdi_start_fn+0x81/0x100
    [] ? bdi_start_fn+0x0/0x100
    [] kthread+0x8e/0xa0
    [] ? finish_task_switch+0x54/0xc0
    [] kernel_thread_helper+0x4/0x10
    [] ? kthread+0x0/0xa0
    [] ? kernel_thread_helper+0x0/0x10

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

    Cc: stable@vger.kernel.org
    Signed-off-by: Shan Hai
    Signed-off-by: Tejun Heo

    Shan Hai
     

27 Oct, 2013

4 commits

  • Add some missing command enumerations from the ATA-8 ACS-3 spec into
    include/linux/ata.h, and add the corresponding human-readable command
    descriptions in libata-eh.c.

    Signed-off-by: Robert Hancock
    Signed-off-by: Tejun Heo

    Robert Hancock
     
  • The original code used the wrong parameter to clear tx_atten[]. It
    passed the number of elements instead of sizeof() the array to memset.

    The other potential issue was that cphy_base[] wasn't cleared. I'm not
    sure if that was a real problem or not, but I have cleared it in my
    patch.

    Instead of using memset(), this patch uses empty initializers as a
    cleanup.

    Signed-off-by: Dan Carpenter
    Acked-by: Rob Herring
    Signed-off-by: Tejun Heo

    Dan Carpenter
     
  • Tested with Marvell 88se9125, attached with one port mulitplier(5 ports)
    and one disk, we will get following boot log messages if using current
    code:

    ata8: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
    ata8.15: Port Multiplier 1.2, 0x1b4b:0x9715 r160, 5 ports, feat 0x1/0x1f
    ahci 0000:03:00.0: FBS is enabled
    ata8.00: hard resetting link
    ata8.00: SATA link down (SStatus 0 SControl 330)
    ata8.01: hard resetting link
    ata8.01: SATA link down (SStatus 0 SControl 330)
    ata8.02: hard resetting link
    ata8.02: SATA link down (SStatus 0 SControl 330)
    ata8.03: hard resetting link
    ata8.03: SATA link up 6.0 Gbps (SStatus 133 SControl 133)
    ata8.04: hard resetting link
    ata8.04: failed to resume link (SControl 133)
    ata8.04: failed to read SCR 0 (Emask=0x40)
    ata8.04: failed to read SCR 0 (Emask=0x40)
    ata8.04: failed to read SCR 1 (Emask=0x40)
    ata8.04: failed to read SCR 0 (Emask=0x40)
    ata8.03: native sectors (2) is smaller than sectors (976773168)
    ata8.03: ATA-8: ST3500413AS, JC4B, max UDMA/133
    ata8.03: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
    ata8.03: configured for UDMA/133
    ata8.04: failed to IDENTIFY (I/O error, err_mask=0x100)
    ata8.15: hard resetting link
    ata8.15: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
    ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
    ata8.15: PMP revalidation failed (errno=-19)
    ata8.15: hard resetting link
    ata8.15: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
    ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
    ata8.15: PMP revalidation failed (errno=-19)
    ata8.15: limiting SATA link speed to 3.0 Gbps
    ata8.15: hard resetting link
    ata8.15: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
    ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
    ata8.15: PMP revalidation failed (errno=-19)
    ata8.15: failed to recover PMP after 5 tries, giving up
    ata8.15: Port Multiplier detaching
    ata8.03: disabled
    ata8.00: disabled
    ata8: EH complete

    The reason is that current detection code doesn't follow AHCI spec:

    First,the port multiplier detection process look like this:

    ahci_hardreset(link, class, deadline)
    if (class == ATA_DEV_PMP) {
    sata_pmp_attach(dev) /* will enable FBS */
    sata_pmp_init_links(ap, nr_ports);
    ata_for_each_link(link, ap, EDGE) {
    sata_std_hardreset(link, class, deadline);
    if (link_is_online) /* do soft reset */
    ahci_softreset(link, class, deadline);
    }
    }
    But, according to chapter 9.3.9 in AHCI spec: Prior to issuing software
    reset, software shall clear PxCMD.ST to '0' and then clear PxFBS.EN to
    '0'.

    The patch test ok with kernel 3.11.1.

    tj: Patch white space contaminated, applied manually with trivial
    updates.

    Signed-off-by: Xiangliang Yu
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    xiangliang yu
     
  • 6.0 Gbps link speed was not decoded properly:
    speed was reported at 3.0 Gbps only.

    Tested: On a machine where libata reports 6.0 Gbps in
    /var/log/messages:
    ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

    Before:
    cat /sys/class/ata_link/link1/sata_spd
    3.0 Gbps
    After:
    cat /sys/class/ata_link/link1/sata_spd
    6.0 Gbps

    Signed-off-by: Gwendal Grignou
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Gwendal Grignou
     

22 Oct, 2013

1 commit

  • Pull libata fixes from Tejun Heo:
    "The only interesting bit is ata_eh_qc_retry() update which fixes a
    problem where a SG_IO command may fail across suspend/resume cycle
    without the command actually being at fault.

    Other changes are low level driver specific and fairly low impact"

    * 'for-3.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    libahci: fix turning on LEDs in ahci_start_port()
    libata: make ata_eh_qc_retry() bump scmd->allowed on bogus failures
    ahci_platform: use dev_info() instead of printk()
    ahci: use dev_info() instead of printk()
    pata_isapnp: Don't use invalid I/O ports

    Linus Torvalds
     

17 Oct, 2013

1 commit

  • Previously, we wanted SCSI devices corrsponding to ATA devices to
    be runtime resumed when the power resource for those ATA device was
    turned on by some other device, so we added the SCSI device to the
    dependent device list of the ATA device's ACPI node. However, this
    code has no effect after commit 41863fc (ACPI / power: Drop automaitc
    resume of power resource dependent devices) and the mechanism it was
    supposed to implement is regarded as a bad idea now, so drop it.

    [rjw: Changelog]
    Signed-off-by: Aaron Lu
    Signed-off-by: Rafael J. Wysocki

    Aaron Lu
     

15 Oct, 2013

2 commits

  • If EM Transmit bit is busy during init ata_msleep() is called. It is
    wrong - msleep() should be used instead of ata_msleep(), because if EM
    Transmit bit is busy for one port, it will be busy for all other ports
    too, so using ata_msleep() causes wasting tries for another ports.

    The most common scenario looks like that now
    (six ports try to transmit a LED meaasege):
    - port #0 tries for the 1st time and succeeds
    - ports #1-5 try for the 1st time and sleeps
    - port #1 tries for the 2nd time and succeeds
    - ports #2-5 try for the 2nd time and sleeps
    - port #2 tries for the 3rd time and succeeds
    - ports #3-5 try for the 3rd time and sleeps
    - port #3 tries for the 4th time and succeeds
    - ports #4-5 try for the 4th time and sleeps
    - port #4 tries for the 5th time and succeeds
    - port #5 tries for the 5th time and sleeps

    At this moment port #5 wasted all its five tries and failed to
    initialize. Because there are only 5 (EM_MAX_RETRY) tries available
    usually only five ports succeed to initialize. The sixth port and next
    ones usually will fail.

    If msleep() is used instead of ata_msleep() the first port succeeds to
    initialize in the first try and next ones usually succeed to
    initialize in the second try.

    tj: updated comment

    Signed-off-by: Lukasz Dorau
    Signed-off-by: Tejun Heo

    Lukasz Dorau
     
  • In order to save power consumption as much as possible.

    * Disable sata phy internal pll reference clock when sysetem enter
    into suspend mode, enable it after resume.

    * Setup module parameter used to enable imx ahci test power down
    mode(PDDQ) or not, when there is no device detected on the port

    * minor modifications:
    - The format of the copyright is changed, because that the original
    one can't pass fsl internal patch reivew without the character
    '(c)'.
    - Exports ahci_platform_ops and ahci_error_handler().

    NOTE:
    * The hot-plug can't be supported when PDDQ mode is ever enabled.

    * module parameter usage how-to:
    - default: enable PDDQ mode when no device detected.
    - add "ahci-imx.hotplug=1" into kernel command line if your don't
    want to enable PDDQ mode when no device detected on the port.

    tj: Slightly updated description and comments.

    Signed-off-by: Richard Zhu
    Signed-off-by: Tejun Heo

    Richard Zhu
     

14 Oct, 2013

1 commit


10 Oct, 2013

1 commit


08 Oct, 2013

4 commits

  • libata EH decrements scmd->retries when the command failed for reasons
    unrelated to the command itself so that, for example, commands aborted
    due to suspend / resume cycle don't get penalized; however,
    decrementing scmd->retries isn't enough for ATA passthrough commands.

    Without this fix, ATA passthrough commands are not resend to the
    drive, and no error is signalled to the caller because:

    - allowed retry count is 1
    - ata_eh_qc_complete fill the sense data, so result is valid
    - sense data is filled with untouched ATA registers.

    Signed-off-by: Gwendal Grignou
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Gwendal Grignou
     
  • Change "raw" printk() call to dev_info() to provide a better
    message to userspace so it can properly identify the device
    and not just have to guess.

    Signed-off-by: Jingoo Han
    Signed-off-by: Tejun Heo

    Jingoo Han
     
  • Change "raw" printk() call to dev_info() to provide a better
    message to userspace so it can properly identify the device
    and not just have to guess.

    Signed-off-by: Jingoo Han
    Signed-off-by: Tejun Heo

    Jingoo Han
     
  • The test for 2nd I/O port validity is broken (reversed): On devices
    with no control port, the driver attempts to use invalid port 0,
    resulting in logs full of bad_io_access errors. On devices with
    control port, the driver does not use it.

    Signed-off-by: Ondrej Zary
    Signed-off-by: Tejun Heo

    Ondrej Zary
     

26 Sep, 2013

1 commit


23 Sep, 2013

1 commit


04 Sep, 2013

1 commit

  • Pull libata changes from Tejun Heo:
    "Two interesting changes.

    - libata acpi handling has been restructured so that the association
    between ata devices and ACPI handles are less convoluted. This
    change shouldn't change visible behavior.

    - Queued TRIM support, which enables sending TRIM to the device
    without draining in-flight RW commands, is added. Currently only
    enabled for ahci (and likely to stay that way for the foreseeable
    future).

    Other changes are driver-specific updates / fixes"

    * 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    libata: bugfix: Remove __le32 in ata_tf_to_fis()
    libata: acpi: Remove ata_dev_acpi_handle stub in libata.h
    libata: Add support for queued DSM TRIM
    libata: Add support for SEND/RECEIVE FPDMA QUEUED
    libata: Add H2D FIS "auxiliary" port flag
    libata: Populate host-to-device FIS "auxiliary" field
    ata: acpi: rework the ata acpi bind support
    sata, highbank: send extra clock cycles in SGPIO patterns
    sata, highbank: set tx_atten override bits
    devicetree: create a separate binding description for sata_highbank
    drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resource
    sata highbank: enable 64-bit DMA mask when using LPAE
    ata: pata_samsung_cf: add missing __iomem annotation
    ata: pata_arasan: Staticize local symbols
    sata_mv: Remove unneeded CONFIG_HAVE_CLK ifdefs
    ata: use dev_get_platdata()
    sata_mv: Remove unneeded forward declaration
    libata: acpi: remove dead code for ata_acpi_(un)bind
    libata: move 'struct ata_taskfile' and friends from ata.h to libata.h

    Linus Torvalds
     

03 Sep, 2013

1 commit


28 Aug, 2013

1 commit

  • The ata_dev_acpi_handle is defined in libata-acpi.c and the only
    external user is libata-zpodd.c, which is built when CONFIG_ATA_ACPI
    is set, so there is no need to make an empty stub function for
    ONFIG_ATA_ACPI case in libata.h. It also causes compile errors due to
    acpi_handle is not defined when !CONFIG_ACPI. This patch fixes this
    problem by removing the empty stub.

    Reported-by: Stephen Rothwell
    Signed-off-by: Aaron Lu
    Signed-off-by: Tejun Heo

    Aaron Lu
     

27 Aug, 2013

1 commit

  • * acpi-pm:
    ACPI / PM: Add state information to error message in acpi_device_set_power()
    ACPI / PM: Remove redundant power manageable check from acpi_bus_set_power()
    ACPI / PM: Use ACPI_STATE_D3_COLD instead of ACPI_STATE_D3 everywhere
    ACPI / PM: Make messages in acpi_device_set_power() print device names
    ACPI / PM: Only set power states of devices that are power manageable

    Rafael J. Wysocki