net driver updates .27
Subsystems (6)
PATCH 1/1 net driver updates .27
Please pull from 'davem-next' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next
to receive the following updates:
Documentation/powerpc/booting-without-of.txt | 21 + drivers/net/Kconfig | 4 +- drivers/net/forcedeth.c | 61 +- drivers/net/fs_enet/fs_enet-main.c | 31 +- drivers/net/myri10ge/myri10ge.c | 1076 ++++++++++++++++++++------ drivers/net/ns83820.c | 9 +- drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-ofgpio.c | 205 +++++ drivers/net/ps3_gelic_net.c | 10 +- drivers/net/ps3_gelic_net.h | 2 +- drivers/net/ps3_gelic_wireless.c | 40 +- drivers/net/ps3_gelic_wireless.h | 4 +- drivers/net/s2io.c | 2 +- drivers/net/sfc/Kconfig | 2 + drivers/net/sfc/Makefile | 2 +- drivers/net/sfc/boards.c | 2 +- drivers/net/sfc/boards.h | 3 +- drivers/net/sfc/efx.c | 2 + drivers/net/sfc/falcon.c | 74 ++- drivers/net/sfc/i2c-direct.c | 381 --------- drivers/net/sfc/i2c-direct.h | 91 --- drivers/net/sfc/net_driver.h | 11 +- drivers/net/sfc/sfe4001.c | 126 ++-- drivers/net/sky2.c | 173 ++++- drivers/net/sky2.h | 23 +- drivers/net/tlan.c | 490 ++++++------ drivers/net/tlan.h | 26 +- drivers/net/tsi108_eth.c | 6 +- 29 files changed, 1749 insertions(+), 1135 deletions(-) create mode 100644 drivers/net/phy/mdio-ofgpio.c delete mode 100644 drivers/net/sfc/i2c-direct.c delete mode 100644 drivers/net/sfc/i2c-direct.h
Ben Hutchings (2):
sfc: Use kernel I2C system and i2c-algo-bit driver
sfc: Reduce I2C udelay to 5 resulting in a clock frequency of 100 kHz
Brice Goglin (3):
myri10ge: add routines for multislices
myri10ge: add multislices support
myri10ge: add Direct Cache Access support
Daniel Walker (3):
ps3: gelic: scan_lock semaphore to mutex
ps3: gelic: assoc_stat_lock semaphore to mutex
ps3: gelic: updown_lock semaphore to mutex
Laurent Pinchart (2):
net: OpenFirmware GPIO based MDIO bitbang driver
fs_enet: MDIO on GPIO support
Marcin Slusarz (1):
net/s2io: set_rxd_buffer_pointer returns -ENOMEM, not ENOMEM
Randy Dunlap (1):
cxgb3: fix build error when INET=n
Stephen Hemminger (12):
tlan: get rid of padding buffer
tlan: use netdevice stats
tlan: remove unused devName field
tlan: 64bit conversion
tlan: manage rx allocation failure better
tlan: proper shared IRQ support
tlan: wrap source lines
sky2: split phy power into two functions
sky2: put PHY in sleep when down
sky2: pci power savings
ts108: use netdev_alloc_skb
ns8320: use netdev_alloc_skb
Tobias Diedrich (3):
[netdrvr] forcedeth: setup wake-on-lan before shutting down [netdrvr] forcedeth: save/restore device configuration space [netdrvr] forcedeth: reorder suspend/resume code
Documentation/powerpc/booting-without-of.txt +21 -0
@@ -58,6 +58,7 @@ Table of Contents o) Xilinx IP cores p) Freescale Synchronous Serial Interface q) USB EHCI controllers + r) MDIO on GPIOs VII - Marvell Discovery mv64[345]6x System Controller chips 1) The /system-controller node
@@ -2870,6 +2871,26 @@ platforms are moved over to use the flattened-device-tree model. reg = <0xe8000000 32>; }; + r) MDIO on GPIOs + + Currently defined compatibles: + - virtual,gpio-mdio + + MDC and MDIO lines connected to GPIO controllers are listed in the + gpios property as described in section VIII.1 in the following order: + + MDC, MDIO. + + Example: + + mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpios = <&qe_pio_a 11 + &qe_pio_c 6>; + }; + VII - Marvell Discovery mv64[345]6x System Controller chips ===========================================================
drivers/net/Kconfig +2 -2
@@ -1670,7 +1670,7 @@ config SUNDANCE_MMIO config TLAN tristate "TI ThunderLAN support" - depends on NET_PCI && (PCI || EISA) && !64BIT + depends on NET_PCI && (PCI || EISA) ---help--- If you have a PCI Ethernet network card based on the ThunderLAN chip which is supported by this driver, say Y and read the
@@ -2408,7 +2408,7 @@ config CHELSIO_T1_NAPI config CHELSIO_T3 tristate "Chelsio Communications T3 10Gb Ethernet support" - depends on PCI + depends on PCI && INET select FW_LOADER select INET_LRO help
drivers/net/forcedeth.c +41 -20
109 lines not on this page · raw message
drivers/net/fs_enet/fs_enet-main.c +20 -11
@@ -43,6 +43,7 @@#include <asm/uaccess.h> #ifdef CONFIG_PPC_CPM_NEW_BINDING +#include <linux/of_gpio.h> #include <asm/of_platform.h> #endif
@@ -1172,8 +1173,7 @@ static int __devinit find_phy(struct device_node *np, struct fs_platform_info *fpi) {struct device_node *phynode, *mdionode; -struct resource res; -int ret =0 , len; +int ret =0 , len, bus_id;const u32 *data; data =of_get_property (np,"fixed-link" ,NULL );
@@ -1190,19 +1190,28 @@ static int __devinit find_phy(struct device_node *np,if (!phynode)return -EINVAL ; - mdionode =of_get_parent (phynode); -if (!mdionode) + data =of_get_property (phynode,"reg" , &len); +if (!data || len !=4 ) { + ret = -EINVAL ; goto out_put_phy; + } - ret =of_address_to_resource (mdionode,0 , &res); -if (ret) - goto out_put_mdio; + mdionode =of_get_parent (phynode); +if (!mdionode) { + ret = -EINVAL ; + goto out_put_phy; + } - data =of_get_property (phynode,"reg" , &len); -if (!data || len !=4 ) - goto out_put_mdio; + bus_id =of_get_gpio (mdionode,0 ); +if (bus_id <0 ) { +struct resource res; + ret =of_address_to_resource (mdionode,0 , &res); +if (ret) + goto out_put_mdio; + bus_id = res.start; + } -snprintf (fpi->bus_id,16 ,"%x:%02x" , res.start, *data); +snprintf (fpi->bus_id,16 ,"%x:%02x" , bus_id, *data); out_put_mdio:of_node_put (mdionode);
drivers/net/myri10ge/myri10ge.c +838 -238
1,520 lines not on this page · raw message
drivers/net/ns83820.c +3 -6
@@ -585,16 +585,13 @@ static inline int rx_refill(struct net_device *ndev, gfp_t gfp)for (i=0 ; i<NR_RX_DESC ; i++) {struct sk_buff *skb;long res; +/* extra 16 bytes for alignment */ - skb =__dev_alloc_skb (REAL_RX_BUF_SIZE +16 , gfp); + skb =__netdev_alloc_skb (ndev,REAL_RX_BUF_SIZE +16 , gfp);if (unlikely (!skb))break ; - res = (long )skb->data &0xf ; - res =0x10 - res; - res &=0xf ; -skb_reserve (skb, res); - +skb_reserve (skb, skb->data -PTR_ALIGN (skb->data,16 ));if (gfp !=GFP_ATOMIC )spin_lock_irqsave (&dev->rx_info.lock, flags); res =ns83820_add_rx_skb (dev, skb);
drivers/net/phy/Kconfig +6 -0
@@ -84,4 +84,10 @@ config MDIO_BITBANG If in doubt, say N. +config MDIO_OF_GPIO + tristate "Support for GPIO lib-based bitbanged MDIO buses" + depends on MDIO_BITBANG && OF_GPIO + ---help--- + Supports GPIO lib-based MDIO busses. + endif # PHYLIB
drivers/net/phy/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_ICPLUS_PHY) += icplus.o obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_FIXED_PHY) += fixed.o obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o +obj-$(CONFIG_MDIO_OF_GPIO) += mdio-ofgpio.o
drivers/net/phy/mdio-ofgpio.c new file +205 -0
205 lines not on this page · raw message
drivers/net/ps3_gelic_net.c +5 -5
@@ -110,7 +110,7 @@ static void gelic_card_get_ether_port_status(struct gelic_card *card,void gelic_card_up (struct gelic_card *card) {pr_debug ("%s: called\n" , __func__); -down (&card->updown_lock); +mutex_lock (&card->updown_lock);if (atomic_inc_return (&card->users) ==1 ) {pr_debug ("%s: real do\n" , __func__);/* enable irq */
@@ -120,7 +120,7 @@ void gelic_card_up(struct gelic_card *card)napi_enable (&card->napi); } -up (&card->updown_lock); +mutex_unlock (&card->updown_lock);pr_debug ("%s: done\n" , __func__); }
@@ -128,7 +128,7 @@ void gelic_card_down(struct gelic_card *card) {u64 mask;pr_debug ("%s: called\n" , __func__); -down (&card->updown_lock); +mutex_lock (&card->updown_lock);if (atomic_dec_if_positive (&card->users) ==0 ) {pr_debug ("%s: real do\n" , __func__);napi_disable (&card->napi);
@@ -146,7 +146,7 @@ void gelic_card_down(struct gelic_card *card)/* stop tx */ gelic_card_disable_txdmac (card); } -up (&card->updown_lock); +mutex_unlock (&card->updown_lock);pr_debug ("%s: done\n" , __func__); }
@@ -1534,7 +1534,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)INIT_WORK (&card->tx_timeout_task, gelic_net_tx_timeout_task);init_waitqueue_head (&card->waitq);atomic_set (&card->tx_timeout_task_counter,0 ); -init_MUTEX (&card->updown_lock); +mutex_init (&card->updown_lock);atomic_set (&card->users,0 );return card;
drivers/net/ps3_gelic_net.h +1 -1
@@ -298,7 +298,7 @@ struct gelic_card {wait_queue_head_t waitq;/* only first user should up the card */ -struct semaphore updown_lock; +struct mutex updown_lock;atomic_t users;u64 ether_port_status;
drivers/net/ps3_gelic_wireless.c +20 -20
@@ -240,12 +240,12 @@ static u32 gelic_wl_get_link(struct net_device *netdev)u32 ret;pr_debug ("%s: <-\n" , __func__); -down (&wl->assoc_stat_lock); +mutex_lock (&wl->assoc_stat_lock);if (wl->assoc_stat ==GELIC_WL_ASSOC_STAT_ASSOCIATED ) ret =1 ;else ret =0 ; -up (&wl->assoc_stat_lock); +mutex_unlock (&wl->assoc_stat_lock);pr_debug ("%s: ->\n" , __func__);return ret; }
@@ -695,7 +695,7 @@ static int gelic_wl_get_scan(struct net_device *netdev,unsigned long this_time = jiffies;pr_debug ("%s: <-\n" , __func__); -if (down_interruptible (&wl->scan_lock)) +if (mutex_lock_interruptible (&wl->scan_lock))return -EAGAIN ;switch (wl->scan_stat) {
@@ -733,7 +733,7 @@ static int gelic_wl_get_scan(struct net_device *netdev, wrqu->data.length = ev - extra; wrqu->data.flags =0 ; out: -up (&wl->scan_lock); +mutex_unlock (&wl->scan_lock);pr_debug ("%s: -> %d %d\n" , __func__, ret, wrqu->data.length);return ret; }
@@ -979,7 +979,7 @@ static int gelic_wl_get_essid(struct net_device *netdev,unsigned long irqflag;pr_debug ("%s: <- \n" , __func__); -down (&wl->assoc_stat_lock); +mutex_lock (&wl->assoc_stat_lock);spin_lock_irqsave (&wl->lock, irqflag);if (test_bit (GELIC_WL_STAT_ESSID_SET , &wl->stat) || wl->assoc_stat ==GELIC_WL_ASSOC_STAT_ASSOCIATED ) {
@@ -989,7 +989,7 @@ static int gelic_wl_get_essid(struct net_device *netdev, }else data->essid.flags =0 ; -up (&wl->assoc_stat_lock); +mutex_unlock (&wl->assoc_stat_lock);spin_unlock_irqrestore (&wl->lock, irqflag);pr_debug ("%s: -> len=%d \n" , __func__, data->essid.length);
@@ -1170,7 +1170,7 @@ static int gelic_wl_get_ap(struct net_device *netdev,unsigned long irqflag;pr_debug ("%s: <-\n" , __func__); -down (&wl->assoc_stat_lock); +mutex_lock (&wl->assoc_stat_lock);spin_lock_irqsave (&wl->lock, irqflag);if (wl->assoc_stat ==GELIC_WL_ASSOC_STAT_ASSOCIATED ) { data->ap_addr.sa_family =ARPHRD_ETHER ;
@@ -1180,7 +1180,7 @@ static int gelic_wl_get_ap(struct net_device *netdev,memset (data->ap_addr.sa_data,0 ,ETH_ALEN );spin_unlock_irqrestore (&wl->lock, irqflag); -up (&wl->assoc_stat_lock); +mutex_unlock (&wl->assoc_stat_lock);pr_debug ("%s: ->\n" , __func__);return 0 ; }
@@ -1554,7 +1554,7 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan)int ret =0 ;pr_debug ("%s: <- always=%d\n" , __func__, always_scan); -if (down_interruptible (&wl->scan_lock)) +if (mutex_lock_interruptible (&wl->scan_lock))return -ERESTARTSYS ;/*
@@ -1588,7 +1588,7 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan) }kfree (cmd); out: -up (&wl->scan_lock); +mutex_unlock (&wl->scan_lock);pr_debug ("%s: ->\n" , __func__);return ret; }
@@ -1610,7 +1610,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)DECLARE_MAC_BUF (mac);pr_debug ("%s:start\n" , __func__); -down (&wl->scan_lock); +mutex_lock (&wl->scan_lock);if (wl->scan_stat !=GELIC_WL_SCAN_STAT_SCANNING ) {/*
@@ -1727,7 +1727,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl) NULL); out:complete (&wl->scan_done); -up (&wl->scan_lock); +mutex_unlock (&wl->scan_lock);pr_debug ("%s:end\n" , __func__); }
@@ -2151,7 +2151,7 @@ static void gelic_wl_disconnect_event(struct gelic_wl_info *wl,* As it waits with timeout, just leave assoc_done * uncompleted, then it terminates with timeout */ -if (down_trylock (&wl->assoc_stat_lock)) { +if (!mutex_trylock (&wl->assoc_stat_lock)) {pr_debug ("%s: already locked\n" , __func__); lock =0 ; }else {
@@ -2170,7 +2170,7 @@ static void gelic_wl_disconnect_event(struct gelic_wl_info *wl,netif_carrier_off (port_to_netdev (wl_port (wl)));if (lock) -up (&wl->assoc_stat_lock); +mutex_unlock (&wl->assoc_stat_lock); }/* * event worker
@@ -2258,7 +2258,7 @@ static void gelic_wl_assoc_worker(struct work_struct *work) wl = container_of(work, struct gelic_wl_info, assoc_work.work); -down (&wl->assoc_stat_lock); +mutex_lock (&wl->assoc_stat_lock);if (wl->assoc_stat !=GELIC_WL_ASSOC_STAT_DISCONN ) goto out;
@@ -2282,7 +2282,7 @@ static void gelic_wl_assoc_worker(struct work_struct *work)wait_for_completion (&wl->scan_done);pr_debug ("%s: scan done\n" , __func__); -down (&wl->scan_lock); +mutex_lock (&wl->scan_lock);if (wl->scan_stat !=GELIC_WL_SCAN_STAT_GOT_LIST ) {gelic_wl_send_iwap_event (wl,NULL );pr_info ("%s: no scan list. association failed\n" , __func__);
@@ -2302,9 +2302,9 @@ static void gelic_wl_assoc_worker(struct work_struct *work)if (ret)pr_info ("%s: association failed %d\n" , __func__, ret); scan_lock_out: -up (&wl->scan_lock); +mutex_unlock (&wl->scan_lock); out: -up (&wl->assoc_stat_lock); +mutex_unlock (&wl->assoc_stat_lock); }/* * Interrupt handler
@@ -2431,8 +2431,8 @@ static struct net_device *gelic_wl_alloc(struct gelic_card *card)INIT_DELAYED_WORK (&wl->event_work, gelic_wl_event_worker);INIT_DELAYED_WORK (&wl->assoc_work, gelic_wl_assoc_worker); -init_MUTEX (&wl->scan_lock); -init_MUTEX (&wl->assoc_stat_lock); +mutex_init (&wl->scan_lock); +mutex_init (&wl->assoc_stat_lock);init_completion (&wl->scan_done);/* for the case that no scan request is issued and stop() is called */
drivers/net/ps3_gelic_wireless.h +2 -2
@@ -241,7 +241,7 @@ enum gelic_wl_assoc_state {#define GELIC_WEP_KEYS 4struct gelic_wl_info {/* bss list */ -struct semaphore scan_lock; +struct mutex scan_lock;struct list_head network_list;struct list_head network_free_list;struct gelic_wl_scan_info *networks;
@@ -266,7 +266,7 @@ struct gelic_wl_info {enum gelic_wl_wpa_level wpa_level;/* wpa/wpa2 */ /* association handling */ -struct semaphore assoc_stat_lock; +struct mutex assoc_stat_lock;struct delayed_work assoc_work;enum gelic_wl_assoc_state assoc_stat;struct completion assoc_done;
drivers/net/s2io.c +1 -1
@@ -6997,7 +6997,7 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp) &skb,(u64 *)&temp0_64, (u64 *)&temp1_64, (u64 *)&temp2_64, - size) == ENOMEM) { + size) == -ENOMEM) {return 0 ; }
drivers/net/sfc/Kconfig +2 -0
@@ -4,6 +4,8 @@ config SFC select MII select INET_LRO select CRC32 + select I2C + select I2C_ALGOBIT help This driver supports 10-gigabit Ethernet cards based on the Solarflare Communications Solarstorm SFC4000 controller.
drivers/net/sfc/Makefile +1 -1
@@ -1,5 +1,5 @@ sfc-y += efx.o falcon.o tx.o rx.o falcon_xmac.o \ - i2c-direct.o selftest.o ethtool.o xfp_phy.o \ + selftest.o ethtool.o xfp_phy.o \ mdio_10g.o tenxpress.o boards.o sfe4001.o obj-$(CONFIG_SFC) += sfc.o
drivers/net/sfc/boards.c +1 -1
@@ -109,7 +109,7 @@ static struct efx_board_data board_data[] = { [EFX_BOARD_INVALID ] = {NULL, NULL, dummy_init}, [EFX_BOARD_SFE4001 ] = - {"SFE4001", "10GBASE-T adapter", sfe4001_poweron}, + {"SFE4001", "10GBASE-T adapter", sfe4001_init}, [EFX_BOARD_SFE4002 ] = {"SFE4002", "XFP adapter", sfe4002_init}, };
drivers/net/sfc/boards.h +1 -2
@@ -20,8 +20,7 @@ enum efx_board_type { };extern int efx_set_board_info (struct efx_nic *efx,u16 revision_info); -extern int sfe4001_poweron (struct efx_nic *efx); -extern void sfe4001_poweroff (struct efx_nic *efx); +extern int sfe4001_init (struct efx_nic *efx);/* Are we putting the PHY into flash config mode */ extern unsigned int sfe4001_phy_flash_cfg;
drivers/net/sfc/efx.c +2 -0
@@ -1815,6 +1815,7 @@ static struct efx_board efx_dummy_board_info = { .init = efx_nic_dummy_op_int, .init_leds = efx_port_dummy_op_int, .set_fault_led = efx_port_dummy_op_blink, + .fini = efx_port_dummy_op_void, };/**************************************************************************
@@ -1941,6 +1942,7 @@ static void efx_pci_remove_main(struct efx_nic *efx)efx_fini_port (efx);/* Shutdown the board, then the NIC and board state */ + efx->board_info.fini (efx);falcon_fini_interrupt (efx);efx_fini_napi (efx);
drivers/net/sfc/falcon.c +53 -21
132 lines not on this page · raw message
drivers/net/sfc/i2c-direct.c deleted +0 -381
381 lines not on this page · raw message
drivers/net/sfc/i2c-direct.h deleted +0 -91
91 lines not on this page · raw message
drivers/net/sfc/net_driver.h +8 -3
@@ -26,10 +26,10 @@#include <linux/highmem.h> #include <linux/workqueue.h> #include <linux/inet_lro.h> +#include <linux/i2c.h> #include "enum.h" #include "bitfield.h" -#include "i2c-direct.h" #define EFX_MAX_LRO_DESCRIPTORS 8#define EFX_MAX_LRO_AGGR MAX_SKB_FRAGS
@@ -418,7 +418,10 @@ struct efx_blinker {* @init_leds: Sets up board LEDs * @set_fault_led: Turns the fault LED on or off * @blink: Starts/stops blinking +* @fini: Cleanup function * @blinker: used to blink LEDs in software +* @hwmon_client: I2C client for hardware monitor +* @ioexp_client: I2C client for power/port control */ struct efx_board {int type;
@@ -431,7 +434,9 @@ struct efx_board {int (*init_leds)(struct efx_nic *efx);void (*set_fault_led) (struct efx_nic *efx,int state);void (*blink) (struct efx_nic *efx,int start); +void (*fini) (struct efx_nic *nic);struct efx_blinker blinker; +struct i2c_client *hwmon_client, *ioexp_client; };#define STRING_TABLE_LOOKUP (val, member) \
@@ -618,7 +623,7 @@ union efx_multicast_hash {* @membase: Memory BAR value * @biu_lock: BIU (bus interface unit) lock * @interrupt_mode: Interrupt mode -* @i2c: I2C interface +* @i2c_adap: I2C adapter * @board_info: Board-level information * @state: Device state flag. Serialised by the rtnl_lock. * @reset_pending: Pending reset method (normally RESET_TYPE_NONE)
@@ -686,7 +691,7 @@ struct efx_nic {spinlock_t biu_lock;enum efx_int_mode interrupt_mode; -struct efx_i2c_interface i2c; +struct i2c_adapter i2c_adap;struct efx_board board_info;enum nic_state state;
drivers/net/sfc/sfe4001.c +66 -60
117 lines not on this page · raw message
drivers/net/sky2.c +152 -21
173 lines not on this page · raw message
drivers/net/tlan.c +256 -234
490 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 3 lines · Jeff Garzik
Please pull from 'davem-next' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next
<snip>
Hi Jeff,
Any chance of taking the patch at: http://lkml.org/lkml/2008/5/19/10
It's stop Stephen from carrying it in linux-next.
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Fri, 30 May 2008 22:26:52 -0400
Quoted 5 lines
Please pull from 'davem-next' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-next
to receive the following updates:
Pulled and pushed back out to net-next-2.6, thanks Jeff!