public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Josua Mayer <josua@solid-run.com>
To: Klaus Kudielka <klaus.kudielka@gmail.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>,
	Hans de Goede <hdegoede@redhat.com>
Cc: Jon Nettleton <jon@solid-run.com>,
	Mikhail Anikin <mikhail.anikin@solid-run.com>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	Rabeeh Khoury <rabeeh@solid-run.com>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ata: libahci_platform: support non-consecutive port numbers
Date: Fri, 7 Feb 2025 11:22:33 +0000	[thread overview]
Message-ID: <08981396-59d9-4be6-91c7-83421706931a@solid-run.com> (raw)
In-Reply-To: <016bbf83fec9a0a7c7697462ce0970b94572f50c.camel@gmail.com>


Am 06.02.25 um 19:42 schrieb Klaus Kudielka:
> On Thu, 2025-02-06 at 10:34 +0900, Damien Le Moal wrote:
>> Can you try this to see if it restores the probe for the second port:
>>
>> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
>> index 53b2c7719dc5..91d44302eac9 100644
>> --- a/drivers/ata/libahci_platform.c
>> +++ b/drivers/ata/libahci_platform.c
>> @@ -651,8 +651,6 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
>>                  * If no sub-node was found, keep this for device tree
>>                  * compatibility
>>                  */
>> -               hpriv->mask_port_map |= BIT(0);
>> -
>>                 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
>>                 if (rc)
>>                         goto err_out;
>>
>>
> Yes, it does.
>
> 6.14.0-rc1 (plus patch above) bootlog
> =====================================
>
> Feb 06 19:31:51 spare kernel: ahci-mvebu f10a8000.sata: AHCI vers 0001.0000, 32 command slots, 6 Gbps, platform mode
> Feb 06 19:31:51 spare kernel: ahci-mvebu f10a8000.sata: 2/2 ports implemented (port mask 0x3)
> Feb 06 19:31:51 spare kernel: ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
> Feb 06 19:31:51 spare kernel: scsi host0: ahci-mvebu
> Feb 06 19:31:51 spare kernel: scsi host1: ahci-mvebu
> Feb 06 19:31:51 spare kernel: ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 40 lpm-pol 0
> Feb 06 19:31:51 spare kernel: ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 40 lpm-pol 0

Can you confirm the physical number of sata ports on your board?

Quick review of u-boot sources suggests it is only a single port,
muxed on serdes #0, while the controller has two:

https://source.denx.de/u-boot/u-boot/-/blob/v2025.01/board/CZ.NIC/turris_omnia/turris_omnia.c#L418

> Feb 05 18:36:40 xxxx kernel: ahci-mvebu f10a8000.sata: 1/2 ports implemented (port mask 0x1)
> ...
> Feb 05 18:36:40 xxxx kernel: ata2: DUMMY

This is clearly result of my patch masking only port 1.

I would be curious whether in another board that has two ports physically,
whether both of them were functional before my patch.

See e.g. Helios-4 DTS based on Armada 388 (similar Turris Omnia)
explicitly specifies two ports below the sata node:

            sata@a8000 {
                status = "okay";
                #address-cells = <1>;
                #size-cells = <0>;

                sata0: sata-port@0 {
                    reg = <0>;
                };

                sata1: sata-port@1 {
                    reg = <1>;
                };
            };

I propose that perhaps for the second port explicit node was required.


  reply	other threads:[~2025-02-07 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-01 12:13 [PATCH v2] ata: libahci_platform: support non-consecutive port numbers Josua Mayer
2025-01-01 13:17 ` Hans de Goede
2025-01-06  5:27 ` Damien Le Moal
2025-02-05 18:03 ` Klaus Kudielka
2025-02-06  1:34   ` Damien Le Moal
2025-02-06 18:42     ` Klaus Kudielka
2025-02-07 11:22       ` Josua Mayer [this message]
2025-02-07 19:45         ` Klaus Kudielka
2025-02-08 13:39           ` Josua Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08981396-59d9-4be6-91c7-83421706931a@solid-run.com \
    --to=josua@solid-run.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=jon@solid-run.com \
    --cc=klaus.kudielka@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikhail.anikin@solid-run.com \
    --cc=rabeeh@solid-run.com \
    --cc=yazan.shhady@solid-run.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox