From owner-svn-src-all@freebsd.org Fri May 1 17:50:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 531422DBC0E; Fri, 1 May 2020 17:50:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49DKXZ1VQpz3PKw; Fri, 1 May 2020 17:50:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A4DEC118; Fri, 1 May 2020 17:50:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 041HoMsr058950; Fri, 1 May 2020 17:50:22 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 041HoMaV058949; Fri, 1 May 2020 17:50:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202005011750.041HoMaV058949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 1 May 2020 17:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360540 - head/stand/libofw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libofw X-SVN-Commit-Revision: 360540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 17:50:22 -0000 Author: imp Date: Fri May 1 17:50:21 2020 New Revision: 360540 URL: https://svnweb.freebsd.org/changeset/base/360540 Log: Remove more stray sparc64 ifdefs. Also, dmabuf appears to only be set for sparc64 case, but there was a comment at its only use that says it was broken for some apple adapters. #ifdef it all of that out now that nothing sets it. Modified: head/stand/libofw/ofw_net.c Modified: head/stand/libofw/ofw_net.c ============================================================================== --- head/stand/libofw/ofw_net.c Fri May 1 17:17:01 2020 (r360539) +++ head/stand/libofw/ofw_net.c Fri May 1 17:50:21 2020 (r360540) @@ -73,7 +73,9 @@ struct netif_driver ofwnet = { static ihandle_t netinstance; +#ifdef BROKEN static void *dmabuf; +#endif static int ofwn_match(struct netif *nif, void *machdep_hint) @@ -110,10 +112,12 @@ ofwn_put(struct iodesc *desc, void *pkt, size_t len) #endif } +#ifdef BROKEN if (dmabuf) { bcopy(pkt, dmabuf, sendlen); pkt = dmabuf; } +#endif rv = OF_write(netinstance, pkt, len); @@ -203,11 +207,7 @@ ofwn_init(struct iodesc *desc, void *machdep_hint) if ((ch = strchr(path, ':')) != NULL) *ch = '\0'; netdev = OF_finddevice(path); -#ifdef __sparc64__ - if (OF_getprop(netdev, "mac-address", desc->myea, 6) == -1) -#else if (OF_getprop(netdev, "local-mac-address", desc->myea, 6) == -1) -#endif goto punt; printf("boot: ethernet address: %s\n", ether_sprintf(desc->myea)); @@ -220,20 +220,6 @@ ofwn_init(struct iodesc *desc, void *machdep_hint) #if defined(NETIF_DEBUG) printf("ofwn_init: Open Firmware instance handle: %08x\n", netinstance); #endif - -#ifndef __sparc64__ - dmabuf = NULL; - if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf) - < 0) { - printf("Failed to allocate DMA buffer (got %p).\n", dmabuf); - goto punt; - } - -#if defined(NETIF_DEBUG) - printf("ofwn_init: allocated DMA buffer: %p\n", dmabuf); -#endif -#endif - return; punt: