All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>
Cc: Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	Andrey Melnikov <temnota.am@gmail.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH v3] ahci: print the number of implemented ports
Date: Wed, 21 Feb 2024 14:31:42 +0900	[thread overview]
Message-ID: <07c154cb-c869-4247-858b-002e36ed8f8a@kernel.org> (raw)
In-Reply-To: <20240219204744.1365567-1-cassel@kernel.org>

On 2/20/24 05:47, 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@kernel.org>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

Nice !

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2024-02-21  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 20:47 [PATCH v3] ahci: print the number of implemented ports Niklas Cassel
2024-02-21  5:31 ` Damien Le Moal [this message]
2024-02-21 18:16 ` 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=07c154cb-c869-4247-858b-002e36ed8f8a@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=sergei.shtylyov@gmail.com \
    --cc=temnota.am@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.