26 Jul, 2023

1 commit

  • The variable 'rv' is set to 0 after calling of_property_read_reg(), so
    it cannot be used as an error code. Change to using correct error codes
    in the error path.

    Fixes: d0b2461678b1 ("ata: Use of_property_read_reg() to parse "reg"")
    Signed-off-by: Yang Yingliang
    Reviewed-by: Sergey Shtylyov
    Reviewed-by: Rob Herring
    Signed-off-by: Damien Le Moal

    Yang Yingliang
     

15 Jun, 2023

1 commit

  • Include the header file linux/of_address.h to avoid compilation errors
    triggered by of_property_read_reg() being undeclared.

    Fixes: d0b2461678b1 ("ata: Use of_property_read_reg() to parse "reg"")
    Reported-by: kernel test robot
    Closes: https://lore.kernel.org/oe-kbuild-all/202306141702.ZaO9V2lk-lkp@intel.com/
    Signed-off-by: Damien Le Moal

    Damien Le Moal
     

13 Jun, 2023

1 commit


25 Mar, 2023

1 commit

  • Make it explicit that ATA host templates are not modified.

    Reviewed-by: Linus Walleij
    Acked-by: Damien Le Moal
    Reviewed-by: Serge Semin (for DWC AHCI SATA)
    Reviewed-by: John Garry
    Reviewed-by: Jon Hunter (for Tegra)
    Cc: Christoph Hellwig
    Cc: Ming Lei
    Cc: Hannes Reinecke
    Cc: John Garry
    Cc: Mike Christie
    Signed-off-by: Bart Van Assche
    Link: https://lore.kernel.org/r/20230322195515.1267197-5-bvanassche@acm.org
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

14 Feb, 2023

1 commit

  • Fix a slew of kernel-doc warnings in pata_octeon_cf.c by changing
    all "/**" comments to "/*" since they are not in kernel-doc format.

    Fixes: 3c929c6f5aa7 ("libata: New driver for OCTEON SOC Compact Flash interface (v7).")
    Signed-off-by: Randy Dunlap
    Reported-by: kernel test robot
    Link: https://lore.kernel.org/all/202302101722.5O56RClE-lkp@intel.com/
    Cc: David Daney
    Cc: Damien Le Moal
    Cc: Mauro Carvalho Chehab
    Cc: linux-ide@vger.kernel.org
    Signed-off-by: Damien Le Moal

    Randy Dunlap
     

06 Jun, 2022

1 commit

  • of_find_device_by_node() takes reference, we should use put_device()
    to release it when not need anymore.
    Add missing put_device() to avoid refcount leak.

    Fixes: 43f01da0f279 ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.")
    Signed-off-by: Miaoqian Lin
    Reviewed-by: Sergey Shtylyov
    Signed-off-by: Damien Le Moal

    Miaoqian Lin
     

07 Mar, 2022

1 commit

  • It does not make sense to have a comma after a sentinel, as any new
    elements must be added before the sentinel.

    Add comments to clarify the purpose of the empty elements.
    Rewrap entries to a single line to have a consistent style.

    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Sergey Shtylyov
    Acked-by: Florian Fainelli [ahci_brcm]
    Reviewed-by: Kieran Bingham
    Reviewed-by: Linus Walleij
    Signed-off-by: Damien Le Moal

    Geert Uytterhoeven
     

20 Feb, 2022

1 commit

  • Add the explicit error and status register fields to 'struct ata_taskfile'
    using the anonymous *union*s ('struct ide_taskfile' had that for ages!) and
    update the libata taskfile code accordingly. There should be no object code
    changes resulting from that...

    Signed-off-by: Sergey Shtylyov
    Signed-off-by: Damien Le Moal

    Sergey Shtylyov
     

21 Jan, 2022

1 commit

  • The first argument of trace_ata_bmdma_stop() must be a pointer to a
    struct ata_port, not to a struct ata_queued_cmd.

    Reported-by: Linux Kernel Functional Testing
    Fixes: d3e140f2b008 ("ata: pata_octeon_cf: Drop pointless VPRINTK() calls and convert the remaining one")
    Signed-off-by: Damien Le Moal
    Tested-by: Linux Kernel Functional Testing

    Damien Le Moal
     

14 Jan, 2022

1 commit


05 Jan, 2022

4 commits


04 Jan, 2022

1 commit

  • To follow the flow of control we should be using tracepoints, as
    they will tie in with the actual I/O flow and deliver a better
    overview about what it happening.
    This patch adds tracepoints for hard reset, soft reset, and postreset
    and adds them in the libata-eh control flow.
    With that we can drop the reset DPRINTK calls in the various drivers.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Damien Le Moal

    Hannes Reinecke
     

20 May, 2021

1 commit

  • Iff platform_get_irq() fails (or returns IRQ0) and thus the polling mode
    has to be used, ata_host_activate() hits the WARN_ON() due to 'irq_handler'
    parameter being non-NULL if the polling mode is selected. Let's only set
    the pointer to the driver's IRQ handler if platform_get_irq() returns a
    valid IRQ # -- this should avoid the unnecessary WARN_ON()...

    Fixes: 43f01da0f279 ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.")
    Signed-off-by: Sergey Shtylyov
    Link: https://lore.kernel.org/r/3a241167-f84d-1d25-5b9b-be910afbe666@omp.ru
    Signed-off-by: Jens Axboe

    Sergey Shtylyov
     

06 Jan, 2020

1 commit


29 Aug, 2017

1 commit


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
    465 696 4 1165 48d drivers/ata/pata_octeon_cf.o

    File size after constify octeon_cf_match.
    text data bss dec hex filename
    865 280 4 1149 47d drivers/ata/pata_octeon_cf.o

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

    Arvind Yadav
     

24 Jan, 2017

1 commit


11 Jan, 2017

1 commit


22 Sep, 2016

1 commit


08 Jun, 2015

1 commit


20 Oct, 2014

1 commit


15 Apr, 2014

1 commit


31 Oct, 2013

1 commit


30 Jul, 2013

1 commit


04 Apr, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Jeff Garzik
    Cc: Viresh Kumar
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

14 Dec, 2012

2 commits


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
     

02 Mar, 2011

2 commits

  • 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
     
  • Commit 0d5ff566779f894ca9937231a181eb31e4adff0e (libata: convert to iomap)
    removed all checks of ATA_FLAG_MMIO but neglected to remove the flag itself.
    Do it now, at last...

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

    Sergei Shtylyov
     

13 Nov, 2010

1 commit


30 Oct, 2010

1 commit

  • The creation of the I/O clock domain requires some adjustments. Since the
    CF bus timing logic is clocked by the I/O clock, use its rate for delay
    calculations.

    Signed-off-by: David Daney
    Cc: Jeff Garzik
    Cc: linux-ide@vger.kernel.org
    Patchwork: http://patchwork.linux-mips.org/patch/1660/
    Acked-by: Jeff Garzik
    Signed-off-by: Ralf Baechle

    David Daney
     

26 May, 2010

1 commit


18 May, 2010

1 commit

  • ATA_FLAG_DISABLED is only used by drivers which don't use
    ->error_handler framework and is largely broken. Its only meaningful
    function is to make irq handlers skip processing if the flag is set,
    which is largely useless and even harmful as it makes those ports more
    likely to cause IRQ storms.

    Kill ATA_FLAG_DISABLED and makes the callers disable attached devices
    instead. ata_port_probe() and ata_port_disable() which manipulate the
    flag are also killed.

    This simplifies condition check in IRQ handlers. While updating IRQ
    handlers, remove ap NULL check as libata guarantees consecutive port
    allocation (unoccupied ports are initialized with dummies) and
    long-obsolete ATA_QCFLAG_ACTIVE check (checked by ata_qc_from_tag()).

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

    Tejun Heo
     

15 May, 2010

1 commit

  • Now, with the introduction of the sff_set_devctl() method, we can
    use it in sff_irq_on() method too -- that way its implementations
    in 'pata_bf54x' and 'pata_scc' become virtually identical to
    ata_sff_irq_on(). The sff_irq_on() method now becomes quite
    superfluous, and the only reason not to remove it completely is
    the existence of the 'pata_octeon_cf' driver which implements it
    as an empty function. Just make the method optional then, with
    ata_sff_irq_on() becoming generic taskfile-bound function, still
    global for the 'pata_bf54x' driver to be able to call it from its
    thaw() and postreset() methods.

    While at it, make the sff_irq_on() method and ata_sff_irq_on() return
    'void' as the result is always ignored anyway.

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

    Sergei Shtylyov