From owner-freebsd-ppc@FreeBSD.ORG Mon Sep 26 02:17:56 2011 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC5ED1065673; Mon, 26 Sep 2011 02:17:56 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 29A468FC0C; Mon, 26 Sep 2011 02:17:55 +0000 (UTC) Received: by fxg9 with SMTP id 9so7029924fxg.13 for ; Sun, 25 Sep 2011 19:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1aGEz2Ym9PO8+umRYWFCVPV3JqfygNcg1S8rTvnJsKA=; b=OSQkP3EVd9XvpE9qwdOkrTnvMtn2p1oR5obfaSOwanCCfcB33VJnp9Wp7MtP6xYnOA sC7x5/2AZk6J/fS3Wt/At1jits2q4bMHwhQZjqvDCZFDCanVU6mxKP5PnZz8rvu39mjM gLMzUKYJ5q1k7MsXGODKx4Nt0NbXmplvTGWIQ= Received: by 10.223.23.142 with SMTP id r14mr9691203fab.60.1317002062166; Sun, 25 Sep 2011 18:54:22 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id u6sm18460100faf.3.2011.09.25.18.54.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Sep 2011 18:54:20 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 25 Sep 2011 18:52:15 -0700 From: YongHyeon PYUN Date: Sun, 25 Sep 2011 18:52:15 -0700 To: Justin Hibbits Message-ID: <20110926015215.GB1702@michelle.cdnetworks.com> References: <54FFB452-534A-46C6-950B-880EB36F61C1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54FFB452-534A-46C6-950B-880EB36F61C1@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-wireless@freebsd.org, FreeBSD PowerPC ML Subject: Re: CFT: macio attachment for if_wi X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 02:17:56 -0000 On Sun, Sep 25, 2011 at 08:54:41AM -0400, Justin Hibbits wrote: > Attached is a patch adding the macio attachment for the if_wi driver, > to support the airport card in PowerPC macs. To do this I needed to > modify the wi_read_bap and wi_write_bap functions to use the bus space > stream functions instead of regular functions, like NetBSD and OpenBSD > do. I currently get a 'no carrier' status from ifconfig, so I can't > fully test connections, only the attachment. Testing wanted and > needed to make sure I didn't break anything. > It seems the WI_DATA0/WI_DATA1 registers provide access to data with FIFO style. This indicates driver have to read raw data and subsequent access would have to use htoleXX() macro to compare it with the raw data instead of converting it from little-endian to host byte order. So your patch looks like the first step that goes to right direction. As Adrian said, there could be multiple places that used wrong data from endianess view. BTW, you may have to implement suspend/resume method to properly stop driver before entering into suspend. > - Justin