01 Nov, 2019

1 commit

  • In case a driver wants to return an error from qc_prep, return enum
    ata_completion_errors. sata_mv is one of those drivers -- see the next
    patch. Other drivers return the newly defined AC_ERR_OK.

    [v2] use enum ata_completion_errors and AC_ERR_OK.

    Signed-off-by: Jiri Slaby
    Cc: Jens Axboe
    Cc: linux-ide@vger.kernel.org
    Signed-off-by: Jens Axboe

    Jiri Slaby
     

10 May, 2019

1 commit


11 Dec, 2018

1 commit

  • The driver overrides the error codes returned by platform_get_irq() to
    -EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe
    permanently instead of the deferred probing. Switch to propagating the
    error code upstream, still checking/overriding IRQ0 as libata regards it
    as "no IRQ" (thus polling) anyway...

    Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
    Reviewed-by: Simon Horman
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jens Axboe

    Sergei Shtylyov
     

08 Nov, 2018

1 commit


07 Aug, 2018

2 commits


23 Jul, 2018

2 commits


13 Feb, 2018

2 commits

  • drivers/ata/sata_rcar.c: In function 'sata_rcar_init_controller':
    drivers/ata/sata_rcar.c:821:8: warning: unused variable 'base' [-Wunused-variable]

    Fixes: da77d76b95a0e894 ("sata_rcar: Reset SATA PHY when Salvator-X board resumes")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Tejun Heo

    Geert Uytterhoeven
     
  • Because power of Salvator-X board is cut off in suspend,
    it needs to reset SATA PHY state in resume.
    Otherwise, SATA partition could not be accessed anymore.

    Signed-off-by: Khiem Nguyen
    Signed-off-by: Hien Dang
    [reinit phy in sata_rcar_resume() function on R-Car Gen3 only]
    [factor out SATA module init sequence]
    [fixed the prefix for the subject]
    Signed-off-by: Yoshihiro Kaneko
    Signed-off-by: Tejun Heo

    Khiem Nguyen
     

04 Oct, 2017

1 commit


15 Jul, 2017

1 commit

  • Add fallback compatibility string for R-Car Gen 2 and 3.

    In the case of Renesas R-Car hardware we know that there are generations of
    SoCs, e.g. Gen 1 and 2. But beyond that its not clear what the relationship
    between IP blocks might be. For example, I believe that r8a7790 is older
    than r8a7791 but that doesn't imply that the latter is a descendant of the
    former or vice versa.

    We can, however, by examining the documentation and behaviour of the
    hardware at run-time observe that the current driver implementation appears
    to be compatible with the IP blocks on SoCs within a given generation.

    For the above reasons and convenience when enabling new SoCs a
    per-generation fallback compatibility string scheme being adopted for
    drivers for Renesas SoCs.

    Signed-off-by: Simon Horman
    Acked-by: Sergei Shtylyov
    Reviewed-by: Geert Uytterhoeven
    Acked-by: Rob Herring
    Signed-off-by: Tejun Heo

    Simon Horman
     

07 Jul, 2017

1 commit

  • Pull libata updates from Tejun Heo:

    - Christoph added support for TCG OPAL self encrypting disks

    - Minwoo added support for ATA PASS-THROUGH(32)

    - Linus Walleij removed spurious drvdata assignments in some drivers

    - Support for a few new device and other fixes

    * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (33 commits)
    sd: add support for TCG OPAL self encrypting disks
    libata: fix build warning from unused goto label
    libata: Support for an ATA PASS-THROUGH(32) command.
    ahci: Add Device ID for ASMedia 1061R and 1062R
    sata_via: Enable optional hotplug on VT6420
    ata: ahci_brcm: Avoid writing to read-only registers
    libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flag
    libata: Add the AHCI_HFLAG_YES_ALPM flag
    ata: ftide010: fix resource printing
    libata: make the function name in comment match the actual function
    ata: sata_rcar: make of_device_ids const.
    ata: pata_octeon_cf: make of_device_ids const.
    libata: Convert bare printks to pr_cont
    libahci: wrong comments in ahci_do_softreset()
    ata: declare ata_port_info structures as const
    ata: Add driver for Faraday Technology FTIDE010
    ata: Add DT bindings for the Gemini SATA bridge
    ata: Add DT bindings for Faraday Technology FTIDE010
    libata: implement SECURITY PROTOCOL IN/OUT
    libata: factor out a ata_identify_page_supported helper
    ...

    Linus Torvalds
     

20 Jun, 2017

1 commit

  • of_device_ids are not supposed to change at runtime. All functions
    working with of_device_ids provided by work with const
    of_device_ids. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    3946 2296 0 6242 1862 drivers/ata/sata_rcar.o

    File size after constify sata_rcar_match.
    text data bss dec hex filename
    5554 696 0 6250 186a drivers/ata/sata_rcar.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Tejun Heo

    Arvind Yadav
     

16 May, 2017

1 commit


11 Jan, 2017

1 commit


24 Nov, 2015

1 commit

  • Since commit c99cd90d98a98aa1 ("ARM: shmobile: r8a7779: Remove legacy
    SoC code"), R-Car SoCs are only supported in generic DT-only ARM
    multi-platform builds. The driver doesn't need to match platform
    devices by name anymore, hence remove the remaining platform_device_id
    entries and platform device support.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Simon Horman
    Signed-off-by: Tejun Heo

    Geert Uytterhoeven
     

21 Nov, 2015

1 commit


15 Jul, 2015

1 commit


19 Jan, 2015

1 commit

  • In order to make it possible to restore from hibernation not only in Linux but
    also in e.g. U-Boot, we have to extend sata_rcar_{suspend|resume}() to {freeze|
    thaw}() PM methods and implement the restore() PM method.

    Signed-off-by: Mikhail Ulyanov
    [Sergei: killed unused variable, changed the order of initializers, modified
    copyrights, renamed, modified changelog.]
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Tejun Heo

    Mikhail Ulyanov
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

28 Oct, 2014

1 commit


27 Oct, 2014

1 commit


20 Oct, 2014

1 commit


10 May, 2014

1 commit

  • This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
    where applicable. Benefits of this change:

    * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
    and CONFIG_PM_RUNTIME=y configurations

    * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
    the future

    * more consistent code (there are host drivers which are using the correct
    CONFIG_PM_SLEEP checks already)

    The patch leaves the core libata code and ->port_[suspend,resume] support
    in sata_[inic162x,nv,sil24].c alone for now.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Tejun Heo

    Bartlomiej Zolnierkiewicz
     

30 Nov, 2013

1 commit

  • R-Car Gen2 SoCs have a different PHY which is not compatible
    with the older R-Car H1 (R8A7779) version.
    This adds OF/platform device id tables and PHY initialization
    callbacks for the following Gen2 SoCs:
    * R-Car H2: R8A7790;
    * R-Car M2: R8A7791.

    PHY initialization method is chosen based on the device id.
    Default PHY settings are applied for Gen2 SoCs, which should
    suit the Gen2 boards available.

    While at it, this also adds "sata-r8a7779" compatibility string
    for R8A7779 SATA, while keeping the old one for compatibility.

    Signed-off-by: Valentine Barshak
    Signed-off-by: Tejun Heo

    Valentine Barshak
     

30 Oct, 2013

1 commit


14 Aug, 2013

1 commit

  • Remove unneeded error handling on the result of a call to
    platform_get_resource when the value is passed to devm_ioremap_resource.

    Move the call to platform_get_resource adjacent to the call to
    devm_ioremap_resource to make the connection between them more clear.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression pdev,res,n,e,e1;
    expression ret != 0;
    identifier l;
    @@

    - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    ... when != res
    - if (res == NULL) { ... \(goto l;\|return ret;\) }
    ... when != res
    + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    e = devm_ioremap_resource(e1, res);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Tejun Heo

    Julia Lawall
     

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
     

04 Jun, 2013

1 commit

  • When compiling the driver with gcc 4.8, it gives the following warning:

    drivers/ata/sata_rcar.c: In function `sata_rcar_thaw':
    drivers/ata/sata_rcar.c:183:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]

    Fix the warning by explicit cast of the 'unsigned long' value to 'u32'.

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

    Sergei Shtylyov
     

02 Jun, 2013

1 commit

  • The driver's interrupt handling code is too picky in deciding whether it should
    handle an interrupt or not which causes completely unneeded spurious interrupts.
    Thus make sata_rcar_{ata|serr}_interrupt() *void*; add ATA status register read
    to sata_rcar_ata_interrupt() to clear an unexpected ATA interrupt -- it doesn't
    get cleared by writing to the SATAINTSTAT register in the interrupt mode we use.

    Also, in sata_rcar_ata_interrupt() we should check SATAINTSTAT register only for
    enabled interrupts and we should clear only those interrupts that we have read
    as active first time around, because else we have a race and risk clearing an
    interrupt that can occur between read and write of the SATAINTSTAT register
    and never registering it...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Sergei Shtylyov
     

28 May, 2013

3 commits

  • The 'base' field of 'struct sata_rcar_priv' is used very often
    throughout the driver, so it seems worth loading it into a local
    variable if it's used more than once in a function.

    While at it, put some unitialized variables after intialized ones for
    aesthetic reasons. :-)

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

    Sergei Shtylyov
     
  • Using ATA_BMDMA_SHT() to intialize 'sata_rcar_sht' was suboptimal as
    the R-Car descriptor table transfer counter is 28 bits wide (bit 1 to
    bit 28), so that the 'dma_boundary' field of 0xFFFF is just too small,
    as well as the 'sg_tablesize' field of 128. Use ATA_BASE_SHT() to
    initialize 'sata_rcar_sht' instead and give proper values to the
    'dma_boundary' and 'sg_tablesize' fields explicitly.

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

    Sergei Shtylyov
     
  • I've modified sata_rcar_bmdma_fill_sg() to take care of splitting long
    scatter/ gather segments due to the descriptor table transfer counter
    being only 28 bits wide (bit 1 to bit 28) but that was in vain as even
    if 'sata_rcar_sht' specified a correct 'dma_boundary' field, the DMA
    and block layers would have split the S/G segments on the necassary
    boundaries. Since the driver uses ATA_BMDMA_SHT() to initilaize
    'sata_rcar_sht', the boundary is much smaller, only 0xFFFF, so the
    code I've added is even more useless, and it's better to just remove
    it.

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

    Sergei Shtylyov
     

24 May, 2013

1 commit

  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Also, unnecessary dev_set_drvdata() is removed, because the driver core
    clears the driver data to NULL after device_release or on probe failure.

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

    Jingoo Han
     

22 May, 2013

1 commit

  • Iff bmdma_setup() has to stop a DMA transfer before starting a new
    one, then the STOP bit in the ATAPI_CONTROL1 register will remain set
    (it's only cleared when setting the START bit to 1) and then
    bmdma_start() method will set both START and STOP bits simultaneously
    which should abort the transfer being just started. Avoid that by
    explicitly clearing the STOP bit in bmdma_start() method (in this case
    it will be ignored on write).

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Sergei Shtylyov
     

12 Apr, 2013

1 commit


21 Feb, 2013

1 commit