Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thibaut VARENE <T-Bone@parisc-linux.org>, linux-ide@vger.kernel.org
Subject: Re: [RFC PATCH] pmac ide doesn't properly cleanup hwif when releasing controller
Date: Wed, 2 Nov 2005 09:05:49 +0100	[thread overview]
Message-ID: <58cb370e0511020005q27acb8fdg16acb1f307fafe7b@mail.gmail.com> (raw)
In-Reply-To: <1130878823.29054.449.camel@gaston>

On 11/1/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > > Thus my question: Should I
> > >
> > >  - Manually in ide-pmac clean up all callbacks & revert everything in
> > > the HWIF when I want to hand it back
> > >
> > >  - Call init_hwif_data() despite the nasty comment on top
> > >
> > >  - Just don't release the interface...
> >
> > Just don't release it - it is the simplest solution and also
> > as the easiest to maintain in future (hotplug).
>
> Well, not exactly :) If I start to add unplug of that driver, the
> problem will be back, trying to release an interface or rmmod the module

Current behavior is such that pmac driver releases port which
doesn't have devices connected so new behavior will be step forward
(although small).

> will leave all sort of crap in the HWIF ... So I think you need to
> exposrt something from the IDE core to totally cleanup a HWIF (return it
> to pristine state) for use in those cases.
>
> The exact same goes with ide-cd btw. It's not changing as many fields
> as, afaik, it doesn't do DMA, but still. When the CS is removed, all
> HWIF fields should be reverted to their initial state.

"in future" we won't be doing brain-damaged restoring of HWIF
fields in ide_unregister() and the problem will go away.  If you
want to go ahead feel free to but remember to separate 2 states
(HWIF is unregistered by ioctl and HWIF is really going away)
which are currently both handled by ide_unregister().

Thanks,
Bartlomiej

  reply	other threads:[~2005-11-02  8:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29  2:48 [RFC PATCH] pmac ide doesn't properly cleanup hwif when releasing controller Thibaut VARENE
2005-10-29 22:09 ` Benjamin Herrenschmidt
2005-11-01 16:20   ` Bartlomiej Zolnierkiewicz
2005-11-01 21:00     ` Benjamin Herrenschmidt
2005-11-02  8:05       ` Bartlomiej Zolnierkiewicz [this message]
2005-11-02 10:21         ` Benjamin Herrenschmidt
2005-11-10 10:56           ` Bartlomiej Zolnierkiewicz
2005-11-10 11:13             ` Benjamin Herrenschmidt
2005-11-18 20:56 ` 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=58cb370e0511020005q27acb8fdg16acb1f307fafe7b@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=T-Bone@parisc-linux.org \
    --cc=benh@kernel.crashing.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