From: Gabriel Paubert <paubert@iram.es>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@osdl.org>,
Pete Popov <ppopov@embeddedalley.com>,
B.Zolnierkiewicz@elka.pw.edu.pl, linuxppc-dev@ozlabs.org,
paulus@samba.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] powerpc: Fix ide-pmac sysfs entry
Date: Mon, 15 May 2006 10:38:47 +0200 [thread overview]
Message-ID: <20060515083847.GA5229@iram.es> (raw)
In-Reply-To: <1147677830.21291.114.camel@localhost.localdomain>
On Mon, May 15, 2006 at 05:23:50PM +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2006-05-15 at 00:08 -0700, Andrew Morton wrote:
> > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > >
> > > It looks like the generic ide code now wants ide_init_hwif_ports() to
> > > set the parent struct device into the ide_hw structure (new field ?).
> > > Without this, the mac ide code can cause the ide probing code to explode
> > > in flames in sysfs registration due to what looks like a stale pointer
> > > in there (happens when removing/re-inserting one of the hotswap media
> > > bays on some laptops).
> > >
> >
> > You don't sound very confident.
>
> Well, the problem is fixed with my change, I'd like to have Bart
> confirmation that's its the right approach. It looks like it is but that
> code is fairly intricated :)
>
> > afaict things went bad in October last year. hw_regs_t.dev was added here:
> >
> > http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26a940e21752e0de8f068f77dad606a7d1986937
> >
> > but that only converted one driver to initialse ->dev.
> >
> > How come things didn't break then? Did some later change cause the
> > problems?
>
> Well, for one, very few drivers cause ide_unregister nor rely on those
> old mecanism... it seems that the way I initialize things at boot works
> fine, it's when I unregister/re-register via the hotswap bay that things
> go bunk.
>
> It's possible that it got broken back then and not noticed since ... or
> another change actually made _use_ of that field... not sure, Bart might
> confirm. The Mac laptops with those hotswap bays are fairly old and I
> haven't tested for some time. I just did after getting user reports, and
> users of old machines like that tend to use stable distro kernels which
> tend to be fairly old...
Actually I have one of these, and regularly use it and update
the kernel to the latest git once or twice per month, but I
typically have two batteries and have not swapped in the
media bay under Linux for a long time.
If you are interested, I could test the patch when I find
some time (not today: my 8 year old son went to the hospital
for an emergency last Thursday, he is cured now and should
come out today).
Regards,
Gabriel
next prev parent reply other threads:[~2006-05-15 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 6:58 [PATCH] powerpc: Fix ide-pmac sysfs entry Benjamin Herrenschmidt
2006-05-15 7:08 ` Andrew Morton
2006-05-15 7:23 ` Benjamin Herrenschmidt
2006-05-15 8:38 ` Gabriel Paubert [this message]
2006-05-15 8:52 ` Benjamin Herrenschmidt
2006-05-21 21:30 ` Gabriel Paubert
2006-05-21 21:46 ` Benjamin Herrenschmidt
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=20060515083847.GA5229@iram.es \
--to=paubert@iram.es \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=ppopov@embeddedalley.com \
/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).