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
>Organization:
NetBSD
	
>Environment:
	
	
System: NetBSD diablo.13thmonkey.org 7.99.29 NetBSD 7.99.29 (GENERIC) #17: Sun May 15 16:42:12 CEST 2016 root%diablo.13thmonkey.org@localhost:/usr/sources/cvs.netbsd.org/src-udf/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64

device dump with dmassage -t :

root
 \-mainbus0
...
    \-pci0
       |-ahcisata1
       |  |-atabus3
       |  |  \-atapibus0
       |  |     \-cd0
       |  |-atabus4
       |  |  \-wd0
       |  |     \-dk0
       |  |-atabus5
       |  |-atabus6
       |  |  \-wd1
       |  |     |-dk1
       |  |     \-dk2
       |  |-atabus7
       |  \-atabus8
...
       |-ehci1
       |  \-usb7
       |     \-uhub7
       |        \-umass0
       |           \-atapibus1
       |              \-cd1
...
>Description:

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

	
>How-To-Repeat:
Execute a SCSI command in kernel with the result blob at an oneven address.

	
>Fix:
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.

	

>Unformatted:
 	
 	



Home | Main Index | Thread Index | Old Index