From the PR:
Since struct scsipi_read_discinfo_data is an odd number of bytes long
(35 bytes), ti ends up being unaligned. wdc_datain_pio() uses
bus_space_read_multi_4() to read the response from the drive, and
since ti is unaligned, it causes an unaligned access fault.
Add __aligned__(4) to all the structures.
for TOC response format 1 and 2 are mandatory on CD/DVD too and provide
more information.
Next an IOCTL needs to be implemented that can read all TOC formats in a
generic way. This is pending.
the "bus type" for this.
Merge all the code in the SCSI and ATAPI backends for "cd" devices. All of
the mode page handling and whatnot is general to SCSI MMC devices, and should
never have been separated to begin with. This fixes a variety of problems,
and adds load/unload support for SCSI-attached devices.
- Indent with tab of width 8.
- Use four column to indent continuation line.
- Fold long line if possible.
- Use return (xx) instead of return xx.
- Compare pointer against NULL instead of testing like boolean.
- Delete whitespace at the end of line.
- Delete whitespace in front of function call operator.
- Delete whitespace after cast.
- Dereference a pointer to function explicitly.
- Add an empty line after local variable declaration.
- Use NULL instead of (char *)0.
- Dont use block for single statement.
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.