mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) If an IPVS tunnel is created with a mixed-family destination
address, it cannot be removed. Fix from Alexey Andriyanov.
2) Fix module refcount underflow in netfilter's nft_compat, from Pablo
Neira Ayuso.
3) Generic statistics infrastructure can reference variables sitting on
a released function stack, therefore use dynamic allocation always.
Fix from Ignacy Gawędzki.
4) skb_copy_bits() return value test is inverted in ip_check_defrag().
5) Fix network namespace exit in openvswitch, we have to release all of
the per-net vports. From Pravin B Shelar.
6) Fix signedness bug in CAIF's cfpkt_iterate(), from Dan Carpenter.
7) Fix rhashtable grow/shrink behavior, only expand during inserts and
shrink during deletes. From Daniel Borkmann.
8) Netdevice names with semicolons should never be allowed, because
they serve as a separator. From Matthew Thode.
9) Use {,__}set_current_state() where appropriate, from Fabian
Frederick.
10) Revert byte queue limits support in r8169 driver, it's causing
regressions we can't figure out.
11) tcp_should_expand_sndbuf() erroneously uses tp->packets_out to
measure packets in flight, properly use tcp_packets_in_flight()
instead. From Neal Cardwell.
12) Fix accidental removal of support for bluetooth in CSR based Intel
wireless cards. From Marcel Holtmann.
13) We accidently added a behavioral change between native and compat
tasks, wrt testing the MSG_CMSG_COMPAT bit. Just ignore it if the
user happened to set it in a native binary as that was always the
behavior we had. From Catalin Marinas.
14) Check genlmsg_unicast() return valud in hwsim netlink tx frame
handling, from Bob Copeland.
15) Fix stale ->radar_required setting in mac80211 that can prevent
starting new scans, from Eliad Peller.
16) Fix memory leak in nl80211 monitor, from Johannes Berg.
17) Fix race in TX index handling in xen-netback, from David Vrabel.
18) Don't enable interrupts in amx-xgbe driver until all software et al.
state is ready for the interrupt handler to run. From Thomas
Lendacky.
19) Add missing netlink_ns_capable() checks to rtnl_newlink(), from Eric
W Biederman.
20) The amount of header space needed in macvtap was not calculated
properly, fix it otherwise we splat past the beginning of the
packet. From Eric Dumazet.
21) Fix bcmgenet TCP TX perf regression, from Jaedon Shin.
22) Don't raw initialize or mod timers, use setup_timer() and
mod_timer() instead. From Vaishali Thakkar.
23) Fix software maintained statistics in bcmgenet and systemport
drivers, from Florian Fainelli.
24) DMA descriptor updates in sh_eth need proper memory barriers, from
Ben Hutchings.
25) Don't do UDP Fragmentation Offload on RAW sockets, from Michal
Kubecek.
26) Openvswitch's non-masked set actions aren't constructed properly
into netlink messages, fix from Joe Stringer.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (116 commits)
openvswitch: Fix serialization of non-masked set actions.
gianfar: Reduce logging noise seen due to phy polling if link is down
ibmveth: Add function to enable live MAC address changes
net: bridge: add compile-time assert for cb struct size
udp: only allow UFO for packets from SOCK_DGRAM sockets
sh_eth: Really fix padding of short frames on TX
Revert "sh_eth: Enable Rx descriptor word 0 shift for r8a7790"
sh_eth: Fix RX recovery on R-Car in case of RX ring underrun
sh_eth: Ensure proper ordering of descriptor active bit write/read
net/mlx4_en: Disbale GRO for incoming loopback/selftest packets
net/mlx4_core: Fix wrong mask and error flow for the update-qp command
net: systemport: fix software maintained statistics
net: bcmgenet: fix software maintained statistics
rxrpc: don't multiply with HZ twice
rxrpc: terminate retrans loop when sending of skb fails
net/hsr: Fix NULL pointer dereference and refcnt bugs when deleting a HSR interface.
net: pasemi: Use setup_timer and mod_timer
net: stmmac: Use setup_timer and mod_timer
net: 8390: axnet_cs: Use setup_timer and mod_timer
net: 8390: pcnet_cs: Use setup_timer and mod_timer
...
This commit is contained in:
@@ -27,6 +27,8 @@ property is used.
|
||||
- amd,serdes-cdr-rate: CDR rate speed selection
|
||||
- amd,serdes-pq-skew: PQ (data sampling) skew
|
||||
- amd,serdes-tx-amp: TX amplitude boost
|
||||
- amd,serdes-dfe-tap-config: DFE taps available to run
|
||||
- amd,serdes-dfe-tap-enable: DFE taps to enable
|
||||
|
||||
Example:
|
||||
xgbe_phy@e1240800 {
|
||||
@@ -41,4 +43,6 @@ Example:
|
||||
amd,serdes-cdr-rate = <2>, <2>, <7>;
|
||||
amd,serdes-pq-skew = <10>, <10>, <30>;
|
||||
amd,serdes-tx-amp = <15>, <15>, <10>;
|
||||
amd,serdes-dfe-tap-config = <3>, <3>, <1>;
|
||||
amd,serdes-dfe-tap-enable = <0>, <0>, <127>;
|
||||
};
|
||||
|
||||
+1
-1
@@ -2065,7 +2065,7 @@ F: include/net/bluetooth/
|
||||
BONDING DRIVER
|
||||
M: Jay Vosburgh <j.vosburgh@gmail.com>
|
||||
M: Veaceslav Falico <vfalico@gmail.com>
|
||||
M: Andy Gospodarek <andy@greyhouse.net>
|
||||
M: Andy Gospodarek <gospo@cumulusnetworks.com>
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://sourceforge.net/projects/bonding/
|
||||
S: Supported
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -46,15 +47,20 @@ static struct resource smc91x_resources[] = {
|
||||
[1] = {
|
||||
.start = MSM_GPIO_TO_INT(49),
|
||||
.end = MSM_GPIO_TO_INT(49),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev.platform_data = &smc91x_platdata,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/usb/msm_hsusb.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@@ -49,15 +50,20 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev.platform_data = &smc91x_platdata,
|
||||
};
|
||||
|
||||
static int __init msm_init_smc91x(void)
|
||||
|
||||
@@ -81,11 +81,16 @@ static struct resource smc91x_resources[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_32BIT | SMC91X_USE_DMA | SMC91X_NOWAIT,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev.platform_data = &smc91x_platdata,
|
||||
};
|
||||
|
||||
static void idp_backlight_power(int on)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/pwm_backlight.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/setup.h>
|
||||
@@ -189,15 +190,20 @@ static struct resource smc91x_resources[] = {
|
||||
[1] = {
|
||||
.start = LPD270_ETHERNET_IRQ,
|
||||
.end = LPD270_ETHERNET_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
},
|
||||
};
|
||||
|
||||
struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT;
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev.platform_data = &smc91x_platdata,
|
||||
};
|
||||
|
||||
static struct resource lpd270_flash_resources[] = {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/platform_data/video-clcd-versatile.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/smc91x.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/amba/mmci.h>
|
||||
#include <linux/gfp.h>
|
||||
@@ -94,6 +95,10 @@ static struct smsc911x_platform_config smsc911x_config = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
};
|
||||
|
||||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
|
||||
};
|
||||
|
||||
static struct platform_device realview_eth_device = {
|
||||
.name = "smsc911x",
|
||||
.id = 0,
|
||||
@@ -107,6 +112,8 @@ int realview_eth_register(const char *name, struct resource *res)
|
||||
realview_eth_device.resource = res;
|
||||
if (strcmp(realview_eth_device.name, "smsc911x") == 0)
|
||||
realview_eth_device.dev.platform_data = &smsc911x_config;
|
||||
else
|
||||
realview_eth_device.dev.platform_data = &smc91x_platdata;
|
||||
|
||||
return platform_device_register(&realview_eth_device);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ static struct resource realview_eb_eth_resources[] = {
|
||||
[1] = {
|
||||
.start = IRQ_EB_ETH,
|
||||
.end = IRQ_EB_ETH,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/pm.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/map.h>
|
||||
@@ -258,12 +259,17 @@ static int neponset_probe(struct platform_device *dev)
|
||||
0x02000000, "smc91x-attrib"),
|
||||
{ .flags = IORESOURCE_IRQ },
|
||||
};
|
||||
struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_IO_SHIFT_2 | SMC91X_NOWAIT,
|
||||
};
|
||||
struct platform_device_info smc91x_devinfo = {
|
||||
.parent = &dev->dev,
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.res = smc91x_resources,
|
||||
.num_res = ARRAY_SIZE(smc91x_resources),
|
||||
.data = &smc91c_platdata,
|
||||
.size_data = sizeof(smc91c_platdata),
|
||||
};
|
||||
int ret, irq;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/smc91x.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/setup.h>
|
||||
@@ -43,12 +44,18 @@ static struct resource smc91x_resources[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
.dev = {
|
||||
.platform_data = &smc91c_platdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
|
||||
@@ -272,6 +272,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL },
|
||||
|
||||
/* Intel Bluetooth devices */
|
||||
{ USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
|
||||
{ USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL },
|
||||
{ USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL },
|
||||
{ USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_NEW },
|
||||
|
||||
@@ -1755,7 +1755,7 @@ init_card(struct hfc_pci *hc)
|
||||
enable_hwirq(hc);
|
||||
spin_unlock_irqrestore(&hc->lock, flags);
|
||||
/* Timeout 80ms */
|
||||
current->state = TASK_UNINTERRUPTIBLE;
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout((80 * HZ) / 1000);
|
||||
printk(KERN_INFO "HFC PCI: IRQ %d count %d\n",
|
||||
hc->irq, hc->irqcnt);
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ config IPVLAN
|
||||
making it transparent to the connected L2 switch.
|
||||
|
||||
Ipvlan devices can be added using the "ip" command from the
|
||||
iproute2 package starting with the iproute2-X.Y.ZZ release:
|
||||
iproute2 package starting with the iproute2-3.19 release:
|
||||
|
||||
"ip link add link <main-dev> [ NAME ] type ipvlan"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ config DEV_APPLETALK
|
||||
|
||||
config LTPC
|
||||
tristate "Apple/Farallon LocalTalk PC support"
|
||||
depends on DEV_APPLETALK && (ISA || EISA) && ISA_DMA_API
|
||||
depends on DEV_APPLETALK && (ISA || EISA) && ISA_DMA_API && VIRT_TO_BUS
|
||||
help
|
||||
This allows you to use the AppleTalk PC card to connect to LocalTalk
|
||||
networks. The card is also known as the Farallon PhoneNet PC card.
|
||||
|
||||
@@ -105,8 +105,8 @@ static inline u64 name##_readq(struct bcm_sf2_priv *priv, u32 off) \
|
||||
{ \
|
||||
u32 indir, dir; \
|
||||
spin_lock(&priv->indir_lock); \
|
||||
indir = reg_readl(priv, REG_DIR_DATA_READ); \
|
||||
dir = __raw_readl(priv->name + off); \
|
||||
indir = reg_readl(priv, REG_DIR_DATA_READ); \
|
||||
spin_unlock(&priv->indir_lock); \
|
||||
return (u64)indir << 32 | dir; \
|
||||
} \
|
||||
|
||||
@@ -484,11 +484,8 @@ static int axnet_open(struct net_device *dev)
|
||||
link->open++;
|
||||
|
||||
info->link_status = 0x00;
|
||||
init_timer(&info->watchdog);
|
||||
info->watchdog.function = ei_watchdog;
|
||||
info->watchdog.data = (u_long)dev;
|
||||
info->watchdog.expires = jiffies + HZ;
|
||||
add_timer(&info->watchdog);
|
||||
setup_timer(&info->watchdog, ei_watchdog, (u_long)dev);
|
||||
mod_timer(&info->watchdog, jiffies + HZ);
|
||||
|
||||
return ax_open(dev);
|
||||
} /* axnet_open */
|
||||
|
||||
@@ -918,11 +918,8 @@ static int pcnet_open(struct net_device *dev)
|
||||
|
||||
info->phy_id = info->eth_phy;
|
||||
info->link_status = 0x00;
|
||||
init_timer(&info->watchdog);
|
||||
info->watchdog.function = ei_watchdog;
|
||||
info->watchdog.data = (u_long)dev;
|
||||
info->watchdog.expires = jiffies + HZ;
|
||||
add_timer(&info->watchdog);
|
||||
setup_timer(&info->watchdog, ei_watchdog, (u_long)dev);
|
||||
mod_timer(&info->watchdog, jiffies + HZ);
|
||||
|
||||
return ei_open(dev);
|
||||
} /* pcnet_open */
|
||||
|
||||
@@ -376,7 +376,8 @@ static int tse_rx(struct altera_tse_private *priv, int limit)
|
||||
u16 pktlength;
|
||||
u16 pktstatus;
|
||||
|
||||
while ((rxstatus = priv->dmaops->get_rx_status(priv)) != 0) {
|
||||
while (((rxstatus = priv->dmaops->get_rx_status(priv)) != 0) &&
|
||||
(count < limit)) {
|
||||
pktstatus = rxstatus >> 16;
|
||||
pktlength = rxstatus & 0xffff;
|
||||
|
||||
@@ -491,28 +492,27 @@ static int tse_poll(struct napi_struct *napi, int budget)
|
||||
struct altera_tse_private *priv =
|
||||
container_of(napi, struct altera_tse_private, napi);
|
||||
int rxcomplete = 0;
|
||||
int txcomplete = 0;
|
||||
unsigned long int flags;
|
||||
|
||||
txcomplete = tse_tx_complete(priv);
|
||||
tse_tx_complete(priv);
|
||||
|
||||
rxcomplete = tse_rx(priv, budget);
|
||||
|
||||
if (rxcomplete >= budget || txcomplete > 0)
|
||||
return rxcomplete;
|
||||
if (rxcomplete < budget) {
|
||||
|
||||
napi_gro_flush(napi, false);
|
||||
__napi_complete(napi);
|
||||
napi_gro_flush(napi, false);
|
||||
__napi_complete(napi);
|
||||
|
||||
netdev_dbg(priv->dev,
|
||||
"NAPI Complete, did %d packets with budget %d\n",
|
||||
txcomplete+rxcomplete, budget);
|
||||
netdev_dbg(priv->dev,
|
||||
"NAPI Complete, did %d packets with budget %d\n",
|
||||
rxcomplete, budget);
|
||||
|
||||
spin_lock_irqsave(&priv->rxdma_irq_lock, flags);
|
||||
priv->dmaops->enable_rxirq(priv);
|
||||
priv->dmaops->enable_txirq(priv);
|
||||
spin_unlock_irqrestore(&priv->rxdma_irq_lock, flags);
|
||||
return rxcomplete + txcomplete;
|
||||
spin_lock_irqsave(&priv->rxdma_irq_lock, flags);
|
||||
priv->dmaops->enable_rxirq(priv);
|
||||
priv->dmaops->enable_txirq(priv);
|
||||
spin_unlock_irqrestore(&priv->rxdma_irq_lock, flags);
|
||||
}
|
||||
return rxcomplete;
|
||||
}
|
||||
|
||||
/* DMA TX & RX FIFO interrupt routing
|
||||
@@ -521,7 +521,6 @@ static irqreturn_t altera_isr(int irq, void *dev_id)
|
||||
{
|
||||
struct net_device *dev = dev_id;
|
||||
struct altera_tse_private *priv;
|
||||
unsigned long int flags;
|
||||
|
||||
if (unlikely(!dev)) {
|
||||
pr_err("%s: invalid dev pointer\n", __func__);
|
||||
@@ -529,20 +528,20 @@ static irqreturn_t altera_isr(int irq, void *dev_id)
|
||||
}
|
||||
priv = netdev_priv(dev);
|
||||
|
||||
/* turn off desc irqs and enable napi rx */
|
||||
spin_lock_irqsave(&priv->rxdma_irq_lock, flags);
|
||||
|
||||
if (likely(napi_schedule_prep(&priv->napi))) {
|
||||
priv->dmaops->disable_rxirq(priv);
|
||||
priv->dmaops->disable_txirq(priv);
|
||||
__napi_schedule(&priv->napi);
|
||||
}
|
||||
|
||||
spin_lock(&priv->rxdma_irq_lock);
|
||||
/* reset IRQs */
|
||||
priv->dmaops->clear_rxirq(priv);
|
||||
priv->dmaops->clear_txirq(priv);
|
||||
spin_unlock(&priv->rxdma_irq_lock);
|
||||
|
||||
if (likely(napi_schedule_prep(&priv->napi))) {
|
||||
spin_lock(&priv->rxdma_irq_lock);
|
||||
priv->dmaops->disable_rxirq(priv);
|
||||
priv->dmaops->disable_txirq(priv);
|
||||
spin_unlock(&priv->rxdma_irq_lock);
|
||||
__napi_schedule(&priv->napi);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&priv->rxdma_irq_lock, flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -1399,7 +1398,7 @@ static int altera_tse_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (of_property_read_u32(pdev->dev.of_node, "tx-fifo-depth",
|
||||
&priv->rx_fifo_depth)) {
|
||||
&priv->tx_fifo_depth)) {
|
||||
dev_err(&pdev->dev, "cannot obtain tx-fifo-depth\n");
|
||||
ret = -ENXIO;
|
||||
goto err_free_netdev;
|
||||
|
||||
@@ -609,6 +609,68 @@ static void xgbe_napi_disable(struct xgbe_prv_data *pdata, unsigned int del)
|
||||
}
|
||||
}
|
||||
|
||||
static int xgbe_request_irqs(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
struct xgbe_channel *channel;
|
||||
struct net_device *netdev = pdata->netdev;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
ret = devm_request_irq(pdata->dev, pdata->dev_irq, xgbe_isr, 0,
|
||||
netdev->name, pdata);
|
||||
if (ret) {
|
||||
netdev_alert(netdev, "error requesting irq %d\n",
|
||||
pdata->dev_irq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!pdata->per_channel_irq)
|
||||
return 0;
|
||||
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++) {
|
||||
snprintf(channel->dma_irq_name,
|
||||
sizeof(channel->dma_irq_name) - 1,
|
||||
"%s-TxRx-%u", netdev_name(netdev),
|
||||
channel->queue_index);
|
||||
|
||||
ret = devm_request_irq(pdata->dev, channel->dma_irq,
|
||||
xgbe_dma_isr, 0,
|
||||
channel->dma_irq_name, channel);
|
||||
if (ret) {
|
||||
netdev_alert(netdev, "error requesting irq %d\n",
|
||||
channel->dma_irq);
|
||||
goto err_irq;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_irq:
|
||||
/* Using an unsigned int, 'i' will go to UINT_MAX and exit */
|
||||
for (i--, channel--; i < pdata->channel_count; i--, channel--)
|
||||
devm_free_irq(pdata->dev, channel->dma_irq, channel);
|
||||
|
||||
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void xgbe_free_irqs(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
struct xgbe_channel *channel;
|
||||
unsigned int i;
|
||||
|
||||
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
|
||||
|
||||
if (!pdata->per_channel_irq)
|
||||
return;
|
||||
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++)
|
||||
devm_free_irq(pdata->dev, channel->dma_irq, channel);
|
||||
}
|
||||
|
||||
void xgbe_init_tx_coalesce(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
@@ -810,20 +872,20 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
phy_stop(pdata->phydev);
|
||||
|
||||
spin_lock_irqsave(&pdata->lock, flags);
|
||||
|
||||
if (caller == XGMAC_DRIVER_CONTEXT)
|
||||
netif_device_detach(netdev);
|
||||
|
||||
netif_tx_stop_all_queues(netdev);
|
||||
xgbe_napi_disable(pdata, 0);
|
||||
|
||||
/* Powerdown Tx/Rx */
|
||||
hw_if->powerdown_tx(pdata);
|
||||
hw_if->powerdown_rx(pdata);
|
||||
|
||||
xgbe_napi_disable(pdata, 0);
|
||||
|
||||
phy_stop(pdata->phydev);
|
||||
|
||||
pdata->power_down = 1;
|
||||
|
||||
spin_unlock_irqrestore(&pdata->lock, flags);
|
||||
@@ -854,14 +916,14 @@ int xgbe_powerup(struct net_device *netdev, unsigned int caller)
|
||||
|
||||
phy_start(pdata->phydev);
|
||||
|
||||
/* Enable Tx/Rx */
|
||||
xgbe_napi_enable(pdata, 0);
|
||||
|
||||
hw_if->powerup_tx(pdata);
|
||||
hw_if->powerup_rx(pdata);
|
||||
|
||||
if (caller == XGMAC_DRIVER_CONTEXT)
|
||||
netif_device_attach(netdev);
|
||||
|
||||
xgbe_napi_enable(pdata, 0);
|
||||
netif_tx_start_all_queues(netdev);
|
||||
|
||||
spin_unlock_irqrestore(&pdata->lock, flags);
|
||||
@@ -875,6 +937,7 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
struct net_device *netdev = pdata->netdev;
|
||||
int ret;
|
||||
|
||||
DBGPR("-->xgbe_start\n");
|
||||
|
||||
@@ -884,17 +947,31 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
|
||||
|
||||
phy_start(pdata->phydev);
|
||||
|
||||
xgbe_napi_enable(pdata, 1);
|
||||
|
||||
ret = xgbe_request_irqs(pdata);
|
||||
if (ret)
|
||||
goto err_napi;
|
||||
|
||||
hw_if->enable_tx(pdata);
|
||||
hw_if->enable_rx(pdata);
|
||||
|
||||
xgbe_init_tx_timers(pdata);
|
||||
|
||||
xgbe_napi_enable(pdata, 1);
|
||||
netif_tx_start_all_queues(netdev);
|
||||
|
||||
DBGPR("<--xgbe_start\n");
|
||||
|
||||
return 0;
|
||||
|
||||
err_napi:
|
||||
xgbe_napi_disable(pdata, 1);
|
||||
|
||||
phy_stop(pdata->phydev);
|
||||
|
||||
hw_if->exit(pdata);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void xgbe_stop(struct xgbe_prv_data *pdata)
|
||||
@@ -907,16 +984,21 @@ static void xgbe_stop(struct xgbe_prv_data *pdata)
|
||||
|
||||
DBGPR("-->xgbe_stop\n");
|
||||
|
||||
phy_stop(pdata->phydev);
|
||||
|
||||
netif_tx_stop_all_queues(netdev);
|
||||
xgbe_napi_disable(pdata, 1);
|
||||
|
||||
xgbe_stop_tx_timers(pdata);
|
||||
|
||||
hw_if->disable_tx(pdata);
|
||||
hw_if->disable_rx(pdata);
|
||||
|
||||
xgbe_free_irqs(pdata);
|
||||
|
||||
xgbe_napi_disable(pdata, 1);
|
||||
|
||||
phy_stop(pdata->phydev);
|
||||
|
||||
hw_if->exit(pdata);
|
||||
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++) {
|
||||
if (!channel->tx_ring)
|
||||
@@ -931,10 +1013,6 @@ static void xgbe_stop(struct xgbe_prv_data *pdata)
|
||||
|
||||
static void xgbe_restart_dev(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
struct xgbe_channel *channel;
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
unsigned int i;
|
||||
|
||||
DBGPR("-->xgbe_restart_dev\n");
|
||||
|
||||
/* If not running, "restart" will happen on open */
|
||||
@@ -942,19 +1020,10 @@ static void xgbe_restart_dev(struct xgbe_prv_data *pdata)
|
||||
return;
|
||||
|
||||
xgbe_stop(pdata);
|
||||
synchronize_irq(pdata->dev_irq);
|
||||
if (pdata->per_channel_irq) {
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++)
|
||||
synchronize_irq(channel->dma_irq);
|
||||
}
|
||||
|
||||
xgbe_free_tx_data(pdata);
|
||||
xgbe_free_rx_data(pdata);
|
||||
|
||||
/* Issue software reset to device */
|
||||
hw_if->exit(pdata);
|
||||
|
||||
xgbe_start(pdata);
|
||||
|
||||
DBGPR("<--xgbe_restart_dev\n");
|
||||
@@ -1283,10 +1352,7 @@ static void xgbe_packet_info(struct xgbe_prv_data *pdata,
|
||||
static int xgbe_open(struct net_device *netdev)
|
||||
{
|
||||
struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
struct xgbe_desc_if *desc_if = &pdata->desc_if;
|
||||
struct xgbe_channel *channel = NULL;
|
||||
unsigned int i = 0;
|
||||
int ret;
|
||||
|
||||
DBGPR("-->xgbe_open\n");
|
||||
@@ -1329,55 +1395,14 @@ static int xgbe_open(struct net_device *netdev)
|
||||
INIT_WORK(&pdata->restart_work, xgbe_restart);
|
||||
INIT_WORK(&pdata->tx_tstamp_work, xgbe_tx_tstamp);
|
||||
|
||||
/* Request interrupts */
|
||||
ret = devm_request_irq(pdata->dev, pdata->dev_irq, xgbe_isr, 0,
|
||||
netdev->name, pdata);
|
||||
if (ret) {
|
||||
netdev_alert(netdev, "error requesting irq %d\n",
|
||||
pdata->dev_irq);
|
||||
goto err_rings;
|
||||
}
|
||||
|
||||
if (pdata->per_channel_irq) {
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++) {
|
||||
snprintf(channel->dma_irq_name,
|
||||
sizeof(channel->dma_irq_name) - 1,
|
||||
"%s-TxRx-%u", netdev_name(netdev),
|
||||
channel->queue_index);
|
||||
|
||||
ret = devm_request_irq(pdata->dev, channel->dma_irq,
|
||||
xgbe_dma_isr, 0,
|
||||
channel->dma_irq_name, channel);
|
||||
if (ret) {
|
||||
netdev_alert(netdev,
|
||||
"error requesting irq %d\n",
|
||||
channel->dma_irq);
|
||||
goto err_irq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = xgbe_start(pdata);
|
||||
if (ret)
|
||||
goto err_start;
|
||||
goto err_rings;
|
||||
|
||||
DBGPR("<--xgbe_open\n");
|
||||
|
||||
return 0;
|
||||
|
||||
err_start:
|
||||
hw_if->exit(pdata);
|
||||
|
||||
err_irq:
|
||||
if (pdata->per_channel_irq) {
|
||||
/* Using an unsigned int, 'i' will go to UINT_MAX and exit */
|
||||
for (i--, channel--; i < pdata->channel_count; i--, channel--)
|
||||
devm_free_irq(pdata->dev, channel->dma_irq, channel);
|
||||
}
|
||||
|
||||
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
|
||||
|
||||
err_rings:
|
||||
desc_if->free_ring_resources(pdata);
|
||||
|
||||
@@ -1399,30 +1424,16 @@ err_phy_init:
|
||||
static int xgbe_close(struct net_device *netdev)
|
||||
{
|
||||
struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
||||
struct xgbe_hw_if *hw_if = &pdata->hw_if;
|
||||
struct xgbe_desc_if *desc_if = &pdata->desc_if;
|
||||
struct xgbe_channel *channel;
|
||||
unsigned int i;
|
||||
|
||||
DBGPR("-->xgbe_close\n");
|
||||
|
||||
/* Stop the device */
|
||||
xgbe_stop(pdata);
|
||||
|
||||
/* Issue software reset to device */
|
||||
hw_if->exit(pdata);
|
||||
|
||||
/* Free the ring descriptors and buffers */
|
||||
desc_if->free_ring_resources(pdata);
|
||||
|
||||
/* Release the interrupts */
|
||||
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
|
||||
if (pdata->per_channel_irq) {
|
||||
channel = pdata->channel;
|
||||
for (i = 0; i < pdata->channel_count; i++, channel++)
|
||||
devm_free_irq(pdata->dev, channel->dma_irq, channel);
|
||||
}
|
||||
|
||||
/* Free the channel and ring structures */
|
||||
xgbe_free_channels(pdata);
|
||||
|
||||
|
||||
@@ -274,9 +274,9 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = {
|
||||
/* RBUF misc statistics */
|
||||
STAT_RBUF("rbuf_ovflow_cnt", mib.rbuf_ovflow_cnt, RBUF_OVFL_DISC_CNTR),
|
||||
STAT_RBUF("rbuf_err_cnt", mib.rbuf_err_cnt, RBUF_ERR_PKT_CNTR),
|
||||
STAT_MIB_RX("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_MIB_RX("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_MIB_TX("tx_dma_failed", mib.tx_dma_failed),
|
||||
STAT_MIB_SOFT("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_MIB_SOFT("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_MIB_SOFT("tx_dma_failed", mib.tx_dma_failed),
|
||||
};
|
||||
|
||||
#define BCM_SYSPORT_STATS_LEN ARRAY_SIZE(bcm_sysport_gstrings_stats)
|
||||
@@ -345,6 +345,7 @@ static void bcm_sysport_update_mib_counters(struct bcm_sysport_priv *priv)
|
||||
s = &bcm_sysport_gstrings_stats[i];
|
||||
switch (s->type) {
|
||||
case BCM_SYSPORT_STAT_NETDEV:
|
||||
case BCM_SYSPORT_STAT_SOFT:
|
||||
continue;
|
||||
case BCM_SYSPORT_STAT_MIB_RX:
|
||||
case BCM_SYSPORT_STAT_MIB_TX:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user