From: David Hinds <dhinds@sonic.net>
To: "Thomas Kleffel (LKML)" <lkml@maintech.de>
Cc: B.Zolnierkiewicz@elka.pw.edu.pl, linux-ide@vger.kernel.org,
linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make ide-cs work for hardware with 8-bit CF-Interface
Date: Tue, 6 Sep 2005 15:20:35 -0700 [thread overview]
Message-ID: <20050906222035.GA26345@sonic.net> (raw)
In-Reply-To: <431DC80C.8030706@maintech.de>
On Tue, Sep 06, 2005 at 06:47:08PM +0200, Thomas Kleffel (LKML) wrote:
>
> The following patch is against vanilla 2.6.13.
>
> ldiff -uprN a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
> --- a/drivers/ide/legacy/ide-cs.c 2005-08-08 15:30:35.000000000 +0200
> +++ b/drivers/ide/legacy/ide-cs.c 2005-09-05 02:09:47.000000000 +0200
> @@ -186,7 +186,8 @@ static int idecs_register(unsigned long
> {
> hw_regs_t hw;
> memset(&hw, 0, sizeof(hw));
> - ide_init_hwif_ports(&hw, io, ctl, NULL);
> + ide_std_init_ports(&hw, io, ctl);
> + hw.io_ports[IDE_DATA_OFFSET] = io + 0x08;
> hw.irq = irq;
> hw.chipset = ide_pci;
> return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
You can't do this, at least not exactly this way. io + 0x08 may not
be a mapped IO address; it is only valid when a card is mapped with
one contiguous 16-bit IO window. PCMCIA IDE cards are not necessarily
mapped that way: they may be mapped with one 8-port window and one
1-port window, to match standard IBM PC IDE port locations. In that
case, the registers at 0x08 and 0x09 are not available. The CF spec
may impose more uniformity here than the PCMCIA spec does. I do know
that some IDE cards do end up configured with discontiguous register
allocations when used with ide-cs.c.
-- Dave
next prev parent reply other threads:[~2005-09-06 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-06 16:47 [PATCH] Make ide-cs work for hardware with 8-bit CF-Interface Thomas Kleffel (LKML)
2005-09-06 22:20 ` David Hinds [this message]
2005-09-06 23:30 ` Alan Cox
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=20050906222035.GA26345@sonic.net \
--to=dhinds@sonic.net \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=lkml@maintech.de \
/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