From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PROPOSED] ata: Report 16/32bit PIO as best we can
Date: Thu, 09 Apr 2009 09:08:14 -0400 [thread overview]
Message-ID: <49DDF33E.6000102@garzik.org> (raw)
In-Reply-To: <20090409135323.5b2bed4b@lxorguk.ukuu.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
Alan Cox wrote:
> On Thu, 09 Apr 2009 08:50:10 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
>
>> Alan Cox wrote:
>>> Something like this then ?
>>>
>>>
>>> The legacy old IDE API for this is a bit primitive so we try and map stuff
>>> sensibly onto it.
>>>
>>> - Add flags2 as we ran out of flags
>>> - Set PIO over DMA devices to report 32bit
>>> - Add ability to change the PIO32 settings if the controller permits it
>>> - Add that functionality into the sff drivers
>>> - Add that functionality into the VLB legacy driver
>>> - Turn on the 32bit PIO on the ninja32 and add support there
>>>
>>> Signed-off-by: Alan Cox <alan@linux.intel.com>
>> I think the flag2 stuff needs a closer look WRT driver setup, but
>> overall looks good.
>>
>> Consider it ACK'd, if I cannot come up with anything better for flags2
>
> The alternative would be to remove the private 8 flags from flags but
> that means fairly excessive changes to all the devices
Well the obvious alternative is attached... kick the can down the road.
> [Looks smug and notes that he pointed out that driver private flags in
> the same field would turn out to be a bad idea early on ...]
True. At present the flags are inherited from the ata_port_info
structure, so introducing a driver_flags field isn't as trivial as it
might seem, unfortunately.
With the attached patch, you can use ->flags for the two new flags, and
you can set those bits in the driver where you set the other
ATA_FLAG_xxx bits.
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2495 bytes --]
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index b1fd7d6..c7bd4b4 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -127,9 +127,9 @@ enum {
ATA_FLAG_PIO_POLLING,
/* ap->flags bits */
- PDC_FLAG_GEN_II = (1 << 24),
- PDC_FLAG_SATA_PATA = (1 << 25), /* supports SATA + PATA */
- PDC_FLAG_4_PORTS = (1 << 26), /* 4 ports */
+ PDC_FLAG_GEN_II = (1 << 29),
+ PDC_FLAG_SATA_PATA = (1 << 30), /* supports SATA + PATA */
+ PDC_FLAG_4_PORTS = (1 << 31), /* 4 ports */
};
struct pdc_port_priv {
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index e67ce8e..d21afc7 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -57,9 +57,9 @@ enum {
/*
* host flags
*/
- SIL_FLAG_NO_SATA_IRQ = (1 << 28),
- SIL_FLAG_RERR_ON_DMA_ACT = (1 << 29),
- SIL_FLAG_MOD15WRITE = (1 << 30),
+ SIL_FLAG_NO_SATA_IRQ = (1 << 29),
+ SIL_FLAG_RERR_ON_DMA_ACT= (1 << 30),
+ SIL_FLAG_MOD15WRITE = (1 << 31),
SIL_DFL_PORT_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO,
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 77aa8d7..3852a1c 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -247,7 +247,7 @@ enum {
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
ATA_FLAG_NCQ | ATA_FLAG_ACPI_SATA |
ATA_FLAG_AN | ATA_FLAG_PMP,
- SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */
+ SIL24_FLAG_PCIX_IRQ_WOC = (1 << 31), /* IRQ loss errata on PCI-X */
IRQ_STAT_4PORTS = 0xf,
};
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 7257f2d..3c37ed0 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -59,9 +59,9 @@
enum {
/* ap->flags bits */
- K2_FLAG_SATA_8_PORTS = (1 << 24),
- K2_FLAG_NO_ATAPI_DMA = (1 << 25),
- K2_FLAG_BAR_POS_3 = (1 << 26),
+ K2_FLAG_SATA_8_PORTS = (1 << 29),
+ K2_FLAG_NO_ATAPI_DMA = (1 << 30),
+ K2_FLAG_BAR_POS_3 = (1 << 31),
/* Taskfile registers offsets */
K2_SATA_TF_CMD_OFFSET = 0x00,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b450a26..42ab418 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -207,7 +207,7 @@ enum {
*/
ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */
- /* bits 24:31 of ap->flags are reserved for LLD specific flags */
+ /* bits 29:31 of ap->flags are reserved for LLD specific flags */
/* struct ata_port pflags */
ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */
next prev parent reply other threads:[~2009-04-09 13:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 13:32 [PROPOSED] ata: Report 16/32bit PIO as best we can Alan Cox
2009-04-09 12:50 ` Jeff Garzik
2009-04-09 12:53 ` Alan Cox
2009-04-09 13:08 ` Jeff Garzik [this message]
2009-04-09 13:12 ` Alan Cox
2009-04-09 13:33 ` Jeff Garzik
2009-04-09 13:41 ` Alan Cox
2009-04-09 13:45 ` Jeff Garzik
2009-04-09 13:48 ` Tejun Heo
2009-04-09 13:49 ` Tejun Heo
2009-04-09 13:45 ` Tejun Heo
2009-04-09 13:58 ` Alan Cox
2009-04-09 14:02 ` Tejun Heo
2009-04-09 13:02 ` Mark Lord
2009-04-09 13:08 ` Alan Cox
2009-04-13 16:32 ` Jeff Garzik
2009-04-13 16:39 ` Alan Cox
2009-04-13 16:57 ` Jeff Garzik
2009-04-09 13:25 ` Jeff Garzik
2009-04-09 16:57 ` Mark Lord
2009-04-09 20:42 ` Jeff Garzik
2009-04-10 0:38 ` Douglas Gilbert
2009-04-10 0:47 ` Jeff Garzik
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=49DDF33E.6000102@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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).