Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312017
b: refs/heads/master
c: 2d3f6cc
h: refs/heads/master
i:
  312015: 43bf77a
v: v3
  • Loading branch information
Simon Wunderlich authored and Antonio Quartulli committed Jul 5, 2012
1 parent 237b5f7 commit a4509e3
Show file tree
Hide file tree
Showing 31 changed files with 98 additions and 116 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 313b037cf054ec908de92fb4c085403ffd7420d4
refs/heads/master: 2d3f6ccc4ea5c74d4b4af1b47c56b4cff4bbfcb7
4 changes: 2 additions & 2 deletions trunk/drivers/isdn/mISDN/stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ send_layer2(struct mISDNstack *st, struct sk_buff *skb)
skb = NULL;
else if (*debug & DEBUG_SEND_ERR)
printk(KERN_DEBUG
"%s mgr prim(%x) err %d\n",
__func__, hh->prim, ret);
"%s ch%d mgr prim(%x) addr(%x) err %d\n",
__func__, ch->nr, hh->prim, ch->addr, ret);
}
out:
mutex_unlock(&st->lmutex);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/bonding/bond_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "bonding.h"
#include "bond_alb.h"

#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_NET_NS)
#ifdef CONFIG_DEBUG_FS

#include <linux/debugfs.h>
#include <linux/seq_file.h>
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3227,12 +3227,6 @@ static int bond_master_netdev_event(unsigned long event,
switch (event) {
case NETDEV_CHANGENAME:
return bond_event_changename(event_bond);
case NETDEV_UNREGISTER:
bond_remove_proc_entry(event_bond);
break;
case NETDEV_REGISTER:
bond_create_proc_entry(event_bond);
break;
default:
break;
}
Expand Down Expand Up @@ -4417,6 +4411,8 @@ static void bond_uninit(struct net_device *bond_dev)

bond_work_cancel_all(bond);

bond_remove_proc_entry(bond);

bond_debug_unregister(bond);

__hw_addr_flush(&bond->mc_list);
Expand Down Expand Up @@ -4818,6 +4814,7 @@ static int bond_init(struct net_device *bond_dev)

bond_set_lockdep_class(bond_dev);

bond_create_proc_entry(bond);
list_add_tail(&bond->bond_list, &bn->dev_list);

bond_prepare_sysfs_group(bond);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
if ((phy_data & BMSR_LSTATUS) == 0) {
/* link down */
netif_carrier_off(netdev);
netif_stop_queue(netdev);
hw->hibernate = true;
if (atl1c_reset_mac(hw) != 0)
if (netif_msg_hw(adapter))
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
dma_unmap_single(bp->sdev->dma_dev, mapping,
RX_PKT_BUF_SZ, DMA_FROM_DEVICE);
dev_kfree_skb_any(skb);
skb = alloc_skb(RX_PKT_BUF_SZ, GFP_ATOMIC | GFP_DMA);
skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA);
if (skb == NULL)
return -ENOMEM;
mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
Expand Down Expand Up @@ -967,7 +967,7 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
dma_unmap_single(bp->sdev->dma_dev, mapping, len,
DMA_TO_DEVICE);

bounce_skb = alloc_skb(len, GFP_ATOMIC | GFP_DMA);
bounce_skb = __netdev_alloc_skb(dev, len, GFP_ATOMIC | GFP_DMA);
if (!bounce_skb)
goto err_out;

Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,7 @@ int cnic_unregister_driver(int ulp_type)
}

if (atomic_read(&ulp_ops->ref_count) != 0)
pr_warn("%s: Failed waiting for ref count to go to zero\n",
__func__);
netdev_warn(dev->netdev, "Failed waiting for ref count to go to zero\n");
return 0;

out_unlock:
Expand Down Expand Up @@ -1054,13 +1053,12 @@ static int cnic_init_uio(struct cnic_dev *dev)

uinfo = &udev->cnic_uinfo;

uinfo->mem[0].addr = pci_resource_start(dev->pcidev, 0);
uinfo->mem[0].addr = dev->netdev->base_addr;
uinfo->mem[0].internal_addr = dev->regview;
uinfo->mem[0].size = dev->netdev->mem_end - dev->netdev->mem_start;
uinfo->mem[0].memtype = UIO_MEM_PHYS;

if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
uinfo->mem[0].size = MB_GET_CID_ADDR(TX_TSS_CID +
TX_MAX_TSS_RINGS + 1);
uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen &
PAGE_MASK;
if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
Expand All @@ -1070,8 +1068,6 @@ static int cnic_init_uio(struct cnic_dev *dev)

uinfo->name = "bnx2_cnic";
} else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
uinfo->mem[0].size = pci_resource_len(dev->pcidev, 0);

uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk &
PAGE_MASK;
uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk);
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/ethernet/freescale/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2063,9 +2063,10 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK;
}

if (skb->sk)
skb_set_owner_w(skb_new, skb->sk);
consume_skb(skb);
/* Steal sock reference for processing TX time stamps */
swap(skb_new->sk, skb->sk);
swap(skb_new->destructor, skb->destructor);
kfree_skb(skb);
skb = skb_new;
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6647,11 +6647,6 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)
return -EINVAL;
}

if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
e_err(drv, "Enable failed, SR-IOV enabled\n");
return -EINVAL;
}

/* Hardware supports up to 8 traffic classes */
if (tc > adapter->dcb_cfg.num_tcs.pg_tcs ||
(hw->mac.type == ixgbe_mac_82598EB &&
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/ethernet/stmicro/stmmac/ring_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum)
desc->des3 = desc->des2 + BUF_SIZE_4KiB;
priv->hw->desc->prepare_tx_desc(desc, 1, bmax,
csum);
wmb();

entry = (++priv->cur_tx) % txsize;
desc = priv->dma_tx + entry;

desc->des2 = dma_map_single(priv->device, skb->data + bmax,
len, DMA_TO_DEVICE);
desc->des3 = desc->des2 + BUF_SIZE_4KiB;
priv->hw->desc->prepare_tx_desc(desc, 0, len, csum);
wmb();
priv->hw->desc->set_tx_owner(desc);
priv->tx_skbuff[entry] = NULL;
} else {
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
priv->hw->desc->prepare_tx_desc(desc, 0, len, csum_insertion);
wmb();
priv->hw->desc->set_tx_owner(desc);
wmb();
}

/* Interrupt on completition only for the latest segment */
Expand All @@ -1228,7 +1227,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)

/* To avoid raise condition */
priv->hw->desc->set_tx_owner(first);
wmb();

priv->cur_tx++;

Expand Down Expand Up @@ -1292,7 +1290,6 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
}
wmb();
priv->hw->desc->set_rx_owner(p + entry);
wmb();
}
}

Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/net/phy/mdio-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@ static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum)
struct mdio_mux_parent_bus *pb = cb->parent;
int r;

/* In theory multiple mdio_mux could be stacked, thus creating
* more than a single level of nesting. But in practice,
* SINGLE_DEPTH_NESTING will cover the vast majority of use
* cases. We use it, instead of trying to handle the general
* case.
*/
mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING);
mutex_lock(&pb->mii_bus->mdio_lock);
r = pb->switch_fn(pb->current_child, cb->bus_number, pb->switch_data);
if (r)
goto out;
Expand All @@ -77,7 +71,7 @@ static int mdio_mux_write(struct mii_bus *bus, int phy_id,

int r;

mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING);
mutex_lock(&pb->mii_bus->mdio_lock);
r = pb->switch_fn(pb->current_child, cb->bus_number, pb->switch_data);
if (r)
goto out;
Expand Down
18 changes: 0 additions & 18 deletions trunk/drivers/net/usb/qmi_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,6 @@ static const struct driver_info qmi_wwan_force_int1 = {
.data = BIT(1), /* interface whitelist bitmap */
};

static const struct driver_info qmi_wwan_force_int2 = {
.description = "Qualcomm WWAN/QMI device",
.flags = FLAG_WWAN,
.bind = qmi_wwan_bind_shared,
.unbind = qmi_wwan_unbind_shared,
.manage_power = qmi_wwan_manage_power,
.data = BIT(2), /* interface whitelist bitmap */
};

static const struct driver_info qmi_wwan_force_int3 = {
.description = "Qualcomm WWAN/QMI device",
.flags = FLAG_WWAN,
Expand Down Expand Up @@ -507,15 +498,6 @@ static const struct usb_device_id products[] = {
.bInterfaceProtocol = 0xff,
.driver_info = (unsigned long)&qmi_wwan_force_int4,
},
{ /* ZTE MF60 */
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = 0x19d2,
.idProduct = 0x1402,
.bInterfaceClass = 0xff,
.bInterfaceSubClass = 0xff,
.bInterfaceProtocol = 0xff,
.driver_info = (unsigned long)&qmi_wwan_force_int2,
},
{ /* Sierra Wireless MC77xx in QMI mode */
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = 0x1199,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/b43legacy/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,
meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
/* create a bounce buffer in zone_dma on mapping failure. */
if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
bounce_skb = alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
if (!bounce_skb) {
ring->current_slot = old_top_slot;
ring->used_slots = old_used_slots;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3405,7 +3405,7 @@ il4965_remove_dynamic_key(struct il_priv *il,
return 0;
}

if (il->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_INVALID) {
if (il->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
IL_WARN("Removing wrong key %d 0x%x\n", keyconf->keyidx,
key_flags);
spin_unlock_irqrestore(&il->sta_lock, flags);
Expand All @@ -3420,7 +3420,7 @@ il4965_remove_dynamic_key(struct il_priv *il,
memset(&il->stations[sta_id].sta.key, 0, sizeof(struct il4965_keyinfo));
il->stations[sta_id].sta.key.key_flags =
STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
il->stations[sta_id].sta.key.key_offset = keyconf->hw_key_idx;
il->stations[sta_id].sta.key.key_offset = WEP_INVALID_OFFSET;
il->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;

Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -4767,12 +4767,14 @@ il_bg_watchdog(unsigned long data)
return;

/* monitor and check for other stuck queues */
for (cnt = 0; cnt < il->hw_params.max_txq_num; cnt++) {
/* skip as we already checked the command queue */
if (cnt == il->cmd_queue)
continue;
if (il_check_stuck_queue(il, cnt))
return;
if (il_is_any_associated(il)) {
for (cnt = 0; cnt < il->hw_params.max_txq_num; cnt++) {
/* skip as we already checked the command queue */
if (cnt == il->cmd_queue)
continue;
if (il_check_stuck_queue(il, cnt))
return;
}
}

mod_timer(&il->watchdog,
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/mwifiex/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
case NL80211_HIDDEN_SSID_ZERO_CONTENTS:
/* firmware doesn't support this type of hidden SSID */
default:
kfree(bss_cfg);
return -EINVAL;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ void rt2x00usb_kick_queue(struct data_queue *queue)
case QID_RX:
if (!rt2x00queue_full(queue))
rt2x00queue_for_each_entry(queue,
Q_INDEX,
Q_INDEX_DONE,
Q_INDEX,
NULL,
rt2x00usb_kick_rx_entry);
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/netfilter/nf_conntrack_ecache.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
struct net *net = nf_ct_net(ct);
struct nf_conntrack_ecache *e;

if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb))
if (net->ct.nf_conntrack_event_cb == NULL)
return;

e = nf_ct_ecache_find(ct);
Expand Down
15 changes: 11 additions & 4 deletions trunk/net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ void bla_free(struct bat_priv *bat_priv)
* @bat_priv: the bat priv with all the soft interface information
* @skb: the frame to be checked
* @vid: the VLAN ID of the frame
* @is_bcast: the packet came in a broadcast packet type.
*
* bla_rx avoidance checks if:
* * we have to race for a claim
Expand All @@ -1361,7 +1362,8 @@ void bla_free(struct bat_priv *bat_priv)
* process the skb.
*
*/
int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)
int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid,
bool is_bcast)
{
struct ethhdr *ethhdr;
struct claim search_claim, *claim = NULL;
Expand All @@ -1380,7 +1382,7 @@ int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)

if (unlikely(atomic_read(&bat_priv->bla_num_requests)))
/* don't allow broadcasts while requests are in flight */
if (is_multicast_ether_addr(ethhdr->h_dest))
if (is_multicast_ether_addr(ethhdr->h_dest) && is_bcast)
goto handled;

memcpy(search_claim.addr, ethhdr->h_source, ETH_ALEN);
Expand All @@ -1406,8 +1408,13 @@ int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)
}

/* if it is a broadcast ... */
if (is_multicast_ether_addr(ethhdr->h_dest)) {
/* ... drop it. the responsible gateway is in charge. */
if (is_multicast_ether_addr(ethhdr->h_dest) && is_bcast) {
/* ... drop it. the responsible gateway is in charge.
*
* We need to check is_bcast because with the gateway
* feature, broadcasts (like DHCP requests) may be sent
* using a unicast packet type.
*/
goto handled;
} else {
/* seems the client considers us as its best gateway.
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/batman-adv/bridge_loop_avoidance.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#define _NET_BATMAN_ADV_BLA_H_

#ifdef CONFIG_BATMAN_ADV_BLA
int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid);
int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid,
bool is_bcast);
int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid);
int bla_is_backbone_gw(struct sk_buff *skb,
struct orig_node *orig_node, int hdr_size);
Expand All @@ -41,7 +42,7 @@ void bla_free(struct bat_priv *bat_priv);
#else /* ifdef CONFIG_BATMAN_ADV_BLA */

static inline int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb,
short vid)
short vid, bool is_bcast)
{
return 0;
}
Expand Down
6 changes: 5 additions & 1 deletion trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ void interface_rx(struct net_device *soft_iface,
struct bat_priv *bat_priv = netdev_priv(soft_iface);
struct ethhdr *ethhdr;
struct vlan_ethhdr *vhdr;
struct batman_header *batadv_header = (struct batman_header *)skb->data;
short vid __maybe_unused = -1;
bool is_bcast;

is_bcast = (batadv_header->packet_type == BAT_BCAST);

/* check if enough space is available for pulling, and pull */
if (!pskb_may_pull(skb, hdr_size))
Expand Down Expand Up @@ -302,7 +306,7 @@ void interface_rx(struct net_device *soft_iface,
/* Let the bridge loop avoidance check the packet. If will
* not handle it, we can safely push it up.
*/
if (bla_rx(bat_priv, skb, vid))
if (bla_rx(bat_priv, skb, vid, is_bcast))
goto out;

netif_rx(skb);
Expand Down
Loading

0 comments on commit a4509e3

Please sign in to comment.