~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/pci/pcie/aspm.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
608
608
         * the BIOS's expectation, we'll do so once pci_enable_device() is
609
609
         * called.
610
610
         */
611
 
        if (aspm_policy != POLICY_POWERSAVE) {
 
611
        if (aspm_policy != POLICY_POWERSAVE || aspm_clear_state) {
612
612
                pcie_config_aspm_path(link);
613
613
                pcie_set_clkpm(link, policy_to_clkpm_state(link));
614
614
        }
734
734
 * pci_disable_link_state - disable pci device's link state, so the link will
735
735
 * never enter specific states
736
736
 */
737
 
void pci_disable_link_state(struct pci_dev *pdev, int state)
 
737
static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)
738
738
{
739
739
        struct pci_dev *parent = pdev->bus->self;
740
740
        struct pcie_link_state *link;
747
747
        if (!parent || !parent->link_state)
748
748
                return;
749
749
 
750
 
        down_read(&pci_bus_sem);
 
750
        if (sem)
 
751
                down_read(&pci_bus_sem);
751
752
        mutex_lock(&aspm_lock);
752
753
        link = parent->link_state;
753
754
        if (state & PCIE_LINK_STATE_L0S)
761
762
                pcie_set_clkpm(link, 0);
762
763
        }
763
764
        mutex_unlock(&aspm_lock);
764
 
        up_read(&pci_bus_sem);
 
765
        if (sem)
 
766
                up_read(&pci_bus_sem);
 
767
}
 
768
 
 
769
void pci_disable_link_state_locked(struct pci_dev *pdev, int state)
 
770
{
 
771
        __pci_disable_link_state(pdev, state, false);
 
772
}
 
773
EXPORT_SYMBOL(pci_disable_link_state_locked);
 
774
 
 
775
void pci_disable_link_state(struct pci_dev *pdev, int state)
 
776
{
 
777
        __pci_disable_link_state(pdev, state, true);
765
778
}
766
779
EXPORT_SYMBOL(pci_disable_link_state);
767
780