diff options
Diffstat (limited to 'drivers/net')
33 files changed, 194 insertions, 187 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index b97e35c33d17..16782b2cff49 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |||
@@ -50,13 +50,13 @@ | |||
50 | #include "cxgb4_uld.h" | 50 | #include "cxgb4_uld.h" |
51 | 51 | ||
52 | #define T4FW_VERSION_MAJOR 0x01 | 52 | #define T4FW_VERSION_MAJOR 0x01 |
53 | #define T4FW_VERSION_MINOR 0x06 | 53 | #define T4FW_VERSION_MINOR 0x09 |
54 | #define T4FW_VERSION_MICRO 0x18 | 54 | #define T4FW_VERSION_MICRO 0x17 |
55 | #define T4FW_VERSION_BUILD 0x00 | 55 | #define T4FW_VERSION_BUILD 0x00 |
56 | 56 | ||
57 | #define T5FW_VERSION_MAJOR 0x01 | 57 | #define T5FW_VERSION_MAJOR 0x01 |
58 | #define T5FW_VERSION_MINOR 0x08 | 58 | #define T5FW_VERSION_MINOR 0x09 |
59 | #define T5FW_VERSION_MICRO 0x1C | 59 | #define T5FW_VERSION_MICRO 0x17 |
60 | #define T5FW_VERSION_BUILD 0x00 | 60 | #define T5FW_VERSION_BUILD 0x00 |
61 | 61 | ||
62 | #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__) | 62 | #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__) |
diff --git a/drivers/net/ethernet/intel/i40e/Makefile b/drivers/net/ethernet/intel/i40e/Makefile index 479b2c4e552d..6ec1a795f184 100644 --- a/drivers/net/ethernet/intel/i40e/Makefile +++ b/drivers/net/ethernet/intel/i40e/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # Intel Ethernet Controller XL710 Family Linux Driver | 3 | # Intel Ethernet Controller XL710 Family Linux Driver |
4 | # Copyright(c) 2013 Intel Corporation. | 4 | # Copyright(c) 2013 - 2014 Intel Corporation. |
5 | # | 5 | # |
6 | # This program is free software; you can redistribute it and/or modify it | 6 | # This program is free software; you can redistribute it and/or modify it |
7 | # under the terms and conditions of the GNU General Public License, | 7 | # under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | # more details. | 13 | # more details. |
14 | # | 14 | # |
15 | # You should have received a copy of the GNU General Public License along with | 15 | # You should have received a copy of the GNU General Public License along |
16 | # this program; if not, write to the Free Software Foundation, Inc., | 16 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | # | 17 | # |
19 | # The full GNU General Public License is included in this distribution in | 18 | # The full GNU General Public License is included in this distribution in |
20 | # the file called "COPYING". | 19 | # the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 09d92d00cb13..4d4cdbf6fad7 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c index 2b320841a108..c75aa2d07491 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -584,6 +583,9 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw) | |||
584 | goto init_adminq_free_arq; | 583 | goto init_adminq_free_arq; |
585 | } | 584 | } |
586 | 585 | ||
586 | /* pre-emptive resource lock release */ | ||
587 | i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); | ||
588 | |||
587 | ret_code = i40e_aq_set_hmc_resource_profile(hw, | 589 | ret_code = i40e_aq_set_hmc_resource_profile(hw, |
588 | I40E_HMC_PROFILE_DEFAULT, | 590 | I40E_HMC_PROFILE_DEFAULT, |
589 | 0, | 591 | 0, |
@@ -862,7 +864,7 @@ void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, | |||
862 | /* zero out the desc */ | 864 | /* zero out the desc */ |
863 | memset((void *)desc, 0, sizeof(struct i40e_aq_desc)); | 865 | memset((void *)desc, 0, sizeof(struct i40e_aq_desc)); |
864 | desc->opcode = cpu_to_le16(opcode); | 866 | desc->opcode = cpu_to_le16(opcode); |
865 | desc->flags = cpu_to_le16(I40E_AQ_FLAG_EI | I40E_AQ_FLAG_SI); | 867 | desc->flags = cpu_to_le16(I40E_AQ_FLAG_SI); |
866 | } | 868 | } |
867 | 869 | ||
868 | /** | 870 | /** |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.h b/drivers/net/ethernet/intel/i40e/i40e_adminq.h index 21801c3d65dd..993f7685a911 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.h +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h index 007508772cf0..c009eb47058a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_alloc.h b/drivers/net/ethernet/intel/i40e/i40e_alloc.h index 3b1cc214f9dc..926811ad44ac 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_alloc.h +++ b/drivers/net/ethernet/intel/i40e/i40e_alloc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index d564910b4f58..807312bb62a2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -255,8 +254,11 @@ i40e_status i40e_aq_mac_address_write(struct i40e_hw *hw, | |||
255 | i40e_fill_default_direct_cmd_desc(&desc, | 254 | i40e_fill_default_direct_cmd_desc(&desc, |
256 | i40e_aqc_opc_mac_address_write); | 255 | i40e_aqc_opc_mac_address_write); |
257 | cmd_data->command_flags = cpu_to_le16(flags); | 256 | cmd_data->command_flags = cpu_to_le16(flags); |
258 | memcpy(&cmd_data->mac_sal, &mac_addr[0], 4); | 257 | cmd_data->mac_sah = cpu_to_le16((u16)mac_addr[0] << 8 | mac_addr[1]); |
259 | memcpy(&cmd_data->mac_sah, &mac_addr[4], 2); | 258 | cmd_data->mac_sal = cpu_to_le32(((u32)mac_addr[2] << 24) | |
259 | ((u32)mac_addr[3] << 16) | | ||
260 | ((u32)mac_addr[4] << 8) | | ||
261 | mac_addr[5]); | ||
260 | 262 | ||
261 | status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); | 263 | status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); |
262 | 264 | ||
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c index 125f758a03ac..0220b18b2b18 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -516,10 +515,10 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid) | |||
516 | rx_ring->stats.bytes, | 515 | rx_ring->stats.bytes, |
517 | rx_ring->rx_stats.non_eop_descs); | 516 | rx_ring->rx_stats.non_eop_descs); |
518 | dev_info(&pf->pdev->dev, | 517 | dev_info(&pf->pdev->dev, |
519 | " rx_rings[%i]: rx_stats: alloc_rx_page_failed = %lld, alloc_rx_buff_failed = %lld\n", | 518 | " rx_rings[%i]: rx_stats: alloc_page_failed = %lld, alloc_buff_failed = %lld\n", |
520 | i, | 519 | i, |
521 | rx_ring->rx_stats.alloc_rx_page_failed, | 520 | rx_ring->rx_stats.alloc_page_failed, |
522 | rx_ring->rx_stats.alloc_rx_buff_failed); | 521 | rx_ring->rx_stats.alloc_buff_failed); |
523 | dev_info(&pf->pdev->dev, | 522 | dev_info(&pf->pdev->dev, |
524 | " rx_rings[%i]: size = %i, dma = 0x%08lx\n", | 523 | " rx_rings[%i]: size = %i, dma = 0x%08lx\n", |
525 | i, rx_ring->size, | 524 | i, rx_ring->size, |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_diag.c b/drivers/net/ethernet/intel/i40e/i40e_diag.c index 6a1657e62418..b2380daef8c1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_diag.c +++ b/drivers/net/ethernet/intel/i40e/i40e_diag.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_diag.h b/drivers/net/ethernet/intel/i40e/i40e_diag.h index d1fc68cd6c94..0b5911652084 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_diag.h +++ b/drivers/net/ethernet/intel/i40e/i40e_diag.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 42c36d18e8c6..b886ee5bd99d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -1244,6 +1243,7 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) | |||
1244 | } | 1243 | } |
1245 | 1244 | ||
1246 | #define IP_HEADER_OFFSET 14 | 1245 | #define IP_HEADER_OFFSET 14 |
1246 | #define I40E_UDPIP_DUMMY_PACKET_LEN 42 | ||
1247 | /** | 1247 | /** |
1248 | * i40e_add_del_fdir_udpv4 - Add/Remove UDPv4 Flow Director filters for | 1248 | * i40e_add_del_fdir_udpv4 - Add/Remove UDPv4 Flow Director filters for |
1249 | * a specific flow spec | 1249 | * a specific flow spec |
@@ -1264,6 +1264,12 @@ static int i40e_add_del_fdir_udpv4(struct i40e_vsi *vsi, | |||
1264 | bool err = false; | 1264 | bool err = false; |
1265 | int ret; | 1265 | int ret; |
1266 | int i; | 1266 | int i; |
1267 | char packet[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0, | ||
1268 | 0x45, 0, 0, 0x1c, 0, 0, 0x40, 0, 0x40, 0x11, | ||
1269 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1270 | 0, 0, 0, 0, 0, 0, 0, 0}; | ||
1271 | |||
1272 | memcpy(fd_data->raw_packet, packet, I40E_UDPIP_DUMMY_PACKET_LEN); | ||
1267 | 1273 | ||
1268 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); | 1274 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); |
1269 | udp = (struct udphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET | 1275 | udp = (struct udphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET |
@@ -1294,6 +1300,7 @@ static int i40e_add_del_fdir_udpv4(struct i40e_vsi *vsi, | |||
1294 | return err ? -EOPNOTSUPP : 0; | 1300 | return err ? -EOPNOTSUPP : 0; |
1295 | } | 1301 | } |
1296 | 1302 | ||
1303 | #define I40E_TCPIP_DUMMY_PACKET_LEN 54 | ||
1297 | /** | 1304 | /** |
1298 | * i40e_add_del_fdir_tcpv4 - Add/Remove TCPv4 Flow Director filters for | 1305 | * i40e_add_del_fdir_tcpv4 - Add/Remove TCPv4 Flow Director filters for |
1299 | * a specific flow spec | 1306 | * a specific flow spec |
@@ -1313,6 +1320,14 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi, | |||
1313 | struct iphdr *ip; | 1320 | struct iphdr *ip; |
1314 | bool err = false; | 1321 | bool err = false; |
1315 | int ret; | 1322 | int ret; |
1323 | /* Dummy packet */ | ||
1324 | char packet[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0, | ||
1325 | 0x45, 0, 0, 0x28, 0, 0, 0x40, 0, 0x40, 0x6, | ||
1326 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1327 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1328 | 0x80, 0x11, 0x0, 0x72, 0, 0, 0, 0}; | ||
1329 | |||
1330 | memcpy(fd_data->raw_packet, packet, I40E_TCPIP_DUMMY_PACKET_LEN); | ||
1316 | 1331 | ||
1317 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); | 1332 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); |
1318 | tcp = (struct tcphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET | 1333 | tcp = (struct tcphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET |
@@ -1320,6 +1335,8 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi, | |||
1320 | 1335 | ||
1321 | ip->daddr = fsp->h_u.tcp_ip4_spec.ip4dst; | 1336 | ip->daddr = fsp->h_u.tcp_ip4_spec.ip4dst; |
1322 | tcp->dest = fsp->h_u.tcp_ip4_spec.pdst; | 1337 | tcp->dest = fsp->h_u.tcp_ip4_spec.pdst; |
1338 | ip->saddr = fsp->h_u.tcp_ip4_spec.ip4src; | ||
1339 | tcp->source = fsp->h_u.tcp_ip4_spec.psrc; | ||
1323 | 1340 | ||
1324 | fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN; | 1341 | fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN; |
1325 | ret = i40e_program_fdir_filter(fd_data, pf, add); | 1342 | ret = i40e_program_fdir_filter(fd_data, pf, add); |
@@ -1334,9 +1351,6 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi, | |||
1334 | fd_data->pctype, ret); | 1351 | fd_data->pctype, ret); |
1335 | } | 1352 | } |
1336 | 1353 | ||
1337 | ip->saddr = fsp->h_u.tcp_ip4_spec.ip4src; | ||
1338 | tcp->source = fsp->h_u.tcp_ip4_spec.psrc; | ||
1339 | |||
1340 | fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP; | 1354 | fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP; |
1341 | 1355 | ||
1342 | ret = i40e_program_fdir_filter(fd_data, pf, add); | 1356 | ret = i40e_program_fdir_filter(fd_data, pf, add); |
@@ -1370,6 +1384,7 @@ static int i40e_add_del_fdir_sctpv4(struct i40e_vsi *vsi, | |||
1370 | return -EOPNOTSUPP; | 1384 | return -EOPNOTSUPP; |
1371 | } | 1385 | } |
1372 | 1386 | ||
1387 | #define I40E_IP_DUMMY_PACKET_LEN 34 | ||
1373 | /** | 1388 | /** |
1374 | * i40e_add_del_fdir_ipv4 - Add/Remove IPv4 Flow Director filters for | 1389 | * i40e_add_del_fdir_ipv4 - Add/Remove IPv4 Flow Director filters for |
1375 | * a specific flow spec | 1390 | * a specific flow spec |
@@ -1389,7 +1404,11 @@ static int i40e_add_del_fdir_ipv4(struct i40e_vsi *vsi, | |||
1389 | bool err = false; | 1404 | bool err = false; |
1390 | int ret; | 1405 | int ret; |
1391 | int i; | 1406 | int i; |
1407 | char packet[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0, | ||
1408 | 0x45, 0, 0, 0x14, 0, 0, 0x40, 0, 0x40, 0x10, | ||
1409 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | ||
1392 | 1410 | ||
1411 | memcpy(fd_data->raw_packet, packet, I40E_IP_DUMMY_PACKET_LEN); | ||
1393 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); | 1412 | ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET); |
1394 | 1413 | ||
1395 | ip->saddr = fsp->h_u.usr_ip4_spec.ip4src; | 1414 | ip->saddr = fsp->h_u.usr_ip4_spec.ip4src; |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_hmc.c index bcedf3fb1143..76dfef3e0104 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_hmc.c +++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.h b/drivers/net/ethernet/intel/i40e/i40e_hmc.h index aacd42a261e9..72bf30aba150 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_hmc.h +++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c index a695b91c9c79..101ed4107312 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c +++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h index f8afbcb053c5..341de925a298 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h +++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index f736c4470412..1b792ee592d0 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -423,7 +422,7 @@ void i40e_vsi_reset_stats(struct i40e_vsi *vsi) | |||
423 | memset(&vsi->net_stats_offsets, 0, sizeof(vsi->net_stats_offsets)); | 422 | memset(&vsi->net_stats_offsets, 0, sizeof(vsi->net_stats_offsets)); |
424 | memset(&vsi->eth_stats, 0, sizeof(vsi->eth_stats)); | 423 | memset(&vsi->eth_stats, 0, sizeof(vsi->eth_stats)); |
425 | memset(&vsi->eth_stats_offsets, 0, sizeof(vsi->eth_stats_offsets)); | 424 | memset(&vsi->eth_stats_offsets, 0, sizeof(vsi->eth_stats_offsets)); |
426 | if (vsi->rx_rings) | 425 | if (vsi->rx_rings && vsi->rx_rings[0]) { |
427 | for (i = 0; i < vsi->num_queue_pairs; i++) { | 426 | for (i = 0; i < vsi->num_queue_pairs; i++) { |
428 | memset(&vsi->rx_rings[i]->stats, 0 , | 427 | memset(&vsi->rx_rings[i]->stats, 0 , |
429 | sizeof(vsi->rx_rings[i]->stats)); | 428 | sizeof(vsi->rx_rings[i]->stats)); |
@@ -434,6 +433,7 @@ void i40e_vsi_reset_stats(struct i40e_vsi *vsi) | |||
434 | memset(&vsi->tx_rings[i]->tx_stats, 0, | 433 | memset(&vsi->tx_rings[i]->tx_stats, 0, |
435 | sizeof(vsi->tx_rings[i]->tx_stats)); | 434 | sizeof(vsi->tx_rings[i]->tx_stats)); |
436 | } | 435 | } |
436 | } | ||
437 | vsi->stat_offsets_loaded = false; | 437 | vsi->stat_offsets_loaded = false; |
438 | } | 438 | } |
439 | 439 | ||
@@ -786,8 +786,8 @@ void i40e_update_stats(struct i40e_vsi *vsi) | |||
786 | } while (u64_stats_fetch_retry_bh(&p->syncp, start)); | 786 | } while (u64_stats_fetch_retry_bh(&p->syncp, start)); |
787 | rx_b += bytes; | 787 | rx_b += bytes; |
788 | rx_p += packets; | 788 | rx_p += packets; |
789 | rx_buf += p->rx_stats.alloc_rx_buff_failed; | 789 | rx_buf += p->rx_stats.alloc_buff_failed; |
790 | rx_page += p->rx_stats.alloc_rx_page_failed; | 790 | rx_page += p->rx_stats.alloc_page_failed; |
791 | } | 791 | } |
792 | rcu_read_unlock(); | 792 | rcu_read_unlock(); |
793 | vsi->tx_restart = tx_restart; | 793 | vsi->tx_restart = tx_restart; |
@@ -2068,8 +2068,11 @@ static void i40e_vsi_free_tx_resources(struct i40e_vsi *vsi) | |||
2068 | { | 2068 | { |
2069 | int i; | 2069 | int i; |
2070 | 2070 | ||
2071 | if (!vsi->tx_rings) | ||
2072 | return; | ||
2073 | |||
2071 | for (i = 0; i < vsi->num_queue_pairs; i++) | 2074 | for (i = 0; i < vsi->num_queue_pairs; i++) |
2072 | if (vsi->tx_rings[i]->desc) | 2075 | if (vsi->tx_rings[i] && vsi->tx_rings[i]->desc) |
2073 | i40e_free_tx_resources(vsi->tx_rings[i]); | 2076 | i40e_free_tx_resources(vsi->tx_rings[i]); |
2074 | } | 2077 | } |
2075 | 2078 | ||
@@ -2102,8 +2105,11 @@ static void i40e_vsi_free_rx_resources(struct i40e_vsi *vsi) | |||
2102 | { | 2105 | { |
2103 | int i; | 2106 | int i; |
2104 | 2107 | ||
2108 | if (!vsi->rx_rings) | ||
2109 | return; | ||
2110 | |||
2105 | for (i = 0; i < vsi->num_queue_pairs; i++) | 2111 | for (i = 0; i < vsi->num_queue_pairs; i++) |
2106 | if (vsi->rx_rings[i]->desc) | 2112 | if (vsi->rx_rings[i] && vsi->rx_rings[i]->desc) |
2107 | i40e_free_rx_resources(vsi->rx_rings[i]); | 2113 | i40e_free_rx_resources(vsi->rx_rings[i]); |
2108 | } | 2114 | } |
2109 | 2115 | ||
@@ -2758,16 +2764,16 @@ static irqreturn_t i40e_intr(int irq, void *data) | |||
2758 | { | 2764 | { |
2759 | struct i40e_pf *pf = (struct i40e_pf *)data; | 2765 | struct i40e_pf *pf = (struct i40e_pf *)data; |
2760 | struct i40e_hw *hw = &pf->hw; | 2766 | struct i40e_hw *hw = &pf->hw; |
2767 | irqreturn_t ret = IRQ_NONE; | ||
2761 | u32 icr0, icr0_remaining; | 2768 | u32 icr0, icr0_remaining; |
2762 | u32 val, ena_mask; | 2769 | u32 val, ena_mask; |
2763 | 2770 | ||
2764 | icr0 = rd32(hw, I40E_PFINT_ICR0); | 2771 | icr0 = rd32(hw, I40E_PFINT_ICR0); |
2772 | ena_mask = rd32(hw, I40E_PFINT_ICR0_ENA); | ||
2765 | 2773 | ||
2766 | /* if sharing a legacy IRQ, we might get called w/o an intr pending */ | 2774 | /* if sharing a legacy IRQ, we might get called w/o an intr pending */ |
2767 | if ((icr0 & I40E_PFINT_ICR0_INTEVENT_MASK) == 0) | 2775 | if ((icr0 & I40E_PFINT_ICR0_INTEVENT_MASK) == 0) |
2768 | return IRQ_NONE; | 2776 | goto enable_intr; |
2769 | |||
2770 | ena_mask = rd32(hw, I40E_PFINT_ICR0_ENA); | ||
2771 | 2777 | ||
2772 | /* if interrupt but no bits showing, must be SWINT */ | 2778 | /* if interrupt but no bits showing, must be SWINT */ |
2773 | if (((icr0 & ~I40E_PFINT_ICR0_INTEVENT_MASK) == 0) || | 2779 | if (((icr0 & ~I40E_PFINT_ICR0_INTEVENT_MASK) == 0) || |
@@ -2843,7 +2849,9 @@ static irqreturn_t i40e_intr(int irq, void *data) | |||
2843 | } | 2849 | } |
2844 | ena_mask &= ~icr0_remaining; | 2850 | ena_mask &= ~icr0_remaining; |
2845 | } | 2851 | } |
2852 | ret = IRQ_HANDLED; | ||
2846 | 2853 | ||
2854 | enable_intr: | ||
2847 | /* re-enable interrupt causes */ | 2855 | /* re-enable interrupt causes */ |
2848 | wr32(hw, I40E_PFINT_ICR0_ENA, ena_mask); | 2856 | wr32(hw, I40E_PFINT_ICR0_ENA, ena_mask); |
2849 | if (!test_bit(__I40E_DOWN, &pf->state)) { | 2857 | if (!test_bit(__I40E_DOWN, &pf->state)) { |
@@ -2851,7 +2859,7 @@ static irqreturn_t i40e_intr(int irq, void *data) | |||
2851 | i40e_irq_dynamic_enable_icr0(pf); | 2859 | i40e_irq_dynamic_enable_icr0(pf); |
2852 | } | 2860 | } |
2853 | 2861 | ||
2854 | return IRQ_HANDLED; | 2862 | return ret; |
2855 | } | 2863 | } |
2856 | 2864 | ||
2857 | /** | 2865 | /** |
@@ -4514,10 +4522,13 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf) | |||
4514 | dev_info(&pf->pdev->dev, "ARQ LAN queue overflow event received\n"); | 4522 | dev_info(&pf->pdev->dev, "ARQ LAN queue overflow event received\n"); |
4515 | i40e_handle_lan_overflow_event(pf, &event); | 4523 | i40e_handle_lan_overflow_event(pf, &event); |
4516 | break; | 4524 | break; |
4525 | case i40e_aqc_opc_send_msg_to_peer: | ||
4526 | dev_info(&pf->pdev->dev, "ARQ: Msg from other pf\n"); | ||
4527 | break; | ||
4517 | default: | 4528 | default: |
4518 | dev_info(&pf->pdev->dev, | 4529 | dev_info(&pf->pdev->dev, |
4519 | "ARQ Error: Unknown event %d received\n", | 4530 | "ARQ Error: Unknown event 0x%04x received\n", |
4520 | event.desc.opcode); | 4531 | opcode); |
4521 | break; | 4532 | break; |
4522 | } | 4533 | } |
4523 | } while (pending && (i++ < pf->adminq_work_limit)); | 4534 | } while (pending && (i++ < pf->adminq_work_limit)); |
@@ -4647,7 +4658,7 @@ static int i40e_get_capabilities(struct i40e_pf *pf) | |||
4647 | } | 4658 | } |
4648 | } while (err); | 4659 | } while (err); |
4649 | 4660 | ||
4650 | if (pf->hw.revision_id == 0 && pf->hw.func_caps.npar_enable) { | 4661 | if (pf->hw.revision_id == 0 && (pf->flags & I40E_FLAG_MFP_ENABLED)) { |
4651 | pf->hw.func_caps.num_msix_vectors += 1; | 4662 | pf->hw.func_caps.num_msix_vectors += 1; |
4652 | pf->hw.func_caps.num_tx_qp = | 4663 | pf->hw.func_caps.num_tx_qp = |
4653 | min_t(int, pf->hw.func_caps.num_tx_qp, | 4664 | min_t(int, pf->hw.func_caps.num_tx_qp, |
@@ -4784,7 +4795,7 @@ static int i40e_prep_for_reset(struct i40e_pf *pf) | |||
4784 | } | 4795 | } |
4785 | 4796 | ||
4786 | /** | 4797 | /** |
4787 | * i40e_reset_and_rebuild - reset and rebuid using a saved config | 4798 | * i40e_reset_and_rebuild - reset and rebuild using a saved config |
4788 | * @pf: board private structure | 4799 | * @pf: board private structure |
4789 | * @reinit: if the Main VSI needs to re-initialized. | 4800 | * @reinit: if the Main VSI needs to re-initialized. |
4790 | **/ | 4801 | **/ |
@@ -5348,7 +5359,7 @@ static void i40e_vsi_clear_rings(struct i40e_vsi *vsi) | |||
5348 | { | 5359 | { |
5349 | int i; | 5360 | int i; |
5350 | 5361 | ||
5351 | if (vsi->tx_rings[0]) { | 5362 | if (vsi->tx_rings && vsi->tx_rings[0]) { |
5352 | for (i = 0; i < vsi->alloc_queue_pairs; i++) { | 5363 | for (i = 0; i < vsi->alloc_queue_pairs; i++) { |
5353 | kfree_rcu(vsi->tx_rings[i], rcu); | 5364 | kfree_rcu(vsi->tx_rings[i], rcu); |
5354 | vsi->tx_rings[i] = NULL; | 5365 | vsi->tx_rings[i] = NULL; |
@@ -5763,16 +5774,8 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count) | |||
5763 | queue_count = rounddown_pow_of_two(queue_count); | 5774 | queue_count = rounddown_pow_of_two(queue_count); |
5764 | 5775 | ||
5765 | if (queue_count != pf->rss_size) { | 5776 | if (queue_count != pf->rss_size) { |
5766 | if (pf->queues_left < (queue_count - pf->rss_size)) { | ||
5767 | dev_info(&pf->pdev->dev, | ||
5768 | "Not enough queues to do RSS on %d queues: remaining queues %d\n", | ||
5769 | queue_count, pf->queues_left); | ||
5770 | return pf->rss_size; | ||
5771 | } | ||
5772 | i40e_prep_for_reset(pf); | 5777 | i40e_prep_for_reset(pf); |
5773 | 5778 | ||
5774 | pf->num_lan_qps += (queue_count - pf->rss_size); | ||
5775 | pf->queues_left -= (queue_count - pf->rss_size); | ||
5776 | pf->rss_size = queue_count; | 5779 | pf->rss_size = queue_count; |
5777 | 5780 | ||
5778 | i40e_reset_and_rebuild(pf, true); | 5781 | i40e_reset_and_rebuild(pf, true); |
@@ -5809,7 +5812,6 @@ static int i40e_sw_init(struct i40e_pf *pf) | |||
5809 | pf->flags = I40E_FLAG_RX_CSUM_ENABLED | | 5812 | pf->flags = I40E_FLAG_RX_CSUM_ENABLED | |
5810 | I40E_FLAG_MSI_ENABLED | | 5813 | I40E_FLAG_MSI_ENABLED | |
5811 | I40E_FLAG_MSIX_ENABLED | | 5814 | I40E_FLAG_MSIX_ENABLED | |
5812 | I40E_FLAG_RX_PS_ENABLED | | ||
5813 | I40E_FLAG_RX_1BUF_ENABLED; | 5815 | I40E_FLAG_RX_1BUF_ENABLED; |
5814 | 5816 | ||
5815 | /* Depending on PF configurations, it is possible that the RSS | 5817 | /* Depending on PF configurations, it is possible that the RSS |
@@ -5825,6 +5827,12 @@ static int i40e_sw_init(struct i40e_pf *pf) | |||
5825 | pf->rss_size = 1; | 5827 | pf->rss_size = 1; |
5826 | } | 5828 | } |
5827 | 5829 | ||
5830 | /* MFP mode enabled */ | ||
5831 | if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.mfp_mode_1) { | ||
5832 | pf->flags |= I40E_FLAG_MFP_ENABLED; | ||
5833 | dev_info(&pf->pdev->dev, "MFP mode Enabled\n"); | ||
5834 | } | ||
5835 | |||
5828 | if (pf->hw.func_caps.dcb) | 5836 | if (pf->hw.func_caps.dcb) |
5829 | pf->num_tc_qps = I40E_DEFAULT_QUEUES_PER_TC; | 5837 | pf->num_tc_qps = I40E_DEFAULT_QUEUES_PER_TC; |
5830 | else | 5838 | else |
@@ -5853,12 +5861,6 @@ static int i40e_sw_init(struct i40e_pf *pf) | |||
5853 | pf->num_vmdq_qps = I40E_DEFAULT_QUEUES_PER_VMDQ; | 5861 | pf->num_vmdq_qps = I40E_DEFAULT_QUEUES_PER_VMDQ; |
5854 | } | 5862 | } |
5855 | 5863 | ||
5856 | /* MFP mode enabled */ | ||
5857 | if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.mfp_mode_1) { | ||
5858 | pf->flags |= I40E_FLAG_MFP_ENABLED; | ||
5859 | dev_info(&pf->pdev->dev, "MFP mode Enabled\n"); | ||
5860 | } | ||
5861 | |||
5862 | #ifdef CONFIG_PCI_IOV | 5864 | #ifdef CONFIG_PCI_IOV |
5863 | if (pf->hw.func_caps.num_vfs) { | 5865 | if (pf->hw.func_caps.num_vfs) { |
5864 | pf->num_vf_qps = I40E_DEFAULT_QUEUES_PER_VF; | 5866 | pf->num_vf_qps = I40E_DEFAULT_QUEUES_PER_VF; |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c index e2da0a2784dd..37d66c87abc9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c +++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h index 702c81ba86e3..ecd0f0b663c9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_osdep.h +++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h index e05d303105a7..c7c3d8231b36 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h +++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_register.h b/drivers/net/ethernet/intel/i40e/i40e_register.h index d188ec03aff2..1d40f425acf1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_register.h +++ b/drivers/net/ethernet/intel/i40e/i40e_register.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_status.h b/drivers/net/ethernet/intel/i40e/i40e_status.h index 5e5bcddac573..5f9cac55aa55 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_status.h +++ b/drivers/net/ethernet/intel/i40e/i40e_status.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index fac4fb37f87b..43d88dd66ed4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -775,7 +774,7 @@ void i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count) | |||
775 | skb = netdev_alloc_skb_ip_align(rx_ring->netdev, | 774 | skb = netdev_alloc_skb_ip_align(rx_ring->netdev, |
776 | rx_ring->rx_buf_len); | 775 | rx_ring->rx_buf_len); |
777 | if (!skb) { | 776 | if (!skb) { |
778 | rx_ring->rx_stats.alloc_rx_buff_failed++; | 777 | rx_ring->rx_stats.alloc_buff_failed++; |
779 | goto no_buffers; | 778 | goto no_buffers; |
780 | } | 779 | } |
781 | /* initialize queue mapping */ | 780 | /* initialize queue mapping */ |
@@ -789,7 +788,7 @@ void i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count) | |||
789 | rx_ring->rx_buf_len, | 788 | rx_ring->rx_buf_len, |
790 | DMA_FROM_DEVICE); | 789 | DMA_FROM_DEVICE); |
791 | if (dma_mapping_error(rx_ring->dev, bi->dma)) { | 790 | if (dma_mapping_error(rx_ring->dev, bi->dma)) { |
792 | rx_ring->rx_stats.alloc_rx_buff_failed++; | 791 | rx_ring->rx_stats.alloc_buff_failed++; |
793 | bi->dma = 0; | 792 | bi->dma = 0; |
794 | goto no_buffers; | 793 | goto no_buffers; |
795 | } | 794 | } |
@@ -799,7 +798,7 @@ void i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count) | |||
799 | if (!bi->page) { | 798 | if (!bi->page) { |
800 | bi->page = alloc_page(GFP_ATOMIC); | 799 | bi->page = alloc_page(GFP_ATOMIC); |
801 | if (!bi->page) { | 800 | if (!bi->page) { |
802 | rx_ring->rx_stats.alloc_rx_page_failed++; | 801 | rx_ring->rx_stats.alloc_page_failed++; |
803 | goto no_buffers; | 802 | goto no_buffers; |
804 | } | 803 | } |
805 | } | 804 | } |
@@ -814,7 +813,7 @@ void i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count) | |||
814 | DMA_FROM_DEVICE); | 813 | DMA_FROM_DEVICE); |
815 | if (dma_mapping_error(rx_ring->dev, | 814 | if (dma_mapping_error(rx_ring->dev, |
816 | bi->page_dma)) { | 815 | bi->page_dma)) { |
817 | rx_ring->rx_stats.alloc_rx_page_failed++; | 816 | rx_ring->rx_stats.alloc_page_failed++; |
818 | bi->page_dma = 0; | 817 | bi->page_dma = 0; |
819 | goto no_buffers; | 818 | goto no_buffers; |
820 | } | 819 | } |
@@ -991,15 +990,15 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget) | |||
991 | skb = rx_bi->skb; | 990 | skb = rx_bi->skb; |
992 | prefetch(skb->data); | 991 | prefetch(skb->data); |
993 | 992 | ||
994 | rx_packet_len = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) | 993 | rx_packet_len = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >> |
995 | >> I40E_RXD_QW1_LENGTH_PBUF_SHIFT; | 994 | I40E_RXD_QW1_LENGTH_PBUF_SHIFT; |
996 | rx_header_len = (qword & I40E_RXD_QW1_LENGTH_HBUF_MASK) | 995 | rx_header_len = (qword & I40E_RXD_QW1_LENGTH_HBUF_MASK) >> |
997 | >> I40E_RXD_QW1_LENGTH_HBUF_SHIFT; | 996 | I40E_RXD_QW1_LENGTH_HBUF_SHIFT; |
998 | rx_sph = (qword & I40E_RXD_QW1_LENGTH_SPH_MASK) | 997 | rx_sph = (qword & I40E_RXD_QW1_LENGTH_SPH_MASK) >> |
999 | >> I40E_RXD_QW1_LENGTH_SPH_SHIFT; | 998 | I40E_RXD_QW1_LENGTH_SPH_SHIFT; |
1000 | 999 | ||
1001 | rx_error = (qword & I40E_RXD_QW1_ERROR_MASK) | 1000 | rx_error = (qword & I40E_RXD_QW1_ERROR_MASK) >> |
1002 | >> I40E_RXD_QW1_ERROR_SHIFT; | 1001 | I40E_RXD_QW1_ERROR_SHIFT; |
1003 | rx_hbo = rx_error & (1 << I40E_RX_DESC_ERROR_HBO_SHIFT); | 1002 | rx_hbo = rx_error & (1 << I40E_RX_DESC_ERROR_HBO_SHIFT); |
1004 | rx_error &= ~(1 << I40E_RX_DESC_ERROR_HBO_SHIFT); | 1003 | rx_error &= ~(1 << I40E_RX_DESC_ERROR_HBO_SHIFT); |
1005 | 1004 | ||
@@ -1115,8 +1114,8 @@ next_desc: | |||
1115 | /* use prefetched values */ | 1114 | /* use prefetched values */ |
1116 | rx_desc = next_rxd; | 1115 | rx_desc = next_rxd; |
1117 | qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len); | 1116 | qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len); |
1118 | rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) | 1117 | rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >> |
1119 | >> I40E_RXD_QW1_STATUS_SHIFT; | 1118 | I40E_RXD_QW1_STATUS_SHIFT; |
1120 | } | 1119 | } |
1121 | 1120 | ||
1122 | rx_ring->next_to_clean = i; | 1121 | rx_ring->next_to_clean = i; |
@@ -1415,10 +1414,10 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb, | |||
1415 | cd_cmd = I40E_TX_CTX_DESC_TSO; | 1414 | cd_cmd = I40E_TX_CTX_DESC_TSO; |
1416 | cd_tso_len = skb->len - *hdr_len; | 1415 | cd_tso_len = skb->len - *hdr_len; |
1417 | cd_mss = skb_shinfo(skb)->gso_size; | 1416 | cd_mss = skb_shinfo(skb)->gso_size; |
1418 | *cd_type_cmd_tso_mss |= ((u64)cd_cmd << I40E_TXD_CTX_QW1_CMD_SHIFT) | 1417 | *cd_type_cmd_tso_mss |= ((u64)cd_cmd << I40E_TXD_CTX_QW1_CMD_SHIFT) | |
1419 | | ((u64)cd_tso_len | 1418 | ((u64)cd_tso_len << |
1420 | << I40E_TXD_CTX_QW1_TSO_LEN_SHIFT) | 1419 | I40E_TXD_CTX_QW1_TSO_LEN_SHIFT) | |
1421 | | ((u64)cd_mss << I40E_TXD_CTX_QW1_MSS_SHIFT); | 1420 | ((u64)cd_mss << I40E_TXD_CTX_QW1_MSS_SHIFT); |
1422 | return 1; | 1421 | return 1; |
1423 | } | 1422 | } |
1424 | 1423 | ||
@@ -1716,6 +1715,7 @@ dma_error: | |||
1716 | static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) | 1715 | static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) |
1717 | { | 1716 | { |
1718 | netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); | 1717 | netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); |
1718 | /* Memory barrier before checking head and tail */ | ||
1719 | smp_mb(); | 1719 | smp_mb(); |
1720 | 1720 | ||
1721 | /* Check again in a case another CPU has just made room available. */ | 1721 | /* Check again in a case another CPU has just made room available. */ |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h index 92f5cf5079e1..6f8506c181d9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -175,8 +174,8 @@ struct i40e_tx_queue_stats { | |||
175 | 174 | ||
176 | struct i40e_rx_queue_stats { | 175 | struct i40e_rx_queue_stats { |
177 | u64 non_eop_descs; | 176 | u64 non_eop_descs; |
178 | u64 alloc_rx_page_failed; | 177 | u64 alloc_page_failed; |
179 | u64 alloc_rx_buff_failed; | 178 | u64 alloc_buff_failed; |
180 | }; | 179 | }; |
181 | 180 | ||
182 | enum i40e_ring_state_t { | 181 | enum i40e_ring_state_t { |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h index bcf031773568..12473ad5c8e6 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_type.h +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -77,8 +76,6 @@ | |||
77 | struct i40e_hw; | 76 | struct i40e_hw; |
78 | typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *); | 77 | typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *); |
79 | 78 | ||
80 | #define I40E_ETH_LENGTH_OF_ADDRESS 6 | ||
81 | |||
82 | /* Data type manipulation macros. */ | 79 | /* Data type manipulation macros. */ |
83 | 80 | ||
84 | #define I40E_DESC_UNUSED(R) \ | 81 | #define I40E_DESC_UNUSED(R) \ |
@@ -240,9 +237,9 @@ struct i40e_hw_capabilities { | |||
240 | 237 | ||
241 | struct i40e_mac_info { | 238 | struct i40e_mac_info { |
242 | enum i40e_mac_type type; | 239 | enum i40e_mac_type type; |
243 | u8 addr[I40E_ETH_LENGTH_OF_ADDRESS]; | 240 | u8 addr[ETH_ALEN]; |
244 | u8 perm_addr[I40E_ETH_LENGTH_OF_ADDRESS]; | 241 | u8 perm_addr[ETH_ALEN]; |
245 | u8 san_addr[I40E_ETH_LENGTH_OF_ADDRESS]; | 242 | u8 san_addr[ETH_ALEN]; |
246 | u16 max_fcoeq; | 243 | u16 max_fcoeq; |
247 | }; | 244 | }; |
248 | 245 | ||
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h index cc6654f1dac7..22a1b69cd646 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -142,7 +141,7 @@ struct i40e_virtchnl_vsi_resource { | |||
142 | u16 num_queue_pairs; | 141 | u16 num_queue_pairs; |
143 | enum i40e_vsi_type vsi_type; | 142 | enum i40e_vsi_type vsi_type; |
144 | u16 qset_handle; | 143 | u16 qset_handle; |
145 | u8 default_mac_addr[I40E_ETH_LENGTH_OF_ADDRESS]; | 144 | u8 default_mac_addr[ETH_ALEN]; |
146 | }; | 145 | }; |
147 | /* VF offload flags */ | 146 | /* VF offload flags */ |
148 | #define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001 | 147 | #define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001 |
@@ -265,7 +264,7 @@ struct i40e_virtchnl_queue_select { | |||
265 | */ | 264 | */ |
266 | 265 | ||
267 | struct i40e_virtchnl_ether_addr { | 266 | struct i40e_virtchnl_ether_addr { |
268 | u8 addr[I40E_ETH_LENGTH_OF_ADDRESS]; | 267 | u8 addr[ETH_ALEN]; |
269 | u8 pad[2]; | 268 | u8 pad[2]; |
270 | }; | 269 | }; |
271 | 270 | ||
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index efb9a242d275..51a4f6125437 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
@@ -177,7 +176,8 @@ static void i40e_config_irq_link_list(struct i40e_vf *vf, u16 vsi_idx, | |||
177 | (I40E_MAX_VSI_QP * | 176 | (I40E_MAX_VSI_QP * |
178 | I40E_VIRTCHNL_SUPPORTED_QTYPES), | 177 | I40E_VIRTCHNL_SUPPORTED_QTYPES), |
179 | next_q + 1); | 178 | next_q + 1); |
180 | if (next_q < (I40E_MAX_VSI_QP * I40E_VIRTCHNL_SUPPORTED_QTYPES)) { | 179 | if (next_q < |
180 | (I40E_MAX_VSI_QP * I40E_VIRTCHNL_SUPPORTED_QTYPES)) { | ||
181 | vsi_queue_id = next_q / I40E_VIRTCHNL_SUPPORTED_QTYPES; | 181 | vsi_queue_id = next_q / I40E_VIRTCHNL_SUPPORTED_QTYPES; |
182 | qtype = next_q % I40E_VIRTCHNL_SUPPORTED_QTYPES; | 182 | qtype = next_q % I40E_VIRTCHNL_SUPPORTED_QTYPES; |
183 | pf_queue_id = i40e_vc_get_pf_queue_id(vf, vsi_idx, | 183 | pf_queue_id = i40e_vc_get_pf_queue_id(vf, vsi_idx, |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h index 8d0f4dd2a252..cc1feee36e12 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -12,9 +12,8 @@ | |||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | 17 | * |
19 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
20 | * the file called "COPYING". | 19 | * the file called "COPYING". |
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index 2a30193d0d50..2dc82f1d2e70 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -62,8 +62,6 @@ config SIR_BFIN_PIO | |||
62 | bool "PIO mode" | 62 | bool "PIO mode" |
63 | endchoice | 63 | endchoice |
64 | 64 | ||
65 | comment "Dongle support" | ||
66 | |||
67 | config SH_SIR | 65 | config SH_SIR |
68 | tristate "SuperH SIR on UART" | 66 | tristate "SuperH SIR on UART" |
69 | depends on IRDA && SUPERH && \ | 67 | depends on IRDA && SUPERH && \ |
@@ -74,6 +72,8 @@ config SH_SIR | |||
74 | Say Y here if your want to enable SIR function on SuperH UART | 72 | Say Y here if your want to enable SIR function on SuperH UART |
75 | devices. | 73 | devices. |
76 | 74 | ||
75 | comment "Dongle support" | ||
76 | |||
77 | config DONGLE | 77 | config DONGLE |
78 | bool "Serial dongle support" | 78 | bool "Serial dongle support" |
79 | depends on IRTTY_SIR | 79 | depends on IRTTY_SIR |
diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c index ff45cd0d60e8..c96b46b2c3a8 100644 --- a/drivers/net/irda/sh_irda.c +++ b/drivers/net/irda/sh_irda.c | |||
@@ -804,7 +804,7 @@ static int sh_irda_probe(struct platform_device *pdev) | |||
804 | goto err_mem_4; | 804 | goto err_mem_4; |
805 | 805 | ||
806 | platform_set_drvdata(pdev, ndev); | 806 | platform_set_drvdata(pdev, ndev); |
807 | err = request_irq(irq, sh_irda_irq, 0, "sh_irda", self); | 807 | err = devm_request_irq(&pdev->dev, irq, sh_irda_irq, 0, "sh_irda", self); |
808 | if (err) { | 808 | if (err) { |
809 | dev_warn(&pdev->dev, "Unable to attach sh_irda interrupt\n"); | 809 | dev_warn(&pdev->dev, "Unable to attach sh_irda interrupt\n"); |
810 | goto err_mem_4; | 810 | goto err_mem_4; |
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c index 8d9ae5a086d5..cadf52e22464 100644 --- a/drivers/net/irda/sh_sir.c +++ b/drivers/net/irda/sh_sir.c | |||
@@ -761,7 +761,7 @@ static int sh_sir_probe(struct platform_device *pdev) | |||
761 | goto err_mem_4; | 761 | goto err_mem_4; |
762 | 762 | ||
763 | platform_set_drvdata(pdev, ndev); | 763 | platform_set_drvdata(pdev, ndev); |
764 | err = request_irq(irq, sh_sir_irq, 0, "sh_sir", self); | 764 | err = devm_request_irq(&pdev->dev, irq, sh_sir_irq, 0, "sh_sir", self); |
765 | if (err) { | 765 | if (err) { |
766 | dev_warn(&pdev->dev, "Unable to attach sh_sir interrupt\n"); | 766 | dev_warn(&pdev->dev, "Unable to attach sh_sir interrupt\n"); |
767 | goto err_mem_4; | 767 | goto err_mem_4; |
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index c955fc39d69a..4c76bcb9a879 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h | |||
@@ -143,6 +143,7 @@ struct xenvif { | |||
143 | char rx_irq_name[IFNAMSIZ+4]; /* DEVNAME-rx */ | 143 | char rx_irq_name[IFNAMSIZ+4]; /* DEVNAME-rx */ |
144 | struct xen_netif_rx_back_ring rx; | 144 | struct xen_netif_rx_back_ring rx; |
145 | struct sk_buff_head rx_queue; | 145 | struct sk_buff_head rx_queue; |
146 | bool rx_queue_stopped; | ||
146 | /* Set when the RX interrupt is triggered by the frontend. | 147 | /* Set when the RX interrupt is triggered by the frontend. |
147 | * The worker thread may need to wake the queue. | 148 | * The worker thread may need to wake the queue. |
148 | */ | 149 | */ |
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 4f81ac0e2f0a..27385639b6e5 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -476,7 +476,8 @@ static void xenvif_rx_action(struct xenvif *vif) | |||
476 | int ret; | 476 | int ret; |
477 | unsigned long offset; | 477 | unsigned long offset; |
478 | struct skb_cb_overlay *sco; | 478 | struct skb_cb_overlay *sco; |
479 | int need_to_notify = 0; | 479 | bool need_to_notify = false; |
480 | bool ring_full = false; | ||
480 | 481 | ||
481 | struct netrx_pending_operations npo = { | 482 | struct netrx_pending_operations npo = { |
482 | .copy = vif->grant_copy_op, | 483 | .copy = vif->grant_copy_op, |
@@ -508,7 +509,8 @@ static void xenvif_rx_action(struct xenvif *vif) | |||
508 | /* If the skb may not fit then bail out now */ | 509 | /* If the skb may not fit then bail out now */ |
509 | if (!xenvif_rx_ring_slots_available(vif, max_slots_needed)) { | 510 | if (!xenvif_rx_ring_slots_available(vif, max_slots_needed)) { |
510 | skb_queue_head(&vif->rx_queue, skb); | 511 | skb_queue_head(&vif->rx_queue, skb); |
511 | need_to_notify = 1; | 512 | need_to_notify = true; |
513 | ring_full = true; | ||
512 | break; | 514 | break; |
513 | } | 515 | } |
514 | 516 | ||
@@ -521,6 +523,8 @@ static void xenvif_rx_action(struct xenvif *vif) | |||
521 | 523 | ||
522 | BUG_ON(npo.meta_prod > ARRAY_SIZE(vif->meta)); | 524 | BUG_ON(npo.meta_prod > ARRAY_SIZE(vif->meta)); |
523 | 525 | ||
526 | vif->rx_queue_stopped = !npo.copy_prod && ring_full; | ||
527 | |||
524 | if (!npo.copy_prod) | 528 | if (!npo.copy_prod) |
525 | goto done; | 529 | goto done; |
526 | 530 | ||
@@ -592,8 +596,7 @@ static void xenvif_rx_action(struct xenvif *vif) | |||
592 | 596 | ||
593 | RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&vif->rx, ret); | 597 | RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&vif->rx, ret); |
594 | 598 | ||
595 | if (ret) | 599 | need_to_notify |= !!ret; |
596 | need_to_notify = 1; | ||
597 | 600 | ||
598 | npo.meta_cons += sco->meta_slots_used; | 601 | npo.meta_cons += sco->meta_slots_used; |
599 | dev_kfree_skb(skb); | 602 | dev_kfree_skb(skb); |
@@ -1724,7 +1727,8 @@ static struct xen_netif_rx_response *make_rx_response(struct xenvif *vif, | |||
1724 | 1727 | ||
1725 | static inline int rx_work_todo(struct xenvif *vif) | 1728 | static inline int rx_work_todo(struct xenvif *vif) |
1726 | { | 1729 | { |
1727 | return !skb_queue_empty(&vif->rx_queue) || vif->rx_event; | 1730 | return (!skb_queue_empty(&vif->rx_queue) && !vif->rx_queue_stopped) || |
1731 | vif->rx_event; | ||
1728 | } | 1732 | } |
1729 | 1733 | ||
1730 | static inline int tx_work_todo(struct xenvif *vif) | 1734 | static inline int tx_work_todo(struct xenvif *vif) |