[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DMA disabled after lost interrupt (on ibook)



Benjamin Herrenschmidt wrote:
> On Wed, 2005-08-03 at 23:00 +0200, Vivenzio Pagliari wrote:
> 
>>>>Yes, exactly same machine and same symptoms.
>>>>i see these messages since a loooong time.
>>>>
>>>>it happens when i copy big files or when i do huge & fast files transfert
>>>>via ftp/scp.
>>>
>>>Both of you are using Apple shipped hard disk or you replaced it ? We
>>>might have to limit the timings to UDMA/4 on these machines it seems...
>>>
>>>Ben
>>
>>Hi,
>>
>>I had that "lost interrupt" another time today:
>>
>>Aug  3 21:51:56 garfield kernel: ide-pmac lost interrupt, \
>>    dma status: 8400
>>Aug  3 21:51:56 garfield kernel: hda: lost interrupt
>>Aug  3 21:51:56 garfield kernel: hda: dma_intr: status=0xd0 { Busy }
>>Aug  3 21:51:56 garfield kernel:
>>Aug  3 21:51:56 garfield kernel: ide: failed opcode was: unknown
>>Aug  3 21:51:56 garfield kernel: hda: DMA disabled
>>Aug  3 21:51:56 garfield kernel: ide0: reset: success
>>
>>Just in case that it may be of interest: I had configured my kernel
>>(2.6.12.1) with CONFIG_PREEMPT=y.
>>Several people on the list say that using PREEMPT is a bad idea on
>>on ppc, so I've recompiled the kernel (now using 2.6.12.3) without it.
>>But I guess this will not make any difference here, since I remember to
>>have seen this problem already when I used a kernel from the Debian
>>binary package (where PREEMPT is disabled).
> 
> 
> Can you try tweaking the driver in drivers/ide/ppc/pmac.c, and put this
> code in #if 0 :
> 
> 	/* Get cable type from device-tree */
> 	if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
> 	    || pmif->kind == controller_k2_ata6
> 	    || pmif->kind == controller_sh_ata6) {
> 		char* cable = get_property(np, "cable-type", NULL);
> 		if (cable && !strncmp(cable, "80-", 3))
> 			pmif->cable_80 = 1;
> 	}
> 	/* G5's seem to have incorrect cable type in device-tree. Let's assume
> 	 * they have a 80 conductor cable, this seem to be always the case unless
> 	 * the user mucked around
> 	 */
> 	if (device_is_compatible(np, "K2-UATA") ||
> 	    device_is_compatible(np, "shasta-ata"))
> 		pmif->cable_80 = 1;
> 
> (That is make sure cable_80 is never set to 1)
> 
> That will have the effect of slowing down your interface to U/DMA2. Let me know if
> that helps.
> 
> Ben.
> 

After two days of testing the proposed tweak, I was able to trigger the
lost interrupt message another time. So it didn't help :-(

In addition to the above tweak, I also defined IDE_PMAC_DEBUG in pmac.c.
Then, /var/log/kern.log says (I hope that I catched all of the important
messages concerning /dev/hda):

...
Aug 10 21:38:51 garfield kernel: ide0: Found Apple UniNorth ATA-6 controller, \
    bus ID 3, irq 39
Aug 10 21:38:51 garfield kernel: Probing IDE interface ide0...
Aug 10 21:38:51 garfield kernel: hda: Hitachi IC25N040ATMR04-0, ATA DISK drive
Aug 10 21:38:51 garfield kernel: hda: Enabling Ultra DMA 2
Aug 10 21:38:51 garfield kernel: ide0 at 0xe9022000-0xe9022007,0xe9022160 on irq 39
...
Aug 10 21:38:51 garfield kernel: hda: max request size: 1024KiB
Aug 10 21:38:51 garfield kernel: hda: 78140160 sectors (40007 MB) \
    w/1740KiB Cache, CHS=16383/255/63, UDMA(33)
Aug 10 21:38:51 garfield kernel: hda: cache flushes supported
Aug 10 21:38:51 garfield kernel:  hda: [mac] hda1 hda2 hda3 hda4 hda5 hda6 hda7 hda8 hda9
...
Aug 10 21:38:58 garfield kernel: hda: Set PIO timing for mode 0, reg: 0x08618a92
...
Aug 10 22:23:31 garfield kernel: ide-pmac lost interrupt, dma status: 8400
Aug 10 22:23:31 garfield kernel: hda: lost interrupt
Aug 10 22:23:31 garfield kernel: hda: dma_intr: status=0xd0 { Busy }
Aug 10 22:23:31 garfield kernel:
Aug 10 22:23:31 garfield kernel: ide: failed opcode was: unknown
Aug 10 22:23:31 garfield kernel: hda: DMA disabled
Aug 10 22:23:31 garfield kernel: ide0: reset: success
...
Aug 10 22:24:20 garfield kernel: hda: Enabling Ultra DMA 2

Tell me, if you need more information or if I could do anything else
to help analysing this problem.

Vivenzio



Reply to: