From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Ferruh Yigit'" <ferruh.yigit@intel.com>, <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/5] net/txgbe: update device ID
Date: Wed, 10 Mar 2021 15:58:44 +0800 [thread overview]
Message-ID: <007801d71583$318c8230$94a58690$@trustnetic.com> (raw)
In-Reply-To: <c7ba400a-268f-3611-a84d-f86043fe16c9@intel.com>
On Tuesday, March 9, 2021 10:25 PM, Ferruh Yigit wrote:
> On 3/5/2021 11:23 AM, Jiawen Wu wrote:
> > For more different devices, update device ID and subsystem id.
> >
> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> > ---
> > drivers/net/txgbe/base/txgbe_devids.h | 44 ++++++++++++++-------
> > drivers/net/txgbe/base/txgbe_hw.c | 55 ++++++++++++---------------
> > drivers/net/txgbe/base/txgbe_phy.c | 40 +++++++++++--------
> > drivers/net/txgbe/txgbe_ethdev.c | 4 +-
> > drivers/net/txgbe/txgbe_ethdev_vf.c | 4 +-
> > 5 files changed, 84 insertions(+), 63 deletions(-)
> >
> > diff --git a/drivers/net/txgbe/base/txgbe_devids.h
> > b/drivers/net/txgbe/base/txgbe_devids.h
> > index 744f2f3b5..cb186170e 100644
> > --- a/drivers/net/txgbe/base/txgbe_devids.h
> > +++ b/drivers/net/txgbe/base/txgbe_devids.h
> > @@ -15,22 +15,40 @@
> > /*
> > * Device IDs
> > */
> > -#define TXGBE_DEV_ID_RAPTOR_VF 0x1000
> > -#define TXGBE_DEV_ID_RAPTOR_SFP 0x1001 /* fiber */
> > -#define TXGBE_DEV_ID_RAPTOR_KR_KX_KX4 0x1002 /*
> backplane */
> > -#define TXGBE_DEV_ID_RAPTOR_XAUI 0x1003 /* copper
> */
> > -#define TXGBE_DEV_ID_RAPTOR_SGMII 0x1004 /* copper
> */
> > -#define TXGBE_DEV_ID_RAPTOR_QSFP 0x1011 /* fiber */
> > -#define TXGBE_DEV_ID_RAPTOR_VF_HV 0x2000
> > -#define TXGBE_DEV_ID_RAPTOR_T3_LOM 0x2001
> > -
> > -#define TXGBE_DEV_ID_WX1820_SFP 0x2001
> > +#define TXGBE_DEV_ID_SP1000 0x1001
> > +#define TXGBE_DEV_ID_WX1820 0x2001
> > +#define TXGBE_DEV_ID_SP1000_VF 0x1000
> > +#define TXGBE_DEV_ID_WX1820_VF 0x2000
> >
> > /*
> > - * Subdevice IDs
> > + * Subsystem IDs
> > */
> > -#define TXGBE_SUBDEV_ID_RAPTOR 0x0000
> > -#define TXGBE_SUBDEV_ID_MPW 0x0001
> > +/* SFP */
> > +#define TXGBE_DEV_ID_SP1000_SFP 0x0000
> > +#define TXGBE_DEV_ID_WX1820_SFP 0x2000
> > +#define TXGBE_DEV_ID_SFP 0x00
>
> Just for double check, is id '0x0000' valid, from the overall SP/WX logic it looks
> like it should be '0x1000'.
>
It does have '0x0000' as its subsystem id, by the firmware defined.
> > +/* copper */
> > +#define TXGBE_DEV_ID_SP1000_XAUI 0x1010
> > +#define TXGBE_DEV_ID_WX1820_XAUI 0x2010
> > +#define TXGBE_DEV_ID_XAUI 0x10
> > +#define TXGBE_DEV_ID_SP1000_SGMII 0x1020
> > +#define TXGBE_DEV_ID_WX1820_SGMII 0x2020
> > +#define TXGBE_DEV_ID_SGMII 0x20
> > +/* backplane */
> > +#define TXGBE_DEV_ID_SP1000_KR_KX_KX4 0x1030
> > +#define TXGBE_DEV_ID_WX1820_KR_KX_KX4 0x2030
> > +#define TXGBE_DEV_ID_KR_KX_KX4 0x30
> > +/* MAC Interface */
> > +#define TXGBE_DEV_ID_SP1000_MAC_XAUI 0x1040
> > +#define TXGBE_DEV_ID_WX1820_MAC_XAUI 0x2040
> > +#define TXGBE_DEV_ID_MAC_XAUI 0x40
> > +#define TXGBE_DEV_ID_SP1000_MAC_SGMII 0x1060
> > +#define TXGBE_DEV_ID_WX1820_MAC_SGMII 0x2060
> > +#define TXGBE_DEV_ID_MAC_SGMII 0x60
> > +/* combined interface*/
> > +#define TXGBE_DEV_ID_SFI_XAUI 0x50
> > +/* fiber qsfp*/
> > +#define TXGBE_DEV_ID_QSFP 0x11
> >
> > #define TXGBE_ETHERTYPE_FLOW_CTRL 0x8808
> > #define TXGBE_ETHERTYPE_IEEE_VLAN 0x8100 /* 802.1q protocol */
> > diff --git a/drivers/net/txgbe/base/txgbe_hw.c
> > b/drivers/net/txgbe/base/txgbe_hw.c
> > index 3cee8b857..7a3e9510c 100644
> > --- a/drivers/net/txgbe/base/txgbe_hw.c
> > +++ b/drivers/net/txgbe/base/txgbe_hw.c
> > @@ -60,9 +60,9 @@ bool txgbe_device_supports_autoneg_fc(struct
> txgbe_hw *hw)
> > break;
> > case txgbe_media_type_copper:
> > /* only some copper devices support flow control autoneg */
> > - switch (hw->device_id) {
> > - case TXGBE_DEV_ID_RAPTOR_XAUI:
> > - case TXGBE_DEV_ID_RAPTOR_SGMII:
> > + switch (hw->device_id & 0xFF) {
> > + case TXGBE_DEV_ID_XAUI:
> > + case TXGBE_DEV_ID_SGMII:
>
> Should this be "hw->subsystem_device_id & 0xFF", instead of 'hw->device_id'
> as has been a few below instances? If the 'hw->device_id' is the pci device id,
> the 'hw->device_id & 0xFF' can be 0 or 1, both don't match the cases in the
> switch.
Thanks for the review, it really should be 'hw->subsystem_device_id & 0xFF'.
next prev parent reply other threads:[~2021-03-10 7:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 11:23 [dpdk-dev] [PATCH 0/5] txgbe backplane AN training Jiawen Wu
2021-03-05 11:23 ` [dpdk-dev] [PATCH 1/5] net/txgbe: update device ID Jiawen Wu
2021-03-09 14:25 ` Ferruh Yigit
2021-03-10 7:58 ` Jiawen Wu [this message]
2021-03-05 11:23 ` [dpdk-dev] [PATCH 2/5] net/txgbe: update link setup process of backplane NICs Jiawen Wu
2021-03-09 14:32 ` Ferruh Yigit
2021-03-10 8:31 ` Jiawen Wu
2021-03-05 11:23 ` [dpdk-dev] [PATCH 3/5] net/txgbe/base: support to handle backplane AN73 flow Jiawen Wu
2021-03-05 11:23 ` [dpdk-dev] [PATCH 4/5] net/txgbe: handle AN interrupt and link update Jiawen Wu
2021-03-05 11:23 ` [dpdk-dev] [PATCH 5/5] net/txgbe: add FFE parameters for user debugging Jiawen Wu
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='007801d71583$318c8230$94a58690$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/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.