2006-10-24 15:05:23

by Panagiotis Issaris

[permalink] [raw]
Subject: [BUG] DMA timeout errors on Dell Latitude XPi CD P150ST

Hi,

When booting Linux 2.6.19-rc3 (or 2.6.8-16sarge5 so it is not specific
to the current kernels) on a friends laptop, I'm getting a lot of
errormessages from the IDE controller related to DMA problems. When
disabling all DMA related options, the kernel boots fine (and fast).
With DMA enabled, it takes about 1 minute to stumble over the DMA
problems. The laptop is Dell Latitude XPi CD P150ST.

...
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD643: IDE controller at PCI slot 0000:00:08.0
CMD643: chipset revision 0
CMD643: not 100% native mode: will probe irqs later
CMD643: simplex device: DMA forced
ide0: BM-DMA at 0xfe00-0xfe07, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xfe08-0xfe0f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: IBM-DCRA-22160, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: CD-ROM CDR-N16D, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 4233600 sectors (2167 MB) w/96KiB Cache, CHS=4200/16/63, DMA
hda: cache flushes not supported
hda:<4>hda: dma_timer_expiry: dma status == 0x24
hda: DMA timeout error
hda: dma timeout error: status=0x50 { DriveReady SeekComplete }
ide: failed opcode was: unknown
hda1 hda2 <<4>hda: dma_timer_expiry: dma status == 0x24
hda: DMA timeout error
hda: dma timeout error: status=0x50 { DriveReady SeekComplete }
ide: failed opcode was: unknown
hda5 >
hdc: ATAPI 6X CD-ROM drive, 32768kB Cache, DMA
...


Afterwards, when accessing the cdrom (hdc) again, it takes about a
minute showing all
kinds of errors:
ide-cd: cmd 0x28 timed out
hdc: DMA timeout retry
hdc: timeout waiting for DMA
hdc: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hdc: drive not ready for command
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand
LastFailedSense=0x03 }
ide: failed opcode was: unknown
ATAPI device hdc:
Error: Medium error -- (Sense key=0x03)
(reserved error code) -- (asc=0x02, ascq=0x00)
The failed "Read 10" packet command was:
"28 00 00 00 00 10 00 00 02 00 00 00 00 00 00 00 "
end_request: I/O error, dev hdc, sector 64
Buffer I/O error on device hdc, logical block 8

uname:
Linux haard 2.6.19-rc3 #8 Tue Oct 24 16:09:11 CEST 2006 i586 GNU/Linux

cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 2
model name : Pentium 75 - 200
stepping : 12
cpu MHz : 150.348
cache size : 0 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8
bogomips : 301.97

lspci:
0000:00:00.0 Host bridge: PicoPower Technology PT86C521 [Vesuvius v1]
Host Bridge (rev 04)
0000:00:06.0 ISA bridge: PicoPower Technology PT86C523 [Vesuvius v3]
PCI-ISA Bridge Slave
0000:00:07.0 VGA compatible controller: Neomagic Corporation NM2090
[MagicGraph 128V] (rev 01)
0000:00:08.0 IDE interface: Silicon Image, Inc. (formerly CMD
Technology Inc) PCI0643
0000:00:09.0 CardBus bridge: Texas Instruments PCI1130 (rev 04)
0000:00:09.1 CardBus bridge: Texas Instruments PCI1130 (rev 04)

lspci -vv, kernel config and dmesg attached.

With friendly regards,
Takis


Attachments:
(No filename) (3.35 kB)
lspcivv.txt (2.80 kB)
dmesg.txt (9.49 kB)
config.txt (23.34 kB)
Download all attachments

2006-10-24 15:31:31

by Oleg Verych

[permalink] [raw]
Subject: Re: [BUG] DMA timeout errors on Dell Latitude XPi CD P150ST

On 2006-10-24, Panagiotis Issaris wrote:
> ------=_Part_12761_28196610.1161702311028
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> Hi,
>
> When booting Linux 2.6.19-rc3 (or 2.6.8-16sarge5 so it is not specific
> to the current kernels) on a friends laptop, I'm getting a lot of
> errormessages from the IDE controller related to DMA problems. When
[]
> cpuinfo:
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 5
> model : 2
> model name : Pentium 75 - 200

Are we in museum?..

> stepping : 12
> cpu MHz : 150.348
> cache size : 0 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no

(without even f00f bug?) ... no we are not ;)

> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu vme de pse tsc msr mce cx8
> bogomips : 301.97
>
[]
> eQpDT05GSUdfR0VORVJJQ19JUlFfUFJPQkU9eQpDT05GSUdfWDg2X0JJT1NfUkVCT09UPXkKQ09O
> RklHX0tUSU1FX1NDQUxBUj15Cg==
> ------=_Part_12761_28196610.1161702311028--

____

2006-10-25 09:24:56

by Panagiotis Issaris

[permalink] [raw]
Subject: Re: [BUG] DMA timeout errors on Dell Latitude XPi CD P150ST

Hi,

Panagiotis Issaris <panagiotis <at> gmail.com> writes:
> When booting Linux 2.6.19-rc3 (or 2.6.8-16sarge5 so it is not specific
> to the current kernels) on a friends laptop, I'm getting a lot of
> errormessages from the IDE controller related to DMA problems. When
> disabling all DMA related options, the kernel boots fine (and fast).
> With DMA enabled, it takes about 1 minute to stumble over the DMA
> problems. The laptop is Dell Latitude XPi CD P150ST.
Debian developer Frederik Schueler noted that as far as he knows the laptop does
not support DMA.

It seems that in drivers/ide/setup-pci.c, DMA is being forced on:
177 static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif)
...
225 switch(dev->device) {
...
22x case PCI_DEVICE_ID_CMD_643:
...
234 if (simplex_stat & 0x80) {
235 printk(KERN_INFO "%s: simplex device: "
236 "DMA forced\n",
...
240 default:
241 /*
242 * If the device claims "simplex" DMA,
243 * this means only one of the two interfaces
244 * can be trusted with DMA at any point in time.
245 * So we should enable DMA only on one of the
246 * two interfaces.
247 */
...
259 printk(KERN_INFO "%s: simplex device: "
260 "DMA disabled\n",
...

I would guess it would be enough to remove the PCI_DEVICE_ID_CMD_643 and let it
be handled by the default case, thus disabling DMA. I will try the attached
patch on my friends laptop as soon as he brings it along.

With friendly regards,
Takis

diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 0719b64..5a7b6f6 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -226,7 +226,6 @@ #endif /* CONFIG_BLK_DEV_IDEDMA_FORCED *
case PCI_DEVICE_ID_AL_M5219:
case PCI_DEVICE_ID_AL_M5229:
case PCI_DEVICE_ID_AMD_VIPER_7409:
- case PCI_DEVICE_ID_CMD_643:
case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:
case PCI_DEVICE_ID_REVOLUTION:
simplex_stat = hwif->INB(dma_base + 2);


2006-10-25 23:37:18

by Alan

[permalink] [raw]
Subject: Re: [BUG] DMA timeout errors on Dell Latitude XPi CD P150ST

Ar Mer, 2006-10-25 am 09:24 +0000, ysgrifennodd Panagiotis Issaris:
> I would guess it would be enough to remove the PCI_DEVICE_ID_CMD_643 and let it
> be handled by the default case, thus disabling DMA. I will try the attached
> patch on my friends laptop as soon as he brings it along.

This has nothing to do with whether DMA is enabled and is wrong. The
decision about whether to honour BIOS DMA settings is a config option
and has been for years.

If this specific laptop does need not to use DMA, and Win*** also shows
the same behaviour then we can certainly add it to a list of some kind,
OTOH if windows DMA works I'd like to know -why-

Alan