From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/3] net: Add Keystone NetCP ethernet driver
Date: Mon, 29 Sep 2014 16:02:24 -0400 [thread overview]
Message-ID: <5429BAD0.1050101@ti.com> (raw)
In-Reply-To: <20140929.155200.2231132602322345812.davem@davemloft.net>
On Monday 29 September 2014 03:52 PM, David Miller wrote:
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Thu, 25 Sep 2014 13:48:36 -0400
>
>> +static inline int gbe_phy_link_status(struct gbe_slave *slave)
>> +{
>> + if (!slave->phy)
>> + return 1;
>> +
>> + if (slave->phy->link)
>> + return 1;
>> +
>> + return 0;
>> +}
>
> Please use 'bool' as the return type and return 'true' or 'false'.
>
ok
> Do not use 'inline' in foo.c files, let the compiler decide. Please
> audit this entire submission for this problem.
>
ok.
>> +static int gbe_port_reset(struct gbe_slave *slave)
>> +{
>> + u32 i, v;
>> +
>> + /* Set the soft reset bit */
>> + writel_relaxed(SOFT_RESET, GBE_REG_ADDR(slave, emac_regs, soft_reset));
>
> This driver seems to use relaxed readl and writel for almost everything.
>
> That absolutely cannot be right. For example, here, you depend upon the
> ordering of this writel_relaxed() to reset the chip relative to the
> real_relaxed() you subsequently do to check ths bits.
>
> I seriously think that *_relaxed() should only be done in very special
> circumstances where 1) the performance matters and 2) the validity of
> the usage has been put under a microscope and fully documented with huge
> comments above the *_relaxed() calls.
>
> If you cannot reduce and properly document the really necessary *_relaxed()
> uses, just convert them all to non-_relaxed() for now.
>
We can stick to non-*relaxed() versions. No problems here.
> I'm also warning you ahead of time that since nobody else seems to feel
> like reviewing this enormous submission, you are going to have to get used
> to me pushing back on these changes over and over for small things like
> coding style and structural/API issues until some reviews it on a higher
> level.
>
> I really don't want to apply this series until someone thinks seriously
> about the driver's design and the long term ramifications of having a
> driver like this in the tree with so many random TX etc. hooks.
>
The driver has been on the list. Jamal and you have given your comments,
suggestion and we have incorporated that. What else we can do ?
We are badly missing mainline network driver support for the Keystone
and hence I request you to help here.
regards,
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
sandeep_n-l0cyMroinI0@public.gmane.org,
joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH v5 2/3] net: Add Keystone NetCP ethernet driver
Date: Mon, 29 Sep 2014 16:02:24 -0400 [thread overview]
Message-ID: <5429BAD0.1050101@ti.com> (raw)
In-Reply-To: <20140929.155200.2231132602322345812.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Monday 29 September 2014 03:52 PM, David Miller wrote:
> From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> Date: Thu, 25 Sep 2014 13:48:36 -0400
>
>> +static inline int gbe_phy_link_status(struct gbe_slave *slave)
>> +{
>> + if (!slave->phy)
>> + return 1;
>> +
>> + if (slave->phy->link)
>> + return 1;
>> +
>> + return 0;
>> +}
>
> Please use 'bool' as the return type and return 'true' or 'false'.
>
ok
> Do not use 'inline' in foo.c files, let the compiler decide. Please
> audit this entire submission for this problem.
>
ok.
>> +static int gbe_port_reset(struct gbe_slave *slave)
>> +{
>> + u32 i, v;
>> +
>> + /* Set the soft reset bit */
>> + writel_relaxed(SOFT_RESET, GBE_REG_ADDR(slave, emac_regs, soft_reset));
>
> This driver seems to use relaxed readl and writel for almost everything.
>
> That absolutely cannot be right. For example, here, you depend upon the
> ordering of this writel_relaxed() to reset the chip relative to the
> real_relaxed() you subsequently do to check ths bits.
>
> I seriously think that *_relaxed() should only be done in very special
> circumstances where 1) the performance matters and 2) the validity of
> the usage has been put under a microscope and fully documented with huge
> comments above the *_relaxed() calls.
>
> If you cannot reduce and properly document the really necessary *_relaxed()
> uses, just convert them all to non-_relaxed() for now.
>
We can stick to non-*relaxed() versions. No problems here.
> I'm also warning you ahead of time that since nobody else seems to feel
> like reviewing this enormous submission, you are going to have to get used
> to me pushing back on these changes over and over for small things like
> coding style and structural/API issues until some reviews it on a higher
> level.
>
> I really don't want to apply this series until someone thinks seriously
> about the driver's design and the long term ramifications of having a
> driver like this in the tree with so many random TX etc. hooks.
>
The driver has been on the list. Jamal and you have given your comments,
suggestion and we have incorporated that. What else we can do ?
We are badly missing mainline network driver support for the Keystone
and hence I request you to help here.
regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <robh+dt@kernel.org>,
<grant.likely@linaro.org>, <devicetree@vger.kernel.org>,
<sandeep_n@ti.com>, <joe@perches.com>
Subject: Re: [PATCH v5 2/3] net: Add Keystone NetCP ethernet driver
Date: Mon, 29 Sep 2014 16:02:24 -0400 [thread overview]
Message-ID: <5429BAD0.1050101@ti.com> (raw)
In-Reply-To: <20140929.155200.2231132602322345812.davem@davemloft.net>
On Monday 29 September 2014 03:52 PM, David Miller wrote:
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Thu, 25 Sep 2014 13:48:36 -0400
>
>> +static inline int gbe_phy_link_status(struct gbe_slave *slave)
>> +{
>> + if (!slave->phy)
>> + return 1;
>> +
>> + if (slave->phy->link)
>> + return 1;
>> +
>> + return 0;
>> +}
>
> Please use 'bool' as the return type and return 'true' or 'false'.
>
ok
> Do not use 'inline' in foo.c files, let the compiler decide. Please
> audit this entire submission for this problem.
>
ok.
>> +static int gbe_port_reset(struct gbe_slave *slave)
>> +{
>> + u32 i, v;
>> +
>> + /* Set the soft reset bit */
>> + writel_relaxed(SOFT_RESET, GBE_REG_ADDR(slave, emac_regs, soft_reset));
>
> This driver seems to use relaxed readl and writel for almost everything.
>
> That absolutely cannot be right. For example, here, you depend upon the
> ordering of this writel_relaxed() to reset the chip relative to the
> real_relaxed() you subsequently do to check ths bits.
>
> I seriously think that *_relaxed() should only be done in very special
> circumstances where 1) the performance matters and 2) the validity of
> the usage has been put under a microscope and fully documented with huge
> comments above the *_relaxed() calls.
>
> If you cannot reduce and properly document the really necessary *_relaxed()
> uses, just convert them all to non-_relaxed() for now.
>
We can stick to non-*relaxed() versions. No problems here.
> I'm also warning you ahead of time that since nobody else seems to feel
> like reviewing this enormous submission, you are going to have to get used
> to me pushing back on these changes over and over for small things like
> coding style and structural/API issues until some reviews it on a higher
> level.
>
> I really don't want to apply this series until someone thinks seriously
> about the driver's design and the long term ramifications of having a
> driver like this in the tree with so many random TX etc. hooks.
>
The driver has been on the list. Jamal and you have given your comments,
suggestion and we have incorporated that. What else we can do ?
We are badly missing mainline network driver support for the Keystone
and hence I request you to help here.
regards,
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<sandeep_n-l0cyMroinI0@public.gmane.org>,
<joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH v5 2/3] net: Add Keystone NetCP ethernet driver
Date: Mon, 29 Sep 2014 16:02:24 -0400 [thread overview]
Message-ID: <5429BAD0.1050101@ti.com> (raw)
In-Reply-To: <20140929.155200.2231132602322345812.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Monday 29 September 2014 03:52 PM, David Miller wrote:
> From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> Date: Thu, 25 Sep 2014 13:48:36 -0400
>
>> +static inline int gbe_phy_link_status(struct gbe_slave *slave)
>> +{
>> + if (!slave->phy)
>> + return 1;
>> +
>> + if (slave->phy->link)
>> + return 1;
>> +
>> + return 0;
>> +}
>
> Please use 'bool' as the return type and return 'true' or 'false'.
>
ok
> Do not use 'inline' in foo.c files, let the compiler decide. Please
> audit this entire submission for this problem.
>
ok.
>> +static int gbe_port_reset(struct gbe_slave *slave)
>> +{
>> + u32 i, v;
>> +
>> + /* Set the soft reset bit */
>> + writel_relaxed(SOFT_RESET, GBE_REG_ADDR(slave, emac_regs, soft_reset));
>
> This driver seems to use relaxed readl and writel for almost everything.
>
> That absolutely cannot be right. For example, here, you depend upon the
> ordering of this writel_relaxed() to reset the chip relative to the
> real_relaxed() you subsequently do to check ths bits.
>
> I seriously think that *_relaxed() should only be done in very special
> circumstances where 1) the performance matters and 2) the validity of
> the usage has been put under a microscope and fully documented with huge
> comments above the *_relaxed() calls.
>
> If you cannot reduce and properly document the really necessary *_relaxed()
> uses, just convert them all to non-_relaxed() for now.
>
We can stick to non-*relaxed() versions. No problems here.
> I'm also warning you ahead of time that since nobody else seems to feel
> like reviewing this enormous submission, you are going to have to get used
> to me pushing back on these changes over and over for small things like
> coding style and structural/API issues until some reviews it on a higher
> level.
>
> I really don't want to apply this series until someone thinks seriously
> about the driver's design and the long term ramifications of having a
> driver like this in the tree with so many random TX etc. hooks.
>
The driver has been on the list. Jamal and you have given your comments,
suggestion and we have incorporated that. What else we can do ?
We are badly missing mainline network driver support for the Keystone
and hence I request you to help here.
regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-29 20:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 17:48 [PATCH v5 0/3] net: Add Keystone NetCP ethernet driver support Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` [PATCH v5 1/3] Documentation: dt: net: Add binding doc for Keystone NetCP ethernet driver Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` [PATCH v5 2/3] net: Add " Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-29 19:52 ` David Miller
2014-09-29 19:52 ` David Miller
2014-09-29 20:02 ` Santosh Shilimkar [this message]
2014-09-29 20:02 ` Santosh Shilimkar
2014-09-29 20:02 ` Santosh Shilimkar
2014-09-29 20:02 ` Santosh Shilimkar
2014-09-29 20:12 ` David Miller
2014-09-29 20:12 ` David Miller
2014-09-29 21:47 ` Santosh Shilimkar
2014-09-29 21:47 ` Santosh Shilimkar
2014-09-29 21:47 ` Santosh Shilimkar
2014-09-30 13:09 ` David Laight
2014-09-30 13:09 ` David Laight
2014-09-30 13:28 ` Geert Uytterhoeven
2014-09-30 13:28 ` Geert Uytterhoeven
2014-09-25 17:48 ` [PATCH v5 3/3] MAINTAINER: net: Add TI NETCP Ethernet driver entry Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
2014-09-25 17:48 ` Santosh Shilimkar
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=5429BAD0.1050101@ti.com \
--to=santosh.shilimkar@ti.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.