Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits)
  bridge: fix a possible net_device leak
  net: Documentation: RFC 2553bis is now RFC 3493
  atm: br2684: Fix oops due to skb->dev being NULL
  ipv6: Fix ipv6_getsockopt for IPV6_2292PKTOPTIONS
  net: netdev-features.txt update to Documentation/networking/00-INDEX
  vlan: reset headers on accel emulation path
  forcedeth: call vlan_mode only if hw supports vlans
  via-velocity: remove non-tagged packet filtering
  bonding:reset backup and inactive flag of slave
  net_sched: fix port mirror/redirect stats reporting
  sit tunnels: propagate IPv6 transport class to IPv4 Type of Service
  gianfar: reduce stack usage in gianfar_ethtool.c
  net: minor update to Documentation/networking/scaling.txt
  net: add missing entries to Documentation/networking/00-INDEX
  gianfar: prevent buggy hw rx vlan tagging
  net: sh_eth: Fix build by forgot including linux/interrupt.h
  drivers/net/can/sja1000/plx_pci.c: eliminate double free
  usbnet/cdc_ncm: Don't use stack variables for DMA
  vmxnet3: Don't enable vlan filters in promiscuous mode.
  iwlagn: sysfs couldn't find the priv pointer
  ...
This commit is contained in:
Linus Torvalds 2011-08-24 09:11:08 -07:00
commit 2da2c664ec
27 changed files with 445 additions and 122 deletions

View File

@ -1,13 +1,21 @@
00-INDEX 00-INDEX
- this file - this file
3c359.txt
- information on the 3Com TokenLink Velocity XL (3c5359) driver.
3c505.txt 3c505.txt
- information on the 3Com EtherLink Plus (3c505) driver. - information on the 3Com EtherLink Plus (3c505) driver.
3c509.txt
- information on the 3Com Etherlink III Series Ethernet cards.
6pack.txt 6pack.txt
- info on the 6pack protocol, an alternative to KISS for AX.25 - info on the 6pack protocol, an alternative to KISS for AX.25
DLINK.txt DLINK.txt
- info on the D-Link DE-600/DE-620 parallel port pocket adapters - info on the D-Link DE-600/DE-620 parallel port pocket adapters
PLIP.txt PLIP.txt
- PLIP: The Parallel Line Internet Protocol device driver - PLIP: The Parallel Line Internet Protocol device driver
README.ipw2100
- README for the Intel PRO/Wireless 2100 driver.
README.ipw2200
- README for the Intel PRO/Wireless 2915ABG and 2200BG driver.
README.sb1000 README.sb1000
- info on General Instrument/NextLevel SURFboard1000 cable modem. - info on General Instrument/NextLevel SURFboard1000 cable modem.
alias.txt alias.txt
@ -20,8 +28,12 @@ atm.txt
- info on where to get ATM programs and support for Linux. - info on where to get ATM programs and support for Linux.
ax25.txt ax25.txt
- info on using AX.25 and NET/ROM code for Linux - info on using AX.25 and NET/ROM code for Linux
batman-adv.txt
- B.A.T.M.A.N routing protocol on top of layer 2 Ethernet Frames.
baycom.txt baycom.txt
- info on the driver for Baycom style amateur radio modems - info on the driver for Baycom style amateur radio modems
bonding.txt
- Linux Ethernet Bonding Driver HOWTO: link aggregation in Linux.
bridge.txt bridge.txt
- where to get user space programs for ethernet bridging with Linux. - where to get user space programs for ethernet bridging with Linux.
can.txt can.txt
@ -34,32 +46,60 @@ cxacru.txt
- Conexant AccessRunner USB ADSL Modem - Conexant AccessRunner USB ADSL Modem
cxacru-cf.py cxacru-cf.py
- Conexant AccessRunner USB ADSL Modem configuration file parser - Conexant AccessRunner USB ADSL Modem configuration file parser
cxgb.txt
- Release Notes for the Chelsio N210 Linux device driver.
dccp.txt
- the Datagram Congestion Control Protocol (DCCP) (RFC 4340..42).
de4x5.txt de4x5.txt
- the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver
decnet.txt decnet.txt
- info on using the DECnet networking layer in Linux. - info on using the DECnet networking layer in Linux.
depca.txt depca.txt
- the Digital DEPCA/EtherWORKS DE1?? and DE2?? LANCE Ethernet driver - the Digital DEPCA/EtherWORKS DE1?? and DE2?? LANCE Ethernet driver
dl2k.txt
- README for D-Link DL2000-based Gigabit Ethernet Adapters (dl2k.ko).
dm9000.txt
- README for the Simtec DM9000 Network driver.
dmfe.txt dmfe.txt
- info on the Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver. - info on the Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver.
dns_resolver.txt
- The DNS resolver module allows kernel servies to make DNS queries.
driver.txt
- Softnet driver issues.
e100.txt e100.txt
- info on Intel's EtherExpress PRO/100 line of 10/100 boards - info on Intel's EtherExpress PRO/100 line of 10/100 boards
e1000.txt e1000.txt
- info on Intel's E1000 line of gigabit ethernet boards - info on Intel's E1000 line of gigabit ethernet boards
e1000e.txt
- README for the Intel Gigabit Ethernet Driver (e1000e).
eql.txt eql.txt
- serial IP load balancing - serial IP load balancing
ewrk3.txt ewrk3.txt
- the Digital EtherWORKS 3 DE203/4/5 Ethernet driver - the Digital EtherWORKS 3 DE203/4/5 Ethernet driver
fib_trie.txt
- Level Compressed Trie (LC-trie) notes: a structure for routing.
filter.txt filter.txt
- Linux Socket Filtering - Linux Socket Filtering
fore200e.txt fore200e.txt
- FORE Systems PCA-200E/SBA-200E ATM NIC driver info. - FORE Systems PCA-200E/SBA-200E ATM NIC driver info.
framerelay.txt framerelay.txt
- info on using Frame Relay/Data Link Connection Identifier (DLCI). - info on using Frame Relay/Data Link Connection Identifier (DLCI).
gen_stats.txt
- Generic networking statistics for netlink users.
generic_hdlc.txt
- The generic High Level Data Link Control (HDLC) layer.
generic_netlink.txt generic_netlink.txt
- info on Generic Netlink - info on Generic Netlink
gianfar.txt
- Gianfar Ethernet Driver.
ieee802154.txt ieee802154.txt
- Linux IEEE 802.15.4 implementation, API and drivers - Linux IEEE 802.15.4 implementation, API and drivers
ifenslave.c
- Configure network interfaces for parallel routing (bonding).
igb.txt
- README for the Intel Gigabit Ethernet Driver (igb).
igbvf.txt
- README for the Intel Gigabit Ethernet Driver (igbvf).
ip-sysctl.txt ip-sysctl.txt
- /proc/sys/net/ipv4/* variables - /proc/sys/net/ipv4/* variables
ip_dynaddr.txt ip_dynaddr.txt
@ -68,41 +108,117 @@ ipddp.txt
- AppleTalk-IP Decapsulation and AppleTalk-IP Encapsulation - AppleTalk-IP Decapsulation and AppleTalk-IP Encapsulation
iphase.txt iphase.txt
- Interphase PCI ATM (i)Chip IA Linux driver info. - Interphase PCI ATM (i)Chip IA Linux driver info.
ipv6.txt
- Options to the ipv6 kernel module.
ipvs-sysctl.txt
- Per-inode explanation of the /proc/sys/net/ipv4/vs interface.
irda.txt irda.txt
- where to get IrDA (infrared) utilities and info for Linux. - where to get IrDA (infrared) utilities and info for Linux.
ixgb.txt
- README for the Intel 10 Gigabit Ethernet Driver (ixgb).
ixgbe.txt
- README for the Intel 10 Gigabit Ethernet Driver (ixgbe).
ixgbevf.txt
- README for the Intel Virtual Function (VF) Driver (ixgbevf).
l2tp.txt
- User guide to the L2TP tunnel protocol.
lapb-module.txt lapb-module.txt
- programming information of the LAPB module. - programming information of the LAPB module.
ltpc.txt ltpc.txt
- the Apple or Farallon LocalTalk PC card driver - the Apple or Farallon LocalTalk PC card driver
mac80211-injection.txt
- HOWTO use packet injection with mac80211
multicast.txt multicast.txt
- Behaviour of cards under Multicast - Behaviour of cards under Multicast
multiqueue.txt
- HOWTO for multiqueue network device support.
netconsole.txt
- The network console module netconsole.ko: configuration and notes.
netdev-features.txt
- Network interface features API description.
netdevices.txt netdevices.txt
- info on network device driver functions exported to the kernel. - info on network device driver functions exported to the kernel.
netif-msg.txt
- Design of the network interface message level setting (NETIF_MSG_*).
nfc.txt
- The Linux Near Field Communication (NFS) subsystem.
olympic.txt olympic.txt
- IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info. - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info.
operstates.txt
- Overview of network interface operational states.
packet_mmap.txt
- User guide to memory mapped packet socket rings (PACKET_[RT]X_RING).
phonet.txt
- The Phonet packet protocol used in Nokia cellular modems.
phy.txt
- The PHY abstraction layer.
pktgen.txt
- User guide to the kernel packet generator (pktgen.ko).
policy-routing.txt policy-routing.txt
- IP policy-based routing - IP policy-based routing
ppp_generic.txt
- Information about the generic PPP driver.
proc_net_tcp.txt
- Per inode overview of the /proc/net/tcp and /proc/net/tcp6 interfaces.
radiotap-headers.txt
- Background on radiotap headers.
ray_cs.txt ray_cs.txt
- Raylink Wireless LAN card driver info. - Raylink Wireless LAN card driver info.
rds.txt
- Background on the reliable, ordered datagram delivery method RDS.
regulatory.txt
- Overview of the Linux wireless regulatory infrastructure.
rxrpc.txt
- Guide to the RxRPC protocol.
s2io.txt
- Release notes for Neterion Xframe I/II 10GbE driver.
scaling.txt
- Explanation of network scaling techniques: RSS, RPS, RFS, aRFS, XPS.
sctp.txt
- Notes on the Linux kernel implementation of the SCTP protocol.
secid.txt
- Explanation of the secid member in flow structures.
skfp.txt skfp.txt
- SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
smc9.txt smc9.txt
- the driver for SMC's 9000 series of Ethernet cards - the driver for SMC's 9000 series of Ethernet cards
smctr.txt smctr.txt
- SMC TokenCard TokenRing Linux driver info. - SMC TokenCard TokenRing Linux driver info.
spider-net.txt
- README for the Spidernet Driver (as found in PS3 / Cell BE).
stmmac.txt
- README for the STMicro Synopsys Ethernet driver.
tc-actions-env-rules.txt
- rules for traffic control (tc) actions.
timestamping.txt
- overview of network packet timestamping variants.
tcp.txt tcp.txt
- short blurb on how TCP output takes place. - short blurb on how TCP output takes place.
tcp-thin.txt
- kernel tuning options for low rate 'thin' TCP streams.
tlan.txt tlan.txt
- ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info. - ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info.
tms380tr.txt tms380tr.txt
- SysKonnect Token Ring ISA/PCI adapter driver info. - SysKonnect Token Ring ISA/PCI adapter driver info.
tproxy.txt
- Transparent proxy support user guide.
tuntap.txt tuntap.txt
- TUN/TAP device driver, allowing user space Rx/Tx of packets. - TUN/TAP device driver, allowing user space Rx/Tx of packets.
udplite.txt
- UDP-Lite protocol (RFC 3828) introduction.
vortex.txt vortex.txt
- info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards.
vxge.txt
- README for the Neterion X3100 PCIe Server Adapter.
x25.txt x25.txt
- general info on X.25 development. - general info on X.25 development.
x25-iface.txt x25-iface.txt
- description of the X.25 Packet Layer to LAPB device interface. - description of the X.25 Packet Layer to LAPB device interface.
xfrm_proc.txt
- description of the statistics package for XFRM.
xfrm_sync.txt
- sync patches for XFRM enable migration of an SA between hosts.
xfrm_sysctl.txt
- description of the XFRM configuration options.
z8530drv.txt z8530drv.txt
- info about Linux driver for Z8530 based HDLC cards for AX.25 - info about Linux driver for Z8530 based HDLC cards for AX.25

View File

@ -992,7 +992,7 @@ bindv6only - BOOLEAN
TRUE: disable IPv4-mapped address feature TRUE: disable IPv4-mapped address feature
FALSE: enable IPv4-mapped address feature FALSE: enable IPv4-mapped address feature
Default: FALSE (as specified in RFC2553bis) Default: FALSE (as specified in RFC3493)
IPv6 Fragmentation: IPv6 Fragmentation:

View File

@ -52,7 +52,8 @@ module parameter for specifying the number of hardware queues to
configure. In the bnx2x driver, for instance, this parameter is called configure. In the bnx2x driver, for instance, this parameter is called
num_queues. A typical RSS configuration would be to have one receive queue num_queues. A typical RSS configuration would be to have one receive queue
for each CPU if the device supports enough queues, or otherwise at least for each CPU if the device supports enough queues, or otherwise at least
one for each cache domain at a particular cache level (L1, L2, etc.). one for each memory domain, where a memory domain is a set of CPUs that
share a particular memory level (L1, L2, NUMA node, etc.).
The indirection table of an RSS device, which resolves a queue by masked The indirection table of an RSS device, which resolves a queue by masked
hash, is usually programmed by the driver at initialization. The hash, is usually programmed by the driver at initialization. The
@ -82,11 +83,17 @@ RSS should be enabled when latency is a concern or whenever receive
interrupt processing forms a bottleneck. Spreading load between CPUs interrupt processing forms a bottleneck. Spreading load between CPUs
decreases queue length. For low latency networking, the optimal setting decreases queue length. For low latency networking, the optimal setting
is to allocate as many queues as there are CPUs in the system (or the is to allocate as many queues as there are CPUs in the system (or the
NIC maximum, if lower). Because the aggregate number of interrupts grows NIC maximum, if lower). The most efficient high-rate configuration
with each additional queue, the most efficient high-rate configuration
is likely the one with the smallest number of receive queues where no is likely the one with the smallest number of receive queues where no
CPU that processes receive interrupts reaches 100% utilization. Per-cpu receive queue overflows due to a saturated CPU, because in default
load can be observed using the mpstat utility. mode with interrupt coalescing enabled, the aggregate number of
interrupts (and thus work) grows with each additional queue.
Per-cpu load can be observed using the mpstat utility, but note that on
processors with hyperthreading (HT), each hyperthread is represented as
a separate CPU. For interrupt handling, HT has shown no benefit in
initial tests, so limit the number of queues to the number of CPU cores
in the system.
RPS: Receive Packet Steering RPS: Receive Packet Steering
@ -145,7 +152,7 @@ the bitmap.
== Suggested Configuration == Suggested Configuration
For a single queue device, a typical RPS configuration would be to set For a single queue device, a typical RPS configuration would be to set
the rps_cpus to the CPUs in the same cache domain of the interrupting the rps_cpus to the CPUs in the same memory domain of the interrupting
CPU. If NUMA locality is not an issue, this could also be all CPUs in CPU. If NUMA locality is not an issue, this could also be all CPUs in
the system. At high interrupt rate, it might be wise to exclude the the system. At high interrupt rate, it might be wise to exclude the
interrupting CPU from the map since that already performs much work. interrupting CPU from the map since that already performs much work.
@ -154,7 +161,7 @@ For a multi-queue system, if RSS is configured so that a hardware
receive queue is mapped to each CPU, then RPS is probably redundant receive queue is mapped to each CPU, then RPS is probably redundant
and unnecessary. If there are fewer hardware queues than CPUs, then and unnecessary. If there are fewer hardware queues than CPUs, then
RPS might be beneficial if the rps_cpus for each queue are the ones that RPS might be beneficial if the rps_cpus for each queue are the ones that
share the same cache domain as the interrupting CPU for that queue. share the same memory domain as the interrupting CPU for that queue.
RFS: Receive Flow Steering RFS: Receive Flow Steering
@ -326,7 +333,7 @@ The queue chosen for transmitting a particular flow is saved in the
corresponding socket structure for the flow (e.g. a TCP connection). corresponding socket structure for the flow (e.g. a TCP connection).
This transmit queue is used for subsequent packets sent on the flow to This transmit queue is used for subsequent packets sent on the flow to
prevent out of order (ooo) packets. The choice also amortizes the cost prevent out of order (ooo) packets. The choice also amortizes the cost
of calling get_xps_queues() over all packets in the connection. To avoid of calling get_xps_queues() over all packets in the flow. To avoid
ooo packets, the queue for a flow can subsequently only be changed if ooo packets, the queue for a flow can subsequently only be changed if
skb->ooo_okay is set for a packet in the flow. This flag indicates that skb->ooo_okay is set for a packet in the flow. This flag indicates that
there are no outstanding packets in the flow, so the transmit queue can there are no outstanding packets in the flow, so the transmit queue can

View File

@ -3419,9 +3419,27 @@ static int bond_xmit_hash_policy_l2(struct sk_buff *skb, int count)
static int bond_open(struct net_device *bond_dev) static int bond_open(struct net_device *bond_dev)
{ {
struct bonding *bond = netdev_priv(bond_dev); struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave;
int i;
bond->kill_timers = 0; bond->kill_timers = 0;
/* reset slave->backup and slave->inactive */
read_lock(&bond->lock);
if (bond->slave_cnt > 0) {
read_lock(&bond->curr_slave_lock);
bond_for_each_slave(bond, slave, i) {
if ((bond->params.mode == BOND_MODE_ACTIVEBACKUP)
&& (slave != bond->curr_active_slave)) {
bond_set_slave_inactive_flags(slave);
} else {
bond_set_slave_active_flags(slave);
}
}
read_unlock(&bond->curr_slave_lock);
}
read_unlock(&bond->lock);
INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed); INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed);
if (bond_is_lb(bond)) { if (bond_is_lb(bond)) {

View File

@ -408,7 +408,7 @@ static void plx_pci_del_card(struct pci_dev *pdev)
struct sja1000_priv *priv; struct sja1000_priv *priv;
int i = 0; int i = 0;
for (i = 0; i < card->channels; i++) { for (i = 0; i < PLX_PCI_MAX_CHAN; i++) {
dev = card->net_dev[i]; dev = card->net_dev[i];
if (!dev) if (!dev)
continue; continue;
@ -536,7 +536,6 @@ static int __devinit plx_pci_add_card(struct pci_dev *pdev,
if (err) { if (err) {
dev_err(&pdev->dev, "Registering device failed " dev_err(&pdev->dev, "Registering device failed "
"(err=%d)\n", err); "(err=%d)\n", err);
free_sja1000dev(dev);
goto failure_cleanup; goto failure_cleanup;
} }
@ -549,6 +548,7 @@ static int __devinit plx_pci_add_card(struct pci_dev *pdev,
dev_err(&pdev->dev, "Channel #%d not detected\n", dev_err(&pdev->dev, "Channel #%d not detected\n",
i + 1); i + 1);
free_sja1000dev(dev); free_sja1000dev(dev);
card->net_dev[i] = NULL;
} }
} }

View File

@ -155,6 +155,9 @@ struct e1000_info;
#define HV_M_STATUS_SPEED_1000 0x0200 #define HV_M_STATUS_SPEED_1000 0x0200
#define HV_M_STATUS_LINK_UP 0x0040 #define HV_M_STATUS_LINK_UP 0x0040
#define E1000_ICH_FWSM_PCIM2PCI 0x01000000 /* ME PCIm-to-PCI active */
#define E1000_ICH_FWSM_PCIM2PCI_COUNT 2000
/* Time to wait before putting the device into D3 if there's no link (in ms). */ /* Time to wait before putting the device into D3 if there's no link (in ms). */
#define LINK_TIMEOUT 100 #define LINK_TIMEOUT 100
@ -454,6 +457,7 @@ struct e1000_info {
#define FLAG2_DISABLE_AIM (1 << 8) #define FLAG2_DISABLE_AIM (1 << 8)
#define FLAG2_CHECK_PHY_HANG (1 << 9) #define FLAG2_CHECK_PHY_HANG (1 << 9)
#define FLAG2_NO_DISABLE_RX (1 << 10) #define FLAG2_NO_DISABLE_RX (1 << 10)
#define FLAG2_PCIM2PCI_ARBITER_WA (1 << 11)
#define E1000_RX_DESC_PS(R, i) \ #define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))

View File

@ -139,6 +139,7 @@
/* PHY Low Power Idle Control */ /* PHY Low Power Idle Control */
#define I82579_LPI_CTRL PHY_REG(772, 20) #define I82579_LPI_CTRL PHY_REG(772, 20)
#define I82579_LPI_CTRL_ENABLE_MASK 0x6000 #define I82579_LPI_CTRL_ENABLE_MASK 0x6000
#define I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT 0x80
/* EMI Registers */ /* EMI Registers */
#define I82579_EMI_ADDR 0x10 #define I82579_EMI_ADDR 0x10
@ -163,6 +164,11 @@
#define HV_KMRN_MODE_CTRL PHY_REG(769, 16) #define HV_KMRN_MODE_CTRL PHY_REG(769, 16)
#define HV_KMRN_MDIO_SLOW 0x0400 #define HV_KMRN_MDIO_SLOW 0x0400
/* KMRN FIFO Control and Status */
#define HV_KMRN_FIFO_CTRLSTA PHY_REG(770, 16)
#define HV_KMRN_FIFO_CTRLSTA_PREAMBLE_MASK 0x7000
#define HV_KMRN_FIFO_CTRLSTA_PREAMBLE_SHIFT 12
/* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
/* Offset 04h HSFSTS */ /* Offset 04h HSFSTS */
union ich8_hws_flash_status { union ich8_hws_flash_status {
@ -657,6 +663,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
struct e1000_mac_info *mac = &hw->mac; struct e1000_mac_info *mac = &hw->mac;
s32 ret_val; s32 ret_val;
bool link; bool link;
u16 phy_reg;
/* /*
* We only want to go out to the PHY registers to see if Auto-Neg * We only want to go out to the PHY registers to see if Auto-Neg
@ -689,16 +696,35 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
mac->get_link_status = false; mac->get_link_status = false;
switch (hw->mac.type) {
case e1000_pch2lan:
ret_val = e1000_k1_workaround_lv(hw);
if (ret_val)
goto out;
/* fall-thru */
case e1000_pchlan:
if (hw->phy.type == e1000_phy_82578) { if (hw->phy.type == e1000_phy_82578) {
ret_val = e1000_link_stall_workaround_hv(hw); ret_val = e1000_link_stall_workaround_hv(hw);
if (ret_val) if (ret_val)
goto out; goto out;
} }
if (hw->mac.type == e1000_pch2lan) { /*
ret_val = e1000_k1_workaround_lv(hw); * Workaround for PCHx parts in half-duplex:
if (ret_val) * Set the number of preambles removed from the packet
goto out; * when it is passed from the PHY to the MAC to prevent
* the MAC from misinterpreting the packet type.
*/
e1e_rphy(hw, HV_KMRN_FIFO_CTRLSTA, &phy_reg);
phy_reg &= ~HV_KMRN_FIFO_CTRLSTA_PREAMBLE_MASK;
if ((er32(STATUS) & E1000_STATUS_FD) != E1000_STATUS_FD)
phy_reg |= (1 << HV_KMRN_FIFO_CTRLSTA_PREAMBLE_SHIFT);
e1e_wphy(hw, HV_KMRN_FIFO_CTRLSTA, phy_reg);
break;
default:
break;
} }
/* /*
@ -788,6 +814,11 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)
(adapter->hw.phy.type == e1000_phy_igp_3)) (adapter->hw.phy.type == e1000_phy_igp_3))
adapter->flags |= FLAG_LSC_GIG_SPEED_DROP; adapter->flags |= FLAG_LSC_GIG_SPEED_DROP;
/* Enable workaround for 82579 w/ ME enabled */
if ((adapter->hw.mac.type == e1000_pch2lan) &&
(er32(FWSM) & E1000_ICH_FWSM_FW_VALID))
adapter->flags2 |= FLAG2_PCIM2PCI_ARBITER_WA;
/* Disable EEE by default until IEEE802.3az spec is finalized */ /* Disable EEE by default until IEEE802.3az spec is finalized */
if (adapter->flags2 & FLAG2_HAS_EEE) if (adapter->flags2 & FLAG2_HAS_EEE)
adapter->hw.dev_spec.ich8lan.eee_disable = true; adapter->hw.dev_spec.ich8lan.eee_disable = true;
@ -1355,7 +1386,7 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
return ret_val; return ret_val;
/* Preamble tuning for SSC */ /* Preamble tuning for SSC */
ret_val = e1e_wphy(hw, PHY_REG(770, 16), 0xA204); ret_val = e1e_wphy(hw, HV_KMRN_FIFO_CTRLSTA, 0xA204);
if (ret_val) if (ret_val)
return ret_val; return ret_val;
} }
@ -1645,6 +1676,7 @@ static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
s32 ret_val = 0; s32 ret_val = 0;
u16 status_reg = 0; u16 status_reg = 0;
u32 mac_reg; u32 mac_reg;
u16 phy_reg;
if (hw->mac.type != e1000_pch2lan) if (hw->mac.type != e1000_pch2lan)
goto out; goto out;
@ -1659,12 +1691,19 @@ static s32 e1000_k1_workaround_lv(struct e1000_hw *hw)
mac_reg = er32(FEXTNVM4); mac_reg = er32(FEXTNVM4);
mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK; mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
if (status_reg & HV_M_STATUS_SPEED_1000) ret_val = e1e_rphy(hw, I82579_LPI_CTRL, &phy_reg);
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC; if (ret_val)
else goto out;
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_16USEC;
if (status_reg & HV_M_STATUS_SPEED_1000) {
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
phy_reg &= ~I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
} else {
mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_16USEC;
phy_reg |= I82579_LPI_CTRL_FORCE_PLL_LOCK_COUNT;
}
ew32(FEXTNVM4, mac_reg); ew32(FEXTNVM4, mac_reg);
ret_val = e1e_wphy(hw, I82579_LPI_CTRL, phy_reg);
} }
out: out:

View File

@ -518,6 +518,63 @@ static void e1000_rx_checksum(struct e1000_adapter *adapter, u32 status_err,
adapter->hw_csum_good++; adapter->hw_csum_good++;
} }
/**
* e1000e_update_tail_wa - helper function for e1000e_update_[rt]dt_wa()
* @hw: pointer to the HW structure
* @tail: address of tail descriptor register
* @i: value to write to tail descriptor register
*
* When updating the tail register, the ME could be accessing Host CSR
* registers at the same time. Normally, this is handled in h/w by an
* arbiter but on some parts there is a bug that acknowledges Host accesses
* later than it should which could result in the descriptor register to
* have an incorrect value. Workaround this by checking the FWSM register
* which has bit 24 set while ME is accessing Host CSR registers, wait
* if it is set and try again a number of times.
**/
static inline s32 e1000e_update_tail_wa(struct e1000_hw *hw, u8 __iomem * tail,
unsigned int i)
{
unsigned int j = 0;
while ((j++ < E1000_ICH_FWSM_PCIM2PCI_COUNT) &&
(er32(FWSM) & E1000_ICH_FWSM_PCIM2PCI))
udelay(50);
writel(i, tail);
if ((j == E1000_ICH_FWSM_PCIM2PCI_COUNT) && (i != readl(tail)))
return E1000_ERR_SWFW_SYNC;
return 0;
}
static void e1000e_update_rdt_wa(struct e1000_adapter *adapter, unsigned int i)
{
u8 __iomem *tail = (adapter->hw.hw_addr + adapter->rx_ring->tail);
struct e1000_hw *hw = &adapter->hw;
if (e1000e_update_tail_wa(hw, tail, i)) {
u32 rctl = er32(RCTL);
ew32(RCTL, rctl & ~E1000_RCTL_EN);
e_err("ME firmware caused invalid RDT - resetting\n");
schedule_work(&adapter->reset_task);
}
}
static void e1000e_update_tdt_wa(struct e1000_adapter *adapter, unsigned int i)
{
u8 __iomem *tail = (adapter->hw.hw_addr + adapter->tx_ring->tail);
struct e1000_hw *hw = &adapter->hw;
if (e1000e_update_tail_wa(hw, tail, i)) {
u32 tctl = er32(TCTL);
ew32(TCTL, tctl & ~E1000_TCTL_EN);
e_err("ME firmware caused invalid TDT - resetting\n");
schedule_work(&adapter->reset_task);
}
}
/** /**
* e1000_alloc_rx_buffers - Replace used receive buffers; legacy & extended * e1000_alloc_rx_buffers - Replace used receive buffers; legacy & extended
* @adapter: address of board private structure * @adapter: address of board private structure
@ -573,6 +630,9 @@ map_skb:
* such as IA-64). * such as IA-64).
*/ */
wmb(); wmb();
if (adapter->flags2 & FLAG2_PCIM2PCI_ARBITER_WA)
e1000e_update_rdt_wa(adapter, i);
else
writel(i, adapter->hw.hw_addr + rx_ring->tail); writel(i, adapter->hw.hw_addr + rx_ring->tail);
} }
i++; i++;
@ -673,7 +733,11 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
* such as IA-64). * such as IA-64).
*/ */
wmb(); wmb();
writel(i << 1, adapter->hw.hw_addr + rx_ring->tail); if (adapter->flags2 & FLAG2_PCIM2PCI_ARBITER_WA)
e1000e_update_rdt_wa(adapter, i << 1);
else
writel(i << 1,
adapter->hw.hw_addr + rx_ring->tail);
} }
i++; i++;
@ -756,6 +820,9 @@ check_page:
* applicable for weak-ordered memory model archs, * applicable for weak-ordered memory model archs,
* such as IA-64). */ * such as IA-64). */
wmb(); wmb();
if (adapter->flags2 & FLAG2_PCIM2PCI_ARBITER_WA)
e1000e_update_rdt_wa(adapter, i);
else
writel(i, adapter->hw.hw_addr + rx_ring->tail); writel(i, adapter->hw.hw_addr + rx_ring->tail);
} }
} }
@ -4689,7 +4756,12 @@ static void e1000_tx_queue(struct e1000_adapter *adapter,
wmb(); wmb();
tx_ring->next_to_use = i; tx_ring->next_to_use = i;
if (adapter->flags2 & FLAG2_PCIM2PCI_ARBITER_WA)
e1000e_update_tdt_wa(adapter, i);
else
writel(i, adapter->hw.hw_addr + tx_ring->tail); writel(i, adapter->hw.hw_addr + tx_ring->tail);
/* /*
* we need this if more than one processor can write to our tail * we need this if more than one processor can write to our tail
* at a time, it synchronizes IO on IA64/Altix systems * at a time, it synchronizes IO on IA64/Altix systems

View File

@ -5615,6 +5615,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
goto out_error; goto out_error;
} }
if (id->driver_data & DEV_HAS_VLAN)
nv_vlan_mode(dev, dev->features); nv_vlan_mode(dev, dev->features);
netif_carrier_off(dev); netif_carrier_off(dev);

View File

@ -2710,8 +2710,13 @@ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb,
/* Tell the skb what kind of packet this is */ /* Tell the skb what kind of packet this is */
skb->protocol = eth_type_trans(skb, dev); skb->protocol = eth_type_trans(skb, dev);
/* Set vlan tag */ /*
if (fcb->flags & RXFCB_VLN) * There's need to check for NETIF_F_HW_VLAN_RX here.
* Even if vlan rx accel is disabled, on some chips
* RXFCB_VLN is pseudo randomly set.
*/
if (dev->features & NETIF_F_HW_VLAN_RX &&
fcb->flags & RXFCB_VLN)
__vlan_hwaccel_put_tag(skb, fcb->vlctl); __vlan_hwaccel_put_tag(skb, fcb->vlctl);
/* Send the packet up the stack */ /* Send the packet up the stack */

View File

@ -686,10 +686,21 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow, u
{ {
unsigned int last_rule_idx = priv->cur_filer_idx; unsigned int last_rule_idx = priv->cur_filer_idx;
unsigned int cmp_rqfpr; unsigned int cmp_rqfpr;
unsigned int local_rqfpr[MAX_FILER_IDX + 1]; unsigned int *local_rqfpr;
unsigned int local_rqfcr[MAX_FILER_IDX + 1]; unsigned int *local_rqfcr;
int i = 0x0, k = 0x0; int i = 0x0, k = 0x0;
int j = MAX_FILER_IDX, l = 0x0; int j = MAX_FILER_IDX, l = 0x0;
int ret = 1;
local_rqfpr = kmalloc(sizeof(unsigned int) * (MAX_FILER_IDX + 1),
GFP_KERNEL);
local_rqfcr = kmalloc(sizeof(unsigned int) * (MAX_FILER_IDX + 1),
GFP_KERNEL);
if (!local_rqfpr || !local_rqfcr) {
pr_err("Out of memory\n");
ret = 0;
goto err;
}
switch (class) { switch (class) {
case TCP_V4_FLOW: case TCP_V4_FLOW:
@ -706,7 +717,8 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow, u
break; break;
default: default:
pr_err("Right now this class is not supported\n"); pr_err("Right now this class is not supported\n");
return 0; ret = 0;
goto err;
} }
for (i = 0; i < MAX_FILER_IDX + 1; i++) { for (i = 0; i < MAX_FILER_IDX + 1; i++) {
@ -721,7 +733,8 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow, u
if (i == MAX_FILER_IDX + 1) { if (i == MAX_FILER_IDX + 1) {
pr_err("No parse rule found, can't create hash rules\n"); pr_err("No parse rule found, can't create hash rules\n");
return 0; ret = 0;
goto err;
} }
/* If a match was found, then it begins the starting of a cluster rule /* If a match was found, then it begins the starting of a cluster rule
@ -765,7 +778,10 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow, u
priv->cur_filer_idx = priv->cur_filer_idx - 1; priv->cur_filer_idx = priv->cur_filer_idx - 1;
} }
return 1; err:
kfree(local_rqfcr);
kfree(local_rqfpr);
return ret;
} }
static int gfar_set_hash_opts(struct gfar_private *priv, struct ethtool_rxnfc *cmd) static int gfar_set_hash_opts(struct gfar_private *priv, struct ethtool_rxnfc *cmd)

View File

@ -1459,9 +1459,11 @@ static void ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
if (ixgbe_rx_is_fcoe(adapter, rx_desc)) { if (ixgbe_rx_is_fcoe(adapter, rx_desc)) {
ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb, ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb,
staterr); staterr);
if (!ddp_bytes) if (!ddp_bytes) {
dev_kfree_skb_any(skb);
goto next_desc; goto next_desc;
} }
}
#endif /* IXGBE_FCOE */ #endif /* IXGBE_FCOE */
ixgbe_receive_skb(q_vector, skb, staterr, rx_ring, rx_desc); ixgbe_receive_skb(q_vector, skb, staterr, rx_ring, rx_desc);

View File

@ -21,6 +21,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/delay.h> #include <linux/delay.h>

View File

@ -228,23 +228,40 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) { if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) {
if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) { if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) {
struct usb_cdc_ncm_ndp_input_size ndp_in_sz; struct usb_cdc_ncm_ndp_input_size *ndp_in_sz;
err = usb_control_msg(ctx->udev,
usb_sndctrlpipe(ctx->udev, 0), ndp_in_sz = kzalloc(sizeof(*ndp_in_sz), GFP_KERNEL);
USB_CDC_SET_NTB_INPUT_SIZE, if (!ndp_in_sz) {
USB_TYPE_CLASS | USB_DIR_OUT err = -ENOMEM;
| USB_RECIP_INTERFACE, goto size_err;
0, iface_no, &ndp_in_sz, 8, 1000);
} else {
__le32 dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
err = usb_control_msg(ctx->udev,
usb_sndctrlpipe(ctx->udev, 0),
USB_CDC_SET_NTB_INPUT_SIZE,
USB_TYPE_CLASS | USB_DIR_OUT
| USB_RECIP_INTERFACE,
0, iface_no, &dwNtbInMaxSize, 4, 1000);
} }
err = usb_control_msg(ctx->udev,
usb_sndctrlpipe(ctx->udev, 0),
USB_CDC_SET_NTB_INPUT_SIZE,
USB_TYPE_CLASS | USB_DIR_OUT
| USB_RECIP_INTERFACE,
0, iface_no, ndp_in_sz, 8, 1000);
kfree(ndp_in_sz);
} else {
__le32 *dwNtbInMaxSize;
dwNtbInMaxSize = kzalloc(sizeof(*dwNtbInMaxSize),
GFP_KERNEL);
if (!dwNtbInMaxSize) {
err = -ENOMEM;
goto size_err;
}
*dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
err = usb_control_msg(ctx->udev,
usb_sndctrlpipe(ctx->udev, 0),
USB_CDC_SET_NTB_INPUT_SIZE,
USB_TYPE_CLASS | USB_DIR_OUT
| USB_RECIP_INTERFACE,
0, iface_no, dwNtbInMaxSize, 4, 1000);
kfree(dwNtbInMaxSize);
}
size_err:
if (err < 0) if (err < 0)
pr_debug("Setting NTB Input Size failed\n"); pr_debug("Setting NTB Input Size failed\n");
} }
@ -325,19 +342,29 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
/* set Max Datagram Size (MTU) */ /* set Max Datagram Size (MTU) */
if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) { if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) {
__le16 max_datagram_size; __le16 *max_datagram_size;
u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize); u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize);
max_datagram_size = kzalloc(sizeof(*max_datagram_size),
GFP_KERNEL);
if (!max_datagram_size) {
err = -ENOMEM;
goto max_dgram_err;
}
err = usb_control_msg(ctx->udev, usb_rcvctrlpipe(ctx->udev, 0), err = usb_control_msg(ctx->udev, usb_rcvctrlpipe(ctx->udev, 0),
USB_CDC_GET_MAX_DATAGRAM_SIZE, USB_CDC_GET_MAX_DATAGRAM_SIZE,
USB_TYPE_CLASS | USB_DIR_IN USB_TYPE_CLASS | USB_DIR_IN
| USB_RECIP_INTERFACE, | USB_RECIP_INTERFACE,
0, iface_no, &max_datagram_size, 0, iface_no, max_datagram_size,
2, 1000); 2, 1000);
if (err < 0) { if (err < 0) {
pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n", pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n",
CDC_NCM_MIN_DATAGRAM_SIZE); CDC_NCM_MIN_DATAGRAM_SIZE);
kfree(max_datagram_size);
} else { } else {
ctx->max_datagram_size = le16_to_cpu(max_datagram_size); ctx->max_datagram_size =
le16_to_cpu(*max_datagram_size);
/* Check Eth descriptor value */ /* Check Eth descriptor value */
if (eth_max_sz < CDC_NCM_MAX_DATAGRAM_SIZE) { if (eth_max_sz < CDC_NCM_MAX_DATAGRAM_SIZE) {
if (ctx->max_datagram_size > eth_max_sz) if (ctx->max_datagram_size > eth_max_sz)
@ -360,8 +387,10 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
USB_TYPE_CLASS | USB_DIR_OUT USB_TYPE_CLASS | USB_DIR_OUT
| USB_RECIP_INTERFACE, | USB_RECIP_INTERFACE,
0, 0,
iface_no, &max_datagram_size, iface_no, max_datagram_size,
2, 1000); 2, 1000);
kfree(max_datagram_size);
max_dgram_err:
if (err < 0) if (err < 0)
pr_debug("SET_MAX_DATAGRAM_SIZE failed\n"); pr_debug("SET_MAX_DATAGRAM_SIZE failed\n");
} }

View File

@ -515,10 +515,6 @@ static void velocity_init_cam_filter(struct velocity_info *vptr)
mac_set_cam_mask(regs, vptr->mCAMmask); mac_set_cam_mask(regs, vptr->mCAMmask);
/* Enable VCAMs */ /* Enable VCAMs */
if (test_bit(0, vptr->active_vlans))
WORD_REG_BITS_ON(MCFG_RTGOPT, &regs->MCFG);
for_each_set_bit(vid, vptr->active_vlans, VLAN_N_VID) { for_each_set_bit(vid, vptr->active_vlans, VLAN_N_VID) {
mac_set_vlan_cam(regs, i, (u8 *) &vid); mac_set_vlan_cam(regs, i, (u8 *) &vid);
vptr->vCAMmask[i / 8] |= 0x1 << (i % 8); vptr->vCAMmask[i / 8] |= 0x1 << (i % 8);

View File

@ -1929,6 +1929,8 @@ static void
vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid) vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{ {
struct vmxnet3_adapter *adapter = netdev_priv(netdev); struct vmxnet3_adapter *adapter = netdev_priv(netdev);
if (!(netdev->flags & IFF_PROMISC)) {
u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable;
unsigned long flags; unsigned long flags;
@ -1937,6 +1939,7 @@ vmxnet3_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_VLAN_FILTERS); VMXNET3_CMD_UPDATE_VLAN_FILTERS);
spin_unlock_irqrestore(&adapter->cmd_lock, flags); spin_unlock_irqrestore(&adapter->cmd_lock, flags);
}
set_bit(vid, adapter->active_vlans); set_bit(vid, adapter->active_vlans);
} }
@ -1946,6 +1949,8 @@ static void
vmxnet3_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) vmxnet3_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{ {
struct vmxnet3_adapter *adapter = netdev_priv(netdev); struct vmxnet3_adapter *adapter = netdev_priv(netdev);
if (!(netdev->flags & IFF_PROMISC)) {
u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable; u32 *vfTable = adapter->shared->devRead.rxFilterConf.vfTable;
unsigned long flags; unsigned long flags;
@ -1954,6 +1959,7 @@ vmxnet3_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_VLAN_FILTERS); VMXNET3_CMD_UPDATE_VLAN_FILTERS);
spin_unlock_irqrestore(&adapter->cmd_lock, flags); spin_unlock_irqrestore(&adapter->cmd_lock, flags);
}
clear_bit(vid, adapter->active_vlans); clear_bit(vid, adapter->active_vlans);
} }

View File

@ -478,27 +478,22 @@ out_no_pci:
return err; return err;
} }
static void iwl_pci_down(struct iwl_bus *bus)
{
struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific;
pci_disable_msi(pci_bus->pci_dev);
pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base);
pci_release_regions(pci_bus->pci_dev);
pci_disable_device(pci_bus->pci_dev);
pci_set_drvdata(pci_bus->pci_dev, NULL);
kfree(bus);
}
static void __devexit iwl_pci_remove(struct pci_dev *pdev) static void __devexit iwl_pci_remove(struct pci_dev *pdev)
{ {
struct iwl_priv *priv = pci_get_drvdata(pdev); struct iwl_priv *priv = pci_get_drvdata(pdev);
void *bus_specific = priv->bus->bus_specific; struct iwl_bus *bus = priv->bus;
struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus);
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
iwl_remove(priv); iwl_remove(priv);
iwl_pci_down(bus_specific); pci_disable_msi(pci_dev);
pci_iounmap(pci_dev, pci_bus->hw_base);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
pci_set_drvdata(pci_dev, NULL);
kfree(bus);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM

View File

@ -464,6 +464,15 @@ static bool rt2800usb_txdone_entry_check(struct queue_entry *entry, u32 reg)
int wcid, ack, pid; int wcid, ack, pid;
int tx_wcid, tx_ack, tx_pid; int tx_wcid, tx_ack, tx_pid;
if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags)) {
WARNING(entry->queue->rt2x00dev,
"Data pending for entry %u in queue %u\n",
entry->entry_idx, entry->queue->qid);
cond_resched();
return false;
}
wcid = rt2x00_get_field32(reg, TX_STA_FIFO_WCID); wcid = rt2x00_get_field32(reg, TX_STA_FIFO_WCID);
ack = rt2x00_get_field32(reg, TX_STA_FIFO_TX_ACK_REQUIRED); ack = rt2x00_get_field32(reg, TX_STA_FIFO_TX_ACK_REQUIRED);
pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_TYPE); pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_TYPE);
@ -529,11 +538,10 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev)
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
if (rt2800usb_txdone_entry_check(entry, reg)) if (rt2800usb_txdone_entry_check(entry, reg))
break; break;
entry = NULL;
} }
if (!entry || rt2x00queue_empty(queue)) if (entry)
break;
rt2800_txdone_entry(entry, reg); rt2800_txdone_entry(entry, reg);
} }
} }
@ -558,8 +566,10 @@ static void rt2800usb_work_txdone(struct work_struct *work)
while (!rt2x00queue_empty(queue)) { while (!rt2x00queue_empty(queue)) {
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
break; break;
if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE);
else if (rt2x00queue_status_timeout(entry)) else if (rt2x00queue_status_timeout(entry))

View File

@ -262,23 +262,20 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
struct queue_entry *entry = (struct queue_entry *)urb->context; struct queue_entry *entry = (struct queue_entry *)urb->context;
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) if (!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
return; return;
if (rt2x00dev->ops->lib->tx_dma_done)
rt2x00dev->ops->lib->tx_dma_done(entry);
/*
* Report the frame as DMA done
*/
rt2x00lib_dmadone(entry);
/* /*
* Check if the frame was correctly uploaded * Check if the frame was correctly uploaded
*/ */
if (urb->status) if (urb->status)
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
/*
* Report the frame as DMA done
*/
rt2x00lib_dmadone(entry);
if (rt2x00dev->ops->lib->tx_dma_done)
rt2x00dev->ops->lib->tx_dma_done(entry);
/* /*
* Schedule the delayed work for reading the TX status * Schedule the delayed work for reading the TX status
* from the device. * from the device.

View File

@ -77,8 +77,6 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth)
auth->sleep_auth = sleep_auth; auth->sleep_auth = sleep_auth;
ret = wl1271_cmd_configure(wl, ACX_SLEEP_AUTH, auth, sizeof(*auth)); ret = wl1271_cmd_configure(wl, ACX_SLEEP_AUTH, auth, sizeof(*auth));
if (ret < 0)
return ret;
out: out:
kfree(auth); kfree(auth);
@ -624,10 +622,8 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD, ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
detection, sizeof(*detection)); detection, sizeof(*detection));
if (ret < 0) { if (ret < 0)
wl1271_warning("failed to set cca threshold: %d", ret); wl1271_warning("failed to set cca threshold: %d", ret);
return ret;
}
out: out:
kfree(detection); kfree(detection);

View File

@ -139,12 +139,15 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
if (ret < 0) { if (ret < 0) {
wl1271_warning("testmode cmd interrogate failed: %d", ret); wl1271_warning("testmode cmd interrogate failed: %d", ret);
kfree(cmd);
return ret; return ret;
} }
skb = cfg80211_testmode_alloc_reply_skb(wl->hw->wiphy, sizeof(*cmd)); skb = cfg80211_testmode_alloc_reply_skb(wl->hw->wiphy, sizeof(*cmd));
if (!skb) if (!skb) {
kfree(cmd);
return -ENOMEM; return -ENOMEM;
}
NLA_PUT(skb, WL1271_TM_ATTR_DATA, sizeof(*cmd), cmd); NLA_PUT(skb, WL1271_TM_ATTR_DATA, sizeof(*cmd), cmd);

View File

@ -167,6 +167,8 @@ struct sk_buff *vlan_untag(struct sk_buff *skb)
if (unlikely(!skb)) if (unlikely(!skb))
goto err_free; goto err_free;
skb_reset_network_header(skb);
skb_reset_transport_header(skb);
return skb; return skb;
err_free: err_free:

View File

@ -558,12 +558,13 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
spin_unlock_irqrestore(&rq->lock, flags); spin_unlock_irqrestore(&rq->lock, flags);
skb_queue_walk_safe(&queue, skb, tmp) { skb_queue_walk_safe(&queue, skb, tmp) {
struct net_device *dev = skb->dev; struct net_device *dev;
br2684_push(atmvcc, skb);
dev = skb->dev;
dev->stats.rx_bytes -= skb->len; dev->stats.rx_bytes -= skb->len;
dev->stats.rx_packets--; dev->stats.rx_packets--;
br2684_push(atmvcc, skb);
} }
/* initialize netdev carrier state */ /* initialize netdev carrier state */

View File

@ -231,6 +231,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
int br_add_bridge(struct net *net, const char *name) int br_add_bridge(struct net *net, const char *name)
{ {
struct net_device *dev; struct net_device *dev;
int res;
dev = alloc_netdev(sizeof(struct net_bridge), name, dev = alloc_netdev(sizeof(struct net_bridge), name,
br_dev_setup); br_dev_setup);
@ -240,7 +241,10 @@ int br_add_bridge(struct net *net, const char *name)
dev_net_set(dev, net); dev_net_set(dev, net);
return register_netdev(dev); res = register_netdev(dev);
if (res)
free_netdev(dev);
return res;
} }
int br_del_bridge(struct net *net, const char *name) int br_del_bridge(struct net *net, const char *name)

View File

@ -913,7 +913,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
} }
static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen) char __user *optval, int __user *optlen, unsigned flags)
{ {
struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk);
int len; int len;
@ -962,7 +962,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
msg.msg_control = optval; msg.msg_control = optval;
msg.msg_controllen = len; msg.msg_controllen = len;
msg.msg_flags = 0; msg.msg_flags = flags;
lock_sock(sk); lock_sock(sk);
skb = np->pktoptions; skb = np->pktoptions;
@ -1222,7 +1222,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
if(level != SOL_IPV6) if(level != SOL_IPV6)
return -ENOPROTOOPT; return -ENOPROTOOPT;
err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); err = do_ipv6_getsockopt(sk, level, optname, optval, optlen, 0);
#ifdef CONFIG_NETFILTER #ifdef CONFIG_NETFILTER
/* we need to exclude all possible ENOPROTOOPTs except default case */ /* we need to exclude all possible ENOPROTOOPTs except default case */
if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) { if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) {
@ -1264,7 +1264,8 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
return compat_mc_getsockopt(sk, level, optname, optval, optlen, return compat_mc_getsockopt(sk, level, optname, optval, optlen,
ipv6_getsockopt); ipv6_getsockopt);
err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); err = do_ipv6_getsockopt(sk, level, optname, optval, optlen,
MSG_CMSG_COMPAT);
#ifdef CONFIG_NETFILTER #ifdef CONFIG_NETFILTER
/* we need to exclude all possible ENOPROTOOPTs except default case */ /* we need to exclude all possible ENOPROTOOPTs except default case */
if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) { if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) {

View File

@ -672,6 +672,9 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
if (skb->protocol != htons(ETH_P_IPV6)) if (skb->protocol != htons(ETH_P_IPV6))
goto tx_error; goto tx_error;
if (tos == 1)
tos = ipv6_get_dsfield(iph6);
/* ISATAP (RFC4214) - must come before 6to4 */ /* ISATAP (RFC4214) - must come before 6to4 */
if (dev->priv_flags & IFF_ISATAP) { if (dev->priv_flags & IFF_ISATAP) {
struct neighbour *neigh = NULL; struct neighbour *neigh = NULL;

View File

@ -196,8 +196,7 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
skb2->skb_iif = skb->dev->ifindex; skb2->skb_iif = skb->dev->ifindex;
skb2->dev = dev; skb2->dev = dev;
dev_queue_xmit(skb2); err = dev_queue_xmit(skb2);
err = 0;
out: out:
if (err) { if (err) {