Skip to contentSkip to conversation

reset IOCTLs

DISCUSSION Kantor Zsolt 2 participants 4 messages Dec 3, 2007 – Dec 4, 2007 libata

lore
Share & tools
lore
#0 lore raw

Can somebody tell me what is the difference between these reset commands (I'm developing an open source application and I would like to know this): one is in the cdrom.h (CDROMRESET - 0x5312), and the second with the third are in the hdreg.h (HDIO_DRIVE_RESET - 0x031c, WIN_DEVICE_RESET - 0x08)

Thanks
Kantor

      ____________________________________________________________________________________

Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

#1 lore raw

Hello.

Quoted 2 lines · Kantor Zsolt

Can somebody tell me what is the difference between these reset commands (I'm developing an open source application and I would like to know this): one is in the cdrom.h (CDROMRESET - 0x5312),

This one seems to be handled only by discrete (non-IDE) CD-ROM drivers.

Quoted 1 line

and the second with the third are in the hdreg.h (HDIO_DRIVE_RESET - 0x031c,

This gets handled as the usual IDE reset, i.e. wia SRST bit of the device
control register.

Quoted 1 line

WIN_DEVICE_RESET - 0x08)

This is not an ioctl() at all but ATAPI Device Reset command which can be
use dto reset ATAPI device insted of the usual IDE reset.

Quoted 2 lines

Thanks
Kantor

MBR, Sergei

#2 lore raw
Quoted 18 lines · --- Sergei Shtylyov

Hello.

Quoted 1 line · Kantor Zsolt

Can somebody tell me what is the difference between these reset commands (I'm developing an

open

Quoted 1 line

source application and I would like to know this): one is in the cdrom.h (CDROMRESET -

0x5312),

This one seems to be handled only by discrete (non-IDE) CD-ROM drivers.

Quoted 1 line

and the second with the third are in the hdreg.h (HDIO_DRIVE_RESET - 0x031c,

This gets handled as the usual IDE reset, i.e. wia SRST bit of the device
control register.

Quoted 1 line

WIN_DEVICE_RESET - 0x08)

Quoted 8 lines

This is not an ioctl() at all but ATAPI Device Reset command which can be
use dto reset ATAPI device insted of the usual IDE reset.

Quoted 2 lines

Thanks
Kantor

MBR, Sergei

Thanks a lot ! I have one more question: I see that the HDIO_DRIVE_RESET - 0x031c is a soft reset, but the WIN_DEVICE_RESET - 0x08 for ATAPI devices is a soft reset too ? and the first one for non-IDE CD-ROMs is a hard reset ? because in the cdrom.h file states this: CDROMRESET 0x5312 /* hard-reset the drive */

Cheers
Kantor

      ____________________________________________________________________________________

Get easy, one-click access to your favorites.
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs

#3 lore raw
Quoted 2 lines · Kantor Zsolt

Thanks a lot ! I have one more question: I see that the HDIO_DRIVE_RESET - 0x031c is a soft reset, but the WIN_DEVICE_RESET - 0x08 for ATAPI devices is a soft reset too ?

Yes.

Quoted 2 lines

and the first one for
non-IDE CD-ROMs is a hard reset ?

Don't know.

Quoted 5 lines

because in the cdrom.h file states this: CDROMRESET 0x5312 /* hard-reset the drive */

Cheers
Kantor

MBR, Sergei