From: Chris Dearman <chris@ftp.linux-mips.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: jgarzik@pobox.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 0/1] sata_sil: Option to use IO space to access TF registers.
Date: Thu, 23 Oct 2008 00:34:39 +0100 [thread overview]
Message-ID: <20081022233439.GA30488@ftp.linux-mips.org> (raw)
In-Reply-To: <20081022221623.344aea62@lxorguk.ukuu.org.uk>
Hi Alan,
> You need to fix your ioread8/iowrite8 and other accessors to work around
> this if at all possible and that will cover all your devices.
I would like to have a generic solution for all devices, but
unfortunately I don't think that's possible. There is no way to
generate a read cycle to PCI memory space on this hardware without all
of the byte enables being set. Normally this isn't a problem, a full
word is read on the PCI bus and the processor picks out the bytes it
needs, but memory mapped registers with access restrictions are a
problem. PCI memory writes and PCI IO reads/writes do generate the
correct byte enables.
I did consider checking for accesses to particular locations on
particular PCI devices in ioread8/ioread16 and silently converting
them into equivalent IO accesses (assuming one exists of course...),
but it gets pretty nasty. Eg on this SATA chip I would have to map
the IO BARS behind the drivers back, and it's still not a generic
solution - for each new device I would have to add affected
addresses to ioread8/ioread16.
The patch is a relatively clean work around for limitations in the
hardware I'm using, but I know it probably looks like just more
cruft from an outside perspective so I won't be championing it :)
Chris
next prev parent reply other threads:[~2008-10-22 23:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 18:23 [PATCH 0/1] sata_sil: Option to use IO space to access TF registers Chris Dearman
2008-10-22 18:24 ` [PATCH 1/1] " Chris Dearman
2008-10-22 21:16 ` [PATCH 0/1] " Alan Cox
2008-10-22 23:34 ` Chris Dearman [this message]
2008-10-23 7:32 ` Alan Cox
2008-10-28 1:56 ` Tejun Heo
2008-10-30 22:58 ` Chris Dearman
2008-10-31 2:26 ` Tejun Heo
2008-10-31 8:48 ` Alan Cox
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=20081022233439.GA30488@ftp.linux-mips.org \
--to=chris@ftp.linux-mips.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@pobox.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).