From dc86d32ab51c4ad3086472457fb90b61249d91f5 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 18 Apr 2006 12:30:51 -0700 Subject: [PATCH 1/2] e1000: fix mispatch for media type detect. Recent patch was mismerged in the miitool path. e1000_media_type_copper was being compared with the phy type instead of the media type. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok --- drivers/net/e1000/e1000_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 82d443ba3612..2b8bced0cf64 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -4174,7 +4174,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) spin_unlock_irqrestore(&adapter->stats_lock, flags); return -EIO; } - if (adapter->hw.phy_type == e1000_media_type_copper) { + if (adapter->hw.media_type == e1000_media_type_copper) { switch (data->reg_num) { case PHY_CTRL: if (mii_reg & MII_CR_POWER_DOWN) From 1cb5821f444cadbe94453282f9f4767cf8744a8e Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 18 Apr 2006 12:31:04 -0700 Subject: [PATCH 2/2] e1000: fix mismerge skb_put. Seems there was a bit of a fix needed to due a bad merge in the legacy receive path. Fixes a panic due to skb_over_panic. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok --- drivers/net/e1000/e1000_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 2b8bced0cf64..fb8cef619142 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3585,8 +3585,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, buffer_info->skb = skb; goto next_desc; } - } else - skb_put(skb, length); + } /* code added for copybreak, this should improve * performance for small packets with large amounts