linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Christoph Hellwig <hch@infradead.org>,
	Ronny Hegewald <ronny.hegewald@online.de>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] resolve collision of generic ATA_FLAG_LOWTAG and driver specific flag
Date: Fri, 10 Apr 2015 19:55:25 +0300	[thread overview]
Message-ID: <5528007D.1080703@cogentembedded.com> (raw)
In-Reply-To: <20150410111516.GA15230@infradead.org>

Hello.

On 04/10/2015 02:15 PM, Christoph Hellwig wrote:

>> The patch "libata: allow sata_sil24 to opt-out of tag ordered submission"
>> (72dd299d5039a336493993dcc63413cf31d0e662) introduces a regression with the
>> sata_sil24 driver.

>> The new flag ATA_FLAG_LOWTAG accidentially uses the same bit as
>> SIL24_FLAG_PCIX_IRQ_WOC in the driver. This activates code for Silicon Image
>> 3132, which is only suppossed to run under 3124.
>>
>> ATA_FLAG_LOWTAG is only used in sata_sil24 and is planned to be removed soon,
>> so lets just use another bit for the flag in sata_sil24.
>>
>> Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de>
>> Cc: stable@vger.kernel.org
>>
>> --- linux-3.18.5/drivers/ata/sata_sil24.c.org
>> +++ linux-3.18.5/drivers/ata/sata_sil24.c
>> @@ -247,7 +247,7 @@
>>   	SIL24_COMMON_FLAGS	= ATA_FLAG_SATA | ATA_FLAG_PIO_DMA |
>>   				  ATA_FLAG_NCQ | ATA_FLAG_ACPI_SATA |
>>   				  ATA_FLAG_AN | ATA_FLAG_PMP | ATA_FLAG_LOWTAG,
>> -	SIL24_FLAG_PCIX_IRQ_WOC	= (1 << 24), /* IRQ loss errata on PCI-X */
>> +	SIL24_FLAG_PCIX_IRQ_WOC	= (1 << 25), /* IRQ loss errata on PCI-X */

    This one also collides with ATA_FLAG_SAS_HOST.

> And this will clash as soon as the next flag is added.  Please don't
> abuse the common flag space for driver specific ones, and add a separate
> flags field for driver specific flags.

    Actually, bits 24-31 are reserved for the low-level driver usage (see the 
comment below ATA_FLAG_*), so it's the new ATA_FLAG_LOWTAG and 
ATA_FLAG_SAS_HOST that have violated the convention and should be moved 
(there's plenty of lower bits due to the removal of some obsolete flags).

WBR, Sergei


  reply	other threads:[~2015-04-10 16:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 20:09 [PATCH] resolve collision of generic ATA_FLAG_LOWTAG and driver specific flag Ronny Hegewald
2015-04-10 11:15 ` Christoph Hellwig
2015-04-10 16:55   ` Sergei Shtylyov [this message]
2015-04-13 15:29     ` Tejun Heo
2015-04-10 17:02 ` Sergei Shtylyov
2015-04-15 22:56   ` Ronny Hegewald

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=5528007D.1080703@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=hch@infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=ronny.hegewald@online.de \
    /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).