2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 08:38:24 +08:00

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

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
  tg3: Fix single-vector MSI-X code
  openvswitch: Fix multipart datapath dumps.
  ipv6: fix per device IP snmp counters
  inetpeer: initialize ->redirect_genid in inet_getpeer()
  net: fix NULL-deref in WARN() in skb_gso_segment()
  net: WARN if skb_checksum_help() is called on skb requiring segmentation
  caif: Remove bad WARN_ON in caif_dev
  caif: Fix typo in Vendor/Product-ID for CAIF modems
  bnx2x: Disable AN KR work-around for BCM57810
  bnx2x: Remove AutoGrEEEn for BCM84833
  bnx2x: Remove 100Mb force speed for BCM84833
  bnx2x: Fix PFC setting on BCM57840
  bnx2x: Fix Super-Isolate mode for BCM84833
  net: fix some sparse errors
  net: kill duplicate included header
  net: sh-eth: Fix build error by the value which is not defined
  net: Use device model to get driver name in skb_gso_segment()
  bridge: BH already disabled in br_fdb_cleanup()
  net: move sock_update_memcg outside of CONFIG_INET
  mwl8k: Fixing Sparse ENDIAN CHECK warning
  ...
This commit is contained in:
Linus Torvalds 2012-01-17 22:26:41 -08:00
commit ccb19d263f
58 changed files with 437 additions and 388 deletions

View File

@ -447,6 +447,9 @@ Your cooperation is appreciated.
234 = /dev/btrfs-control Btrfs control device 234 = /dev/btrfs-control Btrfs control device
235 = /dev/autofs Autofs control device 235 = /dev/autofs Autofs control device
236 = /dev/mapper/control Device-Mapper control device 236 = /dev/mapper/control Device-Mapper control device
237 = /dev/loop-control Loopback control device
238 = /dev/vhost-net Host kernel accelerator for virtio net
240-254 Reserved for local use 240-254 Reserved for local use
255 Reserved for MISC_DYNAMIC_MINOR 255 Reserved for MISC_DYNAMIC_MINOR

View File

@ -1412,6 +1412,7 @@ F: net/ax25/
B43 WIRELESS DRIVER B43 WIRELESS DRIVER
M: Stefano Brivio <stefano.brivio@polimi.it> M: Stefano Brivio <stefano.brivio@polimi.it>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
L: b43-dev@lists.infradead.org (moderated for non-subscribers)
W: http://linuxwireless.org/en/users/Drivers/b43 W: http://linuxwireless.org/en/users/Drivers/b43
S: Maintained S: Maintained
F: drivers/net/wireless/b43/ F: drivers/net/wireless/b43/
@ -1588,6 +1589,13 @@ L: linux-scsi@vger.kernel.org
S: Supported S: Supported
F: drivers/scsi/bnx2fc/ F: drivers/scsi/bnx2fc/
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <zajec5@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/
BROCADE BFA FC SCSI DRIVER BROCADE BFA FC SCSI DRIVER
M: Jing Huang <huangj@brocade.com> M: Jing Huang <huangj@brocade.com>
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
@ -6117,13 +6125,6 @@ S: Maintained
F: drivers/ssb/ F: drivers/ssb/
F: include/linux/ssb/ F: include/linux/ssb/
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <zajec5@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/
SONY VAIO CONTROL DEVICE DRIVER SONY VAIO CONTROL DEVICE DRIVER
M: Mattia Dongili <malattia@linux.it> M: Mattia Dongili <malattia@linux.it>
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org

View File

@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
struct bcma_device *core_cc, struct bcma_device *core_cc,
struct bcma_device *core_mips); struct bcma_device *core_mips);
#ifdef CONFIG_PM #ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus);
int bcma_bus_resume(struct bcma_bus *bus); int bcma_bus_resume(struct bcma_bus *bus);
#endif #endif

View File

@ -235,38 +235,32 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state) static int bcma_host_pci_suspend(struct device *dev)
{ {
/* Host specific */ struct pci_dev *pdev = to_pci_dev(dev);
pci_save_state(dev); struct bcma_bus *bus = pci_get_drvdata(pdev);
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
return 0; bus->mapped_core = NULL;
return bcma_bus_suspend(bus);
} }
static int bcma_host_pci_resume(struct pci_dev *dev) static int bcma_host_pci_resume(struct device *dev)
{ {
struct bcma_bus *bus = pci_get_drvdata(dev); struct pci_dev *pdev = to_pci_dev(dev);
int err; struct bcma_bus *bus = pci_get_drvdata(pdev);
/* Host specific */ return bcma_bus_resume(bus);
pci_set_power_state(dev, 0);
err = pci_enable_device(dev);
if (err)
return err;
pci_restore_state(dev);
/* Bus specific */
err = bcma_bus_resume(bus);
if (err)
return err;
return 0;
} }
static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend,
bcma_host_pci_resume);
#define BCMA_PM_OPS (&bcma_pm_ops)
#else /* CONFIG_PM */ #else /* CONFIG_PM */
# define bcma_host_pci_suspend NULL
# define bcma_host_pci_resume NULL #define BCMA_PM_OPS NULL
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = { static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
@ -284,8 +278,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
.id_table = bcma_pci_bridge_tbl, .id_table = bcma_pci_bridge_tbl,
.probe = bcma_host_pci_probe, .probe = bcma_host_pci_probe,
.remove = bcma_host_pci_remove, .remove = bcma_host_pci_remove,
.suspend = bcma_host_pci_suspend, .driver.pm = BCMA_PM_OPS,
.resume = bcma_host_pci_resume,
}; };
int __init bcma_host_pci_init(void) int __init bcma_host_pci_init(void)

View File

@ -241,6 +241,21 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus)
{
struct bcma_device *core;
list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->suspend)
adrv->suspend(core);
}
}
return 0;
}
int bcma_bus_resume(struct bcma_bus *bus) int bcma_bus_resume(struct bcma_bus *bus)
{ {
struct bcma_device *core; struct bcma_device *core;
@ -252,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus)
bcma_core_chipcommon_init(&bus->drv_cc); bcma_core_chipcommon_init(&bus->drv_cc);
} }
list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->resume)
adrv->resume(core);
}
}
return 0; return 0;
} }
#endif #endif

View File

@ -365,13 +365,18 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx); DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx);
if (cmd->autoneg == AUTONEG_ENABLE) { if (cmd->autoneg == AUTONEG_ENABLE) {
u32 an_supported_speed = bp->port.supported[cfg_idx];
if (bp->link_params.phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
an_supported_speed |= (SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full);
if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) { if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) {
DP(NETIF_MSG_LINK, "Autoneg not supported\n"); DP(NETIF_MSG_LINK, "Autoneg not supported\n");
return -EINVAL; return -EINVAL;
} }
/* advertise the requested speed and duplex if supported */ /* advertise the requested speed and duplex if supported */
if (cmd->advertising & ~(bp->port.supported[cfg_idx])) { if (cmd->advertising & ~an_supported_speed) {
DP(NETIF_MSG_LINK, "Advertisement parameters " DP(NETIF_MSG_LINK, "Advertisement parameters "
"are not supported\n"); "are not supported\n");
return -EINVAL; return -EINVAL;

View File

@ -2502,7 +2502,7 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
struct bnx2x_nig_brb_pfc_port_params *nig_params) struct bnx2x_nig_brb_pfc_port_params *nig_params)
{ {
u32 xcm_mask = 0, ppp_enable = 0, pause_enable = 0, llfc_out_en = 0; u32 xcm_mask = 0, ppp_enable = 0, pause_enable = 0, llfc_out_en = 0;
u32 llfc_enable = 0, xcm0_out_en = 0, p0_hwpfc_enable = 0; u32 llfc_enable = 0, xcm_out_en = 0, hwpfc_enable = 0;
u32 pkt_priority_to_cos = 0; u32 pkt_priority_to_cos = 0;
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
u8 port = params->port; u8 port = params->port;
@ -2516,9 +2516,8 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
* MAC control frames (that are not pause packets) * MAC control frames (that are not pause packets)
* will be forwarded to the XCM. * will be forwarded to the XCM.
*/ */
xcm_mask = REG_RD(bp, xcm_mask = REG_RD(bp, port ? NIG_REG_LLH1_XCM_MASK :
port ? NIG_REG_LLH1_XCM_MASK : NIG_REG_LLH0_XCM_MASK);
NIG_REG_LLH0_XCM_MASK);
/* /*
* nig params will override non PFC params, since it's possible to * nig params will override non PFC params, since it's possible to
* do transition from PFC to SAFC * do transition from PFC to SAFC
@ -2533,8 +2532,8 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
ppp_enable = 1; ppp_enable = 1;
xcm_mask &= ~(port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN : xcm_mask &= ~(port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN :
NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN); NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN);
xcm0_out_en = 0; xcm_out_en = 0;
p0_hwpfc_enable = 1; hwpfc_enable = 1;
} else { } else {
if (nig_params) { if (nig_params) {
llfc_out_en = nig_params->llfc_out_en; llfc_out_en = nig_params->llfc_out_en;
@ -2545,7 +2544,7 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
xcm_mask |= (port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN : xcm_mask |= (port ? NIG_LLH1_XCM_MASK_REG_LLH1_XCM_MASK_BCN :
NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN); NIG_LLH0_XCM_MASK_REG_LLH0_XCM_MASK_BCN);
xcm0_out_en = 1; xcm_out_en = 1;
} }
if (CHIP_IS_E3(bp)) if (CHIP_IS_E3(bp))
@ -2564,13 +2563,16 @@ static void bnx2x_update_pfc_nig(struct link_params *params,
REG_WR(bp, port ? NIG_REG_LLH1_XCM_MASK : REG_WR(bp, port ? NIG_REG_LLH1_XCM_MASK :
NIG_REG_LLH0_XCM_MASK, xcm_mask); NIG_REG_LLH0_XCM_MASK, xcm_mask);
REG_WR(bp, NIG_REG_LLFC_EGRESS_SRC_ENABLE_0, 0x7); REG_WR(bp, port ? NIG_REG_LLFC_EGRESS_SRC_ENABLE_1 :
NIG_REG_LLFC_EGRESS_SRC_ENABLE_0, 0x7);
/* output enable for RX_XCM # IF */ /* output enable for RX_XCM # IF */
REG_WR(bp, NIG_REG_XCM0_OUT_EN, xcm0_out_en); REG_WR(bp, port ? NIG_REG_XCM1_OUT_EN :
NIG_REG_XCM0_OUT_EN, xcm_out_en);
/* HW PFC TX enable */ /* HW PFC TX enable */
REG_WR(bp, NIG_REG_P0_HWPFC_ENABLE, p0_hwpfc_enable); REG_WR(bp, port ? NIG_REG_P1_HWPFC_ENABLE :
NIG_REG_P0_HWPFC_ENABLE, hwpfc_enable);
if (nig_params) { if (nig_params) {
u8 i = 0; u8 i = 0;
@ -3761,7 +3763,15 @@ static void bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy,
/* Advertise pause */ /* Advertise pause */
bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_ext_phy_set_pause(params, phy, vars);
vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY; /*
* Set KR Autoneg Work-Around flag for Warpcore version older than D108
*/
bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
MDIO_WC_REG_UC_INFO_B1_VERSION, &val16);
if (val16 < 0xd108) {
DP(NETIF_MSG_LINK, "Enable AN KR work-around\n");
vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY;
}
bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
MDIO_WC_REG_DIGITAL5_MISC7, &val16); MDIO_WC_REG_DIGITAL5_MISC7, &val16);
@ -9266,62 +9276,68 @@ static void bnx2x_8727_link_reset(struct bnx2x_phy *phy,
/* BCM8481/BCM84823/BCM84833 PHY SECTION */ /* BCM8481/BCM84823/BCM84833 PHY SECTION */
/******************************************************************/ /******************************************************************/
static void bnx2x_save_848xx_spirom_version(struct bnx2x_phy *phy, static void bnx2x_save_848xx_spirom_version(struct bnx2x_phy *phy,
struct link_params *params) struct bnx2x *bp,
u8 port)
{ {
u16 val, fw_ver1, fw_ver2, cnt; u16 val, fw_ver1, fw_ver2, cnt;
u8 port;
struct bnx2x *bp = params->bp;
port = params->port; if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, 0x400f, &fw_ver1);
bnx2x_save_spirom_version(bp, port,
((fw_ver1 & 0xf000)>>5) | (fw_ver1 & 0x7f),
phy->ver_addr);
} else {
/* For 32-bit registers in 848xx, access via MDIO2ARM i/f. */
/* (1) set reg 0xc200_0014(SPI_BRIDGE_CTRL_2) to 0x03000000 */
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0014);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81B, 0x0000);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81C, 0x0300);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x0009);
/* For the 32 bits registers in 848xx, access via MDIO2ARM interface.*/ for (cnt = 0; cnt < 100; cnt++) {
/* (1) set register 0xc200_0014(SPI_BRIDGE_CTRL_2) to 0x03000000 */ bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0014); if (val & 1)
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200); break;
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81B, 0x0000); udelay(5);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81C, 0x0300); }
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x0009); if (cnt == 100) {
DP(NETIF_MSG_LINK, "Unable to read 848xx "
"phy fw version(1)\n");
bnx2x_save_spirom_version(bp, port, 0,
phy->ver_addr);
return;
}
for (cnt = 0; cnt < 100; cnt++) {
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val); /* 2) read register 0xc200_0000 (SPI_FW_STATUS) */
if (val & 1) bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0000);
break; bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
udelay(5); bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x000A);
} for (cnt = 0; cnt < 100; cnt++) {
if (cnt == 100) { bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw version(1)\n"); if (val & 1)
bnx2x_save_spirom_version(bp, port, 0, break;
udelay(5);
}
if (cnt == 100) {
DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw "
"version(2)\n");
bnx2x_save_spirom_version(bp, port, 0,
phy->ver_addr);
return;
}
/* lower 16 bits of the register SPI_FW_STATUS */
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81B, &fw_ver1);
/* upper 16 bits of register SPI_FW_STATUS */
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81C, &fw_ver2);
bnx2x_save_spirom_version(bp, port, (fw_ver2<<16) | fw_ver1,
phy->ver_addr); phy->ver_addr);
return;
} }
/* 2) read register 0xc200_0000 (SPI_FW_STATUS) */
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0000);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200);
bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x000A);
for (cnt = 0; cnt < 100; cnt++) {
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val);
if (val & 1)
break;
udelay(5);
}
if (cnt == 100) {
DP(NETIF_MSG_LINK, "Unable to read 848xx phy fw version(2)\n");
bnx2x_save_spirom_version(bp, port, 0,
phy->ver_addr);
return;
}
/* lower 16 bits of the register SPI_FW_STATUS */
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81B, &fw_ver1);
/* upper 16 bits of register SPI_FW_STATUS */
bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81C, &fw_ver2);
bnx2x_save_spirom_version(bp, port, (fw_ver2<<16) | fw_ver1,
phy->ver_addr);
} }
static void bnx2x_848xx_set_led(struct bnx2x *bp, static void bnx2x_848xx_set_led(struct bnx2x *bp,
struct bnx2x_phy *phy) struct bnx2x_phy *phy)
{ {
@ -9392,10 +9408,13 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
u16 tmp_req_line_speed; u16 tmp_req_line_speed;
tmp_req_line_speed = phy->req_line_speed; tmp_req_line_speed = phy->req_line_speed;
if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
if (phy->req_line_speed == SPEED_10000) if (phy->req_line_speed == SPEED_10000)
phy->req_line_speed = SPEED_AUTO_NEG; phy->req_line_speed = SPEED_AUTO_NEG;
} else {
/* Save spirom version */
bnx2x_save_848xx_spirom_version(phy, bp, params->port);
}
/* /*
* This phy uses the NIG latch mechanism since link indication * This phy uses the NIG latch mechanism since link indication
* arrives through its LED4 and not via its LASI signal, so we * arrives through its LED4 and not via its LASI signal, so we
@ -9443,13 +9462,10 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
an_1000_val); an_1000_val);
/* set 100 speed advertisement */ /* set 100 speed advertisement */
if (((phy->req_line_speed == SPEED_AUTO_NEG) && if ((phy->req_line_speed == SPEED_AUTO_NEG) &&
(phy->speed_cap_mask & (phy->speed_cap_mask &
(PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL | (PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL |
PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF)) && PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF))) {
(phy->supported &
(SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full)))) {
an_10_100_val |= (1<<7); an_10_100_val |= (1<<7);
/* Enable autoneg and restart autoneg for legacy speeds */ /* Enable autoneg and restart autoneg for legacy speeds */
autoneg_val |= (1<<9 | 1<<12); autoneg_val |= (1<<9 | 1<<12);
@ -9539,9 +9555,6 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, MDIO_AN_REG_8481_10GBASE_T_AN_CTRL,
1); 1);
/* Save spirom version */
bnx2x_save_848xx_spirom_version(phy, params);
phy->req_line_speed = tmp_req_line_speed; phy->req_line_speed = tmp_req_line_speed;
return 0; return 0;
@ -9749,17 +9762,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
/* Wait for GPHY to come out of reset */ /* Wait for GPHY to come out of reset */
msleep(50); msleep(50);
if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) { if (phy->type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
/* Bring PHY out of super isolate mode */
bnx2x_cl45_read(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
val &= ~MDIO_84833_SUPER_ISOLATE;
bnx2x_cl45_write(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
bnx2x_84833_pair_swap_cfg(phy, params, vars);
} else {
/* /*
* BCM84823 requires that XGXS links up first @ 10G for normal * BCM84823 requires that XGXS links up first @ 10G for normal
* behavior. * behavior.
@ -9816,24 +9819,23 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
DP(NETIF_MSG_LINK, "Multi_phy config = 0x%x, Media control = 0x%x\n", DP(NETIF_MSG_LINK, "Multi_phy config = 0x%x, Media control = 0x%x\n",
params->multi_phy_config, val); params->multi_phy_config, val);
/* AutogrEEEn */ if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
if (params->feature_config_flags & bnx2x_84833_pair_swap_cfg(phy, params, vars);
FEATURE_CONFIG_AUTOGREEEN_ENABLED)
cmd_args[0] = 0x2;
else
cmd_args[0] = 0x0;
cmd_args[1] = 0x0; /* Keep AutogrEEEn disabled. */
cmd_args[2] = PHY84833_CONSTANT_LATENCY + 1; cmd_args[0] = 0x0;
cmd_args[3] = PHY84833_CONSTANT_LATENCY; cmd_args[1] = 0x0;
rc = bnx2x_84833_cmd_hdlr(phy, params, cmd_args[2] = PHY84833_CONSTANT_LATENCY + 1;
PHY84833_CMD_SET_EEE_MODE, cmd_args); cmd_args[3] = PHY84833_CONSTANT_LATENCY;
if (rc != 0) rc = bnx2x_84833_cmd_hdlr(phy, params,
DP(NETIF_MSG_LINK, "Cfg AutogrEEEn failed.\n"); PHY84833_CMD_SET_EEE_MODE, cmd_args);
if (rc != 0)
DP(NETIF_MSG_LINK, "Cfg AutogrEEEn failed.\n");
}
if (initialize) if (initialize)
rc = bnx2x_848xx_cmn_config_init(phy, params, vars); rc = bnx2x_848xx_cmn_config_init(phy, params, vars);
else else
bnx2x_save_848xx_spirom_version(phy, params); bnx2x_save_848xx_spirom_version(phy, bp, params->port);
/* 84833 PHY has a better feature and doesn't need to support this. */ /* 84833 PHY has a better feature and doesn't need to support this. */
if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823) { if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823) {
cms_enable = REG_RD(bp, params->shmem_base + cms_enable = REG_RD(bp, params->shmem_base +
@ -9851,6 +9853,16 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
MDIO_CTL_REG_84823_USER_CTRL_REG, val); MDIO_CTL_REG_84823_USER_CTRL_REG, val);
} }
if (phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) {
/* Bring PHY out of super isolate mode as the final step. */
bnx2x_cl45_read(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
val &= ~MDIO_84833_SUPER_ISOLATE;
bnx2x_cl45_write(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
}
return rc; return rc;
} }
@ -9988,10 +10000,11 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy,
} else { } else {
bnx2x_cl45_read(bp, phy, bnx2x_cl45_read(bp, phy,
MDIO_CTL_DEVAD, MDIO_CTL_DEVAD,
0x400f, &val16); MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val16);
val16 |= MDIO_84833_SUPER_ISOLATE;
bnx2x_cl45_write(bp, phy, bnx2x_cl45_write(bp, phy,
MDIO_PMA_DEVAD, MDIO_CTL_DEVAD,
MDIO_PMA_REG_CTRL, 0x800); MDIO_84833_TOP_CFG_XGPHY_STRAP1, val16);
} }
} }
@ -11516,6 +11529,19 @@ static int bnx2x_populate_ext_phy(struct bnx2x *bp,
} }
phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port); phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port);
if ((phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) &&
(phy->ver_addr)) {
/*
* Remove 100Mb link supported for BCM84833 when phy fw
* version lower than or equal to 1.39
*/
u32 raw_ver = REG_RD(bp, phy->ver_addr);
if (((raw_ver & 0x7F) <= 39) &&
(((raw_ver & 0xF80) >> 7) <= 1))
phy->supported &= ~(SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full);
}
/* /*
* In case mdc/mdio_access of the external phy is different than the * In case mdc/mdio_access of the external phy is different than the
* mdc/mdio access of the XGXS, a HW lock must be taken in each access * mdc/mdio access of the XGXS, a HW lock must be taken in each access
@ -12333,55 +12359,69 @@ static int bnx2x_84833_common_init_phy(struct bnx2x *bp,
u32 chip_id) u32 chip_id)
{ {
u8 reset_gpios; u8 reset_gpios;
struct bnx2x_phy phy;
u32 shmem_base, shmem2_base, cnt;
s8 port = 0;
u16 val;
reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, chip_id); reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, chip_id);
bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW); bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW);
udelay(10); udelay(10);
bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_HIGH); bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_HIGH);
DP(NETIF_MSG_LINK, "84833 reset pulse on pin values 0x%x\n", DP(NETIF_MSG_LINK, "84833 reset pulse on pin values 0x%x\n",
reset_gpios); reset_gpios);
for (port = PORT_MAX - 1; port >= PORT_0; port--) {
/* This PHY is for E2 and E3. */
shmem_base = shmem_base_path[port];
shmem2_base = shmem2_base_path[port];
/* Extract the ext phy address for the port */
if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base,
0, &phy) !=
0) {
DP(NETIF_MSG_LINK, "populate_phy failed\n");
return -EINVAL;
}
/* Wait for FW completing its initialization. */
for (cnt = 0; cnt < 1000; cnt++) {
bnx2x_cl45_read(bp, &phy,
MDIO_PMA_DEVAD,
MDIO_PMA_REG_CTRL, &val);
if (!(val & (1<<15)))
break;
msleep(1);
}
if (cnt >= 1000)
DP(NETIF_MSG_LINK,
"84833 Cmn reset timeout (%d)\n", port);
/* Put the port in super isolate mode. */
bnx2x_cl45_read(bp, &phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
val |= MDIO_84833_SUPER_ISOLATE;
bnx2x_cl45_write(bp, &phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
}
return 0; return 0;
} }
static int bnx2x_84833_pre_init_phy(struct bnx2x *bp,
struct bnx2x_phy *phy)
{
u16 val, cnt;
/* Wait for FW completing its initialization. */
for (cnt = 0; cnt < 1500; cnt++) {
bnx2x_cl45_read(bp, phy,
MDIO_PMA_DEVAD,
MDIO_PMA_REG_CTRL, &val);
if (!(val & (1<<15)))
break;
msleep(1);
}
if (cnt >= 1500) {
DP(NETIF_MSG_LINK, "84833 reset timeout\n");
return -EINVAL;
}
/* Put the port in super isolate mode. */
bnx2x_cl45_read(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
val |= MDIO_84833_SUPER_ISOLATE;
bnx2x_cl45_write(bp, phy,
MDIO_CTL_DEVAD,
MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
/* Save spirom version */
bnx2x_save_848xx_spirom_version(phy, bp, PORT_0);
return 0;
}
int bnx2x_pre_init_phy(struct bnx2x *bp,
u32 shmem_base,
u32 shmem2_base,
u32 chip_id)
{
int rc = 0;
struct bnx2x_phy phy;
bnx2x_set_mdio_clk(bp, chip_id, PORT_0);
if (bnx2x_populate_phy(bp, EXT_PHY1, shmem_base, shmem2_base,
PORT_0, &phy)) {
DP(NETIF_MSG_LINK, "populate_phy failed\n");
return -EINVAL;
}
switch (phy.type) {
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833:
rc = bnx2x_84833_pre_init_phy(bp, &phy);
break;
default:
break;
}
return rc;
}
static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[], static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[],
u32 shmem2_base_path[], u8 phy_index, u32 shmem2_base_path[], u8 phy_index,

View File

@ -2176,6 +2176,7 @@
* set to 0x345678021. This is a new register (with 2_) added in E3 B0 to * set to 0x345678021. This is a new register (with 2_) added in E3 B0 to
* accommodate the 9 input clients to ETS arbiter. */ * accommodate the 9 input clients to ETS arbiter. */
#define NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB 0x18684 #define NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB 0x18684
#define NIG_REG_P1_HWPFC_ENABLE 0x181d0
#define NIG_REG_P1_MAC_IN_EN 0x185c0 #define NIG_REG_P1_MAC_IN_EN 0x185c0
/* [RW 1] Output enable for TX MAC interface */ /* [RW 1] Output enable for TX MAC interface */
#define NIG_REG_P1_MAC_OUT_EN 0x185c4 #define NIG_REG_P1_MAC_OUT_EN 0x185c4

View File

@ -8846,9 +8846,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
udelay(100); udelay(100);
if (tg3_flag(tp, USING_MSIX) && tp->irq_cnt > 1) { if (tg3_flag(tp, USING_MSIX)) {
val = tr32(MSGINT_MODE); val = tr32(MSGINT_MODE);
val |= MSGINT_MODE_MULTIVEC_EN | MSGINT_MODE_ENABLE; val |= MSGINT_MODE_ENABLE;
if (tp->irq_cnt > 1)
val |= MSGINT_MODE_MULTIVEC_EN;
if (!tg3_flag(tp, 1SHOT_MSI)) if (!tg3_flag(tp, 1SHOT_MSI))
val |= MSGINT_MODE_ONE_SHOT_DISABLE; val |= MSGINT_MODE_ONE_SHOT_DISABLE;
tw32(MSGINT_MODE, val); tw32(MSGINT_MODE, val);
@ -9548,19 +9550,18 @@ static int tg3_request_firmware(struct tg3 *tp)
static bool tg3_enable_msix(struct tg3 *tp) static bool tg3_enable_msix(struct tg3 *tp)
{ {
int i, rc, cpus = num_online_cpus(); int i, rc;
struct msix_entry msix_ent[tp->irq_max]; struct msix_entry msix_ent[tp->irq_max];
if (cpus == 1) tp->irq_cnt = num_online_cpus();
/* Just fallback to the simpler MSI mode. */ if (tp->irq_cnt > 1) {
return false; /* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
/* * only deals with link interrupts, etc, so we add
* We want as many rx rings enabled as there are cpus. * one to the number of vectors we are requesting.
* The first MSIX vector only deals with link interrupts, etc, */
* so we add one to the number of vectors we are requesting. tp->irq_cnt = min_t(unsigned, tp->irq_cnt + 1, tp->irq_max);
*/ }
tp->irq_cnt = min_t(unsigned, cpus + 1, tp->irq_max);
for (i = 0; i < tp->irq_max; i++) { for (i = 0; i < tp->irq_max; i++) {
msix_ent[i].entry = i; msix_ent[i].entry = i;

View File

@ -263,7 +263,7 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
data[i++] = atomic_read(&port->port_res[k].swqe_avail); data[i++] = atomic_read(&port->port_res[k].swqe_avail);
} }
const struct ethtool_ops ehea_ethtool_ops = { static const struct ethtool_ops ehea_ethtool_ops = {
.get_settings = ehea_get_settings, .get_settings = ehea_get_settings,
.get_drvinfo = ehea_get_drvinfo, .get_drvinfo = ehea_get_drvinfo,
.get_msglevel = ehea_get_msglevel, .get_msglevel = ehea_get_msglevel,

View File

@ -94,8 +94,8 @@ static int port_name_cnt;
static LIST_HEAD(adapter_list); static LIST_HEAD(adapter_list);
static unsigned long ehea_driver_flags; static unsigned long ehea_driver_flags;
static DEFINE_MUTEX(dlpar_mem_lock); static DEFINE_MUTEX(dlpar_mem_lock);
struct ehea_fw_handle_array ehea_fw_handles; static struct ehea_fw_handle_array ehea_fw_handles;
struct ehea_bcmc_reg_array ehea_bcmc_regs; static struct ehea_bcmc_reg_array ehea_bcmc_regs;
static int __devinit ehea_probe_adapter(struct platform_device *dev, static int __devinit ehea_probe_adapter(struct platform_device *dev,
@ -133,7 +133,7 @@ void ehea_dump(void *adr, int len, char *msg)
} }
} }
void ehea_schedule_port_reset(struct ehea_port *port) static void ehea_schedule_port_reset(struct ehea_port *port)
{ {
if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags)) if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags))
schedule_work(&port->reset_task); schedule_work(&port->reset_task);
@ -1404,7 +1404,7 @@ out:
return ret; return ret;
} }
int ehea_gen_smrs(struct ehea_port_res *pr) static int ehea_gen_smrs(struct ehea_port_res *pr)
{ {
int ret; int ret;
struct ehea_adapter *adapter = pr->port->adapter; struct ehea_adapter *adapter = pr->port->adapter;
@ -1426,7 +1426,7 @@ out:
return -EIO; return -EIO;
} }
int ehea_rem_smrs(struct ehea_port_res *pr) static int ehea_rem_smrs(struct ehea_port_res *pr)
{ {
if ((ehea_rem_mr(&pr->send_mr)) || if ((ehea_rem_mr(&pr->send_mr)) ||
(ehea_rem_mr(&pr->recv_mr))) (ehea_rem_mr(&pr->recv_mr)))
@ -2190,7 +2190,7 @@ out:
return err; return err;
} }
int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) static int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp)
{ {
int ret = -EIO; int ret = -EIO;
u64 hret; u64 hret;
@ -2531,7 +2531,7 @@ static void ehea_flush_sq(struct ehea_port *port)
} }
} }
int ehea_stop_qps(struct net_device *dev) static int ehea_stop_qps(struct net_device *dev)
{ {
struct ehea_port *port = netdev_priv(dev); struct ehea_port *port = netdev_priv(dev);
struct ehea_adapter *adapter = port->adapter; struct ehea_adapter *adapter = port->adapter;
@ -2600,7 +2600,7 @@ out:
return ret; return ret;
} }
void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) static void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr)
{ {
struct ehea_qp qp = *orig_qp; struct ehea_qp qp = *orig_qp;
struct ehea_qp_init_attr *init_attr = &qp.init_attr; struct ehea_qp_init_attr *init_attr = &qp.init_attr;
@ -2633,7 +2633,7 @@ void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr)
} }
} }
int ehea_restart_qps(struct net_device *dev) static int ehea_restart_qps(struct net_device *dev)
{ {
struct ehea_port *port = netdev_priv(dev); struct ehea_port *port = netdev_priv(dev);
struct ehea_adapter *adapter = port->adapter; struct ehea_adapter *adapter = port->adapter;
@ -2824,7 +2824,7 @@ static void ehea_tx_watchdog(struct net_device *dev)
ehea_schedule_port_reset(port); ehea_schedule_port_reset(port);
} }
int ehea_sense_adapter_attr(struct ehea_adapter *adapter) static int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
{ {
struct hcp_query_ehea *cb; struct hcp_query_ehea *cb;
u64 hret; u64 hret;
@ -2852,7 +2852,7 @@ out:
return ret; return ret;
} }
int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo) static int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo)
{ {
struct hcp_ehea_port_cb4 *cb4; struct hcp_ehea_port_cb4 *cb4;
u64 hret; u64 hret;
@ -2966,7 +2966,7 @@ static const struct net_device_ops ehea_netdev_ops = {
.ndo_tx_timeout = ehea_tx_watchdog, .ndo_tx_timeout = ehea_tx_watchdog,
}; };
struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
u32 logical_port_id, u32 logical_port_id,
struct device_node *dn) struct device_node *dn)
{ {
@ -3237,7 +3237,7 @@ static ssize_t ehea_remove_port(struct device *dev,
static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
int ehea_create_device_sysfs(struct platform_device *dev) static int ehea_create_device_sysfs(struct platform_device *dev)
{ {
int ret = device_create_file(&dev->dev, &dev_attr_probe_port); int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
if (ret) if (ret)
@ -3248,7 +3248,7 @@ out:
return ret; return ret;
} }
void ehea_remove_device_sysfs(struct platform_device *dev) static void ehea_remove_device_sysfs(struct platform_device *dev)
{ {
device_remove_file(&dev->dev, &dev_attr_probe_port); device_remove_file(&dev->dev, &dev_attr_probe_port);
device_remove_file(&dev->dev, &dev_attr_remove_port); device_remove_file(&dev->dev, &dev_attr_remove_port);
@ -3379,7 +3379,7 @@ static int __devexit ehea_remove(struct platform_device *dev)
return 0; return 0;
} }
void ehea_crash_handler(void) static void ehea_crash_handler(void)
{ {
int i; int i;
@ -3491,7 +3491,7 @@ static ssize_t ehea_show_capabilities(struct device_driver *drv,
static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
ehea_show_capabilities, NULL); ehea_show_capabilities, NULL);
int __init ehea_module_init(void) static int __init ehea_module_init(void)
{ {
int ret; int ret;

View File

@ -34,9 +34,7 @@
#include "ehea_phyp.h" #include "ehea_phyp.h"
#include "ehea_qmr.h" #include "ehea_qmr.h"
struct ehea_bmap *ehea_bmap = NULL; static struct ehea_bmap *ehea_bmap;
static void *hw_qpageit_get_inc(struct hw_queue *queue) static void *hw_qpageit_get_inc(struct hw_queue *queue)
{ {
@ -212,7 +210,7 @@ out_nomem:
return NULL; return NULL;
} }
u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force) static u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force)
{ {
u64 hret; u64 hret;
u64 adapter_handle = cq->adapter->handle; u64 adapter_handle = cq->adapter->handle;
@ -337,7 +335,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
return eqe; return eqe;
} }
u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) static u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force)
{ {
u64 hret; u64 hret;
unsigned long flags; unsigned long flags;
@ -381,7 +379,7 @@ int ehea_destroy_eq(struct ehea_eq *eq)
/** /**
* allocates memory for a queue and registers pages in phyp * allocates memory for a queue and registers pages in phyp
*/ */
int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
int nr_pages, int wqe_size, int act_nr_sges, int nr_pages, int wqe_size, int act_nr_sges,
struct ehea_adapter *adapter, int h_call_q_selector) struct ehea_adapter *adapter, int h_call_q_selector)
{ {
@ -516,7 +514,7 @@ out_freemem:
return NULL; return NULL;
} }
u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) static u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force)
{ {
u64 hret; u64 hret;
struct ehea_qp_init_attr *qp_attr = &qp->init_attr; struct ehea_qp_init_attr *qp_attr = &qp->init_attr;
@ -976,7 +974,7 @@ int ehea_gen_smr(struct ehea_adapter *adapter, struct ehea_mr *old_mr,
return 0; return 0;
} }
void print_error_data(u64 *data) static void print_error_data(u64 *data)
{ {
int length; int length;
u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]); u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]);

View File

@ -1703,7 +1703,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
mdp->mii_bus->name = "sh_mii"; mdp->mii_bus->name = "sh_mii";
mdp->mii_bus->parent = &ndev->dev; mdp->mii_bus->parent = &ndev->dev;
snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
mdp->pdev->name, pdid); mdp->pdev->name, id);
/* PHY IRQ */ /* PHY IRQ */
mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);

View File

@ -557,10 +557,11 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
rxs->rs_status |= ATH9K_RXERR_DECRYPT; rxs->rs_status |= ATH9K_RXERR_DECRYPT;
else if (rxsp->status11 & AR_MichaelErr) else if (rxsp->status11 & AR_MichaelErr)
rxs->rs_status |= ATH9K_RXERR_MIC; rxs->rs_status |= ATH9K_RXERR_MIC;
if (rxsp->status11 & AR_KeyMiss)
rxs->rs_status |= ATH9K_RXERR_KEYMISS;
} }
if (rxsp->status11 & AR_KeyMiss)
rxs->rs_status |= ATH9K_RXERR_KEYMISS;
return 0; return 0;
} }
EXPORT_SYMBOL(ath9k_hw_process_rxdesc_edma); EXPORT_SYMBOL(ath9k_hw_process_rxdesc_edma);

View File

@ -618,10 +618,11 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
rs->rs_status |= ATH9K_RXERR_DECRYPT; rs->rs_status |= ATH9K_RXERR_DECRYPT;
else if (ads.ds_rxstatus8 & AR_MichaelErr) else if (ads.ds_rxstatus8 & AR_MichaelErr)
rs->rs_status |= ATH9K_RXERR_MIC; rs->rs_status |= ATH9K_RXERR_MIC;
if (ads.ds_rxstatus8 & AR_KeyMiss)
rs->rs_status |= ATH9K_RXERR_KEYMISS;
} }
if (ads.ds_rxstatus8 & AR_KeyMiss)
rs->rs_status |= ATH9K_RXERR_KEYMISS;
return 0; return 0;
} }
EXPORT_SYMBOL(ath9k_hw_rxprocdesc); EXPORT_SYMBOL(ath9k_hw_rxprocdesc);

View File

@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw)
cancel_work_sync(&(wl->beacon_update_trigger)); cancel_work_sync(&(wl->beacon_update_trigger));
if (!dev)
goto out;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (b43_status(dev) >= B43_STAT_STARTED) { if (b43_status(dev) >= B43_STAT_STARTED) {
dev = b43_wireless_core_stop(dev); dev = b43_wireless_core_stop(dev);
@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
out_unlock: out_unlock:
mutex_unlock(&wl->mutex); mutex_unlock(&wl->mutex);
out:
cancel_work_sync(&(wl->txpower_adjust_work)); cancel_work_sync(&(wl->txpower_adjust_work));
} }

View File

@ -2475,7 +2475,7 @@ static s32 brcmf_init_iscan(struct brcmf_cfg80211_priv *cfg_priv)
return err; return err;
} }
static void brcmf_delay(u32 ms) static __always_inline void brcmf_delay(u32 ms)
{ {
if (ms < 1000 / HZ) { if (ms < 1000 / HZ) {
cond_resched(); cond_resched();

View File

@ -1128,14 +1128,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
return 0; return 0;
} }
static int brcms_pci_suspend(struct pci_dev *pdev) static int brcms_suspend(struct bcma_device *pdev)
{
pci_save_state(pdev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}
static int brcms_suspend(struct bcma_device *pdev, pm_message_t state)
{ {
struct brcms_info *wl; struct brcms_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
@ -1153,40 +1146,15 @@ static int brcms_suspend(struct bcma_device *pdev, pm_message_t state)
wl->pub->hw_up = false; wl->pub->hw_up = false;
spin_unlock_bh(&wl->lock); spin_unlock_bh(&wl->lock);
/* temporarily do suspend ourselves */ pr_debug("brcms_suspend ok\n");
return brcms_pci_suspend(pdev->bus->host_pci);
}
static int brcms_pci_resume(struct pci_dev *pdev)
{
int err = 0;
uint val;
err = pci_set_power_state(pdev, PCI_D0);
if (err)
return err;
pci_restore_state(pdev);
err = pci_enable_device(pdev);
if (err)
return err;
pci_set_master(pdev);
pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
return 0; return 0;
} }
static int brcms_resume(struct bcma_device *pdev) static int brcms_resume(struct bcma_device *pdev)
{ {
/* pr_debug("brcms_resume ok\n");
* just do pci resume for now until bcma supports it. return 0;
*/
return brcms_pci_resume(pdev->bus->host_pci);
} }
static struct bcma_driver brcms_bcma_driver = { static struct bcma_driver brcms_bcma_driver = {

View File

@ -7848,7 +7848,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
* more efficiently than we can parse it. ORDER MATTERS HERE */ * more efficiently than we can parse it. ORDER MATTERS HERE */
struct ipw_rt_hdr *ipw_rt; struct ipw_rt_hdr *ipw_rt;
short len = le16_to_cpu(pkt->u.frame.length); unsigned short len = le16_to_cpu(pkt->u.frame.length);
/* We received data from the HW, so stop the watchdog */ /* We received data from the HW, so stop the watchdog */
dev->trans_start = jiffies; dev->trans_start = jiffies;
@ -8023,7 +8023,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM;
s8 noise = (s8) le16_to_cpu(frame->noise); s8 noise = (s8) le16_to_cpu(frame->noise);
u8 rate = frame->rate; u8 rate = frame->rate;
short len = le16_to_cpu(pkt->u.frame.length); unsigned short len = le16_to_cpu(pkt->u.frame.length);
struct sk_buff *skb; struct sk_buff *skb;
int hdr_only = 0; int hdr_only = 0;
u16 filter = priv->prom_priv->filter; u16 filter = priv->prom_priv->filter;

View File

@ -569,7 +569,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
struct iwl_scan_cmd *scan; struct iwl_scan_cmd *scan;
struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
u32 rate_flags = 0; u32 rate_flags = 0;
u16 cmd_len; u16 cmd_len = 0;
u16 rx_chain = 0; u16 rx_chain = 0;
enum ieee80211_band band; enum ieee80211_band band;
u8 n_probes = 0; u8 n_probes = 0;

View File

@ -2777,7 +2777,7 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw,
else if (channel->band == IEEE80211_BAND_5GHZ) else if (channel->band == IEEE80211_BAND_5GHZ)
cmd->band = cpu_to_le16(0x4); cmd->band = cpu_to_le16(0x4);
cmd->channel = channel->hw_value; cmd->channel = cpu_to_le16(channel->hw_value);
if (conf->channel_type == NL80211_CHAN_NO_HT || if (conf->channel_type == NL80211_CHAN_NO_HT ||
conf->channel_type == NL80211_CHAN_HT20) { conf->channel_type == NL80211_CHAN_HT20) {
@ -4066,7 +4066,7 @@ static int mwl8k_cmd_encryption_remove_key(struct ieee80211_hw *hw,
goto done; goto done;
if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || if (key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
WLAN_CIPHER_SUITE_WEP104) key->cipher == WLAN_CIPHER_SUITE_WEP104)
mwl8k_vif->wep_key_conf[key->keyidx].enabled = 0; mwl8k_vif->wep_key_conf[key->keyidx].enabled = 0;
cmd->action = cpu_to_le32(MWL8K_ENCR_REMOVE_KEY); cmd->action = cpu_to_le32(MWL8K_ENCR_REMOVE_KEY);

View File

@ -422,7 +422,6 @@ static int rt2800pci_init_queues(struct rt2x00_dev *rt2x00dev)
static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
enum dev_state state) enum dev_state state)
{ {
int mask = (state == STATE_RADIO_IRQ_ON);
u32 reg; u32 reg;
unsigned long flags; unsigned long flags;
@ -436,25 +435,14 @@ static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
} }
spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, &reg); reg = 0;
rt2x00_set_field32(&reg, INT_MASK_CSR_RXDELAYINT, 0); if (state == STATE_RADIO_IRQ_ON) {
rt2x00_set_field32(&reg, INT_MASK_CSR_TXDELAYINT, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, mask); rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC0_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC1_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC2_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC3_DMA_DONE, 0); }
rt2x00_set_field32(&reg, INT_MASK_CSR_HCCA_DMA_DONE, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_MGMT_DMA_DONE, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_MCU_COMMAND, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_RXTX_COHERENT, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_GPTIMER, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_RX_COHERENT, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_TX_COHERENT, 0);
rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg); rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg);
spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);

View File

@ -856,9 +856,9 @@ static const struct file_operations vhost_net_fops = {
}; };
static struct miscdevice vhost_net_misc = { static struct miscdevice vhost_net_misc = {
MISC_DYNAMIC_MINOR, .minor = VHOST_NET_MINOR,
"vhost-net", .name = "vhost-net",
&vhost_net_fops, .fops = &vhost_net_fops,
}; };
static int vhost_net_init(void) static int vhost_net_init(void)
@ -879,3 +879,5 @@ MODULE_VERSION("0.0.1");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Michael S. Tsirkin"); MODULE_AUTHOR("Michael S. Tsirkin");
MODULE_DESCRIPTION("Host kernel accelerator for virtio net"); MODULE_DESCRIPTION("Host kernel accelerator for virtio net");
MODULE_ALIAS_MISCDEV(VHOST_NET_MINOR);
MODULE_ALIAS("devname:vhost-net");

View File

@ -162,7 +162,7 @@ struct bcma_driver {
int (*probe)(struct bcma_device *dev); int (*probe)(struct bcma_device *dev);
void (*remove)(struct bcma_device *dev); void (*remove)(struct bcma_device *dev);
int (*suspend)(struct bcma_device *dev, pm_message_t state); int (*suspend)(struct bcma_device *dev);
int (*resume)(struct bcma_device *dev); int (*resume)(struct bcma_device *dev);
void (*shutdown)(struct bcma_device *dev); void (*shutdown)(struct bcma_device *dev);

View File

@ -42,6 +42,7 @@
#define AUTOFS_MINOR 235 #define AUTOFS_MINOR 235
#define MAPPER_CTRL_MINOR 236 #define MAPPER_CTRL_MINOR 236
#define LOOP_CTRL_MINOR 237 #define LOOP_CTRL_MINOR 237
#define VHOST_NET_MINOR 238
#define MISC_DYNAMIC_MINOR 255 #define MISC_DYNAMIC_MINOR 255
struct device; struct device;

View File

@ -83,10 +83,6 @@ enum ip_conntrack_status {
/* Conntrack is a fake untracked entry */ /* Conntrack is a fake untracked entry */
IPS_UNTRACKED_BIT = 12, IPS_UNTRACKED_BIT = 12,
IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT),
/* Conntrack has a userspace helper. */
IPS_USERSPACE_HELPER_BIT = 13,
IPS_USERSPACE_HELPER = (1 << IPS_USERSPACE_HELPER_BIT),
}; };
/* Connection tracking event types */ /* Connection tracking event types */

View File

@ -3,8 +3,7 @@
#include <linux/types.h> #include <linux/types.h>
#define XT_CT_NOTRACK 0x1 #define XT_CT_NOTRACK 0x1
#define XT_CT_USERSPACE_HELPER 0x2
struct xt_ct_target_info { struct xt_ct_target_info {
__u16 flags; __u16 flags;

View File

@ -78,7 +78,7 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif,
__u32 mark, __u8 tos, __u8 scope, __u32 mark, __u8 tos, __u8 scope,
__u8 proto, __u8 flags, __u8 proto, __u8 flags,
__be32 daddr, __be32 saddr, __be32 daddr, __be32 saddr,
__be16 dport, __be32 sport) __be16 dport, __be16 sport)
{ {
fl4->flowi4_oif = oif; fl4->flowi4_oif = oif;
fl4->flowi4_iif = 0; fl4->flowi4_iif = 0;

View File

@ -373,7 +373,6 @@ static void mem_cgroup_put(struct mem_cgroup *memcg);
/* Writing them here to avoid exposing memcg's inner layout */ /* Writing them here to avoid exposing memcg's inner layout */
#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
#ifdef CONFIG_INET
#include <net/sock.h> #include <net/sock.h>
#include <net/ip.h> #include <net/ip.h>
@ -420,6 +419,7 @@ void sock_release_memcg(struct sock *sk)
} }
} }
#ifdef CONFIG_INET
struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg) struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg)
{ {
if (!memcg || mem_cgroup_is_root(memcg)) if (!memcg || mem_cgroup_is_root(memcg))

View File

@ -146,7 +146,7 @@ void br_fdb_cleanup(unsigned long _data)
unsigned long next_timer = jiffies + br->ageing_time; unsigned long next_timer = jiffies + br->ageing_time;
int i; int i;
spin_lock_bh(&br->hash_lock); spin_lock(&br->hash_lock);
for (i = 0; i < BR_HASH_SIZE; i++) { for (i = 0; i < BR_HASH_SIZE; i++) {
struct net_bridge_fdb_entry *f; struct net_bridge_fdb_entry *f;
struct hlist_node *h, *n; struct hlist_node *h, *n;
@ -162,7 +162,7 @@ void br_fdb_cleanup(unsigned long _data)
next_timer = this_timer; next_timer = this_timer;
} }
} }
spin_unlock_bh(&br->hash_lock); spin_unlock(&br->hash_lock);
mod_timer(&br->gc_timer, round_jiffies_up(next_timer)); mod_timer(&br->gc_timer, round_jiffies_up(next_timer));
} }

View File

@ -146,15 +146,17 @@ void caif_flow_cb(struct sk_buff *skb)
spin_lock_bh(&caifd->flow_lock); spin_lock_bh(&caifd->flow_lock);
send_xoff = caifd->xoff; send_xoff = caifd->xoff;
caifd->xoff = 0; caifd->xoff = 0;
if (!WARN_ON(caifd->xoff_skb_dtor == NULL)) { dtor = caifd->xoff_skb_dtor;
WARN_ON(caifd->xoff_skb != skb);
dtor = caifd->xoff_skb_dtor; if (WARN_ON(caifd->xoff_skb != skb))
caifd->xoff_skb = NULL; skb = NULL;
caifd->xoff_skb_dtor = NULL;
} caifd->xoff_skb = NULL;
caifd->xoff_skb_dtor = NULL;
spin_unlock_bh(&caifd->flow_lock); spin_unlock_bh(&caifd->flow_lock);
if (dtor) if (dtor && skb)
dtor(skb); dtor(skb);
if (send_xoff) if (send_xoff)

View File

@ -11,7 +11,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/usb/usbnet.h> #include <linux/usb/usbnet.h>
@ -27,7 +26,7 @@ MODULE_LICENSE("GPL");
#define CFUSB_ALIGNMENT 4 /* Number of bytes to align. */ #define CFUSB_ALIGNMENT 4 /* Number of bytes to align. */
#define CFUSB_MAX_HEADLEN (CFUSB_PAD_DESCR_SZ + CFUSB_ALIGNMENT-1) #define CFUSB_MAX_HEADLEN (CFUSB_PAD_DESCR_SZ + CFUSB_ALIGNMENT-1)
#define STE_USB_VID 0x04cc /* USB Product ID for ST-Ericsson */ #define STE_USB_VID 0x04cc /* USB Product ID for ST-Ericsson */
#define STE_USB_PID_CAIF 0x2306 /* Product id for CAIF Modems */ #define STE_USB_PID_CAIF 0x230f /* Product id for CAIF Modems */
struct cfusbl { struct cfusbl {
struct cflayer layer; struct cflayer layer;

View File

@ -1887,6 +1887,23 @@ void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
EXPORT_SYMBOL(skb_set_dev); EXPORT_SYMBOL(skb_set_dev);
#endif /* CONFIG_NET_NS */ #endif /* CONFIG_NET_NS */
static void skb_warn_bad_offload(const struct sk_buff *skb)
{
static const netdev_features_t null_features = 0;
struct net_device *dev = skb->dev;
const char *driver = "";
if (dev && dev->dev.parent)
driver = dev_driver_string(dev->dev.parent);
WARN(1, "%s: caps=(%pNF, %pNF) len=%d data_len=%d gso_size=%d "
"gso_type=%d ip_summed=%d\n",
driver, dev ? &dev->features : &null_features,
skb->sk ? &skb->sk->sk_route_caps : &null_features,
skb->len, skb->data_len, skb_shinfo(skb)->gso_size,
skb_shinfo(skb)->gso_type, skb->ip_summed);
}
/* /*
* Invalidate hardware checksum when packet is to be mangled, and * Invalidate hardware checksum when packet is to be mangled, and
* complete checksum manually on outgoing path. * complete checksum manually on outgoing path.
@ -1900,8 +1917,8 @@ int skb_checksum_help(struct sk_buff *skb)
goto out_set_summed; goto out_set_summed;
if (unlikely(skb_shinfo(skb)->gso_size)) { if (unlikely(skb_shinfo(skb)->gso_size)) {
/* Let GSO fix up the checksum. */ skb_warn_bad_offload(skb);
goto out_set_summed; return -EINVAL;
} }
offset = skb_checksum_start_offset(skb); offset = skb_checksum_start_offset(skb);
@ -1961,16 +1978,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb,
__skb_pull(skb, skb->mac_len); __skb_pull(skb, skb->mac_len);
if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
struct net_device *dev = skb->dev; skb_warn_bad_offload(skb);
struct ethtool_drvinfo info = {};
if (dev && dev->ethtool_ops && dev->ethtool_ops->get_drvinfo)
dev->ethtool_ops->get_drvinfo(dev, &info);
WARN(1, "%s: caps=(%pNF, %pNF) len=%d data_len=%d ip_summed=%d\n",
info.driver, dev ? &dev->features : NULL,
skb->sk ? &skb->sk->sk_route_caps : NULL,
skb->len, skb->data_len, skb->ip_summed);
if (skb_header_cloned(skb) && if (skb_header_cloned(skb) &&
(err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))

View File

@ -929,7 +929,7 @@ static ssize_t bql_show_inflight(struct netdev_queue *queue,
} }
static struct netdev_queue_attribute bql_inflight_attribute = static struct netdev_queue_attribute bql_inflight_attribute =
__ATTR(inflight, S_IRUGO | S_IWUSR, bql_show_inflight, NULL); __ATTR(inflight, S_IRUGO, bql_show_inflight, NULL);
#define BQL_ATTR(NAME, FIELD) \ #define BQL_ATTR(NAME, FIELD) \
static ssize_t bql_show_ ## NAME(struct netdev_queue *queue, \ static ssize_t bql_show_ ## NAME(struct netdev_queue *queue, \

View File

@ -46,7 +46,7 @@ __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr,
memcpy(hash, saddr, 16); memcpy(hash, saddr, 16);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
secret[i] = net_secret[i] + daddr[i]; secret[i] = net_secret[i] + (__force u32)daddr[i];
secret[4] = net_secret[4] + secret[4] = net_secret[4] +
(((__force u16)sport << 16) + (__force u16)dport); (((__force u16)sport << 16) + (__force u16)dport);
for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++) for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)

View File

@ -136,7 +136,7 @@ static int addr_compare(const struct inetpeer_addr *a,
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (a->addr.a6[i] == b->addr.a6[i]) if (a->addr.a6[i] == b->addr.a6[i])
continue; continue;
if (a->addr.a6[i] < b->addr.a6[i]) if ((__force u32)a->addr.a6[i] < (__force u32)b->addr.a6[i])
return -1; return -1;
return 1; return 1;
} }
@ -447,6 +447,7 @@ relookup:
p->rate_last = 0; p->rate_last = 0;
p->pmtu_expires = 0; p->pmtu_expires = 0;
p->pmtu_orig = 0; p->pmtu_orig = 0;
p->redirect_genid = 0;
memset(&p->redirect_learned, 0, sizeof(p->redirect_learned)); memset(&p->redirect_learned, 0, sizeof(p->redirect_learned));

View File

@ -141,7 +141,7 @@ __be32 ic_servaddr = NONE; /* Boot server IP address */
__be32 root_server_addr = NONE; /* Address of NFS server */ __be32 root_server_addr = NONE; /* Address of NFS server */
u8 root_server_path[256] = { 0, }; /* Path to mount as root */ u8 root_server_path[256] = { 0, }; /* Path to mount as root */
u32 ic_dev_xid; /* Device under configuration */ __be32 ic_dev_xid; /* Device under configuration */
/* vendor class identifier */ /* vendor class identifier */
static char vendor_class_identifier[253] __initdata; static char vendor_class_identifier[253] __initdata;
@ -859,9 +859,9 @@ static int __init ic_bootp_string(char *dest, char *src, int len, int max)
*/ */
static void __init ic_do_bootp_ext(u8 *ext) static void __init ic_do_bootp_ext(u8 *ext)
{ {
u8 servers; u8 servers;
int i; int i;
u16 mtu; __be16 mtu;
#ifdef IPCONFIG_DEBUG #ifdef IPCONFIG_DEBUG
u8 *c; u8 *c;

View File

@ -140,13 +140,14 @@ static void ping_v4_unhash(struct sock *sk)
write_lock_bh(&ping_table.lock); write_lock_bh(&ping_table.lock);
hlist_nulls_del(&sk->sk_nulls_node); hlist_nulls_del(&sk->sk_nulls_node);
sock_put(sk); sock_put(sk);
isk->inet_num = isk->inet_sport = 0; isk->inet_num = 0;
isk->inet_sport = 0;
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
write_unlock_bh(&ping_table.lock); write_unlock_bh(&ping_table.lock);
} }
} }
static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, static struct sock *ping_v4_lookup(struct net *net, __be32 saddr, __be32 daddr,
u16 ident, int dif) u16 ident, int dif)
{ {
struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident); struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident);
@ -154,15 +155,15 @@ static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
struct inet_sock *isk; struct inet_sock *isk;
struct hlist_nulls_node *hnode; struct hlist_nulls_node *hnode;
pr_debug("try to find: num = %d, daddr = %ld, dif = %d\n", pr_debug("try to find: num = %d, daddr = %pI4, dif = %d\n",
(int)ident, (unsigned long)daddr, dif); (int)ident, &daddr, dif);
read_lock_bh(&ping_table.lock); read_lock_bh(&ping_table.lock);
ping_portaddr_for_each_entry(sk, hnode, hslot) { ping_portaddr_for_each_entry(sk, hnode, hslot) {
isk = inet_sk(sk); isk = inet_sk(sk);
pr_debug("found: %p: num = %d, daddr = %ld, dif = %d\n", sk, pr_debug("found: %p: num = %d, daddr = %pI4, dif = %d\n", sk,
(int)isk->inet_num, (unsigned long)isk->inet_rcv_saddr, (int)isk->inet_num, &isk->inet_rcv_saddr,
sk->sk_bound_dev_if); sk->sk_bound_dev_if);
pr_debug("iterate\n"); pr_debug("iterate\n");
@ -254,7 +255,7 @@ static int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
sk, addr->sin_addr.s_addr, ntohs(addr->sin_port)); sk, addr->sin_addr.s_addr, ntohs(addr->sin_port));
chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr);
if (addr->sin_addr.s_addr == INADDR_ANY) if (addr->sin_addr.s_addr == htonl(INADDR_ANY))
chk_addr_ret = RTN_LOCAL; chk_addr_ret = RTN_LOCAL;
if ((sysctl_ip_nonlocal_bind == 0 && if ((sysctl_ip_nonlocal_bind == 0 &&
@ -278,9 +279,9 @@ static int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
goto out; goto out;
} }
pr_debug("after bind(): num = %d, daddr = %ld, dif = %d\n", pr_debug("after bind(): num = %d, daddr = %pI4, dif = %d\n",
(int)isk->inet_num, (int)isk->inet_num,
(unsigned long) isk->inet_rcv_saddr, &isk->inet_rcv_saddr,
(int)sk->sk_bound_dev_if); (int)sk->sk_bound_dev_if);
err = 0; err = 0;
@ -407,7 +408,7 @@ out:
struct pingfakehdr { struct pingfakehdr {
struct icmphdr icmph; struct icmphdr icmph;
struct iovec *iov; struct iovec *iov;
u32 wcheck; __wsum wcheck;
}; };
static int ping_getfrag(void *from, char * to, static int ping_getfrag(void *from, char * to,
@ -459,7 +460,7 @@ static int ping_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
struct rtable *rt = NULL; struct rtable *rt = NULL;
struct ip_options_data opt_copy; struct ip_options_data opt_copy;
int free = 0; int free = 0;
u32 saddr, daddr, faddr; __be32 saddr, daddr, faddr;
u8 tos; u8 tos;
int err; int err;
@ -696,8 +697,8 @@ void ping_rcv(struct sk_buff *skb)
struct net *net = dev_net(skb->dev); struct net *net = dev_net(skb->dev);
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
struct icmphdr *icmph = icmp_hdr(skb); struct icmphdr *icmph = icmp_hdr(skb);
u32 saddr = iph->saddr; __be32 saddr = iph->saddr;
u32 daddr = iph->daddr; __be32 daddr = iph->daddr;
/* We assume the packet has already been checked by icmp_rcv */ /* We assume the packet has already been checked by icmp_rcv */

View File

@ -15,7 +15,6 @@
#include <linux/udp.h> #include <linux/udp.h>
#include <net/udp.h> #include <net/udp.h>
#include <net/udplite.h> #include <net/udplite.h>
#include <linux/inet_diag.h>
#include <linux/sock_diag.h> #include <linux/sock_diag.h>
static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, static int sk_diag_dump(struct sock *sk, struct sk_buff *skb,

View File

@ -575,7 +575,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
} }
if (np->rxopt.bits.rxorigdstaddr) { if (np->rxopt.bits.rxorigdstaddr) {
struct sockaddr_in6 sin6; struct sockaddr_in6 sin6;
u16 *ports = (u16 *) skb_transport_header(skb); __be16 *ports = (__be16 *) skb_transport_header(skb);
if (skb_transport_offset(skb) + 4 <= skb->len) { if (skb_transport_offset(skb) + 4 <= skb->len) {
/* All current transport protocols have the port numbers in the /* All current transport protocols have the port numbers in the

View File

@ -237,8 +237,8 @@ static int snmp6_dev_seq_show(struct seq_file *seq, void *v)
struct inet6_dev *idev = (struct inet6_dev *)seq->private; struct inet6_dev *idev = (struct inet6_dev *)seq->private;
seq_printf(seq, "%-32s\t%u\n", "ifIndex", idev->dev->ifindex); seq_printf(seq, "%-32s\t%u\n", "ifIndex", idev->dev->ifindex);
snmp6_seq_show_item(seq, (void __percpu **)idev->stats.ipv6, NULL, snmp6_seq_show_item64(seq, (void __percpu **)idev->stats.ipv6,
snmp6_ipstats_list); snmp6_ipstats_list, offsetof(struct ipstats_mib, syncp));
snmp6_seq_show_item(seq, NULL, idev->stats.icmpv6dev->mibs, snmp6_seq_show_item(seq, NULL, idev->stats.icmpv6dev->mibs,
snmp6_icmp6_list); snmp6_icmp6_list);
snmp6_seq_show_icmpv6msg(seq, idev->stats.icmpv6msgdev->mibs); snmp6_seq_show_icmpv6msg(seq, idev->stats.icmpv6msgdev->mibs);

View File

@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
else { else {
neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr); neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
if (IS_ERR(neigh)) { if (IS_ERR(neigh)) {
in6_dev_put(idev);
dst_free(&rt->dst); dst_free(&rt->dst);
return ERR_CAST(neigh); return ERR_CAST(neigh);
} }

View File

@ -791,7 +791,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
if (set & BIT(NL80211_STA_FLAG_AUTHORIZED)) if (set & BIT(NL80211_STA_FLAG_AUTHORIZED))
ret = sta_info_move_state_checked(sta, ret = sta_info_move_state_checked(sta,
IEEE80211_STA_AUTHORIZED); IEEE80211_STA_AUTHORIZED);
else else if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
ret = sta_info_move_state_checked(sta, ret = sta_info_move_state_checked(sta,
IEEE80211_STA_ASSOC); IEEE80211_STA_ASSOC);
if (ret) if (ret)

View File

@ -1979,6 +1979,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
mesh_path_error_tx(ifmsh->mshcfg.element_ttl, fwd_hdr->addr3, mesh_path_error_tx(ifmsh->mshcfg.element_ttl, fwd_hdr->addr3,
0, reason, fwd_hdr->addr2, sdata); 0, reason, fwd_hdr->addr2, sdata);
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route); IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
kfree_skb(fwd_skb);
return RX_DROP_MONITOR; return RX_DROP_MONITOR;
} }

View File

@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk)
if (sta->dead) if (sta->dead)
return; return;
if (!test_sta_flag(sta, WLAN_STA_PS_STA)) if (!test_sta_flag(sta, WLAN_STA_PS_STA)) {
local_bh_disable();
ieee80211_sta_ps_deliver_wakeup(sta); ieee80211_sta_ps_deliver_wakeup(sta);
else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { local_bh_enable();
} else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) {
clear_sta_flag(sta, WLAN_STA_PS_DRIVER); clear_sta_flag(sta, WLAN_STA_PS_DRIVER);
local_bh_disable(); local_bh_disable();

View File

@ -1001,8 +1001,6 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
static ieee80211_tx_result debug_noinline static ieee80211_tx_result debug_noinline
ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
{ {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
if (!tx->key) if (!tx->key)
return TX_CONTINUE; return TX_CONTINUE;
@ -1017,13 +1015,7 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_AES_CMAC:
return ieee80211_crypto_aes_cmac_encrypt(tx); return ieee80211_crypto_aes_cmac_encrypt(tx);
default: default:
/* handle hw-only algorithm */ return ieee80211_crypto_hw_encrypt(tx);
if (info->control.hw_key) {
ieee80211_tx_set_protected(tx);
return TX_CONTINUE;
}
break;
} }
return TX_DROP; return TX_DROP;

View File

@ -643,3 +643,22 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)
return RX_CONTINUE; return RX_CONTINUE;
} }
ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx)
{
struct sk_buff *skb;
struct ieee80211_tx_info *info = NULL;
skb_queue_walk(&tx->skbs, skb) {
info = IEEE80211_SKB_CB(skb);
/* handle hw-only algorithm */
if (!info->control.hw_key)
return TX_DROP;
}
ieee80211_tx_set_protected(tx);
return TX_CONTINUE;
}

View File

@ -32,5 +32,7 @@ ieee80211_tx_result
ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx); ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx);
ieee80211_rx_result ieee80211_rx_result
ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx); ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx);
ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx);
#endif /* WPA_H */ #endif /* WPA_H */

View File

@ -77,35 +77,42 @@ find_set_type(const char *name, u8 family, u8 revision)
} }
/* Unlock, try to load a set type module and lock again */ /* Unlock, try to load a set type module and lock again */
static int static bool
try_to_load_type(const char *name) load_settype(const char *name)
{ {
nfnl_unlock(); nfnl_unlock();
pr_debug("try to load ip_set_%s\n", name); pr_debug("try to load ip_set_%s\n", name);
if (request_module("ip_set_%s", name) < 0) { if (request_module("ip_set_%s", name) < 0) {
pr_warning("Can't find ip_set type %s\n", name); pr_warning("Can't find ip_set type %s\n", name);
nfnl_lock(); nfnl_lock();
return -IPSET_ERR_FIND_TYPE; return false;
} }
nfnl_lock(); nfnl_lock();
return -EAGAIN; return true;
} }
/* Find a set type and reference it */ /* Find a set type and reference it */
#define find_set_type_get(name, family, revision, found) \
__find_set_type_get(name, family, revision, found, false)
static int static int
find_set_type_get(const char *name, u8 family, u8 revision, __find_set_type_get(const char *name, u8 family, u8 revision,
struct ip_set_type **found) struct ip_set_type **found, bool retry)
{ {
struct ip_set_type *type; struct ip_set_type *type;
int err; int err;
if (retry && !load_settype(name))
return -IPSET_ERR_FIND_TYPE;
rcu_read_lock(); rcu_read_lock();
*found = find_set_type(name, family, revision); *found = find_set_type(name, family, revision);
if (*found) { if (*found) {
err = !try_module_get((*found)->me) ? -EFAULT : 0; err = !try_module_get((*found)->me) ? -EFAULT : 0;
goto unlock; goto unlock;
} }
/* Make sure the type is loaded but we don't support the revision */ /* Make sure the type is already loaded
* but we don't support the revision */
list_for_each_entry_rcu(type, &ip_set_type_list, list) list_for_each_entry_rcu(type, &ip_set_type_list, list)
if (STREQ(type->name, name)) { if (STREQ(type->name, name)) {
err = -IPSET_ERR_FIND_TYPE; err = -IPSET_ERR_FIND_TYPE;
@ -113,7 +120,8 @@ find_set_type_get(const char *name, u8 family, u8 revision,
} }
rcu_read_unlock(); rcu_read_unlock();
return try_to_load_type(name); return retry ? -IPSET_ERR_FIND_TYPE :
__find_set_type_get(name, family, revision, found, true);
unlock: unlock:
rcu_read_unlock(); rcu_read_unlock();
@ -124,12 +132,19 @@ unlock:
* If we succeeded, the supported minimal and maximum revisions are * If we succeeded, the supported minimal and maximum revisions are
* filled out. * filled out.
*/ */
#define find_set_type_minmax(name, family, min, max) \
__find_set_type_minmax(name, family, min, max, false)
static int static int
find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max) __find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max,
bool retry)
{ {
struct ip_set_type *type; struct ip_set_type *type;
bool found = false; bool found = false;
if (retry && !load_settype(name))
return -IPSET_ERR_FIND_TYPE;
*min = 255; *max = 0; *min = 255; *max = 0;
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(type, &ip_set_type_list, list) list_for_each_entry_rcu(type, &ip_set_type_list, list)
@ -145,7 +160,8 @@ find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max)
if (found) if (found)
return 0; return 0;
return try_to_load_type(name); return retry ? -IPSET_ERR_FIND_TYPE :
__find_set_type_minmax(name, family, min, max, true);
} }
#define family_name(f) ((f) == AF_INET ? "inet" : \ #define family_name(f) ((f) == AF_INET ? "inet" : \
@ -1126,6 +1142,7 @@ release_refcount:
if (ret || !cb->args[2]) { if (ret || !cb->args[2]) {
pr_debug("release set %s\n", ip_set_list[index]->name); pr_debug("release set %s\n", ip_set_list[index]->name);
ip_set_put_byindex(index); ip_set_put_byindex(index);
cb->args[2] = 0;
} }
out: out:
if (nlh) { if (nlh) {

View File

@ -121,18 +121,6 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
int ret = 0; int ret = 0;
if (tmpl != NULL) { if (tmpl != NULL) {
/* we've got a userspace helper. */
if (tmpl->status & IPS_USERSPACE_HELPER) {
help = nf_ct_helper_ext_add(ct, flags);
if (help == NULL) {
ret = -ENOMEM;
goto out;
}
rcu_assign_pointer(help->helper, NULL);
__set_bit(IPS_USERSPACE_HELPER_BIT, &ct->status);
ret = 0;
goto out;
}
help = nfct_help(tmpl); help = nfct_help(tmpl);
if (help != NULL) if (help != NULL)
helper = help->helper; helper = help->helper;

View File

@ -2042,10 +2042,6 @@ ctnetlink_create_expect(struct net *net, u16 zone,
} }
help = nfct_help(ct); help = nfct_help(ct);
if (!help) { if (!help) {
err = -EOPNOTSUPP;
goto out;
}
if (test_bit(IPS_USERSPACE_HELPER_BIT, &ct->status)) {
if (!cda[CTA_EXPECT_TIMEOUT]) { if (!cda[CTA_EXPECT_TIMEOUT]) {
err = -EINVAL; err = -EINVAL;
goto out; goto out;

View File

@ -62,8 +62,8 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
int ret = 0; int ret = 0;
u8 proto; u8 proto;
if (info->flags & ~(XT_CT_NOTRACK | XT_CT_USERSPACE_HELPER)) if (info->flags & ~XT_CT_NOTRACK)
return -EOPNOTSUPP; return -EINVAL;
if (info->flags & XT_CT_NOTRACK) { if (info->flags & XT_CT_NOTRACK) {
ct = nf_ct_untracked_get(); ct = nf_ct_untracked_get();
@ -92,9 +92,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
GFP_KERNEL)) GFP_KERNEL))
goto err3; goto err3;
if (info->flags & XT_CT_USERSPACE_HELPER) { if (info->helper[0]) {
__set_bit(IPS_USERSPACE_HELPER_BIT, &ct->status);
} else if (info->helper[0]) {
ret = -ENOENT; ret = -ENOENT;
proto = xt_ct_find_proto(par); proto = xt_ct_find_proto(par);
if (!proto) { if (!proto) {

View File

@ -445,7 +445,6 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
{ {
__be16 _ports[2], *ports; __be16 _ports[2], *ports;
u8 nexthdr; u8 nexthdr;
__be16 frag_off;
int poff; int poff;
memset(dst, 0, sizeof(*dst)); memset(dst, 0, sizeof(*dst));
@ -466,6 +465,9 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
break; break;
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
case NFPROTO_IPV6: case NFPROTO_IPV6:
{
__be16 frag_off;
if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) { if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) {
memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr, memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr,
sizeof(dst->ip6.dst)); sizeof(dst->ip6.dst));
@ -485,6 +487,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
if ((int)protoff < 0) if ((int)protoff < 0)
return -1; return -1;
break; break;
}
#endif #endif
default: default:
BUG(); BUG();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007-2011 Nicira Networks. * Copyright (c) 2007-2012 Nicira Networks.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public * modify it under the terms of version 2 of the GNU General Public
@ -36,7 +36,6 @@
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/tcp.h> #include <linux/tcp.h>
#include <linux/udp.h> #include <linux/udp.h>
#include <linux/version.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/system.h> #include <asm/system.h>
@ -1397,9 +1396,8 @@ static int ovs_dp_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
int i = 0; int i = 0;
list_for_each_entry(dp, &dps, list_node) { list_for_each_entry(dp, &dps, list_node) {
if (i < skip) if (i >= skip &&
continue; ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid,
if (ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh->nlmsg_seq, NLM_F_MULTI,
OVS_DP_CMD_NEW) < 0) OVS_DP_CMD_NEW) < 0)
break; break;

View File

@ -25,7 +25,6 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/u64_stats_sync.h> #include <linux/u64_stats_sync.h>
#include <linux/version.h>
#include "flow.h" #include "flow.h"

View File

@ -32,7 +32,6 @@
#include <linux/in.h> #include <linux/in.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <linux/tcp.h> #include <linux/tcp.h>

View File

@ -23,7 +23,6 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/version.h>
#include "datapath.h" #include "datapath.h"
#include "vport-internal_dev.h" #include "vport-internal_dev.h"

View File

@ -27,7 +27,6 @@
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/version.h>
#include "vport.h" #include "vport.h"
#include "vport-internal_dev.h" #include "vport-internal_dev.h"