From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 12/15] ide: remove ->dma_master field from ide_hwif_t
Date: Thu, 25 Oct 2007 19:01:12 +0400 [thread overview]
Message-ID: <4720AFB8.2050804@ru.mvista.com> (raw)
In-Reply-To: <200710242324.53080.bzolnier@gmail.com>
Hello.
Bartlomiej Zolnierkiewicz wrote:
>>>Index: b/drivers/ide/pci/pdc202xx_old.c
>>>===================================================================
>>>--- a/drivers/ide/pci/pdc202xx_old.c
>>>+++ b/drivers/ide/pci/pdc202xx_old.c
>>>@@ -193,7 +193,7 @@ static void pdc202xx_old_ide_dma_start(i
>>> if (drive->media != ide_disk || drive->addressing == 1) {
>>> struct request *rq = HWGROUP(drive)->rq;
>>> ide_hwif_t *hwif = HWIF(drive);
>>>- unsigned long high_16 = hwif->dma_master;
>>>+ unsigned long high_16 = hwif->extra_base - 16;
>>> unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20);
>> That 'high_16' is *not* a good name in this case --
It's not a good name in any case, because there's more than 16 extra
registers.
>> it would've been if we
>>didn't subtract 16. So, I'd wrote:
>> unsigned long atapi_reg = hwif->extra_base +
>> (hwif->channel ? 0x14 : 0x10);
> 'high_16' is used for more than 'atapi_reg' (same is true for other places
> defining 'high_16' local variable). With five revisions of this patch
> needed to hopefully, finally get it right I prefer to defer futher cleanups
> to the incremental patches (*hint*).
Hint gotten. I'm still neck deep in other stuff but the IDE cleanups can
wait anyway.
> [PATCH] ide: remove ->dma_master field from ide_hwif_t (take 5)
> * Convert cmd64x, hpt366 and pdc202xx_old host drivers to use
> pci_resource_start(hwif->pci_dev, 4) instead of hwif->dma_master.
> * Remove no longer needed ->dma_master field from ide_hwif_t.
> v2:
> * Use the more readable 'hwif->dma_base - (hwif->channel * 8)' instead of
> pci_resource_start(hwif->pci_dev, 4).
> v3:
> * Use hwif->extra_base in hpt366/pdc20xx_old + some cosmetic fixups over v2
> (suggested by Sergei).
> v4:
> * Correct offsets in hpt3xxn_set_clock().
> v5:
> * Use hwif->extra_base in hpt366 for _real_ this time. (Noticed by Sergei)
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
prev parent reply other threads:[~2007-10-25 15:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 21:39 [PATCH 12/15] ide: remove ->dma_master field from ide_hwif_t Bartlomiej Zolnierkiewicz
2007-10-01 21:48 ` Jeff Garzik
2007-10-01 22:06 ` Bartlomiej Zolnierkiewicz
2007-10-01 22:31 ` Jeff Garzik
2007-10-02 21:24 ` Bartlomiej Zolnierkiewicz
2007-10-03 12:50 ` Sergei Shtylyov
2007-10-03 22:27 ` Bartlomiej Zolnierkiewicz
2007-10-04 13:27 ` Sergei Shtylyov
2007-10-08 21:03 ` Bartlomiej Zolnierkiewicz
2007-10-18 17:08 ` Sergei Shtylyov
2007-10-24 21:24 ` Bartlomiej Zolnierkiewicz
2007-10-25 15:01 ` Sergei Shtylyov [this message]
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=4720AFB8.2050804@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=jeff@garzik.org \
--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).