NetBSD Problem Report #39659

From www@NetBSD.org  Tue Sep 30 17:31:09 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id BF12E63BD02
	for <gnats-bugs@gnats.netbsd.org>; Tue, 30 Sep 2008 17:31:09 +0000 (UTC)
Message-Id: <20080930173109.8DCFD63BD01@narn.NetBSD.org>
Date: Tue, 30 Sep 2008 17:31:09 +0000 (UTC)
From: sileizhang@yahoo.com
Reply-To: sileizhang@yahoo.com
To: gnats-bugs@NetBSD.org
Subject: ahci sata driver does not work on big endian system
X-Send-Pr-Version: www-1.0

>Number:         39659
>Category:       kern
>Synopsis:       ahci sata driver does not work on big endian system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 30 17:35:00 +0000 2008
>Closed-Date:    Fri Oct 15 05:11:14 +0000 2010
>Last-Modified:  Fri Oct 15 05:11:14 +0000 2010
>Originator:     Chris Zhang
>Release:        4.0
>Organization:
>Environment:
>Description:
When testing on a PPC440 based system using NetBSD 4.0 (with customized BSP), I realized the Ahci driver does work (identify device would return garbage). Later investigation shows, the ahcisata_core.c does not snoop the IDENTIFY_DEVICE command and byte swap on big endian system as it does in sys/dev/ic/wdc.c. We added some code in ahcisata_core.c to do the same as wdc.c and it appears to work fine. 
>How-To-Repeat:
Try to plug in any AHCI PCI sata controller on a big endian system and watch if the SATA disk is identified.
>Fix:

>Release-Note:

>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/39659: ahci sata driver does not work on big endian system
Date: Tue, 30 Sep 2008 19:51:48 +0200

 On Tue, Sep 30, 2008 at 05:35:00PM +0000, sileizhang@yahoo.com wrote:
 > >Number:         39659
 > >Category:       kern
 > >Synopsis:       ahci sata driver does not work on big endian system
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       medium
 > >Responsible:    kern-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Tue Sep 30 17:35:00 +0000 2008
 > >Originator:     Chris Zhang
 > >Release:        4.0
 > >Organization:
 > >Environment:
 > >Description:
 > When testing on a PPC440 based system using NetBSD 4.0 (with customized BSP), I realized the Ahci driver does work (identify device would return garbage). Later investigation shows, the ahcisata_core.c does not snoop the IDENTIFY_DEVICE command and byte swap on big endian system as it does in sys/dev/ic/wdc.c. We added some code in ahcisata_core.c to do the same as wdc.c and it appears to work fine. 


 Hi,
 could you send your diffs ?

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 03 Jan 2009 03:45:16 +0000
State-Changed-Why:
Patches were requested.


From: "Jonathan A. Kollasch" <jakllsch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39659 CVS commit: src/sys/dev/ic
Date: Fri, 12 Mar 2010 19:03:15 +0000

 Module Name:	src
 Committed By:	jakllsch
 Date:		Fri Mar 12 19:03:14 UTC 2010

 Modified Files:
 	src/sys/dev/ic: ahcisata_core.c

 Log Message:
 ata(4) expects IDENTIFY data to be in host endianess.
 Logic borrowed from siisata(4) (which I've confirmed works on sparc64).
 Should fix PR kern/39659.


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/ahcisata_core.c

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

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 15 Oct 2010 05:11:14 +0000
State-Changed-Why:
Feedback timeout. (And jakllsch committed a patch.)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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