From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>,
linux-ide@vger.kernel.org, Andrew Victor <linux@maxim.org.za>,
linux-arm-kernel@lists.arm.linux.org.uk,
Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH 2/3] ide: add at91_ide driver
Date: Mon, 09 Feb 2009 01:58:46 +0300 [thread overview]
Message-ID: <498F63A6.60807@ru.mvista.com> (raw)
In-Reply-To: <498EC481.5080308@ru.mvista.com>
Hello, I wrote:
>>>>>>> +void at91_ide_tf_load(ide_drive_t *drive, ide_task_t *task)
>>>>>>> +{
>>>>>>> + ide_hwif_t *hwif = drive->hwif;
>>>>>>> + struct ide_io_ports *io_ports = &hwif->io_ports;
>>>>>>> + struct ide_taskfile *tf = &task->tf;
>>>>>>> + u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
>>>>>>> +
>>>>>>> + if (task->tf_flags & IDE_TFLAG_FLAGGED)
>>>>>>> + HIHI = 0xFF;
>>>>>>> +
>>>>>>> + if (task->tf_flags & IDE_TFLAG_OUT_DATA) {
>>>>>>>
>>>>>> Sigh. Bart, couldn't we drop that stupid flag? I bet nobody
>>>>>> ever used it.
>>>>>>
>>>>> It is there for HDIO_DRIVE_TASKFILE ioctl and I prefer not to
>>>>> break it.
>>>>>
>>>>> Just add ->{read,write}_data methods for IDE_TFLAG_{IN,OUT}_DATA
>>>>> to struct
>>>>> ide_tp_ops -- it should also help some other host drivers like
>>>>> tx493*.
>>>>>
>>>> That would be extremely senseless activity sicne I believe this
>>>> flag is totally useless. I have better thing to do. :-)
>>>>
>>>
>>> I would love to remove this flag but it is used by user-space exposed
>>> interface
>>
>> I know that...
>>
>>> (which was used by few drive vendors for their diagnostics
>>> tools -- doesn't matter whether internal or external) so you should put
>>> some technical arguments behind its removal (you know many of low-level
>>> technical details better than me so I may be missing something which is
>>> obvious to you).
>>>
>>
>> Well, the vendors can do strange things, of course...
>> However, accessing the data register is certainly not a part of any
>> ATA/PI defined command's inputs/outputs (the corresponding tables
>> just don't have this register). I suspect that this flag was added
>> just "for completeness".
>>
>>> OTOH while ->{read,write}_data approach would result in something like
>>> ~50 extra LOC (or even less with be_tp_ops) compared to removal it is
>>> completely safe and we don't need to spend a single second wondering
>>> about potential breakage
>>
>> Go for it. ;-)
>
> I think I have a better idea than creating another (useless) couple
> of "transport" methods. Why not (ab)use the exisitng
> {in|out}put_data() methods instead? :-)
Besides, those methods are clearly subject to some size
optimization... I'll cook up a patch while I'm at it. :-)
MBR, Sergei
next prev parent reply other threads:[~2009-02-08 22:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 10:47 [PATCH 2/3] ide: add at91_ide driver Stanislaw Gruszka
2009-02-04 12:19 ` Sergei Shtylyov
2009-02-04 14:47 ` Stanislaw Gruszka
2009-02-04 16:04 ` Sergei Shtylyov
2009-02-04 16:08 ` Sergei Shtylyov
2009-02-05 15:01 ` Stanislaw Gruszka
2009-02-05 16:09 ` Sergei Shtylyov
2009-02-05 20:00 ` Andrew Victor
2009-02-05 20:03 ` Sergei Shtylyov
2009-02-06 9:35 ` Stanislaw Gruszka
2009-02-06 10:55 ` Sergei Shtylyov
2009-02-06 16:50 ` Bartlomiej Zolnierkiewicz
2009-02-06 17:20 ` Sergei Shtylyov
2009-02-05 21:23 ` Bartlomiej Zolnierkiewicz
2009-02-05 23:31 ` Sergei Shtylyov
2009-02-06 16:36 ` Bartlomiej Zolnierkiewicz
2009-02-08 0:10 ` Sergei Shtylyov
2009-02-08 11:39 ` Sergei Shtylyov
2009-02-08 22:58 ` Sergei Shtylyov [this message]
2009-02-09 19:48 ` Bartlomiej Zolnierkiewicz
2009-02-06 9:30 ` Stanislaw Gruszka
2009-02-06 10:36 ` Sergei Shtylyov
2009-02-06 10:47 ` Stanislaw Gruszka
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=498F63A6.60807@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=bzolnier@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-ide@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=stf_xl@wp.pl \
/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).