qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <1896342@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1896342] Re: IDE ATA IDENTIFY WORD 106
Date: Fri, 02 Oct 2020 19:54:45 -0000	[thread overview]
Message-ID: <160166848552.8719.13901119576504368187.malone@wampee.canonical.com> (raw)
In-Reply-To: 160054207000.14948.11107647546582134186.malonedeb@gac.canonical.com

You might be right, though at present it seems like it doesn't hurt
anything that I am aware of to claim that our mapping is 1:1 in such
cases.

Patches welcome; especially if there is any proof that this has caused
any problems anywhere.

--js

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1896342

Title:
  IDE ATA IDENTIFY WORD 106

Status in QEMU:
  New

Bug description:
  The code at line 202 in hw/ide/core.c
   (https://git.qemu.org/?p=qemu.git;a=blob;f=hw/ide/core.c;#l201)
  hard codes bit 13 set.  However, get_physical_block_exp() can and may return 0, which is a valid response. If get_physical_block_exp() does return zero, bit 13 should not be set.

  ATAPI8 states (Section 7.17.7.73):
   "Bit 13 of word 106 shall be set to one to indicate that the device has more than one logical sector per physical sector"

  and gives the examples:
    Bits (3:0): 0 = 2^0 = 1 logical sector per physical sector
    Bits (3:0): 1 = 2^1 = 2 logical sector per physical sector
    Bits (3:0): 2 = 2^2 = 4 logical sector per physical sector
    Bits (3:0): 3 = 2^3 = 8 logical sector per physical sector

  Therefore, if bit 13 is set, bits 3:0 must be greater than zero.

  If get_physical_block_exp() returns zero then there is a 1:1 ratio and
  bit 13 must be 0.

  Just my opinion.

  Thanks,
  Ben

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1896342/+subscriptions


  parent reply	other threads:[~2020-10-02 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 19:01 [Bug 1896342] [NEW] IDE ATA IDENTIFY WORD 106 Benjamin David Lunt
2020-09-19 19:38 ` [Bug 1896342] " Benjamin David Lunt
2020-10-02 19:54 ` John Snow [this message]
2021-05-09 13:59 ` Thomas Huth
2021-07-09  4:17 ` Launchpad Bug Tracker

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=160166848552.8719.13901119576504368187.malone@wampee.canonical.com \
    --to=1896342@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.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 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).