All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, fam@euphon.net, laurent@vivier.eu,
	hpoussin@reactos.org
Subject: Re: [PATCH 4/5] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun"
Date: Fri, 11 Jun 2021 12:52:08 +0100	[thread overview]
Message-ID: <7ac9b89f-6c7b-84fe-ef71-d435f89bf6ff@ilande.co.uk> (raw)
In-Reply-To: <792a6be1-0738-dab1-564e-939567f0d38b@redhat.com>

On 11/06/2021 12:38, Paolo Bonzini wrote:

> On 09/06/21 17:31, Mark Cave-Ayland wrote:
>> Due to the absence of the IDENTIFY byte in the S case I'm guessing from the patch 
>> that the LUN is in encoded in buf[1] (the top bits being "Reserved" according to my 
>> copy of the specification).
> 
> They used to be the LUN many years ago.

Got it :)

>>   static void s_without_satn_pdma_cb(ESPState *s)
>>   {
>> +    uint8_t busid;
>> +
>>       if (!esp_get_tc(s) && !fifo8_is_empty(&s->cmdfifo)) {
>>           s->cmdfifo_cdb_offset = 0;
>>           s->do_cmd = 0;
>> -        do_busid_cmd(s, 0);
>> +        busid = s->cmdfifo.data[1] >> 5;
>> +        do_busid_cmd(s, busid);
>>       }
>>   }
> 
> Considering how obsolete the LUN-in-CDB case is (and now that I actually understand 
> that the first byte is a message-phase byte), it is probably be more correct to keep 
> the previous busid: with no message phase, the previously-selected LUN would be 
> addressed.  I can send a patch for this, but it's orthogonal to this one so I queued 
> it as well.

That was going to be my next question - how do you determine the LUN if there is no 
message phase byte? But that makes sense to me. I don't think that I have a 
LUN-in-CDB example in my set of ESP test images, but I'm happy to run them against 
your patch and make sure there are no regressions.


ATB,

Mark.


  reply	other threads:[~2021-06-11 11:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 10:07 [PATCH 0/5] esp: fixes for MacOS toolbox ROM Mark Cave-Ayland
2021-05-19 10:07 ` [PATCH 1/5] esp: allow non-DMA callback in esp_transfer_data() initial transfer Mark Cave-Ayland
2021-05-19 10:08 ` [PATCH 2/5] esp: handle non-DMA transfers from the target one byte at a time Mark Cave-Ayland
2021-05-19 10:08 ` [PATCH 3/5] esp: ensure PDMA write transfers are flushed from the FIFO to the target immediately Mark Cave-Ayland
2021-05-19 10:08 ` [PATCH 4/5] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun" Mark Cave-Ayland
2021-06-09 12:13   ` Paolo Bonzini
2021-06-09 15:31     ` Mark Cave-Ayland
2021-06-11 11:38       ` Paolo Bonzini
2021-06-11 11:52         ` Mark Cave-Ayland [this message]
2021-05-19 10:08 ` [PATCH 5/5] esp: correctly accumulate extended messages for PDMA Mark Cave-Ayland
2021-05-28  7:11 ` [PATCH 0/5] esp: fixes for MacOS toolbox ROM Mark Cave-Ayland
2021-06-07 11:00   ` Mark Cave-Ayland
2021-06-09 12:13 ` Paolo Bonzini

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=7ac9b89f-6c7b-84fe-ef71-d435f89bf6ff@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=fam@euphon.net \
    --cc=hpoussin@reactos.org \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --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 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.