From owner-freebsd-current@FreeBSD.ORG Mon Jun 29 03:43:55 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35391065670 for ; Mon, 29 Jun 2009 03:43:55 +0000 (UTC) (envelope-from spambox@haruhiism.net) Received: from fujibayashi.jp (karas.fujibayashi.jp [77.221.159.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2378FC13 for ; Mon, 29 Jun 2009 03:43:55 +0000 (UTC) (envelope-from spambox@haruhiism.net) Received: from [192.168.0.10] (datacenter.telecombusinessconsulting.net [77.221.137.211]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fujibayashi.jp (Postfix) with ESMTPSA id DA8E778F7F; Mon, 29 Jun 2009 07:43:52 +0400 (MSD) Message-ID: <4A48388B.8070005@haruhiism.net> Date: Mon, 29 Jun 2009 07:44:11 +0400 From: Kamigishi Rei User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Goran Lowkrantz References: <20090628125847.GP48776@hoeg.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Best , freebsd-current@FreeBSD.org Subject: Re: RFC: ATA to CAM integration patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2009 03:43:55 -0000 Goran Lowkrantz wrote: > Clean CURRENT as of this morning, patches: > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:1032: error: > 'AHCI_DMA_ENTRIES' undeclared (first use in this function) > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:1032: error: (Each > undeclared identifier is reported only once > /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:1032: error: for each > function it appears in.) > *** Error code 1 Examining ahci.c, ahci.h, and ata-all.h: appears that AHCI_DMA_ENTRIES is superceded by AHCI_SG_ENTRIES judging by the name of the struct{} and the #define inside it. In ata-all.h: struct ata_ahci_cmd_tab { u_int8_t cfis[64]; u_int8_t acmd[32]; u_int8_t reserved[32]; #define ATA_AHCI_DMA_ENTRIES 64 struct ata_ahci_dma_prd prd_tab[ATA_AHCI_DMA_ENTRIES]; } __packed; In ahci.h: struct ahci_cmd_tab { u_int8_t cfis[64]; u_int8_t acmd[32]; u_int8_t reserved[32]; struct ahci_dma_prd prd_tab[AHCI_SG_ENTRIES]; } __packed; And AHCI_SG_ENTRIES is defined as #define AHCI_SG_ENTRIES (roundup(btoc(MAXPHYS) + 1, 8)) Kernel builds fine for me after "sed 's/AHCI_DMA_ENTRIES/AHCI_SG_ENTRIES/' /usr/src/sys/dev/ahci/ahci.c" (only one occurrence of that macro, aside from the .h file, anyway). -- Kamigishi Rei KREI-RIPE