Re: [PATCH v3] ahci: print the number of implemented ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 19, 2024 at 09:47:43PM +0100, Niklas Cassel wrote:
> We are currently printing the CAP.NP field.
> CAP.NP is a 0's based value indicating the maximum number of ports
> supported by the HBA silicon. Note that the number of ports indicated
> in this field may be more than the number of ports indicated in the
> PI (ports implemented) register. (See AHCI 1.3.1, section 3.1.1 -
> Offset 00h: CAP – HBA Capabilities.)
> 
> PI (ports implemented) register is a field that has a bit set to '1'
> if that specific port is implemented. This register is allowed to have
> zeroes mixed with ones, i.e. a port in the middle is allowed to be
> unimplemented. (See AHCI 1.3.1, section 3.1.4 - Offset 0Ch: PI – Ports
> Implemented.)
> 
> Since the number of ports implemented might be smaller than the maximum
> number of ports supported by the HBA silicon, print the number of
> implemented ports as well.
> 
> While at it, clarify the properties being printed, and add a separator
> (,), as that is currently missing, making it very easy to get confused
> if the number before or after <property> belongs to <property>.
> 
> before:
> ahci 0000:00:03.0: masking port_map 0x3f -> 0x2f
> ahci 0000:00:03.0: AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x2f impl SATA mode
> ahci 0000:00:03.0: flags: 64bit ncq only
> 
> after:
> ahci 0000:00:03.0: masking port_map 0x3f -> 0x2f
> ahci 0000:00:03.0: AHCI vers 0001.0000, 32 command slots, 1.5 Gbps, SATA mode
> ahci 0000:00:03.0: 5/6 ports implemented (port mask 0x2f)
> ahci 0000:00:03.0: flags: 64bit ncq only
> 
> Suggested-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
> Signed-off-by: Niklas Cassel <cassel@xxxxxxxxxx>
> ---

Applied:
https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux.git/log/?h=for-6.9




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux