scsi-generic: Fill in opt_xfer_len in INQUIRY reply if it is zero
authorFam Zheng <famz@redhat.com>
Mon, 27 Mar 2017 14:26:25 +0000 (22:26 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Mar 2017 15:02:07 +0000 (17:02 +0200)
commitbed58b4443b001227b953dca80ce76fa76ea0fc1
treee088e754f69bfe5d082732e4e0c90f8db99a70b5
parent5354edd286ea6e956b81da66c9dcc5e47028198e
scsi-generic: Fill in opt_xfer_len in INQUIRY reply if it is zero

When opt_xfer_len is zero, Linux ignores max_xfer_len erroneously.

While that obviously should be fixed, we do older guests a favor to
always filling in a value.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170327142625.1249-1-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-generic.c