diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 18:28:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 18:28:00 -0700 |
commit | 22cdbd1d5789cc16c37102eb6f62c3ae377b849e (patch) | |
tree | f86d3d798351c4bde69afbfa80e940aad01abaad /drivers | |
parent | 55f335a8857db2ee22c068e7ab7141fc79928296 (diff) | |
parent | ce45b873028fdf94a24f0850cd554e6fda593e16 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (108 commits)
ehea: Fixing statistics
bonding: Fix lockdep warning after bond_vlan_rx_register()
tunnels: Fix tunnels change rcu protection
caif-u5500: Build config for CAIF shared mem driver
caif-u5500: CAIF shared memory mailbox interface
caif-u5500: CAIF shared memory transport protocol
caif-u5500: Adding shared memory include
drivers/isdn: delete double assignment
drivers/net/typhoon.c: delete double assignment
drivers/net/sb1000.c: delete double assignment
qlcnic: define valid vlan id range
qlcnic: reduce rx ring size
qlcnic: fix mac learning
ehea: fix use after free
inetpeer: __rcu annotations
fib_rules: __rcu annotates ctarget
tunnels: add __rcu annotations
net: add __rcu annotations to protocol
ipv4: add __rcu annotations to routes.c
qlge: bugfix: Restoring the vlan setting.
...
Diffstat (limited to 'drivers')
86 files changed, 3557 insertions, 1439 deletions
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 80f9f3659e4..97c5898cd76 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c @@ -1736,9 +1736,10 @@ static int __devinit eni_do_init(struct atm_dev *dev) eprom = (base+EPROM_SIZE-sizeof(struct midway_eprom)); if (readl(&eprom->magic) != ENI155_MAGIC) { printk("\n"); - printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad " - "magic - expected 0x%x, got 0x%x\n",dev->number, - ENI155_MAGIC,(unsigned) readl(&eprom->magic)); + printk(KERN_ERR DEV_LABEL + "(itf %d): bad magic - expected 0x%x, got 0x%x\n", + dev->number, ENI155_MAGIC, + (unsigned)readl(&eprom->magic)); error = -EINVAL; goto unmap; } diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 210338ea222..81270d221e5 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c @@ -31,48 +31,6 @@ #include <linux/connector.h> #include <linux/delay.h> - -/* - * This job is sent to the kevent workqueue. - * While no event is once sent to any callback, the connector workqueue - * is not created to avoid a useless waiting kernel task. - * Once the first event is received, we create this dedicated workqueue which - * is necessary because the flow of data can be high and we don't want - * to encumber keventd with that. - */ -static void cn_queue_create(struct work_struct *work) -{ - struct cn_queue_dev *dev; - - dev = container_of(work, struct cn_queue_dev, wq_creation); - - dev->cn_queue = create_singlethread_workqueue(dev->name); - /* If we fail, we will use keventd for all following connector jobs */ - WARN_ON(!dev->cn_queue); -} - -/* - * Queue a data sent to a callback. - * If the connector workqueue is already created, we queue the job on it. - * Otherwise, we queue the job to kevent and queue the connector workqueue - * creation too. - */ -int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work) -{ - struct cn_queue_dev *pdev = cbq->pdev; - - if (likely(pdev->cn_queue)) - return queue_work(pdev->cn_queue, work); - - /* Don't create the connector workqueue twice */ - if (atomic_inc_return(&pdev->wq_requested) == 1) - schedule_work(&pdev->wq_creation); - else - atomic_dec(&pdev->wq_requested); - - return schedule_work(work); -} - void cn_queue_wrapper(struct work_struct *work) { struct cn_callback_entry *cbq = @@ -111,11 +69,7 @@ cn_queue_alloc_callback_entry(char *name, struct cb_id *id, static void cn_queue_free_callback(struct cn_callback_entry *cbq) { - /* The first jobs have been sent to kevent, flush them too */ - flush_scheduled_work(); - if (cbq->pdev->cn_queue) - flush_workqueue(cbq->pdev->cn_queue); - + flush_workqueue(cbq->pdev->cn_queue); kfree(cbq); } @@ -193,11 +147,14 @@ struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *nls) atomic_set(&dev->refcnt, 0); INIT_LIST_HEAD(&dev->queue_list); spin_lock_init(&dev->queue_lock); - init_waitqueue_head(&dev->wq_created); dev->nls = nls; - INIT_WORK(&dev->wq_creation, cn_queue_create); + dev->cn_queue = alloc_ordered_workqueue(dev->name, 0); + if (!dev->cn_queue) { + kfree(dev); + return NULL; + } return dev; } @@ -205,25 +162,9 @@ struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *nls) void cn_queue_free_dev(struct cn_queue_dev *dev) { struct cn_callback_entry *cbq, *n; - long timeout; - DEFINE_WAIT(wait); - - /* Flush the first pending jobs queued on kevent */ - flush_scheduled_work(); - - /* If the connector workqueue creation is still pending, wait for it */ - prepare_to_wait(&dev->wq_created, &wait, TASK_UNINTERRUPTIBLE); - if (atomic_read(&dev->wq_requested) && !dev->cn_queue) { - timeout = schedule_timeout(HZ * 2); - if (!timeout && !dev->cn_queue) - WARN_ON(1); - } - finish_wait(&dev->wq_created, &wait); - if (dev->cn_queue) { - flush_workqueue(dev->cn_queue); - destroy_workqueue(dev->cn_queue); - } + flush_workqueue(dev->cn_queue); + destroy_workqueue(dev->cn_queue); spin_lock_bh(&dev->queue_lock); list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry) diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 1d48f40342c..e16c3fa8d2e 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -133,7 +133,8 @@ static int cn_call_callback(struct sk_buff *skb) __cbq->data.skb == NULL)) { __cbq->data.skb = skb; - if (queue_cn_work(__cbq, &__cbq->work)) + if (queue_work(dev->cbdev->cn_queue, + &__cbq->work)) err = 0; else err = -EINVAL; @@ -148,13 +149,11 @@ static int cn_call_callback(struct sk_buff *skb) d->callback = __cbq->data.callback; d->free = __new_cbq; - __new_cbq->pdev = __cbq->pdev; - INIT_WORK(&__new_cbq->work, &cn_queue_wrapper); - if (queue_cn_work(__new_cbq, - &__new_cbq->work)) + if (queue_work(dev->cbdev->cn_queue, + &__new_cbq->work)) err = 0; else { kfree(__new_cbq); diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index af25e1f3efd..e90db8870b6 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -563,7 +563,7 @@ reset_inf(struct inf_hw *hw) mdelay(10); hw->ipac.isac.adf2 = 0x87; hw->ipac.hscx[0].slot = 0x1f; - hw->ipac.hscx[0].slot = 0x23; + hw->ipac.hscx[1].slot = 0x23; break; case INF_GAZEL_R753: val = inl((u32)hw->cfg.start + GAZEL_CNTRL); diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c index b0554f80bfb..ee4dae1382e 100644 --- a/drivers/isdn/hisax/l3_1tr6.c +++ b/drivers/isdn/hisax/l3_1tr6.c @@ -164,11 +164,9 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg) char tmp[80]; struct sk_buff *skb = arg; - p = skb->data; - /* Channel Identification */ - p = skb->data; - if ((p = findie(p, skb->len, WE0_chanID, 0))) { + p = findie(skb->data, skb->len, WE0_chanID, 0); + if (p) { if (p[1] != 1) { l3_1tr6_error(pc, "setup wrong chanID len", skb); return; diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index ef4115b897b..9ab58097fa2 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h @@ -631,8 +631,6 @@ struct atl1c_adapter { extern char atl1c_driver_name[]; extern char atl1c_driver_version[]; -extern int atl1c_up(struct atl1c_adapter *adapter); -extern void atl1c_down(struct atl1c_adapter *adapter); extern void atl1c_reinit_locked(struct atl1c_adapter *adapter); extern s32 atl1c_reset_hw(struct atl1c_hw *hw); extern void atl1c_set_ethtool_ops(struct net_device *netdev); diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index 99ffcf667d1..09b099bfab2 100644 --- a/drivers/net/atl1c/atl1c_main.c +++ b/drivers/net/atl1c/atl1c_main.c @@ -66,6 +66,8 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, bool linkup); static void atl1c_setup_mac_ctrl(struct atl1c_adapter *adapter); static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter, u8 que, int *work_done, int work_to_do); +static int atl1c_up(struct atl1c_adapter *adapter); +static void atl1c_down(struct atl1c_adapter *adapter); static const u16 atl1c_pay_load_size[] = { 128, 256, 512, 1024, 2048, 4096, @@ -2309,7 +2311,7 @@ static int atl1c_request_irq(struct atl1c_adapter *adapter) return err; } -int atl1c_up(struct atl1c_adapter *adapter) +static int atl1c_up(struct atl1c_adapter *adapter) { struct net_device *netdev = adapter->netdev; int num; @@ -2351,7 +2353,7 @@ err_alloc_rx: return err; } -void atl1c_down(struct atl1c_adapter *adapter) +static void atl1c_down(struct atl1c_adapter *adapter) { struct net_device *netdev = adapter->netdev; diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index dbd27b8e66b..43579b3b24a 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -91,6 +91,8 @@ MODULE_VERSION(ATLX_DRIVER_VERSION); /* Temporary hack for merging atl1 and atl2 */ #include "atlx.c" +static const struct ethtool_ops atl1_ethtool_ops; + /* * This is the only thing that needs to be changed to adjust the * maximum number of ports that the driver can manage. @@ -353,7 +355,7 @@ static bool atl1_read_eeprom(struct atl1_hw *hw, u32 offset, u32 *p_value) * hw - Struct containing variables accessed by shared code * reg_addr - address of the PHY register to read */ -s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data) +static s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data) { u32 val; int i; @@ -553,7 +555,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw) * 1. calcu 32bit CRC for multicast address * 2. reverse crc with MSB to LSB */ -u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) +static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) { u32 crc32, value = 0; int i; @@ -570,7 +572,7 @@ u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) * hw - Struct containing variables accessed by shared code * hash_value - Multicast address hash value */ -void atl1_hash_set(struct atl1_hw *hw, u32 hash_value) +static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value) { u32 hash_bit, hash_reg; u32 mta; @@ -914,7 +916,7 @@ static s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex return 0; } -void atl1_set_mac_addr(struct atl1_hw *hw) +static void atl1_set_mac_addr(struct atl1_hw *hw) { u32 value; /* @@ -3658,7 +3660,7 @@ static int atl1_nway_reset(struct net_device *netdev) return 0; } -const struct ethtool_ops atl1_ethtool_ops = { +static const struct ethtool_ops atl1_ethtool_ops = { .get_settings = atl1_get_settings, .set_settings = atl1_set_settings, .get_drvinfo = atl1_get_drvinfo, diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h index 9c0ddb273ac..68de8cbfb3e 100644 --- a/drivers/net/atlx/atl1.h +++ b/drivers/net/atlx/atl1.h @@ -56,16 +56,13 @@ struct atl1_adapter; struct atl1_hw; /* function prototypes needed by multiple files */ -u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); -void atl1_hash_set(struct atl1_hw *hw, u32 hash_value); -s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data); -void atl1_set_mac_addr(struct atl1_hw *hw); +static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); +static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value); +static void atl1_set_mac_addr(struct atl1_hw *hw); static int atl1_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); static u32 atl1_check_link(struct atl1_adapter *adapter); -extern const struct ethtool_ops atl1_ethtool_ops; - /* hardware definitions specific to L1 */ /* Block IDLE Status Register */ diff --git a/drivers/net/atlx/atlx.c b/drivers/net/atlx/atlx.c index f979ea2d6d3..afb7f7dd1bb 100644 --- a/drivers/net/atlx/atlx.c +++ b/drivers/net/atlx/atlx.c @@ -41,6 +41,10 @@ #include "atlx.h" +static s32 atlx_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data); +static u32 atlx_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); +static void atlx_set_mac_addr(struct atl1_hw *hw); + static struct atlx_spi_flash_dev flash_table[] = { /* MFR_NAME WRSR READ PRGM WREN WRDI RDSR RDID SEC_ERS CHIP_ERS */ {"Atmel", 0x00, 0x03, 0x02, 0x06, 0x04, 0x05, 0x15, 0x52, 0x62}, diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 1e7f305ed00..36eca1ce75d 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -1471,42 +1471,6 @@ err: return status; } -/* Uses sync mcc */ -int be_cmd_read_port_type(struct be_adapter *adapter, u32 port, - u8 *connector) -{ - struct be_mcc_wrb *wrb; - struct be_cmd_req_port_type *req; - int status; - - spin_lock_bh |