diff options
author | Dan Williams <dan.j.williamps@intel.com> | 2015-11-12 01:27:33 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-11-16 17:29:10 +0100 |
commit | d684a90d38e24dcaf95fdb32c83efe05f80d152a (patch) | |
tree | 855bb8396232c9b682394125c46ada2671452bca /drivers/ata/ahci.h | |
parent | ahci: Order SATA device IDs for codename Lewisburg (diff) | |
download | linux-d684a90d38e24dcaf95fdb32c83efe05f80d152a.tar.xz linux-d684a90d38e24dcaf95fdb32c83efe05f80d152a.zip |
ahci: per-port msix support
Some AHCI controllers support per-port MSI-X vectors. At the same time
the Linux AHCI driver needs to support one-off architectures that
implement a single MSI-X vector for all ports. The heuristic for
enabling AHCI ports becomes, in order of preference:
1/ per-port multi-MSI-X
2/ per-port multi-MSI
3/ single MSI
4/ single MSI-X
5/ legacy INTX
This all depends on AHCI implementations with potentially broken MSI-X
requesting less vectors than the number of ports. If this assumption is
violated we will need to start explicitly white-listing AHCI-MSIX
implementations.
Reported-by: Ricardo Neri <ricardo.neri@intel.com>
[ricardo: fix struct msix_entry handling]
Reported-by: kernel test robot <ying.huang@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.h')
-rw-r--r-- | drivers/ata/ahci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 45586c1dbbdc..9e60c50b2103 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -242,6 +242,7 @@ enum { AHCI_HFLAG_NO_FBS = (1 << 18), /* no FBS */ AHCI_HFLAG_EDGE_IRQ = (1 << 19), /* HOST_IRQ_STAT behaves as Edge Triggered */ + AHCI_HFLAG_MULTI_MSIX = (1 << 20), /* per-port MSI-X */ /* ap->flags bits */ @@ -343,6 +344,7 @@ struct ahci_host_priv { * the PHY position in this array. */ struct phy **phys; + struct msix_entry *msix; /* Optional MSI-X support */ unsigned nports; /* Number of ports */ void *plat_data; /* Other platform data */ unsigned int irq; /* interrupt line */ |