You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits) sctp: fix random memory dereference with SCTP_HMAC_IDENT option. sctp: correct bounds check in sctp_setsockopt_auth_key wan: Missing capability checks in sbni_ioctl() e100, fix iomap read qeth: preallocated header account offset qeth: l2 write unicast list to hardware qeth: use -EOPNOTSUPP instead of -ENOTSUPP. ibm_newemac: Don't call dev_mc_add() before device is registered net: don't grab a mutex within a timer context in gianfar forcedeth: fix checksum flag net/usb/mcs7830: add set_mac_address net/usb/mcs7830: new device IDs [netdrvr] smc91x: fix resource removal (null ptr deref) ibmveth: fix bad UDP checksums [netdrvr] hso: dev_kfree_skb crash fix [netdrvr] hso: icon 322 detection fix atl1: disable TSO by default atl1e: multistatement if missing braces igb: remove 82576 quad adapter drivers/net/skfp/ess.c: fix compile warnings ...
This commit is contained in:
@@ -337,6 +337,11 @@ typedef struct scc_param {
|
||||
uint scc_tcrc; /* Internal */
|
||||
} sccp_t;
|
||||
|
||||
/* Function code bits.
|
||||
*/
|
||||
#define SCC_EB ((u_char) 0x10) /* Set big endian byte order */
|
||||
#define SCC_GBL ((u_char) 0x20) /* Snooping enabled */
|
||||
|
||||
/* CPM Ethernet through SCC1.
|
||||
*/
|
||||
typedef struct scc_enet {
|
||||
|
||||
+3
-3
@@ -822,14 +822,14 @@ config ULTRA32
|
||||
will be called smc-ultra32.
|
||||
|
||||
config BFIN_MAC
|
||||
tristate "Blackfin 527/536/537 on-chip mac support"
|
||||
depends on NET_ETHERNET && (BF527 || BF537 || BF536)
|
||||
tristate "Blackfin on-chip MAC support"
|
||||
depends on NET_ETHERNET && (BF526 || BF527 || BF536 || BF537)
|
||||
select CRC32
|
||||
select MII
|
||||
select PHYLIB
|
||||
select BFIN_MAC_USE_L1 if DMA_UNCACHED_NONE
|
||||
help
|
||||
This is the driver for blackfin on-chip mac device. Say Y if you want it
|
||||
This is the driver for Blackfin on-chip mac device. Say Y if you want it
|
||||
compiled into the kernel. This driver is also available as a module
|
||||
( = code which can be inserted in and removed from the running kernel
|
||||
whenever you want). The module will be called bfin_mac.
|
||||
|
||||
@@ -2232,10 +2232,11 @@ static int atl1e_resume(struct pci_dev *pdev)
|
||||
|
||||
AT_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0);
|
||||
|
||||
if (netif_running(netdev))
|
||||
if (netif_running(netdev)) {
|
||||
err = atl1e_request_irq(adapter);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
atl1e_reset_hw(&adapter->hw);
|
||||
|
||||
|
||||
@@ -3022,7 +3022,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
|
||||
netdev->features = NETIF_F_HW_CSUM;
|
||||
netdev->features |= NETIF_F_SG;
|
||||
netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
|
||||
netdev->features |= NETIF_F_TSO;
|
||||
netdev->features |= NETIF_F_LLTX;
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -1838,7 +1838,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
|
||||
if ((le16_to_cpu(rfd->command) & cb_el) &&
|
||||
(RU_RUNNING == nic->ru_running))
|
||||
|
||||
if (readb(&nic->csr->scb.status) & rus_no_res)
|
||||
if (ioread8(&nic->csr->scb.status) & rus_no_res)
|
||||
nic->ru_running = RU_SUSPENDED;
|
||||
return -ENODATA;
|
||||
}
|
||||
@@ -1861,7 +1861,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
|
||||
if ((le16_to_cpu(rfd->command) & cb_el) &&
|
||||
(RU_RUNNING == nic->ru_running)) {
|
||||
|
||||
if (readb(&nic->csr->scb.status) & rus_no_res)
|
||||
if (ioread8(&nic->csr->scb.status) & rus_no_res)
|
||||
nic->ru_running = RU_SUSPENDED;
|
||||
}
|
||||
|
||||
|
||||
@@ -5522,7 +5522,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
|
||||
if (id->driver_data & DEV_HAS_CHECKSUM) {
|
||||
np->rx_csum = 1;
|
||||
np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
|
||||
dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
|
||||
dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
|
||||
dev->features |= NETIF_F_TSO;
|
||||
}
|
||||
|
||||
@@ -5835,7 +5835,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
|
||||
|
||||
dev_printk(KERN_INFO, &pci_dev->dev, "%s%s%s%s%s%s%s%s%s%sdesc-v%u\n",
|
||||
dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
|
||||
dev->features & (NETIF_F_HW_CSUM | NETIF_F_SG) ?
|
||||
dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
|
||||
"csum " : "",
|
||||
dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ?
|
||||
"vlan " : "",
|
||||
|
||||
@@ -792,6 +792,10 @@ static int fs_enet_open(struct net_device *dev)
|
||||
int r;
|
||||
int err;
|
||||
|
||||
/* to initialize the fep->cur_rx,... */
|
||||
/* not doing this, will cause a crash in fs_enet_rx_napi */
|
||||
fs_init_bds(fep->ndev);
|
||||
|
||||
if (fep->fpi->use_napi)
|
||||
napi_enable(&fep->napi);
|
||||
|
||||
@@ -1167,6 +1171,10 @@ static struct of_device_id fs_enet_match[] = {
|
||||
.compatible = "fsl,cpm1-scc-enet",
|
||||
.data = (void *)&fs_scc_ops,
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,cpm2-scc-enet",
|
||||
.data = (void *)&fs_scc_ops,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_FS_ENET_HAS_FCC
|
||||
{
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "fs_enet.h"
|
||||
|
||||
/*************************************************/
|
||||
|
||||
#if defined(CONFIG_CPM1)
|
||||
/* for a 8xx __raw_xxx's are sufficient */
|
||||
#define __fs_out32(addr, x) __raw_writel(x, addr)
|
||||
@@ -62,6 +61,8 @@
|
||||
#define __fs_out16(addr, x) out_be16(addr, x)
|
||||
#define __fs_in32(addr) in_be32(addr)
|
||||
#define __fs_in16(addr) in_be16(addr)
|
||||
#define __fs_out8(addr, x) out_8(addr, x)
|
||||
#define __fs_in8(addr) in_8(addr)
|
||||
#endif
|
||||
|
||||
/* write, read, set bits, clear bits */
|
||||
@@ -262,8 +263,13 @@ static void restart(struct net_device *dev)
|
||||
|
||||
/* Initialize function code registers for big-endian.
|
||||
*/
|
||||
#ifndef CONFIG_NOT_COHERENT_CACHE
|
||||
W8(ep, sen_genscc.scc_rfcr, SCC_EB | SCC_GBL);
|
||||
W8(ep, sen_genscc.scc_tfcr, SCC_EB | SCC_GBL);
|
||||
#else
|
||||
W8(ep, sen_genscc.scc_rfcr, SCC_EB);
|
||||
W8(ep, sen_genscc.scc_tfcr, SCC_EB);
|
||||
#endif
|
||||
|
||||
/* Set maximum bytes per receive buffer.
|
||||
* This appears to be an Ethernet frame size, not the buffer
|
||||
|
||||
+18
-4
@@ -105,6 +105,7 @@ const char gfar_driver_version[] = "1.3";
|
||||
|
||||
static int gfar_enet_open(struct net_device *dev);
|
||||
static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
static void gfar_reset_task(struct work_struct *work);
|
||||
static void gfar_timeout(struct net_device *dev);
|
||||
static int gfar_close(struct net_device *dev);
|
||||
struct sk_buff *gfar_new_skb(struct net_device *dev);
|
||||
@@ -209,6 +210,7 @@ static int gfar_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&priv->txlock);
|
||||
spin_lock_init(&priv->rxlock);
|
||||
spin_lock_init(&priv->bflock);
|
||||
INIT_WORK(&priv->reset_task, gfar_reset_task);
|
||||
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
@@ -1212,6 +1214,7 @@ static int gfar_close(struct net_device *dev)
|
||||
|
||||
napi_disable(&priv->napi);
|
||||
|
||||
cancel_work_sync(&priv->reset_task);
|
||||
stop_gfar(dev);
|
||||
|
||||
/* Disconnect from the PHY */
|
||||
@@ -1326,13 +1329,16 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* gfar_timeout gets called when a packet has not been
|
||||
/* gfar_reset_task gets scheduled when a packet has not been
|
||||
* transmitted after a set amount of time.
|
||||
* For now, assume that clearing out all the structures, and
|
||||
* starting over will fix the problem. */
|
||||
static void gfar_timeout(struct net_device *dev)
|
||||
* starting over will fix the problem.
|
||||
*/
|
||||
static void gfar_reset_task(struct work_struct *work)
|
||||
{
|
||||
dev->stats.tx_errors++;
|
||||
struct gfar_private *priv = container_of(work, struct gfar_private,
|
||||
reset_task);
|
||||
struct net_device *dev = priv->dev;
|
||||
|
||||
if (dev->flags & IFF_UP) {
|
||||
stop_gfar(dev);
|
||||
@@ -1342,6 +1348,14 @@ static void gfar_timeout(struct net_device *dev)
|
||||
netif_tx_schedule_all(dev);
|
||||
}
|
||||
|
||||
static void gfar_timeout(struct net_device *dev)
|
||||
{
|
||||
struct gfar_private *priv = netdev_priv(dev);
|
||||
|
||||
dev->stats.tx_errors++;
|
||||
schedule_work(&priv->reset_task);
|
||||
}
|
||||
|
||||
/* Interrupt Handler for Transmit complete */
|
||||
static int gfar_clean_tx_ring(struct net_device *dev)
|
||||
{
|
||||
|
||||
@@ -756,6 +756,7 @@ struct gfar_private {
|
||||
|
||||
uint32_t msg_enable;
|
||||
|
||||
struct work_struct reset_task;
|
||||
/* Network Statistics */
|
||||
struct gfar_extra_stats extra_stats;
|
||||
};
|
||||
|
||||
@@ -663,9 +663,6 @@ static int emac_configure(struct emac_instance *dev)
|
||||
if (emac_phy_gpcs(dev->phy.mode))
|
||||
emac_mii_reset_phy(&dev->phy);
|
||||
|
||||
/* Required for Pause packet support in EMAC */
|
||||
dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1150,6 +1147,9 @@ static int emac_open(struct net_device *ndev)
|
||||
} else
|
||||
netif_carrier_on(dev->ndev);
|
||||
|
||||
/* Required for Pause packet support in EMAC */
|
||||
dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1);
|
||||
|
||||
emac_configure(dev);
|
||||
mal_poll_add(dev->mal, &dev->commac);
|
||||
mal_enable_tx_channel(dev->mal, dev->mal_tx_chan);
|
||||
|
||||
@@ -904,8 +904,6 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
unsigned long data_dma_addr;
|
||||
|
||||
desc.fields.flags_len = IBMVETH_BUF_VALID | skb->len;
|
||||
data_dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL &&
|
||||
ip_hdr(skb)->protocol != IPPROTO_TCP && skb_checksum_help(skb)) {
|
||||
@@ -924,6 +922,8 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
buf[1] = 0;
|
||||
}
|
||||
|
||||
data_dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&adapter->vdev->dev, data_dma_addr)) {
|
||||
if (!firmware_has_feature(FW_FEATURE_CMO))
|
||||
ibmveth_error_printk("tx: unable to map xmit buffer\n");
|
||||
@@ -932,6 +932,7 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
desc.fields.address = adapter->bounce_buffer_dma;
|
||||
tx_map_failed++;
|
||||
used_bounce = 1;
|
||||
wmb();
|
||||
} else
|
||||
desc.fields.address = data_dma_addr;
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
|
||||
case E1000_DEV_ID_82576:
|
||||
case E1000_DEV_ID_82576_FIBER:
|
||||
case E1000_DEV_ID_82576_SERDES:
|
||||
case E1000_DEV_ID_82576_QUAD_COPPER:
|
||||
mac->type = e1000_82576;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,6 @@ struct e1000_hw;
|
||||
#define E1000_DEV_ID_82576 0x10C9
|
||||
#define E1000_DEV_ID_82576_FIBER 0x10E6
|
||||
#define E1000_DEV_ID_82576_SERDES 0x10E7
|
||||
#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
|
||||
#define E1000_DEV_ID_82575EB_COPPER 0x10A7
|
||||
#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
|
||||
#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
|
||||
|
||||
@@ -373,13 +373,17 @@ static void igb_get_regs(struct net_device *netdev,
|
||||
regs_buff[12] = rd32(E1000_EECD);
|
||||
|
||||
/* Interrupt */
|
||||
regs_buff[13] = rd32(E1000_EICR);
|
||||
/* Reading EICS for EICR because they read the
|
||||
* same but EICS does not clear on read */
|
||||
regs_buff[13] = rd32(E1000_EICS);
|
||||
regs_buff[14] = rd32(E1000_EICS);
|
||||
regs_buff[15] = rd32(E1000_EIMS);
|
||||
regs_buff[16] = rd32(E1000_EIMC);
|
||||
regs_buff[17] = rd32(E1000_EIAC);
|
||||
regs_buff[18] = rd32(E1000_EIAM);
|
||||
regs_buff[19] = rd32(E1000_ICR);
|
||||
/* Reading ICS for ICR because they read the
|
||||
* same but ICS does not clear on read */
|
||||
regs_buff[19] = rd32(E1000_ICS);
|
||||
regs_buff[20] = rd32(E1000_ICS);
|
||||
regs_buff[21] = rd32(E1000_IMS);
|
||||
regs_buff[22] = rd32(E1000_IMC);
|
||||
@@ -1746,15 +1750,6 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
|
||||
/* return success for non excluded adapter ports */
|
||||
retval = 0;
|
||||
break;
|
||||
case E1000_DEV_ID_82576_QUAD_COPPER:
|
||||
/* quad port adapters only support WoL on port A */
|
||||
if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
|
||||
wol->supported = 0;
|
||||
break;
|
||||
}
|
||||
/* return success for non excluded adapter ports */
|
||||
retval = 0;
|
||||
break;
|
||||
default:
|
||||
/* dual port cards only support WoL on port A from now on
|
||||
* unless it was enabled in the eeprom for port B
|
||||
|
||||
+11
-14
@@ -61,7 +61,6 @@ static struct pci_device_id igb_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER), board_82575 },
|
||||
@@ -521,7 +520,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
|
||||
adapter->msix_entries,
|
||||
numvecs);
|
||||
if (err == 0)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
igb_reset_interrupt_capability(adapter);
|
||||
|
||||
@@ -531,7 +530,7 @@ msi_only:
|
||||
adapter->num_tx_queues = 1;
|
||||
if (!pci_enable_msi(adapter->pdev))
|
||||
adapter->flags |= IGB_FLAG_HAS_MSI;
|
||||
|
||||
out:
|
||||
/* Notify the stack of the (possibly) reduced Tx Queue count. */
|
||||
adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
|
||||
return;
|
||||
@@ -1217,16 +1216,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
|
||||
if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1)
|
||||
adapter->eeprom_wol = 0;
|
||||
break;
|
||||
case E1000_DEV_ID_82576_QUAD_COPPER:
|
||||
/* if quad port adapter, disable WoL on all but port A */
|
||||
if (global_quad_port_a != 0)
|
||||
adapter->eeprom_wol = 0;
|
||||
else
|
||||
adapter->flags |= IGB_FLAG_QUAD_PORT_A;
|
||||
/* Reset for multiple quad port adapters */
|
||||
if (++global_quad_port_a == 4)
|
||||
global_quad_port_a = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* initialize the wol settings based on the eeprom settings */
|
||||
@@ -2290,7 +2279,9 @@ static void igb_watchdog_task(struct work_struct *work)
|
||||
struct igb_ring *tx_ring = adapter->tx_ring;
|
||||
struct e1000_mac_info *mac = &adapter->hw.mac;
|
||||
u32 link;
|
||||
u32 eics = 0;
|
||||
s32 ret_val;
|
||||
int i;
|
||||
|
||||
if ((netif_carrier_ok(netdev)) &&
|
||||
(rd32(E1000_STATUS) & E1000_STATUS_LU))
|
||||
@@ -2392,7 +2383,13 @@ link_up:
|
||||
}
|
||||
|
||||
/* Cause software interrupt to ensure rx ring is cleaned */
|
||||
wr32(E1000_ICS, E1000_ICS_RXDMT0);
|
||||
if (adapter->msix_entries) {
|
||||
for (i = 0; i < adapter->num_rx_queues; i++)
|
||||
eics |= adapter->rx_ring[i].eims_value;
|
||||
wr32(E1000_EICS, eics);
|
||||
} else {
|
||||
wr32(E1000_ICS, E1000_ICS_RXDMT0);
|
||||
}
|
||||
|
||||
/* Force detection of hung controller every watchdog period */
|
||||
tx_ring->detect_tx_hung = true;
|
||||
|
||||
@@ -1636,16 +1636,17 @@ static void ixgbe_set_multi(struct net_device *netdev)
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
struct dev_mc_list *mc_ptr;
|
||||
u8 *mta_list;
|
||||
u32 fctrl;
|
||||
u32 fctrl, vlnctrl;
|
||||
int i;
|
||||
|
||||
/* Check for Promiscuous and All Multicast modes */
|
||||
|
||||
fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
|
||||
vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
|
||||
|
||||
if (netdev->flags & IFF_PROMISC) {
|
||||
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
|
||||
fctrl &= ~IXGBE_VLNCTRL_VFE;
|
||||
vlnctrl &= ~IXGBE_VLNCTRL_VFE;
|
||||
} else {
|
||||
if (netdev->flags & IFF_ALLMULTI) {
|
||||
fctrl |= IXGBE_FCTRL_MPE;
|
||||
@@ -1653,10 +1654,11 @@ static void ixgbe_set_multi(struct net_device *netdev)
|
||||
} else {
|
||||
fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
|
||||
}
|
||||
fctrl |= IXGBE_VLNCTRL_VFE;
|
||||
vlnctrl |= IXGBE_VLNCTRL_VFE;
|
||||
}
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
|
||||
|
||||
if (netdev->mc_count) {
|
||||
mta_list = kcalloc(netdev->mc_count, ETH_ALEN, GFP_ATOMIC);
|
||||
|
||||
+20
-15
@@ -55,7 +55,7 @@
|
||||
#include <asm/system.h>
|
||||
|
||||
static char mv643xx_eth_driver_name[] = "mv643xx_eth";
|
||||
static char mv643xx_eth_driver_version[] = "1.2";
|
||||
static char mv643xx_eth_driver_version[] = "1.3";
|
||||
|
||||
#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
|
||||
#define MV643XX_ETH_NAPI
|
||||
@@ -474,11 +474,19 @@ static void rxq_refill(struct rx_queue *rxq)
|
||||
/*
|
||||
* Reserve 2+14 bytes for an ethernet header (the
|
||||
* hardware automatically prepends 2 bytes of dummy
|
||||
* data to each received packet), 4 bytes for a VLAN
|
||||
* header, and 4 bytes for the trailing FCS -- 24
|
||||
* bytes total.
|
||||
* data to each received packet), 16 bytes for up to
|
||||
* four VLAN tags, and 4 bytes for the trailing FCS
|
||||
* -- 36 bytes total.
|
||||
*/
|
||||
skb_size = mp->dev->mtu + 24;
|
||||
skb_size = mp->dev->mtu + 36;
|
||||
|
||||
/*
|
||||
* Make sure that the skb size is a multiple of 8
|
||||
* bytes, as the lower three bits of the receive
|
||||
* descriptor's buffer size field are ignored by
|
||||
* the hardware.
|
||||
*/
|
||||
skb_size = (skb_size + 7) & ~7;
|
||||
|
||||
skb = dev_alloc_skb(skb_size + dma_get_cache_alignment() - 1);
|
||||
if (skb == NULL)
|
||||
@@ -509,10 +517,8 @@ static void rxq_refill(struct rx_queue *rxq)
|
||||
skb_reserve(skb, 2);
|
||||
}
|
||||
|
||||
if (rxq->rx_desc_count != rxq->rx_ring_size) {
|
||||
rxq->rx_oom.expires = jiffies + (HZ / 10);
|
||||
add_timer(&rxq->rx_oom);
|
||||
}
|
||||
if (rxq->rx_desc_count != rxq->rx_ring_size)
|
||||
mod_timer(&rxq->rx_oom, jiffies + (HZ / 10));
|
||||
|
||||
spin_unlock_irqrestore(&mp->lock, flags);
|
||||
}
|
||||
@@ -529,7 +535,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)
|
||||
int rx;
|
||||
|
||||
rx = 0;
|
||||
while (rx < budget) {
|
||||
while (rx < budget && rxq->rx_desc_count) {
|
||||
struct rx_desc *rx_desc;
|
||||
unsigned int cmd_sts;
|
||||
struct sk_buff *skb;
|
||||
@@ -554,7 +560,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)
|
||||
spin_unlock_irqrestore(&mp->lock, flags);
|
||||
|
||||
dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
|
||||
mp->dev->mtu + 24, DMA_FROM_DEVICE);
|
||||
rx_desc->buf_size, DMA_FROM_DEVICE);
|
||||
rxq->rx_desc_count--;
|
||||
rx++;
|
||||
|
||||
@@ -636,9 +642,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
|
||||
txq_reclaim(mp->txq + i, 0);
|
||||
|
||||
if (netif_carrier_ok(mp->dev)) {
|
||||
spin_lock(&mp->lock);
|
||||
spin_lock_irq(&mp->lock);
|
||||
__txq_maybe_wake(mp->txq + mp->txq_primary);
|
||||
spin_unlock(&mp->lock);
|
||||
spin_unlock_irq(&mp->lock);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -650,8 +656,6 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
if (rx < budget) {
|
||||
netif_rx_complete(mp->dev, napi);
|
||||
wrl(mp, INT_CAUSE(mp->port_num), 0);
|
||||
wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
|
||||
wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
|
||||
}
|
||||
|
||||
@@ -1796,6 +1800,7 @@ static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
|
||||
*/
|
||||
#ifdef MV643XX_ETH_NAPI
|
||||
if (int_cause & INT_RX) {
|
||||
wrl(mp, INT_CAUSE(mp->port_num), ~(int_cause & INT_RX));
|
||||
wrl(mp, INT_MASK(mp->port_num), 0x00000000);
|
||||
rdl(mp, INT_MASK(mp->port_num));
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
#include "myri10ge_mcp.h"
|
||||
#include "myri10ge_mcp_gen_header.h"
|
||||
|
||||
#define MYRI10GE_VERSION_STR "1.3.99-1.347"
|
||||
#define MYRI10GE_VERSION_STR "1.4.3-1.358"
|
||||
|
||||
MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
|
||||
MODULE_AUTHOR("Maintainer: help@myri.com");
|
||||
|
||||
+1
-1
@@ -2792,7 +2792,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
|
||||
pkt_size, PCI_DMA_FROMDEVICE);
|
||||
rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
|
||||
} else {
|
||||
pci_unmap_single(pdev, addr, pkt_size,
|
||||
pci_unmap_single(pdev, addr, tp->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
tp->Rx_skbuff[entry] = NULL;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user