From: Tejun Heo <tj@kernel.org>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 4/4] pata_platform: Use 16-bit wide data transfer
Date: Sat, 23 Aug 2014 12:53:26 -0400 [thread overview]
Message-ID: <20140823165326.GA13540@mtj.dyndns.org> (raw)
In-Reply-To: <1408790772-5305-3-git-send-email-shc_work@mail.ru>
Hello,
On Sat, Aug 23, 2014 at 02:46:12PM +0400, Alexander Shiyan wrote:
> In some cases, system bus can be configured for 16-bit mode, in this
> case using of read/write functions for the 32 bit values causes two
> cycles of 16 bits, which is incorrect.
Shouldn't we distinguish them instead of forcing 16bit transfer on
all?
> The patch provides its own function to use the proper 16-bit mode.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
> drivers/ata/pata_platform.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
> index ecbc3bf..79dd223 100644
> --- a/drivers/ata/pata_platform.c
> +++ b/drivers/ata/pata_platform.c
> @@ -43,13 +43,28 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu
> return 0;
> }
>
> +static unsigned int pata_platform_xfer_noirq(struct ata_device *dev,
> + unsigned char *buf,
> + unsigned int buflen, int rw)
> +{
> + unsigned long flags;
> + unsigned int consumed;
> +
> + local_irq_save(flags);
> + /* Use 16-bit transfer */
> + consumed = ata_sff_data_xfer(dev, buf, buflen, rw);
> + local_irq_restore(flags);
> +
> + return consumed;
> +}
This doesn't seem like a good location for this function. Please
rename the existing noirq function to xfer32_noriq and add generic
xfer_noirq for 16bit xfers.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-08-23 16:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-23 10:46 [PATCH 1/4] pata_of_platform: Remove "electra-ide" quirk Alexander Shiyan
2014-08-23 10:46 ` [PATCH 3/4] pata_platform: Use devm_ioremap_resource() Alexander Shiyan
2014-08-23 16:58 ` Tejun Heo
2014-08-23 10:46 ` [PATCH 4/4] pata_platform: Use 16-bit wide data transfer Alexander Shiyan
2014-08-23 16:53 ` Tejun Heo [this message]
2014-08-23 17:29 ` Alexander Shiyan
2014-08-25 19:34 ` Tejun Heo
2014-08-25 19:48 ` One Thousand Gnomes
2014-08-26 8:55 ` Alexander Shiyan
2014-09-18 16:40 ` Alexander Shiyan
2014-09-18 17:29 ` Tejun Heo
2014-08-23 17:06 ` [PATCH 1/4] pata_of_platform: Remove "electra-ide" quirk Tejun Heo
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=20140823165326.GA13540@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=shc_work@mail.ru \
/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).