[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] [v2] ide: Adds wwn=hex qdev option allowing
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] [v2] ide: Adds wwn=hex qdev option allowing the user to specify a disk's World Wide Name |
Date: |
Tue, 13 Mar 2012 14:28:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
Il 13/03/2012 14:22, Kevin Wolf ha scritto:
>>> >> put_le16(p + 82, (1 << 14) | (1 << 5) | 1);
>>> >> /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
>>> >> put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
>> >
>> > Bit 14 should not be set here. Not your fault, but perhaps you can fix
>> > it too?
>
> Table in the spec says: "14 - Shall be set to one"
uff, I hate those pages. The wrong one is word 86. Bit 14 is reserved
there. It's wrong in ide_cfata_identify, too.
>>> >> - /* 14=set to 1, 1=SMART self test, 0=SMART error logging */
>>> >> - put_le16(p + 84, (1 << 14) | 0);
>>> >> + /* 14=set to 1, 8=has WWN, 1=SMART self test, 0=SMART error logging
>>> >> */
>>> >> + if (s->wwn) {
>>> >> + put_le16(p + 84, (1 << 14) | (1 << 8) | 0);
>>> >> + } else {
>>> >> + put_le16(p + 84, (1 << 14) | 0);
>>> >> + }
>>> >> /* 14 = NOP supported, 5=WCACHE enabled, 0=SMART feature set
>>> >> enabled */
>>> >> if (bdrv_enable_write_cache(s->bs))
>>> >> put_le16(p + 85, (1 << 14) | (1 << 5) | 1);
>>> >> @@ -152,8 +156,12 @@ static void ide_identify(IDEState *s)
>>> >> put_le16(p + 85, (1 << 14) | 1);
>>> >> /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
>>> >> put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
> What about ide_cfata_identify, while we're at it? Or isn't it supported
> there?
No idea.
Paolo