Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] forcedeth: reset register fix
From: Jeff Garzik @ 2008-01-30  8:39 UTC (permalink / raw)
  To: Ayaz Abdulla; +Cc: Manfred Spraul, Andrew Morton, nedev
In-Reply-To: <478A7C72.8060903@nvidia.com>

Ayaz Abdulla wrote:
> This patch fixes the reset register definition from 0x3C to 0x34.
> 
> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>

applied 1-5



^ permalink raw reply

* Re: [PATCH] [NET]: Remove PowerPC code from fec.c
From: Jeff Garzik @ 2008-01-30  8:41 UTC (permalink / raw)
  To: Jochen Friedrich
  Cc: Vitaly Bordug, Scott Wood, Kumar Gala, Geert Uytterhoeven,
	Kernel, Linux, netdev@vger.kernel.org, linuxppc-dev list,
	linux-m68k
In-Reply-To: <4799F349.9090102@scram.de>

Jochen Friedrich wrote:
> fec.c is only used on M68k Coldfire CPUs. Remove leftover
> PowerPC code from this driver.
> 
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
>  drivers/net/fec.c |  136 +---------------------------------------------------
>  1 files changed, 3 insertions(+), 133 deletions(-)

Seems OK to me, but I feel I don't have enough knowledge to ACK or NAK. 
  Please pass through an arch tree, thanks.

	Jeff




^ permalink raw reply

* Re: [PATCH] forcedeth: mac address mcp77/79
From: Jeff Garzik @ 2008-01-30  8:48 UTC (permalink / raw)
  To: Ayaz Abdulla; +Cc: Andrew Morton, nedev, stable
In-Reply-To: <479DF3B8.2000204@nvidia.com>

Ayaz Abdulla wrote:
> This patch is a critical fix for MCP77 and MCP79 devices. The feature 
> flags were missing the define for correct mac address 
> (DEV_HAS_CORRECT_MACADDR).
> 
> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>

applied (upstream)



^ permalink raw reply

* Re: [PATCH] PHYLIB: Locking fixes for PHY I/O potentially sleeping
From: Jeff Garzik @ 2008-01-30  8:48 UTC (permalink / raw)
  To: Nate Case; +Cc: Andy Fleming, David S. Miller, netdev
In-Reply-To: <1201622709.12444.118.camel@localhost.localdomain>

Nate Case wrote:
> PHY read/write functions can potentially sleep (e.g., a PHY accessed
> via I2C).  The following changes were made to account for this:
> 
>     * Change spin locks to mutex locks
>     * Add a BUG_ON() to phy_read() phy_write() to warn against
>       calling them from an interrupt context.
>     * Use work queue for PHY state machine handling since
>       it can potentially sleep
>     * Change phydev lock from spinlock to mutex
> 
> Signed-off-by: Nate Case <ncase@xes-inc.com>
> Acked-by: Andy Fleming <afleming@freescale.com>
> 
> ---
> Note: This is a resend of the patch submitted on January 3rd, 2008
> 
>  drivers/net/phy/mdio_bus.c   |    2 +-
>  drivers/net/phy/phy.c        |   68 ++++++++++++++++++++++++++++-------------
>  drivers/net/phy/phy_device.c |   11 +++----
>  include/linux/phy.h          |    5 ++-
>  4 files changed, 55 insertions(+), 31 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH] natsemi: Update locking documentation
From: Jeff Garzik @ 2008-01-30  8:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Tim Hockin, netdev, linux-kernel
In-Reply-To: <1201442291-13668-1-git-send-email-broonie@sirena.org.uk>

Mark Brown wrote:
> The documentation regarding synchronisation at the head of the natsemi
> driver was badly bitrotted so replace it with a general statement about
> the techniques used which is less likely to bitrot.
> 
> Also remove the note saying these chips are uncommon - it makes little
> difference but they were used in a number of laptops and at least one mass
> market PCI ethernet card.
> 
> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
> ---
>  drivers/net/natsemi.c |   18 ++----------------
>  1 files changed, 2 insertions(+), 16 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH] phylib: Add Realtek 821x eth PHY support
From: Jeff Garzik @ 2008-01-30  8:49 UTC (permalink / raw)
  To: Kim Phillips; +Cc: netdev, Johnson Leung, Kevin Lam, Joe D'Abbraccio
In-Reply-To: <20080124202826.a50fa29c.kim.phillips@freescale.com>

Kim Phillips wrote:
> this PHY present on the MPC8315E and MPC837xE RDB boards.
> 
> Signed-off-by: Johnson Leung <r58129@freescale.com>
> Signed-off-by: Kevin Lam <r43770@freescale.com>
> Signed-off-by: Joe D'Abbraccio <ljd015@freescale.com>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
>  drivers/net/phy/Kconfig   |    5 +++
>  drivers/net/phy/Makefile  |    1 +
>  drivers/net/phy/realtek.c |   80 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 86 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/net/phy/realtek.c

applied (though admittedly the filename seems a bit too generic)



^ permalink raw reply

* Re: [PATCH] pci-skeleton: Misc fixes to build neatly
From: Jeff Garzik @ 2008-01-30  8:49 UTC (permalink / raw)
  To: Jike Song; +Cc: netdev, linux-kernel
In-Reply-To: <1201157496-20665-2-git-send-email-albcamus@gmail.com>

Jike Song wrote:
> The pci-skeleton.c has several problems with compilation, such as missing args
> when calling synchronize_irq(). Fix it.
> 
> Signed-off-by: Jike Song <albcamus@gmail.com>
> ---
>  drivers/net/pci-skeleton.c |   49 ++++++++++++++++++++++---------------------
>  1 files changed, 25 insertions(+), 24 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH 1/2] sky2: restore multicast addresses after recovery
From: Jeff Garzik @ 2008-01-30  8:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20080123191151.1423a045@deepthought>

Stephen Hemminger wrote:
> If the sky2 deadman timer forces a recovery, the multicast hash
> list is lost. Move the call to sky2_set_multicast to the end
> of sky2_up() so all paths that bring device up will restore multicast.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> 
> ---
> Please apply for 2.6.24

applied 1-2

You'll want to send this to stable@kernel.org, since by the time I read 
your mail, 2.6.24 had been released, just around 24 hours thereafter.



^ permalink raw reply

* [PATCH 0/8] [Blackfin] EMAC driver updates
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel

Several bug fixing for this driver.


^ permalink raw reply

* [PATCH 2/8] [Blackfin] EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK.
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 4006a5d..ee39819 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -412,20 +412,26 @@ static void bf537_adjust_link(struct net_device *dev)
 	spin_unlock_irqrestore(&lp->lock, flags);
 }
 
+/* MDC  = 2.5 MHz */
+#define MDC_CLK 2500000
+
 static int mii_probe(struct net_device *dev)
 {
 	struct bf537mac_local *lp = netdev_priv(dev);
 	struct phy_device *phydev = NULL;
 	unsigned short sysctl;
 	int i;
+	u32 sclk, mdc_div;
 
 	/* Enable PHY output early */
 	if (!(bfin_read_VR_CTL() & PHYCLKOE))
 		bfin_write_VR_CTL(bfin_read_VR_CTL() | PHYCLKOE);
 
-	/* MDC  = 2.5 MHz */
+	sclk = get_sclk();
+	mdc_div = ((sclk / MDC_CLK) / 2) - 1;
+
 	sysctl = bfin_read_EMAC_SYSCTL();
-	sysctl |= SET_MDCDIV(24);
+	sysctl |= SET_MDCDIV(mdc_div);
 	bfin_write_EMAC_SYSCTL(sysctl);
 
 	/* search for connect PHY device */
@@ -477,8 +483,10 @@ static int mii_probe(struct net_device *dev)
 	lp->phydev = phydev;
 
 	printk(KERN_INFO "%s: attached PHY driver [%s] "
-	       "(mii_bus:phy_addr=%s, irq=%d)\n",
-	       DRV_NAME, phydev->drv->name, phydev->dev.bus_id, phydev->irq);
+	       "(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)"
+	       "@sclk=%dMHz)\n",
+	       DRV_NAME, phydev->drv->name, phydev->dev.bus_id, phydev->irq,
+	       MDC_CLK, mdc_div, sclk/1000000);
 
 	return 0;
 }
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 1/8] [Blackfin] EMAC driver: shorten the mdelay value to solve netperf performance issue
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index eb97175..4006a5d 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -296,7 +296,7 @@ static void mdio_poll(void)
 
 	/* poll the STABUSY bit */
 	while ((bfin_read_EMAC_STAADD()) & STABUSY) {
-		mdelay(10);
+		udelay(1);
 		if (timeout_cnt-- < 0) {
 			printk(KERN_ERR DRV_NAME
 			": wait MDC/MDIO transaction to complete timeout\n");
@@ -551,7 +551,7 @@ static void adjust_tx_list(void)
 	 */
 	if (current_tx_ptr->next->next == tx_list_head) {
 		while (tx_list_head->status.status_word == 0) {
-			mdelay(10);
+			mdelay(1);
 			if (tx_list_head->status.status_word != 0
 			    || !(bfin_read_DMA2_IRQ_STATUS() & 0x08)) {
 				goto adjust_head;
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 3/8] [Blackfin] EMAC driver: bf537 MAC multicast hash filtering patch
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Aidan Williams, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

From: Aidan Williams <aidan@nicta.com.au>

The bf537 Ethernet MAC driver in the 2007R1.1-RC3 kernel (and the
current kernel) do not implement multicast hash filtering. This
is a performance problem if you have lots of multicast on your network.

This patch plugs the right bits into the multicast hash registers.

Signed-off-by: Aidan Williams <aidan@nicta.com.au>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index ee39819..c6586cd 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -11,6 +11,7 @@
  * Description:
  *
  * Modified:
+ * 		2006-12-19 Aidan Williams, multicast hash support
  *		Copyright 2004-2006 Analog Devices Inc.
  *
  * Bugs:	Enter bugs at http://blackfin.uclinux.org/
@@ -800,6 +801,39 @@ static void bf537mac_timeout(struct net_device *dev)
 	netif_wake_queue(dev);
 }
 
+static void bf537mac_multicast_hash(struct net_device *dev)
+{
+	u32 emac_hashhi, emac_hashlo;
+	struct dev_mc_list *dmi = dev->mc_list;
+	char *addrs;
+	int i;
+	u32 crc;
+
+	emac_hashhi = emac_hashlo = 0;
+
+	for (i = 0; i < dev->mc_count; i++) {
+		addrs = dmi->dmi_addr;
+		dmi = dmi->next;
+
+		/* skip non-multicast addresses */
+		if (!(*addrs & 1))
+			continue;
+
+		crc = ether_crc(ETH_ALEN, addrs);
+		crc >>= 26;
+
+		if (crc & 0x20)
+			emac_hashhi |= 1 << (crc & 0x1f);
+		else
+			emac_hashlo |= 1 << (crc & 0x1f);
+	}
+
+	bfin_write_EMAC_HASHHI(emac_hashhi);
+	bfin_write_EMAC_HASHLO(emac_hashlo);
+
+	return;
+}
+
 /*
  * This routine will, depending on the values passed to it,
  * either make it accept multicast packets, go into
@@ -815,11 +849,17 @@ static void bf537mac_set_multicast_list(struct net_device *dev)
 		sysctl = bfin_read_EMAC_OPMODE();
 		sysctl |= RAF;
 		bfin_write_EMAC_OPMODE(sysctl);
-	} else if (dev->flags & IFF_ALLMULTI || dev->mc_count) {
+	} else if (dev->flags & IFF_ALLMULTI) {
 		/* accept all multicast */
 		sysctl = bfin_read_EMAC_OPMODE();
 		sysctl |= PAM;
 		bfin_write_EMAC_OPMODE(sysctl);
+	} else if (dev->mc_count) {
+		/* set up multicast hash table */
+		sysctl = bfin_read_EMAC_OPMODE();
+		sysctl |= HM;
+		bfin_write_EMAC_OPMODE(sysctl);
+		bf537mac_multicast_hash(dev);
 	} else {
 		/* clear promisc or multicast mode */
 		sysctl = bfin_read_EMAC_OPMODE();
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 6/8] [Blackfin] EMAC driver: add power down mode
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Vitja Makarov, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

From: Vitja Makarov <vitja.makarov@gmail.com>

This patch puts phy in power-down mode when interface is down.
Also we should think about energy detect power-down mode, that will
decrease power consumption when no link.

Signed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index e9bd059..f2368b7 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -884,10 +884,10 @@ static int bf537mac_open(struct net_device *dev)
 		return retval;
 
 	phy_start(lp->phydev);
+	phy_write(lp->phydev, MII_BMCR, BMCR_RESET);
 	setup_system_regs(dev);
 	bf537mac_disable();
 	bf537mac_enable();
-
 	pr_debug("hardware init finished\n");
 	netif_start_queue(dev);
 	netif_carrier_on(dev);
@@ -910,6 +910,7 @@ static int bf537mac_close(struct net_device *dev)
 	netif_carrier_off(dev);
 
 	phy_stop(lp->phydev);
+	phy_write(lp->phydev, MII_BMCR, BMCR_PDOWN);
 
 	/* clear everything */
 	bf537mac_shutdown(dev);
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 8/8] [Blackfin] EMAC driver: Fix bug: The clock divisor is set to all ones at reset.
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Bryan Wu, Kalle Pokki
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

Signed-off-by: Kalle Pokki <kalle.pokki@eke.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 0a17fb4..c993a32 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -408,7 +408,7 @@ static int mii_probe(struct net_device *dev)
 	mdc_div = ((sclk / MDC_CLK) / 2) - 1;
 
 	sysctl = bfin_read_EMAC_SYSCTL();
-	sysctl |= SET_MDCDIV(mdc_div);
+	sysctl = (sysctl & ~MDCDIV) | SET_MDCDIV(mdc_div);
 	bfin_write_EMAC_SYSCTL(sysctl);
 
 	/* search for connect PHY device */
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 7/8] [Blackfin] EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Alexey Demin, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

From: Alexey Demin <bf53x@ya.ru>

It prevents overwritting new data from DMA.

Signed-off-by: Alexey Demin <bf53x@ya.ru>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index f2368b7..0a17fb4 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -651,6 +651,12 @@ static void bf537mac_rx(struct net_device *dev)
 	current_rx_ptr->skb = new_skb;
 	current_rx_ptr->desc_a.start_addr = (unsigned long)new_skb->data - 2;
 
+	/* Invidate the data cache of skb->data range when it is write back
+	 * cache. It will prevent overwritting the new data from DMA
+	 */
+	blackfin_dcache_invalidate_range((unsigned long)new_skb->head,
+					 (unsigned long)new_skb->end);
+
 	len = (unsigned short)((current_rx_ptr->status.status_word) & RX_FRLEN);
 	skb_put(skb, len);
 	blackfin_dcache_invalidate_range((unsigned long)skb->head,
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 5/8] [Blackfin] EMAC driver: ADSP-BF52x arch/mach support
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Michael Hennerich, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

From: Michael Hennerich <michael.hennerich@analog.com>

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/Kconfig    |    9 +++++----
 drivers/net/bfin_mac.c |    6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 5a2d1dd..ca2552b 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -814,8 +814,8 @@ config ULTRA32
 	  will be called smc-ultra32.
 
 config BFIN_MAC
-	tristate "Blackfin 536/537 on-chip mac support"
-	depends on NET_ETHERNET && (BF537 || BF536) && (!BF537_PORT_H)
+	tristate "Blackfin 527/536/537 on-chip mac support"
+	depends on NET_ETHERNET && (BF527 || BF537 || BF536) && (!BF537_PORT_H)
 	select CRC32
 	select MII
 	select PHYLIB
@@ -828,7 +828,7 @@ config BFIN_MAC
 
 config BFIN_MAC_USE_L1
 	bool "Use L1 memory for rx/tx packets"
-	depends on BFIN_MAC && BF537
+	depends on BFIN_MAC && (BF527 || BF537)
 	default y
 	help
 	  To get maximum network performance, you should use L1 memory as rx/tx buffers.
@@ -855,7 +855,8 @@ config BFIN_RX_DESC_NUM
 config BFIN_MAC_RMII
 	bool "RMII PHY Interface (EXPERIMENTAL)"
 	depends on BFIN_MAC && EXPERIMENTAL
-	default n
+	default y if BFIN527_EZKIT
+	default n if BFIN537_STAMP
 	help
 	  Use Reduced PHY MII Interface
 
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index ed935e1..e9bd059 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -42,7 +42,7 @@
 #define DRV_NAME	"bfin_mac"
 #define DRV_VERSION	"1.1"
 #define DRV_AUTHOR	"Bryan Wu, Luke Yang"
-#define DRV_DESC	"Blackfin BF53[67] on-chip Ethernet MAC driver"
+#define DRV_DESC	"Blackfin BF53[67] BF527 on-chip Ethernet MAC driver"
 
 MODULE_AUTHOR(DRV_AUTHOR);
 MODULE_LICENSE("GPL");
@@ -752,7 +752,7 @@ static void bf537mac_enable(void)
 
 #if defined(CONFIG_BFIN_MAC_RMII)
 	opmode |= RMII; /* For Now only 100MBit are supported */
-#ifdef CONFIG_BF_REV_0_2
+#if (defined(CONFIG_BF537) || defined(CONFIG_BF536)) && CONFIG_BF_REV_0_2
 	opmode |= TE;
 #endif
 #endif
@@ -994,7 +994,7 @@ static int __init bf537mac_probe(struct net_device *dev)
 	/* register irq handler */
 	if (request_irq
 	    (IRQ_MAC_RX, bf537mac_interrupt, IRQF_DISABLED | IRQF_SHARED,
-	     "BFIN537_MAC_RX", dev)) {
+	     "EMAC_RX", dev)) {
 		printk(KERN_WARNING DRV_NAME
 		       ": Unable to attach BlackFin MAC RX interrupt\n");
 		return -EBUSY;
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH 4/8] [Blackfin] EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log
From: Bryan Wu @ 2008-01-30  8:52 UTC (permalink / raw)
  To: jeff, netdev; +Cc: linux-kernel, Mike Frysinger, Bryan Wu
In-Reply-To: <1201683148-23931-1-git-send-email-bryan.wu@analog.com>

From: Mike Frysinger <michael.frysinger@analog.com>

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 drivers/net/bfin_mac.c |   32 ++++----------------------------
 drivers/net/bfin_mac.h |   31 ++++---------------------------
 2 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c6586cd..ed935e1 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -1,35 +1,11 @@
 /*
- * File:	drivers/net/bfin_mac.c
- * Based on:
- * Maintainer:
- * 		Bryan Wu <bryan.wu@analog.com>
+ * Blackfin On-Chip MAC Driver
  *
- * Original author:
- * 		Luke Yang <luke.yang@analog.com>
+ * Copyright 2004-2007 Analog Devices Inc.
  *
- * Created:
- * Description:
+ * Enter bugs at http://blackfin.uclinux.org/
  *
- * Modified:
- * 		2006-12-19 Aidan Williams, multicast hash support
- *		Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:	Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software ;  you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation ;  either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program ;  see the file COPYING.
- * If not, write to the Free Software Foundation,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL-2 or later.
  */
 
 #include <linux/init.h>
diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h
index 5970ea7..f774d5a 100644
--- a/drivers/net/bfin_mac.h
+++ b/drivers/net/bfin_mac.h
@@ -1,34 +1,11 @@
 /*
- * File:	drivers/net/bfin_mac.c
- * Based on:
- * Maintainer:
- * 		Bryan Wu <bryan.wu@analog.com>
+ * Blackfin On-Chip MAC Driver
  *
- * Original author:
- * 		Luke Yang <luke.yang@analog.com>
+ * Copyright 2004-2007 Analog Devices Inc.
  *
- * Created:
- * Description:
+ * Enter bugs at http://blackfin.uclinux.org/
  *
- * Modified:
- *		Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:	Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software ;  you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation ;  either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program ;  see the file COPYING.
- * If not, write to the Free Software Foundation,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL-2 or later.
  */
 
 #define BFIN_MAC_CSUM_OFFLOAD
-- 
1.5.3.4

^ permalink raw reply related

* [PATCH] [1/1] Deprecate tcp_tw_{reuse,recycle}
From: Andi Kleen @ 2008-01-30  8:38 UTC (permalink / raw)
  To: netdev


We've recently had a long discussion about the CVE-2005-0356 time stamp denial-of-service
attack. It turned out that Linux is only vunerable to this problem when tcp_tw_recycle
is enabled (which it is not by default).

In general these two options are not really usable in today's internet because they
make the (often false) assumption that a single IP address has a single TCP time stamp /
PAWS clock. This assumption breaks both NAT/masquerading and also opens Linux to denial
of service attacks (see the CVE description) 

Due to these numerous problems I propose to remove this code for 2.6.26

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/Documentation/feature-removal-schedule.txt
===================================================================
--- linux.orig/Documentation/feature-removal-schedule.txt
+++ linux/Documentation/feature-removal-schedule.txt
@@ -354,3 +354,15 @@ Why:	The support code for the old firmwa
 	and slightly hurts runtime performance. Bugfixes for the old firmware
 	are not provided by Broadcom anymore.
 Who:	Michael Buesch <mb@bu3sch.de>
+
+---------------------------
+
+What:   Support for /proc/sys/net/ipv4/tcp_tw_{reuse,recycle} = 1
+When:   2.6.26
+Why:    Enabling either of those makes Linux TCP incompatible with masquerading and
+        also opens Linux to the CVE-2005-0356 denial of service attack.  And these
+        optimizations are explicitely disallowed by some benchmarks. They also have
+        been disabled by default for more than ten years so they're unlikely to be used
+	much. Due to these fatal flaws it doesn't make sense to keep the code.
+Who:    Andi Kleen <andi@firstfloor.org>
+

^ permalink raw reply

* Re: [PATCH 1/8] [Blackfin] EMAC driver: shorten the mdelay value to solve netperf performance issue
From: Jeff Garzik @ 2008-01-30  9:00 UTC (permalink / raw)
  To: Bryan Wu; +Cc: netdev, linux-kernel
In-Reply-To: <1201683148-23931-2-git-send-email-bryan.wu@analog.com>

Bryan Wu wrote:
> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
> ---
>  drivers/net/bfin_mac.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

applied 1-8



^ permalink raw reply

* Re: net-2.6.25 is no more...
From: Daniel Lezcano @ 2008-01-30  9:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20080129.212216.186173371.davem@davemloft.net>

David Miller wrote:
> Now that the bulk has been merged over and we are
> actively working alongside Linus's tree I have moved
> all current patch applying to net-2.6 instead of net-2.6.25,
> so the current tree to use is:
> 
> 	kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git

This tree is for fixes only, right ? or shall we send enhancement 
patches to net-2.6 until net-2.6.26 appears ?

^ permalink raw reply

* Re: sis190 build breakage
From: Sam Ravnborg @ 2008-01-30  9:13 UTC (permalink / raw)
  To: Jeff Garzik, Jan Beulich; +Cc: Francois Romieu, maximilian attems, netdev
In-Reply-To: <47A033DB.3070608@garzik.org>

On Wed, Jan 30, 2008 at 03:22:51AM -0500, Jeff Garzik wrote:
> Sam Ravnborg wrote:
> >On Tue, Jan 29, 2008 at 11:03:10PM +0100, Francois Romieu wrote:
> >>maximilian attems <max@stro.at> :
> >>>  CC [M]  drivers/net/sis190.o
> >>>  drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type 
> >>>  conflict
> >>>  make[5]: *** [drivers/net/sis190.o] Error 1
> >>>
> >>>gcc --version
> >>>gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
> >
> >Looks like a bug where __initdata has been used
> >for const data.
> >Searching:
> >static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
> >                                                  struct net_device *dev)
> >{
> >        static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
> >        struct sis190_private *tp = netdev_priv(dev);
> >        struct pci_dev *isa_bridge;
> >        u8 reg, tmp8;
> >
> >Try to change this is __initconst and it should be fixed.
> 
> We have __initconst now?
> 
> Three cheers, and a beer, to whomever did that...
I will hand over the cheers to Jan Beulich and drink the beer myself ;-)

	Sam

^ permalink raw reply

* Re: ipcomp regression in 2.6.24
From: Marco Berizzi @ 2008-01-30  9:14 UTC (permalink / raw)
  To: Herbert Xu, davem; +Cc: Daniel.Beschorner, netdev
In-Reply-To: <E1JK3QD-0006hM-00@gondolin.me.apana.org.au>

Herbert Xu wrote:

> Marco Berizzi <pupilla@hotmail.com> wrote:
> >
> >> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine,
data
> >> > flows in both directions, but no data comes out of the tunnel.
> >> > Needed to disable ipcomp.
> >
> > Same problem here: linux 2.6.24 driven by openswan 2.4.11
> > on Slackware 11.0
>
> My bad.  This patch should fix it.

Sorry for bother you again.
I have applied to 2.6.24, but ipcomp doesn't work anyway.
I have patched a clean 2.6.24 tree and I did a complete
rebuild.
With tcpdump I see both the esp packets going in/out but
I don't see the clear packets on the interface.



^ permalink raw reply

* [PATCH] cls_u32 u32_classify()
From: Dzianis Kahanovich @ 2008-01-30 13:16 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Currently fine u32 "hashkey ... at ..." not work with relative offsets.
There are simpliest fix to use "eat".

-- 
WBR,
Denis Kaganovich,  mahatma@eu.by  http://mahatma.bspu.unibel.by

[-- Attachment #2: cls_u32.diff --]
[-- Type: text/plain, Size: 985 bytes --]

diff -pruN linux-2.6.orig/net/sched/cls_u32.c linux-2.6/net/sched/cls_u32.c
--- linux-2.6.orig/net/sched/cls_u32.c	2008-01-29 23:02:50.000000000 +0200
+++ linux-2.6/net/sched/cls_u32.c	2008-01-30 10:56:11.000000000 +0200
@@ -181,11 +181,13 @@ check_terminal:
 
 		ht = n->ht_down;
 		sel = 0;
-		if (ht->divisor)
-			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
 
-		if (!(n->sel.flags&(TC_U32_VAROFFSET|TC_U32_OFFSET|TC_U32_EAT)))
+		if (!(n->sel.flags&(TC_U32_VAROFFSET|TC_U32_OFFSET|TC_U32_EAT))) {
+			if (!ht->divisor)
+				goto next_ht;
+			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
 			goto next_ht;
+		}
 
 		if (n->sel.flags&(TC_U32_OFFSET|TC_U32_VAROFFSET)) {
 			off2 = n->sel.off + 3;
@@ -198,6 +200,9 @@ check_terminal:
 			off2 = 0;
 		}
 
+		if (ht->divisor)
+			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
+
 		if (ptr < skb_tail_pointer(skb))
 			goto next_ht;
 	}

^ permalink raw reply

* Re: [PATCH] NET: constify data and function pointer tables
From: Jeff Garzik @ 2008-01-30  9:25 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netdev, linux-wireless, John Linville
In-Reply-To: <Pine.LNX.4.64.0801222046170.5722@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> ---
>  drivers/net/bonding/bond_main.c         |    2 +-
>  drivers/net/hamradio/bpqether.c         |    2 +-
>  drivers/net/hamradio/scc.c              |    2 +-
>  drivers/net/hamradio/yam.c              |    2 +-
>  drivers/net/ibmveth.c                   |    2 +-
>  drivers/net/pppoe.c                     |    2 +-
>  drivers/net/pppol2tp.c                  |    4 ++--
>  drivers/net/wireless/libertas/debugfs.c |   14 +++++++-------
>  drivers/net/wireless/strip.c            |    2 +-
>  9 files changed, 16 insertions(+), 16 deletions(-)

ACK -- but you should collect linville's ack of the wireless stuff too 
(even though the patch is simple and obvious)



^ permalink raw reply

* [PATCH] cls_u32 u32_classify() ++
From: Dzianis Kahanovich @ 2008-01-30 13:38 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Currently fine u32 "hashkey ... at ..." not work with relative offsets.
There are simpliest fix to use "eat".
(sorry, i'm idiot)

-- 
WBR,
Denis Kaganovich,  mahatma@eu.by  http://mahatma.bspu.unibel.by





[-- Attachment #2: cls_u32.diff --]
[-- Type: text/plain, Size: 1031 bytes --]

diff -pruN linux-2.6.orig/net/sched/cls_u32.c linux-2.6/net/sched/cls_u32.c
--- linux-2.6.orig/net/sched/cls_u32.c	2008-01-29 23:02:50.000000000 +0200
+++ linux-2.6/net/sched/cls_u32.c	2008-01-30 11:37:31.000000000 +0200
@@ -181,11 +181,13 @@ check_terminal:
 
 		ht = n->ht_down;
 		sel = 0;
-		if (ht->divisor)
-			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
 
-		if (!(n->sel.flags&(TC_U32_VAROFFSET|TC_U32_OFFSET|TC_U32_EAT)))
+		if (!(n->sel.flags&(TC_U32_VAROFFSET|TC_U32_OFFSET|TC_U32_EAT))) {
+			if (!ht->divisor)
+				goto next_ht;
+			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
 			goto next_ht;
+		}
 
 		if (n->sel.flags&(TC_U32_OFFSET|TC_U32_VAROFFSET)) {
 			off2 = n->sel.off + 3;
@@ -198,6 +200,9 @@ check_terminal:
 			off2 = 0;
 		}
 
+		if (ht->divisor && ptr+n->sel.hoff+4 < skb_tail_pointer(skb))
+			sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
+
 		if (ptr < skb_tail_pointer(skb))
 			goto next_ht;
 	}


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox