linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.6.17-rc5-mm3: oops when ejecting dock
       [not found]   ` <4484D244.3010905@goop.org>
@ 2006-06-06 15:50     ` Kristen Accardi
       [not found]     ` <1149634494.13089.53.camel@whizzy>
  1 sibling, 0 replies; 5+ messages in thread
From: Kristen Accardi @ 2006-06-06 15:50 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: linux-acpi, Andrew Morton, linux-ide

On Mon, 2006-06-05 at 17:54 -0700, Jeremy Fitzhardinge wrote:
> Kristen Accardi wrote:
> > I was able to reproduce this issue on an x40 - I found a bug in the
> > code, however, when I fixed that bug I seem to have uncovered another
> > one.  I'll send you a patch hopefully in the next day or so.
> >   
> Great, looking forward to it.  Do you know if this will properly 
> disconnect the optical drive, or does that need some more ata/ide support?
> 
> Thanks,
>     J

I don't know - this is something I am trying to look into, but don't
really have the equipment to test right now.  ASAIK, minimally you will
need to have the very latest libata stuff that includes some kind of
hotplug capability (I've copied the linux-ide list in case they can
answer this question).  I don't know if this is actually in -mm or in
some separate tree.  I'd like to work with you on making this work if
you are willing - hopefully it will "Just Work", but if not perhaps we
can figure out what needs to be done.

Thanks,
Kristen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.17-rc5-mm3: oops when ejecting dock
       [not found]     ` <1149634494.13089.53.camel@whizzy>
@ 2006-06-06 23:34       ` Jeremy Fitzhardinge
  2006-06-07  0:16         ` Kristen Accardi
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2006-06-06 23:34 UTC (permalink / raw)
  To: Kristen Accardi; +Cc: linux-acpi, Andrew Morton, linux-ide

Kristen Accardi wrote:
> So, here is a patch which will fix the bug.  The problem that I found
> after I fixed the bug occurs in this circumstance:
> 1.  boot in ultrabase
> 2.  undock
>
> But not in this case:
> 1.  boot outside base
> 2.  dock/undock etc.
>
> The symptom of the problem is that you will undock and your machine will
> get a softlockup on a CPU and just hang.  Checking the log file (when
> possible) shows lots errors from hdc: and ide: (this ultrabase has a
> cdrom on it which would be hdc).  I am using an x40 to duplicate the
> issue, so you may have a different experience than I do.  The problem
> seems to be that the cdrom that is on the ultrabase is not unplugging
> gracefully.  I may have to hook up with whoever is working on the ide
> hotplug and see if this is something I can fix.
>
> Incidentally, the reason it works fine when you boot outside the base
> and then dock/undock is because the cdrom is also not getting properly
> inserted.  So, it appears to power it on, but it is not actually being
> hotplugged.

I've observed this without the acpi dock driver present.

I was wondering if the ibm acpi ultrabay file ("bay") entry could be 
used to "eject" the optical device.  It doesn't appear on the X60 
(listed as "not supported"), probably because the ACPI name changed to 
SATA from than IDE0; I haven't really looked into it yet.  But I think 
the basic problem is that the IDE layer doesn't seem to support hot 
add/remove of devices.

I guess that means that at present the acpi dock driver does nothing, 
but it at least gives us an event to hang the ata device events off once 
the subsystem supports hot (or even warm) device add/remove.

    J

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.17-rc5-mm3: oops when ejecting dock
  2006-06-06 23:34       ` Jeremy Fitzhardinge
@ 2006-06-07  0:16         ` Kristen Accardi
  2006-06-07 11:42           ` Matthew Garrett
  2006-06-09  1:15           ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 5+ messages in thread
From: Kristen Accardi @ 2006-06-07  0:16 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: linux-acpi, Andrew Morton, linux-ide

On Tue, 2006-06-06 at 16:34 -0700, Jeremy Fitzhardinge wrote:
> Kristen Accardi wrote:
> > So, here is a patch which will fix the bug.  The problem that I found
> > after I fixed the bug occurs in this circumstance:
> > 1.  boot in ultrabase
> > 2.  undock
> >
> > But not in this case:
> > 1.  boot outside base
> > 2.  dock/undock etc.
> >
> > The symptom of the problem is that you will undock and your machine will
> > get a softlockup on a CPU and just hang.  Checking the log file (when
> > possible) shows lots errors from hdc: and ide: (this ultrabase has a
> > cdrom on it which would be hdc).  I am using an x40 to duplicate the
> > issue, so you may have a different experience than I do.  The problem
> > seems to be that the cdrom that is on the ultrabase is not unplugging
> > gracefully.  I may have to hook up with whoever is working on the ide
> > hotplug and see if this is something I can fix.
> >
> > Incidentally, the reason it works fine when you boot outside the base
> > and then dock/undock is because the cdrom is also not getting properly
> > inserted.  So, it appears to power it on, but it is not actually being
> > hotplugged.
> 
> I've observed this without the acpi dock driver present.
> 
> I was wondering if the ibm acpi ultrabay file ("bay") entry could be 
> used to "eject" the optical device.  It doesn't appear on the X60 
> (listed as "not supported"), probably because the ACPI name changed to 
> SATA from than IDE0; I haven't really looked into it yet.  But I think 
> the basic problem is that the IDE layer doesn't seem to support hot 
> add/remove of devices.
> 

Using the eject file won't help for a couple of other reasons besides
just the name change.  First, it requires that the device be present at
boot.  Second, AFAIK it just calls the device's _EJ0 method, which I
don't think is really the only thing that is needed here.  I think we
also need a generic way to do this without using the ibm driver.  You
could scan the acpi namespace for IDE controllers based on checking for
some methods that are used only in IDE or SATA devices and write a acpi
driver to handle insert/remove events, but it seems like for device
hotplug though you'd still somehow need to rescan from ide.  To me it
seems unwise to do anything outside the ide subsystem other than notify
of an event and call some handler or something.


> I guess that means that at present the acpi dock driver does nothing, 
> but it at least gives us an event to hang the ata device events off once 
> the subsystem supports hot (or even warm) device add/remove.
> 
>     J

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.17-rc5-mm3: oops when ejecting dock
  2006-06-07  0:16         ` Kristen Accardi
@ 2006-06-07 11:42           ` Matthew Garrett
  2006-06-09  1:15           ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 5+ messages in thread
From: Matthew Garrett @ 2006-06-07 11:42 UTC (permalink / raw)
  To: Kristen Accardi; +Cc: Jeremy Fitzhardinge, linux-acpi, Andrew Morton, linux-ide

On Tue, Jun 06, 2006 at 05:16:52PM -0700, Kristen Accardi wrote:

> Using the eject file won't help for a couple of other reasons besides
> just the name change.  First, it requires that the device be present at
> boot.  Second, AFAIK it just calls the device's _EJ0 method, which I
> don't think is really the only thing that is needed here.  I think we
> also need a generic way to do this without using the ibm driver.  You
> could scan the acpi namespace for IDE controllers based on checking for
> some methods that are used only in IDE or SATA devices and write a acpi
> driver to handle insert/remove events, but it seems like for device
> hotplug though you'd still somehow need to rescan from ide.  To me it
> seems unwise to do anything outside the ide subsystem other than notify
> of an event and call some handler or something.

Does ejecting/docking not generate an IDE bus rescan notification? I've 
got hacky code to support that for SATA hardware, but it's not currently 
usable for PATA. Once the PATA libata code has settled down a little, 
I'll look into that.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.17-rc5-mm3: oops when ejecting dock
  2006-06-07  0:16         ` Kristen Accardi
  2006-06-07 11:42           ` Matthew Garrett
@ 2006-06-09  1:15           ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2006-06-09  1:15 UTC (permalink / raw)
  To: Kristen Accardi; +Cc: linux-acpi, Andrew Morton, linux-ide

Kristen Accardi wrote:
> To me it
> seems unwise to do anything outside the ide subsystem other than notify
> of an event and call some handler or something.
Sounds reasonable to me.

I presume what happens (or should happen?) is that pressing the "want to 
undock" button would send an event to acpid to unmount any filesystems, 
etc, and then once that had finishes you can pull the latch lever to 
actually disconnect the dock. Does that work at present?

I guess actually pulling the dock would cause PCI hot unplug events if 
there were actual PCI devices behind it.  I don't think the X60 dock 
does though.

    J



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-09  1:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4483EB38.30609@goop.org>
     [not found] ` <1149554579.6006.10.camel@whizzy>
     [not found]   ` <4484D244.3010905@goop.org>
2006-06-06 15:50     ` 2.6.17-rc5-mm3: oops when ejecting dock Kristen Accardi
     [not found]     ` <1149634494.13089.53.camel@whizzy>
2006-06-06 23:34       ` Jeremy Fitzhardinge
2006-06-07  0:16         ` Kristen Accardi
2006-06-07 11:42           ` Matthew Garrett
2006-06-09  1:15           ` Jeremy Fitzhardinge

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).