linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the libata tree with the pci tree
@ 2014-01-09  1:45 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2014-01-09  1:45 UTC (permalink / raw)
  To: Tejun Heo, Bjorn Helgaas
  Cc: linux-next, linux-kernel, Alexander Gordeev, Rashika Kheria

[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]

Hi Tejun,

Today's linux-next merge of the libata tree got a conflict in
drivers/ata/ahci.c between commit 7b92b4f61ec4 ("PCI/MSI: Remove
pci_enable_msi_block_auto()") from the pci tree and commit d93414513966
("drivers: ata: Mark the function ahci_init_interrupts() as static in
ahci.c") from the libata tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/ata/ahci.c
index 3cf6dad71e11,74911c2cb1dd..000000000000
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@@ -1097,40 -1148,26 +1148,40 @@@ static inline void ahci_gtf_filter_work
  {}
  #endif
  
- int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
 -static int ahci_init_interrupts(struct pci_dev *pdev, struct ahci_host_priv *hpriv)
++static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
 +			 struct ahci_host_priv *hpriv)
  {
 -	int rc;
 -	unsigned int maxvec;
 +	int rc, nvec;
  
 -	if (!(hpriv->flags & AHCI_HFLAG_NO_MSI)) {
 -		rc = pci_enable_msi_block_auto(pdev, &maxvec);
 -		if (rc > 0) {
 -			if ((rc == maxvec) || (rc == 1))
 -				return rc;
 -			/*
 -			 * Assume that advantage of multipe MSIs is negated,
 -			 * so fallback to single MSI mode to save resources
 -			 */
 -			pci_disable_msi(pdev);
 -			if (!pci_enable_msi(pdev))
 -				return 1;
 -		}
 -	}
 +	if (hpriv->flags & AHCI_HFLAG_NO_MSI)
 +		goto intx;
 +
 +	rc = pci_msi_vec_count(pdev);
 +	if (rc < 0)
 +		goto intx;
 +
 +	/*
 +	 * If number of MSIs is less than number of ports then Sharing Last
 +	 * Message mode could be enforced. In this case assume that advantage
 +	 * of multipe MSIs is negated and use single MSI mode instead.
 +	 */
 +	if (rc < n_ports)
 +		goto single_msi;
 +
 +	nvec = rc;
 +	rc = pci_enable_msi_block(pdev, nvec);
 +	if (rc)
 +		goto intx;
  
 +	return nvec;
 +
 +single_msi:
 +	rc = pci_enable_msi(pdev);
 +	if (rc)
 +		goto intx;
 +	return 1;
 +
 +intx:
  	pci_intx(pdev, 1);
  	return 0;
  }

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-09  1:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-09  1:45 linux-next: manual merge of the libata tree with the pci tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).