From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org, linux-ide@vger.kernel.org,
bzolnier@gmail.com, ralf@linux-mips.org
Subject: Re: [PATCH 1/2] ide: Add tx4939ide driver
Date: Wed, 17 Sep 2008 01:02:09 +0400 [thread overview]
Message-ID: <48D01ED1.2010003@ru.mvista.com> (raw)
In-Reply-To: <48CFDDAD.4050209@ru.mvista.com>
Hello, I wrote:
>>>>> This doesn't look consistent (aside from the TX4939IDE_REG8/16
>>>>> issue) -- mm_outsw_swap() calls cpu_to_le16() before writing
>>>>> 16-bit data but this code doesn't. So, either one of those should
>>>>> be wrong...
>>>>
>>>> Thanks, this code should be wrong. IDE_TFLAG_OUT_DATA is totally
>>>> untested...
>>>
>>> Hum, not necessarily...
>>> If the data register is BE, this should work correctly, if I don't
>>> mistake (once you fix the data register's address).
>
>> Hmm... or ide_tf_load()/ide_tf_read() is broken for big endian MIPS ?
>> (and possibly SPARC etc.)
>
>> __ide_mm_writesw(port, &data, 1) should be used instead of writew()
>> for IDE_TFLAG_OUT_DATA?
>
> Probably the code there relies on the writew() doing the necessary
> byte swapping -- the same as ata_{in|out}_data() must be reying on
> ins[wl]() and outs[wl]() to do that, as well as on
> __ide_mm_reads[wl]() and __ide_mm_writes[wl]() -- which boil down to
> reads[wl]() and writes[wl]() on MIPS.
> What's not clear to me is why in MIPS read[wlq]() vs reads[wlq](),
> write[wlq]() vs writes[wl], in[wlq]() vs ins[wlq](), and out[wlq]() vs
> outs[wlq]() are using the different byte swapping: the single form
> uses ioswab[wlq]() while the sting form uses __mem_ioswab[wlq]() --
> and those are defined as one swapping bytes and the other not in
> incluse/asm-mips/mach-generic/mangle-port.h. Cananybody shed some
> light on this?
Oh, I think I understand: the "single" versions take/return the value
in host endian but the "string" version must treat the data as a stream
of bytes.
MBR, Sergei
next prev parent reply other threads:[~2008-09-16 21:02 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 16:08 [PATCH 1/2] ide: Add tx4939ide driver Atsushi Nemoto
2008-09-09 16:44 ` Alan Cox
2008-09-09 17:08 ` Sergei Shtylyov
2008-09-10 15:12 ` Atsushi Nemoto
2008-09-10 15:06 ` Atsushi Nemoto
2008-09-13 13:37 ` Atsushi Nemoto
2008-09-09 17:50 ` Sergei Shtylyov
2008-09-10 15:32 ` Atsushi Nemoto
2008-09-10 15:55 ` Sergei Shtylyov
2008-09-10 16:25 ` Sergei Shtylyov
2008-09-11 15:03 ` Atsushi Nemoto
2008-09-11 15:18 ` Sergei Shtylyov
2008-09-10 23:02 ` Sergei Shtylyov
2008-09-11 15:52 ` Atsushi Nemoto
2008-09-12 15:34 ` Sergei Shtylyov
2008-09-12 15:59 ` Atsushi Nemoto
2008-09-12 16:44 ` Sergei Shtylyov
2008-09-12 17:19 ` Sergei Shtylyov
2008-09-13 12:32 ` Atsushi Nemoto
2008-09-16 21:15 ` Sergei Shtylyov
2008-09-16 21:39 ` Sergei Shtylyov
2008-09-27 16:19 ` Bartlomiej Zolnierkiewicz
2008-09-27 22:09 ` Tejun Heo
2008-09-30 13:07 ` Atsushi Nemoto
2008-09-30 15:09 ` James Bottomley
2008-10-04 2:56 ` Tejun Heo
2008-10-07 12:09 ` Jens Axboe
2008-09-28 8:41 ` Ralf Baechle
2008-09-11 22:33 ` Sergei Shtylyov
2008-09-12 14:37 ` Atsushi Nemoto
2008-09-12 15:01 ` Sergei Shtylyov
2008-09-13 21:48 ` Sergei Shtylyov
2008-09-14 13:05 ` Atsushi Nemoto
2008-09-16 10:29 ` Sergei Shtylyov
2008-09-16 15:20 ` Atsushi Nemoto
2008-09-16 15:32 ` Sergei Shtylyov
2008-09-16 16:24 ` Sergei Shtylyov
2008-09-16 21:02 ` Sergei Shtylyov [this message]
2008-09-14 20:55 ` Sergei Shtylyov
2008-09-15 14:01 ` Atsushi Nemoto
2008-09-16 21:59 ` Sergei Shtylyov
2008-09-17 15:12 ` Atsushi Nemoto
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=48D01ED1.2010003@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.