netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Vince Bridgers <vbridgers2013@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>, Ley Foon Tan <lftan@altera.com>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>, <lftan.linux@gmail.com>,
	Vince Bridgers <vbridger@altera.com>
Subject: Re: [PATCH] net: stmmac: add dcrs parameter
Date: Tue, 26 Aug 2014 07:38:48 +0200	[thread overview]
Message-ID: <53FC1D68.1000600@st.com> (raw)
In-Reply-To: <CAOwfj2Oyy8EGxPhgJcgeGPMm3tJ9-fGOh5h7jU8q4_BO=vWrTA@mail.gmail.com>

On 8/25/2014 5:10 PM, Vince Bridgers wrote:
> Hi,
>
> On Mon, Aug 25, 2014 at 7:51 AM, Giuseppe CAVALLARO
> <peppe.cavallaro@st.com> wrote:
>> On 8/25/2014 2:34 PM, Chen-Yu Tsai wrote:
>>>
>>> Hi,
>>>
>>> On Mon, Aug 25, 2014 at 7:50 PM, Ley Foon Tan <lftan@altera.com> wrote:
>>>>
>>>> This patch add the option to enable DCRS bit in GMAC control register.
>>>> Default is disabled if snps,dcrs is not defined.
>>>>
>>>> For MII, Carrier Sense (CRS) must be asserted during transmission
>>>> whereas in RGMII, CRS is not. RGMII does not provide a way to signal
>>>> loss of carrier during a transmission.
>
> While technically true, from a practical point of view, this is only
> useful if using true half-duplex media (like the now obsolete 10Base2
> and 10Base5 - think old school coax with vampire taps).
>
>>>>
>>>> When DCRS bit set high in control register, the MAC transmitter
>>>> ignore the (G)MII Carrier Sense signal during frame transmission
>>>> in the half-duplex mode. This request results in no errors generated
>>>> because of Loss of Carrier or No Carrier during such transmission.
>>>>
>>>> Signed-off-by: Ley Foon Tan <lftan@altera.com>
>>>> ---
>
> <snip>
>
>>>
>>> Since you know this is only required under (G)MII, could you not re-use
>>> the "phy-mode" property, instead of adding another one?
>>>
>>> Better yet, use the "interface" field in the platform data. This way
>>> you'll
>>> fix non-DT devices as well. You could then avoid touching the platform
>>> driver,
>>> and just modify the driver core.
>>
>>
>> yes this is what I asked. Thx ChenYu for the this detail.
>> Ley Foon Tan, could you do that? Let me know
>>
>> peppe
>>
>>
>
> In the Synopsys EMAC case, carrier sense is used to stop transmitting
> if no carrier is sensed during a transmission. This is only useful if
> the media in use is true half duplex media (like obsolete 10Base2 or
> 10Base5). If no one in using true half duplex media, then is it
> possible to set this disable by default? If we're not sure, then
> having an option feels like the right thing to do.

Indeed this is what I had done in the patch.

http://git.stlinux.com/?p=stm/linux-sh4-2.6.32.y.git;a=commit;h=b0b863bf65c36dc593f6b7b4b418394fd880dae2

Also in case of carrier sense the frame will be dropped in any case
later.

Let me know if you Acked this patch so I will rebase it on
net.git and I send it soon

peppe

>
> Vince
>

  reply	other threads:[~2014-08-26  5:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 11:50 [PATCH] net: stmmac: add dcrs parameter Ley Foon Tan
2014-08-25 12:23 ` Giuseppe CAVALLARO
2014-08-25 12:34 ` Chen-Yu Tsai
2014-08-25 12:51   ` Giuseppe CAVALLARO
2014-08-25 15:10     ` Vince Bridgers
2014-08-26  5:38       ` Giuseppe CAVALLARO [this message]
2014-08-26 12:35         ` Vince Bridgers
2014-08-26 13:20           ` Giuseppe CAVALLARO
2014-08-27  1:27             ` Ley Foon Tan
2014-08-27  2:36             ` Chen-Yu Tsai

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=53FC1D68.1000600@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=davem@davemloft.net \
    --cc=lftan.linux@gmail.com \
    --cc=lftan@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vbridger@altera.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 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).