]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'libata/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 00:48:13 +0000 (11:48 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 00:48:13 +0000 (11:48 +1100)
Conflicts:
arch/arm/boot/dts/armada-370-xp.dtsi
drivers/ata/ahci.c

1  2 
arch/arm/boot/dts/armada-370-xp.dtsi
drivers/ata/ahci.c

index b6b253924893fffb88b21e7271653d5eb690d56e,df141a1d64482410780fd75675391402123f13ca..74b5964430ac3a7d833d8fce12eb655746acba4b
                                status = "disabled";
                        };
  
 -                      i2c0: i2c@11000 {
 -                              compatible = "marvell,mv64xxx-i2c";
 -                              #address-cells = <1>;
 -                              #size-cells = <0>;
 -                              interrupts = <31>;
 -                              timeout-ms = <1000>;
 -                              clocks = <&coreclk 0>;
 +                      sata@a0000 {
-                               compatible = "marvell,orion-sata";
++                              compatible = "marvell,armada-370-sata";
 +                              reg = <0xa0000 0x5000>;
 +                              interrupts = <55>;
 +                              clocks = <&gateclk 15>, <&gateclk 30>;
 +                              clock-names = "0", "1";
                                status = "disabled";
                        };
  
index 0ef5ac6103520af5151da1b879d2ae470333f9d7,74911c2cb1dd67ec307fa4d77d6b75d88c4d1f8e..dc2756fb6f3369b95cdb015fb8b32f97ff64d887
@@@ -1100,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;
  }