ata: libahci: use ahci_nr_ports() if port_map > ahci_nr_ports()
PATCH 1/1 ata: libahci: use ahci_nr_ports() if port_map > ahci_nr_ports()
While we report use of nr_port value, we set port_map to zero which later leads to marking all the ports reported by ahci_nr_ports() as DUMMY.
Signed-off-by Lukas Herbolt <[email protected]>
--- drivers/ata/libahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/libahci.c +2 -1
@@ -522,7 +522,8 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)dev_warn (dev,"implemented port map (0x%x) contains more ports than nr_ports (%u), using nr_ports\n" , port_map,ahci_nr_ports (cap)); - port_map =0 ; + port_map = (1 <<ahci_nr_ports (cap)) -1 ; + hpriv->saved_port_map = port_map; } }
Signature · 1 line
2.26.2