Skip to content

EUSBASPI 0.8

Choose a tag to compare

@geosone geosone released this 15 Nov 20:10
· 13 commits to main since this release

Changes since 0.7:

USB CD drives with incomplete firmware (#2). EUSBASPI now follows the rules of the Linux USB storage driver for them.

  • MODE SENSE/SELECT only in the 10 byte form for CD/DVD drives. Linux and Windows never send the 6 byte forms to CD drives, and some firmware (SMI 3255/3257) hangs on them. The MODE SENSE(6) probe at boot is skipped for CD drives. Any device whose MODE SENSE(6) times out is switched to the 10 byte forms.
  • Sense data is always fetched. After every failed command EUSBASPI sends REQUEST SENSE (at least 18 bytes), even when the ASPI driver asks for no sense data. A bulk-only device keeps its error state until then.
  • Waking a silent CD drive. After a timeout, a CD drive gets up to three TEST UNIT READY commands of at most 3 s each, with a reset after each timeout. Some firmware (SMI 3267/3268) needs a second reset.
  • A CD drive reads wrong data after a rejected optional command. Some firmware (IS902E) does this. EUSBASPI now sends a TEST UNIT READY right after such a command. A command the drive rejects as unknown is answered by EUSBASPI itself from then on.
  • READ SUB-CHANNEL the drive cannot do is answered by EUSBASPI. The answer (current position) is what an idle drive with a data disc gives: no audio status, track 1, position 0. Some ASPI CD drivers use the position even when the command failed, and then read a nonsense sector.
  • MODE SELECT that only sets 2048 byte blocks on a CD drive is answered by EUSBASPI itself. ASPI CD drivers send it. ATAPI drives reject it anyway, and SMI 3255/3257 firmware hangs on it.
  • USB port reset with /H. If a CD drive still does not answer, EUSBASPI resets its USB port and enumerates it again, as if it had been unplugged and plugged in. The drive keeps its ASPI target, and its next command gets UNIT ATTENTION. Without /H the code for this is not resident.
  • The package contains the OpenASPI drivers of 0.1.0 Alpha 7, SHSUCDX and CDAUDIO from geosone/shsucd (76d847a), and the GeosOne DOS Installer 1.16.0.

Tested in 86Box with a USB mass storage device changed locally to act like the reported firmware:

Fault 0.7 0.8
READ SUB-CHANNEL hangs, and the device needs two resets the next read hangs 15 s and fails read at once
READ SUB-CHANNEL rejected, then wrong sectors until TEST UNIT READY wrong data right data
MODE SENSE/SELECT(6) hang, and only a port reset helps CD drive dead not sent, works
READ SUB-CHANNEL hangs, and only a port reset helps (/H) CD drive dead port reset, works

The test suites of 0.7 passed as well: QEMU (UHCI, OHCI, EHCI, xHCI), VirtualBox (OHCI, EHCI, xHCI with a USB DVD drive) and 86Box (UHCI, OHCI).

Not yet tested on real hardware. Please test with care (backup!) and report.

🤖 Generated with Claude Code