From: Floris Bos / Maxnet <bos@je-eigen-domein.nl>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] ide: Adds wwn=hex qdev option allowing the user to specify a disk's World Wide Name
Date: Tue, 13 Mar 2012 13:29:56 +0100 [thread overview]
Message-ID: <4F5F3DC4.1070409@je-eigen-domein.nl> (raw)
In-Reply-To: <4F5F3861.2080308@redhat.com>
On 03/13/2012 01:06 PM, Kevin Wolf wrote:
> Am 13.03.2012 11:29, schrieb Stefan Hajnoczi:
>> On Mon, Mar 12, 2012 at 8:05 PM, Floris Bos<bos@je-eigen-domein.nl> wrote:
>>> diff --git a/hw/ide/core.c b/hw/ide/core.c
>>> index 3e50c52..b48e5c2 100644
>>> --- a/hw/ide/core.c
>>> +++ b/hw/ide/core.c
>>> @@ -166,6 +166,13 @@ static void ide_identify(IDEState *s)
>>> if (dev&& dev->conf.discard_granularity) {
>>> put_le16(p + 169, 1); /* TRIM support */
>>> }
>>> +
>>> + if (s->wwn) {
>>> + put_le16(p + 108, s->wwn>> 48);
>>> + put_le16(p + 109, s->wwn>> 32);
>>> + put_le16(p + 110, s->wwn>> 16);
>>> + put_le16(p + 111, s->wwn);
>>> + }
>> Little-endian 16-bit seems weird at first but the spec requires it, so
>> it's fine. A comment would be nice.
>>
>> ATA8-ACS says:
>>
>> "Bit 8 of word 84 shall be set to one indicating the mandatory World
>> Wide Name in words 108-111 is supported."
>>
>> I think we're missing this.
> And this:
>
> "Bit 8 of word 87 is a copy of word 84 bit 8."
>
> Otherwise the series looks good to me.
>
> Kevin
Oops, you are right, overlooked those bits.
Linux only seems to care that the WWN starts with a 5, and doesn't look
at the bits, so it didn't turn up in my testing either.
Will send a fixed patch.
Yours sincerely,
Floris Bos
next prev parent reply other threads:[~2012-03-13 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 20:05 [Qemu-devel] [PATCH 1/3] ide: Adds "model=s" qdev option, allowing the user to override the default disk model name "QEMU HARDDISK" Floris Bos
2012-03-12 20:05 ` [Qemu-devel] [PATCH 2/3] Disk serial number string copy function: change strncpy() to pstrcpy() Floris Bos
2012-03-14 18:32 ` Markus Armbruster
2012-03-12 20:05 ` [Qemu-devel] [PATCH 3/3] ide: Adds wwn=hex qdev option allowing the user to specify a disk's World Wide Name Floris Bos
2012-03-13 10:29 ` Stefan Hajnoczi
2012-03-13 12:06 ` Kevin Wolf
2012-03-13 12:29 ` Floris Bos / Maxnet [this message]
2012-03-13 10:14 ` [Qemu-devel] [PATCH 1/3] ide: Adds "model=s" qdev option, allowing the user to override the default disk model name "QEMU HARDDISK" Stefan Hajnoczi
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=4F5F3DC4.1070409@je-eigen-domein.nl \
--to=bos@je-eigen-domein.nl \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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.