usb_block_drv: set inquiry response length to 36 bytes

Fixes #2825
This commit is contained in:
Christian Prochaska 2018-05-07 20:09:34 +02:00 committed by Christian Helmuth
parent cecd461f38
commit 5ac56be748
2 changed files with 8 additions and 2 deletions

View File

@ -206,7 +206,6 @@ struct Usb::Block_driver : Usb::Completion,
using namespace Scsi; using namespace Scsi;
switch (actual_size) { switch (actual_size) {
case 36: /* min INQUIRY data size */
case Inquiry_response::LENGTH: case Inquiry_response::LENGTH:
{ {
Inquiry_response r((addr_t)data); Inquiry_response r((addr_t)data);

View File

@ -98,7 +98,14 @@ Genode::uint64_t Scsi::be64(Genode::uint64_t val)
struct Scsi::Inquiry_response : Genode::Mmio struct Scsi::Inquiry_response : Genode::Mmio
{ {
enum { LENGTH = 36 /* default */ + 20 /* drive serial number and vendor unique */}; /*
* Minimum response length is 36 bytes.
*
* Some devices have problems when more is requested, e.g.:
* - hama sd card reader (05e3:0738)
* - delock sata adapter (174c:5106)
*/
enum { LENGTH = 36 };
struct Dt : Register<0x0, 8> { }; /* device type */ struct Dt : Register<0x0, 8> { }; /* device type */
struct Rm : Register<0x1, 8> { struct Rmb : Bitfield<7, 1> { }; }; /* removable media */ struct Rm : Register<0x1, 8> { struct Rmb : Bitfield<7, 1> { }; }; /* removable media */