netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
To: Kyle Moffett <kyle@moffetthome.net>
Cc: Linux NetDev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Best method to control a "transmit-only" mode on fiber NICs (specifically sky2)
Date: Fri, 15 Feb 2008 22:24:36 -0800	[thread overview]
Message-ID: <47B681A4.80803@vyatta.com> (raw)
In-Reply-To: <f73f7ab80802151941x5daf34e3scd0f42a05291db51@mail.gmail.com>

Kyle Moffett wrote:
> Hi,
>
> The company I'm working for has an unusual fiber NIC configuration
> that we use for one of our network appliances.  We connect only a
> single fiber from the TX port on one NIC to the RX port on another
> NIC, providing a physically-one-way path for enhanced security.
> Unfortunately this doesn't work with most NIC drivers, as even with
> auto-negotiation off they look for link probe pulses before they
> consider the link "up" and are willing to send packets.  We have been
> able to use Myricom 10GigE NICs with a custom firmware image.  More
> recently we have patched the sky2 driver to turn on the FIB_FORCE_LNK
> flag in the PHY control register; this seems to work on the
> Marvell-chipset boards we have here.
>
> What would be the preferred way to control this "force link" flag?
> Right now we are accessing it using ethtool; we have added an
> additional "duplex" mode: "DUPLEX_TXONLY", with a value of 2.  When
> you specify a speed and turn off autonegotiation ("./patched-ethtool
> -s eth2 speed 1000 autoneg off duplex txonly"), it will turn on the
> specified bit in the PHY control register and the link will
> automatically come up.  We also have one related bug-fix^Wdirty hack
> for sky2 to reset the PHY a second time during netif-up after enabling
> interrupts; otherwise the immediate "link up" interrupt gets lost.
> Once I get approval from the company I will patch the post itself for
> review.
>
> I look forward to your comments and suggestions
>
> Cheers,
> Kyle Moffett
>   
For the second problem, you could just change the code to check the 
status immediately,
by calling the same code the irq does. It might need some refactoring 
but should only be minor surgery.
I was thinking about doing that anyway for the forced link (no 
negotiation case).


      reply	other threads:[~2008-02-16  6:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16  3:41 [RFC] Best method to control a "transmit-only" mode on fiber NICs (specifically sky2) Kyle Moffett
2008-02-16  6:24 ` Stephen Hemminger [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=47B681A4.80803@vyatta.com \
    --to=stephen.hemminger@vyatta.com \
    --cc=kyle@moffetthome.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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).