kernel-fxtec-pro1x/drivers/ata
Robert Richter ee2aad42e4 ahci: Add generic MSI-X support for single interrupts to SATA PCI driver
This patch adds generic MSI-X support for single interrupts to the
SATA PCI driver. MSI-X support is needed for host controller that only
have MSI-X support implemented, but no MSI or intx. This patch only
adds support for single interrupts, multiple per-port MSI-X interrupts
are not yet implemented.

The new implementation still initializes MSIs first. Only if that
fails, the code tries to enable MSI-X. If that fails too, setup is
continued with intx interrupts.

To not break other chips by this generic code change, there are the
following precautions:

 * Interrupt ranges are not enabled at all.

 * Only single interrupt mode is enabled for msix cap devices. Thus,
   only one interrupt will be setup.

 * During the discussion with Tejun we agreed to change the init
   sequence from msix-msi-intx to msi-msix-intx. Thus, if a device
   offers msi and init does not fail, the msix init code will not be
   executed. This is equivalent to current code.

With this, the code only setups single mode msix as a last resort if
msi fails. No interrupt range is enabled at all. Only one interrupt
will be enabled.

tj: comment edits.

Changes of the patch series:

v5:
 * updated patch subject that the patch only implements single IRQ
 * moved Cavium specific code to a separate patch
 * detect Cavium ThunderX device with PCI_CLASS_STORAGE_SATA_AHCI
   instead of vendor/dev id
 * added more comments to the code
 * enable single msix support for all kind of devices (removing strict
   check)
 * rebased onto update libata/for-4.2 with patch 1, 2 applied

v4:
 * removed implementation of ahci_init_intx()
 * improved patch descriptions
 * rebased onto libata/for-4.2

v3:
 * store irq number in struct ahci_host_priv
 * change initialization order from msix-msi-intx to msi-msix-intx
 * improve comments in ahci_init_msix()
 * improve error message in ahci_init_msix()
 * do not enable MSI-X if MSI is actively disabled for the device

v2:
 * determine irq vector from pci_dev->msi_list

Based on a patch from Sunil Goutham <sgoutham@cavium.com>.

Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2015-06-16 16:12:13 -04:00
..
acard-ahci.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
ahci.c ahci: Add generic MSI-X support for single interrupts to SATA PCI driver 2015-06-16 16:12:13 -04:00
ahci.h ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
ahci_brcmstb.c ata: add Broadcom AHCI SATA3 driver for STB chips 2015-05-24 20:11:25 -04:00
ahci_ceva.c drivers: ata: add support for Ceva sata host controller 2015-06-10 11:15:17 +09:00
ahci_da850.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_imx.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_mvebu.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_platform.c ahci: added support for Freescale AHCI sata 2015-06-09 14:02:15 +09:00
ahci_st.c ata: ahci_st: fixup layering violations / drvdata errors 2015-04-20 13:36:38 -04:00
ahci_sunxi.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_tegra.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_xgene.c ata: ahci_xgene: potential NULL dereference in probe 2015-05-18 16:43:23 -04:00
ata_generic.c
ata_piix.c
Kconfig drivers: ata: add support for Ceva sata host controller 2015-06-10 11:15:17 +09:00
libahci.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
libahci_platform.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
libata-acpi.c
libata-core.c libata: finally use __initconst in ata_parse_force_one() 2015-06-10 13:45:27 +09:00
libata-eh.c libata: Fix regression when the NCQ Send and Receive log page is absent 2015-05-21 17:52:55 -04:00
libata-pmp.c
libata-scsi.c libata-eh: Set 'information' field for autosense 2015-03-27 11:59:22 -04:00
libata-sff.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
libata-trace.c libata: Add tracepoints 2015-03-27 11:59:22 -04:00
libata-transport.c libata: Expose TRIM capability in sysfs 2015-05-05 09:30:18 -04:00
libata-transport.h
libata-zpodd.c
libata.h libata-eh: Set 'information' field for autosense 2015-03-27 11:59:22 -04:00
Makefile drivers: ata: add support for Ceva sata host controller 2015-06-10 11:15:17 +09:00
pata_acpi.c
pata_ali.c
pata_amd.c
pata_arasan_cf.c
pata_artop.c
pata_at32.c
pata_at91.c
pata_atiixp.c
pata_atp867x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_bf54x.c
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_cs5530.c ata: Delete unnecessary checks before the function call "pci_dev_put" 2015-02-03 07:04:44 -05:00
pata_cs5535.c
pata_cs5536.c
pata_cypress.c
pata_efar.c
pata_ep93xx.c
pata_hpt3x2n.c
pata_hpt3x3.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_hpt37x.c
pata_hpt366.c ata: hpt366: fix constant cast warning 2015-05-21 17:37:51 -04:00
pata_icside.c
pata_imx.c
pata_isapnp.c
pata_it821x.c
pata_it8213.c
pata_ixp4xx_cf.c
pata_jmicron.c
pata_legacy.c
pata_macio.c
pata_marvell.c
pata_mpc52xx.c
pata_mpiix.c
pata_netcell.c
pata_ninja32.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_ns87410.c
pata_ns87415.c
pata_octeon_cf.c
pata_of_platform.c ata: pata_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_palmld.c
pata_pcmcia.c
pata_pdc202xx_old.c
pata_pdc2027x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_piccolo.c
pata_platform.c ata: pata_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
pata_pxa.c
pata_radisys.c
pata_rb532_cf.c
pata_rdc.c
pata_rz1000.c
pata_samsung_cf.c libata: samsung_cf: Constify platform_device_id 2015-05-02 22:04:43 -04:00
pata_sc1200.c
pata_sch.c
pata_serverworks.c
pata_sil680.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_sis.c
pata_sl82c105.c
pata_triflex.c
pata_via.c
pdc_adma.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_dwc_460ex.c sata_dwc_460ex: indent an if statement 2015-03-30 13:14:40 -04:00
sata_fsl.c sata-fsl: Apply link speed limits 2015-03-02 12:08:43 -05:00
sata_highbank.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
sata_inic162x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_mv.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_nv.c ata:sata_nv - Change 1 to true for bool type variable. 2015-05-25 20:06:55 -04:00
sata_promise.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_promise.h
sata_qstor.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_rcar.c sata_rcar: extend PM methods 2015-01-19 09:04:37 -05:00
sata_sil.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_sil24.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_sis.c
sata_svw.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_sx4.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_uli.c
sata_via.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_vsc.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sis.h