From: Jeff Garzik <jgarzik@pobox.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [patch] libata: add ioctls to support SMART
Date: Mon, 30 Aug 2004 13:19:59 -0400 [thread overview]
Message-ID: <413361BF.8020805@pobox.com> (raw)
In-Reply-To: <200408301531.i7UFVBg29089@ra.tuxdriver.com>
John W. Linville wrote:
> Support for HDIO_DRIVE_CMD and HDIO_DRIVE_TASK in libata. Useful for
> supporting SMART w/ unmodified smartctl and smartd userland binaries.
First let me say that it's a damn fine first attempt, and people should
be able to use this for SMART until support is merged officially.
> Not happy w/ loop after failed ata_qc_new_init(), but needed because smartctl
> and smartd did not retry after failure. Likely need an option to wait for
> available qc? Also not sure all the error return codes are correct...
I'd like to implement it a bit differently, and I think this different
method will solve some of the open questions you have.
Take a look at http://www.t10.org/ftp/t10/document.04/04-260r2.pdf
I would like to implement HDIO_DRIVE_CMD and HDIO_DRIVE_TASK completely
inside libata-scsi.c. These ioctls should translate the ioctl arguments
into an ATA-passthru SCSI command, and use the standard "issue a scsi
command" kernel API to submit the command and wait for a result.
That implies, then, that you would add code to libata-scsi.c that
translates the ATA-passthru SCSI command into an ATA command using the
ata_scsi_translate() infrastructure.
Note that you'll need to make up a SCSI opcode, inside the SCSI
vendor-specific opcode space, since the ATA-passthru hasn't yet been
assigned an official SCSI opcode. SPC-3
(http://www.t10.org/ftp/t10/drafts/spc3/spc3r20a.pdf) lists the
available opcodes in section C.3, denoted with a 'V' across all columns.
Once libata-scsi.c can handle the ATA-passthru SCSI command,
implementing HDIO_DRIVE_{TASK,CMD} should be quite trivial.
And SMART support will be complete :)
Jeff
next prev parent reply other threads:[~2004-08-30 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 15:31 [patch] libata: add ioctls to support SMART John W. Linville
2004-08-30 17:19 ` Jeff Garzik [this message]
2004-08-30 17:42 ` Andy Warner
2004-08-30 17:58 ` Jeff Garzik
2004-08-30 17:35 ` Brad Campbell
2004-08-30 17:44 ` Jeff Garzik
2004-08-30 17:47 ` Prakash K. Cheemplavam
2004-08-30 17:51 ` John W. Linville
2004-08-31 8:47 ` Prakash K. Cheemplavam
2004-08-31 8:52 ` Jeff Garzik
2004-08-31 8:59 ` Prakash K. Cheemplavam
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=413361BF.8020805@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).