|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 4/5] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun" |
Date: | Fri, 11 Jun 2021 13:38:51 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
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.
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.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |