kernel-fxtec-pro1x/drivers/ata
Tejun Heo b1c72916ab libata: implement slave_link
Explanation taken from the comment of ata_slave_link_init().

 In libata, a port contains links and a link contains devices.  There
 is single host link but if a PMP is attached to it, there can be
 multiple fan-out links.  On SATA, there's usually a single device
 connected to a link but PATA and SATA controllers emulating TF based
 interface can have two - master and slave.

 However, there are a few controllers which don't fit into this
 abstraction too well - SATA controllers which emulate TF interface
 with both master and slave devices but also have separate SCR
 register sets for each device.  These controllers need separate links
 for physical link handling (e.g. onlineness, link speed) but should
 be treated like a traditional M/S controller for everything else
 (e.g. command issue, softreset).

 slave_link is libata's way of handling this class of controllers
 without impacting core layer too much.  For anything other than
 physical link handling, the default host link is used for both master
 and slave.  For physical link handling, separate @ap->slave_link is
 used.  All dirty details are implemented inside libata core layer.
 From LLD's POV, the only difference is that prereset, hardreset and
 postreset are called once more for the slave link, so the reset
 sequence looks like the following.

 prereset(M) -> prereset(S) -> hardreset(M) -> hardreset(S) ->
 softreset(M) -> postreset(M) -> postreset(S)

 Note that softreset is called only for the master.  Softreset resets
 both M/S by definition, so SRST on master should handle both (the
 standard method will work just fine).

As slave_link excludes PMP support and only code paths which deal with
the attributes of physical link are affected, all the changes are
localized to libata.h, libata-core.c and libata-eh.c.

 * ata_is_host_link() updated so that slave_link is considered as host
   link too.

 * iterator extended to iterate over the slave_link when using the
   underbarred version.

 * force param handling updated such that devno 16 is mapped to the
   slave link/device.

 * ata_link_on/offline() updated to return the combined result from
   master and slave link.  ata_phys_link_on/offline() are the direct
   versions.

 * EH autopsy and report are performed separately for master slave
   links.  Reset is udpated to implement the above described reset
   sequence.

Except for reset update, most changes are minor, many of them just
modifying dev->link to ata_dev_phys_link(dev) or using phys online
test instead.

After this update, LLDs can take full advantage of per-dev SCR
registers by simply turning on slave link.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-29 00:25:28 -04:00
..
ahci.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
ata_generic.c pata_atiixp: Don't disable 2008-05-06 11:43:44 -04:00
ata_piix.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
Kconfig ahci, pata_marvell: play nicely together 2008-09-08 12:11:36 -04:00
libata-acpi.c libata-acpi: don't call sleeping function from invalid context 2008-07-11 09:42:03 -04:00
libata-core.c libata: implement slave_link 2008-09-29 00:25:28 -04:00
libata-eh.c libata: implement slave_link 2008-09-29 00:25:28 -04:00
libata-pmp.c libata: improve EH retry delay handling 2008-07-14 15:59:32 -04:00
libata-scsi.c libata: update atapi disable handling 2008-07-31 01:47:05 -04:00
libata-sff.c libata-sff: kill spurious WARN_ON() in ata_hsm_move() 2008-09-08 12:15:38 -04:00
libata.h libata: implement slave_link 2008-09-29 00:25:28 -04:00
Makefile libata: Add Intel SCH PATA driver 2008-05-06 11:33:58 -04:00
pata_acpi.c libata: Fix a large collection of DMA mode mismatches 2008-08-22 02:27:49 -04:00
pata_ali.c pata_ali: misplaced pci_dev_put() 2008-07-31 01:38:19 -04:00
pata_amd.c ata: remove FIT() macro 2008-05-19 17:30:32 -04:00
pata_artop.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_at32.c avr32: Use <mach/foo.h> instead of <asm/arch/foo.h> 2008-08-05 14:36:57 +02:00
pata_atiixp.c libata: Fix a large collection of DMA mode mismatches 2008-08-22 02:27:49 -04:00
pata_bf54x.c libata: consistently use msecs for time durations 2008-07-14 15:59:32 -04:00
pata_cmd64x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cmd640.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_cs5520.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cs5530.c libata: Fix a large collection of DMA mode mismatches 2008-08-22 02:27:49 -04:00
pata_cs5535.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cs5536.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cypress.c ata: remove FIT() macro 2008-05-19 17:30:32 -04:00
pata_efar.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt3x2n.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt3x3.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt37x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt366.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_icside.c libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl 2008-06-04 06:40:41 -04:00
pata_isapnp.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_it821x.c [libata] pata_it821x: fix warning 2008-08-22 02:33:23 -04:00
pata_it8213.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ixp4xx_cf.c [ARM] 5179/1: Replace obsolete IRQT_* and __IRQT_* values with IRQ_TYPE_* 2008-07-27 09:46:18 +01:00
pata_jmicron.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_legacy.c ata: endianness annotations in pata drivers 2008-07-14 15:59:33 -04:00
pata_marvell.c ahci, pata_marvell: play nicely together 2008-09-08 12:11:36 -04:00
pata_mpc52xx.c powerpc/pata_mpc52xx: use linux/of_platform.h instead of asm 2008-07-12 12:10:52 -06:00
pata_mpiix.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_netcell.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ninja32.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_ns87410.c ata: remove FIT() macro 2008-05-19 17:30:32 -04:00
pata_ns87415.c ata: remove FIT() macro 2008-05-19 17:30:32 -04:00
pata_of_platform.c Rename: linux/pata_platform.h to linux/ata_platform.h 2008-02-06 06:54:17 -05:00
pata_oldpiix.c libata: Fix a large collection of DMA mode mismatches 2008-08-22 02:27:49 -04:00
pata_opti.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_optidma.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_pcmcia.c pcmcia: add another pata/ide ID 2008-06-20 20:53:34 +02:00
pata_pdc202xx_old.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_pdc2027x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_platform.c ATA/IDE: fix platform driver hotplug/coldplug 2008-04-25 00:45:04 -04:00
pata_qdi.c ata: endianness annotations in pata drivers 2008-07-14 15:59:33 -04:00
pata_radisys.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_rb532_cf.c libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl 2008-06-04 06:40:41 -04:00
pata_rz1000.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sc1200.c libata: Fix a large collection of DMA mode mismatches 2008-08-22 02:27:49 -04:00
pata_scc.c libata: consistently use msecs for time durations 2008-07-14 15:59:32 -04:00
pata_sch.c libata: Add Intel SCH PATA driver 2008-05-06 11:33:58 -04:00
pata_serverworks.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sil680.c pata_sil680: remove duplicate pcim_enable_device 2008-09-08 12:15:41 -04:00
pata_sis.c Added Targa Visionary 1000 IDE adapter to pata_sis.c 2008-07-11 09:38:24 -04:00
pata_sl82c105.c drivers/ata: trim trailing whitespace 2008-05-19 17:56:10 -04:00
pata_triflex.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_via.c pata_via: clean up recent tf_load changes 2008-08-22 02:19:54 -04:00
pata_winbond.c ata: endianness annotations in pata drivers 2008-07-14 15:59:33 -04:00
pdc_adma.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
sata_fsl.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_inic162x.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_mv.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_nv.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_promise.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_promise.h libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_qstor.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_sil.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_sil24.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_sis.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_svw.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_sx4.c libata: add qc_fill_rtf port operation 2008-04-17 15:44:23 -04:00
sata_uli.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_via.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sata_vsc.c libata: make SCR access ops per-link 2008-09-29 00:22:28 -04:00
sis.h