]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/libahci.c
Merge tag 'topic/core-stuff-2014-06-30' of git://anongit.freedesktop.org/drm-intel...
[karo-tx-linux.git] / drivers / ata / libahci.c
index 6bd4f660b4e15966ca2c351b4501c0521491de32..40ea583d3610067165d3ab1ea2b4d38b8c210a4c 100644 (file)
@@ -452,11 +452,23 @@ void ahci_save_initial_config(struct device *dev,
                cap &= ~HOST_CAP_SNTF;
        }
 
+       if ((cap2 & HOST_CAP2_SDS) && (hpriv->flags & AHCI_HFLAG_NO_DEVSLP)) {
+               dev_info(dev,
+                        "controller can't do DEVSLP, turning off\n");
+               cap2 &= ~HOST_CAP2_SDS;
+               cap2 &= ~HOST_CAP2_SADM;
+       }
+
        if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) {
                dev_info(dev, "controller can do FBS, turning on CAP_FBS\n");
                cap |= HOST_CAP_FBS;
        }
 
+       if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) {
+               dev_info(dev, "controller can't do FBS, turning off CAP_FBS\n");
+               cap &= ~HOST_CAP_FBS;
+       }
+
        if (force_port_map && port_map != force_port_map) {
                dev_info(dev, "forcing port_map 0x%x -> 0x%x\n",
                         port_map, force_port_map);