net driver fixes
Subsystems (6)
PATCH 1/1 net driver fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
arch/mips/sgi-ip32/Makefile | 2 +- arch/mips/sgi-ip32/ip32-platform.c | 20 +++++++++ drivers/net/Kconfig | 2 +- drivers/net/chelsio/suni1x10gexp_regs.h | 2 +- drivers/net/forcedeth.c | 2 +- drivers/net/meth.c | 68 ++++++++++++++++++++---------- drivers/net/phy/fixed.c | 4 ++ drivers/net/spider_net.c | 6 +- drivers/net/ucc_geth.c | 3 - drivers/net/ucc_geth_mii.c | 2 - drivers/net/usb/asix.c | 4 ++ drivers/net/wireless/libertas/decl.h | 2 +- drivers/net/wireless/libertas/fw.c | 14 ++++-- drivers/net/wireless/libertas/rx.c | 24 ++--------- 14 files changed, 95 insertions(+), 60 deletions(-) create mode 100644 arch/mips/sgi-ip32/ip32-platform.c
Ayaz Abdulla (1):
forcedeth: fix cpu irq mask
David Hollis (1):
asix.c - Add Belkin F5D5055 ids
Denver Gingerich (1):
fix compiler warning in fixed.c
Eugene Teo (2):
drivers/net/wireless/libertas/fw.c: fix use-before-check drivers/net/wireless/libertas/rx.c: fix use-after-free
Florin Malita (2):
libertas: skb dereferenced after netif_rx
spidernet: skb used after netif_receive_skb
Li Yang (2):
ucc_geth: Fix MODULE_DEVICE_TABLE() duplication ucc_geth:trivial fix
Mariusz Kozlowski (1):
chelsio parenthesis fix
Ralf Baechle (1):
meth driver renovation
Yoichi Yuasa (1):
remove unnecessary dependency on VIA velocity config
arch/mips/sgi-ip32/Makefile +1 -1
@@ -3,5 +3,5 @@ # under Linux. # -obj-y += ip32-berr.o ip32-irq.o ip32-setup.o ip32-reset.o \ +obj-y += ip32-berr.o ip32-irq.o ip32-platform.o ip32-setup.o ip32-reset.o \ crime.o ip32-memory.o
arch/mips/sgi-ip32/ip32-platform.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <linux/init.h> +#include <linux/platform_device.h> + +static __init int meth_devinit (void ) +{ +struct platform_device *pd; +int ret; + + pd =platform_device_alloc ("meth" ,-1 ); +if (!pd) +return -ENOMEM ; + + ret =platform_device_add (pd); +if (ret) +platform_device_put (pd); + +return ret; +} + +device_initcall (meth_devinit);
drivers/net/Kconfig +1 -1
@@ -2218,7 +2218,7 @@ config SK98LIN config VIA_VELOCITY tristate "VIA Velocity support" - depends on NET_PCI && PCI + depends on PCI select CRC32 select CRC_CCITT select MII
drivers/net/chelsio/suni1x10gexp_regs.h +1 -1
@@ -105,7 +105,7 @@#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_LOW (filterId) (0x204A + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId))#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_MID (filterId) (0x204B + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId))#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_HIGH (filterId)(0x204C + mSUNI1x10GEXP_MAC_FILTER_OFFSET(filterId)) -#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID (filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId) +#define mSUNI1x10GEXP_REG_RXXG_EXACT_MATCH_VID (filterId) (0x2062 + mSUNI1x10GEXP_MAC_VID_FILTER_OFFSET(filterId))#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_LOW 0x204A#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_MID 0x204B#define SUNI1x10GEXP_REG_RXXG_EXACT_MATCH_ADDR_0_HIGH 0x204C
drivers/net/forcedeth.c +1 -1
@@ -195,7 +195,7 @@ enum {#define NVREG_IRQ_TX_FORCED 0x0100#define NVREG_IRQ_RECOVER_ERROR 0x8000#define NVREG_IRQMASK_THROUGHPUT 0x00df -#define NVREG_IRQMASK_CPU 0x0040 +#define NVREG_IRQMASK_CPU 0x0060#define NVREG_IRQ_TX_ALL (NVREG_IRQ_TX_ERR|NVREG_IRQ_TX_OK|NVREG_IRQ_TX_FORCED)#define NVREG_IRQ_RX_ALL (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_RX_FORCED)#define NVREG_IRQ_OTHER (NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_RECOVER_ERROR)
drivers/net/meth.c +45 -23
122 lines not on this page · raw message
drivers/net/phy/fixed.c +4 -0
@@ -89,6 +89,7 @@ EXPORT_SYMBOL(fixed_mdio_set_link_update);/*----------------------------------------------------------------------------- * This is used for updating internal mii regs from the status *-----------------------------------------------------------------------------*/ +#if defined(CONFIG_FIXED_MII_100_FDX ) || defined(CONFIG_FIXED_MII_10_FDX )static int fixed_mdio_update_regs (struct fixed_info *fixed) {u16 *regs = fixed->regs;
@@ -165,6 +166,7 @@ static int fixed_mii_reset(struct mii_bus *bus)/*nothing here - no way/need to reset it*/ return 0; } +#endif static int fixed_config_aneg (struct phy_device *phydev) {
@@ -194,6 +196,7 @@ static struct phy_driver fixed_mdio_driver = {* number is used to create multiple fixed PHYs, so that several devices can * utilize them simultaneously. *-----------------------------------------------------------------------------*/ +#if defined(CONFIG_FIXED_MII_100_FDX ) || defined(CONFIG_FIXED_MII_10_FDX )static int fixed_mdio_register_device (int number,int speed,int duplex) {struct mii_bus *new_bus;
@@ -301,6 +304,7 @@ device_create_fail: return err; } +#endif MODULE_DESCRIPTION ("Fixed PHY device & driver for PAL" );
drivers/net/spider_net.c +3 -3
@@ -1014,12 +1014,12 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,*/ } -/* pass skb up to stack */ -netif_receive_skb (skb); -/* update netdevice statistics */ card->netdev_stats.rx_packets++; card->netdev_stats.rx_bytes += skb->len; + +/* pass skb up to stack */ +netif_receive_skb (skb); }#ifdef DEBUG
drivers/net/ucc_geth.c +0 -3
@@ -23,11 +23,8 @@#include <linux/skbuff.h> #include <linux/spinlock.h> #include <linux/mm.h> -#include <linux/ethtool.h> -#include <linux/delay.h> #include <linux/dma-mapping.h> #include <linux/fsl_devices.h> -#include <linux/ethtool.h> #include <linux/mii.h> #include <linux/phy.h> #include <linux/workqueue.h>
drivers/net/ucc_geth_mii.c +0 -2
@@ -260,8 +260,6 @@ static struct of_device_id uec_mdio_match[] = { {}, }; -MODULE_DEVICE_TABLE (of, uec_mdio_match); -static struct of_platform_driver uec_mdio_driver = { .name =DRV_NAME , .probe = uec_mdio_probe,
drivers/net/usb/asix.c +4 -0
@@ -1458,6 +1458,10 @@ static const struct usb_device_id products [] = {// IO-DATA ETG-US2 USB_DEVICE (0x04bb, 0x0930), .driver_info = (unsigned long) &ax88178_info, +}, { +// Belkin F5D5055 + USB_DEVICE(0x050d, 0x5055), + .driver_info = (unsigned long) &ax88178_info, }, { }, // END };
drivers/net/wireless/libertas/decl.h +1 -1
@@ -46,7 +46,7 @@ u32 libertas_index_to_data_rate(u8 index);u8 libertas_data_rate_to_index (u32 rate);void libertas_get_fwversion (wlan_adapter * adapter,char *fwversion,int maxlen); -int libertas_upload_rx_packet (wlan_private * priv,struct sk_buff *skb); +void libertas_upload_rx_packet (wlan_private * priv,struct sk_buff *skb);/** The proc fs interface */ int libertas_process_rx_command (wlan_private * priv);
drivers/net/wireless/libertas/fw.c +9 -5
@@ -333,18 +333,22 @@ static void command_timer_fn(unsigned long data)unsigned long flags; ptempnode = adapter->cur_cmd; +if (ptempnode ==NULL ) { +lbs_pr_debug (1 ,"PTempnode Empty\n" ); +return ; + } + cmd = (struct cmd_ds_command *)ptempnode->bufvirtualaddr; +if (!cmd) { +lbs_pr_debug (1 ,"cmd is NULL\n" ); +return ; + }lbs_pr_info ("command_timer_fn fired (%x)\n" , cmd->command);if (!adapter->fw_ready)return ; -if (ptempnode ==NULL ) { -lbs_pr_debug (1 ,"PTempnode Empty\n" ); -return ; - } -spin_lock_irqsave (&adapter->driver_lock, flags); adapter->cur_cmd =NULL ;spin_unlock_irqrestore (&adapter->driver_lock, flags);
drivers/net/wireless/libertas/rx.c +5 -19
@@ -136,7 +136,7 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd)LEAVE (); } -int libertas_upload_rx_packet (wlan_private * priv,struct sk_buff *skb) +void libertas_upload_rx_packet (wlan_private * priv,struct sk_buff *skb) {lbs_pr_debug (1 ,"skb->data=%p\n" , skb->data);
@@ -148,8 +148,6 @@ int libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) skb->ip_summed =CHECKSUM_UNNECESSARY ;netif_rx (skb); - -return 0 ; }/**
@@ -269,15 +267,11 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)wlan_compute_rssi (priv, p_rx_pd);lbs_pr_debug (1 ,"RX Data: size of actual packet = %d\n" , skb->len); -if (libertas_upload_rx_packet (priv, skb)) { -lbs_pr_debug (1 ,"RX error: libertas_upload_rx_packet" -" returns failure\n" ); - ret =-1 ; - goto done; - } priv->stats.rx_bytes += skb->len; priv->stats.rx_packets++; +libertas_upload_rx_packet (priv, skb); + ret =0 ; done:LEAVE ();
@@ -438,22 +432,14 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)wlan_compute_rssi (priv, prxpd);lbs_pr_debug (1 ,"RX Data: size of actual packet = %d\n" , skb->len); - -if (libertas_upload_rx_packet (priv, skb)) { -lbs_pr_debug (1 ,"RX error: libertas_upload_rx_packet " -"returns failure\n" ); - ret =-1 ; - goto done; - } - priv->stats.rx_bytes += skb->len; priv->stats.rx_packets++; +libertas_upload_rx_packet (priv, skb); + ret =0 ; done:LEAVE (); - skb->protocol =__constant_htons (0x0019 );/* ETH_P_80211_RAW */ -return (ret); }