Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* 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.
  ...
  • Loading branch information
torvalds committed Oct 28, 2010
2 parents 55f335a + ce45b87 commit 22cdbd1
Show file tree
Hide file tree
Showing 145 changed files with 4,008 additions and 1,822 deletions.
18 changes: 0 additions & 18 deletions Documentation/networking/phy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,6 @@ Doing it all yourself

A convenience function to print out the PHY status neatly.

int phy_clear_interrupt(struct phy_device *phydev);
int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);

Clear the PHY's interrupt, and configure which ones are allowed,
respectively. Currently only supports all on, or all off.

int phy_enable_interrupts(struct phy_device *phydev);
int phy_disable_interrupts(struct phy_device *phydev);

Functions which enable/disable PHY interrupts, clearing them
before and after, respectively.

int phy_start_interrupts(struct phy_device *phydev);
int phy_stop_interrupts(struct phy_device *phydev);

Expand All @@ -213,12 +201,6 @@ Doing it all yourself
Fills the phydev structure with up-to-date information about the current
settings in the PHY.

void phy_sanitize_settings(struct phy_device *phydev)

Resolves differences between currently desired settings, and
supported settings for the given PHY device. Does not make
the changes in the hardware, though.

int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);

Expand Down
7 changes: 4 additions & 3 deletions drivers/atm/eni.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
75 changes: 8 additions & 67 deletions drivers/connector/cn_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -193,37 +147,24 @@ 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;
}

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)
Expand Down
9 changes: 4 additions & 5 deletions drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hardware/mISDN/mISDNinfineon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions drivers/isdn/hisax/l3_1tr6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/atl1c/atl1c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2351,7 +2353,7 @@ int atl1c_up(struct atl1c_adapter *adapter)
return err;
}

void atl1c_down(struct atl1c_adapter *adapter)
static void atl1c_down(struct atl1c_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;

Expand Down
12 changes: 7 additions & 5 deletions drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
/*
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 3 additions & 6 deletions drivers/net/atlx/atl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/atlx/atlx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
36 changes: 0 additions & 36 deletions drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,42 +1471,6 @@ int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state)
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(&adapter->mcc_lock);

wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);

be_wrb_hdr_prepare(wrb, sizeof(struct be_cmd_resp_port_type), true, 0,
OPCODE_COMMON_READ_TRANSRECV_DATA);

be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
OPCODE_COMMON_READ_TRANSRECV_DATA, sizeof(*req));

req->port = cpu_to_le32(port);
req->page_num = cpu_to_le32(TR_PAGE_A0);
status = be_mcc_notify_wait(adapter);
if (!status) {
struct be_cmd_resp_port_type *resp = embedded_payload(wrb);
*connector = resp->data.connector;
}

err:
spin_unlock_bh(&adapter->mcc_lock);
return status;
}

int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
u32 flash_type, u32 flash_opcode, u32 buf_size)
{
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,6 @@ extern int be_cmd_set_beacon_state(struct be_adapter *adapter,
u8 port_num, u8 beacon, u8 status, u8 state);
extern int be_cmd_get_beacon_state(struct be_adapter *adapter,
u8 port_num, u32 *state);
extern int be_cmd_read_port_type(struct be_adapter *adapter, u32 port,
u8 *connector);
extern int be_cmd_write_flashrom(struct be_adapter *adapter,
struct be_dma_mem *cmd, u32 flash_oper,
u32 flash_opcode, u32 buf_size);
Expand Down
Loading

0 comments on commit 22cdbd1

Please sign in to comment.