From: Damien Le Moal <dlemoal@kernel.org>
To: Conrad Kostecki <conikost@gentoo.org>,
linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Cc: Szuying Chen <chensiying21@gmail.com>,
Jesse1_Chang@asmedia.com.tw, Richard_Hsu@asmedia.com.tw,
Chloe_Chen@asmedia.com.tw
Subject: Re: [PATCH v2] ata: ahci: Add mask_port_map module parameter
Date: Mon, 8 Apr 2024 11:26:06 +0900 [thread overview]
Message-ID: <33e81fd6-2d0d-4d23-9cab-fed775917bc0@kernel.org> (raw)
In-Reply-To: <em6045942b-7739-40b7-8c9d-ad047918cdb8@a351f4b0.com>
On 4/6/24 07:53, Conrad Kostecki wrote:
> Hi Damien,
>
> Am 05.04.2024 14:51:43, "Damien Le Moal" <dlemoal@kernel.org> schrieb:
>
>> <PATCH v2>
> i did run a test on my hardware.
> It seems to work and adjusting the port_map. But I noticed a difference, that
> those virtual hostXY ports are not marked as DUMMY.
> With the previous patch, only six ports reported "ahci" and rest "DUMMY".
> I am not sure, if that should also not happen with your patch?
> Conrad
> [ 13.365573] ahci 0000:09:00.0: masking port_map 0xffffff3f -> 0x3f
> [ 13.376511] ahci 0000:09:00.0: SSS flag set, parallel bus scan disabled
> [ 13.395670] ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0x3f
> impl SATA mode
> [ 13.397111] ahci 0000:09:00.0: flags: 64bit ncq sntf stag pm led only pio
> sxs deso sadm sds apst
> [ 13.593757] scsi host9: ahci
> [ 13.597362] scsi host10: ahci
> [ 13.600949] scsi host11: ahci
> [ 13.604548] scsi host12: ahci
> [ 13.612459] scsi host13: ahci
> [ 13.616027] scsi host14: ahci
> [ 13.616437] scsi host15: ahci
> [ 13.616745] scsi host16: ahci
> [ 13.617039] scsi host17: ahci
> [ 13.617415] scsi host18: ahci
> [ 13.617723] scsi host19: ahci
> [ 13.637158] scsi host20: ahci
> [ 13.640666] scsi host21: ahci
> [ 13.651760] scsi host22: ahci
> [ 13.652311] scsi host23: ahci
> [ 13.652850] scsi host24: ahci
> [ 13.656374] scsi host25: ahci
> [ 13.664120] scsi host26: ahci
> [ 13.664570] scsi host27: ahci
> [ 13.686567] scsi host28: ahci
> [ 13.690179] scsi host29: ahci
> [ 13.697603] scsi host30: ahci
> [ 13.698083] scsi host31: ahci
> [ 13.698518] scsi host32: ahci
> [ 13.701855] scsi host33: ahci
> [ 13.702323] scsi host34: ahci
> [ 13.702745] scsi host35: ahci
> [ 13.721520] scsi host36: ahci
> [ 13.725157] scsi host37: ahci
> [ 13.736948] scsi host38: ahci
> [ 13.737383] scsi host39: ahci
> [ 13.748518] scsi host40: ahci
These messages are normal. ata port stucture which leads to a scsi host are
still created for dummy ports. So seeing all ports here as scsi hosts is
normal. However, after these messages, you should see a "ataX: DUMMY" message.
Example with a qemu VM with a 6-ports AHCI controller:
Using the ahci driver without any port map mask, I get:
[ 318.739513] ahci 0000:00:1f.2: AHCI vers 0001.0000, 32 command slots, 1.5
Gbps, SATA mode
[ 318.741283] ahci 0000:00:1f.2: 6/6 ports implemented (port mask 0x3f)
[ 318.742619] ahci 0000:00:1f.2: flags: 64bit ncq only
[ 318.759156] scsi host0: ahci
[ 318.764098] scsi host1: ahci
[ 318.788722] scsi host2: ahci
[ 318.793502] scsi host3: ahci
[ 318.797792] scsi host4: ahci
[ 318.801843] scsi host5: ahci
[ 318.804550] ata13: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16100
irq 40 lpm-pol 3
[ 318.805753] ata14: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16180
irq 40 lpm-pol 3
[ 318.807045] ata15: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16200
irq 40 lpm-pol 3
[ 318.808322] ata16: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16280
irq 40 lpm-pol 3
[ 318.809595] ata17: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16300
irq 40 lpm-pol 3
[ 318.810829] ata18: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16380
irq 40 lpm-pol 3
...
On the same VM, if I rmmod ahci and modprobe it with mask_port_map=0x1
(enabling only the first port), I get:
[ 362.257874] ahci 0000:00:1f.2: masking port_map 0x3f -> 0x1
[ 362.260518] ahci 0000:00:1f.2: AHCI vers 0001.0000, 32 command slots, 1.5
Gbps, SATA mode
[ 362.262477] ahci 0000:00:1f.2: 1/6 ports implemented (port mask 0x1)
[ 362.263917] ahci 0000:00:1f.2: flags: 64bit ncq only
[ 362.281765] scsi host0: ahci
[ 362.286353] scsi host1: ahci
[ 362.290785] scsi host2: ahci
[ 362.301082] scsi host3: ahci
[ 362.324192] scsi host4: ahci
[ 362.329560] scsi host5: ahci
[ 362.332692] ata19: SATA max UDMA/133 abar m4096@0xfea16000 port 0xfea16100
irq 40 lpm-pol 3
[ 362.335041] ata20: DUMMY
[ 362.335872] ata21: DUMMY
[ 362.336828] ata22: DUMMY
[ 362.337856] ata23: DUMMY
[ 362.338660] ata24: DUMMY
So the last 5 ports are now dummies...
Can you confirm that you see this please ? Also, please confirm that boot time
is OK and faster with the port map mask.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-04-08 2:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 12:51 [PATCH v2] ata: ahci: Add mask_port_map module parameter Damien Le Moal
2024-04-05 13:10 ` Niklas Cassel
2024-04-05 13:14 ` Niklas Cassel
2024-04-05 22:53 ` Conrad Kostecki
2024-04-08 0:47 ` Damien Le Moal
2024-04-08 2:26 ` Damien Le Moal [this message]
2024-04-14 13:14 ` Re[2]: " Conrad Kostecki
2024-04-16 23:13 ` Damien Le Moal
2024-04-16 23:29 ` Re[2]: " Conrad Kostecki
2024-04-17 17:21 ` Niklas Cassel
2024-05-05 19:42 ` Re[2]: " Conrad Kostecki
2024-05-06 16:46 ` Niklas Cassel
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=33e81fd6-2d0d-4d23-9cab-fed775917bc0@kernel.org \
--to=dlemoal@kernel.org \
--cc=Chloe_Chen@asmedia.com.tw \
--cc=Jesse1_Chang@asmedia.com.tw \
--cc=Richard_Hsu@asmedia.com.tw \
--cc=cassel@kernel.org \
--cc=chensiying21@gmail.com \
--cc=conikost@gentoo.org \
--cc=linux-ide@vger.kernel.org \
/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