From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [git patches] IDE updates (part 2)
Date: Sun, 14 Oct 2007 00:09:06 +0200 [thread overview]
Message-ID: <200710140009.06260.bzolnier@gmail.com> (raw)
In-Reply-To: <20071013224452.71d6f61f@the-village.bc.nu>
On Saturday 13 October 2007, Alan Cox wrote:
> > Comment in pmac_ide_init_hwif_ports() is highly misleading as this function
> > returns early only for "normal" IDE PCI devices (pmac_ide_init_hwif_ports()
> > can be called outside ide-pmac driver through ppc_ide_md).
>
> Follow the code you pasted
>
> > pmif->regbase = (unsigned long) base + 0x2000;
> > ...
> > rc = pmac_ide_setup_device(pmif, hwif);
>
> Ok so regbase is set
>
> > ...
> > }
> >
> > static int
> > pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
> > {
> > ...
> > pmac_ide_init_hwif_ports(&hwif->hw, pmif->regbase, 0, &hwif->irq);
>
> Now we pass a honking great zero for the ctrl_port
> > ...
> > }
> >
> > void
> > pmac_ide_init_hwif_ports(hw_regs_t *hw,
> > unsigned long data_port, unsigned long ctrl_port,
> > int *irq)
> > {
> > ...
> > for (ix = 0; ix < MAX_HWIFS; ++ix)
this loop is a tricky part, regbase is set so we break out early
> > if (data_port == pmac_ide[ix].regbase)
> > break;
> > ---> since pmif->regbase was set earlier ix will be < MAX_HWIFS
^^^^^^^^^^^^^^^^^^^^^^
> > if (ix >= MAX_HWIFS) {
^^^^^^^^^^^^^^^
> > /* Probably a PCI interface... */
> > for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; ++i)
> > hw->io_ports[i] = data_port + i - IDE_DATA_OFFSET;
> > hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
>
> Which is zero..
>
>
> See the problem ?
next prev parent reply other threads:[~2007-10-13 22:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-13 16:25 [git patches] IDE updates (part 2) Bartlomiej Zolnierkiewicz
2007-10-13 19:56 ` Alan Cox
2007-10-13 20:59 ` Bartlomiej Zolnierkiewicz
2007-10-13 21:44 ` Alan Cox
2007-10-13 22:09 ` Bartlomiej Zolnierkiewicz [this message]
2007-10-13 22:29 ` Alan Cox
2007-10-13 22:41 ` Bartlomiej Zolnierkiewicz
2007-10-14 0:08 ` Benjamin Herrenschmidt
2007-10-14 16:07 ` Bartlomiej Zolnierkiewicz
2007-10-14 21:15 ` Benjamin Herrenschmidt
2007-10-16 19:41 ` Bartlomiej Zolnierkiewicz
2007-10-14 0:12 ` Al Viro
2007-10-14 16:21 ` Bartlomiej Zolnierkiewicz
2007-10-15 19:54 ` Jeff Garzik
2007-10-15 19:58 ` Russell King
2007-10-15 20:07 ` Jeff Garzik
2007-10-24 12:38 ` Russell King
2007-10-24 12:53 ` Jeff Garzik
2007-10-24 13:12 ` Russell King
2007-10-24 13:20 ` Jeff Garzik
2007-10-16 15:55 ` Russell King
2007-10-25 6:05 ` 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=200710140009.06260.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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.