NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/51141: Errors in SCSIPI command results due to alignment

>Number:         51141
>Category:       kern
>Synopsis:       Errors in SCSIPI command results due to alignment
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Sun May 15 15:35:00 +0000 2016
>Originator:     Reinoud Zandijk
>Release:        NetBSD 7.99.29
System: NetBSD 7.99.29 NetBSD 7.99.29 (GENERIC) #17: Sun May 15 16:42:12 CEST 2016 amd64
Architecture: x86_64
Machine: amd64

device dump with dmassage -t :

       |  |-atabus3
       |  |  \-atapibus0
       |  |     \-cd0
       |  |-atabus4
       |  |  \-wd0
       |  |     \-dk0
       |  |-atabus5
       |  |-atabus6
       |  |  \-wd1
       |  |     |-dk1
       |  |     \-dk2
       |  |-atabus7
       |  \-atabus8
       |  \-usb7
       |     \-uhub7
       |        \-umass0
       |           \-atapibus1
       |              \-cd1

Result data of SCSI commands executed in the kernel are shifted one byte if the
alignment of the result data blob is not aligned correctly. This only occures
in this machine with `cd0' at atapi, not with `cd1'.

If the data blob is aligned with __align(2) it works fine. This is the current
workaround in sys/dev/scsipi/cd.c

Execute a SCSI command in kernel with the result blob at an oneven address.

The workaround i to use __align(2) for the result data blobs. The real problem
might be in the ata/atapi bus implementation or in the DMA setup.



Home | Main Index | Thread Index | Old Index