forked from Minki/linux
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Quoth David: 1) GRO MAC header comparisons were ethernet specific, breaking other link types. This required a multi-faceted fix to cure the originally noted case (Infiniband), because IPoIB was lying about it's actual hard header length. Thanks to Eric Dumazet, Roland Dreier, and others. 2) Fix build failure when INET_UDP_DIAG is built in and ipv6 is modular. From Anisse Astier. 3) Off by ones and other bug fixes in netprio_cgroup from Neil Horman. 4) ipv4 TCP reset generation needs to respect any network interface binding from the socket, otherwise route lookups might give a different result than all the other segments received. From Shawn Lu. 5) Fix unintended regression in ipv4 proxy ARP responses, from Thomas Graf. 6) Fix SKB under-allocation bug in sh_eth, from Yoshihiro Shimoda. 7) Revert skge PCI mapping changes that are causing crashes for some folks, from Stephen Hemminger. 8) IPV4 route lookups fill in the wildcarded fields of the given flow lookup key passed in, which is fine most of the time as this is exactly what the caller's want. However there are a few cases that want to retain the original flow key values afterwards, so handle those cases properly. Fix from Julian Anastasov. 9) IGB/IXGBE VF lookup bug fixes from Greg Rose. 10) Properly null terminate filename passed to ethtool flash device method, from Ben Hutchings. 11) S3 resume fix in via-velocity from David Lv. 12) Fix double SKB free during xmit failure in CAIF, from Dmitry Tarnyagin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (72 commits) net: Don't proxy arp respond if iif == rt->dst.dev if private VLAN is disabled ipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr. netprio_cgroup: fix wrong memory access when NETPRIO_CGROUP=m netprio_cgroup: don't allocate prio table when a device is registered netprio_cgroup: fix an off-by-one bug bna: fix error handling of bnad_get_flash_partition_by_offset() isdn: type bug in isdn_net_header() net: Make qdisc_skb_cb upper size bound explicit. ixgbe: ethtool: stats user buffer overrun ixgbe: dcb: up2tc mapping lost on disable/enable CEE DCB state ixgbe: do not update real num queues when netdev is going away ixgbe: Fix broken dependency on MAX_SKB_FRAGS being related to page size ixgbe: Fix case of Tx Hang in PF with 32 VFs ixgbe: fix vf lookup igb: fix vf lookup e1000: add dropped DMA receive enable back in for WoL gro: more generic L2 header check IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses zd1211rw: firmware needs duration_id set to zero for non-pspoll frames net: enable TC35815 for MIPS again ...
This commit is contained in:
commit
8df54d622a
@ -169,10 +169,8 @@ int bcma_bus_register(struct bcma_bus *bus)
|
|||||||
err = bcma_sprom_get(bus);
|
err = bcma_sprom_get(bus);
|
||||||
if (err == -ENOENT) {
|
if (err == -ENOENT) {
|
||||||
pr_err("No SPROM available\n");
|
pr_err("No SPROM available\n");
|
||||||
} else if (err) {
|
} else if (err)
|
||||||
pr_err("Failed to get SPROM: %d\n", err);
|
pr_err("Failed to get SPROM: %d\n", err);
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Register found cores */
|
/* Register found cores */
|
||||||
bcma_register_cores(bus);
|
bcma_register_cores(bus);
|
||||||
|
@ -399,15 +399,18 @@ int bcma_bus_scan(struct bcma_bus *bus)
|
|||||||
core->bus = bus;
|
core->bus = bus;
|
||||||
|
|
||||||
err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core);
|
err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core);
|
||||||
if (err == -ENODEV) {
|
if (err < 0) {
|
||||||
core_num++;
|
kfree(core);
|
||||||
continue;
|
if (err == -ENODEV) {
|
||||||
} else if (err == -ENXIO)
|
core_num++;
|
||||||
continue;
|
continue;
|
||||||
else if (err == -ESPIPE)
|
} else if (err == -ENXIO) {
|
||||||
break;
|
continue;
|
||||||
else if (err < 0)
|
} else if (err == -ESPIPE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
core->core_index = core_num++;
|
core->core_index = core_num++;
|
||||||
bus->nr_cores++;
|
bus->nr_cores++;
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
#include <net/neighbour.h>
|
#include <net/neighbour.h>
|
||||||
|
#include <net/sch_generic.h>
|
||||||
|
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
@ -117,8 +118,9 @@ struct ipoib_header {
|
|||||||
u16 reserved;
|
u16 reserved;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipoib_pseudoheader {
|
struct ipoib_cb {
|
||||||
u8 hwaddr[INFINIBAND_ALEN];
|
struct qdisc_skb_cb qdisc_cb;
|
||||||
|
u8 hwaddr[INFINIBAND_ALEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */
|
/* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */
|
||||||
|
@ -653,7 +653,7 @@ static void ipoib_path_lookup(struct sk_buff *skb, struct neighbour *n, struct n
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
|
static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
|
||||||
struct ipoib_pseudoheader *phdr)
|
struct ipoib_cb *cb)
|
||||||
{
|
{
|
||||||
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
||||||
struct ipoib_path *path;
|
struct ipoib_path *path;
|
||||||
@ -661,17 +661,15 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
|
|||||||
|
|
||||||
spin_lock_irqsave(&priv->lock, flags);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
|
|
||||||
path = __path_find(dev, phdr->hwaddr + 4);
|
path = __path_find(dev, cb->hwaddr + 4);
|
||||||
if (!path || !path->valid) {
|
if (!path || !path->valid) {
|
||||||
int new_path = 0;
|
int new_path = 0;
|
||||||
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = path_rec_create(dev, phdr->hwaddr + 4);
|
path = path_rec_create(dev, cb->hwaddr + 4);
|
||||||
new_path = 1;
|
new_path = 1;
|
||||||
}
|
}
|
||||||
if (path) {
|
if (path) {
|
||||||
/* put pseudoheader back on for next time */
|
|
||||||
skb_push(skb, sizeof *phdr);
|
|
||||||
__skb_queue_tail(&path->queue, skb);
|
__skb_queue_tail(&path->queue, skb);
|
||||||
|
|
||||||
if (!path->query && path_rec_start(dev, path)) {
|
if (!path->query && path_rec_start(dev, path)) {
|
||||||
@ -695,12 +693,10 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
|
|||||||
be16_to_cpu(path->pathrec.dlid));
|
be16_to_cpu(path->pathrec.dlid));
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
ipoib_send(dev, skb, path->ah, IPOIB_QPN(phdr->hwaddr));
|
ipoib_send(dev, skb, path->ah, IPOIB_QPN(cb->hwaddr));
|
||||||
return;
|
return;
|
||||||
} else if ((path->query || !path_rec_start(dev, path)) &&
|
} else if ((path->query || !path_rec_start(dev, path)) &&
|
||||||
skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
|
skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
|
||||||
/* put pseudoheader back on for next time */
|
|
||||||
skb_push(skb, sizeof *phdr);
|
|
||||||
__skb_queue_tail(&path->queue, skb);
|
__skb_queue_tail(&path->queue, skb);
|
||||||
} else {
|
} else {
|
||||||
++dev->stats.tx_dropped;
|
++dev->stats.tx_dropped;
|
||||||
@ -774,16 +770,14 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct ipoib_pseudoheader *phdr =
|
struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb;
|
||||||
(struct ipoib_pseudoheader *) skb->data;
|
|
||||||
skb_pull(skb, sizeof *phdr);
|
|
||||||
|
|
||||||
if (phdr->hwaddr[4] == 0xff) {
|
if (cb->hwaddr[4] == 0xff) {
|
||||||
/* Add in the P_Key for multicast*/
|
/* Add in the P_Key for multicast*/
|
||||||
phdr->hwaddr[8] = (priv->pkey >> 8) & 0xff;
|
cb->hwaddr[8] = (priv->pkey >> 8) & 0xff;
|
||||||
phdr->hwaddr[9] = priv->pkey & 0xff;
|
cb->hwaddr[9] = priv->pkey & 0xff;
|
||||||
|
|
||||||
ipoib_mcast_send(dev, phdr->hwaddr + 4, skb);
|
ipoib_mcast_send(dev, cb->hwaddr + 4, skb);
|
||||||
} else {
|
} else {
|
||||||
/* unicast GID -- should be ARP or RARP reply */
|
/* unicast GID -- should be ARP or RARP reply */
|
||||||
|
|
||||||
@ -792,14 +786,14 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n",
|
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n",
|
||||||
skb_dst(skb) ? "neigh" : "dst",
|
skb_dst(skb) ? "neigh" : "dst",
|
||||||
be16_to_cpup((__be16 *) skb->data),
|
be16_to_cpup((__be16 *) skb->data),
|
||||||
IPOIB_QPN(phdr->hwaddr),
|
IPOIB_QPN(cb->hwaddr),
|
||||||
phdr->hwaddr + 4);
|
cb->hwaddr + 4);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
++dev->stats.tx_dropped;
|
++dev->stats.tx_dropped;
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
unicast_arp_send(skb, dev, phdr);
|
unicast_arp_send(skb, dev, cb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unlock:
|
unlock:
|
||||||
@ -825,8 +819,6 @@ static int ipoib_hard_header(struct sk_buff *skb,
|
|||||||
const void *daddr, const void *saddr, unsigned len)
|
const void *daddr, const void *saddr, unsigned len)
|
||||||
{
|
{
|
||||||
struct ipoib_header *header;
|
struct ipoib_header *header;
|
||||||
struct dst_entry *dst;
|
|
||||||
struct neighbour *n;
|
|
||||||
|
|
||||||
header = (struct ipoib_header *) skb_push(skb, sizeof *header);
|
header = (struct ipoib_header *) skb_push(skb, sizeof *header);
|
||||||
|
|
||||||
@ -834,18 +826,13 @@ static int ipoib_hard_header(struct sk_buff *skb,
|
|||||||
header->reserved = 0;
|
header->reserved = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we don't have a neighbour structure, stuff the
|
* If we don't have a dst_entry structure, stuff the
|
||||||
* destination address onto the front of the skb so we can
|
* destination address into skb->cb so we can figure out where
|
||||||
* figure out where to send the packet later.
|
* to send the packet later.
|
||||||
*/
|
*/
|
||||||
dst = skb_dst(skb);
|
if (!skb_dst(skb)) {
|
||||||
n = NULL;
|
struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb;
|
||||||
if (dst)
|
memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN);
|
||||||
n = dst_get_neighbour_noref_raw(dst);
|
|
||||||
if ((!dst || !n) && daddr) {
|
|
||||||
struct ipoib_pseudoheader *phdr =
|
|
||||||
(struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr);
|
|
||||||
memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1021,11 +1008,7 @@ static void ipoib_setup(struct net_device *dev)
|
|||||||
|
|
||||||
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
|
||||||
|
|
||||||
/*
|
dev->hard_header_len = IPOIB_ENCAP_LEN;
|
||||||
* We add in INFINIBAND_ALEN to allow for the destination
|
|
||||||
* address "pseudoheader" for skbs without neighbour struct.
|
|
||||||
*/
|
|
||||||
dev->hard_header_len = IPOIB_ENCAP_LEN + INFINIBAND_ALEN;
|
|
||||||
dev->addr_len = INFINIBAND_ALEN;
|
dev->addr_len = INFINIBAND_ALEN;
|
||||||
dev->type = ARPHRD_INFINIBAND;
|
dev->type = ARPHRD_INFINIBAND;
|
||||||
dev->tx_queue_len = ipoib_sendq_size * 2;
|
dev->tx_queue_len = ipoib_sendq_size * 2;
|
||||||
|
@ -262,21 +262,13 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
|
|||||||
netif_tx_lock_bh(dev);
|
netif_tx_lock_bh(dev);
|
||||||
while (!skb_queue_empty(&mcast->pkt_queue)) {
|
while (!skb_queue_empty(&mcast->pkt_queue)) {
|
||||||
struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
|
struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
|
||||||
struct dst_entry *dst = skb_dst(skb);
|
|
||||||
struct neighbour *n = NULL;
|
|
||||||
|
|
||||||
netif_tx_unlock_bh(dev);
|
netif_tx_unlock_bh(dev);
|
||||||
|
|
||||||
skb->dev = dev;
|
skb->dev = dev;
|
||||||
if (dst)
|
|
||||||
n = dst_get_neighbour_noref_raw(dst);
|
|
||||||
if (!dst || !n) {
|
|
||||||
/* put pseudoheader back on for next time */
|
|
||||||
skb_push(skb, sizeof (struct ipoib_pseudoheader));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev_queue_xmit(skb))
|
if (dev_queue_xmit(skb))
|
||||||
ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n");
|
ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n");
|
||||||
|
|
||||||
netif_tx_lock_bh(dev);
|
netif_tx_lock_bh(dev);
|
||||||
}
|
}
|
||||||
netif_tx_unlock_bh(dev);
|
netif_tx_unlock_bh(dev);
|
||||||
|
@ -1901,7 +1901,7 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev,
|
|||||||
{
|
{
|
||||||
isdn_net_local *lp = netdev_priv(dev);
|
isdn_net_local *lp = netdev_priv(dev);
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
ushort len = 0;
|
int len = 0;
|
||||||
|
|
||||||
switch (lp->p_encap) {
|
switch (lp->p_encap) {
|
||||||
case ISDN_NET_ENCAP_ETHER:
|
case ISDN_NET_ENCAP_ETHER:
|
||||||
|
@ -440,12 +440,14 @@ static netdev_tx_t cc770_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
for (i = 0; i < dlc; i++)
|
for (i = 0; i < dlc; i++)
|
||||||
cc770_write_reg(priv, msgobj[mo].data[i], cf->data[i]);
|
cc770_write_reg(priv, msgobj[mo].data[i], cf->data[i]);
|
||||||
|
|
||||||
|
/* Store echo skb before starting the transfer */
|
||||||
|
can_put_echo_skb(skb, dev, 0);
|
||||||
|
|
||||||
cc770_write_reg(priv, msgobj[mo].ctrl1,
|
cc770_write_reg(priv, msgobj[mo].ctrl1,
|
||||||
RMTPND_RES | TXRQST_SET | CPUUPD_RES | NEWDAT_UNC);
|
RMTPND_RES | TXRQST_SET | CPUUPD_RES | NEWDAT_UNC);
|
||||||
|
|
||||||
stats->tx_bytes += dlc;
|
stats->tx_bytes += dlc;
|
||||||
|
|
||||||
can_put_echo_skb(skb, dev, 0);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HM: We had some cases of repeated IRQs so make sure the
|
* HM: We had some cases of repeated IRQs so make sure the
|
||||||
|
@ -110,6 +110,11 @@ MODULE_PARM_DESC(bcr, "Bus configuration register (default=0x40 [CBY])");
|
|||||||
#define CC770_IOSIZE 0x20
|
#define CC770_IOSIZE 0x20
|
||||||
#define CC770_IOSIZE_INDIRECT 0x02
|
#define CC770_IOSIZE_INDIRECT 0x02
|
||||||
|
|
||||||
|
/* Spinlock for cc770_isa_port_write_reg_indirect
|
||||||
|
* and cc770_isa_port_read_reg_indirect
|
||||||
|
*/
|
||||||
|
static DEFINE_SPINLOCK(cc770_isa_port_lock);
|
||||||
|
|
||||||
static struct platform_device *cc770_isa_devs[MAXDEV];
|
static struct platform_device *cc770_isa_devs[MAXDEV];
|
||||||
|
|
||||||
static u8 cc770_isa_mem_read_reg(const struct cc770_priv *priv, int reg)
|
static u8 cc770_isa_mem_read_reg(const struct cc770_priv *priv, int reg)
|
||||||
@ -138,18 +143,27 @@ static u8 cc770_isa_port_read_reg_indirect(const struct cc770_priv *priv,
|
|||||||
int reg)
|
int reg)
|
||||||
{
|
{
|
||||||
unsigned long base = (unsigned long)priv->reg_base;
|
unsigned long base = (unsigned long)priv->reg_base;
|
||||||
|
unsigned long flags;
|
||||||
|
u8 val;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&cc770_isa_port_lock, flags);
|
||||||
outb(reg, base);
|
outb(reg, base);
|
||||||
return inb(base + 1);
|
val = inb(base + 1);
|
||||||
|
spin_unlock_irqrestore(&cc770_isa_port_lock, flags);
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cc770_isa_port_write_reg_indirect(const struct cc770_priv *priv,
|
static void cc770_isa_port_write_reg_indirect(const struct cc770_priv *priv,
|
||||||
int reg, u8 val)
|
int reg, u8 val)
|
||||||
{
|
{
|
||||||
unsigned long base = (unsigned long)priv->reg_base;
|
unsigned long base = (unsigned long)priv->reg_base;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&cc770_isa_port_lock, flags);
|
||||||
outb(reg, base);
|
outb(reg, base);
|
||||||
outb(val, base + 1);
|
outb(val, base + 1);
|
||||||
|
spin_unlock_irqrestore(&cc770_isa_port_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __devinit cc770_isa_probe(struct platform_device *pdev)
|
static int __devinit cc770_isa_probe(struct platform_device *pdev)
|
||||||
|
@ -118,6 +118,9 @@
|
|||||||
(FLEXCAN_ESR_TWRN_INT | FLEXCAN_ESR_RWRN_INT | FLEXCAN_ESR_BOFF_INT)
|
(FLEXCAN_ESR_TWRN_INT | FLEXCAN_ESR_RWRN_INT | FLEXCAN_ESR_BOFF_INT)
|
||||||
#define FLEXCAN_ESR_ERR_ALL \
|
#define FLEXCAN_ESR_ERR_ALL \
|
||||||
(FLEXCAN_ESR_ERR_BUS | FLEXCAN_ESR_ERR_STATE)
|
(FLEXCAN_ESR_ERR_BUS | FLEXCAN_ESR_ERR_STATE)
|
||||||
|
#define FLEXCAN_ESR_ALL_INT \
|
||||||
|
(FLEXCAN_ESR_TWRN_INT | FLEXCAN_ESR_RWRN_INT | \
|
||||||
|
FLEXCAN_ESR_BOFF_INT | FLEXCAN_ESR_ERR_INT)
|
||||||
|
|
||||||
/* FLEXCAN interrupt flag register (IFLAG) bits */
|
/* FLEXCAN interrupt flag register (IFLAG) bits */
|
||||||
#define FLEXCAN_TX_BUF_ID 8
|
#define FLEXCAN_TX_BUF_ID 8
|
||||||
@ -577,7 +580,9 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
|
|||||||
|
|
||||||
reg_iflag1 = flexcan_read(®s->iflag1);
|
reg_iflag1 = flexcan_read(®s->iflag1);
|
||||||
reg_esr = flexcan_read(®s->esr);
|
reg_esr = flexcan_read(®s->esr);
|
||||||
flexcan_write(FLEXCAN_ESR_ERR_INT, ®s->esr); /* ACK err IRQ */
|
/* ACK all bus error and state change IRQ sources */
|
||||||
|
if (reg_esr & FLEXCAN_ESR_ALL_INT)
|
||||||
|
flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, ®s->esr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* schedule NAPI in case of:
|
* schedule NAPI in case of:
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
#define PCH_IF_CREQ_BUSY BIT(15)
|
#define PCH_IF_CREQ_BUSY BIT(15)
|
||||||
|
|
||||||
#define PCH_STATUS_INT 0x8000
|
#define PCH_STATUS_INT 0x8000
|
||||||
|
#define PCH_RP 0x00008000
|
||||||
#define PCH_REC 0x00007f00
|
#define PCH_REC 0x00007f00
|
||||||
#define PCH_TEC 0x000000ff
|
#define PCH_TEC 0x000000ff
|
||||||
|
|
||||||
@ -527,7 +528,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
|
|||||||
priv->can.can_stats.error_passive++;
|
priv->can.can_stats.error_passive++;
|
||||||
state = CAN_STATE_ERROR_PASSIVE;
|
state = CAN_STATE_ERROR_PASSIVE;
|
||||||
cf->can_id |= CAN_ERR_CRTL;
|
cf->can_id |= CAN_ERR_CRTL;
|
||||||
if (((errc & PCH_REC) >> 8) > 127)
|
if (errc & PCH_RP)
|
||||||
cf->data[1] |= CAN_ERR_CRTL_RX_PASSIVE;
|
cf->data[1] |= CAN_ERR_CRTL_RX_PASSIVE;
|
||||||
if ((errc & PCH_TEC) > 127)
|
if ((errc & PCH_TEC) > 127)
|
||||||
cf->data[1] |= CAN_ERR_CRTL_TX_PASSIVE;
|
cf->data[1] |= CAN_ERR_CRTL_TX_PASSIVE;
|
||||||
|
@ -39,9 +39,9 @@ MODULE_LICENSE("GPL v2");
|
|||||||
#define DRV_NAME "peak_pci"
|
#define DRV_NAME "peak_pci"
|
||||||
|
|
||||||
struct peak_pci_chan {
|
struct peak_pci_chan {
|
||||||
void __iomem *cfg_base; /* Common for all channels */
|
void __iomem *cfg_base; /* Common for all channels */
|
||||||
struct net_device *next_dev; /* Chain of network devices */
|
struct net_device *prev_dev; /* Chain of network devices */
|
||||||
u16 icr_mask; /* Interrupt mask for fast ack */
|
u16 icr_mask; /* Interrupt mask for fast ack */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PEAK_PCI_CAN_CLOCK (16000000 / 2)
|
#define PEAK_PCI_CAN_CLOCK (16000000 / 2)
|
||||||
@ -98,7 +98,7 @@ static int __devinit peak_pci_probe(struct pci_dev *pdev,
|
|||||||
{
|
{
|
||||||
struct sja1000_priv *priv;
|
struct sja1000_priv *priv;
|
||||||
struct peak_pci_chan *chan;
|
struct peak_pci_chan *chan;
|
||||||
struct net_device *dev, *dev0 = NULL;
|
struct net_device *dev;
|
||||||
void __iomem *cfg_base, *reg_base;
|
void __iomem *cfg_base, *reg_base;
|
||||||
u16 sub_sys_id, icr;
|
u16 sub_sys_id, icr;
|
||||||
int i, err, channels;
|
int i, err, channels;
|
||||||
@ -196,18 +196,14 @@ static int __devinit peak_pci_probe(struct pci_dev *pdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create chain of SJA1000 devices */
|
/* Create chain of SJA1000 devices */
|
||||||
if (i == 0)
|
chan->prev_dev = pci_get_drvdata(pdev);
|
||||||
dev0 = dev;
|
pci_set_drvdata(pdev, dev);
|
||||||
else
|
|
||||||
chan->next_dev = dev;
|
|
||||||
|
|
||||||
dev_info(&pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"%s at reg_base=0x%p cfg_base=0x%p irq=%d\n",
|
"%s at reg_base=0x%p cfg_base=0x%p irq=%d\n",
|
||||||
dev->name, priv->reg_base, chan->cfg_base, dev->irq);
|
dev->name, priv->reg_base, chan->cfg_base, dev->irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_set_drvdata(pdev, dev0);
|
|
||||||
|
|
||||||
/* Enable interrupts */
|
/* Enable interrupts */
|
||||||
writew(icr, cfg_base + PITA_ICR + 2);
|
writew(icr, cfg_base + PITA_ICR + 2);
|
||||||
|
|
||||||
@ -217,12 +213,11 @@ failure_remove_channels:
|
|||||||
/* Disable interrupts */
|
/* Disable interrupts */
|
||||||
writew(0x0, cfg_base + PITA_ICR + 2);
|
writew(0x0, cfg_base + PITA_ICR + 2);
|
||||||
|
|
||||||
for (dev = dev0; dev; dev = chan->next_dev) {
|
for (dev = pci_get_drvdata(pdev); dev; dev = chan->prev_dev) {
|
||||||
unregister_sja1000dev(dev);
|
unregister_sja1000dev(dev);
|
||||||
free_sja1000dev(dev);
|
free_sja1000dev(dev);
|
||||||
priv = netdev_priv(dev);
|
priv = netdev_priv(dev);
|
||||||
chan = priv->priv;
|
chan = priv->priv;
|
||||||
dev = chan->next_dev;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_iounmap(pdev, reg_base);
|
pci_iounmap(pdev, reg_base);
|
||||||
@ -241,7 +236,7 @@ failure_disable_pci:
|
|||||||
|
|
||||||
static void __devexit peak_pci_remove(struct pci_dev *pdev)
|
static void __devexit peak_pci_remove(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct net_device *dev = pci_get_drvdata(pdev); /* First device */
|
struct net_device *dev = pci_get_drvdata(pdev); /* Last device */
|
||||||
struct sja1000_priv *priv = netdev_priv(dev);
|
struct sja1000_priv *priv = netdev_priv(dev);
|
||||||
struct peak_pci_chan *chan = priv->priv;
|
struct peak_pci_chan *chan = priv->priv;
|
||||||
void __iomem *cfg_base = chan->cfg_base;
|
void __iomem *cfg_base = chan->cfg_base;
|
||||||
@ -255,7 +250,7 @@ static void __devexit peak_pci_remove(struct pci_dev *pdev)
|
|||||||
dev_info(&pdev->dev, "removing device %s\n", dev->name);
|
dev_info(&pdev->dev, "removing device %s\n", dev->name);
|
||||||
unregister_sja1000dev(dev);
|
unregister_sja1000dev(dev);
|
||||||
free_sja1000dev(dev);
|
free_sja1000dev(dev);
|
||||||
dev = chan->next_dev;
|
dev = chan->prev_dev;
|
||||||
if (!dev)
|
if (!dev)
|
||||||
break;
|
break;
|
||||||
priv = netdev_priv(dev);
|
priv = netdev_priv(dev);
|
||||||
|
@ -745,9 +745,10 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
netif_receive_skb(skb);
|
netif_rx(skb);
|
||||||
stats->rx_packets++;
|
stats->rx_packets++;
|
||||||
stats->rx_bytes += cf->can_dlc;
|
stats->rx_bytes += cf->can_dlc;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,9 +627,6 @@ static int ems_usb_start(struct ems_usb *dev)
|
|||||||
|
|
||||||
err = usb_submit_urb(urb, GFP_KERNEL);
|
err = usb_submit_urb(urb, GFP_KERNEL);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err == -ENODEV)
|
|
||||||
netif_device_detach(dev->netdev);
|
|
||||||
|
|
||||||
usb_unanchor_urb(urb);
|
usb_unanchor_urb(urb);
|
||||||
usb_free_coherent(dev->udev, RX_BUFFER_SIZE, buf,
|
usb_free_coherent(dev->udev, RX_BUFFER_SIZE, buf,
|
||||||
urb->transfer_dma);
|
urb->transfer_dma);
|
||||||
@ -659,9 +656,6 @@ static int ems_usb_start(struct ems_usb *dev)
|
|||||||
|
|
||||||
err = usb_submit_urb(dev->intr_urb, GFP_KERNEL);
|
err = usb_submit_urb(dev->intr_urb, GFP_KERNEL);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err == -ENODEV)
|
|
||||||
netif_device_detach(dev->netdev);
|
|
||||||
|
|
||||||
dev_warn(netdev->dev.parent, "intr URB submit failed: %d\n",
|
dev_warn(netdev->dev.parent, "intr URB submit failed: %d\n",
|
||||||
err);
|
err);
|
||||||
|
|
||||||
@ -692,9 +686,6 @@ static int ems_usb_start(struct ems_usb *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
if (err == -ENODEV)
|
|
||||||
netif_device_detach(dev->netdev);
|
|
||||||
|
|
||||||
dev_warn(netdev->dev.parent, "couldn't submit control: %d\n", err);
|
dev_warn(netdev->dev.parent, "couldn't submit control: %d\n", err);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
@ -523,7 +523,6 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
|
|||||||
skb = build_skb(data);
|
skb = build_skb(data);
|
||||||
|
|
||||||
if (likely(skb)) {
|
if (likely(skb)) {
|
||||||
|
|
||||||
#ifdef BNX2X_STOP_ON_ERROR
|
#ifdef BNX2X_STOP_ON_ERROR
|
||||||
if (pad + len > fp->rx_buf_size) {
|
if (pad + len > fp->rx_buf_size) {
|
||||||
BNX2X_ERR("skb_put is about to fail... "
|
BNX2X_ERR("skb_put is about to fail... "
|
||||||
@ -557,7 +556,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
kfree(new_data);
|
||||||
drop:
|
drop:
|
||||||
/* drop the packet and keep the buffer in the bin */
|
/* drop the packet and keep the buffer in the bin */
|
||||||
DP(NETIF_MSG_RX_STATUS,
|
DP(NETIF_MSG_RX_STATUS,
|
||||||
|
@ -946,7 +946,7 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset,
|
|||||||
|
|
||||||
flash_attr = kzalloc(sizeof(struct bfa_flash_attr), GFP_KERNEL);
|
flash_attr = kzalloc(sizeof(struct bfa_flash_attr), GFP_KERNEL);
|
||||||
if (!flash_attr)
|
if (!flash_attr)
|
||||||
return -ENOMEM;
|
return 0;
|
||||||
|
|
||||||
fcomp.bnad = bnad;
|
fcomp.bnad = bnad;
|
||||||
fcomp.comp_status = 0;
|
fcomp.comp_status = 0;
|
||||||
@ -958,7 +958,7 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset,
|
|||||||
if (ret != BFA_STATUS_OK) {
|
if (ret != BFA_STATUS_OK) {
|
||||||
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
||||||
kfree(flash_attr);
|
kfree(flash_attr);
|
||||||
goto out_err;
|
return 0;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
||||||
wait_for_completion(&fcomp.comp);
|
wait_for_completion(&fcomp.comp);
|
||||||
@ -978,8 +978,6 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset,
|
|||||||
}
|
}
|
||||||
kfree(flash_attr);
|
kfree(flash_attr);
|
||||||
return flash_part;
|
return flash_part;
|
||||||
out_err:
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1006,7 +1004,7 @@ bnad_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
|
|||||||
/* Query the flash partition based on the offset */
|
/* Query the flash partition based on the offset */
|
||||||
flash_part = bnad_get_flash_partition_by_offset(bnad,
|
flash_part = bnad_get_flash_partition_by_offset(bnad,
|
||||||
eeprom->offset, &base_offset);
|
eeprom->offset, &base_offset);
|
||||||
if (flash_part <= 0)
|
if (flash_part == 0)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
fcomp.bnad = bnad;
|
fcomp.bnad = bnad;
|
||||||
@ -1048,7 +1046,7 @@ bnad_set_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
|
|||||||
/* Query the flash partition based on the offset */
|
/* Query the flash partition based on the offset */
|
||||||
flash_part = bnad_get_flash_partition_by_offset(bnad,
|
flash_part = bnad_get_flash_partition_by_offset(bnad,
|
||||||
eeprom->offset, &base_offset);
|
eeprom->offset, &base_offset);
|
||||||
if (flash_part <= 0)
|
if (flash_part == 0)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
fcomp.bnad = bnad;
|
fcomp.bnad = bnad;
|
||||||
|
@ -716,12 +716,8 @@ static int
|
|||||||
be_do_flash(struct net_device *netdev, struct ethtool_flash *efl)
|
be_do_flash(struct net_device *netdev, struct ethtool_flash *efl)
|
||||||
{
|
{
|
||||||
struct be_adapter *adapter = netdev_priv(netdev);
|
struct be_adapter *adapter = netdev_priv(netdev);
|
||||||
char file_name[ETHTOOL_FLASH_MAX_FILENAME];
|
|
||||||
|
|
||||||
file_name[ETHTOOL_FLASH_MAX_FILENAME - 1] = 0;
|
return be_load_fw(adapter, efl->data);
|
||||||
strcpy(file_name, efl->data);
|
|
||||||
|
|
||||||
return be_load_fw(adapter, file_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -990,7 +990,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
|
|||||||
phy_id = 0;
|
phy_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
|
snprintf(phy_name, sizeof(phy_name), PHY_ID_FMT, mdio_bus_id, phy_id);
|
||||||
phy_dev = phy_connect(ndev, phy_name, &fec_enet_adjust_link, 0,
|
phy_dev = phy_connect(ndev, phy_name, &fec_enet_adjust_link, 0,
|
||||||
fep->phy_interface);
|
fep->phy_interface);
|
||||||
if (IS_ERR(phy_dev)) {
|
if (IS_ERR(phy_dev)) {
|
||||||
|
@ -4740,12 +4740,14 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
|||||||
e1000_setup_rctl(adapter);
|
e1000_setup_rctl(adapter);
|
||||||
e1000_set_rx_mode(netdev);
|
e1000_set_rx_mode(netdev);
|
||||||
|
|
||||||
|
rctl = er32(RCTL);
|
||||||
|
|
||||||
/* turn on all-multi mode if wake on multicast is enabled */
|
/* turn on all-multi mode if wake on multicast is enabled */
|
||||||
if (wufc & E1000_WUFC_MC) {
|
if (wufc & E1000_WUFC_MC)
|
||||||
rctl = er32(RCTL);
|
|
||||||
rctl |= E1000_RCTL_MPE;
|
rctl |= E1000_RCTL_MPE;
|
||||||
ew32(RCTL, rctl);
|
|
||||||
}
|
/* enable receives in the hardware */
|
||||||
|
ew32(RCTL, rctl | E1000_RCTL_EN);
|
||||||
|
|
||||||
if (hw->mac_type >= e1000_82540) {
|
if (hw->mac_type >= e1000_82540) {
|
||||||
ctrl = er32(CTRL);
|
ctrl = er32(CTRL);
|
||||||
|
@ -5012,7 +5012,8 @@ static int igb_find_enabled_vfs(struct igb_adapter *adapter)
|
|||||||
vf_devfn = pdev->devfn + 0x80;
|
vf_devfn = pdev->devfn + 0x80;
|
||||||
pvfdev = pci_get_device(hw->vendor_id, device_id, NULL);
|
pvfdev = pci_get_device(hw->vendor_id, device_id, NULL);
|
||||||
while (pvfdev) {
|
while (pvfdev) {
|
||||||
if (pvfdev->devfn == vf_devfn)
|
if (pvfdev->devfn == vf_devfn &&
|
||||||
|
(pvfdev->bus->number >= pdev->bus->number))
|
||||||
vfs_found++;
|
vfs_found++;
|
||||||
vf_devfn += vf_stride;
|
vf_devfn += vf_stride;
|
||||||
pvfdev = pci_get_device(hw->vendor_id,
|
pvfdev = pci_get_device(hw->vendor_id,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Intel(R) 82576 Virtual Function Linux driver
|
# Intel(R) 82576 Virtual Function Linux driver
|
||||||
# Copyright(c) 2009 - 2010 Intel Corporation.
|
# Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms and conditions of the GNU General Public License,
|
# under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -53,7 +53,7 @@ const char igbvf_driver_version[] = DRV_VERSION;
|
|||||||
static const char igbvf_driver_string[] =
|
static const char igbvf_driver_string[] =
|
||||||
"Intel(R) Gigabit Virtual Function Network Driver";
|
"Intel(R) Gigabit Virtual Function Network Driver";
|
||||||
static const char igbvf_copyright[] =
|
static const char igbvf_copyright[] =
|
||||||
"Copyright (c) 2009 - 2011 Intel Corporation.";
|
"Copyright (c) 2009 - 2012 Intel Corporation.";
|
||||||
|
|
||||||
static int igbvf_poll(struct napi_struct *napi, int budget);
|
static int igbvf_poll(struct napi_struct *napi, int budget);
|
||||||
static void igbvf_reset(struct igbvf_adapter *);
|
static void igbvf_reset(struct igbvf_adapter *);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel(R) 82576 Virtual Function Linux driver
|
Intel(R) 82576 Virtual Function Linux driver
|
||||||
Copyright(c) 2009 - 2010 Intel Corporation.
|
Copyright(c) 2009 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Intel 10 Gigabit PCI Express Linux driver
|
# Intel 10 Gigabit PCI Express Linux driver
|
||||||
# Copyright(c) 1999 - 2010 Intel Corporation.
|
# Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms and conditions of the GNU General Public License,
|
# under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -75,7 +75,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw,
|
|||||||
s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
|
s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
|
||||||
s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
|
s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
|
||||||
s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
|
s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
|
||||||
s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packtetbuf_num);
|
s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packetbuf_num);
|
||||||
s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw);
|
s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw);
|
||||||
|
|
||||||
s32 ixgbe_validate_mac_addr(u8 *mac_addr);
|
s32 ixgbe_validate_mac_addr(u8 *mac_addr);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -112,6 +112,8 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev)
|
|||||||
static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
|
static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
|
||||||
{
|
{
|
||||||
u8 err = 0;
|
u8 err = 0;
|
||||||
|
u8 prio_tc[MAX_USER_PRIORITY] = {0};
|
||||||
|
int i;
|
||||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||||
|
|
||||||
/* Fail command if not in CEE mode */
|
/* Fail command if not in CEE mode */
|
||||||
@ -122,10 +124,15 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
|
|||||||
if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
|
if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (state > 0)
|
if (state > 0) {
|
||||||
err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs);
|
err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs);
|
||||||
else
|
ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc);
|
||||||
|
} else {
|
||||||
err = ixgbe_setup_tc(netdev, 0);
|
err = ixgbe_setup_tc(netdev, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++)
|
||||||
|
netdev_set_prio_tc_map(netdev, i, prio_tc[i]);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -58,7 +58,7 @@ struct ixgbe_stats {
|
|||||||
sizeof(((struct rtnl_link_stats64 *)0)->m), \
|
sizeof(((struct rtnl_link_stats64 *)0)->m), \
|
||||||
offsetof(struct rtnl_link_stats64, m)
|
offsetof(struct rtnl_link_stats64, m)
|
||||||
|
|
||||||
static struct ixgbe_stats ixgbe_gstrings_stats[] = {
|
static const struct ixgbe_stats ixgbe_gstrings_stats[] = {
|
||||||
{"rx_packets", IXGBE_NETDEV_STAT(rx_packets)},
|
{"rx_packets", IXGBE_NETDEV_STAT(rx_packets)},
|
||||||
{"tx_packets", IXGBE_NETDEV_STAT(tx_packets)},
|
{"tx_packets", IXGBE_NETDEV_STAT(tx_packets)},
|
||||||
{"rx_bytes", IXGBE_NETDEV_STAT(rx_bytes)},
|
{"rx_bytes", IXGBE_NETDEV_STAT(rx_bytes)},
|
||||||
@ -120,19 +120,23 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = {
|
|||||||
#endif /* IXGBE_FCOE */
|
#endif /* IXGBE_FCOE */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IXGBE_QUEUE_STATS_LEN \
|
/* ixgbe allocates num_tx_queues and num_rx_queues symmetrically so
|
||||||
((((struct ixgbe_adapter *)netdev_priv(netdev))->num_tx_queues + \
|
* we set the num_rx_queues to evaluate to num_tx_queues. This is
|
||||||
((struct ixgbe_adapter *)netdev_priv(netdev))->num_rx_queues) * \
|
* used because we do not have a good way to get the max number of
|
||||||
|
* rx queues with CONFIG_RPS disabled.
|
||||||
|
*/
|
||||||
|
#define IXGBE_NUM_RX_QUEUES netdev->num_tx_queues
|
||||||
|
|
||||||
|
#define IXGBE_QUEUE_STATS_LEN ( \
|
||||||
|
(netdev->num_tx_queues + IXGBE_NUM_RX_QUEUES) * \
|
||||||
(sizeof(struct ixgbe_queue_stats) / sizeof(u64)))
|
(sizeof(struct ixgbe_queue_stats) / sizeof(u64)))
|
||||||
#define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats)
|
#define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats)
|
||||||
#define IXGBE_PB_STATS_LEN ( \
|
#define IXGBE_PB_STATS_LEN ( \
|
||||||
(((struct ixgbe_adapter *)netdev_priv(netdev))->flags & \
|
(sizeof(((struct ixgbe_adapter *)0)->stats.pxonrxc) + \
|
||||||
IXGBE_FLAG_DCB_ENABLED) ? \
|
sizeof(((struct ixgbe_adapter *)0)->stats.pxontxc) + \
|
||||||
(sizeof(((struct ixgbe_adapter *)0)->stats.pxonrxc) + \
|
sizeof(((struct ixgbe_adapter *)0)->stats.pxoffrxc) + \
|
||||||
sizeof(((struct ixgbe_adapter *)0)->stats.pxontxc) + \
|
sizeof(((struct ixgbe_adapter *)0)->stats.pxofftxc)) \
|
||||||
sizeof(((struct ixgbe_adapter *)0)->stats.pxoffrxc) + \
|
/ sizeof(u64))
|
||||||
sizeof(((struct ixgbe_adapter *)0)->stats.pxofftxc)) \
|
|
||||||
/ sizeof(u64) : 0)
|
|
||||||
#define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + \
|
#define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + \
|
||||||
IXGBE_PB_STATS_LEN + \
|
IXGBE_PB_STATS_LEN + \
|
||||||
IXGBE_QUEUE_STATS_LEN)
|
IXGBE_QUEUE_STATS_LEN)
|
||||||
@ -1078,8 +1082,15 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
|
|||||||
data[i] = (ixgbe_gstrings_stats[i].sizeof_stat ==
|
data[i] = (ixgbe_gstrings_stats[i].sizeof_stat ==
|
||||||
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
|
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
|
||||||
}
|
}
|
||||||
for (j = 0; j < adapter->num_tx_queues; j++) {
|
for (j = 0; j < IXGBE_NUM_RX_QUEUES; j++) {
|
||||||
ring = adapter->tx_ring[j];
|
ring = adapter->tx_ring[j];
|
||||||
|
if (!ring) {
|
||||||
|
data[i] = 0;
|
||||||
|
data[i+1] = 0;
|
||||||
|
i += 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
start = u64_stats_fetch_begin_bh(&ring->syncp);
|
start = u64_stats_fetch_begin_bh(&ring->syncp);
|
||||||
data[i] = ring->stats.packets;
|
data[i] = ring->stats.packets;
|
||||||
@ -1087,8 +1098,15 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
|
|||||||
} while (u64_stats_fetch_retry_bh(&ring->syncp, start));
|
} while (u64_stats_fetch_retry_bh(&ring->syncp, start));
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
for (j = 0; j < adapter->num_rx_queues; j++) {
|
for (j = 0; j < IXGBE_NUM_RX_QUEUES; j++) {
|
||||||
ring = adapter->rx_ring[j];
|
ring = adapter->rx_ring[j];
|
||||||
|
if (!ring) {
|
||||||
|
data[i] = 0;
|
||||||
|
data[i+1] = 0;
|
||||||
|
i += 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
start = u64_stats_fetch_begin_bh(&ring->syncp);
|
start = u64_stats_fetch_begin_bh(&ring->syncp);
|
||||||
data[i] = ring->stats.packets;
|
data[i] = ring->stats.packets;
|
||||||
@ -1096,22 +1114,20 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
|
|||||||
} while (u64_stats_fetch_retry_bh(&ring->syncp, start));
|
} while (u64_stats_fetch_retry_bh(&ring->syncp, start));
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
|
|
||||||
for (j = 0; j < MAX_TX_PACKET_BUFFERS; j++) {
|
for (j = 0; j < IXGBE_MAX_PACKET_BUFFERS; j++) {
|
||||||
data[i++] = adapter->stats.pxontxc[j];
|
data[i++] = adapter->stats.pxontxc[j];
|
||||||
data[i++] = adapter->stats.pxofftxc[j];
|
data[i++] = adapter->stats.pxofftxc[j];
|
||||||
}
|
}
|
||||||
for (j = 0; j < MAX_RX_PACKET_BUFFERS; j++) {
|
for (j = 0; j < IXGBE_MAX_PACKET_BUFFERS; j++) {
|
||||||
data[i++] = adapter->stats.pxonrxc[j];
|
data[i++] = adapter->stats.pxonrxc[j];
|
||||||
data[i++] = adapter->stats.pxoffrxc[j];
|
data[i++] = adapter->stats.pxoffrxc[j];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
|
static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
|
||||||
u8 *data)
|
u8 *data)
|
||||||
{
|
{
|
||||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
|
||||||
char *p = (char *)data;
|
char *p = (char *)data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1126,31 +1142,29 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
|
|||||||
ETH_GSTRING_LEN);
|
ETH_GSTRING_LEN);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
}
|
}
|
||||||
for (i = 0; i < adapter->num_tx_queues; i++) {
|
for (i = 0; i < netdev->num_tx_queues; i++) {
|
||||||
sprintf(p, "tx_queue_%u_packets", i);
|
sprintf(p, "tx_queue_%u_packets", i);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
sprintf(p, "tx_queue_%u_bytes", i);
|
sprintf(p, "tx_queue_%u_bytes", i);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
}
|
}
|
||||||
for (i = 0; i < adapter->num_rx_queues; i++) {
|
for (i = 0; i < IXGBE_NUM_RX_QUEUES; i++) {
|
||||||
sprintf(p, "rx_queue_%u_packets", i);
|
sprintf(p, "rx_queue_%u_packets", i);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
sprintf(p, "rx_queue_%u_bytes", i);
|
sprintf(p, "rx_queue_%u_bytes", i);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
}
|
}
|
||||||
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
|
for (i = 0; i < IXGBE_MAX_PACKET_BUFFERS; i++) {
|
||||||
for (i = 0; i < MAX_TX_PACKET_BUFFERS; i++) {
|
sprintf(p, "tx_pb_%u_pxon", i);
|
||||||
sprintf(p, "tx_pb_%u_pxon", i);
|
p += ETH_GSTRING_LEN;
|
||||||
p += ETH_GSTRING_LEN;
|
sprintf(p, "tx_pb_%u_pxoff", i);
|
||||||
sprintf(p, "tx_pb_%u_pxoff", i);
|
p += ETH_GSTRING_LEN;
|
||||||
p += ETH_GSTRING_LEN;
|
}
|
||||||
}
|
for (i = 0; i < IXGBE_MAX_PACKET_BUFFERS; i++) {
|
||||||
for (i = 0; i < MAX_RX_PACKET_BUFFERS; i++) {
|
sprintf(p, "rx_pb_%u_pxon", i);
|
||||||
sprintf(p, "rx_pb_%u_pxon", i);
|
p += ETH_GSTRING_LEN;
|
||||||
p += ETH_GSTRING_LEN;
|
sprintf(p, "rx_pb_%u_pxoff", i);
|
||||||
sprintf(p, "rx_pb_%u_pxoff", i);
|
p += ETH_GSTRING_LEN;
|
||||||
p += ETH_GSTRING_LEN;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */
|
/* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */
|
||||||
break;
|
break;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -64,7 +64,7 @@ char ixgbe_default_device_descr[] =
|
|||||||
__stringify(BUILD) "-k"
|
__stringify(BUILD) "-k"
|
||||||
const char ixgbe_driver_version[] = DRV_VERSION;
|
const char ixgbe_driver_version[] = DRV_VERSION;
|
||||||
static const char ixgbe_copyright[] =
|
static const char ixgbe_copyright[] =
|
||||||
"Copyright (c) 1999-2011 Intel Corporation.";
|
"Copyright (c) 1999-2012 Intel Corporation.";
|
||||||
|
|
||||||
static const struct ixgbe_info *ixgbe_info_tbl[] = {
|
static const struct ixgbe_info *ixgbe_info_tbl[] = {
|
||||||
[board_82598] = &ixgbe_82598_info,
|
[board_82598] = &ixgbe_82598_info,
|
||||||
@ -2633,22 +2633,22 @@ static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter,
|
|||||||
/*
|
/*
|
||||||
* we must limit the number of descriptors so that the
|
* we must limit the number of descriptors so that the
|
||||||
* total size of max desc * buf_len is not greater
|
* total size of max desc * buf_len is not greater
|
||||||
* than 65535
|
* than 65536
|
||||||
*/
|
*/
|
||||||
if (ring_is_ps_enabled(ring)) {
|
if (ring_is_ps_enabled(ring)) {
|
||||||
#if (MAX_SKB_FRAGS > 16)
|
#if (PAGE_SIZE < 8192)
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_16;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_16;
|
||||||
#elif (MAX_SKB_FRAGS > 8)
|
#elif (PAGE_SIZE < 16384)
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_8;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_8;
|
||||||
#elif (MAX_SKB_FRAGS > 4)
|
#elif (PAGE_SIZE < 32768)
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_4;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_4;
|
||||||
#else
|
#else
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_1;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_1;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (rx_buf_len < IXGBE_RXBUFFER_4K)
|
if (rx_buf_len <= IXGBE_RXBUFFER_4K)
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_16;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_16;
|
||||||
else if (rx_buf_len < IXGBE_RXBUFFER_8K)
|
else if (rx_buf_len <= IXGBE_RXBUFFER_8K)
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_8;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_8;
|
||||||
else
|
else
|
||||||
rscctrl |= IXGBE_RSCCTL_MAXDESC_4;
|
rscctrl |= IXGBE_RSCCTL_MAXDESC_4;
|
||||||
@ -2830,7 +2830,7 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
|
|||||||
IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl | vt_reg_bits);
|
IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl | vt_reg_bits);
|
||||||
|
|
||||||
vf_shift = adapter->num_vfs % 32;
|
vf_shift = adapter->num_vfs % 32;
|
||||||
reg_offset = (adapter->num_vfs > 32) ? 1 : 0;
|
reg_offset = (adapter->num_vfs >= 32) ? 1 : 0;
|
||||||
|
|
||||||
/* Enable only the PF's pool for Tx/Rx */
|
/* Enable only the PF's pool for Tx/Rx */
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift));
|
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift));
|
||||||
@ -4330,6 +4330,10 @@ static int ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
|
|||||||
adapter->num_tx_queues = 1;
|
adapter->num_tx_queues = 1;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
if ((adapter->netdev->reg_state == NETREG_UNREGISTERED) ||
|
||||||
|
(adapter->netdev->reg_state == NETREG_UNREGISTERING))
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Notify the stack of the (possibly) reduced queue counts. */
|
/* Notify the stack of the (possibly) reduced queue counts. */
|
||||||
netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
|
netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
|
||||||
return netif_set_real_num_rx_queues(adapter->netdev,
|
return netif_set_real_num_rx_queues(adapter->netdev,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -67,7 +67,8 @@ static int ixgbe_find_enabled_vfs(struct ixgbe_adapter *adapter)
|
|||||||
vf_devfn = pdev->devfn + 0x80;
|
vf_devfn = pdev->devfn + 0x80;
|
||||||
pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, device_id, NULL);
|
pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, device_id, NULL);
|
||||||
while (pvfdev) {
|
while (pvfdev) {
|
||||||
if (pvfdev->devfn == vf_devfn)
|
if (pvfdev->devfn == vf_devfn &&
|
||||||
|
(pvfdev->bus->number >= pdev->bus->number))
|
||||||
vfs_found++;
|
vfs_found++;
|
||||||
vf_devfn += 2;
|
vf_devfn += 2;
|
||||||
pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID,
|
pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID,
|
||||||
@ -646,6 +647,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
|
|||||||
ixgbe_ndo_set_vf_spoofchk(adapter->netdev, vf, false);
|
ixgbe_ndo_set_vf_spoofchk(adapter->netdev, vf, false);
|
||||||
retval = ixgbe_set_vf_macvlan(adapter, vf, index,
|
retval = ixgbe_set_vf_macvlan(adapter, vf, index,
|
||||||
(unsigned char *)(&msgbuf[1]));
|
(unsigned char *)(&msgbuf[1]));
|
||||||
|
if (retval == -ENOSPC)
|
||||||
|
e_warn(drv, "VF %d has requested a MACVLAN filter "
|
||||||
|
"but there is no space for it\n", vf);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);
|
e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 10 Gigabit PCI Express Linux driver
|
Intel 10 Gigabit PCI Express Linux driver
|
||||||
Copyright(c) 1999 - 2011 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Intel 82599 Virtual Function driver
|
# Intel 82599 Virtual Function driver
|
||||||
# Copyright(c) 1999 - 2010 Intel Corporation.
|
# Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms and conditions of the GNU General Public License,
|
# under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2009 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -60,7 +60,7 @@ static const char ixgbevf_driver_string[] =
|
|||||||
#define DRV_VERSION "2.2.0-k"
|
#define DRV_VERSION "2.2.0-k"
|
||||||
const char ixgbevf_driver_version[] = DRV_VERSION;
|
const char ixgbevf_driver_version[] = DRV_VERSION;
|
||||||
static char ixgbevf_copyright[] =
|
static char ixgbevf_copyright[] =
|
||||||
"Copyright (c) 2009 - 2010 Intel Corporation.";
|
"Copyright (c) 2009 - 2012 Intel Corporation.";
|
||||||
|
|
||||||
static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
|
static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
|
||||||
[board_82599_vf] = &ixgbevf_82599_vf_info,
|
[board_82599_vf] = &ixgbevf_82599_vf_info,
|
||||||
@ -935,7 +935,11 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data)
|
|||||||
if (msg & IXGBE_VT_MSGTYPE_NACK)
|
if (msg & IXGBE_VT_MSGTYPE_NACK)
|
||||||
pr_warn("Last Request of type %2.2x to PF Nacked\n",
|
pr_warn("Last Request of type %2.2x to PF Nacked\n",
|
||||||
msg & 0xFF);
|
msg & 0xFF);
|
||||||
goto out;
|
/*
|
||||||
|
* Restore the PFSTS bit in case someone is polling for a
|
||||||
|
* return message from the PF
|
||||||
|
*/
|
||||||
|
hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFSTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -945,7 +949,7 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data)
|
|||||||
*/
|
*/
|
||||||
if (got_ack)
|
if (got_ack)
|
||||||
hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK;
|
hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK;
|
||||||
out:
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
@ -283,6 +283,17 @@ static s32 ixgbevf_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr,
|
|||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ixgbevf_write_msg_read_ack(struct ixgbe_hw *hw,
|
||||||
|
u32 *msg, u16 size)
|
||||||
|
{
|
||||||
|
struct ixgbe_mbx_info *mbx = &hw->mbx;
|
||||||
|
u32 retmsg[IXGBE_VFMAILBOX_SIZE];
|
||||||
|
s32 retval = mbx->ops.write_posted(hw, msg, size);
|
||||||
|
|
||||||
|
if (!retval)
|
||||||
|
mbx->ops.read_posted(hw, retmsg, size);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ixgbevf_update_mc_addr_list_vf - Update Multicast addresses
|
* ixgbevf_update_mc_addr_list_vf - Update Multicast addresses
|
||||||
* @hw: pointer to the HW structure
|
* @hw: pointer to the HW structure
|
||||||
@ -294,7 +305,6 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
|
|||||||
struct net_device *netdev)
|
struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct netdev_hw_addr *ha;
|
struct netdev_hw_addr *ha;
|
||||||
struct ixgbe_mbx_info *mbx = &hw->mbx;
|
|
||||||
u32 msgbuf[IXGBE_VFMAILBOX_SIZE];
|
u32 msgbuf[IXGBE_VFMAILBOX_SIZE];
|
||||||
u16 *vector_list = (u16 *)&msgbuf[1];
|
u16 *vector_list = (u16 *)&msgbuf[1];
|
||||||
u32 cnt, i;
|
u32 cnt, i;
|
||||||
@ -321,7 +331,7 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
|
|||||||
vector_list[i++] = ixgbevf_mta_vector(hw, ha->addr);
|
vector_list[i++] = ixgbevf_mta_vector(hw, ha->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE);
|
ixgbevf_write_msg_read_ack(hw, msgbuf, IXGBE_VFMAILBOX_SIZE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -336,7 +346,6 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
|
|||||||
static s32 ixgbevf_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind,
|
static s32 ixgbevf_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind,
|
||||||
bool vlan_on)
|
bool vlan_on)
|
||||||
{
|
{
|
||||||
struct ixgbe_mbx_info *mbx = &hw->mbx;
|
|
||||||
u32 msgbuf[2];
|
u32 msgbuf[2];
|
||||||
|
|
||||||
msgbuf[0] = IXGBE_VF_SET_VLAN;
|
msgbuf[0] = IXGBE_VF_SET_VLAN;
|
||||||
@ -344,7 +353,9 @@ static s32 ixgbevf_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind,
|
|||||||
/* Setting the 8 bit field MSG INFO to TRUE indicates "add" */
|
/* Setting the 8 bit field MSG INFO to TRUE indicates "add" */
|
||||||
msgbuf[0] |= vlan_on << IXGBE_VT_MSGINFO_SHIFT;
|
msgbuf[0] |= vlan_on << IXGBE_VT_MSGINFO_SHIFT;
|
||||||
|
|
||||||
return mbx->ops.write_posted(hw, msgbuf, 2);
|
ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Intel 82599 Virtual Function driver
|
Intel 82599 Virtual Function driver
|
||||||
Copyright(c) 1999 - 2010 Intel Corporation.
|
Copyright(c) 1999 - 2012 Intel Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -931,20 +931,17 @@ static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u32 base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate and setup a new buffer for receiving */
|
/* Allocate and setup a new buffer for receiving */
|
||||||
static int skge_rx_setup(struct pci_dev *pdev,
|
static void skge_rx_setup(struct skge_port *skge, struct skge_element *e,
|
||||||
struct skge_element *e,
|
struct sk_buff *skb, unsigned int bufsize)
|
||||||
struct sk_buff *skb, unsigned int bufsize)
|
|
||||||
{
|
{
|
||||||
struct skge_rx_desc *rd = e->desc;
|
struct skge_rx_desc *rd = e->desc;
|
||||||
dma_addr_t map;
|
u64 map;
|
||||||
|
|
||||||
map = pci_map_single(pdev, skb->data, bufsize,
|
map = pci_map_single(skge->hw->pdev, skb->data, bufsize,
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
if (pci_dma_mapping_error(pdev, map))
|
|
||||||
goto mapping_error;
|
|
||||||
|
|
||||||
rd->dma_lo = lower_32_bits(map);
|
rd->dma_lo = map;
|
||||||
rd->dma_hi = upper_32_bits(map);
|
rd->dma_hi = map >> 32;
|
||||||
e->skb = skb;
|
e->skb = skb;
|
||||||
rd->csum1_start = ETH_HLEN;
|
rd->csum1_start = ETH_HLEN;
|
||||||
rd->csum2_start = ETH_HLEN;
|
rd->csum2_start = ETH_HLEN;
|
||||||
@ -956,13 +953,6 @@ static int skge_rx_setup(struct pci_dev *pdev,
|
|||||||
rd->control = BMU_OWN | BMU_STF | BMU_IRQ_EOF | BMU_TCP_CHECK | bufsize;
|
rd->control = BMU_OWN | BMU_STF | BMU_IRQ_EOF | BMU_TCP_CHECK | bufsize;
|
||||||
dma_unmap_addr_set(e, mapaddr, map);
|
dma_unmap_addr_set(e, mapaddr, map);
|
||||||
dma_unmap_len_set(e, maplen, bufsize);
|
dma_unmap_len_set(e, maplen, bufsize);
|
||||||
return 0;
|
|
||||||
|
|
||||||
mapping_error:
|
|
||||||
if (net_ratelimit())
|
|
||||||
dev_warn(&pdev->dev, "%s: rx mapping error\n",
|
|
||||||
skb->dev->name);
|
|
||||||
return -EIO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resume receiving using existing skb,
|
/* Resume receiving using existing skb,
|
||||||
@ -1024,11 +1014,7 @@ static int skge_rx_fill(struct net_device *dev)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
skb_reserve(skb, NET_IP_ALIGN);
|
skb_reserve(skb, NET_IP_ALIGN);
|
||||||
if (skge_rx_setup(skge->hw->pdev, e, skb, skge->rx_buf_size)) {
|
skge_rx_setup(skge, e, skb, skge->rx_buf_size);
|
||||||
kfree_skb(skb);
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while ((e = e->next) != ring->start);
|
} while ((e = e->next) != ring->start);
|
||||||
|
|
||||||
ring->to_clean = ring->start;
|
ring->to_clean = ring->start;
|
||||||
@ -2743,7 +2729,7 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
|
|||||||
struct skge_tx_desc *td;
|
struct skge_tx_desc *td;
|
||||||
int i;
|
int i;
|
||||||
u32 control, len;
|
u32 control, len;
|
||||||
dma_addr_t map;
|
u64 map;
|
||||||
|
|
||||||
if (skb_padto(skb, ETH_ZLEN))
|
if (skb_padto(skb, ETH_ZLEN))
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
@ -2757,14 +2743,11 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
|
|||||||
e->skb = skb;
|
e->skb = skb;
|
||||||
len = skb_headlen(skb);
|
len = skb_headlen(skb);
|
||||||
map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE);
|
map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE);
|
||||||
if (pci_dma_mapping_error(hw->pdev, map))
|
|
||||||
goto mapping_error;
|
|
||||||
|
|
||||||
dma_unmap_addr_set(e, mapaddr, map);
|
dma_unmap_addr_set(e, mapaddr, map);
|
||||||
dma_unmap_len_set(e, maplen, len);
|
dma_unmap_len_set(e, maplen, len);
|
||||||
|
|
||||||
td->dma_lo = lower_32_bits(map);
|
td->dma_lo = map;
|
||||||
td->dma_hi = upper_32_bits(map);
|
td->dma_hi = map >> 32;
|
||||||
|
|
||||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||||
const int offset = skb_checksum_start_offset(skb);
|
const int offset = skb_checksum_start_offset(skb);
|
||||||
@ -2795,16 +2778,14 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
|
|||||||
|
|
||||||
map = skb_frag_dma_map(&hw->pdev->dev, frag, 0,
|
map = skb_frag_dma_map(&hw->pdev->dev, frag, 0,
|
||||||
skb_frag_size(frag), DMA_TO_DEVICE);
|
skb_frag_size(frag), DMA_TO_DEVICE);
|
||||||
if (dma_mapping_error(&hw->pdev->dev, map))
|
|
||||||
goto mapping_unwind;
|
|
||||||
|
|
||||||
e = e->next;
|
e = e->next;
|
||||||
e->skb = skb;
|
e->skb = skb;
|
||||||
tf = e->desc;
|
tf = e->desc;
|
||||||
BUG_ON(tf->control & BMU_OWN);
|
BUG_ON(tf->control & BMU_OWN);
|
||||||
|
|
||||||
tf->dma_lo = lower_32_bits(map);
|
tf->dma_lo = map;
|
||||||
tf->dma_hi = upper_32_bits(map);
|
tf->dma_hi = (u64) map >> 32;
|
||||||
dma_unmap_addr_set(e, mapaddr, map);
|
dma_unmap_addr_set(e, mapaddr, map);
|
||||||
dma_unmap_len_set(e, maplen, skb_frag_size(frag));
|
dma_unmap_len_set(e, maplen, skb_frag_size(frag));
|
||||||
|
|
||||||
@ -2834,28 +2815,6 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
|
||||||
mapping_unwind:
|
|
||||||
/* unroll any pages that were already mapped. */
|
|
||||||
if (e != skge->tx_ring.to_use) {
|
|
||||||
struct skge_element *u;
|
|
||||||
|
|
||||||
for (u = skge->tx_ring.to_use->next; u != e; u = u->next)
|
|
||||||
pci_unmap_page(hw->pdev, dma_unmap_addr(u, mapaddr),
|
|
||||||
dma_unmap_len(u, maplen),
|
|
||||||
PCI_DMA_TODEVICE);
|
|
||||||
e = skge->tx_ring.to_use;
|
|
||||||
}
|
|
||||||
/* undo the mapping for the skb header */
|
|
||||||
pci_unmap_single(hw->pdev, dma_unmap_addr(e, mapaddr),
|
|
||||||
dma_unmap_len(e, maplen),
|
|
||||||
PCI_DMA_TODEVICE);
|
|
||||||
mapping_error:
|
|
||||||
/* mapping error causes error message and packet to be discarded. */
|
|
||||||
if (net_ratelimit())
|
|
||||||
dev_warn(&hw->pdev->dev, "%s: tx mapping error\n", dev->name);
|
|
||||||
dev_kfree_skb(skb);
|
|
||||||
return NETDEV_TX_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3099,17 +3058,13 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
|
|||||||
if (!nskb)
|
if (!nskb)
|
||||||
goto resubmit;
|
goto resubmit;
|
||||||
|
|
||||||
if (unlikely(skge_rx_setup(skge->hw->pdev, e, nskb, skge->rx_buf_size))) {
|
|
||||||
dev_kfree_skb(nskb);
|
|
||||||
goto resubmit;
|
|
||||||
}
|
|
||||||
|
|
||||||
pci_unmap_single(skge->hw->pdev,
|
pci_unmap_single(skge->hw->pdev,
|
||||||
dma_unmap_addr(e, mapaddr),
|
dma_unmap_addr(e, mapaddr),
|
||||||
dma_unmap_len(e, maplen),
|
dma_unmap_len(e, maplen),
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
skb = e->skb;
|
skb = e->skb;
|
||||||
prefetch(skb->data);
|
prefetch(skb->data);
|
||||||
|
skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_put(skb, len);
|
skb_put(skb, len);
|
||||||
|
@ -1616,12 +1616,12 @@ void mlx4_multi_func_cleanup(struct mlx4_dev *dev)
|
|||||||
kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]);
|
kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]);
|
||||||
}
|
}
|
||||||
kfree(priv->mfunc.master.slave_state);
|
kfree(priv->mfunc.master.slave_state);
|
||||||
iounmap(priv->mfunc.comm);
|
|
||||||
dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE,
|
|
||||||
priv->mfunc.vhcr,
|
|
||||||
priv->mfunc.vhcr_dma);
|
|
||||||
priv->mfunc.vhcr = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iounmap(priv->mfunc.comm);
|
||||||
|
dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE,
|
||||||
|
priv->mfunc.vhcr, priv->mfunc.vhcr_dma);
|
||||||
|
priv->mfunc.vhcr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlx4_cmd_cleanup(struct mlx4_dev *dev)
|
void mlx4_cmd_cleanup(struct mlx4_dev *dev)
|
||||||
|
@ -892,7 +892,8 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv)
|
|||||||
|
|
||||||
for (i = 0; i < priv->rx_ring_num; i++) {
|
for (i = 0; i < priv->rx_ring_num; i++) {
|
||||||
if (priv->rx_ring[i].rx_info)
|
if (priv->rx_ring[i].rx_info)
|
||||||
mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i]);
|
mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i],
|
||||||
|
priv->prof->rx_ring_size, priv->stride);
|
||||||
if (priv->rx_cq[i].buf)
|
if (priv->rx_cq[i].buf)
|
||||||
mlx4_en_destroy_cq(priv, &priv->rx_cq[i]);
|
mlx4_en_destroy_cq(priv, &priv->rx_cq[i]);
|
||||||
}
|
}
|
||||||
|
@ -168,8 +168,12 @@ static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
while (i--)
|
while (i--) {
|
||||||
|
dma_addr_t dma = be64_to_cpu(rx_desc->data[i].addr);
|
||||||
|
pci_unmap_single(priv->mdev->pdev, dma, skb_frags[i].size,
|
||||||
|
PCI_DMA_FROMDEVICE);
|
||||||
put_page(skb_frags[i].page);
|
put_page(skb_frags[i].page);
|
||||||
|
}
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,12 +384,12 @@ err_allocator:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
|
void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
|
||||||
struct mlx4_en_rx_ring *ring)
|
struct mlx4_en_rx_ring *ring, u32 size, u16 stride)
|
||||||
{
|
{
|
||||||
struct mlx4_en_dev *mdev = priv->mdev;
|
struct mlx4_en_dev *mdev = priv->mdev;
|
||||||
|
|
||||||
mlx4_en_unmap_buffer(&ring->wqres.buf);
|
mlx4_en_unmap_buffer(&ring->wqres.buf);
|
||||||
mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size + TXBB_SIZE);
|
mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * stride + TXBB_SIZE);
|
||||||
vfree(ring->rx_info);
|
vfree(ring->rx_info);
|
||||||
ring->rx_info = NULL;
|
ring->rx_info = NULL;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 port,
|
|||||||
u32 prot;
|
u32 prot;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
new_entry = kzalloc(sizeof *new_entry, GFP_KERNEL);
|
new_entry = kzalloc(sizeof *new_entry, GFP_KERNEL);
|
||||||
if (!new_entry)
|
if (!new_entry)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -220,7 +220,7 @@ static int existing_steering_entry(struct mlx4_dev *dev, u8 port,
|
|||||||
struct mlx4_promisc_qp *pqp;
|
struct mlx4_promisc_qp *pqp;
|
||||||
struct mlx4_promisc_qp *dqp;
|
struct mlx4_promisc_qp *dqp;
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
|
|
||||||
pqp = get_promisc_qp(dev, 0, steer, qpn);
|
pqp = get_promisc_qp(dev, 0, steer, qpn);
|
||||||
if (!pqp)
|
if (!pqp)
|
||||||
@ -265,7 +265,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
|
|||||||
struct mlx4_steer_index *tmp_entry, *entry = NULL;
|
struct mlx4_steer_index *tmp_entry, *entry = NULL;
|
||||||
struct mlx4_promisc_qp *dqp, *tmp_dqp;
|
struct mlx4_promisc_qp *dqp, *tmp_dqp;
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
|
|
||||||
/* if qp is not promisc, it cannot be duplicated */
|
/* if qp is not promisc, it cannot be duplicated */
|
||||||
if (!get_promisc_qp(dev, 0, steer, qpn))
|
if (!get_promisc_qp(dev, 0, steer, qpn))
|
||||||
@ -306,7 +306,7 @@ static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
|
|||||||
bool ret = false;
|
bool ret = false;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
|
|
||||||
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
||||||
if (IS_ERR(mailbox))
|
if (IS_ERR(mailbox))
|
||||||
@ -361,7 +361,7 @@ static int add_promisc_qp(struct mlx4_dev *dev, u8 port,
|
|||||||
int err;
|
int err;
|
||||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
|
|
||||||
mutex_lock(&priv->mcg_table.mutex);
|
mutex_lock(&priv->mcg_table.mutex);
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 port,
|
|||||||
int loc, i;
|
int loc, i;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
s_steer = &mlx4_priv(dev)->steer[0];
|
s_steer = &mlx4_priv(dev)->steer[port - 1];
|
||||||
mutex_lock(&priv->mcg_table.mutex);
|
mutex_lock(&priv->mcg_table.mutex);
|
||||||
|
|
||||||
pqp = get_promisc_qp(dev, 0, steer, qpn);
|
pqp = get_promisc_qp(dev, 0, steer, qpn);
|
||||||
@ -1004,7 +1004,7 @@ EXPORT_SYMBOL_GPL(mlx4_multicast_promisc_remove);
|
|||||||
|
|
||||||
int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port)
|
int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port)
|
||||||
{
|
{
|
||||||
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER))
|
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (mlx4_is_mfunc(dev))
|
if (mlx4_is_mfunc(dev))
|
||||||
@ -1016,7 +1016,7 @@ EXPORT_SYMBOL_GPL(mlx4_unicast_promisc_add);
|
|||||||
|
|
||||||
int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port)
|
int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port)
|
||||||
{
|
{
|
||||||
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER))
|
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (mlx4_is_mfunc(dev))
|
if (mlx4_is_mfunc(dev))
|
||||||
|
@ -528,7 +528,8 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
|
|||||||
struct mlx4_en_rx_ring *ring,
|
struct mlx4_en_rx_ring *ring,
|
||||||
u32 size, u16 stride);
|
u32 size, u16 stride);
|
||||||
void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
|
void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
|
||||||
struct mlx4_en_rx_ring *ring);
|
struct mlx4_en_rx_ring *ring,
|
||||||
|
u32 size, u16 stride);
|
||||||
int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv);
|
int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv);
|
||||||
void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
|
void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
|
||||||
struct mlx4_en_rx_ring *ring);
|
struct mlx4_en_rx_ring *ring);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
|
#include <linux/if_vlan.h>
|
||||||
#include <linux/sh_eth.h>
|
#include <linux/sh_eth.h>
|
||||||
|
|
||||||
#include "sh_eth.h"
|
#include "sh_eth.h"
|
||||||
@ -817,7 +818,8 @@ static int sh_eth_dev_init(struct net_device *ndev)
|
|||||||
sh_eth_write(ndev, 0, TRIMD);
|
sh_eth_write(ndev, 0, TRIMD);
|
||||||
|
|
||||||
/* Recv frame limit set register */
|
/* Recv frame limit set register */
|
||||||
sh_eth_write(ndev, RFLR_VALUE, RFLR);
|
sh_eth_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN,
|
||||||
|
RFLR);
|
||||||
|
|
||||||
sh_eth_write(ndev, sh_eth_read(ndev, EESR), EESR);
|
sh_eth_write(ndev, sh_eth_read(ndev, EESR), EESR);
|
||||||
sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
|
sh_eth_write(ndev, mdp->cd->eesipr_value, EESIPR);
|
||||||
|
@ -575,9 +575,6 @@ enum RPADIR_BIT {
|
|||||||
RPADIR_PADR = 0x0003f,
|
RPADIR_PADR = 0x0003f,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RFLR */
|
|
||||||
#define RFLR_VALUE 0x1000
|
|
||||||
|
|
||||||
/* FDR */
|
/* FDR */
|
||||||
#define DEFAULT_FDR_INIT 0x00000707
|
#define DEFAULT_FDR_INIT 0x00000707
|
||||||
|
|
||||||
|
@ -1600,8 +1600,9 @@ static int emac_dev_open(struct net_device *ndev)
|
|||||||
if (IS_ERR(priv->phydev)) {
|
if (IS_ERR(priv->phydev)) {
|
||||||
dev_err(emac_dev, "could not connect to phy %s\n",
|
dev_err(emac_dev, "could not connect to phy %s\n",
|
||||||
priv->phy_id);
|
priv->phy_id);
|
||||||
|
ret = PTR_ERR(priv->phydev);
|
||||||
priv->phydev = NULL;
|
priv->phydev = NULL;
|
||||||
return PTR_ERR(priv->phydev);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->link = 0;
|
priv->link = 0;
|
||||||
|
@ -318,9 +318,9 @@ static int __devinit davinci_mdio_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
data->clk = clk_get(dev, NULL);
|
data->clk = clk_get(dev, NULL);
|
||||||
if (IS_ERR(data->clk)) {
|
if (IS_ERR(data->clk)) {
|
||||||
data->clk = NULL;
|
|
||||||
dev_err(dev, "failed to get device clock\n");
|
dev_err(dev, "failed to get device clock\n");
|
||||||
ret = PTR_ERR(data->clk);
|
ret = PTR_ERR(data->clk);
|
||||||
|
data->clk = NULL;
|
||||||
goto bail_out;
|
goto bail_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
config NET_VENDOR_TOSHIBA
|
config NET_VENDOR_TOSHIBA
|
||||||
bool "Toshiba devices"
|
bool "Toshiba devices"
|
||||||
default y
|
default y
|
||||||
depends on PCI && (PPC_IBM_CELL_BLADE || PPC_CELLEB) || PPC_PS3
|
depends on PCI && (PPC_IBM_CELL_BLADE || PPC_CELLEB || MIPS) || PPC_PS3
|
||||||
---help---
|
---help---
|
||||||
If you have a network (Ethernet) card belonging to this class, say Y
|
If you have a network (Ethernet) card belonging to this class, say Y
|
||||||
and read the Ethernet-HOWTO, available from
|
and read the Ethernet-HOWTO, available from
|
||||||
|
@ -2491,9 +2491,6 @@ static int velocity_close(struct net_device *dev)
|
|||||||
if (dev->irq != 0)
|
if (dev->irq != 0)
|
||||||
free_irq(dev->irq, dev);
|
free_irq(dev->irq, dev);
|
||||||
|
|
||||||
/* Power down the chip */
|
|
||||||
pci_set_power_state(vptr->pdev, PCI_D3hot);
|
|
||||||
|
|
||||||
velocity_free_rings(vptr);
|
velocity_free_rings(vptr);
|
||||||
|
|
||||||
vptr->flags &= (~VELOCITY_FLAGS_OPENED);
|
vptr->flags &= (~VELOCITY_FLAGS_OPENED);
|
||||||
|
@ -123,7 +123,7 @@ static int netvsc_close(struct net_device *net)
|
|||||||
struct hv_device *device_obj = net_device_ctx->device_ctx;
|
struct hv_device *device_obj = net_device_ctx->device_ctx;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
netif_stop_queue(net);
|
netif_tx_disable(net);
|
||||||
|
|
||||||
ret = rndis_filter_close(device_obj);
|
ret = rndis_filter_close(device_obj);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
@ -151,10 +151,10 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
|
|||||||
int ret;
|
int ret;
|
||||||
unsigned int i, num_pages, npg_data;
|
unsigned int i, num_pages, npg_data;
|
||||||
|
|
||||||
/* Add multipage for skb->data and additional one for RNDIS */
|
/* Add multipages for skb->data and additional 2 for RNDIS */
|
||||||
npg_data = (((unsigned long)skb->data + skb_headlen(skb) - 1)
|
npg_data = (((unsigned long)skb->data + skb_headlen(skb) - 1)
|
||||||
>> PAGE_SHIFT) - ((unsigned long)skb->data >> PAGE_SHIFT) + 1;
|
>> PAGE_SHIFT) - ((unsigned long)skb->data >> PAGE_SHIFT) + 1;
|
||||||
num_pages = skb_shinfo(skb)->nr_frags + npg_data + 1;
|
num_pages = skb_shinfo(skb)->nr_frags + npg_data + 2;
|
||||||
|
|
||||||
/* Allocate a netvsc packet based on # of frags. */
|
/* Allocate a netvsc packet based on # of frags. */
|
||||||
packet = kzalloc(sizeof(struct hv_netvsc_packet) +
|
packet = kzalloc(sizeof(struct hv_netvsc_packet) +
|
||||||
@ -173,8 +173,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
|
|||||||
sizeof(struct hv_netvsc_packet) +
|
sizeof(struct hv_netvsc_packet) +
|
||||||
(num_pages * sizeof(struct hv_page_buffer));
|
(num_pages * sizeof(struct hv_page_buffer));
|
||||||
|
|
||||||
/* Setup the rndis header */
|
/* If the rndis msg goes beyond 1 page, we will add 1 later */
|
||||||
packet->page_buf_cnt = num_pages;
|
packet->page_buf_cnt = num_pages - 1;
|
||||||
|
|
||||||
/* Initialize it from the skb */
|
/* Initialize it from the skb */
|
||||||
packet->total_data_buflen = skb->len;
|
packet->total_data_buflen = skb->len;
|
||||||
@ -256,7 +256,7 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
|
|||||||
schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
|
schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
|
||||||
} else {
|
} else {
|
||||||
netif_carrier_off(net);
|
netif_carrier_off(net);
|
||||||
netif_stop_queue(net);
|
netif_tx_disable(net);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
|
|||||||
skb->ip_summed = CHECKSUM_NONE;
|
skb->ip_summed = CHECKSUM_NONE;
|
||||||
|
|
||||||
net->stats.rx_packets++;
|
net->stats.rx_packets++;
|
||||||
net->stats.rx_bytes += skb->len;
|
net->stats.rx_bytes += packet->total_data_buflen;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pass the skb back up. Network stack will deallocate the skb when it
|
* Pass the skb back up. Network stack will deallocate the skb when it
|
||||||
@ -337,7 +337,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
|
|||||||
|
|
||||||
nvdev->start_remove = true;
|
nvdev->start_remove = true;
|
||||||
cancel_delayed_work_sync(&ndevctx->dwork);
|
cancel_delayed_work_sync(&ndevctx->dwork);
|
||||||
netif_stop_queue(ndev);
|
netif_tx_disable(ndev);
|
||||||
rndis_filter_device_remove(hdev);
|
rndis_filter_device_remove(hdev);
|
||||||
|
|
||||||
ndev->mtu = mtu;
|
ndev->mtu = mtu;
|
||||||
@ -460,7 +460,7 @@ static int netvsc_remove(struct hv_device *dev)
|
|||||||
cancel_delayed_work_sync(&ndev_ctx->dwork);
|
cancel_delayed_work_sync(&ndev_ctx->dwork);
|
||||||
|
|
||||||
/* Stop outbound asap */
|
/* Stop outbound asap */
|
||||||
netif_stop_queue(net);
|
netif_tx_disable(net);
|
||||||
|
|
||||||
unregister_netdev(net);
|
unregister_netdev(net);
|
||||||
|
|
||||||
|
@ -321,6 +321,25 @@ static void rndis_filter_receive_data(struct rndis_device *dev,
|
|||||||
data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset;
|
data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset;
|
||||||
|
|
||||||
pkt->total_data_buflen -= data_offset;
|
pkt->total_data_buflen -= data_offset;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure we got a valid RNDIS message, now total_data_buflen
|
||||||
|
* should be the data packet size plus the trailer padding size
|
||||||
|
*/
|
||||||
|
if (pkt->total_data_buflen < rndis_pkt->data_len) {
|
||||||
|
netdev_err(dev->net_dev->ndev, "rndis message buffer "
|
||||||
|
"overflow detected (got %u, min %u)"
|
||||||
|
"...dropping this message!\n",
|
||||||
|
pkt->total_data_buflen, rndis_pkt->data_len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove the rndis trailer padding from rndis packet message
|
||||||
|
* rndis_pkt->data_len tell us the real data length, we only copy
|
||||||
|
* the data packet to the stack, without the rndis trailer padding
|
||||||
|
*/
|
||||||
|
pkt->total_data_buflen = rndis_pkt->data_len;
|
||||||
pkt->data = (void *)((unsigned long)pkt->data + data_offset);
|
pkt->data = (void *)((unsigned long)pkt->data + data_offset);
|
||||||
|
|
||||||
pkt->is_data_pkt = true;
|
pkt->is_data_pkt = true;
|
||||||
@ -778,6 +797,19 @@ int rndis_filter_send(struct hv_device *dev,
|
|||||||
(unsigned long)rndisMessage & (PAGE_SIZE-1);
|
(unsigned long)rndisMessage & (PAGE_SIZE-1);
|
||||||
pkt->page_buf[0].len = rndisMessageSize;
|
pkt->page_buf[0].len = rndisMessageSize;
|
||||||
|
|
||||||
|
/* Add one page_buf if the rndis msg goes beyond page boundary */
|
||||||
|
if (pkt->page_buf[0].offset + rndisMessageSize > PAGE_SIZE) {
|
||||||
|
int i;
|
||||||
|
for (i = pkt->page_buf_cnt; i > 1; i--)
|
||||||
|
pkt->page_buf[i] = pkt->page_buf[i-1];
|
||||||
|
pkt->page_buf_cnt++;
|
||||||
|
pkt->page_buf[0].len = PAGE_SIZE - pkt->page_buf[0].offset;
|
||||||
|
pkt->page_buf[1].pfn = virt_to_phys((void *)((ulong)
|
||||||
|
rndisMessage + pkt->page_buf[0].len)) >> PAGE_SHIFT;
|
||||||
|
pkt->page_buf[1].offset = 0;
|
||||||
|
pkt->page_buf[1].len = rndisMessageSize - pkt->page_buf[0].len;
|
||||||
|
}
|
||||||
|
|
||||||
/* Save the packet send completion and context */
|
/* Save the packet send completion and context */
|
||||||
filterPacket->completion = pkt->completion.send.send_completion;
|
filterPacket->completion = pkt->completion.send.send_completion;
|
||||||
filterPacket->completion_ctx =
|
filterPacket->completion_ctx =
|
||||||
|
@ -7,7 +7,6 @@ menuconfig TR
|
|||||||
bool "Token Ring driver support"
|
bool "Token Ring driver support"
|
||||||
depends on NETDEVICES && !UML
|
depends on NETDEVICES && !UML
|
||||||
depends on (PCI || ISA || MCA || CCW || PCMCIA)
|
depends on (PCI || ISA || MCA || CCW || PCMCIA)
|
||||||
select LLC
|
|
||||||
help
|
help
|
||||||
Token Ring is IBM's way of communication on a local network; the
|
Token Ring is IBM's way of communication on a local network; the
|
||||||
rest of the world uses Ethernet. To participate on a Token Ring
|
rest of the world uses Ethernet. To participate on a Token Ring
|
||||||
@ -20,6 +19,10 @@ menuconfig TR
|
|||||||
|
|
||||||
if TR
|
if TR
|
||||||
|
|
||||||
|
config WANT_LLC
|
||||||
|
def_bool y
|
||||||
|
select LLC
|
||||||
|
|
||||||
config PCMCIA_IBMTR
|
config PCMCIA_IBMTR
|
||||||
tristate "IBM PCMCIA tokenring adapter support"
|
tristate "IBM PCMCIA tokenring adapter support"
|
||||||
depends on IBMTR!=y && PCMCIA
|
depends on IBMTR!=y && PCMCIA
|
||||||
|
@ -1037,13 +1037,16 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Workaround for early ACK timeouts, add an offset to match the
|
* Workaround for early ACK timeouts, add an offset to match the
|
||||||
* initval's 64us ack timeout value.
|
* initval's 64us ack timeout value. Use 48us for the CTS timeout.
|
||||||
* This was initially only meant to work around an issue with delayed
|
* This was initially only meant to work around an issue with delayed
|
||||||
* BA frames in some implementations, but it has been found to fix ACK
|
* BA frames in some implementations, but it has been found to fix ACK
|
||||||
* timeout issues in other cases as well.
|
* timeout issues in other cases as well.
|
||||||
*/
|
*/
|
||||||
if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
|
if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) {
|
||||||
acktimeout += 64 - sifstime - ah->slottime;
|
acktimeout += 64 - sifstime - ah->slottime;
|
||||||
|
ctstimeout += 48 - sifstime - ah->slottime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ath9k_hw_set_sifs_time(ah, sifstime);
|
ath9k_hw_set_sifs_time(ah, sifstime);
|
||||||
ath9k_hw_setslottime(ah, slottime);
|
ath9k_hw_setslottime(ah, slottime);
|
||||||
|
@ -822,6 +822,11 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
|||||||
ARRAY_SIZE(ath9k_tpt_blink));
|
ARRAY_SIZE(ath9k_tpt_blink));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
INIT_WORK(&sc->hw_reset_work, ath_reset_work);
|
||||||
|
INIT_WORK(&sc->hw_check_work, ath_hw_check);
|
||||||
|
INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
|
||||||
|
INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work);
|
||||||
|
|
||||||
/* Register with mac80211 */
|
/* Register with mac80211 */
|
||||||
error = ieee80211_register_hw(hw);
|
error = ieee80211_register_hw(hw);
|
||||||
if (error)
|
if (error)
|
||||||
@ -840,10 +845,6 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
|||||||
goto error_world;
|
goto error_world;
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_WORK(&sc->hw_reset_work, ath_reset_work);
|
|
||||||
INIT_WORK(&sc->hw_check_work, ath_hw_check);
|
|
||||||
INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
|
|
||||||
INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work);
|
|
||||||
sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
|
sc->last_rssi = ATH_RSSI_DUMMY_MARKER;
|
||||||
|
|
||||||
ath_init_leds(sc);
|
ath_init_leds(sc);
|
||||||
|
@ -694,7 +694,7 @@ static u8 ath_rc_get_highest_rix(struct ath_softc *sc,
|
|||||||
return rate;
|
return rate;
|
||||||
|
|
||||||
/* This should not happen */
|
/* This should not happen */
|
||||||
WARN_ON(1);
|
WARN_ON_ONCE(1);
|
||||||
|
|
||||||
rate = ath_rc_priv->valid_rate_index[0];
|
rate = ath_rc_priv->valid_rate_index[0];
|
||||||
|
|
||||||
|
@ -822,6 +822,14 @@ static bool ath9k_rx_accept(struct ath_common *common,
|
|||||||
(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
|
(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
|
||||||
ATH9K_RXERR_KEYMISS));
|
ATH9K_RXERR_KEYMISS));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Key miss events are only relevant for pairwise keys where the
|
||||||
|
* descriptor does contain a valid key index. This has been observed
|
||||||
|
* mostly with CCMP encryption.
|
||||||
|
*/
|
||||||
|
if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID)
|
||||||
|
rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS;
|
||||||
|
|
||||||
if (!rx_stats->rs_datalen)
|
if (!rx_stats->rs_datalen)
|
||||||
return false;
|
return false;
|
||||||
/*
|
/*
|
||||||
|
@ -91,6 +91,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
|
|||||||
tx_cmd->tid_tspec = qc[0] & 0xf;
|
tx_cmd->tid_tspec = qc[0] & 0xf;
|
||||||
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
|
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
|
||||||
} else {
|
} else {
|
||||||
|
tx_cmd->tid_tspec = IWL_TID_NON_QOS;
|
||||||
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
|
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
|
||||||
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
||||||
else
|
else
|
||||||
@ -620,7 +621,7 @@ int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
|
|||||||
sta_priv->lq_sta.lq.agg_params.agg_frame_cnt_limit =
|
sta_priv->lq_sta.lq.agg_params.agg_frame_cnt_limit =
|
||||||
sta_priv->max_agg_bufsize;
|
sta_priv->max_agg_bufsize;
|
||||||
|
|
||||||
IWL_INFO(priv, "Tx aggregation enabled on ra = %pM tid = %d\n",
|
IWL_DEBUG_HT(priv, "Tx aggregation enabled on ra = %pM tid = %d\n",
|
||||||
sta->addr, tid);
|
sta->addr, tid);
|
||||||
|
|
||||||
return iwl_send_lq_cmd(priv, ctx,
|
return iwl_send_lq_cmd(priv, ctx,
|
||||||
@ -808,6 +809,8 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv,
|
|||||||
u32 status = le16_to_cpu(tx_resp->status.status);
|
u32 status = le16_to_cpu(tx_resp->status.status);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
WARN_ON(tid == IWL_TID_NON_QOS);
|
||||||
|
|
||||||
if (agg->wait_for_ba)
|
if (agg->wait_for_ba)
|
||||||
IWL_DEBUG_TX_REPLY(priv,
|
IWL_DEBUG_TX_REPLY(priv,
|
||||||
"got tx response w/o block-ack\n");
|
"got tx response w/o block-ack\n");
|
||||||
@ -1035,10 +1038,13 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
__skb_queue_head_init(&skbs);
|
__skb_queue_head_init(&skbs);
|
||||||
priv->tid_data[sta_id][tid].next_reclaimed = next_reclaimed;
|
|
||||||
|
|
||||||
IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d",
|
if (tid != IWL_TID_NON_QOS) {
|
||||||
next_reclaimed);
|
priv->tid_data[sta_id][tid].next_reclaimed =
|
||||||
|
next_reclaimed;
|
||||||
|
IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d",
|
||||||
|
next_reclaimed);
|
||||||
|
}
|
||||||
|
|
||||||
/*we can free until ssn % q.n_bd not inclusive */
|
/*we can free until ssn % q.n_bd not inclusive */
|
||||||
WARN_ON(iwl_trans_reclaim(trans(priv), sta_id, tid, txq_id,
|
WARN_ON(iwl_trans_reclaim(trans(priv), sta_id, tid, txq_id,
|
||||||
|
@ -815,6 +815,7 @@ struct iwl_qosparam_cmd {
|
|||||||
|
|
||||||
#define IWL_INVALID_STATION 255
|
#define IWL_INVALID_STATION 255
|
||||||
#define IWL_MAX_TID_COUNT 8
|
#define IWL_MAX_TID_COUNT 8
|
||||||
|
#define IWL_TID_NON_QOS IWL_MAX_TID_COUNT
|
||||||
|
|
||||||
#define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2)
|
#define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2)
|
||||||
#define STA_FLG_PWR_SAVE_MSK cpu_to_le32(1 << 8)
|
#define STA_FLG_PWR_SAVE_MSK cpu_to_le32(1 << 8)
|
||||||
|
@ -1262,6 +1262,7 @@ static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid,
|
|||||||
txq->time_stamp = jiffies;
|
txq->time_stamp = jiffies;
|
||||||
|
|
||||||
if (unlikely(txq_id >= IWLAGN_FIRST_AMPDU_QUEUE &&
|
if (unlikely(txq_id >= IWLAGN_FIRST_AMPDU_QUEUE &&
|
||||||
|
tid != IWL_TID_NON_QOS &&
|
||||||
txq_id != trans_pcie->agg_txq[sta_id][tid])) {
|
txq_id != trans_pcie->agg_txq[sta_id][tid])) {
|
||||||
/*
|
/*
|
||||||
* FIXME: this is a uCode bug which need to be addressed,
|
* FIXME: this is a uCode bug which need to be addressed,
|
||||||
|
@ -382,7 +382,8 @@ mwifiex_free_adapter(struct mwifiex_adapter *adapter)
|
|||||||
|
|
||||||
adapter->if_ops.cleanup_if(adapter);
|
adapter->if_ops.cleanup_if(adapter);
|
||||||
|
|
||||||
dev_kfree_skb_any(adapter->sleep_cfm);
|
if (adapter->sleep_cfm)
|
||||||
|
dev_kfree_skb_any(adapter->sleep_cfm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -822,7 +822,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
mwifiex_del_virtual_intf(priv->wdev->wiphy, priv->netdev);
|
if (priv->wdev && priv->netdev)
|
||||||
|
mwifiex_del_virtual_intf(priv->wdev->wiphy,
|
||||||
|
priv->netdev);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,9 +832,11 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
|
|||||||
if (!priv)
|
if (!priv)
|
||||||
goto exit_remove;
|
goto exit_remove;
|
||||||
|
|
||||||
wiphy_unregister(priv->wdev->wiphy);
|
if (priv->wdev) {
|
||||||
wiphy_free(priv->wdev->wiphy);
|
wiphy_unregister(priv->wdev->wiphy);
|
||||||
kfree(priv->wdev);
|
wiphy_free(priv->wdev->wiphy);
|
||||||
|
kfree(priv->wdev);
|
||||||
|
}
|
||||||
|
|
||||||
mwifiex_terminate_workqueue(adapter);
|
mwifiex_terminate_workqueue(adapter);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
|
|||||||
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
||||||
{
|
{
|
||||||
bool cancel_flag = false;
|
bool cancel_flag = false;
|
||||||
int status = adapter->cmd_wait_q.status;
|
int status;
|
||||||
struct cmd_ctrl_node *cmd_queued;
|
struct cmd_ctrl_node *cmd_queued;
|
||||||
|
|
||||||
if (!adapter->cmd_queued)
|
if (!adapter->cmd_queued)
|
||||||
@ -79,6 +79,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
|
|||||||
mwifiex_cancel_pending_ioctl(adapter);
|
mwifiex_cancel_pending_ioctl(adapter);
|
||||||
dev_dbg(adapter->dev, "cmd cancel\n");
|
dev_dbg(adapter->dev, "cmd cancel\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = adapter->cmd_wait_q.status;
|
||||||
adapter->cmd_wait_q.status = 0;
|
adapter->cmd_wait_q.status = 0;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -240,6 +242,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
|||||||
|
|
||||||
if (!netif_queue_stopped(priv->netdev))
|
if (!netif_queue_stopped(priv->netdev))
|
||||||
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
||||||
|
if (netif_carrier_ok(priv->netdev))
|
||||||
|
netif_carrier_off(priv->netdev);
|
||||||
|
|
||||||
/* Clear any past association response stored for
|
/* Clear any past association response stored for
|
||||||
* application retrieval */
|
* application retrieval */
|
||||||
@ -271,6 +275,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
|
|||||||
|
|
||||||
if (!netif_queue_stopped(priv->netdev))
|
if (!netif_queue_stopped(priv->netdev))
|
||||||
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
mwifiex_stop_net_dev_queue(priv->netdev, adapter);
|
||||||
|
if (netif_carrier_ok(priv->netdev))
|
||||||
|
netif_carrier_off(priv->netdev);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
dev_dbg(adapter->dev, "info: network found in scan"
|
dev_dbg(adapter->dev, "info: network found in scan"
|
||||||
|
@ -514,9 +514,9 @@ EXPORT_SYMBOL_GPL(rt2800_write_tx_data);
|
|||||||
|
|
||||||
static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2)
|
static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2)
|
||||||
{
|
{
|
||||||
int rssi0 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI0);
|
s8 rssi0 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI0);
|
||||||
int rssi1 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI1);
|
s8 rssi1 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI1);
|
||||||
int rssi2 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI2);
|
s8 rssi2 = rt2x00_get_field32(rxwi_w2, RXWI_W2_RSSI2);
|
||||||
u16 eeprom;
|
u16 eeprom;
|
||||||
u8 offset0;
|
u8 offset0;
|
||||||
u8 offset1;
|
u8 offset1;
|
||||||
@ -552,7 +552,7 @@ static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2)
|
|||||||
* which gives less energy...
|
* which gives less energy...
|
||||||
*/
|
*/
|
||||||
rssi0 = max(rssi0, rssi1);
|
rssi0 = max(rssi0, rssi1);
|
||||||
return max(rssi0, rssi2);
|
return (int)max(rssi0, rssi2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rt2800_process_rxwi(struct queue_entry *entry,
|
void rt2800_process_rxwi(struct queue_entry *entry,
|
||||||
|
@ -866,6 +866,14 @@ static int fill_ctrlset(struct zd_mac *mac,
|
|||||||
|
|
||||||
ZD_ASSERT(frag_len <= 0xffff);
|
ZD_ASSERT(frag_len <= 0xffff);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Firmware computes the duration itself (for all frames except PSPoll)
|
||||||
|
* and needs the field set to 0 at input, otherwise firmware messes up
|
||||||
|
* duration_id and sets bits 14 and 15 on.
|
||||||
|
*/
|
||||||
|
if (!ieee80211_is_pspoll(hdr->frame_control))
|
||||||
|
hdr->duration_id = 0;
|
||||||
|
|
||||||
txrate = ieee80211_get_tx_rate(mac->hw, info);
|
txrate = ieee80211_get_tx_rate(mac->hw, info);
|
||||||
|
|
||||||
cs->modulation = txrate->hw_value;
|
cs->modulation = txrate->hw_value;
|
||||||
|
@ -75,7 +75,7 @@ static u32 get_cfgspace_addr(struct ssb_pcicore *pc,
|
|||||||
u32 tmp;
|
u32 tmp;
|
||||||
|
|
||||||
/* We do only have one cardbus device behind the bridge. */
|
/* We do only have one cardbus device behind the bridge. */
|
||||||
if (pc->cardbusmode && (dev >= 1))
|
if (pc->cardbusmode && (dev > 1))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (bus == 0) {
|
if (bus == 0) {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <linux/mod_devicetable.h>
|
#include <linux/mod_devicetable.h>
|
||||||
|
|
||||||
|
|
||||||
#define MAX_PAGE_BUFFER_COUNT 18
|
#define MAX_PAGE_BUFFER_COUNT 19
|
||||||
#define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */
|
#define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
@ -93,6 +93,16 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif,
|
|||||||
fl4->fl4_dport = dport;
|
fl4->fl4_dport = dport;
|
||||||
fl4->fl4_sport = sport;
|
fl4->fl4_sport = sport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset some input parameters after previous lookup */
|
||||||
|
static inline void flowi4_update_output(struct flowi4 *fl4, int oif, __u8 tos,
|
||||||
|
__be32 daddr, __be32 saddr)
|
||||||
|
{
|
||||||
|
fl4->flowi4_oif = oif;
|
||||||
|
fl4->flowi4_tos = tos;
|
||||||
|
fl4->daddr = daddr;
|
||||||
|
fl4->saddr = saddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct flowi6 {
|
struct flowi6 {
|
||||||
|
@ -37,19 +37,51 @@ extern int net_prio_subsys_id;
|
|||||||
|
|
||||||
extern void sock_update_netprioidx(struct sock *sk);
|
extern void sock_update_netprioidx(struct sock *sk);
|
||||||
|
|
||||||
static inline struct cgroup_netprio_state
|
#if IS_BUILTIN(CONFIG_NETPRIO_CGROUP)
|
||||||
*task_netprio_state(struct task_struct *p)
|
|
||||||
|
static inline u32 task_netprioidx(struct task_struct *p)
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
|
struct cgroup_netprio_state *state;
|
||||||
return container_of(task_subsys_state(p, net_prio_subsys_id),
|
u32 idx;
|
||||||
struct cgroup_netprio_state, css);
|
|
||||||
#else
|
rcu_read_lock();
|
||||||
return NULL;
|
state = container_of(task_subsys_state(p, net_prio_subsys_id),
|
||||||
#endif
|
struct cgroup_netprio_state, css);
|
||||||
|
idx = state->prioidx;
|
||||||
|
rcu_read_unlock();
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif IS_MODULE(CONFIG_NETPRIO_CGROUP)
|
||||||
|
|
||||||
|
static inline u32 task_netprioidx(struct task_struct *p)
|
||||||
|
{
|
||||||
|
struct cgroup_netprio_state *state;
|
||||||
|
int subsys_id;
|
||||||
|
u32 idx = 0;
|
||||||
|
|
||||||
|
rcu_read_lock();
|
||||||
|
subsys_id = rcu_dereference_index_check(net_prio_subsys_id,
|
||||||
|
rcu_read_lock_held());
|
||||||
|
if (subsys_id >= 0) {
|
||||||
|
state = container_of(task_subsys_state(p, subsys_id),
|
||||||
|
struct cgroup_netprio_state, css);
|
||||||
|
idx = state->prioidx;
|
||||||
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
static inline u32 task_netprioidx(struct task_struct *p)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_NETPRIO_CGROUP */
|
||||||
|
|
||||||
|
#else
|
||||||
#define sock_update_netprioidx(sk)
|
#define sock_update_netprioidx(sk)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
|
|||||||
if (IS_ERR(rt))
|
if (IS_ERR(rt))
|
||||||
return rt;
|
return rt;
|
||||||
ip_rt_put(rt);
|
ip_rt_put(rt);
|
||||||
|
flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr);
|
||||||
}
|
}
|
||||||
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
||||||
return ip_route_output_flow(net, fl4, sk);
|
return ip_route_output_flow(net, fl4, sk);
|
||||||
@ -284,6 +285,9 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
|
|||||||
fl4->fl4_dport = dport;
|
fl4->fl4_dport = dport;
|
||||||
fl4->fl4_sport = sport;
|
fl4->fl4_sport = sport;
|
||||||
ip_rt_put(rt);
|
ip_rt_put(rt);
|
||||||
|
flowi4_update_output(fl4, sk->sk_bound_dev_if,
|
||||||
|
RT_CONN_FLAGS(sk), fl4->daddr,
|
||||||
|
fl4->saddr);
|
||||||
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
|
||||||
return ip_route_output_flow(sock_net(sk), fl4, sk);
|
return ip_route_output_flow(sock_net(sk), fl4, sk);
|
||||||
}
|
}
|
||||||
|
@ -220,9 +220,16 @@ struct tcf_proto {
|
|||||||
|
|
||||||
struct qdisc_skb_cb {
|
struct qdisc_skb_cb {
|
||||||
unsigned int pkt_len;
|
unsigned int pkt_len;
|
||||||
long data[];
|
unsigned char data[24];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
|
||||||
|
{
|
||||||
|
struct qdisc_skb_cb *qcb;
|
||||||
|
BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz);
|
||||||
|
BUILD_BUG_ON(sizeof(qcb->data) < sz);
|
||||||
|
}
|
||||||
|
|
||||||
static inline int qdisc_qlen(const struct Qdisc *q)
|
static inline int qdisc_qlen(const struct Qdisc *q)
|
||||||
{
|
{
|
||||||
return q->q.qlen;
|
return q->q.qlen;
|
||||||
|
@ -273,6 +273,14 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
|
|||||||
return seq3 - seq2 >= seq1 - seq2;
|
return seq3 - seq2 >= seq1 - seq2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool tcp_out_of_memory(struct sock *sk)
|
||||||
|
{
|
||||||
|
if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
|
||||||
|
sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
|
static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
|
||||||
{
|
{
|
||||||
struct percpu_counter *ocp = sk->sk_prot->orphan_count;
|
struct percpu_counter *ocp = sk->sk_prot->orphan_count;
|
||||||
@ -283,13 +291,11 @@ static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
|
|||||||
if (orphans << shift > sysctl_tcp_max_orphans)
|
if (orphans << shift > sysctl_tcp_max_orphans)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
|
|
||||||
sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2))
|
|
||||||
return true;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool tcp_check_oom(struct sock *sk, int shift);
|
||||||
|
|
||||||
/* syncookies: remember time of last synqueue overflow */
|
/* syncookies: remember time of last synqueue overflow */
|
||||||
static inline void tcp_synq_overflow(struct sock *sk)
|
static inline void tcp_synq_overflow(struct sock *sk)
|
||||||
{
|
{
|
||||||
|
@ -539,8 +539,10 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
|
|||||||
pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb);
|
pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb);
|
||||||
memset(skb->cb, 0, sizeof(struct caif_payload_info));
|
memset(skb->cb, 0, sizeof(struct caif_payload_info));
|
||||||
|
|
||||||
if (cf_sk->layer.dn == NULL)
|
if (cf_sk->layer.dn == NULL) {
|
||||||
|
kfree_skb(skb);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
return cf_sk->layer.dn->transmit(cf_sk->layer.dn, pkt);
|
return cf_sk->layer.dn->transmit(cf_sk->layer.dn, pkt);
|
||||||
}
|
}
|
||||||
@ -683,10 +685,10 @@ static int caif_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
|||||||
}
|
}
|
||||||
err = transmit_skb(skb, cf_sk,
|
err = transmit_skb(skb, cf_sk,
|
||||||
msg->msg_flags&MSG_DONTWAIT, timeo);
|
msg->msg_flags&MSG_DONTWAIT, timeo);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
kfree_skb(skb);
|
/* skb is already freed */
|
||||||
goto pipe_err;
|
goto pipe_err;
|
||||||
}
|
|
||||||
sent += size;
|
sent += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,6 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
|
|||||||
{
|
{
|
||||||
struct cfmuxl *muxl = container_obj(layr);
|
struct cfmuxl *muxl = container_obj(layr);
|
||||||
struct cflayer *layer;
|
struct cflayer *layer;
|
||||||
int idx;
|
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
list_for_each_entry_rcu(layer, &muxl->srvl_list, node) {
|
list_for_each_entry_rcu(layer, &muxl->srvl_list, node) {
|
||||||
@ -257,14 +256,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
|
|||||||
|
|
||||||
if ((ctrl == _CAIF_CTRLCMD_PHYIF_DOWN_IND ||
|
if ((ctrl == _CAIF_CTRLCMD_PHYIF_DOWN_IND ||
|
||||||
ctrl == CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND) &&
|
ctrl == CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND) &&
|
||||||
layer->id != 0) {
|
layer->id != 0)
|
||||||
|
cfmuxl_remove_uplayer(layr, layer->id);
|
||||||
|
|
||||||
idx = layer->id % UP_CACHE_SIZE;
|
|
||||||
spin_lock_bh(&muxl->receive_lock);
|
|
||||||
RCU_INIT_POINTER(muxl->up_cache[idx], NULL);
|
|
||||||
list_del_rcu(&layer->node);
|
|
||||||
spin_unlock_bh(&muxl->receive_lock);
|
|
||||||
}
|
|
||||||
/* NOTE: ctrlcmd is not allowed to block */
|
/* NOTE: ctrlcmd is not allowed to block */
|
||||||
layer->ctrlcmd(layer, ctrl, phyid);
|
layer->ctrlcmd(layer, ctrl, phyid);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user