2007-06-09 13:17:21

by Ralph Corderoy

[permalink] [raw]
Subject: How to get an IDE Hard Reset, not a Soft Reset?


Hi,

As I understand it, an IDE hard drive can be reset in three ways. A
power-on reset, a hard reset caused by pin 1 (RESET-) on the IDE
connector, and a soft reset (bit SRST in the device control register).
RESET- is held low on a power on, but can also be used later to do a
hard reset.

I can see there's an ioctl to do a soft reset, calling ide_do_reset(),
but how, from user space, can I do a hard reset? If it isn't possible
from user space, is it possible in the kernel? Pointers welcome.

Hard resets refreshes parts other soft resets cannot reach. E.g. the
Expire flag (bit 4) of word 128 in the identify device info.

(Please keep me CC'd.)

Cheers,


Ralph.


2007-06-09 13:39:37

by Ondrej Zary

[permalink] [raw]
Subject: Re: How to get an IDE Hard Reset, not a Soft Reset?

On Saturday 09 June 2007 15:10:31 Ralph Corderoy wrote:
> Hi,
>
> As I understand it, an IDE hard drive can be reset in three ways. A
> power-on reset, a hard reset caused by pin 1 (RESET-) on the IDE
> connector, and a soft reset (bit SRST in the device control register).
> RESET- is held low on a power on, but can also be used later to do a
> hard reset.

The RESET pin is often wired to the system RESET signal, so there is no way to
control it separately.

--
Ondrej Zary

2007-06-11 11:14:59

by Ralph Corderoy

[permalink] [raw]
Subject: Re: How to get an IDE Hard Reset, not a Soft Reset?


Hi Ondrej,

Ondrej Zary wrote:
> Ralph Corderoy wrote:
> > As I understand it, an IDE hard drive can be reset in three ways. A
> > power-on reset, a hard reset caused by pin 1 (RESET-) on the IDE
> > connector, and a soft reset (bit SRST in the device control
> > register). RESET- is held low on a power on, but can also be used
> > later to do a hard reset.
>
> The RESET pin is often wired to the system RESET signal, so there is
> no way to control it separately.

Yes, I think you're correct. I found a south bridge spec.,
http://www.tser.org/vt8231/vt8231.pdf, and I don't see a pin for driving
an IDE RESET-.

Oh well, I suppose I either dike out RESET- from the IDE cable and wire
it up to a serial or parallel port, or give up using a PC for the task
and use a dedicated circuit.

Thanks for your help.


Ralph.