get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1167055/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1167055,
    "url": "http://patchwork.ozlabs.org/api/patches/1167055/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190925085853.1080-1-sasha.neftin@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20190925085853.1080-1-sasha.neftin@intel.com>",
    "list_archive_url": null,
    "date": "2019-09-25T08:58:53",
    "name": "[v2] igc: Add set_rx_mode support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1ece7eecdfdb05a6992aa62683e3a2167f9093b7",
    "submitter": {
        "id": 69860,
        "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api",
        "name": "Sasha Neftin",
        "email": "sasha.neftin@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190925085853.1080-1-sasha.neftin@intel.com/mbox/",
    "series": [
        {
            "id": 132470,
            "url": "http://patchwork.ozlabs.org/api/series/132470/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=132470",
            "date": "2019-09-25T08:58:53",
            "name": "[v2] igc: Add set_rx_mode support",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/132470/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1167055/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1167055/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 46dX6Z6D7cz9sPK\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 25 Sep 2019 18:59:02 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7811885F0E;\n\tWed, 25 Sep 2019 08:59:00 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id sZI9BS4n3AKj; Wed, 25 Sep 2019 08:58:58 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BE6A985DFD;\n\tWed, 25 Sep 2019 08:58:58 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 406CE1BF3EC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Sep 2019 08:58:57 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3AB092001D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Sep 2019 08:58:57 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 5m1fwf60Q2UM for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Sep 2019 08:58:55 +0000 (UTC)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby silver.osuosl.org (Postfix) with ESMTPS id D555920014\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Sep 2019 08:58:55 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Sep 2019 01:58:55 -0700",
            "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2019 01:58:54 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,547,1559545200\"; d=\"scan'208\";a=\"195948517\"",
        "From": "Sasha Neftin <sasha.neftin@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 25 Sep 2019 11:58:53 +0300",
        "Message-Id": "<20190925085853.1080-1-sasha.neftin@intel.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[Intel-wired-lan] [PATCH v2] igc: Add set_rx_mode support",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Add multicast addresses list to the MTA table.\nImplement basic rx mode support.\nAdd option for ipv6 address settings.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_defines.h |   3 +\n drivers/net/ethernet/intel/igc/igc_hw.h      |   1 +\n drivers/net/ethernet/intel/igc/igc_mac.c     | 104 +++++++++++++++\n drivers/net/ethernet/intel/igc/igc_mac.h     |   2 +\n drivers/net/ethernet/intel/igc/igc_main.c    | 181 +++++++++++++++++++++++++++\n 5 files changed, 291 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h\nindex f3f2325fe567..03f1aca3f57f 100644\n--- a/drivers/net/ethernet/intel/igc/igc_defines.h\n+++ b/drivers/net/ethernet/intel/igc/igc_defines.h\n@@ -402,4 +402,7 @@\n #define IGC_ADVTXD_TUCMD_L4T_TCP\t0x00000800  /* L4 Packet Type of TCP */\n #define IGC_ADVTXD_TUCMD_L4T_SCTP\t0x00001000 /* L4 packet TYPE of SCTP */\n \n+/* Maximum size of the MTA register table in all supported adapters */\n+#define MAX_MTA_REG\t\t\t128\n+\n #endif /* _IGC_DEFINES_H_ */\ndiff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h\nindex abb2d72911ff..20f710645746 100644\n--- a/drivers/net/ethernet/intel/igc/igc_hw.h\n+++ b/drivers/net/ethernet/intel/igc/igc_hw.h\n@@ -91,6 +91,7 @@ struct igc_mac_info {\n \tu16 mta_reg_count;\n \tu16 uta_reg_count;\n \n+\tu32 mta_shadow[MAX_MTA_REG];\n \tu16 rar_entry_count;\n \n \tu8 forced_speed_duplex;\ndiff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c\nindex 5eeb4c8caf4a..9483871e11e8 100644\n--- a/drivers/net/ethernet/intel/igc/igc_mac.c\n+++ b/drivers/net/ethernet/intel/igc/igc_mac.c\n@@ -784,3 +784,107 @@ bool igc_enable_mng_pass_thru(struct igc_hw *hw)\n out:\n \treturn ret_val;\n }\n+\n+/**\n+ *  igc_hash_mc_addr - Generate a multicast hash value\n+ *  @hw: pointer to the HW structure\n+ *  @mc_addr: pointer to a multicast address\n+ *\n+ *  Generates a multicast address hash value which is used to determine\n+ *  the multicast filter table array address and new table value.  See\n+ *  igc_mta_set()\n+ **/\n+static u32 igc_hash_mc_addr(struct igc_hw *hw, u8 *mc_addr)\n+{\n+\tu32 hash_value, hash_mask;\n+\tu8 bit_shift = 0;\n+\n+\t/* Register count multiplied by bits per register */\n+\thash_mask = (hw->mac.mta_reg_count * 32) - 1;\n+\n+\t/* For a mc_filter_type of 0, bit_shift is the number of left-shifts\n+\t * where 0xFF would still fall within the hash mask.\n+\t */\n+\twhile (hash_mask >> bit_shift != 0xFF)\n+\t\tbit_shift++;\n+\n+\t/* The portion of the address that is used for the hash table\n+\t * is determined by the mc_filter_type setting.\n+\t * The algorithm is such that there is a total of 8 bits of shifting.\n+\t * The bit_shift for a mc_filter_type of 0 represents the number of\n+\t * left-shifts where the MSB of mc_addr[5] would still fall within\n+\t * the hash_mask.  Case 0 does this exactly.  Since there are a total\n+\t * of 8 bits of shifting, then mc_addr[4] will shift right the\n+\t * remaining number of bits. Thus 8 - bit_shift.  The rest of the\n+\t * cases are a variation of this algorithm...essentially raising the\n+\t * number of bits to shift mc_addr[5] left, while still keeping the\n+\t * 8-bit shifting total.\n+\t *\n+\t * For example, given the following Destination MAC Address and an\n+\t * mta register count of 128 (thus a 4096-bit vector and 0xFFF mask),\n+\t * we can see that the bit_shift for case 0 is 4.  These are the hash\n+\t * values resulting from each mc_filter_type...\n+\t * [0] [1] [2] [3] [4] [5]\n+\t * 01  AA  00  12  34  56\n+\t * LSB                 MSB\n+\t *\n+\t * case 0: hash_value = ((0x34 >> 4) | (0x56 << 4)) & 0xFFF = 0x563\n+\t * case 1: hash_value = ((0x34 >> 3) | (0x56 << 5)) & 0xFFF = 0xAC6\n+\t * case 2: hash_value = ((0x34 >> 2) | (0x56 << 6)) & 0xFFF = 0x163\n+\t * case 3: hash_value = ((0x34 >> 0) | (0x56 << 8)) & 0xFFF = 0x634\n+\t */\n+\tswitch (hw->mac.mc_filter_type) {\n+\tdefault:\n+\tcase 0:\n+\t\tbreak;\n+\tcase 1:\n+\t\tbit_shift += 1;\n+\t\tbreak;\n+\tcase 2:\n+\t\tbit_shift += 2;\n+\t\tbreak;\n+\tcase 3:\n+\t\tbit_shift += 4;\n+\t\tbreak;\n+\t}\n+\n+\thash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) |\n+\t\t\t\t  (((u16)mc_addr[5]) << bit_shift)));\n+\n+\treturn hash_value;\n+}\n+\n+/**\n+ *  igc_update_mc_addr_list - Update Multicast addresses\n+ *  @hw: pointer to the HW structure\n+ *  @mc_addr_list: array of multicast addresses to program\n+ *  @mc_addr_count: number of multicast addresses to program\n+ *\n+ *  Updates entire Multicast Table Array.\n+ *  The caller must have a packed mc_addr_list of multicast addresses.\n+ **/\n+void igc_update_mc_addr_list(struct igc_hw *hw,\n+\t\t\t     u8 *mc_addr_list, u32 mc_addr_count)\n+{\n+\tu32 hash_value, hash_bit, hash_reg;\n+\tint i;\n+\n+\t/* clear mta_shadow */\n+\tmemset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));\n+\n+\t/* update mta_shadow from mc_addr_list */\n+\tfor (i = 0; (u32)i < mc_addr_count; i++) {\n+\t\thash_value = igc_hash_mc_addr(hw, mc_addr_list);\n+\n+\t\thash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1);\n+\t\thash_bit = hash_value & 0x1F;\n+\n+\t\thw->mac.mta_shadow[hash_reg] |= BIT(hash_bit);\n+\t\tmc_addr_list += ETH_ALEN;\n+\t}\n+\n+\t/* replace the entire MTA table */\n+\tfor (i = hw->mac.mta_reg_count - 1; i >= 0; i--)\n+\t\tarray_wr32(IGC_MTA, i, hw->mac.mta_shadow[i]);\n+\twrfl();\n+}\ndiff --git a/drivers/net/ethernet/intel/igc/igc_mac.h b/drivers/net/ethernet/intel/igc/igc_mac.h\nindex 782bc995badc..832cccec87cd 100644\n--- a/drivers/net/ethernet/intel/igc/igc_mac.h\n+++ b/drivers/net/ethernet/intel/igc/igc_mac.h\n@@ -29,6 +29,8 @@ s32 igc_get_speed_and_duplex_copper(struct igc_hw *hw, u16 *speed,\n \t\t\t\t    u16 *duplex);\n \n bool igc_enable_mng_pass_thru(struct igc_hw *hw);\n+void igc_update_mc_addr_list(struct igc_hw *hw,\n+\t\t\t     u8 *mc_addr_list, u32 mc_addr_count);\n \n enum igc_mng_mode {\n \tigc_mng_mode_none = 0,\ndiff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex 12a030343ed7..a861fc038721 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -795,6 +795,44 @@ static int igc_set_mac(struct net_device *netdev, void *p)\n \treturn 0;\n }\n \n+/**\n+ *  igc_write_mc_addr_list - write multicast addresses to MTA\n+ *  @netdev: network interface device structure\n+ *\n+ *  Writes multicast address list to the MTA hash table.\n+ *  Returns: -ENOMEM on failure\n+ *           0 on no addresses written\n+ *           X on writing X addresses to MTA\n+ **/\n+static int igc_write_mc_addr_list(struct net_device *netdev)\n+{\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tstruct netdev_hw_addr *ha;\n+\tu8  *mta_list;\n+\tint i;\n+\n+\tif (netdev_mc_empty(netdev)) {\n+\t\t/* nothing to program, so clear mc list */\n+\t\tigc_update_mc_addr_list(hw, NULL, 0);\n+\t\treturn 0;\n+\t}\n+\n+\tmta_list = kcalloc(netdev_mc_count(netdev), 6, GFP_ATOMIC);\n+\tif (!mta_list)\n+\t\treturn -ENOMEM;\n+\n+\t/* The shared function expects a packed array of only addresses. */\n+\ti = 0;\n+\tnetdev_for_each_mc_addr(ha, netdev)\n+\t\tmemcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN);\n+\n+\tigc_update_mc_addr_list(hw, mta_list, i);\n+\tkfree(mta_list);\n+\n+\treturn netdev_mc_count(netdev);\n+}\n+\n static void igc_tx_ctxtdesc(struct igc_ring *tx_ring,\n \t\t\t    struct igc_tx_buffer *first,\n \t\t\t    u32 vlan_macip_lens, u32 type_tucmd,\n@@ -2518,6 +2556,110 @@ int igc_del_mac_steering_filter(struct igc_adapter *adapter,\n \t\t\t\t\tIGC_MAC_STATE_QUEUE_STEERING | flags);\n }\n \n+/* Add a MAC filter for 'addr' directing matching traffic to 'queue',\n+ * 'flags' is used to indicate what kind of match is made, match is by\n+ * default for the destination address, if matching by source address\n+ * is desired the flag IGC_MAC_STATE_SRC_ADDR can be used.\n+ */\n+static int igc_add_mac_filter(struct igc_adapter *adapter,\n+\t\t\t      const u8 *addr, const u8 queue)\n+{\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tint rar_entries = hw->mac.rar_entry_count;\n+\tint i;\n+\n+\tif (is_zero_ether_addr(addr))\n+\t\treturn -EINVAL;\n+\n+\t/* Search for the first empty entry in the MAC table.\n+\t * Do not touch entries at the end of the table reserved for the VF MAC\n+\t * addresses.\n+\t */\n+\tfor (i = 0; i < rar_entries; i++) {\n+\t\tif (!igc_mac_entry_can_be_used(&adapter->mac_table[i],\n+\t\t\t\t\t       addr, 0))\n+\t\t\tcontinue;\n+\n+\t\tether_addr_copy(adapter->mac_table[i].addr, addr);\n+\t\tadapter->mac_table[i].queue = queue;\n+\t\tadapter->mac_table[i].state |= IGC_MAC_STATE_IN_USE;\n+\n+\t\tigc_rar_set_index(adapter, i);\n+\t\treturn i;\n+\t}\n+\n+\treturn -ENOSPC;\n+}\n+\n+/* Remove a MAC filter for 'addr' directing matching traffic to\n+ * 'queue', 'flags' is used to indicate what kind of match need to be\n+ * removed, match is by default for the destination address, if\n+ * matching by source address is to be removed the flag\n+ * IGC_MAC_STATE_SRC_ADDR can be used.\n+ */\n+static int igc_del_mac_filter(struct igc_adapter *adapter,\n+\t\t\t      const u8 *addr, const u8 queue)\n+{\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tint rar_entries = hw->mac.rar_entry_count;\n+\tint i;\n+\n+\tif (is_zero_ether_addr(addr))\n+\t\treturn -EINVAL;\n+\n+\t/* Search for matching entry in the MAC table based on given address\n+\t * and queue. Do not touch entries at the end of the table reserved\n+\t * for the VF MAC addresses.\n+\t */\n+\tfor (i = 0; i < rar_entries; i++) {\n+\t\tif (!(adapter->mac_table[i].state & IGC_MAC_STATE_IN_USE))\n+\t\t\tcontinue;\n+\t\tif (adapter->mac_table[i].state != 0)\n+\t\t\tcontinue;\n+\t\tif (adapter->mac_table[i].queue != queue)\n+\t\t\tcontinue;\n+\t\tif (!ether_addr_equal(adapter->mac_table[i].addr, addr))\n+\t\t\tcontinue;\n+\n+\t\t/* When a filter for the default address is \"deleted\",\n+\t\t * we return it to its initial configuration\n+\t\t */\n+\t\tif (adapter->mac_table[i].state & IGC_MAC_STATE_DEFAULT) {\n+\t\t\tadapter->mac_table[i].state =\n+\t\t\t\tIGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE;\n+\t\t\tadapter->mac_table[i].queue = 0;\n+\t\t} else {\n+\t\t\tadapter->mac_table[i].state = 0;\n+\t\t\tadapter->mac_table[i].queue = 0;\n+\t\t\tmemset(adapter->mac_table[i].addr, 0, ETH_ALEN);\n+\t\t}\n+\n+\t\tigc_rar_set_index(adapter, i);\n+\t\treturn 0;\n+\t}\n+\n+\treturn -ENOENT;\n+}\n+\n+static int igc_uc_sync(struct net_device *netdev, const unsigned char *addr)\n+{\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tint ret;\n+\n+\tret = igc_add_mac_filter(adapter, addr, adapter->num_rx_queues);\n+\n+\treturn min_t(int, ret, 0);\n+}\n+\n+static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr)\n+{\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\n+\tigc_del_mac_filter(adapter, addr, adapter->num_rx_queues);\n+\n+\treturn 0;\n+}\n+\n /**\n  * igc_set_rx_mode - Secondary Unicast, Multicast and Promiscuous mode set\n  * @netdev: network interface device structure\n@@ -2529,6 +2671,44 @@ int igc_del_mac_steering_filter(struct igc_adapter *adapter,\n  */\n static void igc_set_rx_mode(struct net_device *netdev)\n {\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tu32 rctl = 0, rlpml = MAX_JUMBO_FRAME_SIZE;\n+\tint count;\n+\n+\t/* Check for Promiscuous and All Multicast modes */\n+\tif (netdev->flags & IFF_PROMISC) {\n+\t\trctl |= IGC_RCTL_UPE | IGC_RCTL_MPE;\n+\t} else {\n+\t\tif (netdev->flags & IFF_ALLMULTI) {\n+\t\t\trctl |= IGC_RCTL_MPE;\n+\t\t} else {\n+\t\t\t/* Write addresses to the MTA, if the attempt fails\n+\t\t\t * then we should just turn on promiscuous mode so\n+\t\t\t * that we can at least receive multicast traffic\n+\t\t\t */\n+\t\t\tcount = igc_write_mc_addr_list(netdev);\n+\t\t\tif (count < 0)\n+\t\t\t\trctl |= IGC_RCTL_MPE;\n+\t\t}\n+\t}\n+\n+\t/* Write addresses to available RAR registers, if there is not\n+\t * sufficient space to store all the addresses then enable\n+\t * unicast promiscuous mode\n+\t */\n+\tif (__dev_uc_sync(netdev, igc_uc_sync, igc_uc_unsync))\n+\t\trctl |= IGC_RCTL_UPE;\n+\n+\t/* update state of unicast and multicast */\n+\trctl |= rd32(IGC_RCTL) & ~(IGC_RCTL_UPE | IGC_RCTL_MPE);\n+\twr32(IGC_RCTL, rctl);\n+\n+#if (PAGE_SIZE < 8192)\n+\tif (adapter->max_frame_size <= IGC_MAX_FRAME_BUILD_SKB)\n+\t\trlpml = IGC_MAX_FRAME_BUILD_SKB;\n+#endif\n+\twr32(IGC_RLPML, rlpml);\n }\n \n /**\n@@ -3982,6 +4162,7 @@ static const struct net_device_ops igc_netdev_ops = {\n \t.ndo_open\t\t= igc_open,\n \t.ndo_stop\t\t= igc_close,\n \t.ndo_start_xmit\t\t= igc_xmit_frame,\n+\t.ndo_set_rx_mode\t= igc_set_rx_mode,\n \t.ndo_set_mac_address\t= igc_set_mac,\n \t.ndo_change_mtu\t\t= igc_change_mtu,\n \t.ndo_get_stats\t\t= igc_get_stats,\n",
    "prefixes": [
        "v2"
    ]
}