* Hotswap IDE
@ 2004-02-05 12:50 Mike Black
2004-02-05 23:39 ` Johannes Stezenbach
0 siblings, 1 reply; 3+ messages in thread
From: Mike Black @ 2004-02-05 12:50 UTC (permalink / raw)
To: linux-kernel
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 permitted
using_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 mblack@csi-inc.com
http://www.csi-inc.com/
http://www.csi-inc.com/~mike
321-676-2923, x203
Melbourne FL
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Hotswap IDE
2004-02-05 12:50 Hotswap IDE Mike Black
@ 2004-02-05 23:39 ` Johannes Stezenbach
2004-02-06 19:02 ` Bill Davidsen
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Stezenbach @ 2004-02-05 23:39 UTC (permalink / raw)
To: Mike Black; +Cc: linux-kernel
Mike Black wrote:
> 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
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/hdc
Maybe that works better than -U/-R ?
Johannes
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Hotswap IDE
2004-02-05 23:39 ` Johannes Stezenbach
@ 2004-02-06 19:02 ` Bill Davidsen
0 siblings, 0 replies; 3+ messages in thread
From: Bill Davidsen @ 2004-02-06 19:02 UTC (permalink / raw)
To: Johannes Stezenbach; +Cc: Mike Black, linux-kernel
Johannes Stezenbach wrote:
> Mike Black wrote:
>
>>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
>
>
> 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/hdc
>
> Maybe 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.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-06 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05 12:50 Hotswap IDE Mike Black
2004-02-05 23:39 ` Johannes Stezenbach
2004-02-06 19:02 ` Bill Davidsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox