linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: More IDE hackery
Date: Wed, 3 Nov 2004 18:14:53 +0100	[thread overview]
Message-ID: <58cb370e04110309146ad102fc@mail.gmail.com> (raw)
In-Reply-To: <1099487809.29560.28.camel@localhost.localdomain>

Hi!

On Wed, 03 Nov 2004 13:16:50 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> Our SI3112 driver fixups don't work in some cases. I found this while

brown paper bug of mine

> trying to work out what was going on in IT8212. At the point we check
> for the mod15 bug we may not have drive data. So we need a "fixups"
> callback.
> 
> I've also played with a pile of flash adapters - it seems the slave
> decode bug is PCMCIA specific - so we need a fixup hook for
> pcmcia/delkin/..

Cool.

> I ended up with the following which solves all three in one go and
> allows us to fix anything else that turns up
> 
> 1. Turned ide_undecoded_slave into a routine of its own

fine

> 2. Changed probe_hwif_init to take a third argument a "fixup" callback
> which is run after hwif_init but before ata_attach

What about ide_hwif_t->fixup instead?

> 3. Modify ide-cs, delkin to pass ide_undecoded_slave as their fixup

It won't work unless you modify ide_register_hw().
See ide_register_hw() vs "initializing == 1".

> 4. Added "fixup" as a method in the ide_pci_device_t and made the
> pci-setup code pass this as the fixup argument to probe_hwif_init
> 5. Made si3112 pass the mod15 check this way, made it8212 pass the
> geometry demnagler this way
> 6. Fix up the other callers to pass NULL

I prefer minimal changes to existing code...

> I've attached the code change, if you think its sane I'll split you out
> a set of patches versus the base Linus tree which do this

Only patch for 1. is attached.

It is hard to speak about changes without seeing actual code.

+	/* Has a serial number but is warped */
+	if (!strstr(drive0->id->model, "Integrated Technology Express"))
+		return;

This shouldn't be needed now, no?

Bartlomiej

  reply	other threads:[~2004-11-03 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 13:16 More IDE hackery Alan Cox
2004-11-03 17:14 ` Bartlomiej Zolnierkiewicz [this message]
2004-11-03 17:08   ` Alan Cox
2004-11-03 20:17     ` Bartlomiej Zolnierkiewicz

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=58cb370e04110309146ad102fc@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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).