25 Aug, 2013

4 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
     

16 Jul, 2013

1 commit

  • Move 'struct ata_taskfile', ata_prot_flags() and their friends from
    to . They were misplaced from the beginning, as
    should cover ATA/ATAPI and related standards only -- to which the
    aforementioned structure and function have only remote relation.

    I would have moved 'enum ata_tf_protocols' closely related to 'struct
    ata_taskfile' but it unfortunately gets used by 'drivers/ide/ide-ioctls.c'...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Tejun Heo

    Sergei Shtylyov
     

07 Jun, 2013

1 commit


22 May, 2013

1 commit

  • 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
     

15 May, 2013

1 commit

  • 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
     

04 Apr, 2013

1 commit

  • 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

1 commit


22 Jan, 2013

1 commit

  • 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
     

03 Dec, 2012

2 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
     
  • Commit 66fa7f215 "libata-acpi: improve ACPI disabling" introdcued the
    behaviour of disabling ATA ACPI if ata_acpi_on_devcfg failed the 2nd
    time, but commit 30dcf76ac dropped this behaviour and this caused
    problem for Dimitris Damigos, where his laptop can not resume correctly.

    The bugzilla page for it is:
    https://bugzilla.kernel.org/show_bug.cgi?id=49331

    The problem is, ata_dev_push_id will fail the 2nd time it is invoked,
    and due to disabling ACPI code is dropped, ata_acpi_on_devcfg which
    calls ata_dev_push_id will keep failing and eventually made the device
    disabled.

    This patch restores the original behaviour, if acpi failed the 2nd time,
    disable acpi functionality for the device(and we do not event need to
    add a debug message for this as it is still there ;-).

    Reported-by: Dimitris Damigos
    Signed-off-by: Aaron Lu
    Cc:
    Signed-off-by: Jeff Garzik

    Aaron Lu
     

03 Oct, 2012

1 commit

  • 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
     

13 Sep, 2012

1 commit

  • 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
     

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
     

26 Jul, 2012

1 commit


20 Jul, 2012

1 commit

  • When managing shost->host_eh_scheduled libata assumes that there is a
    1:1 shost-to-ata_port relationship. libsas creates a 1:N relationship
    so it needs to manage host_eh_scheduled cumulatively at the host level.
    The sched_eh and end_eh port port ops allow libsas to track when domain
    devices enter/leave the "eh-pending" state under ha->lock (previously
    named ha->state_lock, but it is no longer just a lock for ha->state
    changes).

    Since host_eh_scheduled indicates eh without backing commands pinning
    the device it can be deallocated at any time. Move the taking of the
    domain_device reference under the port_lock to guarantee that the
    ata_port stays around for the duration of eh.

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

    Dan Williams
     

29 Jun, 2012

2 commits


08 May, 2012

1 commit


23 Apr, 2012

1 commit

  • This changes the ordering of initialization and probing events from:
    1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
    2/ allocate ata_port and schedule port probe in DISCE_PROBE
    ...to:
    1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
    2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
    3/ schedule port probe in DISCE_PROBE

    This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
    destrory ata devices before they have been fully initialized:

    BUG: unable to handle kernel paging request at 0000000000003b10
    IP: [] sas_ata_end_eh+0x12/0x5e [libsas]
    ...
    [] sas_unregister_common_dev+0x78/0xc9 [libsas]
    [] sas_unregister_dev+0x4f/0xad [libsas]
    [] sas_unregister_domain_devices+0x7f/0xbf [libsas]
    [] sas_deform_port+0x61/0x1b8 [libsas]
    [] sas_phye_loss_of_signal+0x29/0x2b [libsas]

    ...and kills the awkward "sata domain_device briefly existing in the
    domain without an ata_port" state.

    Reported-by: Michal Kosciowski
    Signed-off-by: Dan Williams
    Acked-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Dan Williams
     

01 Mar, 2012

1 commit

  • libsas ata error handling is already async but this does not help the
    scan case. Move initial link recovery out from under host->scan_mutex,
    and delay synchronization with eh until after all port probe/recovery
    work has been queued.

    Device ordering is maintained with scan order by still calling
    sas_rphy_add() in order of domain discovery.

    Since we now scan the domain list when invoking libata-eh we need to be
    careful to check for fully initialized ata ports.

    Acked-by: Jack Wang
    Acked-by: Jeff Garzik
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     

20 Feb, 2012

1 commit

  • Link resets leave ata affiliations intact, so arrange for libsas to make
    an effort to avoid dropping the device due to a slow-to-recover link.
    Towards this end carry out reset in the host workqueue so that it can
    check for ata devices and kick the reset request to libata. Hard
    resets, in contrast, bypass libata since they are meant for associating
    an ata device with another initiator in the domain (tears down
    affiliations).

    Need to add a new transport_sas_phy_reset() since the current
    sas_phy_reset() is a utility function to libsas lldds. They are not
    prepared for it to loop back into eh.

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     

01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

03 Oct, 2011

1 commit

  • Pass queue_depth change requests to libata, and prevent queue_type
    changes for ATA devices.

    Otherwise:
    1/ we do not honor the libata specific restrictions on the queue depth
    2/ libsas drivers that do not set sdev->tagged_supported are unable to
    change the queue_depth of ata devices via sysfs

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

    Dan Williams
     

24 Jul, 2011

2 commits

  • Use a single mechanism to show driver version.
    Reduces text a tiny bit too.

    Remove uses of static int printed_version
    Add and use ata_print_version(const struct device *, const char *ver)
    and ata_print_version_once.

    $ size drivers/ata/built-in.*
    text data bss dec hex filename
    544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
    543870 73893 116592 734355 b34ad drivers/ata/built-in.allyesconfig.print_once.o
    141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
    141212 14689 4220 160121 27179 drivers/ata/built-in.defconfig.print_once.o

    Signed-off-by: Joe Perches
    Signed-off-by: Jeff Garzik

    Joe Perches
     
  • Saves text by removing nearly duplicated text format strings by
    creating ata__printk functions and printf extension %pV.

    ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)

    Format string duplication comes from:

    #define ata_link_printk(link, lv, fmt, args...) do { \
    if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
    printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
    (link)->pmp , ##args); \
    else \
    printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
    } while(0)

    Coalesce long formats.

    $ size drivers/ata/built-in.*
    text data bss dec hex filename
    544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
    558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
    141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
    149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o

    Signed-off-by: Joe Perches
    Signed-off-by: Jeff Garzik

    Joe Perches
     

20 May, 2011

1 commit

  • Give users the option of completely powering off unoccupied
    SATA ports using the existing min_power link_power_management_policy
    option. When the use selects this option on an empty port, we
    will power the port off by setting DET to off. For occupied ports,
    behavior is unchanged.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Jeff Garzik

    Kristen Carlson Accardi
     

24 Apr, 2011

2 commits


31 Mar, 2011

1 commit


14 Mar, 2011

1 commit


02 Mar, 2011

2 commits

  • Commit 6b7ae9545ad9875a289f4191c0216b473e313cb9 (libata: reimplement link power
    management) removed the check of ATA_FLAG_LPM but neglected to remove the flag
    itself. Do it now...

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

    Sergei Shtylyov
     
  • All checks of ATA_FLAG_NO_LEGACY have been removed by the commits
    c791c30670ea61f19eec390124128bf278e854fe ([libata] minor PCI IDE probe
    fixes and cleanups) and f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (libata:
    update libata core layer to use devres), so I think it's time to finally
    get rid of this flag...

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

    Sergei Shtylyov