Hotswap IDE
I use a removable IDE chassis to allow me to mirror my primary drive for offsite storage. I'd like to hotswap the IDE but can't seem to get the drive to allow DMA access after restarting it. A reboot is necessary for DMA access.
I'm using idectl from hdparm-5.4 which generates the following hdparm commands:/sbin/hdparm -U 1 /dev/hda/sbin/hdparm -R 0x170 0 0 /dev/hda
After doing an "idectl 1 off", "idectl 1 on" hdparm gives an error:
hdparm -d 1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)HDIO_SET_DMA failed: Operation not permittedusing_dma = 0 (off)
And strace shows the following ioctl failing:ioctl(3, 0x326, 0x1) = -1 EPERM (Operation not permitted)
I can set 32-bit I/O and unmask IRQ but not DMA.
During the hdparm add the kernel messages look just like the boot messages:
Feb 5 06:57:12 medusa kernel: ide1 at 0x170-0x177,0x376 on irq 15 Feb 5 06:57:12 medusa kernel: hdc: max request size: 1024KiB The re-add messages are missing one of the boot messages though: Feb 5 06:44:35 medusa kernel: hdc: WDC WD1200BB-00DWA0, ATA DISK drive
I've now been able to repeat this on two different motherboards and have had the problem with linux 2.4.24 and 2.6.2
Anybody have any idea why re-adding an IDE drive in this mannger prevents DMA access? Is anybody able to sucessfuly do this on their system?
Michael D. Black [email protected]
http://www.csi-inc.com/
http://www.csi-inc.com/~mike
321-676-2923, x203
Melbourne FL
Quoted 6 lines · Mike Black
I use a removable IDE chassis to allow me to mirror my primary drive for offsite storage. I'd like to hotswap the IDE but can't seem to get the drive to allow DMA access after restarting it. A reboot is necessary for DMA access.
I'm using idectl from hdparm-5.4 which generates the following hdparm commands:/sbin/hdparm-U 1/dev/hda/sbin/hdparm-R0x1700 0/dev/hda
I haven't tried myself, but Alan Cox did:
Linux 2.4.22-rc2-ac3
o Finish off the core IDE hotplug support (me)
| If your hardware supports it you can now
| hdparm -b0 /dev/hdc change drive hdparm -b1 /dev/hdcMaybe that works better than -U/-R ?
Johannes
Quoted 10 lines · Johannes Stezenbach
Quoted 6 lines · Mike Black
I use a removable IDE chassis to allow me to mirror my primary drive for offsite storage. I'd like to hotswap the IDE but can't seem to get the drive to allow DMA access after restarting it. A reboot is necessary for DMA access.
I'm using idectl from hdparm-5.4 which generates the following hdparm commands:/sbin/hdparm-U 1/dev/hda/sbin/hdparm-R0x1700 0/dev/hda
Quoted 8 lines
I haven't tried myself, but Alan Cox did:
Linux 2.4.22-rc2-ac3
o Finish off the core IDE hotplug support (me) | If your hardware supports it you can now | hdparm -b0 /dev/hdc change drive hdparm -b1 /dev/hdcMaybe that works better than -U/-R ?
I suspect that both might not be a bad thing, set the bus down and unregister, then set the bus up and register. Order may be important!
Let me know if you try this, I have been contemplating using a hotswap drive for data transfer.
Signature · 3 lines
bill davidsen <[email protected]> CTO TMR Associates, Inc Doing interesting things with small computers since 1979