public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mike Black" <mblack@csi-inc.com>
To: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Hotswap IDE
Date: Thu, 5 Feb 2004 07:50:46 -0500	[thread overview]
Message-ID: <000701c3ebe6$ac5b35d0$c8de11cc@black> (raw)

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

             reply	other threads:[~2004-02-05 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05 12:50 Mike Black [this message]
2004-02-05 23:39 ` Hotswap IDE Johannes Stezenbach
2004-02-06 19:02   ` Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000701c3ebe6$ac5b35d0$c8de11cc@black' \
    --to=mblack@csi-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox