From d4beb326981d951b44edde28fdac7c0f1eac2e66 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sun, 3 Apr 2011 18:10:36 +0000 Subject: [PATCH] upgrade ethtool SVN-Revision: 26446 --- net/ethtool/Makefile | 35 +-- .../patches/01-ixp4xx_ethtool_autotools.patch | 238 ------------------ 2 files changed, 11 insertions(+), 262 deletions(-) diff --git a/net/ethtool/Makefile b/net/ethtool/Makefile index ad936cfda4..8cded281bc 100644 --- a/net/ethtool/Makefile +++ b/net/ethtool/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,14 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=2.6.35 +PKG_VERSION:=2.6.38 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/gkernel -PKG_MD5SUM:=e0f617779a58b77af061a9e5178d0b25 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/software/network/ethtool +PKG_MD5SUM:=4cc35c59e4fd0defff768f9f59fa41ad PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -23,32 +24,18 @@ define Package/ethtool SECTION:=net CATEGORY:=Network TITLE:=Display or change ethernet card settings - URL:=http://sourceforge.net/projects/gkernel/ + URL:=http://www.kernel.org/pub/software/network/ethtool/ + MAINTAINER:=Luka Perkov endef define Package/ethtool/description -ethtool is used for querying settings of an ethernet device and changing them. -endef - -define Build/Configure - (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ - ./autogen.sh \ - ); - $(call Build/Configure/Default, \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - SPECIAL_CFLAGS="-pthread $(TARGET_LDFLAGS)" - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install + ethtool is a small utility for examining and tuning your ethernet-based + network interface. endef define Package/ethtool/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ethtool $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin/ endef $(eval $(call BuildPackage,ethtool)) diff --git a/net/ethtool/patches/01-ixp4xx_ethtool_autotools.patch b/net/ethtool/patches/01-ixp4xx_ethtool_autotools.patch index 0592054cd6..e69de29bb2 100644 --- a/net/ethtool/patches/01-ixp4xx_ethtool_autotools.patch +++ b/net/ethtool/patches/01-ixp4xx_ethtool_autotools.patch @@ -1,238 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -8,7 +8,7 @@ ethtool_SOURCES = ethtool.c ethtool-copy - amd8111e.c de2104x.c e100.c e1000.c igb.c \ - fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c \ - pcnet32.c realtek.c tg3.c marvell.c vioc.c \ -- smsc911x.c at76c50x-usb.c sfc.c -+ smsc911x.c at76c50x-usb.c sfc.c ixp4xx.c - - dist-hook: - cp $(top_srcdir)/ethtool.spec $(distdir) ---- a/Makefile.in -+++ b/Makefile.in -@@ -56,7 +56,7 @@ am_ethtool_OBJECTS = ethtool.$(OBJEXT) a - ixgbe.$(OBJEXT) natsemi.$(OBJEXT) pcnet32.$(OBJEXT) \ - realtek.$(OBJEXT) tg3.$(OBJEXT) marvell.$(OBJEXT) \ - vioc.$(OBJEXT) smsc911x.$(OBJEXT) at76c50x-usb.$(OBJEXT) \ -- sfc.$(OBJEXT) -+ sfc.$(OBJEXT) ixp4xx.$(OBJEXT) - ethtool_OBJECTS = $(am_ethtool_OBJECTS) - ethtool_LDADD = $(LDADD) - DEFAULT_INCLUDES = -I.@am__isrc@ -@@ -199,7 +199,7 @@ ethtool_SOURCES = ethtool.c ethtool-copy - amd8111e.c de2104x.c e100.c e1000.c igb.c \ - fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c \ - pcnet32.c realtek.c tg3.c marvell.c vioc.c \ -- smsc911x.c at76c50x-usb.c sfc.c -+ smsc911x.c at76c50x-usb.c sfc.c ixp4xx.c - - all: ethtool-config.h - $(MAKE) $(AM_MAKEFLAGS) all-am -@@ -317,6 +317,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixgb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixgbe.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixp4xx.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marvell.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/natsemi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcnet32.Po@am__quote@ ---- a/ethtool.c -+++ b/ethtool.c -@@ -1324,6 +1324,7 @@ static struct { - { "igb", igb_dump_regs }, - { "ixgb", ixgb_dump_regs }, - { "ixgbe", ixgbe_dump_regs }, -+ { "ixp4xx_mac", ixp4xx_dump_regs }, - { "natsemi", natsemi_dump_regs }, - { "e100", e100_dump_regs }, - { "amd8111e", amd8111e_dump_regs }, ---- a/ethtool.spec -+++ /dev/null -@@ -1,42 +0,0 @@ --Name : ethtool --Version : 2.6.35 --Release : 1 --Group : Utilities -- --Summary : A tool for setting ethernet parameters -- --License : GPL --URL : http://sourceforge.net/projects/gkernel/ -- --Buildroot : %{_tmppath}/%{name}-%{version} --Source : %{name}-%{version}.tar.gz -- -- --%description --Ethtool is a small utility to get and set values from your your ethernet --controllers. Not all ethernet drivers support ethtool, but it is getting --better. If your ethernet driver doesn't support it, ask the maintainer to --write support - it's not hard! -- -- --%prep --%setup -q -- -- --%build --CFLAGS="${RPM_OPT_FLAGS}" ./configure --prefix=/usr --mandir=%{_mandir} --make -- -- --%install --make install DESTDIR=${RPM_BUILD_ROOT} -- -- --%files --%defattr(-,root,root) --/usr/sbin/ethtool --%{_mandir}/man8/ethtool.8* --%doc AUTHORS COPYING INSTALL NEWS README ChangeLog -- -- --%changelog ---- a/ethtool-util.h -+++ b/ethtool-util.h -@@ -69,4 +69,7 @@ - /* SMSC LAN911x/LAN921x embedded ethernet controller */ - int smsc911x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs); - -+/* Intel IXP4xx internal MAC */ -+int ixp4xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs); -+ - #endif ---- /dev/null -+++ b/ixp4xx.c -@@ -0,0 +1,131 @@ -+/* -+ * Copyright (c) 2006 Christian Hohnstaed -+ * This file is released under the GPLv2 -+ */ -+ -+#include -+#include "ethtool-util.h" -+ -+#ifndef BIT -+#define BIT(x) (1<data; -+ -+ fprintf(stdout, -+ "TXctrl: 0x%02x:0x%02x\n" -+ " Enable: %s\n" -+ " Duplex: %s\n" -+ " Retry: %s (%d)\n" -+ " Padding: %s\n" -+ " Frame check: %s\n" -+ " TX deferral: %s\n" -+ " Connection: %s\n" -+ "\n", -+ data[0], data[1], -+ data[0] & TX_CNTRL1_TX_EN ? "yes" : "no", -+ data[0] & TX_CNTRL1_DUPLEX ? "half" : "full", -+ data[0] & TX_CNTRL1_RETRY ? "enabled" : "disabled", -+ data[1] & TX_CNTRL2_RETRIES_MASK, -+ data[0] & TX_CNTRL1_PAD_EN ? "enabled" : "disabled", -+ data[0] & TX_CNTRL1_FCS_EN ? "enabled" : "disabled", -+ data[0] & TX_CNTRL1_2DEFER ? "two-part" : "one-part", -+ data[0] & TX_CNTRL1_RMII ? "RMII" : "Full MII" -+ ); -+ -+ fprintf(stdout, -+ "RXctrl: 0x%02x\n" -+ " Enable: %s\n" -+ " Pad strip: %s\n" -+ " CRC check: %s\n" -+ " Pause: %s\n" -+ " Loop: %s\n" -+ " Promiscous: %s\n" -+ " Runt frames: %s\n" -+ " Broadcast: %s\n" -+ "\n", -+ data[2], -+ data[2] & RX_CNTRL1_RX_EN ? "yes" : "no", -+ data[2] & RX_CNTRL1_PADSTRIP_EN ? "enabled" : "disabled", -+ data[2] & RX_CNTRL1_CRC_EN ? "enabled" : "disabled", -+ data[2] & RX_CNTRL1_PAUSE_EN ? "enabled" : "disabled", -+ data[2] & RX_CNTRL1_LOOP_EN ? "enabled" : "disabled", -+ data[2] & RX_CNTRL1_ADDR_FLTR_EN ? "disabled" : "enabled", -+ data[2] & RX_CNTRL1_RX_RUNT_EN ? "forward" : "discard", -+ data[2] & RX_CNTRL1_BCAST_DIS ? "disabled" : "enabled" -+ ); -+ fprintf(stdout, -+ "Core control: 0x%02x\n" -+ " Core state: %s\n" -+ " RX fifo: %s\n" -+ " TX fifo: %s\n" -+ " Send jam: %s\n" -+ " MDC clock %s\n" -+ "\n", -+ data[32], -+ data[32] & CORE_RESET ? "reset" : "normal operation", -+ data[32] & CORE_RX_FIFO_FLUSH ? "flush" : "ok", -+ data[32] & CORE_TX_FIFO_FLUSH ? "flush" : "ok", -+ data[32] & CORE_SEND_JAM ? "yes" : "no", -+ data[32] & CORE_MDC_EN ? "output" : "input" -+ ); -+ fprintf(stdout, -+ "MAC addresses: \n" -+ " Multicast mask: " MAC "\n" -+ " Multicast address: " MAC "\n" -+ " Unicast address: " MAC "\n" -+ "\n", -+ MAC_DATA(data+13), MAC_DATA(data+19), MAC_DATA(data+26) -+ ); -+ fprintf(stdout, -+ "Random seed: 0x%02x\n" -+ "Threshold empty: %3d\n" -+ "Threshold full: %3d\n" -+ "TX buffer size: %3d\n" -+ "TX deferral: %3d\n" -+ "RX deferral: %3d\n" -+ "TX two deferral 1: %3d\n" -+ "TX two deferral 2: %3d\n" -+ "Slot time: %3d\n" -+ "Internal clock: %3d\n" -+ "\n", -+ data[4], data[5], data[6], data[7], data[8], data[9], -+ data[10], data[11], data[12], data[25] -+ ); -+ -+ return 0; -+} -+ -- 2.30.2