public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat•com>
To: Balakumaran Kannan <kumaran.4353@gmail•com>
Cc: David Miller <davem@davemloft•net>,
	stephen@networkplumber•org, Avinash Kumar <avi.kp.137@gmail•com>,
	Eric Dumazet <edumazet@google•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: Re: [PATCH 1/1] net: Set NOCARRIER bit of etherdev state at initialization
Date: Tue, 27 May 2014 10:24:20 -0500	[thread overview]
Message-ID: <1401204260.4346.11.camel@dcbw.local> (raw)
In-Reply-To: <CAHPKR9LUseeYbtJomZHSu0mmU-VbcCVg8OGnSCOL1b1=Sfj9kQ@mail.gmail.com>

On Sat, 2014-05-24 at 18:52 +0530, Balakumaran Kannan wrote:
> On Fri, May 23, 2014 at 11:45 PM, David Miller <davem@davemloft•net> wrote:
> > From: Dan Williams <dcbw@redhat•com>
> > Date: Fri, 23 May 2014 12:38:01 -0500
> >
> >> The current "carrier on until told otherwise" model is intentional,
> >> because not all drivers support carrier detection, and thus we must
> >> assume the carrier is on until the driver tells us it is not on.
> >>
> >> Would this patch break that model?
> >
> > Absolutely correct, this change is completely inappropriate.
> 
> So it is driver's responsibility to maintain this flag appropriately.
> Thus if a driver supports carrier detection, it should set "carrier
> on" only after determining the carrier state. Then I'll add
> 'netif_carrier_off' call to smsc911x driver and send a new patch.

Correct.  Carrier state starts with ON.  If the driver knows it can
detect carrier state, then the driver should call netif_carrier_off()
early in the driver initialization, and then call on/off as appropriate
when it gets carrier change events.

Dan

> Thanks for the explanation.
> 
> Regards,
> K.Balakumaran
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2014-05-27 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 17:01 [PATCH 1/1] net: Set NOCARRIER bit of etherdev state at initialization Balakumaran Kannan
2014-05-23 17:38 ` Dan Williams
2014-05-23 18:15   ` David Miller
2014-05-24 13:22     ` Balakumaran Kannan
2014-05-27 15:24       ` Dan Williams [this message]

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=1401204260.4346.11.camel@dcbw.local \
    --to=dcbw@redhat$(echo .)com \
    --cc=avi.kp.137@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kumaran.4353@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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