From: andriy.shevchenko@linux.intel.com (Andy Shevchenko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next] net: hns: add support of pause frame ctrl for HNS V2
Date: Wed, 30 Mar 2016 13:51:13 +0300 [thread overview]
Message-ID: <1459335073.5907.34.camel@linux.intel.com> (raw)
In-Reply-To: <1459235041-91766-1-git-send-email-Yisen.Zhuang@huawei.com>
On Tue, 2016-03-29 at 15:04 +0800, Yisen Zhuang wrote:
> From: Lisheng <lisheng011@huawei.com>
>
> The patch adds support of pause ctrl for HNS V2, and this feature is
> lost
> by HNS V1:
> ???????1) service ports can disable rx pause frame,
> ???????2) debug ports can open tx/rx pause frame.
>
> And this patch updates the REGs about the pause ctrl when updated
> status function called by upper layer routine.
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
>
> +void hns_dsaf_get_rx_mac_pause_en(struct dsaf_device *dsaf_dev, int
> mac_id,
> + ??u32 *en)
> +{
> + if (AE_IS_VER1(dsaf_dev->dsaf_ver))
> + *en = 1;
> ? else
> ? dsaf_write_dev(dsaf_dev, DSAF_PFC_EN_0_REG + mac_id
> * 4, 0xff);
> + *en = dsaf_get_dev_bit(dsaf_dev,
> + ???????DSAF_PAUSE_CFG_REG + mac_id *
> 4,
> + ???????DSAF_MAC_PAUSE_RX_EN_B);
And what the point of if branch then? I think it's an obvious misfix,
you must replace else to } else { and add }.
How did you test this part?
> ?}
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yisen Zhuang <Yisen.Zhuang@huawei.com>,
davem@davemloft.net, salil.mehta@huawei.com, liguozhu@huawei.com,
huangdaode@hisilicon.com, arnd@arndb.de, andrew@lunn.ch,
geliangtang@163.com, ivecera@redhat.com, lisheng011@huawei.com,
fengguang.wu@intel.com
Cc: charles.chenxin@huawei.com, haifeng.wei@huawei.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com
Subject: Re: [PATCH net-next] net: hns: add support of pause frame ctrl for HNS V2
Date: Wed, 30 Mar 2016 13:51:13 +0300 [thread overview]
Message-ID: <1459335073.5907.34.camel@linux.intel.com> (raw)
In-Reply-To: <1459235041-91766-1-git-send-email-Yisen.Zhuang@huawei.com>
On Tue, 2016-03-29 at 15:04 +0800, Yisen Zhuang wrote:
> From: Lisheng <lisheng011@huawei.com>
>
> The patch adds support of pause ctrl for HNS V2, and this feature is
> lost
> by HNS V1:
> 1) service ports can disable rx pause frame,
> 2) debug ports can open tx/rx pause frame.
>
> And this patch updates the REGs about the pause ctrl when updated
> status function called by upper layer routine.
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
>
> +void hns_dsaf_get_rx_mac_pause_en(struct dsaf_device *dsaf_dev, int
> mac_id,
> + u32 *en)
> +{
> + if (AE_IS_VER1(dsaf_dev->dsaf_ver))
> + *en = 1;
> else
> dsaf_write_dev(dsaf_dev, DSAF_PFC_EN_0_REG + mac_id
> * 4, 0xff);
> + *en = dsaf_get_dev_bit(dsaf_dev,
> + DSAF_PAUSE_CFG_REG + mac_id *
> 4,
> + DSAF_MAC_PAUSE_RX_EN_B);
And what the point of if branch then? I think it's an obvious misfix,
you must replace else to } else { and add }.
How did you test this part?
> }
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-03-30 10:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 7:04 [PATCH net-next] net: hns: add support of pause frame ctrl for HNS V2 Yisen Zhuang
2016-03-29 7:04 ` Yisen Zhuang
2016-03-30 10:51 ` Andy Shevchenko [this message]
2016-03-30 10:51 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459335073.5907.34.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.