Hello Niklas,
please forgive me, I wasn't able to answer earlier. I have to roll back
here :-)
I don't know, what I exactly did wrong, but I did now tested again PATCH
v2 and can confirm, it just works as it should.
Tested on 6.8.9 and also 6.9-rc6 (with has PATCH v2 applied).
My ports are being correct masked and DUMMY is being correctly shown.
So all fine and I am happy with the patch as it is now.
Sorry for the noise, I am really not sure, what I did wrong during first
testing.
Conrad
Am 17.04.2024 19:21:21, "Niklas Cassel" <cassel@xxxxxxxxxx> schrieb:
Hello Conrad,
On Fri, Apr 05, 2024 at 10:53:55PM +0000, Conrad Kostecki wrote:
Hi Damien,
Am 05.04.2024 14:51:43, "Damien Le Moal" <dlemoal@xxxxxxxxxx> 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
This print above suggests that you are testing on a v6.8 based kernel.
(The print has been improved in v6.9)
I do not understand why things are not working for you.
Could you please test with v6.9-rc4 + the attached debug patch.
Please make sure that you don't have any other changes on top of v6.9-rc4
other than the debug patch. (mask_port_map is already included in v6.9-rc4.)
Here is a how v6.9-rc4 + the attached debug patch looks for me with
ahci.mask_port_map=0000:00:03.0=0xf
added to the kernel command line.
(If you use a /etc/modprobe.d/ahci.conf file instead, I assume that should
look something like:
options ahci mask_port_map=0000:00:03.0=0xf
)
[ 0.538102] ahci 0000:00:03.0: masking port_map 0x3f -> 0xf
[ 0.539063] ahci 0000:00:03.0: port 1/6 is implemented (port_map 0xf)
[ 0.539933] ahci 0000:00:03.0: port 2/6 is implemented (port_map 0xf)
[ 0.540750] ahci 0000:00:03.0: port 3/6 is implemented (port_map 0xf)
[ 0.541663] ahci 0000:00:03.0: port 4/6 is implemented (port_map 0xf)
[ 0.542990] ahci 0000:00:03.0: port 5/6 not implemented, mark as dummy (port_map 0xf)
[ 0.544121] ahci 0000:00:03.0: port 6/6 not implemented, mark as dummy (port_map 0xf)
[ 0.545766] ahci 0000:00:03.0: port 1/6 is implemented, calling init (port_map 0xf)
[ 0.546718] ahci 0000:00:03.0: port 2/6 is implemented, calling init (port_map 0xf)
[ 0.547642] ahci 0000:00:03.0: port 3/6 is implemented, calling init (port_map 0xf)
[ 0.548399] ahci 0000:00:03.0: port 4/6 is implemented, calling init (port_map 0xf)
[ 0.549418] ahci 0000:00:03.0: port 5/6 is not implemented, skipping init (port_map 0xf)
[ 0.550650] ahci 0000:00:03.0: port 6/6 is not implemented, skipping init (port_map 0xf)
[ 0.551306] ahci 0000:00:03.0: AHCI vers 0001.0000, 32 command slots, 1.5 Gbps, SATA mode
[ 0.551947] ahci 0000:00:03.0: 4/6 ports implemented (port mask 0xf)
[ 0.552444] ahci 0000:00:03.0: flags: 64bit ncq only
[ 0.553652] scsi host0: ahci
[ 0.554138] scsi host1: ahci
[ 0.554535] scsi host2: ahci
[ 0.555332] scsi host3: ahci
[ 0.555806] scsi host4: ahci
[ 0.556212] scsi host5: ahci
[ 0.556502] ata1: SATA max UDMA/133 abar m4096@0xfebd1000 port 0xfebd1100 irq 43 lpm-pol 3
[ 0.557146] ata2: SATA max UDMA/133 abar m4096@0xfebd1000 port 0xfebd1180 irq 43 lpm-pol 3
[ 0.557791] ata3: SATA max UDMA/133 abar m4096@0xfebd1000 port 0xfebd1200 irq 43 lpm-pol 3
[ 0.558429] ata4: SATA max UDMA/133 abar m4096@0xfebd1000 port 0xfebd1280 irq 43 lpm-pol 3
[ 0.559064] ata5: DUMMY
[ 0.559260] ata6: DUMMY
Please post your whole log, including both lines prefixed with "scsi" and
"ata".
As you can see, you should see, with your configuration,
32 "scsi: hostX: ahci" prints,
6 "ataX: SATA max ..." prints,
26 "ataX: DUMMY" prints.
If your operating system is using systemd (considering your gentoo address,
this is not a given), you could run:
$ systemd-analyze
both with and without the kernel module option.
You should be able to see a difference.
Or if you don't have systemd, please just upload the full dmesg with and
without the kernel module option, so that we can look at the timestamps.
Kind regards,
Niklas