Ultralinux archive on lore.kernel.org
 help / color / mirror / Atom feed
* 2.4.5 and IDE probing hung
@ 2001-06-01  9:46 Ralf Liesegang
  2001-06-01  9:56 ` David S. Miller
  2001-06-01 14:10 ` Ralf Liesegang
  0 siblings, 2 replies; 3+ messages in thread
From: Ralf Liesegang @ 2001-06-01  9:46 UTC (permalink / raw)
  To: ultralinux


Hi,

if i boot a 2.4.5 kernel on my system (ultra-sparcIIe) it hung during
IDE probing.

the system seem to loop in arch/sparc64/kernel/traps.c:do_dae() 
traped from drivers/ide/ide-probe.c:do_probe().

because ide-probe.c is not a sparc depend file, i won't put
a "pci_poke_in_progress" in that code, so i changed do_dae() to 
check the AFSR register. for details please check the code below.

unfortuanely i don't have much informations about the different
CPU version, so the flags i check from AFSR maybe different on
other CPU version (e.g.: CHAFSR_BERR in chafsr.h, seem to be one
of the bits on Cheetah(?)).

so if possible someone who knows have a look to the code below
and give me a tip for a "good" patch.

thanks,
	Ralf

void do_dae(struct pt_regs *regs)
{
#ifdef CONFIG_PCI
#define AFSR_PRIV       0x80000000      /* Privileged Code access error */
#define AFSR_BERR       0x04000000      /* Bus Error from system Bus */

        ulong   dae_error;

        /* read AFSR */
        __asm__ __volatile__("ldxa [%%g0] %1, %0"
                             : "=r" (dae_error)
                             : "i" (ASI_AFSR));

        if ((pci_poke_in_progress && pci_poke_cpu = smp_processor_id()) ||
            (dae_error & (AFSR_BERR | AFSR_PRIV))) {

                /* clear AFSR, don't touch the other bits */
                __asm__ __volatile__("stxa %0, [%%g0] %1"
                                    : /* no outputs */
                                    : "r" (dae_error & (AFSR_BERR | AFSR_PRIV)),
                                      "i" (ASI_AFSR));

		clean_and_reenable_l1_caches();

[...]


-- 
| Ralf Liesegang          Phone:  +49-5251-8-15131                  |
| FSC EP OS UX1           Fax:    +49-5251-8-16104                  |
| Heinz-Nixdorf-Ring      EMail:  Ralf.Liesegang@fujitsu-siemens.com|
| D-33106 Paderborn       NERV:   liesegang.pad                     | 
-
To unsubscribe from this list: send the line "unsubscribe ultralinux" in
the body of a message to majordomo@vger.kernel.org

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

* Re: 2.4.5 and IDE probing hung
  2001-06-01  9:46 2.4.5 and IDE probing hung Ralf Liesegang
@ 2001-06-01  9:56 ` David S. Miller
  2001-06-01 14:10 ` Ralf Liesegang
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2001-06-01  9:56 UTC (permalink / raw)
  To: ultralinux


Ralf Liesegang writes:
 > if i boot a 2.4.5 kernel on my system (ultra-sparcIIe) it hung during
 > IDE probing.
 > 
 > the system seem to loop in arch/sparc64/kernel/traps.c:do_dae() 
 > traped from drivers/ide/ide-probe.c:do_probe().

What exact PC is it taking this trap on, in what function and what
line of source exactly?  What is the address used by the load/store
instruction causing the trap, and does this match up to the I/O areas
of the IDE controller in the machine (as shown by lspci -v or
in the contents of /proc/pci)?

 > because ide-probe.c is not a sparc depend file, i won't put
 > a "pci_poke_in_progress" in that code, so i changed do_dae() to 
 > check the AFSR register. for details please check the code below.

It's getting a bus error in privileged mode.  This means it is
touching something in device space which is not responding, either
because there is no device there or the device there is not enabled.

 > unfortuanely i don't have much informations about the different
 > CPU version, so the flags i check from AFSR maybe different on
 > other CPU version (e.g.: CHAFSR_BERR in chafsr.h, seem to be one
 > of the bits on Cheetah(?)).
 >
 > so if possible someone who knows have a look to the code below
 > and give me a tip for a "good" patch.

I cannot suggest a good patch until we know exactly what is triggering
the trap in the first place.

do_probe in ide-probe.c does nothing more than perform perfectly
normal accesses to the IDE controller registers.  What kind of IDE
chipset is in your system, and what information does the driver print
out when this device is probed?

Does the IDE controller even work with your patch applied?

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe ultralinux" in
the body of a message to majordomo@vger.kernel.org

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

* Re: 2.4.5 and IDE probing hung
  2001-06-01  9:46 2.4.5 and IDE probing hung Ralf Liesegang
  2001-06-01  9:56 ` David S. Miller
@ 2001-06-01 14:10 ` Ralf Liesegang
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Liesegang @ 2001-06-01 14:10 UTC (permalink / raw)
  To: ultralinux

> 
> What exact PC is it taking this trap on, in what function and what

this all is somewhat strange and maybe a timing problem, here are
some boot test:

--	Bootmessages without my patch, but debugmessage in 
	drivers/ide/ide-probe.c at line 321:

        ide_delay_50ms();
321:	printk("%s:%d: in_byte(%lx)\n", __FILE__, __LINE__, IDE_SELECT_REG);
        if (IN_BYTE(IDE_SELECT_REG) != drive->select.all && !drive->present) {

[...]
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD646: IDE controller on PCI bus 01 dev 18
CMD646: chipset revision 7
CMD646: chipset revision 0x07, UltraDMA Capable
CMD646: 100% native mode on irq 1,7df
    ide0: BM-DMA at 0x1fe02800420-0x1fe02800427, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1fe02800428-0x1fe0280042f, BIOS settings: hdc:pio, hdd:pio
probing for hda: present=0, media2, probetype=ATA
ide-probe.c:321: in_byte(1fe02800406)
probing for hda: present=0, media2, probetype=ATAPI
ide-probe.c:321: in_byte(1fe02800406)
probing for hdb: present=0, media2, probetype=ATA
ide-probe.c:321: in_byte(1fe02800406)
probing for hdb: present=0, media2, probetype=ATAPI
ide-probe.c:321: in_byte(1fe02800406)
probing for hdc: present=0, media2, probetype=ATA
ide-probe.c:321: in_byte(1fe02800416)
-- do_dae: TPC 4fb280 TNPC 4fb284
probing for hdc: present=0, media2, probetype=ATAPI
ide-probe.c:321: in_byte(1fe02800416)
-- do_dae: TPC 4fb280 TNPC 4fb284
probing for hdd: present=0, media2, probetype=ATA
ide-probe.c:321: in_byte(1fe02800416)
-- do_dae: TPC 4fb280 TNPC 4fb284
probing for hdd: present=0, media2, probetype=ATAPI
ide-probe.c:321: in_byte(1fe02800416)
-- do_dae: TPC 4fb280 TNPC 4fb284
sungem.c:v0.75 21/Mar/01 David S. Miller (davem@redhat.com)

	ok - system is booting TPC 4fb280 should be
	line 321 in (original) drivers/ide/ide-probe.c, that's
	were:
		if (IN_BYTE(IDE_SELECT_REG) ....

--	Bootmessages without my patch, but _no_ debugmessage in 
	drivers/ide/ide-probe.c at line 321.

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx 
CMD646: IDE controller on PCI bus 01 dev 18 
CMD646: chipset revision 7 
CMD646: chipset revision 0x07, UltraDMA Capable 
CMD646: 100% native mode on irq 1,7df 
    ide0: BM-DMA at 0x1fe02800420-0x1fe02800427, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1fe02800428-0x1fe0280042f, BIOS settings: hdc:pio, hdd:pio
probing for hda: present=0, media2, probetype=ATA 
probing for hda: present=0, media2, probetype=ATAPI 
probing for hdb: present=0, media2, probetype=ATA 
probing for hdb: present=0, media2, probetype=ATAPI 
probing for hdc: present=0, media2, probetype=ATA 
-- do_dae: TPC 4fb260 TNPC 4fb2e0 
probing for hdc: present=0, media2, probetype=ATAPI 
-- do_dae: TPC 4fb260 TNPC 4fb2cc 
-- do_dae: TPC 4fb2d0 TNPC 4fb2d4 
-- do_dae: TPC 4fab0c TNPC 4fab10 
-- do_dae: TPC 4fab18 TNPC 4fab30 

	system hung!

--	Bootmessages _with_ my patch, but _no_ debugmessage in 
	drivers/ide/ide-probe.c

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD646: IDE controller on PCI bus 01 dev 18
CMD646: chipset revision 7
CMD646: chipset revision 0x07, UltraDMA Capable
CMD646: 100% native mode on irq 1,7df
    ide0: BM-DMA at 0x1fe02800420-0x1fe02800427, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1fe02800428-0x1fe0280042f, BIOS settings: hdc:pio, hdd:pio
probing for hda: present=0, media2, probetype=ATA
probing for hda: present=0, media2, probetype=ATAPI
probing for hdb: present=0, media2, probetype=ATA
probing for hdb: present=0, media2, probetype=ATAPI
probing for hdc: present=0, media2, probetype=ATA
-- do_dae: TPC 4fb260 TNPC 4fb2d0
probing for hdc: present=0, media2, probetype=ATAPI
-- do_dae: TPC 4fb260 TNPC 4fb2e0
probing for hdd: present=0, media2, probetype=ATA
-- do_dae: TPC 4fb260 TNPC 4fb268
probing for hdd: present=0, media2, probetype=ATAPI
-- do_dae: TPC 4fb260 TNPC 4fb264
sungem.c:v0.75 21/Mar/01 David S. Miller (davem@redhat.com)

	ok - system is booting TPC 4fb260 (removed printk) should 
	be also line 321 in (original) drivers/ide/ide-probe.c, that's
	were:
		if (IN_BYTE(IDE_SELECT_REG) ....

> line of source exactly?  What is the address used by the load/store
> instruction causing the trap, and does this match up to the I/O areas

i will have a closer look to the "hung" situation.

> of the IDE controller in the machine (as shown by lspci -v or
> in the contents of /proc/pci)?

cat /proc/pci
[..]
  Bus  1, device   3, function  0:
    Class 0101: PCI device 1095:0646 (rev 7).
      IRQ 7184736.
      Master Capable.  Latencyd.  Min Gnt=2.Max Lat=4.
      I/O at 0x1fe02800400 [0x1fe02800407].
      I/O at 0x1fe02800408 [0x1fe0280040b].
      I/O at 0x1fe02800410 [0x1fe02800417].
      I/O at 0x1fe02800418 [0x1fe0280041b].
      I/O at 0x1fe02800420 [0x1fe0280042f].

lspci -v
[..]
01:03.0 IDE interface: CMD Technology Inc PCI0646 (rev 07) (prog-if 8f [Master SecP SecO PriP PriO])
        Subsystem: CMD Technology Inc PCI0646
        Flags: bus master, medium devsel, latency 64, IRQ 7184736
        I/O ports at 2800400 [size=8]
        I/O ports at 2800408 [size=4]
        I/O ports at 2800410 [size=8]
        I/O ports at 2800418 [size=4]
        I/O ports at 2800420 [size\x16]
        Capabilities: [60] Power Management version 1

> It's getting a bus error in privileged mode.  This means it is
> touching something in device space which is not responding, either
> because there is no device there or the device there is not enabled.

yes, there are no devices at all!

> I cannot suggest a good patch until we know exactly what is triggering
> the trap in the first place.

i try to find out more.

cu,
	Ralf

-- 
| Ralf Liesegang          Phone:  +49-5251-8-15131                  |
| FSC EP OS UX1           Fax:    +49-5251-8-16104                  |
| Heinz-Nixdorf-Ring      EMail:  Ralf.Liesegang@fujitsu-siemens.com|
| D-33106 Paderborn       NERV:   liesegang.pad                     | 
-
To unsubscribe from this list: send the line "unsubscribe ultralinux" in
the body of a message to majordomo@vger.kernel.org

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

end of thread, other threads:[~2001-06-01 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-01  9:46 2.4.5 and IDE probing hung Ralf Liesegang
2001-06-01  9:56 ` David S. Miller
2001-06-01 14:10 ` Ralf Liesegang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox