]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ata/libata-pmp.c
Apply Support PMP Disable Link Scanning Through Kernel Config patch
[mv-sheeva.git] / drivers / ata / libata-pmp.c
index 3120596d4afc9aaba293f100f7a075ace6438f9e..a001ab8425f6450f15c976f9b91cd821c31c3273 100644 (file)
 #include "libata.h"
 #include "libata-transport.h"
 
+/**
+* Set to 1 to allow enumeration of devices behind PMP links
+*/
+unsigned int sata_pmp_allow_link_enumeration_flag = 0;
+
 const struct ata_port_operations sata_pmp_port_ops = {
        .inherits               = &sata_port_ops,
        .pmp_prereset           = ata_std_prereset,
@@ -955,6 +960,11 @@ static int sata_pmp_eh_recover(struct ata_port *ap)
        if (rc)
                goto pmp_fail;
 
+       if( sata_pmp_is_link_enumeration_allowed() == 0 ) {
+               ata_port_printk(ap, KERN_WARNING, "skipping pmp link enumeration based on kernel configuration");
+               return 0;
+       }
+
        /* PHY event notification can disturb reset and other recovery
         * operations.  Turn it off.
         */
@@ -1098,6 +1108,7 @@ void sata_pmp_error_handler(struct ata_port *ap)
        ata_eh_finish(ap);
 }
 
+EXPORT_SYMBOL_GPL(sata_pmp_allow_link_enumeration_flag);
 EXPORT_SYMBOL_GPL(sata_pmp_port_ops);
 EXPORT_SYMBOL_GPL(sata_pmp_qc_defer_cmd_switch);
 EXPORT_SYMBOL_GPL(sata_pmp_error_handler);