NetBSD Problem Report #48754

From  Fri Apr 18 06:16:15 2014
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 6D09BA5810
	for <>; Fri, 18 Apr 2014 06:16:15 +0000 (UTC)
Date: Fri, 18 Apr 2014 08:16:11 CEST
Subject: ahcisata hardware alignement requirements not guaranteed by driver
X-Send-Pr-Version: 3.95

>Number:         48754
>Category:       kern
>Synopsis:       ahcisata hardware alignement requirements not guaranteed by driver
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 06:20:00 +0000 2014
>Last-Modified:  Fri Apr 18 06:25:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.40
The NetBSD foundation, Inc.
System: NetBSD 6.99.40 NetBSD 6.99.40 (NIGHT-OWL) #248: Fri Apr 18 07:41:17 CEST 2014 amd64
Architecture: x86_64
Machine: amd64
As discussed in PR kern/48550 we may call the ahcisata driver with misaligned
target buffers. The case in that PR has been worked around, but in general
the backend drivers should be able to deal with this.

The hardware seems to require 2-byte alignement of buffers.

Pass an unaligned target buffer to ahcisata and run a command, watch results
being delivered at buffer address & ~2UL.

Use bounce buffers in this case?

From: "Martin Husemann" <>
Subject: PR/48754 CVS commit: src/sys/dev/scsipi
Date: Fri, 18 Apr 2014 06:23:32 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Apr 18 06:23:32 UTC 2014

 Modified Files:
 	src/sys/dev/scsipi: cd.c

 Log Message:
 Fix PR kern/48550 by aligning the single instance of scsipi_read_cd_cap_data
 that we found misaligned in the wild so far properly for the ahcisata
 driver. Also point at PR kern/48754 for the real issue.

 To generate a diff of this commit:
 cvs rdiff -u -r1.318 -r1.319 src/sys/dev/scsipi/cd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.