diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-05 12:42:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-05 12:42:01 -0400 |
commit | 07d952dc669bb70a9716a81e140e89b7d4969f09 (patch) | |
tree | 6e6455adcfdbd689e98e417401d692784de8ff92 | |
parent | 5fdb32472ec6cd1d62788d8872585b342b5d1d92 (diff) | |
parent | c15fea2d8ca834dae491339c47e4fb3c81428190 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits)
ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
mlx4: decreasing ref count when removing mac
net: Fix security_socket_sendmsg() bypass problem.
net: Cap number of elements for sendmmsg
net: sendmmsg should only return an error if no messages were sent
ixgbe: fix PHY link setup for 82599
ixgbe: fix __ixgbe_notify_dca() bail out code
igb: fix WOL on second port of i350 device
e1000e: minor re-order of #include files
e1000e: remove unnecessary check for NULL pointer
intel drivers: repair missing flush operations
macb: restore wrap bit when performing underrun cleanup
cdc_ncm: fix endianness problem.
irda: use PCI_VENDOR_ID_*
mlx4: Fixing Ethernet unicast packet steering
net: fix NULL dereferences in check_peer_redir()
bnx2x: Clear MDIO access warning during first driver load
bnx2x: Fix BCM578xx MAC test
bnx2x: Fix BCM54618se invalid link indication
bnx2x: Fix BCM84833 link
...
102 files changed, 615 insertions, 350 deletions
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 675612ff41ae..5dd960d75174 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -599,7 +599,7 @@ num_unsol_na | |||
599 | affect only the active-backup mode. These options were added for | 599 | affect only the active-backup mode. These options were added for |
600 | bonding versions 3.3.0 and 3.4.0 respectively. | 600 | bonding versions 3.3.0 and 3.4.0 respectively. |
601 | 601 | ||
602 | From Linux 2.6.40 and bonding version 3.7.1, these notifications | 602 | From Linux 3.0 and bonding version 3.7.1, these notifications |
603 | are generated by the ipv4 and ipv6 code and the numbers of | 603 | are generated by the ipv4 and ipv6 code and the numbers of |
604 | repetitions cannot be set independently. | 604 | repetitions cannot be set independently. |
605 | 605 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 07cfd8deaad5..51d42fbc8dc4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2643,9 +2643,8 @@ S: Maintained | |||
2643 | F: arch/x86/math-emu/ | 2643 | F: arch/x86/math-emu/ |
2644 | 2644 | ||
2645 | FRAME RELAY DLCI/FRAD (Sangoma drivers too) | 2645 | FRAME RELAY DLCI/FRAD (Sangoma drivers too) |
2646 | M: Mike McLagan <mike.mclagan@linux.org> | ||
2647 | L: netdev@vger.kernel.org | 2646 | L: netdev@vger.kernel.org |
2648 | S: Maintained | 2647 | S: Orphan |
2649 | F: drivers/net/wan/dlci.c | 2648 | F: drivers/net/wan/dlci.c |
2650 | F: drivers/net/wan/sdla.c | 2649 | F: drivers/net/wan/sdla.c |
2651 | 2650 | ||
@@ -4415,10 +4414,10 @@ F: net/*/netfilter/ | |||
4415 | F: net/netfilter/ | 4414 | F: net/netfilter/ |
4416 | 4415 | ||
4417 | NETLABEL | 4416 | NETLABEL |
4418 | M: Paul Moore <paul.moore@hp.com> | 4417 | M: Paul Moore <paul@paul-moore.com> |
4419 | W: http://netlabel.sf.net | 4418 | W: http://netlabel.sf.net |
4420 | L: netdev@vger.kernel.org | 4419 | L: netdev@vger.kernel.org |
4421 | S: Supported | 4420 | S: Maintained |
4422 | F: Documentation/netlabel/ | 4421 | F: Documentation/netlabel/ |
4423 | F: include/net/netlabel.h | 4422 | F: include/net/netlabel.h |
4424 | F: net/netlabel/ | 4423 | F: net/netlabel/ |
@@ -4463,7 +4462,6 @@ F: include/linux/netdevice.h | |||
4463 | NETWORKING [IPv4/IPv6] | 4462 | NETWORKING [IPv4/IPv6] |
4464 | M: "David S. Miller" <davem@davemloft.net> | 4463 | M: "David S. Miller" <davem@davemloft.net> |
4465 | M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | 4464 | M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> |
4466 | M: "Pekka Savola (ipv6)" <pekkas@netcore.fi> | ||
4467 | M: James Morris <jmorris@namei.org> | 4465 | M: James Morris <jmorris@namei.org> |
4468 | M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> | 4466 | M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> |
4469 | M: Patrick McHardy <kaber@trash.net> | 4467 | M: Patrick McHardy <kaber@trash.net> |
@@ -4476,7 +4474,7 @@ F: include/net/ip* | |||
4476 | F: arch/x86/net/* | 4474 | F: arch/x86/net/* |
4477 | 4475 | ||
4478 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) | 4476 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) |
4479 | M: Paul Moore <paul.moore@hp.com> | 4477 | M: Paul Moore <paul@paul-moore.com> |
4480 | L: netdev@vger.kernel.org | 4478 | L: netdev@vger.kernel.org |
4481 | S: Maintained | 4479 | S: Maintained |
4482 | 4480 | ||
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 3ee1fdb31ea7..e55814bc0d06 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c | |||
@@ -57,6 +57,7 @@ void proc_fork_connector(struct task_struct *task) | |||
57 | struct proc_event *ev; | 57 | struct proc_event *ev; |
58 | __u8 buffer[CN_PROC_MSG_SIZE]; | 58 | __u8 buffer[CN_PROC_MSG_SIZE]; |
59 | struct timespec ts; | 59 | struct timespec ts; |
60 | struct task_struct *parent; | ||
60 | 61 | ||
61 | if (atomic_read(&proc_event_num_listeners) < 1) | 62 | if (atomic_read(&proc_event_num_listeners) < 1) |
62 | return; | 63 | return; |
@@ -67,8 +68,11 @@ void proc_fork_connector(struct task_struct *task) | |||
67 | ktime_get_ts(&ts); /* get high res monotonic timestamp */ | 68 | ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
68 | put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); | 69 | put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
69 | ev->what = PROC_EVENT_FORK; | 70 | ev->what = PROC_EVENT_FORK; |
70 | ev->event_data.fork.parent_pid = task->real_parent->pid; | 71 | rcu_read_lock(); |
71 | ev->event_data.fork.parent_tgid = task->real_parent->tgid; | 72 | parent = rcu_dereference(task->real_parent); |
73 | ev->event_data.fork.parent_pid = parent->pid; | ||
74 | ev->event_data.fork.parent_tgid = parent->tgid; | ||
75 | rcu_read_unlock(); | ||
72 | ev->event_data.fork.child_pid = task->pid; | 76 | ev->event_data.fork.child_pid = task->pid; |
73 | ev->event_data.fork.child_tgid = task->tgid; | 77 | ev->event_data.fork.child_tgid = task->tgid; |
74 | 78 | ||
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index 5b0dba6d4efa..d724a18b5285 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c | |||
@@ -1989,14 +1989,20 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode) | |||
1989 | return -EINVAL; | 1989 | return -EINVAL; |
1990 | } | 1990 | } |
1991 | 1991 | ||
1992 | /* | ||
1993 | * It's important to set the bp->state to the value different from | ||
1994 | * BNX2X_STATE_OPEN and only then stop the Tx. Otherwise bnx2x_tx_int() | ||
1995 | * may restart the Tx from the NAPI context (see bnx2x_tx_int()). | ||
1996 | */ | ||
1997 | bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT; | ||
1998 | smp_mb(); | ||
1999 | |||
1992 | /* Stop Tx */ | 2000 | /* Stop Tx */ |
1993 | bnx2x_tx_disable(bp); | 2001 | bnx2x_tx_disable(bp); |
1994 | 2002 | ||
1995 | #ifdef BCM_CNIC | 2003 | #ifdef BCM_CNIC |
1996 | bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD); | 2004 | bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD); |
1997 | #endif | 2005 | #endif |
1998 | bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT; | ||
1999 | smp_mb(); | ||
2000 | 2006 | ||
2001 | bp->rx_mode = BNX2X_RX_MODE_NONE; | 2007 | bp->rx_mode = BNX2X_RX_MODE_NONE; |
2002 | 2008 | ||
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h index 06727f32e505..dc24de40e336 100644 --- a/drivers/net/bnx2x/bnx2x_hsi.h +++ b/drivers/net/bnx2x/bnx2x_hsi.h | |||
@@ -1204,6 +1204,8 @@ struct drv_port_mb { | |||
1204 | 1204 | ||
1205 | #define LINK_STATUS_PFC_ENABLED 0x20000000 | 1205 | #define LINK_STATUS_PFC_ENABLED 0x20000000 |
1206 | 1206 | ||
1207 | #define LINK_STATUS_PHYSICAL_LINK_FLAG 0x40000000 | ||
1208 | |||
1207 | u32 port_stx; | 1209 | u32 port_stx; |
1208 | 1210 | ||
1209 | u32 stat_nig_timer; | 1211 | u32 stat_nig_timer; |
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index bcd8f0038628..d45b1555a602 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -1546,6 +1546,12 @@ static void bnx2x_umac_enable(struct link_params *params, | |||
1546 | vars->line_speed); | 1546 | vars->line_speed); |
1547 | break; | 1547 | break; |
1548 | } | 1548 | } |
1549 | if (!(vars->flow_ctrl & BNX2X_FLOW_CTRL_TX)) | ||
1550 | val |= UMAC_COMMAND_CONFIG_REG_IGNORE_TX_PAUSE; | ||
1551 | |||
1552 | if (!(vars->flow_ctrl & BNX2X_FLOW_CTRL_RX)) | ||
1553 | val |= UMAC_COMMAND_CONFIG_REG_PAUSE_IGNORE; | ||
1554 | |||
1549 | REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); | 1555 | REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); |
1550 | udelay(50); | 1556 | udelay(50); |
1551 | 1557 | ||
@@ -1661,10 +1667,20 @@ static void bnx2x_xmac_disable(struct link_params *params) | |||
1661 | { | 1667 | { |
1662 | u8 port = params->port; | 1668 | u8 port = params->port; |
1663 | struct bnx2x *bp = params->bp; | 1669 | struct bnx2x *bp = params->bp; |
1664 | u32 xmac_base = (port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; | 1670 | u32 pfc_ctrl, xmac_base = (port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; |
1665 | 1671 | ||
1666 | if (REG_RD(bp, MISC_REG_RESET_REG_2) & | 1672 | if (REG_RD(bp, MISC_REG_RESET_REG_2) & |
1667 | MISC_REGISTERS_RESET_REG_2_XMAC) { | 1673 | MISC_REGISTERS_RESET_REG_2_XMAC) { |
1674 | /* | ||
1675 | * Send an indication to change the state in the NIG back to XON | ||
1676 | * Clearing this bit enables the next set of this bit to get | ||
1677 | * rising edge | ||
1678 | */ | ||
1679 | pfc_ctrl = REG_RD(bp, xmac_base + XMAC_REG_PFC_CTRL_HI); | ||
1680 | REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, | ||
1681 | (pfc_ctrl & ~(1<<1))); | ||
1682 | REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, | ||
1683 | (pfc_ctrl | (1<<1))); | ||
1668 | DP(NETIF_MSG_LINK, "Disable XMAC on port %x\n", port); | 1684 | DP(NETIF_MSG_LINK, "Disable XMAC on port %x\n", port); |
1669 | REG_WR(bp, xmac_base + XMAC_REG_CTRL, 0); | 1685 | REG_WR(bp, xmac_base + XMAC_REG_CTRL, 0); |
1670 | usleep_range(1000, 1000); | 1686 | usleep_range(1000, 1000); |
@@ -1729,6 +1745,10 @@ static int bnx2x_emac_enable(struct link_params *params, | |||
1729 | 1745 | ||
1730 | DP(NETIF_MSG_LINK, "enabling EMAC\n"); | 1746 | DP(NETIF_MSG_LINK, "enabling EMAC\n"); |
1731 | 1747 | ||
1748 | /* Disable BMAC */ | ||
1749 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, | ||
1750 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); | ||
1751 | |||
1732 | /* enable emac and not bmac */ | 1752 | /* enable emac and not bmac */ |
1733 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 1); | 1753 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 1); |
1734 | 1754 | ||
@@ -2583,12 +2603,6 @@ static int bnx2x_bmac1_enable(struct link_params *params, | |||
2583 | REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LLFC_MSG_FLDS, | 2603 | REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LLFC_MSG_FLDS, |
2584 | wb_data, 2); | 2604 | wb_data, 2); |
2585 | 2605 | ||
2586 | if (vars->phy_flags & PHY_TX_ERROR_CHECK_FLAG) { | ||
2587 | REG_RD_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LSS_STATUS, | ||
2588 | wb_data, 2); | ||
2589 | if (wb_data[0] > 0) | ||
2590 | return -ESRCH; | ||
2591 | } | ||
2592 | return 0; | 2606 | return 0; |
2593 | } | 2607 | } |
2594 | 2608 | ||
@@ -2654,16 +2668,6 @@ static int bnx2x_bmac2_enable(struct link_params *params, | |||
2654 | udelay(30); | 2668 | udelay(30); |
2655 | bnx2x_update_pfc_bmac2(params, vars, is_lb); | 2669 | bnx2x_update_pfc_bmac2(params, vars, is_lb); |
2656 | 2670 | ||
2657 | if (vars->phy_flags & PHY_TX_ERROR_CHECK_FLAG) { | ||
2658 | REG_RD_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_RX_LSS_STAT, | ||
2659 | wb_data, 2); | ||
2660 | if (wb_data[0] > 0) { | ||
2661 | DP(NETIF_MSG_LINK, "Got bad LSS status 0x%x\n", | ||
2662 | wb_data[0]); | ||
2663 | return -ESRCH; | ||
2664 | } | ||
2665 | } | ||
2666 | |||
2667 | return 0; | 2671 | return 0; |
2668 | } | 2672 | } |
2669 | 2673 | ||
@@ -2949,7 +2953,9 @@ static int bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy, | |||
2949 | u32 val; | 2953 | u32 val; |
2950 | u16 i; | 2954 | u16 i; |
2951 | int rc = 0; | 2955 | int rc = 0; |
2952 | 2956 | if (phy->flags & FLAGS_MDC_MDIO_WA_B0) | |
2957 | bnx2x_bits_en(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, | ||
2958 | EMAC_MDIO_STATUS_10MB); | ||
2953 | /* address */ | 2959 | /* address */ |
2954 | val = ((phy->addr << 21) | (devad << 16) | reg | | 2960 | val = ((phy->addr << 21) | (devad << 16) | reg | |
2955 | EMAC_MDIO_COMM_COMMAND_ADDRESS | | 2961 | EMAC_MDIO_COMM_COMMAND_ADDRESS | |
@@ -3003,6 +3009,9 @@ static int bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy, | |||
3003 | } | 3009 | } |
3004 | } | 3010 | } |
3005 | 3011 | ||
3012 | if (phy->flags & FLAGS_MDC_MDIO_WA_B0) | ||
3013 | bnx2x_bits_dis(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, | ||
3014 | EMAC_MDIO_STATUS_10MB); | ||
3006 | return rc; | 3015 | return rc; |
3007 | } | 3016 | } |
3008 | 3017 | ||
@@ -3012,6 +3021,9 @@ static int bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy, | |||
3012 | u32 tmp; | 3021 | u32 tmp; |
3013 | u8 i; | 3022 | u8 i; |
3014 | int rc = 0; | 3023 | int rc = 0; |
3024 | if (phy->flags & FLAGS_MDC_MDIO_WA_B0) | ||
3025 | bnx2x_bits_en(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, | ||
3026 | EMAC_MDIO_STATUS_10MB); | ||
3015 | 3027 | ||
3016 | /* address */ | 3028 | /* address */ |
3017 | 3029 | ||
@@ -3065,7 +3077,9 @@ static int bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy, | |||
3065 | bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); | 3077 | bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); |
3066 | } | 3078 | } |
3067 | } | 3079 | } |
3068 | 3080 | if (phy->flags & FLAGS_MDC_MDIO_WA_B0) | |
3081 | bnx2x_bits_dis(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, | ||
3082 | EMAC_MDIO_STATUS_10MB); | ||
3069 | return rc; | 3083 | return rc; |
3070 | } | 3084 | } |
3071 | 3085 | ||
@@ -4353,6 +4367,9 @@ void bnx2x_link_status_update(struct link_params *params, | |||
4353 | 4367 | ||
4354 | vars->link_up = (vars->link_status & LINK_STATUS_LINK_UP); | 4368 | vars->link_up = (vars->link_status & LINK_STATUS_LINK_UP); |
4355 | vars->phy_flags = PHY_XGXS_FLAG; | 4369 | vars->phy_flags = PHY_XGXS_FLAG; |
4370 | if (vars->link_status & LINK_STATUS_PHYSICAL_LINK_FLAG) | ||
4371 | vars->phy_flags |= PHY_PHYSICAL_LINK_FLAG; | ||
4372 | |||
4356 | if (vars->link_up) { | 4373 | if (vars->link_up) { |
4357 | DP(NETIF_MSG_LINK, "phy link up\n"); | 4374 | DP(NETIF_MSG_LINK, "phy link up\n"); |
4358 | 4375 | ||
@@ -4444,6 +4461,8 @@ void bnx2x_link_status_update(struct link_params *params, | |||
4444 | 4461 | ||
4445 | /* indicate no mac active */ | 4462 | /* indicate no mac active */ |
4446 | vars->mac_type = MAC_TYPE_NONE; | 4463 | vars->mac_type = MAC_TYPE_NONE; |
4464 | if (vars->link_status & LINK_STATUS_PHYSICAL_LINK_FLAG) | ||
4465 | vars->phy_flags |= PHY_HALF_OPEN_CONN_FLAG; | ||
4447 | } | 4466 | } |
4448 | 4467 | ||
4449 | /* Sync media type */ | 4468 | /* Sync media type */ |
@@ -5903,20 +5922,30 @@ int bnx2x_set_led(struct link_params *params, | |||
5903 | tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); | 5922 | tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); |
5904 | EMAC_WR(bp, EMAC_REG_EMAC_LED, | 5923 | EMAC_WR(bp, EMAC_REG_EMAC_LED, |
5905 | (tmp | EMAC_LED_OVERRIDE)); | 5924 | (tmp | EMAC_LED_OVERRIDE)); |
5906 | return rc; | 5925 | /* |
5926 | * return here without enabling traffic | ||
5927 | * LED blink andsetting rate in ON mode. | ||
5928 | * In oper mode, enabling LED blink | ||
5929 | * and setting rate is needed. | ||
5930 | */ | ||
5931 | if (mode == LED_MODE_ON) | ||
5932 | return rc; | ||
5907 | } | 5933 | } |
5908 | } else if (SINGLE_MEDIA_DIRECT(params) && | 5934 | } else if (SINGLE_MEDIA_DIRECT(params)) { |
5909 | (CHIP_IS_E1x(bp) || | ||
5910 | CHIP_IS_E2(bp))) { | ||
5911 | /* | 5935 | /* |
5912 | * This is a work-around for HW issue found when link | 5936 | * This is a work-around for HW issue found when link |
5913 | * is up in CL73 | 5937 | * is up in CL73 |
5914 | */ | 5938 | */ |
5915 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); | ||
5916 | REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); | 5939 | REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); |
5917 | } else { | 5940 | if (CHIP_IS_E1x(bp) || |
5941 | CHIP_IS_E2(bp) || | ||
5942 | (mode == LED_MODE_ON)) | ||
5943 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); | ||
5944 | else | ||
5945 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, | ||
5946 | hw_led_mode); | ||
5947 | } else | ||
5918 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, hw_led_mode); | 5948 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, hw_led_mode); |
5919 | } | ||
5920 | 5949 | ||
5921 | REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 + port*4, 0); | 5950 | REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 + port*4, 0); |
5922 | /* Set blinking rate to ~15.9Hz */ | 5951 | /* Set blinking rate to ~15.9Hz */ |
@@ -6160,6 +6189,7 @@ static int bnx2x_update_link_down(struct link_params *params, | |||
6160 | /* update shared memory */ | 6189 | /* update shared memory */ |
6161 | vars->link_status &= ~(LINK_STATUS_SPEED_AND_DUPLEX_MASK | | 6190 | vars->link_status &= ~(LINK_STATUS_SPEED_AND_DUPLEX_MASK | |
6162 | LINK_STATUS_LINK_UP | | 6191 | LINK_STATUS_LINK_UP | |
6192 | LINK_STATUS_PHYSICAL_LINK_FLAG | | ||
6163 | LINK_STATUS_AUTO_NEGOTIATE_COMPLETE | | 6193 | LINK_STATUS_AUTO_NEGOTIATE_COMPLETE | |
6164 | LINK_STATUS_RX_FLOW_CONTROL_FLAG_MASK | | 6194 | LINK_STATUS_RX_FLOW_CONTROL_FLAG_MASK | |
6165 | LINK_STATUS_TX_FLOW_CONTROL_FLAG_MASK | | 6195 | LINK_STATUS_TX_FLOW_CONTROL_FLAG_MASK | |
@@ -6197,7 +6227,8 @@ static int bnx2x_update_link_up(struct link_params *params, | |||
6197 | u8 port = params->port; | 6227 | u8 port = params->port; |
6198 | int rc = 0; | 6228 | int rc = 0; |
6199 | 6229 | ||
6200 | vars->link_status |= LINK_STATUS_LINK_UP; | 6230 | vars->link_status |= (LINK_STATUS_LINK_UP | |
6231 | LINK_STATUS_PHYSICAL_LINK_FLAG); | ||
6201 | vars->phy_flags |= PHY_PHYSICAL_LINK_FLAG; | 6232 | vars->phy_flags |= PHY_PHYSICAL_LINK_FLAG; |
6202 | 6233 | ||
6203 | if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) | 6234 | if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) |
@@ -7998,6 +8029,9 @@ static void bnx2x_warpcore_set_limiting_mode(struct link_params *params, | |||
7998 | bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, | 8029 | bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, |
7999 | MDIO_WC_REG_UC_INFO_B1_FIRMWARE_MODE, &val); | 8030 | MDIO_WC_REG_UC_INFO_B1_FIRMWARE_MODE, &val); |
8000 | 8031 | ||
8032 | /* Restart microcode to re-read the new mode */ | ||
8033 | bnx2x_warpcore_reset_lane(bp, phy, 1); | ||
8034 | bnx2x_warpcore_reset_lane(bp, phy, 0); | ||
8001 | 8035 | ||
8002 | } | 8036 | } |
8003 | 8037 | ||
@@ -8116,7 +8150,6 @@ void bnx2x_handle_module_detect_int(struct link_params *params) | |||
8116 | offsetof(struct shmem_region, dev_info. | 8150 | offsetof(struct shmem_region, dev_info. |
8117 | port_feature_config[params->port]. | 8151 | port_feature_config[params->port]. |
8118 | config)); | 8152 | config)); |
8119 | |||
8120 | bnx2x_set_gpio_int(bp, gpio_num, | 8153 | bnx2x_set_gpio_int(bp, gpio_num, |
8121 | MISC_REGISTERS_GPIO_INT_OUTPUT_SET, | 8154 | MISC_REGISTERS_GPIO_INT_OUTPUT_SET, |
8122 | gpio_port); | 8155 | gpio_port); |
@@ -8125,8 +8158,9 @@ void bnx2x_handle_module_detect_int(struct link_params *params) | |||
8125 | * Disable transmit for this module | 8158 | * Disable transmit for this module |
8126 | */ | 8159 | */ |
8127 | phy->media_type = ETH_PHY_NOT_PRESENT; | 8160 | phy->media_type = ETH_PHY_NOT_PRESENT; |
8128 | if ((val & PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_MASK) == | 8161 | if (((val & PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_MASK) == |
8129 | PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_DISABLE_TX_LASER) | 8162 | PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_DISABLE_TX_LASER) || |
8163 | CHIP_IS_E3(bp)) | ||
8130 | bnx2x_sfp_set_transmitter(params, phy, 0); | 8164 | bnx2x_sfp_set_transmitter(params, phy, 0); |
8131 | } | 8165 | } |
8132 | } | 8166 | } |
@@ -8228,9 +8262,6 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy, | |||
8228 | u16 cnt, val, tmp1; | 8262 | u16 cnt, val, tmp1; |
8229 | struct bnx2x *bp = params->bp; | 8263 | struct bnx2x *bp = params->bp; |
8230 | 8264 | ||
8231 | /* SPF+ PHY: Set flag to check for Tx error */ | ||
8232 | vars->phy_flags = PHY_TX_ERROR_CHECK_FLAG; | ||
8233 | |||
8234 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, | 8265 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, |
8235 | MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); | 8266 | MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); |
8236 | /* HW reset */ | 8267 | /* HW reset */ |
@@ -8414,9 +8445,6 @@ static int bnx2x_8726_config_init(struct bnx2x_phy *phy, | |||
8414 | struct bnx2x *bp = params->bp; | 8445 | struct bnx2x *bp = params->bp; |
8415 | DP(NETIF_MSG_LINK, "Initializing BCM8726\n"); | 8446 | DP(NETIF_MSG_LINK, "Initializing BCM8726\n"); |
8416 | 8447 | ||
8417 | /* SPF+ PHY: Set flag to check for Tx error */ | ||
8418 | vars->phy_flags = PHY_TX_ERROR_CHECK_FLAG; | ||
8419 | |||
8420 | bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); | 8448 | bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); |
8421 | bnx2x_wait_reset_complete(bp, phy, params); | 8449 | bnx2x_wait_reset_complete(bp, phy, params); |
8422 | 8450 | ||
@@ -8585,9 +8613,6 @@ static int bnx2x_8727_config_init(struct bnx2x_phy *phy, | |||
8585 | struct bnx2x *bp = params->bp; | 8613 | struct bnx2x *bp = params->bp; |
8586 | /* Enable PMD link, MOD_ABS_FLT, and 1G link alarm */ | 8614 | /* Enable PMD link, MOD_ABS_FLT, and 1G link alarm */ |
8587 | 8615 | ||
8588 | /* SPF+ PHY: Set flag to check for Tx error */ | ||
8589 | vars->phy_flags = PHY_TX_ERROR_CHECK_FLAG; | ||
8590 | |||
8591 | bnx2x_wait_reset_complete(bp, phy, params); | 8616 | bnx2x_wait_reset_complete(bp, phy, params); |
8592 | rx_alarm_ctrl_val = (1<<2) | (1<<5) ; | 8617 | rx_alarm_ctrl_val = (1<<2) | (1<<5) ; |
8593 | /* Should be 0x6 to enable XS on Tx side. */ | 8618 | /* Should be 0x6 to enable XS on Tx side. */ |
@@ -9243,7 +9268,13 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, | |||
9243 | if (phy->req_duplex == DUPLEX_FULL) | 9268 | if (phy->req_duplex == DUPLEX_FULL) |
9244 | autoneg_val |= (1<<8); | 9269 | autoneg_val |= (1<<8); |
9245 | 9270 | ||
9246 | bnx2x_cl45_write(bp, phy, | 9271 | /* |
9272 | * Always write this if this is not 84833. | ||
9273 | * For 84833, write it only when it's a forced speed. | ||
9274 | */ | ||
9275 | if ((phy->type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) || | ||
9276 | ((autoneg_val & (1<<12)) == 0)) | ||
9277 | bnx2x_cl45_write(bp, phy, | ||
9247 | MDIO_AN_DEVAD, | 9278 | MDIO_AN_DEVAD, |
9248 | MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val); | 9279 | MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val); |
9249 | 9280 | ||
@@ -9257,13 +9288,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, | |||
9257 | bnx2x_cl45_write(bp, phy, | 9288 | bnx2x_cl45_write(bp, phy, |
9258 | MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, | 9289 | MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, |
9259 | 0x3200); | 9290 | 0x3200); |
9260 | } else if (phy->req_line_speed != SPEED_10 && | 9291 | } else |
9261 | phy->req_line_speed != SPEED_100) { | ||
9262 | bnx2x_cl45_write(bp, phy, | 9292 | bnx2x_cl45_write(bp, phy, |
9263 | MDIO_AN_DEVAD, | 9293 | MDIO_AN_DEVAD, |
9264 | MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, | 9294 | MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, |
9265 | 1); | 9295 | 1); |
9266 | } | 9296 | |
9267 | /* Save spirom version */ | 9297 | /* Save spirom version */ |
9268 | bnx2x_save_848xx_spirom_version(phy, params); | 9298 | bnx2x_save_848xx_spirom_version(phy, params); |
9269 | 9299 | ||
@@ -9756,11 +9786,9 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy, | |||
9756 | bnx2x_cl45_read(bp, phy, | 9786 | bnx2x_cl45_read(bp, phy, |
9757 | MDIO_CTL_DEVAD, | 9787 | MDIO_CTL_DEVAD, |
9758 | 0x400f, &val16); | 9788 | 0x400f, &val16); |
9759 | /* Put to low power mode on newer FW */ | 9789 | bnx2x_cl45_write(bp, phy, |
9760 | if ((val16 & 0x303f) > 0x1009) | 9790 | MDIO_PMA_DEVAD, |
9761 | bnx2x_cl45_write(bp, phy, | 9791 | MDIO_PMA_REG_CTRL, 0x800); |
9762 | MDIO_PMA_DEVAD, | ||
9763 | MDIO_PMA_REG_CTRL, 0x800); | ||
9764 | } | 9792 | } |
9765 | } | 9793 | } |
9766 | 9794 | ||
@@ -10191,8 +10219,15 @@ static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy, | |||
10191 | u32 cfg_pin; | 10219 | u32 cfg_pin; |
10192 | u8 port; | 10220 | u8 port; |
10193 | 10221 | ||
10194 | /* This works with E3 only, no need to check the chip | 10222 | /* |
10195 | before determining the port. */ | 10223 | * In case of no EPIO routed to reset the GPHY, put it |
10224 | * in low power mode. | ||
10225 | */ | ||
10226 | bnx2x_cl22_write(bp, phy, MDIO_PMA_REG_CTRL, 0x800); | ||
10227 | /* | ||
10228 | * This works with E3 only, no need to check the chip | ||
10229 | * before determining the port. | ||
10230 | */ | ||
10196 | port = params->port; | 10231 | port = params->port; |
10197 | cfg_pin = (REG_RD(bp, params->shmem_base + | 10232 | cfg_pin = (REG_RD(bp, params->shmem_base + |
10198 | offsetof(struct shmem_region, | 10233 | offsetof(struct shmem_region, |
@@ -10603,7 +10638,8 @@ static struct bnx2x_phy phy_warpcore = { | |||
10603 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT, | 10638 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT, |
10604 | .addr = 0xff, | 10639 | .addr = 0xff, |
10605 | .def_md_devad = 0, | 10640 | .def_md_devad = 0, |
10606 | .flags = FLAGS_HW_LOCK_REQUIRED, | 10641 | .flags = (FLAGS_HW_LOCK_REQUIRED | |
10642 | FLAGS_TX_ERROR_CHECK), | ||
10607 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10643 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10608 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10644 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10609 | .mdio_ctrl = 0, | 10645 | .mdio_ctrl = 0, |
@@ -10729,7 +10765,8 @@ static struct bnx2x_phy phy_8706 = { | |||
10729 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706, | 10765 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706, |
10730 | .addr = 0xff, | 10766 | .addr = 0xff, |
10731 | .def_md_devad = 0, | 10767 | .def_md_devad = 0, |
10732 | .flags = FLAGS_INIT_XGXS_FIRST, | 10768 | .flags = (FLAGS_INIT_XGXS_FIRST | |
10769 | FLAGS_TX_ERROR_CHECK), | ||
10733 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10770 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10734 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10771 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10735 | .mdio_ctrl = 0, | 10772 | .mdio_ctrl = 0, |
@@ -10760,7 +10797,8 @@ static struct bnx2x_phy phy_8726 = { | |||
10760 | .addr = 0xff, | 10797 | .addr = 0xff, |
10761 | .def_md_devad = 0, | 10798 | .def_md_devad = 0, |
10762 | .flags = (FLAGS_HW_LOCK_REQUIRED | | 10799 | .flags = (FLAGS_HW_LOCK_REQUIRED | |
10763 | FLAGS_INIT_XGXS_FIRST), | 10800 | FLAGS_INIT_XGXS_FIRST | |
10801 | FLAGS_TX_ERROR_CHECK), | ||
10764 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10802 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10765 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10803 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10766 | .mdio_ctrl = 0, | 10804 | .mdio_ctrl = 0, |
@@ -10791,7 +10829,8 @@ static struct bnx2x_phy phy_8727 = { | |||
10791 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727, | 10829 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727, |
10792 | .addr = 0xff, | 10830 | .addr = 0xff, |
10793 | .def_md_devad = 0, | 10831 | .def_md_devad = 0, |
10794 | .flags = FLAGS_FAN_FAILURE_DET_REQ, | 10832 | .flags = (FLAGS_FAN_FAILURE_DET_REQ | |
10833 | FLAGS_TX_ERROR_CHECK), | ||
10795 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10834 | .rx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10796 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, | 10835 | .tx_preemphasis = {0xffff, 0xffff, 0xffff, 0xffff}, |
10797 | .mdio_ctrl = 0, | 10836 | .mdio_ctrl = 0, |
@@ -11112,6 +11151,8 @@ static int bnx2x_populate_int_phy(struct bnx2x *bp, u32 shmem_base, u8 port, | |||
11112 | */ | 11151 | */ |
11113 | if (CHIP_REV(bp) == CHIP_REV_Ax) | 11152 | if (CHIP_REV(bp) == CHIP_REV_Ax) |
11114 | phy->flags |= FLAGS_MDC_MDIO_WA; | 11153 | phy->flags |= FLAGS_MDC_MDIO_WA; |
11154 | else | ||
11155 | phy->flags |= FLAGS_MDC_MDIO_WA_B0; | ||
11115 | } else { | 11156 | } else { |
11116 | switch (switch_cfg) { | 11157 | switch (switch_cfg) { |
11117 | case SWITCH_CFG_1G: | 11158 | case SWITCH_CFG_1G: |
@@ -11500,13 +11541,12 @@ void bnx2x_init_xmac_loopback(struct link_params *params, | |||
11500 | * Set WC to loopback mode since link is required to provide clock | 11541 | * Set WC to loopback mode since link is required to provide clock |
11501 | * to the XMAC in 20G mode | 11542 | * to the XMAC in 20G mode |
11502 | */ | 11543 | */ |
11503 | if (vars->line_speed == SPEED_20000) { | 11544 | bnx2x_set_aer_mmd(params, ¶ms->phy[0]); |
11504 | bnx2x_set_aer_mmd(params, ¶ms->phy[0]); | 11545 | bnx2x_warpcore_reset_lane(bp, ¶ms->phy[0], 0); |
11505 | bnx2x_warpcore_reset_lane(bp, ¶ms->phy[0], 0); | 11546 | params->phy[INT_PHY].config_loopback( |
11506 | params->phy[INT_PHY].config_loopback( | ||
11507 | ¶ms->phy[INT_PHY], | 11547 | ¶ms->phy[INT_PHY], |
11508 | params); | 11548 | params); |
11509 | } | 11549 | |
11510 | bnx2x_xmac_enable(params, vars, 1); | 11550 | bnx2x_xmac_enable(params, vars, 1); |
11511 | REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); | 11551 | REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); |
11512 | } | 11552 | } |
@@ -11684,12 +11724,16 @@ int bnx2x_link_reset(struct link_params *params, struct link_vars *vars, | |||
11684 | bnx2x_set_led(params, vars, LED_MODE_OFF, 0); | 11724 | bnx2x_set_led(params, vars, LED_MODE_OFF, 0); |
11685 | 11725 | ||
11686 | if (reset_ext_phy) { | 11726 | if (reset_ext_phy) { |
11727 | bnx2x_set_mdio_clk(bp, params->chip_id, port); | ||
11687 | for (phy_index = EXT_PHY1; phy_index < params->num_phys; | 11728 | for (phy_index = EXT_PHY1; phy_index < params->num_phys; |
11688 | phy_index++) { | 11729 | phy_index++) { |
11689 | if (params->phy[phy_index].link_reset) | 11730 | if (params->phy[phy_index].link_reset) { |
11731 | bnx2x_set_aer_mmd(params, | ||
11732 | ¶ms->phy[phy_index]); | ||
11690 | params->phy[phy_index].link_reset( | 11733 | params->phy[phy_index].link_reset( |
11691 | ¶ms->phy[phy_index], | 11734 | ¶ms->phy[phy_index], |
11692 | params); | 11735 | params); |
11736 | } | ||
11693 | if (params->phy[phy_index].flags & | 11737 | if (params->phy[phy_index].flags & |
11694 | FLAGS_REARM_LATCH_SIGNAL) | 11738 | FLAGS_REARM_LATCH_SIGNAL) |
11695 | clear_latch_ind = 1; | 11739 | clear_latch_ind = 1; |
@@ -12178,10 +12222,6 @@ static void bnx2x_analyze_link_error(struct link_params *params, | |||
12178 | u8 led_mode; | 12222 | u8 led_mode; |
12179 | u32 half_open_conn = (vars->phy_flags & PHY_HALF_OPEN_CONN_FLAG) > 0; | 12223 | u32 half_open_conn = (vars->phy_flags & PHY_HALF_OPEN_CONN_FLAG) > 0; |
12180 | 12224 | ||
12181 | /*DP(NETIF_MSG_LINK, "CHECK LINK: %x half_open:%x-> lss:%x\n", | ||
12182 | vars->link_up, | ||
12183 | half_open_conn, lss_status);*/ | ||
12184 | |||
12185 | if ((lss_status ^ half_open_conn) == 0) | 12225 | if ((lss_status ^ half_open_conn) == 0) |
12186 | return; | 12226 | return; |
12187 | 12227 | ||
@@ -12194,6 +12234,7 @@ static void bnx2x_analyze_link_error(struct link_params *params, | |||
12194 | * b. Update link_vars->link_up | 12234 | * b. Update link_vars->link_up |
12195 | */ | 12235 | */ |
12196 | if (lss_status) { | 12236 | if (lss_status) { |
12237 | DP(NETIF_MSG_LINK, "Remote Fault detected !!!\n"); | ||
12197 | vars->link_status &= ~LINK_STATUS_LINK_UP; | 12238 | vars->link_status &= ~LINK_STATUS_LINK_UP; |
12198 | vars->link_up = 0; | 12239 | vars->link_up = 0; |
12199 | vars->phy_flags |= PHY_HALF_OPEN_CONN_FLAG; | 12240 | vars->phy_flags |= PHY_HALF_OPEN_CONN_FLAG; |
@@ -12203,6 +12244,7 @@ static void bnx2x_analyze_link_error(struct link_params *params, | |||
12203 | */ | 12244 | */ |
12204 | led_mode = LED_MODE_OFF; | 12245 | led_mode = LED_MODE_OFF; |
12205 | } else { | 12246 | } else { |
12247 | DP(NETIF_MSG_LINK, "Remote Fault cleared\n"); | ||
12206 | vars->link_status |= LINK_STATUS_LINK_UP; | 12248 | vars->link_status |= LINK_STATUS_LINK_UP; |
12207 | vars->link_up = 1; | 12249 | vars->link_up = 1; |
12208 | vars->phy_flags &= ~PHY_HALF_OPEN_CONN_FLAG; | 12250 | vars->phy_flags &= ~PHY_HALF_OPEN_CONN_FLAG; |
@@ -12219,6 +12261,15 @@ static void bnx2x_analyze_link_error(struct link_params *params, | |||
12219 | bnx2x_notify_link_changed(bp); | 12261 | bnx2x_notify_link_changed(bp); |
12220 | } | 12262 | } |
12221 | 12263 | ||
12264 | /****************************************************************************** | ||
12265 | * Description: | ||
12266 | * This function checks for half opened connection change indication. | ||
12267 | * When such change occurs, it calls the bnx2x_analyze_link_error | ||
12268 | * to check if Remote Fault is set or cleared. Reception of remote fault | ||
12269 | * status message in the MAC indicates that the peer's MAC has detected | ||
12270 | * a fault, for example, due to break in the TX side of fiber. | ||
12271 | * | ||
12272 | ******************************************************************************/ | ||
12222 | static void bnx2x_check_half_open_conn(struct link_params *params, | 12273 | static void bnx2x_check_half_open_conn(struct link_params *params, |
12223 | struct link_vars *vars) | 12274 | struct link_vars *vars) |
12224 | { | 12275 | { |
@@ -12229,9 +12280,28 @@ static void bnx2x_check_half_open_conn(struct link_params *params, | |||
12229 | if ((vars->phy_flags & PHY_PHYSICAL_LINK_FLAG) == 0) | 12280 | if ((vars->phy_flags & PHY_PHYSICAL_LINK_FLAG) == 0) |
12230 | return; | 12281 | return; |
12231 | 12282 | ||
12232 | if (!CHIP_IS_E3(bp) && | 12283 | if (CHIP_IS_E3(bp) && |
12233 | (REG_RD(bp, MISC_REG_RESET_REG_2) & | 12284 | (REG_RD(bp, MISC_REG_RESET_REG_2) & |
12234 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port))) { | 12285 | (MISC_REGISTERS_RESET_REG_2_XMAC))) { |
12286 | /* Check E3 XMAC */ | ||
12287 | /* | ||
12288 | * Note that link speed cannot be queried here, since it may be | ||
12289 | * zero while link is down. In case UMAC is active, LSS will | ||
12290 | * simply not be set | ||
12291 | */ | ||
12292 | mac_base = (params->port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; | ||
12293 | |||
12294 | /* Clear stick bits (Requires rising edge) */ | ||
12295 | REG_WR(bp, mac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, 0); | ||
12296 | REG_WR(bp, mac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, | ||
12297 | XMAC_CLEAR_RX_LSS_STATUS_REG_CLEAR_LOCAL_FAULT_STATUS | | ||
12298 | XMAC_CLEAR_RX_LSS_STATUS_REG_CLEAR_REMOTE_FAULT_STATUS); | ||
12299 | if (REG_RD(bp, mac_base + XMAC_REG_RX_LSS_STATUS)) | ||
12300 | lss_status = 1; | ||
12301 | |||
12302 | bnx2x_analyze_link_error(params, vars, lss_status); | ||
12303 | } else if (REG_RD(bp, MISC_REG_RESET_REG_2) & | ||
12304 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port)) { | ||
12235 | /* Check E1X / E2 BMAC */ | 12305 | /* Check E1X / E2 BMAC */ |
12236 | u32 lss_status_reg; | 12306 | u32 lss_status_reg; |
12237 | u32 wb_data[2]; | 12307 | u32 wb_data[2]; |
@@ -12253,14 +12323,20 @@ static void bnx2x_check_half_open_conn(struct link_params *params, | |||
12253 | void bnx2x_period_func(struct link_params *params, struct link_vars *vars) | 12323 | void bnx2x_period_func(struct link_params *params, struct link_vars *vars) |
12254 | { | 12324 | { |
12255 | struct bnx2x *bp = params->bp; | 12325 | struct bnx2x *bp = params->bp; |
12326 | u16 phy_idx; | ||
12256 | if (!params) { | 12327 | if (!params) { |
12257 | DP(NETIF_MSG_LINK, "Ininitliazed params !\n"); | 12328 | DP(NETIF_MSG_LINK, "Uninitialized params !\n"); |
12258 | return; | 12329 | return; |
12259 | } | 12330 | } |
12260 | /* DP(NETIF_MSG_LINK, "Periodic called vars->phy_flags 0x%x speed 0x%x | 12331 | |
12261 | RESET_REG_2 0x%x\n", vars->phy_flags, vars->line_speed, | 12332 | for (phy_idx = INT_PHY; phy_idx < MAX_PHYS; phy_idx++) { |
12262 | REG_RD(bp, MISC_REG_RESET_REG_2)); */ | 12333 | if (params->phy[phy_idx].flags & FLAGS_TX_ERROR_CHECK) { |
12263 | bnx2x_check_half_open_conn(params, vars); | 12334 | bnx2x_set_aer_mmd(params, ¶ms->phy[phy_idx]); |
12335 | bnx2x_check_half_open_conn(params, vars); | ||
12336 | break; | ||
12337 | } | ||
12338 | } | ||
12339 | |||
12264 | if (CHIP_IS_E3(bp)) | 12340 | if (CHIP_IS_E3(bp)) |
12265 | bnx2x_check_over_curr(params, vars); | 12341 | bnx2x_check_over_curr(params, vars); |
12266 | } | 12342 | } |
diff --git a/drivers/net/bnx2x/bnx2x_link.h b/drivers/net/bnx2x/bnx2x_link.h index 6a7708d5da37..c12db6da213e 100644 --- a/drivers/net/bnx2x/bnx2x_link.h +++ b/drivers/net/bnx2x/bnx2x_link.h | |||
@@ -145,6 +145,8 @@ struct bnx2x_phy { | |||
145 | #define FLAGS_SFP_NOT_APPROVED (1<<7) | 145 | #define FLAGS_SFP_NOT_APPROVED (1<<7) |
146 | #define FLAGS_MDC_MDIO_WA (1<<8) | 146 | #define FLAGS_MDC_MDIO_WA (1<<8) |
147 | #define FLAGS_DUMMY_READ (1<<9) | 147 | #define FLAGS_DUMMY_READ (1<<9) |
148 | #define FLAGS_MDC_MDIO_WA_B0 (1<<10) | ||
149 | #define FLAGS_TX_ERROR_CHECK (1<<12) | ||
148 | 150 | ||
149 | /* preemphasis values for the rx side */ | 151 | /* preemphasis values for the rx side */ |
150 | u16 rx_preemphasis[4]; | 152 | u16 rx_preemphasis[4]; |
@@ -276,7 +278,6 @@ struct link_vars { | |||
276 | #define PHY_PHYSICAL_LINK_FLAG (1<<2) | 278 | #define PHY_PHYSICAL_LINK_FLAG (1<<2) |
277 | #define PHY_HALF_OPEN_CONN_FLAG (1<<3) | 279 | #define PHY_HALF_OPEN_CONN_FLAG (1<<3) |
278 | #define PHY_OVER_CURRENT_FLAG (1<<4) | 280 | #define PHY_OVER_CURRENT_FLAG (1<<4) |
279 | #define PHY_TX_ERROR_CHECK_FLAG (1<<5) | ||
280 | 281 | ||
281 | u8 mac_type; | 282 | u8 mac_type; |
282 | #define MAC_TYPE_NONE 0 | 283 | #define MAC_TYPE_NONE 0 |
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h index 02461fef8751..27b5ecb11830 100644 --- a/drivers/net/bnx2x/bnx2x_reg.h +++ b/drivers/net/bnx2x/bnx2x_reg.h | |||
@@ -4771,9 +4771,11 @@ | |||
4771 | The fields are: [4:0] - tail pointer; 10:5] - Link List size; 15:11] - | 4771 | The fields are: [4:0] - tail pointer; 10:5] - Link List size; 15:11] - |
4772 | header pointer. */ | 4772 | header pointer. */ |
4773 | #define UCM_REG_XX_TABLE 0xe0300 | 4773 | #define UCM_REG_XX_TABLE 0xe0300 |
4774 | #define UMAC_COMMAND_CONFIG_REG_IGNORE_TX_PAUSE (0x1<<28) | ||
4774 | #define UMAC_COMMAND_CONFIG_REG_LOOP_ENA (0x1<<15) | 4775 | #define UMAC_COMMAND_CONFIG_REG_LOOP_ENA (0x1<<15) |
4775 | #define UMAC_COMMAND_CONFIG_REG_NO_LGTH_CHECK (0x1<<24) | 4776 | #define UMAC_COMMAND_CONFIG_REG_NO_LGTH_CHECK (0x1<<24) |
4776 | #define UMAC_COMMAND_CONFIG_REG_PAD_EN (0x1<<5) | 4777 | #define UMAC_COMMAND_CONFIG_REG_PAD_EN (0x1<<5) |
4778 | #define UMAC_COMMAND_CONFIG_REG_PAUSE_IGNORE (0x1<<8) | ||
4777 | #define UMAC_COMMAND_CONFIG_REG_PROMIS_EN (0x1<<4) | 4779 | #define UMAC_COMMAND_CONFIG_REG_PROMIS_EN (0x1<<4) |
4778 | #define UMAC_COMMAND_CONFIG_REG_RX_ENA (0x1<<1) | 4780 | #define UMAC_COMMAND_CONFIG_REG_RX_ENA (0x1<<1) |
4779 | #define UMAC_COMMAND_CONFIG_REG_SW_RESET (0x1<<13) | 4781 | #define UMAC_COMMAND_CONFIG_REG_SW_RESET (0x1<<13) |
@@ -5622,8 +5624,9 @@ | |||
5622 | #define EMAC_MDIO_COMM_START_BUSY (1L<<29) | 5624 | #define EMAC_MDIO_COMM_START_BUSY (1L<<29) |
5623 | #define EMAC_MDIO_MODE_AUTO_POLL (1L<<4) | 5625 | #define EMAC_MDIO_MODE_AUTO_POLL (1L<<4) |
5624 | #define EMAC_MDIO_MODE_CLAUSE_45 (1L<<31) | 5626 | #define EMAC_MDIO_MODE_CLAUSE_45 (1L<<31) |
5625 | #define EMAC_MDIO_MODE_CLOCK_CNT (0x3fL<<16) | 5627 | #define EMAC_MDIO_MODE_CLOCK_CNT (0x3ffL<<16) |
5626 | #define EMAC_MDIO_MODE_CLOCK_CNT_BITSHIFT 16 | 5628 | #define EMAC_MDIO_MODE_CLOCK_CNT_BITSHIFT 16 |
5629 | #define EMAC_MDIO_STATUS_10MB (1L<<1) | ||
5627 | #define EMAC_MODE_25G_MODE (1L<<5) | 5630 | #define EMAC_MODE_25G_MODE (1L<<5) |
5628 | #define EMAC_MODE_HALF_DUPLEX (1L<<1) | 5631 | #define EMAC_MODE_HALF_DUPLEX (1L<<1) |
5629 | #define EMAC_MODE_PORT_GMII (2L<<2) | 5632 | #define EMAC_MODE_PORT_GMII (2L<<2) |
@@ -5634,6 +5637,7 @@ | |||
5634 | #define EMAC_REG_EMAC_MAC_MATCH 0x10 | 5637 | #define EMAC_REG_EMAC_MAC_MATCH 0x10 |
5635 | #define EMAC_REG_EMAC_MDIO_COMM 0xac | 5638 | #define EMAC_REG_EMAC_MDIO_COMM 0xac |
5636 | #define EMAC_REG_EMAC_MDIO_MODE 0xb4 | 5639 | #define EMAC_REG_EMAC_MDIO_MODE 0xb4 |
5640 | #define EMAC_REG_EMAC_MDIO_STATUS 0xb0 | ||
5637 | #define EMAC_REG_EMAC_MODE 0x0 | 5641 | #define EMAC_REG_EMAC_MODE 0x0 |
5638 | #define EMAC_REG_EMAC_RX_MODE 0xc8 | 5642 | #define EMAC_REG_EMAC_RX_MODE 0xc8 |
5639 | #define EMAC_REG_EMAC_RX_MTU_SIZE 0x9c | 5643 | #define EMAC_REG_EMAC_RX_MTU_SIZE 0x9c |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index c5f0f04219f3..5548d464261a 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -838,6 +838,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
838 | 838 | ||
839 | /* Disable all the interrupts */ | 839 | /* Disable all the interrupts */ |
840 | ew32(IMC, 0xFFFFFFFF); | 840 | ew32(IMC, 0xFFFFFFFF); |
841 | E1000_WRITE_FLUSH(); | ||
841 | msleep(10); | 842 | msleep(10); |
842 | 843 | ||
843 | /* Test each interrupt */ | 844 | /* Test each interrupt */ |
@@ -856,6 +857,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
856 | adapter->test_icr = 0; | 857 | adapter->test_icr = 0; |
857 | ew32(IMC, mask); | 858 | ew32(IMC, mask); |
858 | ew32(ICS, mask); | 859 | ew32(ICS, mask); |
860 | E1000_WRITE_FLUSH(); | ||
859 | msleep(10); | 861 | msleep(10); |
860 | 862 | ||
861 | if (adapter->test_icr & mask) { | 863 | if (adapter->test_icr & mask) { |
@@ -873,6 +875,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
873 | adapter->test_icr = 0; | 875 | adapter->test_icr = 0; |
874 | ew32(IMS, mask); | 876 | ew32(IMS, mask); |
875 | ew32(ICS, mask); | 877 | ew32(ICS, mask); |
878 | E1000_WRITE_FLUSH(); | ||
876 | msleep(10); | 879 | msleep(10); |
877 | 880 | ||
878 | if (!(adapter->test_icr & mask)) { | 881 | if (!(adapter->test_icr & mask)) { |
@@ -890,6 +893,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
890 | adapter->test_icr = 0; | 893 | adapter->test_icr = 0; |
891 | ew32(IMC, ~mask & 0x00007FFF); | 894 | ew32(IMC, ~mask & 0x00007FFF); |
892 | ew32(ICS, ~mask & 0x00007FFF); | 895 | ew32(ICS, ~mask & 0x00007FFF); |
896 | E1000_WRITE_FLUSH(); | ||
893 | msleep(10); | 897 | msleep(10); |
894 | 898 | ||
895 | if (adapter->test_icr) { | 899 | if (adapter->test_icr) { |
@@ -901,6 +905,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
901 | 905 | ||
902 | /* Disable all the interrupts */ | 906 | /* Disable all the interrupts */ |
903 | ew32(IMC, 0xFFFFFFFF); | 907 | ew32(IMC, 0xFFFFFFFF); |
908 | E1000_WRITE_FLUSH(); | ||
904 | msleep(10); | 909 | msleep(10); |
905 | 910 | ||
906 | /* Unhook test interrupt handler */ | 911 | /* Unhook test interrupt handler */ |
@@ -1394,6 +1399,7 @@ static int e1000_run_loopback_test(struct e1000_adapter *adapter) | |||
1394 | if (unlikely(++k == txdr->count)) k = 0; | 1399 | if (unlikely(++k == txdr->count)) k = 0; |
1395 | } | 1400 | } |
1396 | ew32(TDT, k); | 1401 | ew32(TDT, k); |
1402 | E1000_WRITE_FLUSH(); | ||
1397 | msleep(200); | 1403 | msleep(200); |
1398 | time = jiffies; /* set the start time for the receive */ | 1404 | time = jiffies; /* set the start time for the receive */ |
1399 | good_cnt = 0; | 1405 | good_cnt = 0; |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 1698622af434..8545c7aa93eb 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -446,6 +446,7 @@ s32 e1000_reset_hw(struct e1000_hw *hw) | |||
446 | /* Must reset the PHY before resetting the MAC */ | 446 | /* Must reset the PHY before resetting the MAC */ |
447 | if ((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { | 447 | if ((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { |
448 | ew32(CTRL, (ctrl | E1000_CTRL_PHY_RST)); | 448 | ew32(CTRL, (ctrl | E1000_CTRL_PHY_RST)); |
449 | E1000_WRITE_FLUSH(); | ||
449 | msleep(5); | 450 | msleep(5); |
450 | } | 451 | } |
451 | 452 | ||
@@ -3752,6 +3753,7 @@ static s32 e1000_acquire_eeprom(struct e1000_hw *hw) | |||
3752 | /* Clear SK and CS */ | 3753 | /* Clear SK and CS */ |
3753 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); | 3754 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); |
3754 | ew32(EECD, eecd); | 3755 | ew32(EECD, eecd); |
3756 | E1000_WRITE_FLUSH(); | ||
3755 | udelay(1); | 3757 | udelay(1); |
3756 | } | 3758 | } |
3757 | 3759 | ||
@@ -3824,6 +3826,7 @@ static void e1000_release_eeprom(struct e1000_hw *hw) | |||
3824 | eecd &= ~E1000_EECD_SK; /* Lower SCK */ | 3826 | eecd &= ~E1000_EECD_SK; /* Lower SCK */ |
3825 | 3827 | ||
3826 | ew32(EECD, eecd); | 3828 | ew32(EECD, eecd); |
3829 | E1000_WRITE_FLUSH(); | ||
3827 | 3830 | ||
3828 | udelay(hw->eeprom.delay_usec); | 3831 | udelay(hw->eeprom.delay_usec); |
3829 | } else if (hw->eeprom.type == e1000_eeprom_microwire) { | 3832 | } else if (hw->eeprom.type == e1000_eeprom_microwire) { |
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index c0ecb2d9fdb7..e4f42257c24c 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c | |||
@@ -1313,6 +1313,7 @@ static s32 e1000_read_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, | |||
1313 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & | 1313 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & |
1314 | E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; | 1314 | E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; |
1315 | ew32(KMRNCTRLSTA, kmrnctrlsta); | 1315 | ew32(KMRNCTRLSTA, kmrnctrlsta); |
1316 | e1e_flush(); | ||
1316 | 1317 | ||
1317 | udelay(2); | 1318 | udelay(2); |
1318 | 1319 | ||
@@ -1347,6 +1348,7 @@ static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, | |||
1347 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & | 1348 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & |
1348 | E1000_KMRNCTRLSTA_OFFSET) | data; | 1349 | E1000_KMRNCTRLSTA_OFFSET) | data; |
1349 | ew32(KMRNCTRLSTA, kmrnctrlsta); | 1350 | ew32(KMRNCTRLSTA, kmrnctrlsta); |
1351 | e1e_flush(); | ||
1350 | 1352 | ||
1351 | udelay(2); | 1353 | udelay(2); |
1352 | 1354 | ||
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index cb1a3623253e..06d88f316dce 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -28,8 +28,8 @@ | |||
28 | 28 | ||
29 | /* ethtool support for e1000 */ | 29 | /* ethtool support for e1000 */ |
30 | 30 | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/netdevice.h> | 31 | #include <linux/netdevice.h> |
32 | #include <linux/interrupt.h> | ||
33 | #include <linux/ethtool.h> | 33 | #include <linux/ethtool.h> |
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
@@ -964,6 +964,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
964 | 964 | ||
965 | /* Disable all the interrupts */ | 965 | /* Disable all the interrupts */ |
966 | ew32(IMC, 0xFFFFFFFF); | 966 | ew32(IMC, 0xFFFFFFFF); |
967 | e1e_flush(); | ||
967 | usleep_range(10000, 20000); | 968 | usleep_range(10000, 20000); |
968 | 969 | ||
969 | /* Test each interrupt */ | 970 | /* Test each interrupt */ |
@@ -996,6 +997,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
996 | adapter->test_icr = 0; | 997 | adapter->test_icr = 0; |
997 | ew32(IMC, mask); | 998 | ew32(IMC, mask); |
998 | ew32(ICS, mask); | 999 | ew32(ICS, mask); |
1000 | e1e_flush(); | ||
999 | usleep_range(10000, 20000); | 1001 | usleep_range(10000, 20000); |
1000 | 1002 | ||
1001 | if (adapter->test_icr & mask) { | 1003 | if (adapter->test_icr & mask) { |
@@ -1014,6 +1016,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
1014 | adapter->test_icr = 0; | 1016 | adapter->test_icr = 0; |
1015 | ew32(IMS, mask); | 1017 | ew32(IMS, mask); |
1016 | ew32(ICS, mask); | 1018 | ew32(ICS, mask); |
1019 | e1e_flush(); | ||
1017 | usleep_range(10000, 20000); | 1020 | usleep_range(10000, 20000); |
1018 | 1021 | ||
1019 | if (!(adapter->test_icr & mask)) { | 1022 | if (!(adapter->test_icr & mask)) { |
@@ -1032,6 +1035,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
1032 | adapter->test_icr = 0; | 1035 | adapter->test_icr = 0; |
1033 | ew32(IMC, ~mask & 0x00007FFF); | 1036 | ew32(IMC, ~mask & 0x00007FFF); |
1034 | ew32(ICS, ~mask & 0x00007FFF); | 1037 | ew32(ICS, ~mask & 0x00007FFF); |
1038 | e1e_flush(); | ||
1035 | usleep_range(10000, 20000); | 1039 | usleep_range(10000, 20000); |
1036 | 1040 | ||
1037 | if (adapter->test_icr) { | 1041 | if (adapter->test_icr) { |
@@ -1043,6 +1047,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
1043 | 1047 | ||
1044 | /* Disable all the interrupts */ | 1048 | /* Disable all the interrupts */ |
1045 | ew32(IMC, 0xFFFFFFFF); | 1049 | ew32(IMC, 0xFFFFFFFF); |
1050 | e1e_flush(); | ||
1046 | usleep_range(10000, 20000); | 1051 | usleep_range(10000, 20000); |
1047 | 1052 | ||
1048 | /* Unhook test interrupt handler */ | 1053 | /* Unhook test interrupt handler */ |
@@ -1276,6 +1281,7 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) | |||
1276 | E1000_CTRL_FD); /* Force Duplex to FULL */ | 1281 | E1000_CTRL_FD); /* Force Duplex to FULL */ |
1277 | 1282 | ||
1278 | ew32(CTRL, ctrl_reg); | 1283 | ew32(CTRL, ctrl_reg); |
1284 | e1e_flush(); | ||
1279 | udelay(500); | 1285 | udelay(500); |
1280 | 1286 | ||
1281 | return 0; | 1287 | return 0; |
@@ -1418,6 +1424,7 @@ static int e1000_set_82571_fiber_loopback(struct e1000_adapter *adapter) | |||
1418 | */ | 1424 | */ |
1419 | #define E1000_SERDES_LB_ON 0x410 | 1425 | #define E1000_SERDES_LB_ON 0x410 |
1420 | ew32(SCTL, E1000_SERDES_LB_ON); | 1426 | ew32(SCTL, E1000_SERDES_LB_ON); |
1427 | e1e_flush(); | ||
1421 | usleep_range(10000, 20000); | 1428 | usleep_range(10000, 20000); |
1422 | 1429 | ||
1423 | return 0; | 1430 | return 0; |
@@ -1513,6 +1520,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter) | |||
1513 | hw->phy.media_type == e1000_media_type_internal_serdes) { | 1520 | hw->phy.media_type == e1000_media_type_internal_serdes) { |
1514 | #define E1000_SERDES_LB_OFF 0x400 | 1521 | #define E1000_SERDES_LB_OFF 0x400 |
1515 | ew32(SCTL, E1000_SERDES_LB_OFF); | 1522 | ew32(SCTL, E1000_SERDES_LB_OFF); |
1523 | e1e_flush(); | ||
1516 | usleep_range(10000, 20000); | 1524 | usleep_range(10000, 20000); |
1517 | break; | 1525 | break; |
1518 | } | 1526 | } |
@@ -1592,6 +1600,7 @@ static int e1000_run_loopback_test(struct e1000_adapter *adapter) | |||
1592 | k = 0; | 1600 | k = 0; |
1593 | } | 1601 | } |
1594 | ew32(TDT, k); | 1602 | ew32(TDT, k); |
1603 | e1e_flush(); | ||
1595 | msleep(200); | 1604 | msleep(200); |
1596 | time = jiffies; /* set the start time for the receive */ | 1605 | time = jiffies; /* set the start time for the receive */ |
1597 | good_cnt = 0; | 1606 | good_cnt = 0; |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index c1752124f3cd..4e36978b8fd8 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -283,6 +283,7 @@ static void e1000_toggle_lanphypc_value_ich8lan(struct e1000_hw *hw) | |||
283 | ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; | 283 | ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; |
284 | ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; | 284 | ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; |
285 | ew32(CTRL, ctrl); | 285 | ew32(CTRL, ctrl); |
286 | e1e_flush(); | ||
286 | udelay(10); | 287 | udelay(10); |
287 | ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE; | 288 | ctrl &= ~E1000_CTRL_LANPHYPC_OVERRIDE; |
288 | ew32(CTRL, ctrl); | 289 | ew32(CTRL, ctrl); |
@@ -1230,9 +1231,11 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable) | |||
1230 | ew32(CTRL, reg); | 1231 | ew32(CTRL, reg); |
1231 | 1232 | ||
1232 | ew32(CTRL_EXT, ctrl_ext | E1000_CTRL_EXT_SPD_BYPS); | 1233 | ew32(CTRL_EXT, ctrl_ext | E1000_CTRL_EXT_SPD_BYPS); |
1234 | e1e_flush(); | ||
1233 | udelay(20); | 1235 | udelay(20); |
1234 | ew32(CTRL, ctrl_reg); | 1236 | ew32(CTRL, ctrl_reg); |
1235 | ew32(CTRL_EXT, ctrl_ext); | 1237 | ew32(CTRL_EXT, ctrl_ext); |
1238 | e1e_flush(); | ||
1236 | udelay(20); | 1239 | udelay(20); |
1237 | 1240 | ||
1238 | out: | 1241 | out: |
@@ -2134,8 +2137,7 @@ static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, | |||
2134 | 2137 | ||
2135 | ret_val = 0; | 2138 | ret_val = 0; |
2136 | for (i = 0; i < words; i++) { | 2139 | for (i = 0; i < words; i++) { |
2137 | if ((dev_spec->shadow_ram) && | 2140 | if (dev_spec->shadow_ram[offset+i].modified) { |
2138 | (dev_spec->shadow_ram[offset+i].modified)) { | ||
2139 | data[i] = dev_spec->shadow_ram[offset+i].value; | 2141 | data[i] = dev_spec->shadow_ram[offset+i].value; |
2140 | } else { | 2142 | } else { |
2141 | ret_val = e1000_read_flash_word_ich8lan(hw, | 2143 | ret_val = e1000_read_flash_word_ich8lan(hw, |
@@ -3090,6 +3092,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
3090 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 3092 | ret_val = e1000_acquire_swflag_ich8lan(hw); |
3091 | e_dbg("Issuing a global reset to ich8lan\n"); | 3093 | e_dbg("Issuing a global reset to ich8lan\n"); |
3092 | ew32(CTRL, (ctrl | E1000_CTRL_RST)); | 3094 | ew32(CTRL, (ctrl | E1000_CTRL_RST)); |
3095 | /* cannot issue a flush here because it hangs the hardware */ | ||
3093 | msleep(20); | 3096 | msleep(20); |
3094 | 3097 | ||
3095 | if (!ret_val) | 3098 | if (!ret_val) |
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c index 65580b405942..7898a67d6505 100644 --- a/drivers/net/e1000e/lib.c +++ b/drivers/net/e1000e/lib.c | |||
@@ -1986,6 +1986,7 @@ static s32 e1000_ready_nvm_eeprom(struct e1000_hw *hw) | |||
1986 | /* Clear SK and CS */ | 1986 | /* Clear SK and CS */ |
1987 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); | 1987 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); |
1988 | ew32(EECD, eecd); | 1988 | ew32(EECD, eecd); |
1989 | e1e_flush(); | ||
1989 | udelay(1); | 1990 | udelay(1); |
1990 | 1991 | ||
1991 | /* | 1992 | /* |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 4353ad56cf16..ab4be80f7ab5 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -31,12 +31,12 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/interrupt.h> | ||
35 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
36 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
37 | #include <linux/pagemap.h> | 36 | #include <linux/pagemap.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/interrupt.h> | ||
40 | #include <linux/tcp.h> | 40 | #include <linux/tcp.h> |
41 | #include <linux/ipv6.h> | 41 | #include <linux/ipv6.h> |
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 2a6ee13285b1..8666476cb9be 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -537,6 +537,7 @@ static s32 __e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data, | |||
537 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & | 537 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & |
538 | E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; | 538 | E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; |
539 | ew32(KMRNCTRLSTA, kmrnctrlsta); | 539 | ew32(KMRNCTRLSTA, kmrnctrlsta); |
540 | e1e_flush(); | ||
540 | 541 | ||
541 | udelay(2); | 542 | udelay(2); |
542 | 543 | ||
@@ -609,6 +610,7 @@ static s32 __e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data, | |||
609 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & | 610 | kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & |
610 | E1000_KMRNCTRLSTA_OFFSET) | data; | 611 | E1000_KMRNCTRLSTA_OFFSET) | data; |
611 | ew32(KMRNCTRLSTA, kmrnctrlsta); | 612 | ew32(KMRNCTRLSTA, kmrnctrlsta); |
613 | e1e_flush(); | ||
612 | 614 | ||
613 | udelay(2); | 615 | udelay(2); |
614 | 616 | ||
diff --git a/drivers/net/igb/e1000_nvm.c b/drivers/net/igb/e1000_nvm.c index 7dcd65cede56..40407124e722 100644 --- a/drivers/net/igb/e1000_nvm.c +++ b/drivers/net/igb/e1000_nvm.c | |||
@@ -285,6 +285,7 @@ static s32 igb_ready_nvm_eeprom(struct e1000_hw *hw) | |||
285 | /* Clear SK and CS */ | 285 | /* Clear SK and CS */ |
286 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); | 286 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); |
287 | wr32(E1000_EECD, eecd); | 287 | wr32(E1000_EECD, eecd); |
288 | wrfl(); | ||
288 | udelay(1); | 289 | udelay(1); |
289 | timeout = NVM_MAX_RETRY_SPI; | 290 | timeout = NVM_MAX_RETRY_SPI; |
290 | 291 | ||
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index ff244ce803ce..414b0225be89 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -1225,6 +1225,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1225 | 1225 | ||
1226 | /* Disable all the interrupts */ | 1226 | /* Disable all the interrupts */ |
1227 | wr32(E1000_IMC, ~0); | 1227 | wr32(E1000_IMC, ~0); |
1228 | wrfl(); | ||
1228 | msleep(10); | 1229 | msleep(10); |
1229 | 1230 | ||
1230 | /* Define all writable bits for ICS */ | 1231 | /* Define all writable bits for ICS */ |
@@ -1268,6 +1269,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1268 | 1269 | ||
1269 | wr32(E1000_IMC, mask); | 1270 | wr32(E1000_IMC, mask); |
1270 | wr32(E1000_ICS, mask); | 1271 | wr32(E1000_ICS, mask); |
1272 | wrfl(); | ||
1271 | msleep(10); | 1273 | msleep(10); |
1272 | 1274 | ||
1273 | if (adapter->test_icr & mask) { | 1275 | if (adapter->test_icr & mask) { |
@@ -1289,6 +1291,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1289 | 1291 | ||
1290 | wr32(E1000_IMS, mask); | 1292 | wr32(E1000_IMS, mask); |
1291 | wr32(E1000_ICS, mask); | 1293 | wr32(E1000_ICS, mask); |
1294 | wrfl(); | ||
1292 | msleep(10); | 1295 | msleep(10); |
1293 | 1296 | ||
1294 | if (!(adapter->test_icr & mask)) { | 1297 | if (!(adapter->test_icr & mask)) { |
@@ -1310,6 +1313,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1310 | 1313 | ||
1311 | wr32(E1000_IMC, ~mask); | 1314 | wr32(E1000_IMC, ~mask); |
1312 | wr32(E1000_ICS, ~mask); | 1315 | wr32(E1000_ICS, ~mask); |
1316 | wrfl(); | ||
1313 | msleep(10); | 1317 | msleep(10); |
1314 | 1318 | ||
1315 | if (adapter->test_icr & mask) { | 1319 | if (adapter->test_icr & mask) { |
@@ -1321,6 +1325,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data) | |||
1321 | 1325 | ||
1322 | /* Disable all the interrupts */ | 1326 | /* Disable all the interrupts */ |
1323 | wr32(E1000_IMC, ~0); | 1327 | wr32(E1000_IMC, ~0); |
1328 | wrfl(); | ||
1324 | msleep(10); | 1329 | msleep(10); |
1325 | 1330 | ||
1326 | /* Unhook test interrupt handler */ | 1331 | /* Unhook test interrupt handler */ |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index dc599059512a..40d4c405fd7e 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -1052,6 +1052,7 @@ msi_only: | |||
1052 | kfree(adapter->vf_data); | 1052 | kfree(adapter->vf_data); |
1053 | adapter->vf_data = NULL; | 1053 | adapter->vf_data = NULL; |
1054 | wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ); | 1054 | wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ); |
1055 | wrfl(); | ||
1055 | msleep(100); | 1056 | msleep(100); |
1056 | dev_info(&adapter->pdev->dev, "IOV Disabled\n"); | 1057 | dev_info(&adapter->pdev->dev, "IOV Disabled\n"); |
1057 | } | 1058 | } |
@@ -2022,7 +2023,7 @@ static int __devinit igb_probe(struct pci_dev *pdev, | |||
2022 | 2023 | ||
2023 | if (hw->bus.func == 0) | 2024 | if (hw->bus.func == 0) |
2024 | hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data); | 2025 | hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data); |
2025 | else if (hw->mac.type == e1000_82580) | 2026 | else if (hw->mac.type >= e1000_82580) |
2026 | hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A + | 2027 | hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A + |
2027 | NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1, | 2028 | NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1, |
2028 | &eeprom_data); | 2029 | &eeprom_data); |
@@ -2198,6 +2199,7 @@ static void __devexit igb_remove(struct pci_dev *pdev) | |||
2198 | kfree(adapter->vf_data); | 2199 | kfree(adapter->vf_data); |
2199 | adapter->vf_data = NULL; | 2200 | adapter->vf_data = NULL; |
2200 | wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ); | 2201 | wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ); |
2202 | wrfl(); | ||
2201 | msleep(100); | 2203 | msleep(100); |
2202 | dev_info(&pdev->dev, "IOV Disabled\n"); | 2204 | dev_info(&pdev->dev, "IOV Disabled\n"); |
2203 | } | 2205 | } |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 1330c8e932da..40ed066e3ef4 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1226,6 +1226,7 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter) | |||
1226 | /* disable transmits */ | 1226 | /* disable transmits */ |
1227 | txdctl = er32(TXDCTL(0)); | 1227 | txdctl = er32(TXDCTL(0)); |
1228 | ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE); | 1228 | ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE); |
1229 | e1e_flush(); | ||
1229 | msleep(10); | 1230 | msleep(10); |
1230 | 1231 | ||
1231 | /* Setup the HW Tx Head and Tail descriptor pointers */ | 1232 | /* Setup the HW Tx Head and Tail descriptor pointers */ |
@@ -1306,6 +1307,7 @@ static void igbvf_configure_rx(struct igbvf_adapter *adapter) | |||
1306 | /* disable receives */ | 1307 | /* disable receives */ |
1307 | rxdctl = er32(RXDCTL(0)); | 1308 | rxdctl = er32(RXDCTL(0)); |
1308 | ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); | 1309 | ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); |
1310 | e1e_flush(); | ||
1309 | msleep(10); | 1311 | msleep(10); |
1310 | 1312 | ||
1311 | rdlen = rx_ring->count * sizeof(union e1000_adv_rx_desc); | 1313 | rdlen = rx_ring->count * sizeof(union e1000_adv_rx_desc); |
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 954f6e938fb7..8b1c3484d271 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -2405,8 +2405,6 @@ static int __init smsc_superio_lpc(unsigned short cfg_base) | |||
2405 | * addresses making a subsystem device table necessary. | 2405 | * addresses making a subsystem device table necessary. |
2406 | */ | 2406 | */ |
2407 | #ifdef CONFIG_PCI | 2407 | #ifdef CONFIG_PCI |
2408 | #define PCIID_VENDOR_INTEL 0x8086 | ||
2409 | #define PCIID_VENDOR_ALI 0x10b9 | ||
2410 | static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = { | 2408 | static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = { |
2411 | /* | 2409 | /* |
2412 | * Subsystems needing entries: | 2410 | * Subsystems needing entries: |
@@ -2416,7 +2414,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2416 | */ | 2414 | */ |
2417 | { | 2415 | { |
2418 | /* Guessed entry */ | 2416 | /* Guessed entry */ |
2419 | .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */ | 2417 | .vendor = PCI_VENDOR_ID_INTEL, /* Intel 82801DBM LPC bridge */ |
2420 | .device = 0x24cc, | 2418 | .device = 0x24cc, |
2421 | .subvendor = 0x103c, | 2419 | .subvendor = 0x103c, |
2422 | .subdevice = 0x08bc, | 2420 | .subdevice = 0x08bc, |
@@ -2429,7 +2427,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2429 | .name = "HP nx5000 family", | 2427 | .name = "HP nx5000 family", |
2430 | }, | 2428 | }, |
2431 | { | 2429 | { |
2432 | .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */ | 2430 | .vendor = PCI_VENDOR_ID_INTEL, /* Intel 82801DBM LPC bridge */ |
2433 | .device = 0x24cc, | 2431 | .device = 0x24cc, |
2434 | .subvendor = 0x103c, | 2432 | .subvendor = 0x103c, |
2435 | .subdevice = 0x088c, | 2433 | .subdevice = 0x088c, |
@@ -2443,7 +2441,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2443 | .name = "HP nc8000 family", | 2441 | .name = "HP nc8000 family", |
2444 | }, | 2442 | }, |
2445 | { | 2443 | { |
2446 | .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */ | 2444 | .vendor = PCI_VENDOR_ID_INTEL, /* Intel 82801DBM LPC bridge */ |
2447 | .device = 0x24cc, | 2445 | .device = 0x24cc, |
2448 | .subvendor = 0x103c, | 2446 | .subvendor = 0x103c, |
2449 | .subdevice = 0x0890, | 2447 | .subdevice = 0x0890, |
@@ -2456,7 +2454,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2456 | .name = "HP nc6000 family", | 2454 | .name = "HP nc6000 family", |
2457 | }, | 2455 | }, |
2458 | { | 2456 | { |
2459 | .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */ | 2457 | .vendor = PCI_VENDOR_ID_INTEL, /* Intel 82801DBM LPC bridge */ |
2460 | .device = 0x24cc, | 2458 | .device = 0x24cc, |
2461 | .subvendor = 0x0e11, | 2459 | .subvendor = 0x0e11, |
2462 | .subdevice = 0x0860, | 2460 | .subdevice = 0x0860, |
@@ -2471,7 +2469,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2471 | }, | 2469 | }, |
2472 | { | 2470 | { |
2473 | /* Intel 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge */ | 2471 | /* Intel 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge */ |
2474 | .vendor = PCIID_VENDOR_INTEL, | 2472 | .vendor = PCI_VENDOR_ID_INTEL, |
2475 | .device = 0x24c0, | 2473 | .device = 0x24c0, |
2476 | .subvendor = 0x1179, | 2474 | .subvendor = 0x1179, |
2477 | .subdevice = 0xffff, /* 0xffff is "any" */ | 2475 | .subdevice = 0xffff, /* 0xffff is "any" */ |
@@ -2484,7 +2482,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2484 | .name = "Toshiba laptop with Intel 82801DB/DBL LPC bridge", | 2482 | .name = "Toshiba laptop with Intel 82801DB/DBL LPC bridge", |
2485 | }, | 2483 | }, |
2486 | { | 2484 | { |
2487 | .vendor = PCIID_VENDOR_INTEL, /* Intel 82801CAM ISA bridge */ | 2485 | .vendor = PCI_VENDOR_ID_INTEL, /* Intel 82801CAM ISA bridge */ |
2488 | .device = 0x248c, | 2486 | .device = 0x248c, |
2489 | .subvendor = 0x1179, | 2487 | .subvendor = 0x1179, |
2490 | .subdevice = 0xffff, /* 0xffff is "any" */ | 2488 | .subdevice = 0xffff, /* 0xffff is "any" */ |
@@ -2498,7 +2496,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2498 | }, | 2496 | }, |
2499 | { | 2497 | { |
2500 | /* 82801DBM (ICH4-M) LPC Interface Bridge */ | 2498 | /* 82801DBM (ICH4-M) LPC Interface Bridge */ |
2501 | .vendor = PCIID_VENDOR_INTEL, | 2499 | .vendor = PCI_VENDOR_ID_INTEL, |
2502 | .device = 0x24cc, | 2500 | .device = 0x24cc, |
2503 | .subvendor = 0x1179, | 2501 | .subvendor = 0x1179, |
2504 | .subdevice = 0xffff, /* 0xffff is "any" */ | 2502 | .subdevice = 0xffff, /* 0xffff is "any" */ |
@@ -2512,7 +2510,7 @@ static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __ini | |||
2512 | }, | 2510 | }, |
2513 | { | 2511 | { |
2514 | /* ALi M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] */ | 2512 | /* ALi M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] */ |
2515 | .vendor = PCIID_VENDOR_ALI, | 2513 | .vendor = PCI_VENDOR_ID_AL, |
2516 | .device = 0x1533, | 2514 | .device = 0x1533, |
2517 | .subvendor = 0x1179, | 2515 | .subvendor = 0x1179, |
2518 | .subdevice = 0xffff, /* 0xffff is "any" */ | 2516 | .subdevice = 0xffff, /* 0xffff is "any" */ |
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c index c982ab9f9005..38b362b67857 100644 --- a/drivers/net/ixgb/ixgb_ee.c +++ b/drivers/net/ixgb/ixgb_ee.c | |||
@@ -57,6 +57,7 @@ ixgb_raise_clock(struct ixgb_hw *hw, | |||
57 | */ | 57 | */ |
58 | *eecd_reg = *eecd_reg | IXGB_EECD_SK; | 58 | *eecd_reg = *eecd_reg | IXGB_EECD_SK; |
59 | IXGB_WRITE_REG(hw, EECD, *eecd_reg); | 59 | IXGB_WRITE_REG(hw, EECD, *eecd_reg); |
60 | IXGB_WRITE_FLUSH(hw); | ||
60 | udelay(50); | 61 | udelay(50); |
61 | } | 62 | } |
62 | 63 | ||
@@ -75,6 +76,7 @@ ixgb_lower_clock(struct ixgb_hw *hw, | |||
75 | */ | 76 | */ |
76 | *eecd_reg = *eecd_reg & ~IXGB_EECD_SK; | 77 | *eecd_reg = *eecd_reg & ~IXGB_EECD_SK; |
77 | IXGB_WRITE_REG(hw, EECD, *eecd_reg); | 78 | IXGB_WRITE_REG(hw, EECD, *eecd_reg); |
79 | IXGB_WRITE_FLUSH(hw); | ||
78 | udelay(50); | 80 | udelay(50); |
79 | } | 81 | } |
80 | 82 | ||
@@ -112,6 +114,7 @@ ixgb_shift_out_bits(struct ixgb_hw *hw, | |||
112 | eecd_reg |= IXGB_EECD_DI; | 114 | eecd_reg |= IXGB_EECD_DI; |
113 | 115 | ||
114 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 116 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
117 | IXGB_WRITE_FLUSH(hw); | ||
115 | 118 | ||
116 | udelay(50); | 119 | udelay(50); |
117 | 120 | ||
@@ -206,21 +209,25 @@ ixgb_standby_eeprom(struct ixgb_hw *hw) | |||
206 | /* Deselect EEPROM */ | 209 | /* Deselect EEPROM */ |
207 | eecd_reg &= ~(IXGB_EECD_CS | IXGB_EECD_SK); | 210 | eecd_reg &= ~(IXGB_EECD_CS | IXGB_EECD_SK); |
208 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 211 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
212 | IXGB_WRITE_FLUSH(hw); | ||
209 | udelay(50); | 213 | udelay(50); |
210 | 214 | ||
211 | /* Clock high */ | 215 | /* Clock high */ |
212 | eecd_reg |= IXGB_EECD_SK; | 216 | eecd_reg |= IXGB_EECD_SK; |
213 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 217 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
218 | IXGB_WRITE_FLUSH(hw); | ||
214 | udelay(50); | 219 | udelay(50); |
215 | 220 | ||
216 | /* Select EEPROM */ | 221 | /* Select EEPROM */ |
217 | eecd_reg |= IXGB_EECD_CS; | 222 | eecd_reg |= IXGB_EECD_CS; |
218 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 223 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
224 | IXGB_WRITE_FLUSH(hw); | ||
219 | udelay(50); | 225 | udelay(50); |
220 | 226 | ||
221 | /* Clock low */ | 227 | /* Clock low */ |
222 | eecd_reg &= ~IXGB_EECD_SK; | 228 | eecd_reg &= ~IXGB_EECD_SK; |
223 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 229 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
230 | IXGB_WRITE_FLUSH(hw); | ||
224 | udelay(50); | 231 | udelay(50); |
225 | } | 232 | } |
226 | 233 | ||
@@ -239,11 +246,13 @@ ixgb_clock_eeprom(struct ixgb_hw *hw) | |||
239 | /* Rising edge of clock */ | 246 | /* Rising edge of clock */ |
240 | eecd_reg |= IXGB_EECD_SK; | 247 | eecd_reg |= IXGB_EECD_SK; |
241 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 248 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
249 | IXGB_WRITE_FLUSH(hw); | ||
242 | udelay(50); | 250 | udelay(50); |
243 | 251 | ||
244 | /* Falling edge of clock */ | 252 | /* Falling edge of clock */ |
245 | eecd_reg &= ~IXGB_EECD_SK; | 253 | eecd_reg &= ~IXGB_EECD_SK; |
246 | IXGB_WRITE_REG(hw, EECD, eecd_reg); | 254 | IXGB_WRITE_REG(hw, EECD, eecd_reg); |
255 | IXGB_WRITE_FLUSH(hw); | ||
247 | udelay(50); | 256 | udelay(50); |
248 | } | 257 | } |
249 | 258 | ||
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index 6cb2e42ff4c1..3d61a9e4faf7 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c | |||
@@ -149,6 +149,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw) | |||
149 | */ | 149 | */ |
150 | IXGB_WRITE_REG(hw, RCTL, IXGB_READ_REG(hw, RCTL) & ~IXGB_RCTL_RXEN); | 150 | IXGB_WRITE_REG(hw, RCTL, IXGB_READ_REG(hw, RCTL) & ~IXGB_RCTL_RXEN); |
151 | IXGB_WRITE_REG(hw, TCTL, IXGB_READ_REG(hw, TCTL) & ~IXGB_TCTL_TXEN); | 151 | IXGB_WRITE_REG(hw, TCTL, IXGB_READ_REG(hw, TCTL) & ~IXGB_TCTL_TXEN); |
152 | IXGB_WRITE_FLUSH(hw); | ||
152 | msleep(IXGB_DELAY_BEFORE_RESET); | 153 | msleep(IXGB_DELAY_BEFORE_RESET); |
153 | 154 | ||
154 | /* Issue a global reset to the MAC. This will reset the chip's | 155 | /* Issue a global reset to the MAC. This will reset the chip's |
@@ -1220,6 +1221,7 @@ ixgb_optics_reset_bcm(struct ixgb_hw *hw) | |||
1220 | ctrl &= ~IXGB_CTRL0_SDP2; | 1221 | ctrl &= ~IXGB_CTRL0_SDP2; |
1221 | ctrl |= IXGB_CTRL0_SDP3; | 1222 | ctrl |= IXGB_CTRL0_SDP3; |
1222 | IXGB_WRITE_REG(hw, CTRL0, ctrl); | 1223 | IXGB_WRITE_REG(hw, CTRL0, ctrl); |
1224 | IXGB_WRITE_FLUSH(hw); | ||
1223 | 1225 | ||
1224 | /* SerDes needs extra delay */ | 1226 | /* SerDes needs extra delay */ |
1225 | msleep(IXGB_SUN_PHY_RESET_DELAY); | 1227 | msleep(IXGB_SUN_PHY_RESET_DELAY); |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 3b3dd4df4c5c..34f30ec79c2e 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -213,6 +213,7 @@ static s32 ixgbe_init_phy_ops_82599(struct ixgbe_hw *hw) | |||
213 | switch (hw->phy.type) { | 213 | switch (hw->phy.type) { |
214 | case ixgbe_phy_tn: | 214 | case ixgbe_phy_tn: |
215 | phy->ops.check_link = &ixgbe_check_phy_link_tnx; | 215 | phy->ops.check_link = &ixgbe_check_phy_link_tnx; |
216 | phy->ops.setup_link = &ixgbe_setup_phy_link_tnx; | ||
216 | phy->ops.get_firmware_version = | 217 | phy->ops.get_firmware_version = |
217 | &ixgbe_get_phy_firmware_version_tnx; | 218 | &ixgbe_get_phy_firmware_version_tnx; |
218 | break; | 219 | break; |
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 777051f54e53..fc1375f26fe5 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -2632,6 +2632,7 @@ s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index) | |||
2632 | autoc_reg |= IXGBE_AUTOC_AN_RESTART; | 2632 | autoc_reg |= IXGBE_AUTOC_AN_RESTART; |
2633 | autoc_reg |= IXGBE_AUTOC_FLU; | 2633 | autoc_reg |= IXGBE_AUTOC_FLU; |
2634 | IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg); | 2634 | IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg); |
2635 | IXGBE_WRITE_FLUSH(hw); | ||
2635 | usleep_range(10000, 20000); | 2636 | usleep_range(10000, 20000); |
2636 | } | 2637 | } |
2637 | 2638 | ||
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index dc649553a0a6..82d4244c6e10 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1378,6 +1378,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1378 | 1378 | ||
1379 | /* Disable all the interrupts */ | 1379 | /* Disable all the interrupts */ |
1380 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); | 1380 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); |
1381 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1381 | usleep_range(10000, 20000); | 1382 | usleep_range(10000, 20000); |
1382 | 1383 | ||
1383 | /* Test each interrupt */ | 1384 | /* Test each interrupt */ |
@@ -1398,6 +1399,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1398 | ~mask & 0x00007FFF); | 1399 | ~mask & 0x00007FFF); |
1399 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, | 1400 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, |
1400 | ~mask & 0x00007FFF); | 1401 | ~mask & 0x00007FFF); |
1402 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1401 | usleep_range(10000, 20000); | 1403 | usleep_range(10000, 20000); |
1402 | 1404 | ||
1403 | if (adapter->test_icr & mask) { | 1405 | if (adapter->test_icr & mask) { |
@@ -1415,6 +1417,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1415 | adapter->test_icr = 0; | 1417 | adapter->test_icr = 0; |
1416 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); | 1418 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); |
1417 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); | 1419 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); |
1420 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1418 | usleep_range(10000, 20000); | 1421 | usleep_range(10000, 20000); |
1419 | 1422 | ||
1420 | if (!(adapter->test_icr &mask)) { | 1423 | if (!(adapter->test_icr &mask)) { |
@@ -1435,6 +1438,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1435 | ~mask & 0x00007FFF); | 1438 | ~mask & 0x00007FFF); |
1436 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, | 1439 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, |
1437 | ~mask & 0x00007FFF); | 1440 | ~mask & 0x00007FFF); |
1441 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1438 | usleep_range(10000, 20000); | 1442 | usleep_range(10000, 20000); |
1439 | 1443 | ||
1440 | if (adapter->test_icr) { | 1444 | if (adapter->test_icr) { |
@@ -1446,6 +1450,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1446 | 1450 | ||
1447 | /* Disable all the interrupts */ | 1451 | /* Disable all the interrupts */ |
1448 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); | 1452 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); |
1453 | IXGBE_WRITE_FLUSH(&adapter->hw); | ||
1449 | usleep_range(10000, 20000); | 1454 | usleep_range(10000, 20000); |
1450 | 1455 | ||
1451 | /* Unhook test interrupt handler */ | 1456 | /* Unhook test interrupt handler */ |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 1be617545dc9..e86297b32733 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -184,6 +184,7 @@ static inline void ixgbe_disable_sriov(struct ixgbe_adapter *adapter) | |||
184 | vmdctl = IXGBE_READ_REG(hw, IXGBE_VT_CTL); | 184 | vmdctl = IXGBE_READ_REG(hw, IXGBE_VT_CTL); |
185 | vmdctl &= ~IXGBE_VT_CTL_POOL_MASK; | 185 | vmdctl &= ~IXGBE_VT_CTL_POOL_MASK; |
186 | IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl); | 186 | IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl); |
187 | IXGBE_WRITE_FLUSH(hw); | ||
187 | 188 | ||
188 | /* take a breather then clean up driver data */ | 189 | /* take a breather then clean up driver data */ |
189 | msleep(100); | 190 | msleep(100); |
@@ -1005,7 +1006,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data) | |||
1005 | struct ixgbe_adapter *adapter = dev_get_drvdata(dev); | 1006 | struct ixgbe_adapter *adapter = dev_get_drvdata(dev); |
1006 | unsigned long event = *(unsigned long *)data; | 1007 | unsigned long event = *(unsigned long *)data; |
1007 | 1008 | ||
1008 | if (!(adapter->flags & IXGBE_FLAG_DCA_ENABLED)) | 1009 | if (!(adapter->flags & IXGBE_FLAG_DCA_CAPABLE)) |
1009 | return 0; | 1010 | return 0; |
1010 | 1011 | ||
1011 | switch (event) { | 1012 | switch (event) { |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 735f686c3b36..f7ca3511b9fe 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
@@ -1585,6 +1585,7 @@ static s32 ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl) | |||
1585 | *i2cctl |= IXGBE_I2C_CLK_OUT; | 1585 | *i2cctl |= IXGBE_I2C_CLK_OUT; |
1586 | 1586 | ||
1587 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); | 1587 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); |
1588 | IXGBE_WRITE_FLUSH(hw); | ||
1588 | 1589 | ||
1589 | /* SCL rise time (1000ns) */ | 1590 | /* SCL rise time (1000ns) */ |
1590 | udelay(IXGBE_I2C_T_RISE); | 1591 | udelay(IXGBE_I2C_T_RISE); |
@@ -1605,6 +1606,7 @@ static void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl) | |||
1605 | *i2cctl &= ~IXGBE_I2C_CLK_OUT; | 1606 | *i2cctl &= ~IXGBE_I2C_CLK_OUT; |
1606 | 1607 | ||
1607 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); | 1608 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); |
1609 | IXGBE_WRITE_FLUSH(hw); | ||
1608 | 1610 | ||
1609 | /* SCL fall time (300ns) */ | 1611 | /* SCL fall time (300ns) */ |
1610 | udelay(IXGBE_I2C_T_FALL); | 1612 | udelay(IXGBE_I2C_T_FALL); |
@@ -1628,6 +1630,7 @@ static s32 ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data) | |||
1628 | *i2cctl &= ~IXGBE_I2C_DATA_OUT; | 1630 | *i2cctl &= ~IXGBE_I2C_DATA_OUT; |
1629 | 1631 | ||
1630 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); | 1632 | IXGBE_WRITE_REG(hw, IXGBE_I2CCTL, *i2cctl); |
1633 | IXGBE_WRITE_FLUSH(hw); | ||
1631 | 1634 | ||
1632 | /* Data rise/fall (1000ns/300ns) and set-up time (250ns) */ | 1635 | /* Data rise/fall (1000ns/300ns) and set-up time (250ns) */ |
1633 | udelay(IXGBE_I2C_T_RISE + IXGBE_I2C_T_FALL + IXGBE_I2C_T_SU_DATA); | 1636 | udelay(IXGBE_I2C_T_RISE + IXGBE_I2C_T_FALL + IXGBE_I2C_T_SU_DATA); |
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c index bec30ed91adc..2696c78e9f46 100644 --- a/drivers/net/ixgbe/ixgbe_x540.c +++ b/drivers/net/ixgbe/ixgbe_x540.c | |||
@@ -162,6 +162,7 @@ mac_reset_top: | |||
162 | ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); | 162 | ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); |
163 | ctrl_ext |= IXGBE_CTRL_EXT_PFRSTD; | 163 | ctrl_ext |= IXGBE_CTRL_EXT_PFRSTD; |
164 | IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); | 164 | IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); |
165 | IXGBE_WRITE_FLUSH(hw); | ||
165 | 166 | ||
166 | msleep(50); | 167 | msleep(50); |
167 | 168 | ||
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 0fcdc25699d8..dc4e305a1087 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -322,6 +322,9 @@ static void macb_tx(struct macb *bp) | |||
322 | for (i = 0; i < TX_RING_SIZE; i++) | 322 | for (i = 0; i < TX_RING_SIZE; i++) |
323 | bp->tx_ring[i].ctrl = MACB_BIT(TX_USED); | 323 | bp->tx_ring[i].ctrl = MACB_BIT(TX_USED); |
324 | 324 | ||
325 | /* Add wrap bit */ | ||
326 | bp->tx_ring[TX_RING_SIZE - 1].ctrl |= MACB_BIT(TX_WRAP); | ||
327 | |||
325 | /* free transmit buffer in upper layer*/ | 328 | /* free transmit buffer in upper layer*/ |
326 | for (tail = bp->tx_tail; tail != head; tail = NEXT_TX(tail)) { | 329 | for (tail = bp->tx_tail; tail != head; tail = NEXT_TX(tail)) { |
327 | struct ring_info *rp = &bp->tx_skb[tail]; | 330 | struct ring_info *rp = &bp->tx_skb[tail]; |
diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c index 5e7109178061..5ada5b469112 100644 --- a/drivers/net/mlx4/en_port.c +++ b/drivers/net/mlx4/en_port.c | |||
@@ -128,7 +128,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn, | |||
128 | memset(context, 0, sizeof *context); | 128 | memset(context, 0, sizeof *context); |
129 | 129 | ||
130 | context->base_qpn = cpu_to_be32(base_qpn); | 130 | context->base_qpn = cpu_to_be32(base_qpn); |
131 | context->n_mac = 0x7; | 131 | context->n_mac = 0x2; |
132 | context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | | 132 | context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | |
133 | base_qpn); | 133 | base_qpn); |
134 | context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT | | 134 | context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT | |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index c94b3426d355..f0ee35df4dd7 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -1117,6 +1117,8 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port) | |||
1117 | info->port = port; | 1117 | info->port = port; |
1118 | mlx4_init_mac_table(dev, &info->mac_table); | 1118 | mlx4_init_mac_table(dev, &info->mac_table); |
1119 | mlx4_init_vlan_table(dev, &info->vlan_table); | 1119 | mlx4_init_vlan_table(dev, &info->vlan_table); |
1120 | info->base_qpn = dev->caps.reserved_qps_base[MLX4_QP_REGION_ETH_ADDR] + | ||
1121 | (port - 1) * (1 << log_num_mac); | ||
1120 | 1122 | ||
1121 | sprintf(info->dev_name, "mlx4_port%d", port); | 1123 | sprintf(info->dev_name, "mlx4_port%d", port); |
1122 | info->port_attr.attr.name = info->dev_name; | 1124 | info->port_attr.attr.name = info->dev_name; |
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c index 1f95afda6841..609e0ec14cee 100644 --- a/drivers/net/mlx4/port.c +++ b/drivers/net/mlx4/port.c | |||
@@ -258,9 +258,12 @@ void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn) | |||
258 | if (validate_index(dev, table, index)) | 258 | if (validate_index(dev, table, index)) |
259 | goto out; | 259 | goto out; |
260 | 260 | ||
261 | table->entries[index] = 0; | 261 | /* Check whether this address has reference count */ |
262 | mlx4_set_port_mac_table(dev, port, table->entries); | 262 | if (!(--table->refs[index])) { |
263 | --table->total; | 263 | table->entries[index] = 0; |
264 | mlx4_set_port_mac_table(dev, port, table->entries); | ||
265 | --table->total; | ||
266 | } | ||
264 | out: | 267 | out: |
265 | mutex_unlock(&table->mutex); | 268 | mutex_unlock(&table->mutex); |
266 | } | 269 | } |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index cd6c2317e29e..ed47585a6862 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -9201,7 +9201,7 @@ static int __devinit niu_ldg_init(struct niu *np) | |||
9201 | 9201 | ||
9202 | first_chan = 0; | 9202 | first_chan = 0; |
9203 | for (i = 0; i < port; i++) | 9203 | for (i = 0; i < port; i++) |
9204 | first_chan += parent->rxchan_per_port[port]; | 9204 | first_chan += parent->rxchan_per_port[i]; |
9205 | num_chan = parent->rxchan_per_port[port]; | 9205 | num_chan = parent->rxchan_per_port[port]; |
9206 | 9206 | ||
9207 | for (i = first_chan; i < (first_chan + num_chan); i++) { | 9207 | for (i = first_chan; i < (first_chan + num_chan); i++) { |
@@ -9217,7 +9217,7 @@ static int __devinit niu_ldg_init(struct niu *np) | |||
9217 | 9217 | ||
9218 | first_chan = 0; | 9218 | first_chan = 0; |
9219 | for (i = 0; i < port; i++) | 9219 | for (i = 0; i < port; i++) |
9220 | first_chan += parent->txchan_per_port[port]; | 9220 | first_chan += parent->txchan_per_port[i]; |
9221 | num_chan = parent->txchan_per_port[port]; | 9221 | num_chan = parent->txchan_per_port[port]; |
9222 | for (i = first_chan; i < (first_chan + num_chan); i++) { | 9222 | for (i = first_chan; i < (first_chan + num_chan); i++) { |
9223 | err = niu_ldg_assign_ldn(np, parent, | 9223 | err = niu_ldg_assign_ldn(np, parent, |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 7d9c650f395e..02339b3352e7 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -239,6 +239,7 @@ static DEFINE_PCI_DEVICE_TABLE(rtl8169_pci_tbl) = { | |||
239 | { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 }, | 239 | { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 }, |
240 | { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 }, | 240 | { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 }, |
241 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 }, | 241 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 }, |
242 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 }, | ||
242 | { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 }, | 243 | { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 }, |
243 | { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 }, | 244 | { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 }, |
244 | { PCI_VENDOR_ID_LINKSYS, 0x1032, | 245 | { PCI_VENDOR_ID_LINKSYS, 0x1032, |
@@ -1091,6 +1092,21 @@ rtl_w1w0_eri(void __iomem *ioaddr, int addr, u32 mask, u32 p, u32 m, int type) | |||
1091 | rtl_eri_write(ioaddr, addr, mask, (val & ~m) | p, type); | 1092 | rtl_eri_write(ioaddr, addr, mask, (val & ~m) | p, type); |
1092 | } | 1093 | } |
1093 | 1094 | ||
1095 | struct exgmac_reg { | ||
1096 | u16 addr; | ||
1097 | u16 mask; | ||
1098 | u32 val; | ||
1099 | }; | ||
1100 | |||
1101 | static void rtl_write_exgmac_batch(void __iomem *ioaddr, | ||
1102 | const struct exgmac_reg *r, int len) | ||
1103 | { | ||
1104 | while (len-- > 0) { | ||
1105 | rtl_eri_write(ioaddr, r->addr, r->mask, r->val, ERIAR_EXGMAC); | ||
1106 | r++; | ||
1107 | } | ||
1108 | } | ||
1109 | |||
1094 | static u8 rtl8168d_efuse_read(void __iomem *ioaddr, int reg_addr) | 1110 | static u8 rtl8168d_efuse_read(void __iomem *ioaddr, int reg_addr) |
1095 | { | 1111 | { |
1096 | u8 value = 0xff; | 1112 | u8 value = 0xff; |
@@ -3116,6 +3132,18 @@ static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr) | |||
3116 | RTL_W32(MAC0, low); | 3132 | RTL_W32(MAC0, low); |
3117 | RTL_R32(MAC0); | 3133 | RTL_R32(MAC0); |
3118 | 3134 | ||
3135 | if (tp->mac_version == RTL_GIGA_MAC_VER_34) { | ||
3136 | const struct exgmac_reg e[] = { | ||
3137 | { .addr = 0xe0, ERIAR_MASK_1111, .val = low }, | ||
3138 | { .addr = 0xe4, ERIAR_MASK_1111, .val = high }, | ||
3139 | { .addr = 0xf0, ERIAR_MASK_1111, .val = low << 16 }, | ||
3140 | { .addr = 0xf4, ERIAR_MASK_1111, .val = high << 16 | | ||
3141 | low >> 16 }, | ||
3142 | }; | ||
3143 | |||
3144 | rtl_write_exgmac_batch(ioaddr, e, ARRAY_SIZE(e)); | ||
3145 | } | ||
3146 | |||
3119 | RTL_W8(Cfg9346, Cfg9346_Lock); | 3147 | RTL_W8(Cfg9346, Cfg9346_Lock); |
3120 | 3148 | ||
3121 | spin_unlock_irq(&tp->lock); | 3149 | spin_unlock_irq(&tp->lock); |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 8ad7bfbaa3af..3c0f1312b391 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1825,6 +1825,16 @@ static int sis190_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1825 | generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL); | 1825 | generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL); |
1826 | } | 1826 | } |
1827 | 1827 | ||
1828 | static int sis190_mac_addr(struct net_device *dev, void *p) | ||
1829 | { | ||
1830 | int rc; | ||
1831 | |||
1832 | rc = eth_mac_addr(dev, p); | ||
1833 | if (!rc) | ||
1834 | sis190_init_rxfilter(dev); | ||
1835 | return rc; | ||
1836 | } | ||
1837 | |||
1828 | static const struct net_device_ops sis190_netdev_ops = { | 1838 | static const struct net_device_ops sis190_netdev_ops = { |
1829 | .ndo_open = sis190_open, | 1839 | .ndo_open = sis190_open, |
1830 | .ndo_stop = sis190_close, | 1840 | .ndo_stop = sis190_close, |
@@ -1833,7 +1843,7 @@ static const struct net_device_ops sis190_netdev_ops = { | |||
1833 | .ndo_tx_timeout = sis190_tx_timeout, | 1843 | .ndo_tx_timeout = sis190_tx_timeout, |
1834 | .ndo_set_multicast_list = sis190_set_rx_mode, | 1844 | .ndo_set_multicast_list = sis190_set_rx_mode, |
1835 | .ndo_change_mtu = eth_change_mtu, | 1845 | .ndo_change_mtu = eth_change_mtu, |
1836 | .ndo_set_mac_address = eth_mac_addr, | 1846 | .ndo_set_mac_address = sis190_mac_addr, |
1837 | .ndo_validate_addr = eth_validate_addr, | 1847 | .ndo_validate_addr = eth_validate_addr, |
1838 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1848 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1839 | .ndo_poll_controller = sis190_netpoll, | 1849 | .ndo_poll_controller = sis190_netpoll, |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index fd622a66ebbf..a03336e086d5 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -53,7 +53,7 @@ | |||
53 | #include <linux/usb/usbnet.h> | 53 | #include <linux/usb/usbnet.h> |
54 | #include <linux/usb/cdc.h> | 54 | #include <linux/usb/cdc.h> |
55 | 55 | ||
56 | #define DRIVER_VERSION "01-June-2011" | 56 | #define DRIVER_VERSION "04-Aug-2011" |
57 | 57 | ||
58 | /* CDC NCM subclass 3.2.1 */ | 58 | /* CDC NCM subclass 3.2.1 */ |
59 | #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 | 59 | #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 |
@@ -163,35 +163,8 @@ cdc_ncm_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info) | |||
163 | usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info)); | 163 | usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info)); |
164 | } | 164 | } |
165 | 165 | ||
166 | static int | ||
167 | cdc_ncm_do_request(struct cdc_ncm_ctx *ctx, struct usb_cdc_notification *req, | ||
168 | void *data, u16 flags, u16 *actlen, u16 timeout) | ||
169 | { | ||
170 | int err; | ||
171 | |||
172 | err = usb_control_msg(ctx->udev, (req->bmRequestType & USB_DIR_IN) ? | ||
173 | usb_rcvctrlpipe(ctx->udev, 0) : | ||
174 | usb_sndctrlpipe(ctx->udev, 0), | ||
175 | req->bNotificationType, req->bmRequestType, | ||
176 | req->wValue, | ||
177 | req->wIndex, data, | ||
178 | req->wLength, timeout); | ||
179 | |||
180 | if (err < 0) { | ||
181 | if (actlen) | ||
182 | *actlen = 0; | ||
183 | return err; | ||
184 | } | ||
185 | |||
186 | if (actlen) | ||
187 | *actlen = err; | ||
188 | |||
189 | return 0; | ||
190 | } | ||
191 | |||
192 | static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | 166 | static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) |
193 | { | 167 | { |
194 | struct usb_cdc_notification req; | ||
195 | u32 val; | 168 | u32 val; |
196 | u8 flags; | 169 | u8 flags; |
197 | u8 iface_no; | 170 | u8 iface_no; |
@@ -200,14 +173,14 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | |||
200 | 173 | ||
201 | iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber; | 174 | iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber; |
202 | 175 | ||
203 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE; | 176 | err = usb_control_msg(ctx->udev, |
204 | req.bNotificationType = USB_CDC_GET_NTB_PARAMETERS; | 177 | usb_rcvctrlpipe(ctx->udev, 0), |
205 | req.wValue = 0; | 178 | USB_CDC_GET_NTB_PARAMETERS, |
206 | req.wIndex = cpu_to_le16(iface_no); | 179 | USB_TYPE_CLASS | USB_DIR_IN |
207 | req.wLength = cpu_to_le16(sizeof(ctx->ncm_parm)); | 180 | | USB_RECIP_INTERFACE, |
208 | 181 | 0, iface_no, &ctx->ncm_parm, | |
209 | err = cdc_ncm_do_request(ctx, &req, &ctx->ncm_parm, 0, NULL, 1000); | 182 | sizeof(ctx->ncm_parm), 10000); |
210 | if (err) { | 183 | if (err < 0) { |
211 | pr_debug("failed GET_NTB_PARAMETERS\n"); | 184 | pr_debug("failed GET_NTB_PARAMETERS\n"); |
212 | return 1; | 185 | return 1; |
213 | } | 186 | } |
@@ -253,31 +226,26 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | |||
253 | 226 | ||
254 | /* inform device about NTB input size changes */ | 227 | /* inform device about NTB input size changes */ |
255 | if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) { | 228 | if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) { |
256 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | | ||
257 | USB_RECIP_INTERFACE; | ||
258 | req.bNotificationType = USB_CDC_SET_NTB_INPUT_SIZE; | ||
259 | req.wValue = 0; | ||
260 | req.wIndex = cpu_to_le16(iface_no); | ||
261 | 229 | ||
262 | if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) { | 230 | if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) { |
263 | struct usb_cdc_ncm_ndp_input_size ndp_in_sz; | 231 | struct usb_cdc_ncm_ndp_input_size ndp_in_sz; |
264 | 232 | err = usb_control_msg(ctx->udev, | |
265 | req.wLength = 8; | 233 | usb_sndctrlpipe(ctx->udev, 0), |
266 | ndp_in_sz.dwNtbInMaxSize = cpu_to_le32(ctx->rx_max); | 234 | USB_CDC_SET_NTB_INPUT_SIZE, |
267 | ndp_in_sz.wNtbInMaxDatagrams = | 235 | USB_TYPE_CLASS | USB_DIR_OUT |
268 | cpu_to_le16(CDC_NCM_DPT_DATAGRAMS_MAX); | 236 | | USB_RECIP_INTERFACE, |
269 | ndp_in_sz.wReserved = 0; | 237 | 0, iface_no, &ndp_in_sz, 8, 1000); |
270 | err = cdc_ncm_do_request(ctx, &req, &ndp_in_sz, 0, NULL, | ||
271 | 1000); | ||
272 | } else { | 238 | } else { |
273 | __le32 dwNtbInMaxSize = cpu_to_le32(ctx->rx_max); | 239 | __le32 dwNtbInMaxSize = cpu_to_le32(ctx->rx_max); |
274 | 240 | err = usb_control_msg(ctx->udev, | |
275 | req.wLength = 4; | 241 | usb_sndctrlpipe(ctx->udev, 0), |
276 | err = cdc_ncm_do_request(ctx, &req, &dwNtbInMaxSize, 0, | 242 | USB_CDC_SET_NTB_INPUT_SIZE, |
277 | NULL, 1000); | 243 | USB_TYPE_CLASS | USB_DIR_OUT |
244 | | USB_RECIP_INTERFACE, | ||
245 | 0, iface_no, &dwNtbInMaxSize, 4, 1000); | ||
278 | } | 246 | } |
279 | 247 | ||
280 | if (err) | 248 | if (err < 0) |
281 | pr_debug("Setting NTB Input Size failed\n"); | 249 | pr_debug("Setting NTB Input Size failed\n"); |
282 | } | 250 | } |
283 | 251 | ||
@@ -332,29 +300,24 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | |||
332 | 300 | ||
333 | /* set CRC Mode */ | 301 | /* set CRC Mode */ |
334 | if (flags & USB_CDC_NCM_NCAP_CRC_MODE) { | 302 | if (flags & USB_CDC_NCM_NCAP_CRC_MODE) { |
335 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | | 303 | err = usb_control_msg(ctx->udev, usb_sndctrlpipe(ctx->udev, 0), |
336 | USB_RECIP_INTERFACE; | 304 | USB_CDC_SET_CRC_MODE, |
337 | req.bNotificationType = USB_CDC_SET_CRC_MODE; | 305 | USB_TYPE_CLASS | USB_DIR_OUT |
338 | req.wValue = cpu_to_le16(USB_CDC_NCM_CRC_NOT_APPENDED); | 306 | | USB_RECIP_INTERFACE, |
339 | req.wIndex = cpu_to_le16(iface_no); | 307 | USB_CDC_NCM_CRC_NOT_APPENDED, |
340 | req.wLength = 0; | 308 | iface_no, NULL, 0, 1000); |
341 | 309 | if (err < 0) | |
342 | err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000); | ||
343 | if (err) | ||
344 | pr_debug("Setting CRC mode off failed\n"); | 310 | pr_debug("Setting CRC mode off failed\n"); |
345 | } | 311 | } |
346 | 312 | ||
347 | /* set NTB format, if both formats are supported */ | 313 | /* set NTB format, if both formats are supported */ |
348 | if (ntb_fmt_supported & USB_CDC_NCM_NTH32_SIGN) { | 314 | if (ntb_fmt_supported & USB_CDC_NCM_NTH32_SIGN) { |
349 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | | 315 | err = usb_control_msg(ctx->udev, usb_sndctrlpipe(ctx->udev, 0), |
350 | USB_RECIP_INTERFACE; | 316 | USB_CDC_SET_NTB_FORMAT, USB_TYPE_CLASS |
351 | req.bNotificationType = USB_CDC_SET_NTB_FORMAT; | 317 | | USB_DIR_OUT | USB_RECIP_INTERFACE, |
352 | req.wValue = cpu_to_le16(USB_CDC_NCM_NTB16_FORMAT); | 318 | USB_CDC_NCM_NTB16_FORMAT, |
353 | req.wIndex = cpu_to_le16(iface_no); | 319 | iface_no, NULL, 0, 1000); |
354 | req.wLength = 0; | 320 | if (err < 0) |
355 | |||
356 | err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000); | ||
357 | if (err) | ||
358 | pr_debug("Setting NTB format to 16-bit failed\n"); | 321 | pr_debug("Setting NTB format to 16-bit failed\n"); |
359 | } | 322 | } |
360 | 323 | ||
@@ -364,17 +327,13 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | |||
364 | if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) { | 327 | if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) { |
365 | __le16 max_datagram_size; | 328 | __le16 max_datagram_size; |
366 | u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize); | 329 | u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize); |
367 | 330 | err = usb_control_msg(ctx->udev, usb_rcvctrlpipe(ctx->udev, 0), | |
368 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN | | 331 | USB_CDC_GET_MAX_DATAGRAM_SIZE, |
369 | USB_RECIP_INTERFACE; | 332 | USB_TYPE_CLASS | USB_DIR_IN |
370 | req.bNotificationType = USB_CDC_GET_MAX_DATAGRAM_SIZE; | 333 | | USB_RECIP_INTERFACE, |
371 | req.wValue = 0; | 334 | 0, iface_no, &max_datagram_size, |
372 | req.wIndex = cpu_to_le16(iface_no); | 335 | 2, 1000); |
373 | req.wLength = cpu_to_le16(2); | 336 | if (err < 0) { |
374 | |||
375 | err = cdc_ncm_do_request(ctx, &req, &max_datagram_size, 0, NULL, | ||
376 | 1000); | ||
377 | if (err) { | ||
378 | pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n", | 337 | pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n", |
379 | CDC_NCM_MIN_DATAGRAM_SIZE); | 338 | CDC_NCM_MIN_DATAGRAM_SIZE); |
380 | } else { | 339 | } else { |
@@ -395,17 +354,15 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) | |||
395 | CDC_NCM_MIN_DATAGRAM_SIZE; | 354 | CDC_NCM_MIN_DATAGRAM_SIZE; |
396 | 355 | ||
397 | /* if value changed, update device */ | 356 | /* if value changed, update device */ |
398 | req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | | 357 | err = usb_control_msg(ctx->udev, |
399 | USB_RECIP_INTERFACE; | 358 | usb_sndctrlpipe(ctx->udev, 0), |
400 | req.bNotificationType = USB_CDC_SET_MAX_DATAGRAM_SIZE; | 359 | USB_CDC_SET_MAX_DATAGRAM_SIZE, |
401 | req.wValue = 0; | 360 | USB_TYPE_CLASS | USB_DIR_OUT |
402 | req.wIndex = cpu_to_le16(iface_no); | 361 | | USB_RECIP_INTERFACE, |
403 | req.wLength = 2; | 362 | 0, |
404 | max_datagram_size = cpu_to_le16(ctx->max_datagram_size); | 363 | iface_no, &max_datagram_size, |
405 | 364 | 2, 1000); | |
406 | err = cdc_ncm_do_request(ctx, &req, &max_datagram_size, | 365 | if (err < 0) |
407 | 0, NULL, 1000); | ||
408 | if (err) | ||
409 | pr_debug("SET_MAX_DATAGRAM_SIZE failed\n"); | 366 | pr_debug("SET_MAX_DATAGRAM_SIZE failed\n"); |
410 | } | 367 | } |
411 | 368 | ||
@@ -671,7 +628,7 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb) | |||
671 | u32 rem; | 628 | u32 rem; |
672 | u32 offset; | 629 | u32 offset; |
673 | u32 last_offset; | 630 | u32 last_offset; |
674 | u16 n = 0; | 631 | u16 n = 0, index; |
675 | u8 ready2send = 0; | 632 | u8 ready2send = 0; |
676 | 633 | ||
677 | /* if there is a remaining skb, it gets priority */ | 634 | /* if there is a remaining skb, it gets priority */ |
@@ -859,8 +816,8 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb) | |||
859 | cpu_to_le16(sizeof(ctx->tx_ncm.nth16)); | 816 | cpu_to_le16(sizeof(ctx->tx_ncm.nth16)); |
860 | ctx->tx_ncm.nth16.wSequence = cpu_to_le16(ctx->tx_seq); | 817 | ctx->tx_ncm.nth16.wSequence = cpu_to_le16(ctx->tx_seq); |
861 | ctx->tx_ncm.nth16.wBlockLength = cpu_to_le16(last_offset); | 818 | ctx->tx_ncm.nth16.wBlockLength = cpu_to_le16(last_offset); |
862 | ctx->tx_ncm.nth16.wNdpIndex = ALIGN(sizeof(struct usb_cdc_ncm_nth16), | 819 | index = ALIGN(sizeof(struct usb_cdc_ncm_nth16), ctx->tx_ndp_modulus); |
863 | ctx->tx_ndp_modulus); | 820 | ctx->tx_ncm.nth16.wNdpIndex = cpu_to_le16(index); |
864 | 821 | ||
865 | memcpy(skb_out->data, &(ctx->tx_ncm.nth16), sizeof(ctx->tx_ncm.nth16)); | 822 | memcpy(skb_out->data, &(ctx->tx_ncm.nth16), sizeof(ctx->tx_ncm.nth16)); |
866 | ctx->tx_seq++; | 823 | ctx->tx_seq++; |
@@ -873,12 +830,11 @@ cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb) | |||
873 | ctx->tx_ncm.ndp16.wLength = cpu_to_le16(rem); | 830 | ctx->tx_ncm.ndp16.wLength = cpu_to_le16(rem); |
874 | ctx->tx_ncm.ndp16.wNextNdpIndex = 0; /* reserved */ | 831 | ctx->tx_ncm.ndp16.wNextNdpIndex = 0; /* reserved */ |
875 | 832 | ||
876 | memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wNdpIndex, | 833 | memcpy(((u8 *)skb_out->data) + index, |
877 | &(ctx->tx_ncm.ndp16), | 834 | &(ctx->tx_ncm.ndp16), |
878 | sizeof(ctx->tx_ncm.ndp16)); | 835 | sizeof(ctx->tx_ncm.ndp16)); |
879 | 836 | ||
880 | memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wNdpIndex + | 837 | memcpy(((u8 *)skb_out->data) + index + sizeof(ctx->tx_ncm.ndp16), |
881 | sizeof(ctx->tx_ncm.ndp16), | ||
882 | &(ctx->tx_ncm.dpe16), | 838 | &(ctx->tx_ncm.dpe16), |
883 | (ctx->tx_curr_frame_num + 1) * | 839 | (ctx->tx_curr_frame_num + 1) * |
884 | sizeof(struct usb_cdc_ncm_dpe16)); | 840 | sizeof(struct usb_cdc_ncm_dpe16)); |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 9ff7c30573b8..44d9d8d56490 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -309,11 +309,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
309 | u8 i; | 309 | u8 i; |
310 | u32 val; | 310 | u32 val; |
311 | 311 | ||
312 | if (ah->is_pciexpress != true) | 312 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) |
313 | return; | ||
314 | |||
315 | /* Do not touch SerDes registers */ | ||
316 | if (ah->config.pcie_powersave_enable == 2) | ||
317 | return; | 313 | return; |
318 | 314 | ||
319 | /* Nothing to do on restore for 11N */ | 315 | /* Nothing to do on restore for 11N */ |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 8efdec247c02..ad2bb2bf4e8a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -519,11 +519,7 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah, | |||
519 | int restore, | 519 | int restore, |
520 | int power_off) | 520 | int power_off) |
521 | { | 521 | { |
522 | if (ah->is_pciexpress != true) | 522 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) |
523 | return; | ||
524 | |||
525 | /* Do not touch SerDes registers */ | ||
526 | if (ah->config.pcie_powersave_enable == 2) | ||
527 | return; | 523 | return; |
528 | 524 | ||
529 | /* Nothing to do on restore for 11N */ | 525 | /* Nothing to do on restore for 11N */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8006ce0c7357..8dcefe74f4c3 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -318,6 +318,14 @@ static void ath9k_hw_disablepcie(struct ath_hw *ah) | |||
318 | REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000); | 318 | REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void ath9k_hw_aspm_init(struct ath_hw *ah) | ||
322 | { | ||
323 | struct ath_common *common = ath9k_hw_common(ah); | ||
324 | |||
325 | if (common->bus_ops->aspm_init) | ||
326 | common->bus_ops->aspm_init(common); | ||
327 | } | ||
328 | |||
321 | /* This should work for all families including legacy */ | 329 | /* This should work for all families including legacy */ |
322 | static bool ath9k_hw_chip_test(struct ath_hw *ah) | 330 | static bool ath9k_hw_chip_test(struct ath_hw *ah) |
323 | { | 331 | { |
@@ -378,7 +386,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
378 | ah->config.additional_swba_backoff = 0; | 386 | ah->config.additional_swba_backoff = 0; |
379 | ah->config.ack_6mb = 0x0; | 387 | ah->config.ack_6mb = 0x0; |
380 | ah->config.cwm_ignore_extcca = 0; | 388 | ah->config.cwm_ignore_extcca = 0; |
381 | ah->config.pcie_powersave_enable = 0; | ||
382 | ah->config.pcie_clock_req = 0; | 389 | ah->config.pcie_clock_req = 0; |
383 | ah->config.pcie_waen = 0; | 390 | ah->config.pcie_waen = 0; |
384 | ah->config.analog_shiftreg = 1; | 391 | ah->config.analog_shiftreg = 1; |
@@ -598,7 +605,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
598 | 605 | ||
599 | 606 | ||
600 | if (ah->is_pciexpress) | 607 | if (ah->is_pciexpress) |
601 | ath9k_hw_configpcipowersave(ah, 0, 0); | 608 | ath9k_hw_aspm_init(ah); |
602 | else | 609 | else |
603 | ath9k_hw_disablepcie(ah); | 610 | ath9k_hw_disablepcie(ah); |
604 | 611 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 6acd0f975ae1..c79889036ec4 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -219,7 +219,6 @@ struct ath9k_ops_config { | |||
219 | int additional_swba_backoff; | 219 | int additional_swba_backoff; |
220 | int ack_6mb; | 220 | int ack_6mb; |
221 | u32 cwm_ignore_extcca; | 221 | u32 cwm_ignore_extcca; |
222 | u8 pcie_powersave_enable; | ||
223 | bool pcieSerDesWrite; | 222 | bool pcieSerDesWrite; |
224 | u8 pcie_clock_req; | 223 | u8 pcie_clock_req; |
225 | u32 pcie_waen; | 224 | u32 pcie_waen; |
@@ -673,6 +672,7 @@ struct ath_hw { | |||
673 | 672 | ||
674 | bool sw_mgmt_crypto; | 673 | bool sw_mgmt_crypto; |
675 | bool is_pciexpress; | 674 | bool is_pciexpress; |
675 | bool aspm_enabled; | ||
676 | bool is_monitoring; | 676 | bool is_monitoring; |
677 | bool need_an_top2_fixup; | 677 | bool need_an_top2_fixup; |
678 | u16 tx_trig_level; | 678 | u16 tx_trig_level; |
@@ -874,6 +874,7 @@ struct ath_bus_ops { | |||
874 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); | 874 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); |
875 | void (*bt_coex_prep)(struct ath_common *common); | 875 | void (*bt_coex_prep)(struct ath_common *common); |
876 | void (*extn_synch_en)(struct ath_common *common); | 876 | void (*extn_synch_en)(struct ath_common *common); |
877 | void (*aspm_init)(struct ath_common *common); | ||
877 | }; | 878 | }; |
878 | 879 | ||
879 | static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah) | 880 | static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah) |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index ac5107172f94..aa0ff7e2c922 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -670,8 +670,10 @@ static void ath9k_init_band_txpower(struct ath_softc *sc, int band) | |||
670 | static void ath9k_init_txpower_limits(struct ath_softc *sc) | 670 | static void ath9k_init_txpower_limits(struct ath_softc *sc) |
671 | { | 671 | { |
672 | struct ath_hw *ah = sc->sc_ah; | 672 | struct ath_hw *ah = sc->sc_ah; |
673 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | ||
673 | struct ath9k_channel *curchan = ah->curchan; | 674 | struct ath9k_channel *curchan = ah->curchan; |
674 | 675 | ||
676 | ah->txchainmask = common->tx_chainmask; | ||
675 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 677 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
676 | ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ); | 678 | ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ); |
677 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 679 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 3bad0b2cf9a3..be4ea1329813 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/nl80211.h> | 17 | #include <linux/nl80211.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/pci-aspm.h> | ||
19 | #include <linux/ath9k_platform.h> | 20 | #include <linux/ath9k_platform.h> |
20 | #include "ath9k.h" | 21 | #include "ath9k.h" |
21 | 22 | ||
@@ -115,12 +116,38 @@ static void ath_pci_extn_synch_enable(struct ath_common *common) | |||
115 | pci_write_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, lnkctl); | 116 | pci_write_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, lnkctl); |
116 | } | 117 | } |
117 | 118 | ||
119 | static void ath_pci_aspm_init(struct ath_common *common) | ||
120 | { | ||
121 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
122 | struct ath_hw *ah = sc->sc_ah; | ||
123 | struct pci_dev *pdev = to_pci_dev(sc->dev); | ||
124 | struct pci_dev *parent; | ||
125 | int pos; | ||
126 | u8 aspm; | ||
127 | |||
128 | if (!pci_is_pcie(pdev)) | ||
129 | return; | ||
130 | |||
131 | parent = pdev->bus->self; | ||
132 | if (WARN_ON(!parent)) | ||
133 | return; | ||
134 | |||
135 | pos = pci_pcie_cap(parent); | ||
136 | pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); | ||
137 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { | ||
138 | ah->aspm_enabled = true; | ||
139 | /* Initialize PCIe PM and SERDES registers. */ | ||
140 | ath9k_hw_configpcipowersave(ah, 0, 0); | ||
141 | } | ||
142 | } | ||
143 | |||
118 | static const struct ath_bus_ops ath_pci_bus_ops = { | 144 | static const struct ath_bus_ops ath_pci_bus_ops = { |
119 | .ath_bus_type = ATH_PCI, | 145 | .ath_bus_type = ATH_PCI, |
120 | .read_cachesize = ath_pci_read_cachesize, | 146 | .read_cachesize = ath_pci_read_cachesize, |
121 | .eeprom_read = ath_pci_eeprom_read, | 147 | .eeprom_read = ath_pci_eeprom_read, |
122 | .bt_coex_prep = ath_pci_bt_coex_prep, | 148 | .bt_coex_prep = ath_pci_bt_coex_prep, |
123 | .extn_synch_en = ath_pci_extn_synch_enable, | 149 | .extn_synch_en = ath_pci_extn_synch_enable, |
150 | .aspm_init = ath_pci_aspm_init, | ||
124 | }; | 151 | }; |
125 | 152 | ||
126 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 153 | static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c index dab67a12d73b..73fe3cdf796b 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945.c | |||
@@ -1746,7 +1746,11 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); | 1748 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); |
1749 | 1749 | /* | |
1750 | * We do not commit tx power settings while channel changing, | ||
1751 | * do it now if tx power changed. | ||
1752 | */ | ||
1753 | iwl_legacy_set_tx_power(priv, priv->tx_power_next, false); | ||
1750 | return 0; | 1754 | return 0; |
1751 | } | 1755 | } |
1752 | 1756 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index bd4b000733f7..ecdc6e557428 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -1235,7 +1235,12 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c | |||
1235 | 1235 | ||
1236 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); | 1236 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); |
1237 | iwl_legacy_print_rx_config_cmd(priv, ctx); | 1237 | iwl_legacy_print_rx_config_cmd(priv, ctx); |
1238 | goto set_tx_power; | 1238 | /* |
1239 | * We do not commit tx power settings while channel changing, | ||
1240 | * do it now if tx power changed. | ||
1241 | */ | ||
1242 | iwl_legacy_set_tx_power(priv, priv->tx_power_next, false); | ||
1243 | return 0; | ||
1239 | } | 1244 | } |
1240 | 1245 | ||
1241 | /* If we are currently associated and the new config requires | 1246 | /* If we are currently associated and the new config requires |
@@ -1315,7 +1320,6 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c | |||
1315 | 1320 | ||
1316 | iwl4965_init_sensitivity(priv); | 1321 | iwl4965_init_sensitivity(priv); |
1317 | 1322 | ||
1318 | set_tx_power: | ||
1319 | /* If we issue a new RXON command which required a tune then we must | 1323 | /* If we issue a new RXON command which required a tune then we must |
1320 | * send a new TXPOWER command or we won't be able to Tx any frames */ | 1324 | * send a new TXPOWER command or we won't be able to Tx any frames */ |
1321 | ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true); | 1325 | ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 3eeb12ebe6e9..c95cefd529dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -365,6 +365,7 @@ static struct iwl_base_params iwl5000_base_params = { | |||
365 | .chain_noise_scale = 1000, | 365 | .chain_noise_scale = 1000, |
366 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | 366 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
367 | .max_event_log_size = 512, | 367 | .max_event_log_size = 512, |
368 | .no_idle_support = true, | ||
368 | }; | 369 | }; |
369 | static struct iwl_ht_params iwl5000_ht_params = { | 370 | static struct iwl_ht_params iwl5000_ht_params = { |
370 | .ht_greenfield_support = true, | 371 | .ht_greenfield_support = true, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 3e6bb734dcb7..02817a438550 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -135,6 +135,7 @@ struct iwl_mod_params { | |||
135 | * @temperature_kelvin: temperature report by uCode in kelvin | 135 | * @temperature_kelvin: temperature report by uCode in kelvin |
136 | * @max_event_log_size: size of event log buffer size for ucode event logging | 136 | * @max_event_log_size: size of event log buffer size for ucode event logging |
137 | * @shadow_reg_enable: HW shadhow register bit | 137 | * @shadow_reg_enable: HW shadhow register bit |
138 | * @no_idle_support: do not support idle mode | ||
138 | */ | 139 | */ |
139 | struct iwl_base_params { | 140 | struct iwl_base_params { |
140 | int eeprom_size; | 141 | int eeprom_size; |
@@ -156,6 +157,7 @@ struct iwl_base_params { | |||
156 | bool temperature_kelvin; | 157 | bool temperature_kelvin; |
157 | u32 max_event_log_size; | 158 | u32 max_event_log_size; |
158 | const bool shadow_reg_enable; | 159 | const bool shadow_reg_enable; |
160 | const bool no_idle_support; | ||
159 | }; | 161 | }; |
160 | /* | 162 | /* |
161 | * @advanced_bt_coexist: support advanced bt coexist | 163 | * @advanced_bt_coexist: support advanced bt coexist |
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index fb7e436b40c7..69d4ec467dca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -134,6 +134,7 @@ static void iwl_pci_apm_config(struct iwl_bus *bus) | |||
134 | static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data) | 134 | static void iwl_pci_set_drv_data(struct iwl_bus *bus, void *drv_data) |
135 | { | 135 | { |
136 | bus->drv_data = drv_data; | 136 | bus->drv_data = drv_data; |
137 | pci_set_drvdata(IWL_BUS_GET_PCI_DEV(bus), drv_data); | ||
137 | } | 138 | } |
138 | 139 | ||
139 | static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[], | 140 | static void iwl_pci_get_hw_id(struct iwl_bus *bus, char buf[], |
@@ -454,8 +455,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
454 | pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); | 455 | pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); |
455 | } | 456 | } |
456 | 457 | ||
457 | pci_set_drvdata(pdev, bus); | ||
458 | |||
459 | bus->dev = &pdev->dev; | 458 | bus->dev = &pdev->dev; |
460 | bus->irq = pdev->irq; | 459 | bus->irq = pdev->irq; |
461 | bus->ops = &pci_ops; | 460 | bus->ops = &pci_ops; |
@@ -494,11 +493,12 @@ static void iwl_pci_down(struct iwl_bus *bus) | |||
494 | 493 | ||
495 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) | 494 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) |
496 | { | 495 | { |
497 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 496 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
497 | void *bus_specific = priv->bus->bus_specific; | ||
498 | 498 | ||
499 | iwl_remove(bus->drv_data); | 499 | iwl_remove(priv); |
500 | 500 | ||
501 | iwl_pci_down(bus); | 501 | iwl_pci_down(bus_specific); |
502 | } | 502 | } |
503 | 503 | ||
504 | #ifdef CONFIG_PM | 504 | #ifdef CONFIG_PM |
@@ -506,20 +506,20 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) | |||
506 | static int iwl_pci_suspend(struct device *device) | 506 | static int iwl_pci_suspend(struct device *device) |
507 | { | 507 | { |
508 | struct pci_dev *pdev = to_pci_dev(device); | 508 | struct pci_dev *pdev = to_pci_dev(device); |
509 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 509 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
510 | 510 | ||
511 | /* Before you put code here, think about WoWLAN. You cannot check here | 511 | /* Before you put code here, think about WoWLAN. You cannot check here |
512 | * whether WoWLAN is enabled or not, and your code will run even if | 512 | * whether WoWLAN is enabled or not, and your code will run even if |
513 | * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx. | 513 | * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx. |
514 | */ | 514 | */ |
515 | 515 | ||
516 | return iwl_suspend(bus->drv_data); | 516 | return iwl_suspend(priv); |
517 | } | 517 | } |
518 | 518 | ||
519 | static int iwl_pci_resume(struct device *device) | 519 | static int iwl_pci_resume(struct device *device) |
520 | { | 520 | { |
521 | struct pci_dev *pdev = to_pci_dev(device); | 521 | struct pci_dev *pdev = to_pci_dev(device); |
522 | struct iwl_bus *bus = pci_get_drvdata(pdev); | 522 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
523 | 523 | ||
524 | /* Before you put code here, think about WoWLAN. You cannot check here | 524 | /* Before you put code here, think about WoWLAN. You cannot check here |
525 | * whether WoWLAN is enabled or not, and your code will run even if | 525 | * whether WoWLAN is enabled or not, and your code will run even if |
@@ -532,7 +532,7 @@ static int iwl_pci_resume(struct device *device) | |||
532 | */ | 532 | */ |
533 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); | 533 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); |
534 | 534 | ||
535 | return iwl_resume(bus->drv_data); | 535 | return iwl_resume(priv); |
536 | } | 536 | } |
537 | 537 | ||
538 | static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); | 538 | static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 3ec619c6881c..cd64df05f9ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -349,7 +349,8 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
349 | 349 | ||
350 | if (priv->wowlan) | 350 | if (priv->wowlan) |
351 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); | 351 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); |
352 | else if (priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 352 | else if (!priv->cfg->base_params->no_idle_support && |
353 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | ||
353 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); | 354 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); |
354 | else if (iwl_tt_is_low_power_state(priv)) { | 355 | else if (iwl_tt_is_low_power_state(priv)) { |
355 | /* in thermal throttling low power state */ | 356 | /* in thermal throttling low power state */ |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 84ab7d1acb6a..ef67f6786a84 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -703,8 +703,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc) | |||
703 | /* | 703 | /* |
704 | * Add space for the TXWI in front of the skb. | 704 | * Add space for the TXWI in front of the skb. |
705 | */ | 705 | */ |
706 | skb_push(entry->skb, TXWI_DESC_SIZE); | 706 | memset(skb_push(entry->skb, TXWI_DESC_SIZE), 0, TXWI_DESC_SIZE); |
707 | memset(entry->skb, 0, TXWI_DESC_SIZE); | ||
708 | 707 | ||
709 | /* | 708 | /* |
710 | * Register descriptor details in skb frame descriptor. | 709 | * Register descriptor details in skb frame descriptor. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 15cdc7e57fc4..4cdf247a870d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -355,7 +355,8 @@ static inline enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf * | |||
355 | return CIPHER_NONE; | 355 | return CIPHER_NONE; |
356 | } | 356 | } |
357 | 357 | ||
358 | static inline void rt2x00crypto_create_tx_descriptor(struct queue_entry *entry, | 358 | static inline void rt2x00crypto_create_tx_descriptor(struct rt2x00_dev *rt2x00dev, |
359 | struct sk_buff *skb, | ||
359 | struct txentry_desc *txdesc) | 360 | struct txentry_desc *txdesc) |
360 | { | 361 | { |
361 | } | 362 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 8efab3983528..4ccf23805973 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
113 | * due to possible race conditions in mac80211. | 113 | * due to possible race conditions in mac80211. |
114 | */ | 114 | */ |
115 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 115 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
116 | goto exit_fail; | 116 | goto exit_free_skb; |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * Use the ATIM queue if appropriate and present. | 119 | * Use the ATIM queue if appropriate and present. |
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
127 | ERROR(rt2x00dev, | 127 | ERROR(rt2x00dev, |
128 | "Attempt to send packet over invalid queue %d.\n" | 128 | "Attempt to send packet over invalid queue %d.\n" |
129 | "Please file bug report to %s.\n", qid, DRV_PROJECT); | 129 | "Please file bug report to %s.\n", qid, DRV_PROJECT); |
130 | goto exit_fail; | 130 | goto exit_free_skb; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* | 133 | /* |
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
159 | 159 | ||
160 | exit_fail: | 160 | exit_fail: |
161 | rt2x00queue_pause_queue(queue); | 161 | rt2x00queue_pause_queue(queue); |
162 | exit_free_skb: | ||
162 | dev_kfree_skb_any(skb); | 163 | dev_kfree_skb_any(skb); |
163 | } | 164 | } |
164 | EXPORT_SYMBOL_GPL(rt2x00mac_tx); | 165 | EXPORT_SYMBOL_GPL(rt2x00mac_tx); |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 5efd57833489..56f12358389d 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
1696 | pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); | 1696 | pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); |
1697 | pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); | 1697 | pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); |
1698 | 1698 | ||
1699 | /*find bridge info */ | 1699 | if (bridge_pdev) { |
1700 | pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; | 1700 | /*find bridge info if available */ |
1701 | for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { | 1701 | pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; |
1702 | if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { | 1702 | for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { |
1703 | pcipriv->ndis_adapter.pcibridge_vendor = tmp; | 1703 | if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { |
1704 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1704 | pcipriv->ndis_adapter.pcibridge_vendor = tmp; |
1705 | ("Pci Bridge Vendor is found index: %d\n", | 1705 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, |
1706 | tmp)); | 1706 | ("Pci Bridge Vendor is found index:" |
1707 | break; | 1707 | " %d\n", tmp)); |
1708 | break; | ||
1709 | } | ||
1708 | } | 1710 | } |
1709 | } | 1711 | } |
1710 | 1712 | ||
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index 3b938743514b..9808877c2ab9 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * have chosen to adopt the protocol and over the years it has become a | 8 | * have chosen to adopt the protocol and over the years it has become a |
9 | * de-facto standard for labeled networking. | 9 | * de-facto standard for labeled networking. |
10 | * | 10 | * |
11 | * Author: Paul Moore <paul.moore@hp.com> | 11 | * Author: Paul Moore <paul@paul-moore.com> |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
diff --git a/include/net/dst.h b/include/net/dst.h index 29e255796ce1..13d507d69ddb 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -37,7 +37,7 @@ struct dst_entry { | |||
37 | unsigned long _metrics; | 37 | unsigned long _metrics; |
38 | unsigned long expires; | 38 | unsigned long expires; |
39 | struct dst_entry *path; | 39 | struct dst_entry *path; |
40 | struct neighbour *_neighbour; | 40 | struct neighbour __rcu *_neighbour; |
41 | #ifdef CONFIG_XFRM | 41 | #ifdef CONFIG_XFRM |
42 | struct xfrm_state *xfrm; | 42 | struct xfrm_state *xfrm; |
43 | #else | 43 | #else |
@@ -88,12 +88,17 @@ struct dst_entry { | |||
88 | 88 | ||
89 | static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) | 89 | static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) |
90 | { | 90 | { |
91 | return dst->_neighbour; | 91 | return rcu_dereference(dst->_neighbour); |
92 | } | ||
93 | |||
94 | static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst) | ||
95 | { | ||
96 | return rcu_dereference_raw(dst->_neighbour); | ||
92 | } | 97 | } |
93 | 98 | ||
94 | static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh) | 99 | static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh) |
95 | { | 100 | { |
96 | dst->_neighbour = neigh; | 101 | rcu_assign_pointer(dst->_neighbour, neigh); |
97 | } | 102 | } |
98 | 103 | ||
99 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); | 104 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); |
@@ -382,8 +387,12 @@ static inline void dst_rcu_free(struct rcu_head *head) | |||
382 | static inline void dst_confirm(struct dst_entry *dst) | 387 | static inline void dst_confirm(struct dst_entry *dst) |
383 | { | 388 | { |
384 | if (dst) { | 389 | if (dst) { |
385 | struct neighbour *n = dst_get_neighbour(dst); | 390 | struct neighbour *n; |
391 | |||
392 | rcu_read_lock(); | ||
393 | n = dst_get_neighbour(dst); | ||
386 | neigh_confirm(n); | 394 | neigh_confirm(n); |
395 | rcu_read_unlock(); | ||
387 | } | 396 | } |
388 | } | 397 | } |
389 | 398 | ||
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index f21a16ee3705..f67440970d7e 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * The NetLabel system manages static and dynamic label mappings for network | 4 | * The NetLabel system manages static and dynamic label mappings for network |
5 | * protocols such as CIPSO and RIPSO. | 5 | * protocols such as CIPSO and RIPSO. |
6 | * | 6 | * |
7 | * Author: Paul Moore <paul.moore@hp.com> | 7 | * Author: Paul Moore <paul@paul-moore.com> |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 2252c2085dac..52cfd0c3ea71 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -242,8 +242,6 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct net_device *dev, | |||
242 | if (brdev->payload == p_bridged) { | 242 | if (brdev->payload == p_bridged) { |
243 | skb_push(skb, 2); | 243 | skb_push(skb, 2); |
244 | memset(skb->data, 0, 2); | 244 | memset(skb->data, 0, 2); |
245 | } else { /* p_routed */ | ||
246 | skb_pull(skb, ETH_HLEN); | ||
247 | } | 245 | } |
248 | } | 246 | } |
249 | skb_debug(skb); | 247 | skb_debug(skb); |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2beda824636e..27002dffe7ed 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1369,8 +1369,21 @@ pull_pages: | |||
1369 | } | 1369 | } |
1370 | EXPORT_SYMBOL(__pskb_pull_tail); | 1370 | EXPORT_SYMBOL(__pskb_pull_tail); |
1371 | 1371 | ||
1372 | /* Copy some data bits from skb to kernel buffer. */ | 1372 | /** |
1373 | 1373 | * skb_copy_bits - copy bits from skb to kernel buffer | |
1374 | * @skb: source skb | ||
1375 | * @offset: offset in source | ||
1376 | * @to: destination buffer | ||
1377 | * @len: number of bytes to copy | ||
1378 | * | ||
1379 | * Copy the specified number of bytes from the source skb to the | ||
1380 | * destination buffer. | ||
1381 | * | ||
1382 | * CAUTION ! : | ||
1383 | * If its prototype is ever changed, | ||
1384 | * check arch/{*}/net/{*}.S files, | ||
1385 | * since it is called from BPF assembly code. | ||
1386 | */ | ||
1374 | int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len) | 1387 | int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len) |
1375 | { | 1388 | { |
1376 | int start = skb_headlen(skb); | 1389 | int start = skb_headlen(skb); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index f1d27f6c9351..283c0a26e03f 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1718,7 +1718,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, | |||
1718 | 1718 | ||
1719 | pmc->sfcount[sfmode]--; | 1719 | pmc->sfcount[sfmode]--; |
1720 | for (j=0; j<i; j++) | 1720 | for (j=0; j<i; j++) |
1721 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[i]); | 1721 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]); |
1722 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { | 1722 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { |
1723 | #ifdef CONFIG_IP_MULTICAST | 1723 | #ifdef CONFIG_IP_MULTICAST |
1724 | struct ip_sf_list *psf; | 1724 | struct ip_sf_list *psf; |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index ccaaa851ab42..77d3eded665a 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -204,9 +204,15 @@ static inline int ip_finish_output2(struct sk_buff *skb) | |||
204 | skb = skb2; | 204 | skb = skb2; |
205 | } | 205 | } |
206 | 206 | ||
207 | rcu_read_lock(); | ||
207 | neigh = dst_get_neighbour(dst); | 208 | neigh = dst_get_neighbour(dst); |
208 | if (neigh) | 209 | if (neigh) { |
209 | return neigh_output(neigh, skb); | 210 | int res = neigh_output(neigh, skb); |
211 | |||
212 | rcu_read_unlock(); | ||
213 | return res; | ||
214 | } | ||
215 | rcu_read_unlock(); | ||
210 | 216 | ||
211 | if (net_ratelimit()) | 217 | if (net_ratelimit()) |
212 | printk(KERN_DEBUG "ip_finish_output2: No header cache and no neighbour!\n"); | 218 | printk(KERN_DEBUG "ip_finish_output2: No header cache and no neighbour!\n"); |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1730689f560e..6afc4eb50591 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1628,16 +1628,18 @@ static int check_peer_redir(struct dst_entry *dst, struct inet_peer *peer) | |||
1628 | { | 1628 | { |
1629 | struct rtable *rt = (struct rtable *) dst; | 1629 | struct rtable *rt = (struct rtable *) dst; |
1630 | __be32 orig_gw = rt->rt_gateway; | 1630 | __be32 orig_gw = rt->rt_gateway; |
1631 | struct neighbour *n; | 1631 | struct neighbour *n, *old_n; |
1632 | 1632 | ||
1633 | dst_confirm(&rt->dst); | 1633 | dst_confirm(&rt->dst); |
1634 | 1634 | ||
1635 | neigh_release(dst_get_neighbour(&rt->dst)); | ||
1636 | dst_set_neighbour(&rt->dst, NULL); | ||
1637 | |||
1638 | rt->rt_gateway = peer->redirect_learned.a4; | 1635 | rt->rt_gateway = peer->redirect_learned.a4; |
1639 | rt_bind_neighbour(rt); | 1636 | |
1640 | n = dst_get_neighbour(&rt->dst); | 1637 | n = ipv4_neigh_lookup(&rt->dst, &rt->rt_gateway); |
1638 | if (IS_ERR(n)) | ||
1639 | return PTR_ERR(n); | ||
1640 | old_n = xchg(&rt->dst._neighbour, n); | ||
1641 | if (old_n) | ||
1642 | neigh_release(old_n); | ||
1641 | if (!n || !(n->nud_state & NUD_VALID)) { | 1643 | if (!n || !(n->nud_state & NUD_VALID)) { |
1642 | if (n) | 1644 | if (n) |
1643 | neigh_event_send(n, NULL); | 1645 | neigh_event_send(n, NULL); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a55500cc0b29..f012ebd87b43 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -656,7 +656,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, | |||
656 | * layer address of our nexhop router | 656 | * layer address of our nexhop router |
657 | */ | 657 | */ |
658 | 658 | ||
659 | if (dst_get_neighbour(&rt->dst) == NULL) | 659 | if (dst_get_neighbour_raw(&rt->dst) == NULL) |
660 | ifa->flags &= ~IFA_F_OPTIMISTIC; | 660 | ifa->flags &= ~IFA_F_OPTIMISTIC; |
661 | 661 | ||
662 | ifa->idev = idev; | 662 | ifa->idev = idev; |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 16560336eb72..9ef1831746ef 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -33,6 +33,11 @@ | |||
33 | #include <linux/errqueue.h> | 33 | #include <linux/errqueue.h> |
34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
35 | 35 | ||
36 | static inline int ipv6_mapped_addr_any(const struct in6_addr *a) | ||
37 | { | ||
38 | return (ipv6_addr_v4mapped(a) && (a->s6_addr32[3] == 0)); | ||
39 | } | ||
40 | |||
36 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | 41 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) |
37 | { | 42 | { |
38 | struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr; | 43 | struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr; |
@@ -102,10 +107,12 @@ ipv4_connected: | |||
102 | 107 | ||
103 | ipv6_addr_set_v4mapped(inet->inet_daddr, &np->daddr); | 108 | ipv6_addr_set_v4mapped(inet->inet_daddr, &np->daddr); |
104 | 109 | ||
105 | if (ipv6_addr_any(&np->saddr)) | 110 | if (ipv6_addr_any(&np->saddr) || |
111 | ipv6_mapped_addr_any(&np->saddr)) | ||
106 | ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); | 112 | ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); |
107 | 113 | ||
108 | if (ipv6_addr_any(&np->rcv_saddr)) { | 114 | if (ipv6_addr_any(&np->rcv_saddr) || |
115 | ipv6_mapped_addr_any(&np->rcv_saddr)) { | ||
109 | ipv6_addr_set_v4mapped(inet->inet_rcv_saddr, | 116 | ipv6_addr_set_v4mapped(inet->inet_rcv_saddr, |
110 | &np->rcv_saddr); | 117 | &np->rcv_saddr); |
111 | if (sk->sk_prot->rehash) | 118 | if (sk->sk_prot->rehash) |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 54a4678955bf..320d91d20ad7 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1455,7 +1455,7 @@ static int fib6_age(struct rt6_info *rt, void *arg) | |||
1455 | RT6_TRACE("aging clone %p\n", rt); | 1455 | RT6_TRACE("aging clone %p\n", rt); |
1456 | return -1; | 1456 | return -1; |
1457 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && | 1457 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && |
1458 | (!(dst_get_neighbour(&rt->dst)->flags & NTF_ROUTER))) { | 1458 | (!(dst_get_neighbour_raw(&rt->dst)->flags & NTF_ROUTER))) { |
1459 | RT6_TRACE("purging route %p via non-router but gateway\n", | 1459 | RT6_TRACE("purging route %p via non-router but gateway\n", |
1460 | rt); | 1460 | rt); |
1461 | return -1; | 1461 | return -1; |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 32e5339db0c8..4c882cf4e8a1 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -135,10 +135,15 @@ static int ip6_finish_output2(struct sk_buff *skb) | |||
135 | skb->len); | 135 | skb->len); |
136 | } | 136 | } |
137 | 137 | ||
138 | rcu_read_lock(); | ||
138 | neigh = dst_get_neighbour(dst); | 139 | neigh = dst_get_neighbour(dst); |
139 | if (neigh) | 140 | if (neigh) { |
140 | return neigh_output(neigh, skb); | 141 | int res = neigh_output(neigh, skb); |
141 | 142 | ||
143 | rcu_read_unlock(); | ||
144 | return res; | ||
145 | } | ||
146 | rcu_read_unlock(); | ||
142 | IP6_INC_STATS_BH(dev_net(dst->dev), | 147 | IP6_INC_STATS_BH(dev_net(dst->dev), |
143 | ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); | 148 | ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); |
144 | kfree_skb(skb); | 149 | kfree_skb(skb); |
@@ -975,12 +980,14 @@ static int ip6_dst_lookup_tail(struct sock *sk, | |||
975 | * dst entry and replace it instead with the | 980 | * dst entry and replace it instead with the |
976 | * dst entry of the nexthop router | 981 | * dst entry of the nexthop router |
977 | */ | 982 | */ |
983 | rcu_read_lock(); | ||
978 | n = dst_get_neighbour(*dst); | 984 | n = dst_get_neighbour(*dst); |
979 | if (n && !(n->nud_state & NUD_VALID)) { | 985 | if (n && !(n->nud_state & NUD_VALID)) { |
980 | struct inet6_ifaddr *ifp; | 986 | struct inet6_ifaddr *ifp; |
981 | struct flowi6 fl_gw6; | 987 | struct flowi6 fl_gw6; |
982 | int redirect; | 988 | int redirect; |
983 | 989 | ||
990 | rcu_read_unlock(); | ||
984 | ifp = ipv6_get_ifaddr(net, &fl6->saddr, | 991 | ifp = ipv6_get_ifaddr(net, &fl6->saddr, |
985 | (*dst)->dev, 1); | 992 | (*dst)->dev, 1); |
986 | 993 | ||
@@ -1000,6 +1007,8 @@ static int ip6_dst_lookup_tail(struct sock *sk, | |||
1000 | if ((err = (*dst)->error)) | 1007 | if ((err = (*dst)->error)) |
1001 | goto out_err_release; | 1008 | goto out_err_release; |
1002 | } | 1009 | } |
1010 | } else { | ||
1011 | rcu_read_unlock(); | ||
1003 | } | 1012 | } |
1004 | #endif | 1013 | #endif |
1005 | 1014 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index e8987da06667..9e69eb0ec6dd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -364,7 +364,7 @@ out: | |||
364 | #ifdef CONFIG_IPV6_ROUTER_PREF | 364 | #ifdef CONFIG_IPV6_ROUTER_PREF |
365 | static void rt6_probe(struct rt6_info *rt) | 365 | static void rt6_probe(struct rt6_info *rt) |
366 | { | 366 | { |
367 | struct neighbour *neigh = rt ? dst_get_neighbour(&rt->dst) : NULL; | 367 | struct neighbour *neigh; |
368 | /* | 368 | /* |
369 | * Okay, this does not seem to be appropriate | 369 | * Okay, this does not seem to be appropriate |
370 | * for now, however, we need to check if it | 370 | * for now, however, we need to check if it |
@@ -373,8 +373,10 @@ static void rt6_probe(struct rt6_info *rt) | |||
373 | * Router Reachability Probe MUST be rate-limited | 373 | * Router Reachability Probe MUST be rate-limited |
374 | * to no more than one per minute. | 374 | * to no more than one per minute. |
375 | */ | 375 | */ |
376 | rcu_read_lock(); | ||
377 | neigh = rt ? dst_get_neighbour(&rt->dst) : NULL; | ||
376 | if (!neigh || (neigh->nud_state & NUD_VALID)) | 378 | if (!neigh || (neigh->nud_state & NUD_VALID)) |
377 | return; | 379 | goto out; |
378 | read_lock_bh(&neigh->lock); | 380 | read_lock_bh(&neigh->lock); |
379 | if (!(neigh->nud_state & NUD_VALID) && | 381 | if (!(neigh->nud_state & NUD_VALID) && |
380 | time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) { | 382 | time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) { |
@@ -387,8 +389,11 @@ static void rt6_probe(struct rt6_info *rt) | |||
387 | target = (struct in6_addr *)&neigh->primary_key; | 389 | target = (struct in6_addr *)&neigh->primary_key; |
388 | addrconf_addr_solict_mult(target, &mcaddr); | 390 | addrconf_addr_solict_mult(target, &mcaddr); |
389 | ndisc_send_ns(rt->rt6i_dev, NULL, target, &mcaddr, NULL); | 391 | ndisc_send_ns(rt->rt6i_dev, NULL, target, &mcaddr, NULL); |
390 | } else | 392 | } else { |
391 | read_unlock_bh(&neigh->lock); | 393 | read_unlock_bh(&neigh->lock); |
394 | } | ||
395 | out: | ||
396 | rcu_read_unlock(); | ||
392 | } | 397 | } |
393 | #else | 398 | #else |
394 | static inline void rt6_probe(struct rt6_info *rt) | 399 | static inline void rt6_probe(struct rt6_info *rt) |
@@ -412,8 +417,11 @@ static inline int rt6_check_dev(struct rt6_info *rt, int oif) | |||
412 | 417 | ||
413 | static inline int rt6_check_neigh(struct rt6_info *rt) | 418 | static inline int rt6_check_neigh(struct rt6_info *rt) |
414 | { | 419 | { |
415 | struct neighbour *neigh = dst_get_neighbour(&rt->dst); | 420 | struct neighbour *neigh; |
416 | int m; | 421 | int m; |
422 | |||
423 | rcu_read_lock(); | ||
424 | neigh = dst_get_neighbour(&rt->dst); | ||
417 | if (rt->rt6i_flags & RTF_NONEXTHOP || | 425 | if (rt->rt6i_flags & RTF_NONEXTHOP || |
418 | !(rt->rt6i_flags & RTF_GATEWAY)) | 426 | !(rt->rt6i_flags & RTF_GATEWAY)) |
419 | m = 1; | 427 | m = 1; |
@@ -430,6 +438,7 @@ static inline int rt6_check_neigh(struct rt6_info *rt) | |||
430 | read_unlock_bh(&neigh->lock); | 438 | read_unlock_bh(&neigh->lock); |
431 | } else | 439 | } else |
432 | m = 0; | 440 | m = 0; |
441 | rcu_read_unlock(); | ||
433 | return m; | 442 | return m; |
434 | } | 443 | } |
435 | 444 | ||
@@ -769,7 +778,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, | |||
769 | rt->rt6i_dst.plen = 128; | 778 | rt->rt6i_dst.plen = 128; |
770 | rt->rt6i_flags |= RTF_CACHE; | 779 | rt->rt6i_flags |= RTF_CACHE; |
771 | rt->dst.flags |= DST_HOST; | 780 | rt->dst.flags |= DST_HOST; |
772 | dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour(&ort->dst))); | 781 | dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_raw(&ort->dst))); |
773 | } | 782 | } |
774 | return rt; | 783 | return rt; |
775 | } | 784 | } |
@@ -803,7 +812,7 @@ restart: | |||
803 | dst_hold(&rt->dst); | 812 | dst_hold(&rt->dst); |
804 | read_unlock_bh(&table->tb6_lock); | 813 | read_unlock_bh(&table->tb6_lock); |
805 | 814 | ||
806 | if (!dst_get_neighbour(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) | 815 | if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) |
807 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); | 816 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); |
808 | else if (!(rt->dst.flags & DST_HOST)) | 817 | else if (!(rt->dst.flags & DST_HOST)) |
809 | nrt = rt6_alloc_clone(rt, &fl6->daddr); | 818 | nrt = rt6_alloc_clone(rt, &fl6->daddr); |
@@ -1587,7 +1596,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src, | |||
1587 | dst_confirm(&rt->dst); | 1596 | dst_confirm(&rt->dst); |
1588 | 1597 | ||
1589 | /* Duplicate redirect: silently ignore. */ | 1598 | /* Duplicate redirect: silently ignore. */ |
1590 | if (neigh == dst_get_neighbour(&rt->dst)) | 1599 | if (neigh == dst_get_neighbour_raw(&rt->dst)) |
1591 | goto out; | 1600 | goto out; |
1592 | 1601 | ||
1593 | nrt = ip6_rt_copy(rt, dest); | 1602 | nrt = ip6_rt_copy(rt, dest); |
@@ -1682,7 +1691,7 @@ again: | |||
1682 | 1. It is connected route. Action: COW | 1691 | 1. It is connected route. Action: COW |
1683 | 2. It is gatewayed route or NONEXTHOP route. Action: clone it. | 1692 | 2. It is gatewayed route or NONEXTHOP route. Action: clone it. |
1684 | */ | 1693 | */ |
1685 | if (!dst_get_neighbour(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) | 1694 | if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) |
1686 | nrt = rt6_alloc_cow(rt, daddr, saddr); | 1695 | nrt = rt6_alloc_cow(rt, daddr, saddr); |
1687 | else | 1696 | else |
1688 | nrt = rt6_alloc_clone(rt, daddr); | 1697 | nrt = rt6_alloc_clone(rt, daddr); |
@@ -2326,6 +2335,7 @@ static int rt6_fill_node(struct net *net, | |||
2326 | struct nlmsghdr *nlh; | 2335 | struct nlmsghdr *nlh; |
2327 | long expires; | 2336 | long expires; |
2328 | u32 table; | 2337 | u32 table; |
2338 | struct neighbour *n; | ||
2329 | 2339 | ||
2330 | if (prefix) { /* user wants prefix routes only */ | 2340 | if (prefix) { /* user wants prefix routes only */ |
2331 | if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { | 2341 | if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { |
@@ -2414,8 +2424,11 @@ static int rt6_fill_node(struct net *net, | |||
2414 | if (rtnetlink_put_metrics(skb, dst_metrics_ptr(&rt->dst)) < 0) | 2424 | if (rtnetlink_put_metrics(skb, dst_metrics_ptr(&rt->dst)) < 0) |
2415 | goto nla_put_failure; | 2425 | goto nla_put_failure; |
2416 | 2426 | ||
2417 | if (dst_get_neighbour(&rt->dst)) | 2427 | rcu_read_lock(); |
2418 | NLA_PUT(skb, RTA_GATEWAY, 16, &dst_get_neighbour(&rt->dst)->primary_key); | 2428 | n = dst_get_neighbour(&rt->dst); |
2429 | if (n) | ||
2430 | NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); | ||
2431 | rcu_read_unlock(); | ||
2419 | 2432 | ||
2420 | if (rt->dst.dev) | 2433 | if (rt->dst.dev) |
2421 | NLA_PUT_U32(skb, RTA_OIF, rt->rt6i_dev->ifindex); | 2434 | NLA_PUT_U32(skb, RTA_OIF, rt->rt6i_dev->ifindex); |
@@ -2608,12 +2621,14 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg) | |||
2608 | #else | 2621 | #else |
2609 | seq_puts(m, "00000000000000000000000000000000 00 "); | 2622 | seq_puts(m, "00000000000000000000000000000000 00 "); |
2610 | #endif | 2623 | #endif |
2624 | rcu_read_lock(); | ||
2611 | n = dst_get_neighbour(&rt->dst); | 2625 | n = dst_get_neighbour(&rt->dst); |
2612 | if (n) { | 2626 | if (n) { |
2613 | seq_printf(m, "%pi6", n->primary_key); | 2627 | seq_printf(m, "%pi6", n->primary_key); |
2614 | } else { | 2628 | } else { |
2615 | seq_puts(m, "00000000000000000000000000000000"); | 2629 | seq_puts(m, "00000000000000000000000000000000"); |
2616 | } | 2630 | } |
2631 | rcu_read_unlock(); | ||
2617 | seq_printf(m, " %08x %08x %08x %08x %8s\n", | 2632 | seq_printf(m, " %08x %08x %08x %08x %8s\n", |
2618 | rt->rt6i_metric, atomic_read(&rt->dst.__refcnt), | 2633 | rt->rt6i_metric, atomic_read(&rt->dst.__refcnt), |
2619 | rt->dst.__use, rt->rt6i_flags, | 2634 | rt->dst.__use, rt->rt6i_flags, |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index be43fd805bd0..2b771dc708a3 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -3771,6 +3771,7 @@ err_sock: | |||
3771 | void ip_vs_control_cleanup(void) | 3771 | void ip_vs_control_cleanup(void) |
3772 | { | 3772 | { |
3773 | EnterFunction(2); | 3773 | EnterFunction(2); |
3774 | unregister_netdevice_notifier(&ip_vs_dst_notifier); | ||
3774 | ip_vs_genl_unregister(); | 3775 | ip_vs_genl_unregister(); |
3775 | nf_unregister_sockopt(&ip_vs_sockopts); | 3776 | nf_unregister_sockopt(&ip_vs_sockopts); |
3776 | LeaveFunction(2); | 3777 | LeaveFunction(2); |
diff --git a/net/netlabel/Makefile b/net/netlabel/Makefile index ea750e9df65f..d2732fc952e2 100644 --- a/net/netlabel/Makefile +++ b/net/netlabel/Makefile | |||
@@ -1,8 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the NetLabel subsystem. | 2 | # Makefile for the NetLabel subsystem. |
3 | # | 3 | # |
4 | # Feb 9, 2006, Paul Moore <paul.moore@hp.com> | ||
5 | # | ||
6 | 4 | ||
7 | # base objects | 5 | # base objects |
8 | obj-y := netlabel_user.o netlabel_kapi.o | 6 | obj-y := netlabel_user.o netlabel_kapi.o |
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c index c0519139679e..96b749dacc34 100644 --- a/net/netlabel/netlabel_addrlist.c +++ b/net/netlabel/netlabel_addrlist.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * system manages static and dynamic label mappings for network protocols such | 6 | * system manages static and dynamic label mappings for network protocols such |
7 | * as CIPSO and RIPSO. | 7 | * as CIPSO and RIPSO. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h index 2b9644e19de0..fdbc1d2c7352 100644 --- a/net/netlabel/netlabel_addrlist.h +++ b/net/netlabel/netlabel_addrlist.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * system manages static and dynamic label mappings for network protocols such | 6 | * system manages static and dynamic label mappings for network protocols such |
7 | * as CIPSO and RIPSO. | 7 | * as CIPSO and RIPSO. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index dd53a36d89af..6bf878335d94 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_cipso_v4.h b/net/netlabel/netlabel_cipso_v4.h index af7f3355103e..d24d774bfd62 100644 --- a/net/netlabel/netlabel_cipso_v4.h +++ b/net/netlabel/netlabel_cipso_v4.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index 2aa975e5452d..7d8083cde34f 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * system manages static and dynamic label mappings for network protocols such | 6 | * system manages static and dynamic label mappings for network protocols such |
7 | * as CIPSO and RIPSO. | 7 | * as CIPSO and RIPSO. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/net/netlabel/netlabel_domainhash.h b/net/netlabel/netlabel_domainhash.h index 0261dda3f2d2..bfcc0f7024c5 100644 --- a/net/netlabel/netlabel_domainhash.h +++ b/net/netlabel/netlabel_domainhash.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * system manages static and dynamic label mappings for network protocols such | 6 | * system manages static and dynamic label mappings for network protocols such |
7 | * as CIPSO and RIPSO. | 7 | * as CIPSO and RIPSO. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index b528dd928d3c..58107d060846 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * system manages static and dynamic label mappings for network protocols such | 5 | * system manages static and dynamic label mappings for network protocols such |
6 | * as CIPSO and RIPSO. | 6 | * as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index dff8a0809245..bfa555869775 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_mgmt.h b/net/netlabel/netlabel_mgmt.h index 8db37f4c10f7..5a9f31ce5799 100644 --- a/net/netlabel/netlabel_mgmt.h +++ b/net/netlabel/netlabel_mgmt.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index f1ecf848e3ac..e6e823656f9d 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system. The NetLabel system manages static and dynamic label | 5 | * NetLabel system. The NetLabel system manages static and dynamic label |
6 | * mappings for network protocols such as CIPSO and RIPSO. | 6 | * mappings for network protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_unlabeled.h b/net/netlabel/netlabel_unlabeled.h index 0bc8dc3f9e3c..700af49022a0 100644 --- a/net/netlabel/netlabel_unlabeled.h +++ b/net/netlabel/netlabel_unlabeled.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system. The NetLabel system manages static and dynamic label | 5 | * NetLabel system. The NetLabel system manages static and dynamic label |
6 | * mappings for network protocols such as CIPSO and RIPSO. | 6 | * mappings for network protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c index a3fd75ac3fa5..9fae63f10298 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/netlabel/netlabel_user.h b/net/netlabel/netlabel_user.h index f4fc4c9ad567..81969785e279 100644 --- a/net/netlabel/netlabel_user.h +++ b/net/netlabel/netlabel_user.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * NetLabel system manages static and dynamic label mappings for network | 5 | * NetLabel system manages static and dynamic label mappings for network |
6 | * protocols such as CIPSO and RIPSO. | 6 | * protocols such as CIPSO and RIPSO. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 4536ee64383e..4f5510e2bd6f 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
410 | /* Return Congestion Notification only if we dropped a packet | 410 | /* Return Congestion Notification only if we dropped a packet |
411 | * from this flow. | 411 | * from this flow. |
412 | */ | 412 | */ |
413 | return (qlen != slot->qlen) ? NET_XMIT_CN : NET_XMIT_SUCCESS; | 413 | if (qlen != slot->qlen) |
414 | return NET_XMIT_CN; | ||
415 | |||
416 | /* As we dropped a packet, better let upper stack know this */ | ||
417 | qdisc_tree_decrease_qlen(sch, 1); | ||
418 | return NET_XMIT_SUCCESS; | ||
414 | } | 419 | } |
415 | 420 | ||
416 | static struct sk_buff * | 421 | static struct sk_buff * |
diff --git a/net/socket.c b/net/socket.c index b1cbbcd92558..24a77400b65e 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1871,8 +1871,14 @@ SYSCALL_DEFINE2(shutdown, int, fd, int, how) | |||
1871 | #define COMPAT_NAMELEN(msg) COMPAT_MSG(msg, msg_namelen) | 1871 | #define COMPAT_NAMELEN(msg) COMPAT_MSG(msg, msg_namelen) |
1872 | #define COMPAT_FLAGS(msg) COMPAT_MSG(msg, msg_flags) | 1872 | #define COMPAT_FLAGS(msg) COMPAT_MSG(msg, msg_flags) |
1873 | 1873 | ||
1874 | struct used_address { | ||
1875 | struct sockaddr_storage name; | ||
1876 | unsigned int name_len; | ||
1877 | }; | ||
1878 | |||
1874 | static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, | 1879 | static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
1875 | struct msghdr *msg_sys, unsigned flags, int nosec) | 1880 | struct msghdr *msg_sys, unsigned flags, |
1881 | struct used_address *used_address) | ||
1876 | { | 1882 | { |
1877 | struct compat_msghdr __user *msg_compat = | 1883 | struct compat_msghdr __user *msg_compat = |
1878 | (struct compat_msghdr __user *)msg; | 1884 | (struct compat_msghdr __user *)msg; |
@@ -1953,8 +1959,28 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, | |||
1953 | 1959 | ||
1954 | if (sock->file->f_flags & O_NONBLOCK) | 1960 | if (sock->file->f_flags & O_NONBLOCK) |
1955 | msg_sys->msg_flags |= MSG_DONTWAIT; | 1961 | msg_sys->msg_flags |= MSG_DONTWAIT; |
1956 | err = (nosec ? sock_sendmsg_nosec : sock_sendmsg)(sock, msg_sys, | 1962 | /* |
1957 | total_len); | 1963 | * If this is sendmmsg() and current destination address is same as |
1964 | * previously succeeded address, omit asking LSM's decision. | ||
1965 | * used_address->name_len is initialized to UINT_MAX so that the first | ||
1966 | * destination address never matches. | ||
1967 | */ | ||
1968 | if (used_address && used_address->name_len == msg_sys->msg_namelen && | ||
1969 | !memcmp(&used_address->name, msg->msg_name, | ||
1970 | used_address->name_len)) { | ||
1971 | err = sock_sendmsg_nosec(sock, msg_sys, total_len); | ||
1972 | goto out_freectl; | ||
1973 | } | ||
1974 | err = sock_sendmsg(sock, msg_sys, total_len); | ||
1975 | /* | ||
1976 | * If this is sendmmsg() and sending to current destination address was | ||
1977 | * successful, remember it. | ||
1978 | */ | ||
1979 | if (used_address && err >= 0) { | ||
1980 | used_address->name_len = msg_sys->msg_namelen; | ||
1981 | memcpy(&used_address->name, msg->msg_name, | ||
1982 | used_address->name_len); | ||
1983 | } | ||
1958 | 1984 | ||
1959 | out_freectl: | 1985 | out_freectl: |
1960 | if (ctl_buf != ctl) | 1986 | if (ctl_buf != ctl) |
@@ -1979,7 +2005,7 @@ SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned, flags) | |||
1979 | if (!sock) | 2005 | if (!sock) |
1980 | goto out; | 2006 | goto out; |
1981 | 2007 | ||
1982 | err = __sys_sendmsg(sock, msg, &msg_sys, flags, 0); | 2008 | err = __sys_sendmsg(sock, msg, &msg_sys, flags, NULL); |
1983 | 2009 | ||
1984 | fput_light(sock->file, fput_needed); | 2010 | fput_light(sock->file, fput_needed); |
1985 | out: | 2011 | out: |
@@ -1998,6 +2024,10 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
1998 | struct mmsghdr __user *entry; | 2024 | struct mmsghdr __user *entry; |
1999 | struct compat_mmsghdr __user *compat_entry; | 2025 | struct compat_mmsghdr __user *compat_entry; |
2000 | struct msghdr msg_sys; | 2026 | struct msghdr msg_sys; |
2027 | struct used_address used_address; | ||
2028 | |||
2029 | if (vlen > UIO_MAXIOV) | ||
2030 | vlen = UIO_MAXIOV; | ||
2001 | 2031 | ||
2002 | datagrams = 0; | 2032 | datagrams = 0; |
2003 | 2033 | ||
@@ -2005,27 +2035,22 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
2005 | if (!sock) | 2035 | if (!sock) |
2006 | return err; | 2036 | return err; |
2007 | 2037 | ||
2008 | err = sock_error(sock->sk); | 2038 | used_address.name_len = UINT_MAX; |
2009 | if (err) | ||
2010 | goto out_put; | ||
2011 | |||
2012 | entry = mmsg; | 2039 | entry = mmsg; |
2013 | compat_entry = (struct compat_mmsghdr __user *)mmsg; | 2040 | compat_entry = (struct compat_mmsghdr __user *)mmsg; |
2041 | err = 0; | ||
2014 | 2042 | ||
2015 | while (datagrams < vlen) { | 2043 | while (datagrams < vlen) { |
2016 | /* | ||
2017 | * No need to ask LSM for more than the first datagram. | ||
2018 | */ | ||
2019 | if (MSG_CMSG_COMPAT & flags) { | 2044 | if (MSG_CMSG_COMPAT & flags) { |
2020 | err = __sys_sendmsg(sock, (struct msghdr __user *)compat_entry, | 2045 | err = __sys_sendmsg(sock, (struct msghdr __user *)compat_entry, |
2021 | &msg_sys, flags, datagrams); | 2046 | &msg_sys, flags, &used_address); |
2022 | if (err < 0) | 2047 | if (err < 0) |
2023 | break; | 2048 | break; |
2024 | err = __put_user(err, &compat_entry->msg_len); | 2049 | err = __put_user(err, &compat_entry->msg_len); |
2025 | ++compat_entry; | 2050 | ++compat_entry; |
2026 | } else { | 2051 | } else { |
2027 | err = __sys_sendmsg(sock, (struct msghdr __user *)entry, | 2052 | err = __sys_sendmsg(sock, (struct msghdr __user *)entry, |
2028 | &msg_sys, flags, datagrams); | 2053 | &msg_sys, flags, &used_address); |
2029 | if (err < 0) | 2054 | if (err < 0) |
2030 | break; | 2055 | break; |
2031 | err = put_user(err, &entry->msg_len); | 2056 | err = put_user(err, &entry->msg_len); |
@@ -2037,29 +2062,11 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | |||
2037 | ++datagrams; | 2062 | ++datagrams; |
2038 | } | 2063 | } |
2039 | 2064 | ||
2040 | out_put: | ||
2041 | fput_light(sock->file, fput_needed); | 2065 | fput_light(sock->file, fput_needed); |
2042 | 2066 | ||
2043 | if (err == 0) | 2067 | /* We only return an error if no datagrams were able to be sent */ |
2044 | return datagrams; | 2068 | if (datagrams != 0) |
2045 | |||
2046 | if (datagrams != 0) { | ||
2047 | /* | ||
2048 | * We may send less entries than requested (vlen) if the | ||
2049 | * sock is non blocking... | ||
2050 | */ | ||
2051 | if (err != -EAGAIN) { | ||
2052 | /* | ||
2053 | * ... or if sendmsg returns an error after we | ||
2054 | * send some datagrams, where we record the | ||
2055 | * error to return on the next call or if the | ||
2056 | * app asks about it using getsockopt(SO_ERROR). | ||
2057 | */ | ||
2058 | sock->sk->sk_err = -err; | ||
2059 | } | ||
2060 | |||
2061 | return datagrams; | 2069 | return datagrams; |
2062 | } | ||
2063 | 2070 | ||
2064 | return err; | 2071 | return err; |
2065 | } | 2072 | } |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 9b6a4d1ea8f8..f4385e45a5fc 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -187,6 +187,7 @@ EXPORT_SYMBOL_GPL(xprt_load_transport); | |||
187 | /** | 187 | /** |
188 | * xprt_reserve_xprt - serialize write access to transports | 188 | * xprt_reserve_xprt - serialize write access to transports |
189 | * @task: task that is requesting access to the transport | 189 | * @task: task that is requesting access to the transport |
190 | * @xprt: pointer to the target transport | ||
190 | * | 191 | * |
191 | * This prevents mixing the payload of separate requests, and prevents | 192 | * This prevents mixing the payload of separate requests, and prevents |
192 | * transport connects from colliding with writes. No congestion control | 193 | * transport connects from colliding with writes. No congestion control |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 28d2aa109bee..e83e7fee3bc0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3464,7 +3464,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
3464 | tmp) { | 3464 | tmp) { |
3465 | enum ieee80211_band band = nla_type(attr); | 3465 | enum ieee80211_band band = nla_type(attr); |
3466 | 3466 | ||
3467 | if (band < 0 || band > IEEE80211_NUM_BANDS) { | 3467 | if (band < 0 || band >= IEEE80211_NUM_BANDS) { |
3468 | err = -EINVAL; | 3468 | err = -EINVAL; |
3469 | goto out_free; | 3469 | goto out_free; |
3470 | } | 3470 | } |
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 58064d9e565d..791ab2e77f3f 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c | |||
@@ -462,8 +462,8 @@ static struct xfrm_algo_desc ealg_list[] = { | |||
462 | .desc = { | 462 | .desc = { |
463 | .sadb_alg_id = SADB_X_EALG_AESCTR, | 463 | .sadb_alg_id = SADB_X_EALG_AESCTR, |
464 | .sadb_alg_ivlen = 8, | 464 | .sadb_alg_ivlen = 8, |
465 | .sadb_alg_minbits = 128, | 465 | .sadb_alg_minbits = 160, |
466 | .sadb_alg_maxbits = 256 | 466 | .sadb_alg_maxbits = 288 |
467 | } | 467 | } |
468 | }, | 468 | }, |
469 | }; | 469 | }; |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index a38316b2e3f6..266a2292451d 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc. | 14 | * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc. |
15 | * <dgoeddel@trustedcs.com> | 15 | * <dgoeddel@trustedcs.com> |
16 | * Copyright (C) 2006, 2007, 2009 Hewlett-Packard Development Company, L.P. | 16 | * Copyright (C) 2006, 2007, 2009 Hewlett-Packard Development Company, L.P. |
17 | * Paul Moore <paul.moore@hp.com> | 17 | * Paul Moore <paul@paul-moore.com> |
18 | * Copyright (C) 2007 Hitachi Software Engineering Co., Ltd. | 18 | * Copyright (C) 2007 Hitachi Software Engineering Co., Ltd. |
19 | * Yuichi Nakamura <ynakam@hitachisoft.jp> | 19 | * Yuichi Nakamura <ynakam@hitachisoft.jp> |
20 | * | 20 | * |
diff --git a/security/selinux/include/netif.h b/security/selinux/include/netif.h index ce23edd128b3..43d507242b42 100644 --- a/security/selinux/include/netif.h +++ b/security/selinux/include/netif.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com> | 9 | * Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com> |
10 | * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. | 10 | * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. |
11 | * Paul Moore, <paul.moore@hp.com> | 11 | * Paul Moore <paul@paul-moore.com> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of the GNU General Public License version 2, | 14 | * it under the terms of the GNU General Public License version 2, |
diff --git a/security/selinux/include/netlabel.h b/security/selinux/include/netlabel.h index cf2f628e6e28..8c59b8f150e8 100644 --- a/security/selinux/include/netlabel.h +++ b/security/selinux/include/netlabel.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SELinux interface to the NetLabel subsystem | 2 | * SELinux interface to the NetLabel subsystem |
3 | * | 3 | * |
4 | * Author : Paul Moore <paul.moore@hp.com> | 4 | * Author: Paul Moore <paul@paul-moore.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
diff --git a/security/selinux/include/netnode.h b/security/selinux/include/netnode.h index 1b94450d11d2..df7a5ed6c694 100644 --- a/security/selinux/include/netnode.h +++ b/security/selinux/include/netnode.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * needed to reduce the lookup overhead since most of these queries happen on | 6 | * needed to reduce the lookup overhead since most of these queries happen on |
7 | * a per-packet basis. | 7 | * a per-packet basis. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/security/selinux/include/netport.h b/security/selinux/include/netport.h index 8991752eaf93..4d965b83d735 100644 --- a/security/selinux/include/netport.h +++ b/security/selinux/include/netport.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * mapping is maintained as part of the normal policy but a fast cache is | 5 | * mapping is maintained as part of the normal policy but a fast cache is |
6 | * needed to reduce the lookup overhead. | 6 | * needed to reduce the lookup overhead. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/security/selinux/netif.c b/security/selinux/netif.c index 58cc481c93d5..326f22cbe405 100644 --- a/security/selinux/netif.c +++ b/security/selinux/netif.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com> | 9 | * Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com> |
10 | * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. | 10 | * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. |
11 | * Paul Moore <paul.moore@hp.com> | 11 | * Paul Moore <paul@paul-moore.com> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of the GNU General Public License version 2, | 14 | * it under the terms of the GNU General Public License version 2, |
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index c3bf3ed07b06..da4b8b233280 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * This file provides the necessary glue to tie NetLabel into the SELinux | 4 | * This file provides the necessary glue to tie NetLabel into the SELinux |
5 | * subsystem. | 5 | * subsystem. |
6 | * | 6 | * |
7 | * Author: Paul Moore <paul.moore@hp.com> | 7 | * Author: Paul Moore <paul@paul-moore.com> |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index 8b691a863186..3bf46abaa688 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * needed to reduce the lookup overhead since most of these queries happen on | 6 | * needed to reduce the lookup overhead since most of these queries happen on |
7 | * a per-packet basis. | 7 | * a per-packet basis. |
8 | * | 8 | * |
9 | * Author: Paul Moore <paul.moore@hp.com> | 9 | * Author: Paul Moore <paul@paul-moore.com> |
10 | * | 10 | * |
11 | * This code is heavily based on the "netif" concept originally developed by | 11 | * This code is heavily based on the "netif" concept originally developed by |
12 | * James Morris <jmorris@redhat.com> | 12 | * James Morris <jmorris@redhat.com> |
diff --git a/security/selinux/netport.c b/security/selinux/netport.c index ae76e298de7d..0b62bd112461 100644 --- a/security/selinux/netport.c +++ b/security/selinux/netport.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * mapping is maintained as part of the normal policy but a fast cache is | 5 | * mapping is maintained as part of the normal policy but a fast cache is |
6 | * needed to reduce the lookup overhead. | 6 | * needed to reduce the lookup overhead. |
7 | * | 7 | * |
8 | * Author: Paul Moore <paul.moore@hp.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
9 | * | 9 | * |
10 | * This code is heavily based on the "netif" concept originally developed by | 10 | * This code is heavily based on the "netif" concept originally developed by |
11 | * James Morris <jmorris@redhat.com> | 11 | * James Morris <jmorris@redhat.com> |
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index de7900ef53da..55d92cbb177a 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Added conditional policy language extensions | 3 | * Added conditional policy language extensions |
4 | * | 4 | * |
5 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 5 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
6 | * | 6 | * |
7 | * Added support for the policy capability bitmap | 7 | * Added support for the policy capability bitmap |
8 | * | 8 | * |
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index d42951fcbe87..30f119b1d1ec 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
7 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 7 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
8 | * | 8 | * |
9 | * Added support to import/export the NetLabel category bitmap | 9 | * Added support to import/export the NetLabel category bitmap |
10 | * | 10 | * |
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index e96174216bc9..fbf9c5816c71 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. | 11 | * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. |
12 | */ | 12 | */ |
13 | /* | 13 | /* |
14 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 14 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
15 | * | 15 | * |
16 | * Added support to import/export the MLS label from NetLabel | 16 | * Added support to import/export the MLS label from NetLabel |
17 | * | 17 | * |
diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h index 037bf9d82d41..e4369e3e6366 100644 --- a/security/selinux/ss/mls.h +++ b/security/selinux/ss/mls.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. | 11 | * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. |
12 | */ | 12 | */ |
13 | /* | 13 | /* |
14 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 14 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
15 | * | 15 | * |
16 | * Added support to import/export the MLS label from NetLabel | 16 | * Added support to import/export the MLS label from NetLabel |
17 | * | 17 | * |
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index d246aca3f4fb..2381d0ded228 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | * Added conditional policy language extensions | 14 | * Added conditional policy language extensions |
15 | * | 15 | * |
16 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 16 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
17 | * | 17 | * |
18 | * Added support for the policy capability bitmap | 18 | * Added support for the policy capability bitmap |
19 | * | 19 | * |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 973e00e34fa9..f6917bc0aa05 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | * Added conditional policy language extensions | 14 | * Added conditional policy language extensions |
15 | * | 15 | * |
16 | * Updated: Hewlett-Packard <paul.moore@hp.com> | 16 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
17 | * | 17 | * |
18 | * Added support for NetLabel | 18 | * Added support for NetLabel |
19 | * Added support for the policy capability bitmap | 19 | * Added support for the policy capability bitmap |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index f375eb2e1957..b9c5e149903b 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Copyright (C) 2007 Casey Schaufler <casey@schaufler-ca.com> | 10 | * Copyright (C) 2007 Casey Schaufler <casey@schaufler-ca.com> |
11 | * Copyright (C) 2009 Hewlett-Packard Development Company, L.P. | 11 | * Copyright (C) 2009 Hewlett-Packard Development Company, L.P. |
12 | * Paul Moore <paul.moore@hp.com> | 12 | * Paul Moore <paul@paul-moore.com> |
13 | * Copyright (C) 2010 Nokia Corporation | 13 | * Copyright (C) 2010 Nokia Corporation |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify | 15 | * This program is free software; you can redistribute it and/or modify |