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: (89 commits)
  bonding: documentation and code cleanup for resend_igmp
  bonding: prevent deadlock on slave store with alb mode (v3)
  net: hold rtnl again in dump callbacks
  Add Fujitsu 1000base-SX PCI ID to tg3
  bnx2x: protect sequence increment with mutex
  sch_sfq: fix peek() implementation
  isdn: netjet - blacklist Digium TDM400P
  via-velocity: don't annotate MAC registers as packed
  xen: netfront: hold RTNL when updating features.
  sctp: fix memory leak of the ASCONF queue when free asoc
  net: make dev_disable_lro use physical device if passed a vlan dev (v2)
  net: move is_vlan_dev into public header file (v2)
  bug.h: Fix build with CONFIG_PRINTK disabled.
  wireless: fix fatal kernel-doc error + warning in mac80211.h
  wireless: fix cfg80211.h new kernel-doc warnings
  iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabled
  dst: catch uninitialized metrics
  be2net: hash key for rss-config cmd not set
  bridge: initialize fake_rtable metrics
  net: fix __dst_destroy_metrics_generic()
  ...

Fix up trivial conflicts in drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
  • Loading branch information
Linus Torvalds committed May 26, 2011
2 parents 8c1c77f + 94265cf commit 3f5785e
Show file tree
Hide file tree
Showing 187 changed files with 2,049 additions and 1,203 deletions.
13 changes: 11 additions & 2 deletions Documentation/networking/bonding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,17 @@ resend_igmp
a failover event. One membership report is issued immediately after
the failover, subsequent packets are sent in each 200ms interval.

The valid range is 0 - 255; the default value is 1. This option
was added for bonding version 3.7.0.
The valid range is 0 - 255; the default value is 1. A value of 0
prevents the IGMP membership report from being issued in response
to the failover event.

This option is useful for bonding modes balance-rr (0), active-backup
(1), balance-tlb (5) and balance-alb (6), in which a failover can
switch the IGMP traffic from one slave to another. Therefore a fresh
IGMP report must be issued to cause the switch to forward the incoming
IGMP traffic over the newly selected slave.

This option was added for bonding version 3.7.0.

3. Configuring Bonding Devices
==============================
Expand Down
1 change: 1 addition & 0 deletions drivers/bcma/host_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
}

static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
Expand Down
6 changes: 6 additions & 0 deletions drivers/isdn/hardware/mISDN/netjet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,12 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
}

if (pdev->subsystem_vendor == 0xb100 &&
pdev->subsystem_device == 0x0003 ) {
pr_notice("Netjet: Digium TDM400P not handled yet\n");
return -ENODEV;
}

card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC);
if (!card) {
pr_info("No kmem for Netjet\n");
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_rss_config *req;
u32 myhash[10];
u32 myhash[10] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF,
0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF};
int status;

if (mutex_lock_interruptible(&adapter->mbox_lock))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,7 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index)
* Min size diferent for TPA and non-TPA queues
*/
if (ring_size < (fp->disable_tpa ?
MIN_RX_SIZE_TPA : MIN_RX_SIZE_NONTPA)) {
MIN_RX_SIZE_NONTPA : MIN_RX_SIZE_TPA)) {
/* release memory allocated for this queue */
bnx2x_free_fp_mem_at(bp, index);
return -ENOMEM;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2222,12 +2222,13 @@ static void bnx2x_pmf_update(struct bnx2x *bp)
u32 bnx2x_fw_command(struct bnx2x *bp, u32 command, u32 param)
{
int mb_idx = BP_FW_MB_IDX(bp);
u32 seq = ++bp->fw_seq;
u32 seq;
u32 rc = 0;
u32 cnt = 1;
u8 delay = CHIP_REV_IS_SLOW(bp) ? 100 : 10;

mutex_lock(&bp->fw_mb_mutex);
seq = ++bp->fw_seq;
SHMEM_WR(bp, func_mb[mb_idx].drv_mb_param, param);
SHMEM_WR(bp, func_mb[mb_idx].drv_mb_header, (command | seq));

Expand Down
4 changes: 0 additions & 4 deletions drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ static int tlb_initialize(struct bonding *bond)
struct tlb_client_info *new_hashtbl;
int i;

spin_lock_init(&(bond_info->tx_hashtbl_lock));

new_hashtbl = kzalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate TLB hash table\n",
Expand Down Expand Up @@ -747,8 +745,6 @@ static int rlb_initialize(struct bonding *bond)
int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info);
int i;

spin_lock_init(&(bond_info->rx_hashtbl_lock));

new_hashtbl = kmalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate RLB hash table\n",
Expand Down
28 changes: 17 additions & 11 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
{
struct bonding *bond = container_of(work, struct bonding,
mcast_work.work);
mcast_work.work);
bond_resend_igmp_join_requests(bond);
}

Expand Down Expand Up @@ -1172,10 +1172,12 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
}

/* resend IGMP joins since active slave has changed or
* all were sent on curr_active_slave */
if (((USES_PRIMARY(bond->params.mode) && new_active) ||
bond->params.mode == BOND_MODE_ROUNDROBIN) &&
netif_running(bond->dev)) {
* all were sent on curr_active_slave.
* resend only if bond is brought up with the affected
* bonding modes and the retransmission is enabled */
if (netif_running(bond->dev) && (bond->params.resend_igmp > 0) &&
((USES_PRIMARY(bond->params.mode) && new_active) ||
bond->params.mode == BOND_MODE_ROUNDROBIN)) {
bond->igmp_retrans = bond->params.resend_igmp;
queue_delayed_work(bond->wq, &bond->mcast_work, 0);
}
Expand Down Expand Up @@ -1542,12 +1544,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
bond_dev->name, slave_dev->name);
}

/* bond must be initialized by bond_open() before enslaving */
if (!(bond_dev->flags & IFF_UP)) {
pr_warning("%s: master_dev is not up in bond_enslave\n",
bond_dev->name);
}

/* already enslaved */
if (slave_dev->flags & IFF_SLAVE) {
pr_debug("Error, Device was already enslaved\n");
Expand Down Expand Up @@ -4834,9 +4830,19 @@ static int bond_init(struct net_device *bond_dev)
{
struct bonding *bond = netdev_priv(bond_dev);
struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id);
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));

pr_debug("Begin bond_init for %s\n", bond_dev->name);

/*
* Initialize locks that may be required during
* en/deslave operations. All of the bond_open work
* (of which this is part) should really be moved to
* a phase prior to dev_open
*/
spin_lock_init(&(bond_info->tx_hashtbl_lock));
spin_lock_init(&(bond_info->rx_hashtbl_lock));

bond->wq = create_singlethread_workqueue(bond_dev->name);
if (!bond->wq)
return -ENOMEM;
Expand Down
16 changes: 5 additions & 11 deletions drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,6 @@ static ssize_t bonding_store_slaves(struct device *d,
struct net_device *dev;
struct bonding *bond = to_bond(d);

/* Quick sanity check -- is the bond interface up? */
if (!(bond->dev->flags & IFF_UP)) {
pr_warning("%s: doing slave updates when interface is down.\n",
bond->dev->name);
}

if (!rtnl_trylock())
return restart_syscall();

Expand Down Expand Up @@ -1539,17 +1533,17 @@ static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
* Show and set the number of IGMP membership reports to send on link failure
*/
static ssize_t bonding_show_resend_igmp(struct device *d,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr,
char *buf)
{
struct bonding *bond = to_bond(d);

return sprintf(buf, "%d\n", bond->params.resend_igmp);
}

static ssize_t bonding_store_resend_igmp(struct device *d,
struct device_attribute *attr,
const char *buf, size_t count)
struct device_attribute *attr,
const char *buf, size_t count)
{
int new_value, ret = count;
struct bonding *bond = to_bond(d);
Expand All @@ -1561,7 +1555,7 @@ static ssize_t bonding_store_resend_igmp(struct device *d,
goto out;
}

if (new_value < 0) {
if (new_value < 0 || new_value > 255) {
pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n",
bond->dev->name, new_value);
ret = -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
struct netdev_hw_addr *ha;
int ret;

if (dev->flags & IFF_PROMISC) {
if (port->promisc) {
ehea_promiscuous(dev, 1);
return;
}
Expand Down
59 changes: 29 additions & 30 deletions drivers/net/irda/bfin_sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ static void bfin_sir_stop_tx(struct bfin_sir_port *port)
disable_dma(port->tx_dma_channel);
#endif

while (!(SIR_UART_GET_LSR(port) & THRE)) {
while (!(UART_GET_LSR(port) & THRE)) {
cpu_relax();
continue;
}

SIR_UART_STOP_TX(port);
UART_CLEAR_IER(port, ETBEI);
}

static void bfin_sir_enable_tx(struct bfin_sir_port *port)
{
SIR_UART_ENABLE_TX(port);
UART_SET_IER(port, ETBEI);
}

static void bfin_sir_stop_rx(struct bfin_sir_port *port)
{
SIR_UART_STOP_RX(port);
UART_CLEAR_IER(port, ERBFI);
}

static void bfin_sir_enable_rx(struct bfin_sir_port *port)
{
SIR_UART_ENABLE_RX(port);
UART_SET_IER(port, ERBFI);
}

static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
Expand Down Expand Up @@ -116,7 +116,7 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)

do {
udelay(utime);
lsr = SIR_UART_GET_LSR(port);
lsr = UART_GET_LSR(port);
} while (!(lsr & TEMT) && count--);

/* The useconds for 1 bits to transmit */
Expand All @@ -125,27 +125,27 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
/* Clear UCEN bit to reset the UART state machine
* and control registers
*/
val = SIR_UART_GET_GCTL(port);
val = UART_GET_GCTL(port);
val &= ~UCEN;
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);

/* Set DLAB in LCR to Access THR RBR IER */
SIR_UART_SET_DLAB(port);
UART_SET_DLAB(port);
SSYNC();

SIR_UART_PUT_DLL(port, quot & 0xFF);
SIR_UART_PUT_DLH(port, (quot >> 8) & 0xFF);
UART_PUT_DLL(port, quot & 0xFF);
UART_PUT_DLH(port, (quot >> 8) & 0xFF);
SSYNC();

/* Clear DLAB in LCR */
SIR_UART_CLEAR_DLAB(port);
UART_CLEAR_DLAB(port);
SSYNC();

SIR_UART_PUT_LCR(port, lcr);
UART_PUT_LCR(port, lcr);

val = SIR_UART_GET_GCTL(port);
val = UART_GET_GCTL(port);
val |= UCEN;
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);

ret = 0;
break;
Expand All @@ -154,12 +154,12 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
break;
}

val = SIR_UART_GET_GCTL(port);
val = UART_GET_GCTL(port);
/* If not add the 'RPOLC', we can't catch the receive interrupt.
* It's related with the HW layout and the IR transiver.
*/
val |= IREN | RPOLC;
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);
return ret;
}

Expand All @@ -168,7 +168,7 @@ static int bfin_sir_is_receiving(struct net_device *dev)
struct bfin_sir_self *self = netdev_priv(dev);
struct bfin_sir_port *port = self->sir_port;

if (!(SIR_UART_GET_IER(port) & ERBFI))
if (!(UART_GET_IER(port) & ERBFI))
return 0;
return self->rx_buff.state != OUTSIDE_FRAME;
}
Expand All @@ -182,7 +182,7 @@ static void bfin_sir_tx_chars(struct net_device *dev)

if (self->tx_buff.len != 0) {
chr = *(self->tx_buff.data);
SIR_UART_PUT_CHAR(port, chr);
UART_PUT_CHAR(port, chr);
self->tx_buff.data++;
self->tx_buff.len--;
} else {
Expand All @@ -206,8 +206,8 @@ static void bfin_sir_rx_chars(struct net_device *dev)
struct bfin_sir_port *port = self->sir_port;
unsigned char ch;

SIR_UART_CLEAR_LSR(port);
ch = SIR_UART_GET_CHAR(port);
UART_CLEAR_LSR(port);
ch = UART_GET_CHAR(port);
async_unwrap_char(dev, &self->stats, &self->rx_buff, ch);
dev->last_rx = jiffies;
}
Expand All @@ -219,7 +219,7 @@ static irqreturn_t bfin_sir_rx_int(int irq, void *dev_id)
struct bfin_sir_port *port = self->sir_port;

spin_lock(&self->lock);
while ((SIR_UART_GET_LSR(port) & DR))
while ((UART_GET_LSR(port) & DR))
bfin_sir_rx_chars(dev);
spin_unlock(&self->lock);

Expand All @@ -233,7 +233,7 @@ static irqreturn_t bfin_sir_tx_int(int irq, void *dev_id)
struct bfin_sir_port *port = self->sir_port;

spin_lock(&self->lock);
if (SIR_UART_GET_LSR(port) & THRE)
if (UART_GET_LSR(port) & THRE)
bfin_sir_tx_chars(dev);
spin_unlock(&self->lock);

Expand Down Expand Up @@ -312,7 +312,7 @@ static void bfin_sir_dma_rx_chars(struct net_device *dev)
struct bfin_sir_port *port = self->sir_port;
int i;

SIR_UART_CLEAR_LSR(port);
UART_CLEAR_LSR(port);

for (i = port->rx_dma_buf.head; i < port->rx_dma_buf.tail; i++)
async_unwrap_char(dev, &self->stats, &self->rx_buff, port->rx_dma_buf.buf[i]);
Expand Down Expand Up @@ -430,11 +430,10 @@ static void bfin_sir_shutdown(struct bfin_sir_port *port, struct net_device *dev
unsigned short val;

bfin_sir_stop_rx(port);
SIR_UART_DISABLE_INTS(port);

val = SIR_UART_GET_GCTL(port);
val = UART_GET_GCTL(port);
val &= ~(UCEN | IREN | RPOLC);
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);

#ifdef CONFIG_SIR_BFIN_DMA
disable_dma(port->tx_dma_channel);
Expand Down Expand Up @@ -518,12 +517,12 @@ static void bfin_sir_send_work(struct work_struct *work)
* sending data. We also can set the speed, which will
* reset all the UART.
*/
val = SIR_UART_GET_GCTL(port);
val = UART_GET_GCTL(port);
val &= ~(IREN | RPOLC);
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);
SSYNC();
val |= IREN | RPOLC;
SIR_UART_PUT_GCTL(port, val);
UART_PUT_GCTL(port, val);
SSYNC();
/* bfin_sir_set_speed(port, self->speed); */

Expand Down
Loading

0 comments on commit 3f5785e

Please sign in to comment.