diff for duplicates of <1457012385.13244.243.camel@linux.intel.com> diff --git a/a/1.txt b/N1/1.txt index 26db2e0..d0b3b5a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -7,31 +7,31 @@ Few style related comments. > @@ -686,6 +690,10 @@ static int hns_ae_config_loopback(struct > hnae_handle *handle, -> ? default: -> ? ret = -EINVAL; -> ? } +> default: +> ret = -EINVAL; +> } > + > + if (!ret) > + hns_dsaf_set_inner_lb(mac_cb->dsaf_dev, mac_cb- > >mac_id, en); > + -> ? return ret; +> return ret; if (ret) -?return ret; + return ret; whatever(); return 0; -> ?} +> } --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c > +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c > @@ -230,6 +230,30 @@ static void hns_dsaf_mix_def_qid_cfg(struct > dsaf_device *dsaf_dev) -> ? } -> ?} -> ? +> } +> } +> > +static void hns_dsaf_inner_qid_cfg(struct dsaf_device *dsaf_dev) > +{ > + u16 max_q_per_vf, max_vfn; @@ -42,8 +42,8 @@ return 0; > + return; > + > + hns_rcb_get_queue_mode(dsaf_dev->dsaf_mode, -> + ???????HNS_DSAF_COMM_SERVICE_NW_IDX, -> + ???????&max_vfn, &max_q_per_vf); +> + HNS_DSAF_COMM_SERVICE_NW_IDX, +> + &max_vfn, &max_q_per_vf); > + q_num_per_port = max_vfn * max_q_per_vf; > + > + for (mac_id = 0, q_id = 0; mac_id < DSAF_SERVICE_NW_NUM; @@ -52,21 +52,21 @@ q_id is already assigned to 0. Get rid of either. > mac_id++) { > + dsaf_set_dev_field(dsaf_dev, -> + ???DSAFV2_SERDES_LBK_0_REG + 0x4 * +> + DSAFV2_SERDES_LBK_0_REG + 0x4 * > mac_id, -> + ???DSAFV2_SERDES_LBK_QID_M, -> + ???DSAFV2_SERDES_LBK_QID_S, -> + ???q_id); +> + DSAFV2_SERDES_LBK_QID_M, +> + DSAFV2_SERDES_LBK_QID_S, +> + q_id); > + q_id += q_num_per_port; > + } > +} -? + > +void hns_dsaf_set_inner_lb(struct dsaf_device *dsaf_dev, u32 mac_id, > u32 en) > +{ > + if (AE_IS_VER1(dsaf_dev->dsaf_ver) || -> + ????dsaf_dev->mac_cb[mac_id].mac_type == HNAE_PORT_DEBUG) +> + dsaf_dev->mac_cb[mac_id].mac_type == HNAE_PORT_DEBUG) > + return; > + > + dsaf_set_dev_bit(dsaf_dev, DSAFV2_SERDES_LBK_0_REG + 0x4 * @@ -74,14 +74,14 @@ q_id is already assigned to 0. Get rid of either. 0x4 -> 4 (it's about register width, right?) -> + ?DSAFV2_SERDES_LBK_EN_B, !!en); +> + DSAFV2_SERDES_LBK_EN_B, !!en); > +} -> ?#define PPEV2_CFG_RSS_TBL_4N3_S 24 -> ?#define PPEV2_CFG_RSS_TBL_4N3_M (((1UL << 5) - 1) << +> #define PPEV2_CFG_RSS_TBL_4N3_S 24 +> #define PPEV2_CFG_RSS_TBL_4N3_M (((1UL << 5) - 1) << > PPEV2_CFG_RSS_TBL_4N3_S) -> ? -> +#define DSAFV2_SERDES_LBK_EN_B??8 +> +> +#define DSAFV2_SERDES_LBK_EN_B 8 > +#define DSAFV2_SERDES_LBK_QID_S 0 > +#define DSAFV2_SERDES_LBK_QID_M \ > + (((1UL << DSAFV2_SERDES_LBK_EN_B) - 1) << @@ -90,10 +90,10 @@ q_id is already assigned to 0. Get rid of either. Why not like above? #define DSAFV2_SERDES_LBK_QID_M (((1UL << 8) - 1) -<<?DSAFV2_SERDES_LBK_QID_S) +<< DSAFV2_SERDES_LBK_QID_S) > +static void __lb_fill_txt_skb_buff(struct net_device *ndev, -> + ???struct sk_buff *skb) +> + struct sk_buff *skb) > +{ > + struct hns_nic_priv *priv = netdev_priv(ndev); > + struct hnae_handle *h = priv->ae_handle; @@ -103,7 +103,7 @@ Why not like above? > + memset(skb->data, 0xFF, frame_size); > + > + if ((!AE_IS_VER1(priv->enet_ver)) && -> + ????(h->port_type == HNAE_PORT_SERVICE)) { +> + (h->port_type == HNAE_PORT_SERVICE)) { > + memcpy(skb->data, ndev->dev_addr, 6); ether_addr_copy() ? diff --git a/a/content_digest b/N1/content_digest index a541338..d4b1638 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,24 @@ "ref\01457006579-236479-1-git-send-email-yankejian@huawei.com\0" - "From\0andriy.shevchenko@linux.intel.com (Andy Shevchenko)\0" - "Subject\0[PATCH net] net: hns: fix the bug about loopback\0" + "From\0Andy Shevchenko <andriy.shevchenko@linux.intel.com>\0" + "Subject\0Re: [PATCH net] net: hns: fix the bug about loopback\0" "Date\0Thu, 03 Mar 2016 15:39:45 +0200\0" - "To\0linux-arm-kernel@lists.infradead.org\0" + "To\0Kejian Yan <yankejian@huawei.com>" + davem@davemloft.net + yisen.zhuang@huawei.com + salil.mehta@huawei.com + liguozhu@huawei.com + huangdaode@hisilicon.com + arnd@arndb.de + andrew@lunn.ch + chenny.xu@huawei.com + ivecera@redhat.com + lisheng011@huawei.com + " fengguang.wu@intel.com\0" + "Cc\0haifeng.wei@huawei.com" + netdev@vger.kernel.org + linux-kernel@vger.kernel.org + linux-arm-kernel@lists.infradead.org + " linuxarm@huawei.com\0" "\00:1\0" "b\0" "On Thu, 2016-03-03 at 20:02 +0800, Kejian Yan wrote:\n" @@ -14,31 +30,31 @@ "\n" "> @@ -686,6 +690,10 @@ static int hns_ae_config_loopback(struct\n" "> hnae_handle *handle,\n" - "> ?\tdefault:\n" - "> ?\t\tret = -EINVAL;\n" - "> ?\t}\n" + "> \302\240\tdefault:\n" + "> \302\240\t\tret = -EINVAL;\n" + "> \302\240\t}\n" "> +\n" "> +\tif (!ret)\n" "> +\t\thns_dsaf_set_inner_lb(mac_cb->dsaf_dev, mac_cb-\n" "> >mac_id, en);\n" "> +\n" - "> ?\treturn ret;\n" + "> \302\240\treturn ret;\n" "\n" "if (ret)\n" - "?return ret;\n" + "\302\240return ret;\n" "\n" "whatever();\n" "return 0;\n" "\n" - "> ?}\n" + "> \302\240}\n" "\n" "--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c\n" "> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c\n" "> @@ -230,6 +230,30 @@ static void hns_dsaf_mix_def_qid_cfg(struct\n" "> dsaf_device *dsaf_dev)\n" - "> ?\t}\n" - "> ?}\n" - "> ?\n" + "> \302\240\t}\n" + "> \302\240}\n" + "> \302\240\n" "> +static void hns_dsaf_inner_qid_cfg(struct dsaf_device *dsaf_dev)\n" "> +{\n" "> +\tu16 max_q_per_vf, max_vfn;\n" @@ -49,8 +65,8 @@ "> +\t\treturn;\n" "> +\n" "> +\thns_rcb_get_queue_mode(dsaf_dev->dsaf_mode,\n" - "> +\t\t\t???????HNS_DSAF_COMM_SERVICE_NW_IDX,\n" - "> +\t\t\t???????&max_vfn, &max_q_per_vf);\n" + "> +\t\t\t\302\240\302\240\302\240\302\240\302\240\302\240\302\240HNS_DSAF_COMM_SERVICE_NW_IDX,\n" + "> +\t\t\t\302\240\302\240\302\240\302\240\302\240\302\240\302\240&max_vfn, &max_q_per_vf);\n" "> +\tq_num_per_port = max_vfn * max_q_per_vf;\n" "> +\n" "> +\tfor (mac_id = 0, q_id = 0; mac_id < DSAF_SERVICE_NW_NUM; \n" @@ -59,21 +75,21 @@ "\n" "> mac_id++) {\n" "> +\t\tdsaf_set_dev_field(dsaf_dev,\n" - "> +\t\t\t\t???DSAFV2_SERDES_LBK_0_REG + 0x4 *\n" + "> +\t\t\t\t\302\240\302\240\302\240DSAFV2_SERDES_LBK_0_REG + 0x4 *\n" "> mac_id,\n" - "> +\t\t\t\t???DSAFV2_SERDES_LBK_QID_M,\n" - "> +\t\t\t\t???DSAFV2_SERDES_LBK_QID_S,\n" - "> +\t\t\t\t???q_id);\n" + "> +\t\t\t\t\302\240\302\240\302\240DSAFV2_SERDES_LBK_QID_M,\n" + "> +\t\t\t\t\302\240\302\240\302\240DSAFV2_SERDES_LBK_QID_S,\n" + "> +\t\t\t\t\302\240\302\240\302\240q_id);\n" "> +\t\tq_id += q_num_per_port;\n" "> +\t}\n" "> +}\n" "\n" - "?\n" + "\302\240\n" "> +void hns_dsaf_set_inner_lb(struct dsaf_device *dsaf_dev, u32 mac_id,\n" "> u32 en)\n" "> +{\n" "> +\tif (AE_IS_VER1(dsaf_dev->dsaf_ver) ||\n" - "> +\t????dsaf_dev->mac_cb[mac_id].mac_type == HNAE_PORT_DEBUG)\n" + "> +\t\302\240\302\240\302\240\302\240dsaf_dev->mac_cb[mac_id].mac_type == HNAE_PORT_DEBUG)\n" "> +\t\treturn;\n" "> +\n" "> +\tdsaf_set_dev_bit(dsaf_dev, DSAFV2_SERDES_LBK_0_REG + 0x4 *\n" @@ -81,14 +97,14 @@ "\n" "0x4 -> 4 (it's about register width, right?)\n" "\n" - "> +\t\t\t?DSAFV2_SERDES_LBK_EN_B, !!en);\n" + "> +\t\t\t\302\240DSAFV2_SERDES_LBK_EN_B, !!en);\n" "> +}\n" "\n" - "> ?#define PPEV2_CFG_RSS_TBL_4N3_S\t24\n" - "> ?#define PPEV2_CFG_RSS_TBL_4N3_M\t(((1UL << 5) - 1) <<\n" + "> \302\240#define PPEV2_CFG_RSS_TBL_4N3_S\t24\n" + "> \302\240#define PPEV2_CFG_RSS_TBL_4N3_M\t(((1UL << 5) - 1) <<\n" "> PPEV2_CFG_RSS_TBL_4N3_S)\n" - "> ?\n" - "> +#define DSAFV2_SERDES_LBK_EN_B??8\n" + "> \302\240\n" + "> +#define DSAFV2_SERDES_LBK_EN_B\302\240\302\2408\n" "> +#define DSAFV2_SERDES_LBK_QID_S 0\n" "> +#define DSAFV2_SERDES_LBK_QID_M \\\n" "> +\t(((1UL << DSAFV2_SERDES_LBK_EN_B) - 1) <<\n" @@ -97,10 +113,10 @@ "Why not like above?\n" "\n" "#define DSAFV2_SERDES_LBK_QID_M\t(((1UL << 8) - 1)\n" - "<<?DSAFV2_SERDES_LBK_QID_S)\n" + "<<\302\240DSAFV2_SERDES_LBK_QID_S)\n" "\n" "> +static void __lb_fill_txt_skb_buff(struct net_device *ndev,\n" - "> +\t\t\t\t???struct sk_buff *skb)\n" + "> +\t\t\t\t\302\240\302\240\302\240struct sk_buff *skb)\n" "> +{\n" "> +\tstruct hns_nic_priv *priv = netdev_priv(ndev);\n" "> +\tstruct hnae_handle *h = priv->ae_handle;\n" @@ -110,7 +126,7 @@ "> +\tmemset(skb->data, 0xFF, frame_size);\n" "> +\n" "> +\tif ((!AE_IS_VER1(priv->enet_ver)) &&\n" - "> +\t????(h->port_type == HNAE_PORT_SERVICE)) {\n" + "> +\t\302\240\302\240\302\240\302\240(h->port_type == HNAE_PORT_SERVICE)) {\n" "> +\t\tmemcpy(skb->data, ndev->dev_addr, 6);\n" "\n" "ether_addr_copy() ?\n" @@ -143,4 +159,4 @@ "Andy Shevchenko <andriy.shevchenko@linux.intel.com>\n" Intel Finland Oy -e999c2cc7347a32f5691b5e2c46da2d5337ea1cee065321ce03fd5cd42f16ffa +7210ba30f40bdf029c176fea81bc5e43004cedc4244695e213060541eeb3152c
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.