linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* IBM Microdrive PCCard on TiBook (ide-cs module)
@ 2001-07-06 18:40 Ira Weiny
  2001-07-06 19:00 ` David Blythe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ira Weiny @ 2001-07-06 18:40 UTC (permalink / raw)
  To: linuxppc-dev


I have spent a little more time tracking down why the PCCard adapter for
my Microdrive causes the TiBook to shutdown.  But I need some help in
interpreting the information I have found.

1) I was able to catch with xmon a stack trace before it shutdown.  This
showed a stack trace as follows:

ide-cs.c:ide_config
ide.c:ide_register
ide.c:ide_register_hw
ide.c:ide_probe_module
ide-probe.c:ideprobe_init
ide-probe.c:probe_hwif
ide-probe.c:do_probe
ide-probe.c:try_to_identify
ide-probe.c:actual_try_to_identify  <== shutdown somewhere here??

2) I am assuming at this point it is writing to registers which are
mapped incorrectly (probably to the PMU) which cause it to shutdown.

3) I have found that the io_base addresses is 0x1000 (as set in my
config.opts file) and this is what is passed to the ide_register
function.  Changing this address does not seem to change it's behavior
though.  (??)

4) ide_register calls ide_init_hwif_ports with these addresses which
have a "pmac_" specific call.  So I am assuming that it would "ioremap"
these as appropriate.  (However, I don't see it modifying this address
at all?)

5) ide_register_hw calls "ide_probe_module" which takes me into the
ide-probe.c file.  But I see a specific "pmac_ide_probe" which is called
at init time.


My conclusion is that I should either be calling this pmac_ide_probe
rather than the generic ide_probe module (and making it _not_ an init
function).  OR I need to modify the ide_probe module to handle the
proper maping of the addresses such that I don't write to the PMU.

Unfortunatly I have not found any examples of the later in the pcmcia
drivers I have looked at so I am worried that I am totally off base.  If
I am "barking up the wrong tree" I hope someone can tell me such that I
can start looking elsewhere.

Thanks in advance,
Ira Weiny
iweiny@acm.org

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: IBM Microdrive PCCard on TiBook (ide-cs module)
  2001-07-06 18:40 IBM Microdrive PCCard on TiBook (ide-cs module) Ira Weiny
@ 2001-07-06 19:00 ` David Blythe
  2001-07-08  6:55 ` Michel Lanners
       [not found] ` <20010707103519.972@smtp.wanadoo.fr>
  2 siblings, 0 replies; 4+ messages in thread
From: David Blythe @ 2001-07-06 19:00 UTC (permalink / raw)
  To: linuxppc-dev


Ira Weiny wrote:
>
> I have spent a little more time tracking down why the PCCard adapter for
> my Microdrive causes the TiBook to shutdown.  But I need some help in
> interpreting the information I have found.


Your symptoms sound similar to the ones i was seeing.
I recently did some work to get a PCMCIA ATA Flash card running on a
405GP (using a circa 2.4.0 kernel with some later pcmcia updates from
the 2.4-devel tree).  I ran into a large number of problems with
interrupts that would hang the system, but haven't figured out what to
do with them.  The basic issue i had was that the ide interrupt is
shared with the pc card controller and during drive probing the prober
issues a command which generates an interrupt with no ide interrupt
handler in place but the pccard interrupt handler gets flooded since it
is sharing the same line.  I 'fixed' the problem by disabling the
specific interrupt from ide-cs.c right before the call to ide_register()
and then (ughh) re-enabled it from inside init_irq() in ide-probe.c
(rather than re-enabling it right after the call to ide_register() to
avoid missing interrupts :(.  Additionally i did something to force the
SHIRQ flag when the irq was requested.  ide-cs differs from other card
service drivers in that the others usually install the interrupt handler
themselves, but ide-cs lets the rest of the ide susbsystem do it.
	david

>
> 1) I was able to catch with xmon a stack trace before it shutdown.  This
> showed a stack trace as follows:
>
> ide-cs.c:ide_config
> ide.c:ide_register
> ide.c:ide_register_hw
> ide.c:ide_probe_module
> ide-probe.c:ideprobe_init
> ide-probe.c:probe_hwif
> ide-probe.c:do_probe
> ide-probe.c:try_to_identify
> ide-probe.c:actual_try_to_identify  <== shutdown somewhere here??
>
> 2) I am assuming at this point it is writing to registers which are
> mapped incorrectly (probably to the PMU) which cause it to shutdown.
>
> 3) I have found that the io_base addresses is 0x1000 (as set in my
> config.opts file) and this is what is passed to the ide_register
> function.  Changing this address does not seem to change it's behavior
> though.  (??)
>
> 4) ide_register calls ide_init_hwif_ports with these addresses which
> have a "pmac_" specific call.  So I am assuming that it would "ioremap"
> these as appropriate.  (However, I don't see it modifying this address
> at all?)
>
> 5) ide_register_hw calls "ide_probe_module" which takes me into the
> ide-probe.c file.  But I see a specific "pmac_ide_probe" which is called
> at init time.
>
> My conclusion is that I should either be calling this pmac_ide_probe
> rather than the generic ide_probe module (and making it _not_ an init
> function).  OR I need to modify the ide_probe module to handle the
> proper maping of the addresses such that I don't write to the PMU.
>
> Unfortunatly I have not found any examples of the later in the pcmcia
> drivers I have looked at so I am worried that I am totally off base.  If
> I am "barking up the wrong tree" I hope someone can tell me such that I
> can start looking elsewhere.
>
> Thanks in advance,
> Ira Weiny
> iweiny@acm.org
>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: IBM Microdrive PCCard on TiBook (ide-cs module)
  2001-07-06 18:40 IBM Microdrive PCCard on TiBook (ide-cs module) Ira Weiny
  2001-07-06 19:00 ` David Blythe
@ 2001-07-08  6:55 ` Michel Lanners
       [not found] ` <20010707103519.972@smtp.wanadoo.fr>
  2 siblings, 0 replies; 4+ messages in thread
From: Michel Lanners @ 2001-07-08  6:55 UTC (permalink / raw)
  To: iweiny; +Cc: linuxppc-dev


On   6 Jul, this message from Ira Weiny echoed through cyberspace:
> 3) I have found that the io_base addresses is 0x1000 (as set in my
> config.opts file) and this is what is passed to the ide_register
> function.  Changing this address does not seem to change it's behavior
> though.  (??)

Here's what I have in config.opts on my TiBook:

include port 0x1000-0x10ff, port 0x1400-0x14ff
include memory 0x80400000-0x807ff000, memory 0xf3000000-0xf33ff000

This seems to work well; a modem card gets ports at 0x1000 and dos work
OK...

Note however that IDE on PowerMacs is a bit of a mess; things like you
need PowerMac built-in IDE support compiled in to get an IDE add-on
board working even though the box in questions doesn't have any built-in
IDE...

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: IBM Microdrive PCCard on TiBook (ide-cs module)
       [not found] ` <20010707103519.972@smtp.wanadoo.fr>
@ 2001-07-11  7:34   ` Ira Weiny
  0 siblings, 0 replies; 4+ messages in thread
From: Ira Weiny @ 2001-07-11  7:34 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev, blythe


Benjamin Herrenschmidt wrote:
>
> I think the problem has more to do with disabling the interrupt at
> the proper place in the IDE layer, I can try to find that discussion
> on linux-kernel to see if they came up with a solution, the problem
> seem to happen on x86 as well.
>

Thanks to Ben and David Blythe for your responses.  Indeed I think you
are correct.  Unfortunatly I found a patch posted by Gunther Mayer on
the Linux-kernel mailing list which does not seem to fix things either.
His patch looks like it does what David described; disabling interrupts
and then reenabling them in init_irq...  But it does not work...  ;-(

At this point the only thing I can think of is that the device is not
responding to the interrupt disable?  Or I have missed something with
the patch.  David, you would not happen to be able to send me a patch or
your entire ide tree?

Oh well I just thought I would thank you guys for leading me the correct
way.

Thanks again,
Ira Weiny
iweiny@acm.org

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2001-07-11  7:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-06 18:40 IBM Microdrive PCCard on TiBook (ide-cs module) Ira Weiny
2001-07-06 19:00 ` David Blythe
2001-07-08  6:55 ` Michel Lanners
     [not found] ` <20010707103519.972@smtp.wanadoo.fr>
2001-07-11  7:34   ` Ira Weiny

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