Hi,

i forgot to address this concern:

Paolo Bonzini wrote:
> The page length is indeed 18 for IDE and 20 for SCSI.  I made some changes
> to that page recently, but left the 18 because I feared causing regression.
> But if that is a bug, we can probably fix it in 1.0.

The SCSI client is supposed to announce a maximum desired amount of
reply data with MODE SENSE. I see this Allocation Length in use
inside hw/ide/atapi.c:cmd_mode_sense()

      if (buf[0] == GPCMD_MODE_SENSE_10) {
          max_len = ube16_to_cpu(buf + 7);
      } else {
          max_len = buf[4];
      }
      ...
      ide_atapi_cmd_reply(s, 28, max_len);

and

  static void ide_atapi_cmd_reply(IDEState *s, int size, int max_size)
  {
      if (size > max_size)
         size = max_size;

So no driver or application should get overwhelmed by two bytes more
of size, if it correctly submitted its own desired number as Allocation
Length of the commands MODE SENSE(6) or MODE SENSE(10).


Have a nice day :)

Thomas


Reply via email to