From: Tejun Heo <htejun@gmail.com>
To: Robert Hancock <hancockr@shaw.ca>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
ksummit-2008-discuss@lists.linux-foundation.org,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-ide <linux-ide@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: Kernel Summit request for Discussion of future of ATA (libata) and IDE
Date: Wed, 06 Aug 2008 09:44:26 +0900 [thread overview]
Message-ID: <4898F3EA.7000507@gmail.com> (raw)
In-Reply-To: <4898EE70.1030604@shaw.ca>
Robert Hancock wrote:
> Here's my first cut at it. Compile tested only. This sets most controllers
> to use 32-bit PIO except for those which could potentially be on a real ISA
> or other 16-bit bus. It's a bit non-obvious what to do with some of the
> drivers, so input is welcome.
>
> This implementation doesn't check the ata_id_has_dword_io at all, since it
> would only make a difference on controllers where we don't really want to
> use it anyway.
>
> It seems like regardless of whether we do 32-bit by default or not the 32-bit
> data_xfer function should be added to libata core as we have several drivers
> which duplicate the same code currently..
Great, just some minor nitpicks as I don't have much idea about 16 bit ones.
> +unsigned int ata_sff_data_xfer(struct ata_device *dev, unsigned char *buf,
> + unsigned int buflen, int rw)
> +{
> + struct ata_port *ap = dev->link->ap;
> + void __iomem *data_addr = ap->ioaddr.data_addr;
> + unsigned int words = buflen >> 2;
dwords maybe?
> + unsigned int slop = buflen & 3;
> +
> + /* Transfer multiple of 4 bytes */
> + if (rw == READ)
> + ioread32_rep(data_addr, buf, words);
> + else
> + iowrite32_rep(data_addr, buf, words);
> +
> + /* Transfer trailing 1 byte, if any. */
1byte?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-08-06 0:45 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.OGeO7gZvBG4obEzRbVltjSebgTQ@ifi.uio.no>
[not found] ` <fa.KtvYE2B2yrJqUleolhtMPN9ljAQ@ifi.uio.no>
[not found] ` <fa.AqEKTvguYFAzDFHy/We/8MpOqmo@ifi.uio.no>
2008-08-04 20:07 ` Kernel Summit request for Discussion of future of ATA (libata) and IDE Robert Hancock
2008-08-04 19:55 ` Alan Cox
2008-08-04 21:17 ` Robert Hancock
2008-08-04 21:06 ` Alan Cox
2008-08-04 21:48 ` Robert Hancock
2008-08-06 0:21 ` Robert Hancock
2008-08-06 0:44 ` Tejun Heo [this message]
2008-08-06 2:30 ` Robert Hancock
2008-08-06 11:27 ` Sergei Shtylyov
2008-08-06 13:04 ` [Ksummit-2008-discuss] " Tejun Heo
2008-08-06 8:51 ` Alan Cox
2008-08-04 21:55 ` Sergei Shtylyov
2008-08-04 21:43 ` Alan Cox
2008-08-04 22:45 ` Sergei Shtylyov
2008-08-04 22:52 ` Sergei Shtylyov
2008-08-06 11:17 ` Sergei Shtylyov
2008-08-04 22:12 ` Mark Lord
2008-08-04 22:00 ` Alan Cox
2008-08-04 20:37 ` Jeff Garzik
2008-08-04 23:49 ` [Ksummit-2008-discuss] " Tejun Heo
2008-08-03 15:57 James Bottomley
2008-08-03 16:39 ` Alan Cox
2008-08-03 17:10 ` James Bottomley
2008-08-03 18:45 ` Alan Cox
2008-08-03 19:21 ` James Bottomley
2008-08-03 19:17 ` Alan Cox
2008-08-03 20:19 ` Bartlomiej Zolnierkiewicz
2008-08-03 22:07 ` Alan Cox
2008-08-03 19:46 ` Felix Miata
2008-08-03 22:08 ` Tejun Heo
2008-08-03 22:05 ` Alan Cox
2008-08-03 22:36 ` Tejun Heo
2008-08-03 23:23 ` Felix Miata
2008-08-04 5:37 ` Benjamin Herrenschmidt
2008-08-03 17:32 ` Willy Tarreau
2008-08-03 17:45 ` Rafael J. Wysocki
2008-08-03 17:57 ` Willy Tarreau
2008-08-04 5:35 ` Benjamin Herrenschmidt
2008-08-04 13:16 ` Kumar Gala
2008-08-04 13:07 ` Alan Cox
2008-08-03 20:09 ` Bartlomiej Zolnierkiewicz
2008-08-03 22:01 ` Alan Cox
2008-08-03 23:10 ` 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=4898F3EA.7000507@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=hancockr@shaw.ca \
--cc=jeff@garzik.org \
--cc=ksummit-2008-discuss@lists.linux-foundation.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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).