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
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
13 Jun, 2023
1 commit
-
Use the recently added of_property_read_reg() helper to get the
untranslated "reg" address value.Signed-off-by: Rob Herring
Reviewed-by: Sergey Shtylyov
Signed-off-by: Damien Le Moal
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
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
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
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
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
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
14 Jan, 2022
1 commit
-
Return value from DIV_ROUND_UP() directly instead
of taking this in another redundant variable.Reported-by: Zeal Robot
Signed-off-by: Minghao Chi
Signed-off-by: CGEL ZTE
Signed-off-by: Damien Le Moal
05 Jan, 2022
4 commits
-
Signed-off-by: Hannes Reinecke
Signed-off-by: Damien Le Moal -
Drop pointless VPRINTK() calls and convert the remaining calls to
the existing bmdma tracepoint.Signed-off-by: Hannes Reinecke
Signed-off-by: Damien Le Moal -
There is only so much information to be glanced when the interrupt
routine is called and exited, so remove these DPRINTK() calls.Signed-off-by: Hannes Reinecke
Signed-off-by: Damien Le Moal -
Add tracepoints for bus-master DMA and taskfile related functions.
That allows us to drop the relevant DPRINTK() calls.Signed-off-by: Hannes Reinecke
Signed-off-by: Damien Le Moal
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
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
06 Jan, 2020
1 commit
-
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.Signed-off-by: Christoph Hellwig
Acked-by: Arnd Bergmann
29 Aug, 2017
1 commit
-
The Octeon CF driver basically open-codes of_property_read_{bool|u32}()
using of_{find|get}_property() calls in its probe() method. Using the
modern DT APIs saves 2 LoCs and 16 bytes of object code (MIPS gcc 3.4.3).Signed-off-by: Sergei Shtylyov
Signed-off-by: Tejun Heo
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.oFile size after constify octeon_cf_match.
text data bss dec hex filename
865 280 4 1149 47d drivers/ata/pata_octeon_cf.oSigned-off-by: Arvind Yadav
Signed-off-by: Tejun Heo
24 Jan, 2017
1 commit
-
@t1 and @t2i are calculated along with @t2 but never used. Drop them.
Signed-off-by: Tejun Heo
Reported-by: David Binderman
11 Jan, 2017
1 commit
-
For Atari Falcon PATA support we need to check the current command
in its ->sff_data_xfer method. Update core code and all users
accordingly.There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Tejun Heo
22 Sep, 2016
1 commit
-
Replace BUG() with BUG_ON().
Caught by coccinelle.Signed-off-by: Harman Kalra
Signed-off-by: Tejun Heo
08 Jun, 2015
1 commit
-
MODULE_DEVICE_TABLE is referring to wrong driver's table and breaks the
build. Fix that.Cc: stable@vger.kernel.org
Signed-off-by: Aaro Koskinen
Signed-off-by: Tejun Heo
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
15 Apr, 2014
1 commit
-
As a nice side effect this fixes the cf_port leak on
dma_coerce_mask_and_coherent() or ata_host_activate()
failure.Cc: Ralf Baechle
Cc: David Daney
Suggested-by: Guenter Roeck
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Tejun Heo
31 Oct, 2013
1 commit
-
Convert this code sequence:
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
to use dma_coerce_mask_and_coherent() to avoid bypassing the architecture
check on the DMA mask.Signed-off-by: Russell King
30 Jul, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Tejun Heo
04 Apr, 2013
1 commit
-
Use resource_size function instead of explicit computation.
Patch found using coccinelle.Signed-off-by: Alexandru Gheorghiu
Signed-off-by: Jeff Garzik
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
14 Dec, 2012
2 commits
-
We need to set the 'endian' bit in this case.
Acked-by: Jeff Garzik
Signed-off-by: David Daney -
The patch needs to eliminate the definition of OCTEON_IRQ_BOOTDMA so
that the device tree code can map the interrupt, so in order to not
temporarily break things, we do a single patch to both the interrupt
registration code and the pata_octeon_cf driver.Also rolled in is a conversion to use hrtimers and corrections to the
timing calculations.Acked-by: Jeff Garzik
Signed-off-by: David Daney
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.oSigned-off-by: Joe Perches
Signed-off-by: Jeff Garzik -
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.oSigned-off-by: Joe Perches
Signed-off-by: Jeff Garzik
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 -
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
13 Nov, 2010
1 commit
-
Delete successive assignments to the same location.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression i;
@@*i = ...;
i = ...;
//Signed-off-by: Julia Lawall
Signed-off-by: Jeff Garzik
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
26 May, 2010
1 commit
-
Now that SFF and BMDMA are completely separate, sata_qstor and
pata_octeon_cf which inherit from ata_sff_port_ops don't need to worry
about BMDMA ops being called. Kill the dummy BMDMA ops.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
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
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