All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
To: David Miller <davem@davemloft.net>
Cc: "peppe.cavallaro@st.com" <peppe.cavallaro@st.com>,
	"rayagond@vayavyalabs.com" <rayagond@vayavyalabs.com>,
	"vbridgers2013@gmail.com" <vbridgers2013@gmail.com>,
	"srinivas.kandagatla@st.com" <srinivas.kandagatla@st.com>,
	"wens@csie.org" <wens@csie.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>
Subject: RE: [PATCH v2 3/4] net: stmmac: add support for Intel Quark X1000
Date: Mon, 15 Sep 2014 12:42:03 +0000	[thread overview]
Message-ID: <F54AEECA5E2B9541821D670476DAE19C2B7E99A7@PGSMSX102.gar.corp.intel.com> (raw)
In-Reply-To: <20140912.181423.1831537443587796533.davem@davemloft.net>

> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Saturday, September 13, 2014 6:14 AM
> From: Kweh Hock Leong <hock.leong.kweh@intel.com>
> Date: Thu, 11 Sep 2014 16:38:39 +0800
> 
> > +		if ((!strcmp(quark_x1000_phy_info[i].board_name,
> board_name)) &&
> > +		    quark_x1000_phy_info[i].pci_func_num == func_num)
> 
> It is entirely erroneous to identify a device by it's _PHYSICAL_ geographic
> location on the PCI bus.
> 
> Please get rid of this PCI function number comparison and if necessary find
> another means of identification.

Hi David,

Here is some background of this work. Intel Quark X1000 has 2 stmmac Ethernet IP
built in the SoC. They both are using the same PCI DEVICE ID number. The only things 
to differentiate them is PCI BUS DEVICE FUNCTION (Bus:Dev:Func) number which are
fix numbers 00:20:6 for port 1 and 00:20:7 for port 2 stated in Quark X1000 datasheet.
(https://communities.intel.com/docs/DOC-23092 page 44 & 97)

When I was looking into making the code to upstream, I do think about is there a better
identification way to do it? But, my mind still brought me back to this PCI FUNC number.

So, i would like to understand the concern of using PCI FUNC number and also would like
to see is there any advices, suggestion or pointer to deal with the scenario here.

Appreciate to the comments sharing. Thanks.


Regards,
Wilson

  reply	other threads:[~2014-09-15 12:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  8:38 [PATCH v2 0/4] net: stmmac: Enable Intel Quark SoC X1000 Ethernet support Kweh Hock Leong
2014-09-11  8:38 ` [PATCH v2 1/4] net: stmmac: enhance to support multiple device instances Kweh Hock Leong
2014-09-11  8:38 ` [PATCH v2 2/4] net: stmmac: better code manageability with platform data struct Kweh Hock Leong
2014-09-11  8:38 ` [PATCH v2 3/4] net: stmmac: add support for Intel Quark X1000 Kweh Hock Leong
2014-09-12 22:14   ` David Miller
2014-09-15 12:42     ` Kweh, Hock Leong [this message]
2014-09-16 19:00       ` David Miller
2014-09-17  2:41         ` Kweh, Hock Leong
2014-09-17  4:55           ` David Miller
2014-09-17  9:11             ` Kweh, Hock Leong
2014-09-17 15:57               ` David Miller
2014-09-11  8:38 ` [PATCH v2 4/4] net: stmmac: add MSI " Kweh Hock Leong
2014-10-01 11:06 [PATCH v2 3/4] net: stmmac: add " Kweh, Hock Leong

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=F54AEECA5E2B9541821D670476DAE19C2B7E99A7@PGSMSX102.gar.corp.intel.com \
    --to=hock.leong.kweh@intel.com \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=rayagond@vayavyalabs.com \
    --cc=srinivas.kandagatla@st.com \
    --cc=vbridgers2013@gmail.com \
    --cc=wens@csie.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.