16 May, 2017
1 commit
-
The libata documentation is now using ReST. Update references
to it to point to the new place.Signed-off-by: Mauro Carvalho Chehab
08 Apr, 2015
1 commit
-
Replace occurences of the pci api by appropriate call to the dma api.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)@deprecated@
idexpression id;
position p;
@@(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
when != pci_get_drvdata ( id )
when != pci_enable_device ( id )
(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_ATOMIC
)
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_ATOMIC
)
)Signed-off-by: Quentin Lambert
Signed-off-by: Tejun Heo
14 Feb, 2014
1 commit
-
None of these files are actually using any __init type directives
and hence don't need to include . Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.Cc: linux-ide@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Tejun Heo
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
26 Jul, 2012
1 commit
-
This patch converts the drivers in drivers/ata/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.Signed-off-by: Axel Lin
Cc: Alan Cox
Cc: Jeff Garzik
Cc: Mikael Pettersson
Cc: Mark Lord
Cc: Jeremy Higdon
Cc: Benjamin Herrenschmidt
Signed-off-by: Jeff Garzik
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 a bit of text as the call takes fewer args.
Coalesce a few formats.
Convert a few bare printks to pr_cont.$ size drivers/ata/built-in.o*
text data bss dec hex filename
558429 73893 117864 750186 b726a drivers/ata/built-in.o.allyesconfig.new
559574 73893 117888 751355 b76fb drivers/ata/built-in.o.allyesconfig.old
149567 14689 4220 168476 2921c drivers/ata/built-in.o.defconfig.new
149851 14689 4220 168760 29338 drivers/ata/built-in.o.defconfig.oldSigned-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
02 Nov, 2010
1 commit
-
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
26 May, 2010
1 commit
-
Separate out BMDMA irq handler from SFF irq handler. The misnamed
host_intr() functions are renamed to ata_sff_port_intr() and
ata_bmdma_port_intr(). Common parts are factored into
__ata_sff_port_intr() and __ata_sff_interrupt() and used by sff and
bmdma interrupt routines.All BMDMA drivers now use ata_bmdma_interrupt() or
ata_bmdma_port_intr() while all non-BMDMA SFF ones use
ata_sff_interrupt() or ata_sff_port_intr().For now, ata_pci_sff_init_one() uses ata_bmdma_interrupt() as it's
used by both SFF and BMDMA drivers.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
07 Apr, 2009
1 commit
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Mar, 2009
2 commits
-
On a timeout call a device specific handler early in the recovery so that
we can complete and process successful commands which timed out due to IRQ
loss or the like rather more elegantly.[Revised to exclude the timeout handling on a few devices that inherit from
SFF but are not SFF enough to use the default timeout handler]Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
No functional changes in this patch.
Signed-off-by: Erik Inge Bolsø
Signed-off-by: Jeff Garzik
29 Sep, 2008
1 commit
-
Logically, SCR access ops should take @link; however, there was no
compelling reason to convert all SCR access ops when adding @link
abstraction as there's one-to-one mapping between a port and a non-PMP
link. However, that assumption won't hold anymore with the scheduled
addition of slave link.Make SCR access ops per-link.
Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
18 Apr, 2008
6 commits
-
Add sff_ prefix to SFF specific port ops.
This rename is in preparation of separating SFF support out of libata
core layer. This patch strictly renames ops and doesn't introduce any
behavior difference.Signed-off-by: Tejun Heo
-
SFF functions have confusing names. Some have sff prefix, some have
bmdma, some std, some pci and some none. Unify the naming by...* SFF functions which are common to both BMDMA and non-BMDMA are
prefixed with ata_sff_.* SFF functions which are specific to BMDMA are prefixed with
ata_bmdma_.* SFF functions which are specific to PCI but apply to both BMDMA and
non-BMDMA are prefixed with ata_pci_sff_.* SFF functions which are specific to PCI and BMDMA are prefixed with
ata_pci_bmdma_.* Drop generic prefixes from LLD specific routines. For example,
bfin_std_dev_select -> bfin_dev_select.The following renames are noteworthy.
ata_qc_issue_prot() -> ata_sff_qc_issue()
ata_pci_default_filter() -> ata_bmdma_mode_filter()
ata_dev_try_classify() -> ata_sff_dev_classify()This rename is in preparation of separating SFF support out of libata
core layer. This patch strictly renames functions and doesn't
introduce any behavior difference.Signed-off-by: Tejun Heo
-
ata_chk_status() just calls ops->check_status and it only adds
confusion with other status functions. Kill it.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
libata lets low level drivers build ata_port_operations table and
register it with libata core layer. This allows low level drivers
high level of flexibility but also burdens them with lots of
boilerplate entries.This becomes worse for drivers which support related similar
controllers which differ slightly. They share most of the operations
except for a few. However, the driver still needs to list all
operations for each variant. This results in large number of
duplicate entries, which is not only inefficient but also error-prone
as it becomes very difficult to tell what the actual differences are.This duplicate boilerplates all over the low level drivers also make
updating the core layer exteremely difficult and error-prone. When
compounded with multi-branched development model, it ends up
accumulating inconsistencies over time. Some of those inconsistencies
cause immediate problems and fixed. Others just remain there dormant
making maintenance increasingly difficult.To rectify the problem, this patch implements ata_port_operations
inheritance. To allow LLDs to easily re-use their own ops tables
overriding only specific methods, this patch implements poor man's
class inheritance. An ops table has ->inherits field which can be set
to any ops table as long as it doesn't create a loop. When the host
is started, the inheritance chain is followed and any operation which
isn't specified is taken from the nearest ancestor which has it
specified. This operation is called finalization and done only once
per an ops table and the LLD doesn't have to do anything special about
it other than making the ops table non-const such that libata can
update it.libata provides four base ops tables lower drivers can inherit from -
base, sata, pmp, sff and bmdma. To avoid overriding these ops
accidentaly, these ops are declared const and LLDs should always
inherit these instead of using them directly.After finalization, all the ops table are identical before and after
the patch except for setting .irq_handler to ata_interrupt in drivers
which didn't use to. The .irq_handler doesn't have any actual effect
and the field will soon be removed by later patch.* sata_sx4 is still using old style EH and currently doesn't take
advantage of ops inheritance.Signed-off-by: Tejun Heo
-
libata lets low level drivers build scsi_host_template and register it
to the SCSI layer. This allows low level drivers high level of
flexibility but also burdens them with lots of boilerplate entries.This patch implements SHT initializers which can be used to initialize
all the boilerplate entries in a sht. Three variants of them are
implemented - BASE, BMDMA and NCQ - for different types of drivers.
Note that entries can be overriden by putting individual initializers
after the helper macro.All sht tables are identical before and after this patch.
Signed-off-by: Tejun Heo
-
Over the time, port info, ops and sht structures developed quite a bit
of inconsistencies. This patch updates drivers.* Enable/disable_pm callbacks added to all ahci ops tables.
* Every driver for SFF controllers now uses ata_sff_port_start()
instead of ata_port_start() unless the driver has custom
implementation.* Every driver for SFF controllers now uses ata_pci_default_filter()
unless the driver has custom implementation.* Removed an odd port_info->sht initialization from ata_piix.c.
Likely a merge byproduct.* A port which has ATA_FLAG_SATA set doesn't need to set cable_detect
to ata_cable_sata(). Remove it from via and mv port ops.* Some drivers had unnecessary .max_sectors initialization which is
ignored and was missing .slave_destroy callback. Fixed.* Removed unnecessary sht initializations port_info's.
* Removed onsolete scsi device suspend/resume callbacks from
pata_bf54x.* No reason to set ata_pci_default_filter() and bmdma functions for
PIO-only drivers. Remove those callbacks and replace
ata_bmdma_irq_clear with ata_noop_irq_clear.* pata_platform sets port_start to ata_dummy_ret0. port_start can
just be set to NULL.* sata_fsl supports NCQ but was missing qc_defer. Fixed.
* pata_rb600_cf implements dummy port_start. Removed.
Signed-off-by: Tejun Heo
29 Oct, 2007
1 commit
-
Signed-off-by: Jeff Garzik
13 Oct, 2007
4 commits
-
Currently, port configuration reporting has the following problems.
* iomapped address is reported instead of raw address
* report contains irrelevant fields or lacks necessary fields for
non-SFF controllers.
* host->irq/irq2 are there just for reporting and hacky.This patch implements and uses ata_port_desc() and
ata_port_pbar_desc(). ata_port_desc() is almost identical to
ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no
locking requirement, can only be used during host initialization and "
" is used as separator instead of ", ". ata_port_pbar_desc() is a
helper to ease reporting of a PCI BAR or an offsetted address into it.LLD pushes whatever description it wants using the above two
functions. The accumulated description is printed on host
registration after "[S/P]ATA max MAX_XFERMODE ".SFF init helpers and ata_host_activate() automatically add
descriptions for addresses and irq respectively, so only LLDs which
isn't standard SFF need to add custom descriptions. In many cases,
such controllers need to report different things anyway.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
It was always set to ata_port_disable(). Removed the hook, and replaced
the very few ap->ops->port_disable() callsites with direct calls to
ata_port_disable().Signed-off-by: Jeff Garzik
-
* ->irq_ack() is redundant to what the irq handler already
performs... chk-status + irq-clear. Furthermore, it is only
called in one place, when screaming-irq-debugging is enabled,
so we don't want to bother with a hook just for that.* ata_dummy_irq_on() is only ever used in drivers that have
no callpath reaching ->irq_on(). Remove .irq_on hook from
those drivers, and the now-unused ata_dummy_irq_on()Signed-off-by: Jeff Garzik
-
Introduce ata_link. It abstracts PHY and sits between ata_port and
ata_device. This new level of abstraction is necessary to support
SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
a ATA host port. Fields related to command execution, spd_limit and
EH are per-link and thus moved to ata_link.This patch only defines the host link. Multiple link handling will be
added later. Also, a lot of ap->link derefences are added but many of
them will be removed as each part is converted to deal directly with
ata_link instead of ata_port.This patch introduces no behavior change.
Signed-off-by: Tejun Heo
Cc: James Bottomley
Signed-off-by: Jeff Garzik
31 Aug, 2007
1 commit
-
Bump the versions for drivers that were modified, but had not already
had a version number bump.Signed-off-by: Jeff Garzik
20 Jul, 2007
1 commit
-
Convert ->scr_read/write callbacks to return error code to better
indicate failure. This will help handling of SCR_NOTIFICATION.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
10 Jul, 2007
1 commit
-
The ATA_UDMAx masks are self-documenting, and far better than manually
writing in the hex mask.Note that pata_it8213 mask differed from the comment. Added a FIXME there.
Signed-off-by: Jeff Garzik
22 May, 2007
1 commit
-
Signed-off-by: Jeff Garzik
29 Apr, 2007
1 commit
-
Convert ahci, sata_sil, sata_sil24, sata_svw, sata_qstor, sata_mv,
sata_sx4, sata_vsc and sata_inic162x to new init model.Now that host and ap are available during intialization, functions are
converted to take either host or ap instead of low level parameters
which were inevitable for functions shared between init and other
paths. This simplifies code quite a bit.* init_one()'s now follow more consistent init order
* ahci_setup_port() and ahci_host_init() collapsed into
ahci_init_one() for init order consistency* sata_vsc uses port_info instead of setting fields manually
* in sata_svw, k2_board_info converted to port_info (info is now in
port flags). port number is honored now.Tested on ICH7/8 AHCI, jmb360, sil3112, 3114, 3124 and 3132.
Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
26 Feb, 2007
1 commit
-
Bump versions based on changes submitted during 2.6.21 merge window.
Signed-off-by: Jeff Garzik
25 Feb, 2007
1 commit
-
Separate sata_vsc interrupt handling into a normal (per-port) path and an
error path with the addition of vsc_port_intr and vsc_error_intr
respectively. The error path handles interrupt based
hotplug events which requires the definition of vsc_freeze and vsc_thaw.Note: vsc_port_intr has a workaround for unexpected interrupts that occur
during polled commands. This fixes a regression between 2.6.19 and 2.6.20.Changes in take2:
* removed definition of invalid fis bit
* let standard ata-error-handling handle the serror register
* clear all unhandled interrupts
* revert changes to vsc_intr_mask_update (vsc_thaw enables all interrupts)
* use unlikely() for the pci-abort and not-our-interrupt cases in vsc_sata_interruptChanges in take3:
* Unify the "add" + "hook-up" patches into this single patch[htejun@gmail.com: clean up comments and suggestions]
Cc: Jeremy Higdon
Signed-off-by: Dan Williams
Signed-off-by: Jeff Garzik
16 Feb, 2007
1 commit
-
This modifies drivers/ata/sata_vsc.c to only set the cache line size
to 0x80 if the default value is zero. Apparently zero isn't allowed
due to a bug in the chip, but I've found performance is much better
with the (non-zero) default instead of 0x80.[note1: "default" means BIOS-programmed value, in this context -jgarzik]
[note2: superfluous braces were removed from the patch -jg]
Signed-off-by: Nate Dailey
Signed-off-by: Jeremy Higdon
Signed-off-by: Jeff Garzik
10 Feb, 2007
5 commits
-
This patch is against each libata driver.
Two IRQ calls are added in ata_port_operations.
- irq_on() is used to enable interrupts.
- irq_ack() is used to acknowledge a device interrupt.In most drivers, ata_irq_on() and ata_irq_ack() are used for
irq_on and irq_ack respectively.In some drivers (ex: ahci, sata_sil24) which cannot use them
as is, ata_dummy_irq_on() and ata_dummy_irq_ack() are used.Signed-off-by: Kou Ishizaki
Signed-off-by: Akira Iguchi
Signed-off-by: Jeff Garzik -
Convert libata core layer and LLDs to use iomap.
* managed iomap is used. Pointer to pcim_iomap_table() is cached at
host->iomap and used through out LLDs. This basically replaces
host->mmio_base.* if possible, pcim_iomap_regions() is used
Most iomap operation conversions are taken from Jeff Garzik
's iomap branch.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Update libata LLDs to use devres. Core layer is already converted to
support managed LLDs. This patch simplifies initialization and fixes
many resource related bugs in init failure and detach path. For
example, all converted drivers now handle ata_device_add() failure
gracefully without excessive resource rollback code.As most resources are released automatically on driver detach, many
drivers don't need or can do with much simpler ->{port|host}_stop().
In general, stop callbacks are need iff port or host needs to be given
commands to shut it down. Note that freezing is enough in many cases
and ports are automatically frozen before being detached.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Signed-off-by: Jeff Garzik
-
Signed-off-by: Jeff Garzik