All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: libata-passthrough problem.
Date: Sat, 12 Nov 2005 10:18:13 -0500	[thread overview]
Message-ID: <437607B5.7060605@rtr.ca> (raw)
In-Reply-To: <4375CA38.9000905@superbug.demon.co.uk>

James Courtier-Dutton wrote:
> I am using (at 12-Nov-2005)
> git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
> uname -r
> 2.6.15-rc1-gcd52d1ee
> I have found that although smartctl correctly displays different 
> information for /dev/sda and /dev/sdb, hdparm does not.
> hdparm displays the same info for /dev/sda and /dev/sdb
> i.e. hdparm -I /dev/sdb actually returns the information about /dev/sda
> 
> See below for details.
> 
> Is this a bug in hdparm or libata-devel ?
...
> # hdparm -I /dev/sda
> /dev/sda:
> ATA device, with non-removable media
>     Model Number:       ST3300831AS
>     Serial Number:      3NF0A9CQ
>     Firmware Revision:  3.01
> ...
> # hdparm -I /dev/sdb
> /dev/sdb:
> ATA device, with non-removable media
>     Model Number:       ST3300831AS
>     Serial Number:      3NF0A9CQ
>     Firmware Revision:  3.01

That would be a bug in libata passthru.

The reason the two programs behave differently in this example,
is that they likely use different HDIO_* ioctls, and libata/passthru
must have a bug in setting the unit number for the HDIO_DRIVE_CMD call.

We know it cannot be an hdparm bug, because HDIO_DRIVE_CMD does not
have a unit# parameter (and it would not be valid for libata to
accept one, either!).  All it does is open the /dev/ node,
and issue that call.   Use strace to verify that the correct device
is indeed being opened.

Is there a tarball of the latest libata-dev-git available?
Givent that, I could probably sift through libata/passthru and find/fix
the bug, but keeping up with git technology is something I gave up
trying to do ages ago --> it's really not for the casual developer.

Cheers

  reply	other threads:[~2005-11-12 15:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 10:55 libata-passthrough problem James Courtier-Dutton
2005-11-12 15:18 ` Mark Lord [this message]
2005-11-12 17:57   ` Jeff Garzik
2005-11-12 19:53     ` Mark Lord
2005-11-12 19:56       ` Mark Lord
2005-11-12 23:19         ` Jeff Garzik
2005-11-12 23:54           ` [PATCH 2.6.15-rc1] libata: fix passthru for slave devices Mark Lord
2005-11-12 23:55             ` [PATCH 2.6.15-rc1] libata: fix comments on ata_tf_from_fis() Mark Lord
2005-11-13  0:15             ` [PATCH 2.6.15-rc1] libata: fix passthru for slave devices Jeff Garzik
2005-11-13  2:50               ` Mark Lord
2005-11-13  3:20                 ` Jeff Garzik
2005-11-13  4:37                   ` Mark Lord
2005-11-13  0:16             ` Jeff Garzik
2005-11-13  2:48               ` Mark Lord
2005-11-13  3:04             ` Mark Lord
2005-11-13  3:11               ` Mark Lord
2005-11-12 23:19       ` libata-passthrough problem Jeff Garzik
2005-11-12 23:40         ` Mark Lord
2005-11-13 15:13           ` James Courtier-Dutton
2005-11-13 17:01             ` Mark Lord
2005-11-13 17:03               ` Mark Lord
2005-11-13 20:17                 ` James Courtier-Dutton

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=437607B5.7060605@rtr.ca \
    --to=liml@rtr.ca \
    --cc=James@superbug.demon.co.uk \
    --cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.