netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Stephen Hemminger <stephen.hemminger@vyatta.com>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] ne2k: add minimal ethtool setting support
Date: Fri, 18 Jan 2008 15:04:31 -0500	[thread overview]
Message-ID: <4791064F.3040901@pobox.com> (raw)
In-Reply-To: <20080115154805.69150f76@deepthought>

Stephen Hemminger wrote:
> Add minimal ethtool settings support for ne2k driver. This is needed
> for KVM/QEMU environment where ne2k seems to be the simplest stupid
> hardware used.
> 
> Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
> 
> --- a/drivers/net/ne2k-pci.c	2008-01-15 11:21:02.000000000 -0800
> +++ b/drivers/net/ne2k-pci.c	2008-01-15 15:43:17.000000000 -0800
> @@ -634,8 +634,21 @@ static void ne2k_pci_get_drvinfo(struct 
>  	strcpy(info->bus_info, pci_name(pci_dev));
>  }
>  
> +static int ne2k_pci_get_settings(struct net_device *dev,
> +				 struct ethtool_cmd *cmd)
> +{
> +	cmd->speed		= SPEED_10;
> +	cmd->duplex		= (ei_status.ne2k_flags & FORCE_FDX)
> +				   ? DUPLEX_FULL : DUPLEX_HALF;
> +	cmd->port		= PORT_TP;
> +	cmd->transceiver	= XCVR_INTERNAL;
> +	cmd->autoneg		= AUTONEG_DISABLE;
> +	return 0;
> +}

It's a little bit /too/ minimal...  the speed is wrong for a large swath 
of 10/100 ne2k chips...

	Jeff




      reply	other threads:[~2008-01-18 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15 23:48 [PATCH] ne2k: add minimal ethtool setting support Stephen Hemminger
2008-01-18 20:04 ` Jeff Garzik [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=4791064F.3040901@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=p_gortmaker@yahoo.com \
    --cc=stephen.hemminger@vyatta.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).