linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Igor Pylypiv <ipylypiv@google.com>
Cc: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH v3 3/3] ata: libata: Print horkages applied to devices
Date: Tue, 23 Jul 2024 08:10:01 +0900	[thread overview]
Message-ID: <0abbefb8-351a-4be9-90a7-bf26dbe969c7@kernel.org> (raw)
In-Reply-To: <Zp7PjJ0dJidXmY7c@google.com>

On 7/23/24 06:30, Igor Pylypiv wrote:
>>  static const struct ata_dev_horkage_entry ata_dev_horkages[] = {
>> @@ -4266,21 +4329,24 @@ static const struct ata_dev_horkage_entry ata_dev_horkages[] = {
>>  	{ }
>>  };
>>  
>> -static unsigned long ata_dev_horkage(const struct ata_device *dev)
>> +static unsigned int ata_dev_horkage(const struct ata_device *dev)
>>  {
>>  	unsigned char model_num[ATA_ID_PROD_LEN + 1];
>>  	unsigned char model_rev[ATA_ID_FW_REV_LEN + 1];
>>  	const struct ata_dev_horkage_entry *ad = ata_dev_horkages;
>>  
>> +	/* dev->horkage is an unsigned int. */
>> +	BUILD_BUG_ON(__ATA_HORKAGE_MAX > 31);
> 
> Should this check be '__ATA_HORKAGE_MAX > 32'?
> 
> When __ATA_HORKAGE_MAX is 32 then the last horkage bit will be 31.

Oops... Yes, of course you are right. Good catch.

>> +enum ata_horkage {
>> +	__ATA_HORKAGE_DIAGNOSTIC,	/* Failed boot diag */
>> +	__ATA_HORKAGE_NODMA,		/* DMA problems */
>> +	__ATA_HORKAGE_NONCQ,		/* Don't use NCQ */
>> +	__ATA_HORKAGE_MAX_SEC_128,	/* Limit max sects to 128 */
>> +	__ATA_HORKAGE_BROKEN_HPA,	/* Broken HPA */
>> +	__ATA_HORKAGE_DISABLE,		/* Disable it */
>> +	__ATA_HORKAGE_HPA_SIZE,		/* native size off by one */
>> +	__ATA_HORKAGE_IVB,		/* cbl det validity bit bugs */
>> +	__ATA_HORKAGE_STUCK_ERR,	/* stuck ERR on next PACKET */
>> +	__ATA_HORKAGE_BRIDGE_OK,	/* no bridge limits */
>> +	__ATA_HORKAGE_ATAPI_MOD16_DMA,	/* use ATAPI DMA for commands
>> +					    not multiple of 16 bytes */
>> +	__ATA_HORKAGE_FIRMWARE_WARN,	/* firmware update warning */
>> +	__ATA_HORKAGE_1_5_GBPS,		/* force 1.5 Gbps */
>> +	__ATA_HORKAGE_NOSETXFER,		/* skip SETXFER, SATA only */
> nit: extra tab                          ^^^^^^^^

Yep. Fixed.

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2024-07-22 23:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22  1:34 [PATCH v3 0/3] Some renaming and horkage improvements Damien Le Moal
2024-07-22  1:34 ` [PATCH v3 1/3] ata: libata: Rename ata_dma_blacklisted() Damien Le Moal
2024-07-22  1:34 ` [PATCH v3 2/3] ata: libata: Rename ata_dev_blacklisted() Damien Le Moal
2024-07-22  1:34 ` [PATCH v3 3/3] ata: libata: Print horkages applied to devices Damien Le Moal
2024-07-22 21:30   ` Igor Pylypiv
2024-07-22 23:10     ` Damien Le Moal [this message]
2024-07-23  0:28       ` Robin H. Johnson
2024-07-23  0:40         ` Damien Le Moal

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=0abbefb8-351a-4be9-90a7-bf26dbe969c7@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=ipylypiv@google.com \
    --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;
as well as URLs for NNTP newsgroup(s).