Hello all,

I need to send soft and/or hard resets from userspace. As no such
method exists, I decided to write one. I wrote a hackish sysfs
interface; now I'm cleaning it up for official submission. My current
plan is:

- each driver, in ata_port_operations, specifies a soft_reset and
hard_reset functions, which take ata_port* as a parameter
- in ata_scsi_pass_through, check for HARDRESET and SRST, and call
respective driver's soft/hard reset function

Now here's where I'm not quite certain on how to proceed. Another
developer has recommended that the reset be performed from an error
context, so that pre/post reset get called automatically. However,
there's a few issues, one of which is, as I was told, that the user
process will resume before the reset is complete. Thus the user sends
SG_IO and gets an immediate response, before the reset is finished,
whereas running the reset command directly blocks the user process
until the drive returns.

So the question is: should the driver simply call prereset, optionally
hardreset, softreset, and postreset, or set up the error handler
context to do it?

Thanks,

- Yasha
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to