Re: What's going on with my IDE devices ?
From: Peter T. Breuer (ptb_at_lab.it.uc3m.es)
Date: 11/24/04
- Next message: patrick carosso: "[OT?] 3d rendering on Linux"
- Previous message: kier: "Re: Does Linux really Suck?"
- In reply to: Jay: "Re: What's going on with my IDE devices ?"
- Next in thread: don_pettengill_at_spamgilent.com: "Re: What's going on with my IDE devices ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Nov 2004 11:41:43 +0100
Jay <jay@free.fr> wrote:
> Peter T. Breuer wrote:
> > Jay <jay@free.fr> wrote:
> >
> >>My question is : I know my hdb is certainly dying but why does the
> >>kernel disable DMA on my hda since it's my hdb which has errors ! It'd
> >>be more logical to disable DMA on the faulty disk, not on the other one,
> >> wouldn't it ?
> >
> > It's disabled on your controller, I suppose. I don't know why you think
> > it's disk oriented - what evidence do you have in support of that idea?
>
> Right after boot, hdparm -d /dev/hda tells me DMA is off while hdparm -d
> /dev/hdb tells me it's on.
>
> Also the /var/log/syslog lines :
>
> Nov 23 22:15:46 xp kernel: hdb: dma_intr: error=0x84 { DriveStatusError BadCRC }
> Nov 23 22:15:46 xp kernel: hda: DMA disabled
> Nov 23 22:15:46 xp kernel: ide0: reset: success
OK. I'm not clear myself on whether dma is per-controller, per-bus, or
per-disk. Logically it is per-controller, since the dma in question is
between the cpu and _something_, and the cpu can talk to the controller
at the other end of the data bus using the mobo circuits, but the disks
are just not on the mobo to be talked to.
However, maybe controllers have a pass-through mode in which dma
somehow gets to the disk from the cpu? Then what on earth is their ide
bus for?
At any rate, it seems completely the correct response programmatically
to me, when a dma failure is observed, to disable dma on the controller.
The relevant code is in ide-dma.c. It says:
* DMA is supported for all IDE devices (disk drives, cdroms, tapes,
* floppies).
*
* By default, DMA support is prepared for use, but is currently enabled only
* for drives which already have DMA enabled (UltraDMA or mode 2 multi/single),
* or which are recognized as "good" (see table below). Drives with only mode0
* or mode1 (multi/single) DMA should also work with this chipset/driver
* (eg. MC2112A) but are not enabled by default.
*
...
* To enable DMA, use "hdparm -d1 /dev/hd?" on a per-drive basis after booting.
* If problems arise, ide.c will disable DMA operation after a few retries.
* This error recovery mechanism works and has been extremely well exercised.
...
*
* Keep an eye on /var/adm/messages for "DMA disabled" messages.
*
* Some people have reported trouble with Intel Zappa motherboards.
...
Now the actual code allows switching off dma on a drive per drive
basis:
/**
* __ide_dma_off - disable DMA on a device
* @drive: drive to disable DMA on
*
* Disable IDE DMA for a device on this IDE controller.
* Inform the user that DMA has been disabled.
*/
int __ide_dma_off (ide_drive_t *drive)
{
printk(KERN_INFO "%s: DMA disabled\n", drive->name);
return HWIF(drive)->ide_dma_off_quietly(drive);
}
EXPORT_SYMBOL(__ide_dma_off);
I can't see that this is called on every drive. So it looks ike
dma to your drive really did fail. It only turns dma off after several
tries.
Peter
- Next message: patrick carosso: "[OT?] 3d rendering on Linux"
- Previous message: kier: "Re: Does Linux really Suck?"
- In reply to: Jay: "Re: What's going on with my IDE devices ?"
- Next in thread: don_pettengill_at_spamgilent.com: "Re: What's going on with my IDE devices ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|