Subject: Re: port-alpha/21472 and kern/16379 (ohci/USB problems on Alpha)
To: NetBSD/alpha Discussion List <port-alpha@NetBSD.ORG>
From: Greg A. Woods <>
List: port-alpha
Date: 09/23/2004 16:16:27
Re: kern/16379: Serious problems with the ohci driver on a DEC PWS 500au (Alpha)
Re: port-alpha/21472: USB device interferes with IDE device; interrupt lossage

OK, so removing the USB devices from the kernel doesn't solve the
problem well enough, at least not for 1.6.x on the ES40.

Something like this appears when trying to do bulk data reads from the
CD-ROM, e.g. when trying to unpack the binary/sets files from the
INSTALL kernel (which has no ohci* driver and no other USB device

	pciide0:0:0: lost interrupt
		type: atapi tc_bcount: 65536 tc_skip: 0
	pciide0:0:0: bus-master DMA error: missing interrupt, status=0x21
	cd0: transfer error, downgrading to PIO mode 4
	cd0(pciide0:0:0): using PIO mode 4
	pciide0:0:0: lost interrupt
		type: atapi tc_bcount: 0 tc_skip: 65536
	[[ ... ]]
	pciide0:0:0: lost interrupt
		type: atapi tc_bcount: 0 tc_skip: 65536
	[[ ... ]]
	pciide0:0:0: lost interrupt
		type: atapi tc_bcount: 0 tc_skip: 8192

This seems to almost exactly match what was reported in PR#16379 and the
thread that lead up to that PR, except that I don't seem to see any
corresponding "stray IRQ" messages.

I find the following in sys/arch/alpha/pci/pci_6600.c:

revision 1.2
date: 2000/03/19 02:25:29;  author: thorpej;  state: Exp;  lines: +69 -26
branches:  1.2.2;
Add support for mapping the OHCI USB controller interrupt (which is wired toan ISA IRQ because it's in the same package as the PCI-ISA bridge).

However on the ES40 the device probes as follows:

	ohci0 at pci0 dev 19 function 0: Acer Labs M5237 USB Host Controller (rev. 0x03)
	ohci0: interrupting at isa irq 10
	ohci0: OHCI version 1.0, legacy support

So is it really on an ISA IRQ when it probes as a PCI device?

According to the SRM's "show config" the only thing that actually seems
to be on the ISA bus is the floppy (of the things it knows about):

P00>>>show config
                           hp AlphaServer ES40

SRM Console:    V6.7-1
ARC Console:    v5.71
PALcode:        OpenVMS PALcode V1.98-104, Tru64 UNIX PALcode V1.92-105
Serial ROM:     V2.12-F  
RMC ROM:        V1.0
RMC Flash ROM:  V2.8

CPU 0           Alpha EV67 pass 2.6 666 MHz  8MB Bcache
CPU 1           Alpha EV67 pass 2.6 666 MHz  8MB Bcache
CPU 2           Alpha EV67 pass 2.6 666 MHz  8MB Bcache
CPU 3           Alpha EV67 pass 2.6 666 MHz  8MB Bcache

Core Logic
Cchip           DECchip 21272-CA Rev 9(C4)
Dchip           DECchip 21272-DA Rev 2
Pchip 0         DECchip 21272-EA Rev 2
Pchip 1         DECchip 21272-EA Rev 2
TIG             Rev 10

  Array       Size       Base Address    Intlv Mode
---------  ----------  ----------------  ----------
    0       4096Mb     0000000000000000    4-Way
    1       4096Mb     0000000100000000    4-Way
    2       4096Mb     0000000200000000    4-Way
    3       4096Mb     0000000300000000    4-Way

     16384 MB of System Memory

 Slot   Option                  Hose 0, Bus 0, PCI
   1    47551002                                    
   2/0  Adaptec AIC-7899        pkb0.            SCSI Bus ID 7
                                dkb0.            COMPAQ BF01864663
                                dkb100.          COMPAQ BF01864663
   2/1  Adaptec AIC-7899        pkc0.          SCSI Bus ID 7
   3    23121077/01001077                           
   4    DE500-BA Network Con    ewb0.            08-00-2B-C4-B5-26
   7    Acer Labs M1543C                                Bridge to Bus 1, ISA
  15    Acer Labs M1543C IDE    dqa.        
                                dqa0.           COMPAQ CDR-8435
  19    Acer Labs M1543C USB                        

        Option                  Hose 0, Bus 1, ISA
        Floppy                  dva0.0.0.1000.0     

 Slot   Option                  Hose 1, Bus 0, PCI
   1    DE500-BA Network Con    ewa0.            08-00-2B-C4-7A-70
   2    23121077/01001077                           
   4    NCR 53C895              pka0.            SCSI Bus ID 7
   6    DEGXA-TA Gigabit Eth    ega0.            00-08-02-91-89-AE

Once a long time ago Ross Harvey posted about the PWS500au USB problems:
> Sigh, look at line 147 of alpha/pci/pci_6600.c. When I did the EV6             
> port the USB host bridge had 0xea in its PCI LINE register as well.            

Does this suggest that Nathan's  patches for USB on PWS500au to
pci_550.c still also need to be made to pci_6600.c?

Shall I build a PCI_CONFIG_DUMP kernel?

I still don't know how to ask the SRM for info about interrupts (or to
interpret what it may already have told me).

Maybe I should just toss out the stupid IDE CD-ROM and install a SCSI
one so that I can turn off the IDE controller too?  I have no problem
accessing SCSI disks -- at least not so far with labeling and newfs....

A post long ago (
suggests that upgrading the firmware helped get 1.5.3 to recognize the
USB devices on a DS10.  Does anyone know if it might also solve the
"lost interrupt" problem?

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>