From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices
Date: Sat, 27 May 2017 16:13:58 +0300 [thread overview]
Message-ID: <CAHp75Ve=CJ-ZRmaAFX+tezMJ4u11v=ptrDDORF485f3_iFEWeg@mail.gmail.com> (raw)
In-Reply-To: <dc0eaa024838f4ef34913aed63315771ac81dcc1.1495814872.git.jan.kiszka@siemens.com>
On Fri, May 26, 2017 at 7:07 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Make stmmac_default_data compatible with stmmac_pci_info.setup and use
> an info structure for all devices. This allows to make the probing more
> regular.
> +#define STMMAC_DEVICE(vendor_id, dev_id, info) { \
> + PCI_DEVICE(vendor_id, dev_id), \
Perhaps
#define STMMAC_DEVICE(_vid, _did, info) { \
PCI_DEVICE(PCI_VENDOR_ID_##_vid, _did), \
Or converting defines first to PCI_DEVICE_ID_*
and
#define STMMAC_DEVICE(_vid, _did, info) { \
PCI_DEVICE(PCI_VENDOR_ID_##_vid, PCI_DEVICE_ID_##_did),
\
which I like even better.
> + .driver_data = (kernel_ulong_t)&info \
> + }
> +
> static const struct pci_device_id stmmac_id_table[] = {
> - {PCI_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID)},
> - {PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC)},
> - {PCI_VDEVICE(INTEL, STMMAC_QUARK_ID), (kernel_ulong_t)&quark_pci_info},
> + STMMAC_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID, stmmac_pci_info),
> + STMMAC_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC,
> + stmmac_pci_info),
> + STMMAC_DEVICE(PCI_VENDOR_ID_INTEL, STMMAC_QUARK_ID, quark_pci_info),
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2017-05-27 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 16:07 [PATCH v2 0/6] stmmac: pci: Refactor DMI probing Jan Kiszka
2017-05-26 16:07 ` [PATCH v2 1/6] stmmac: pci: Make stmmac_pci_info structure constant Jan Kiszka
2017-05-26 16:07 ` [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices Jan Kiszka
2017-05-27 13:13 ` Andy Shevchenko [this message]
2017-05-27 13:16 ` Andy Shevchenko
2017-05-26 16:07 ` [PATCH v2 3/6] stmmac: pci: Make stmmac_pci_find_phy_addr truly generic Jan Kiszka
2017-05-27 13:25 ` Andy Shevchenko
2017-05-26 16:07 ` [PATCH v2 4/6] stmmac: pci: Select quark_pci_dmi_data from quark_default_data Jan Kiszka
2017-05-26 16:07 ` [PATCH v2 5/6] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses Jan Kiszka
2017-05-27 13:28 ` Andy Shevchenko
2017-05-28 16:52 ` Jan Kiszka
2017-05-26 16:07 ` [PATCH v2 6/6] stmmac: pci: Remove setup handler indirection via stmmac_pci_info Jan Kiszka
2017-05-27 13:38 ` Andy Shevchenko
2017-05-28 16:52 ` Jan Kiszka
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='CAHp75Ve=CJ-ZRmaAFX+tezMJ4u11v=ptrDDORF485f3_iFEWeg@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).