[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ide
Subject:    Re[2]: [PATCH v2] ata: ahci: Add mask_port_map module parameter
From:       "Conrad Kostecki" <conikost () gentoo ! org>
Date:       2024-04-16 23:29:56
Message-ID: em8c57d6d1-0213-4adc-be97-e0d601675951 () ed1b2594 ! com
[Download RAW message or body]

Hello Damien,

Am 17.04.2024 01:13:08, "Damien Le Moal" <dlemoal@kernel.org> schrieb:

>OK. So despite what I thought, it seems that the mask should be applied to
>saved_port_map to modified that value permanently instead of using the mask to
>set ->port_map. I do not really understand why that would be needed. It seems
>that saved_port_map is being reused without the mask applied somewhere, which
>should not happen. I need to dig further into this.
>
>In the meantime, can you try to add this patch:
>
>diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
>index 83431aae74d8..830a59f68620 100644
>--- a/drivers/ata/libahci.c
>+++ b/drivers/ata/libahci.c
>@@ -546,6 +546,7 @@ void ahci_save_initial_config(struct device *dev, struct
>ahci_host_priv *hpriv)
>                         port_map,
>                         port_map & hpriv->mask_port_map);
>                 port_map &= hpriv->mask_port_map;
>+               hpriv->saved_port_map = port_map;
>         }
>
>         /* cross check port_map and cap.n_ports */
>
>And test again ?

I can confirm, this works for me. The non physical ports are now marked 
again as DUMMY and booting is fast.

Cheers
Conrad

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic