Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mlindner@marvell.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] drivers/net/niu: Support for Marvell PHY
Date: Thu, 20 Dec 2007 15:25:03 -0800 (PST)	[thread overview]
Message-ID: <20071220.152503.263532731.davem@davemloft.net> (raw)
In-Reply-To: <1197993838.26679.64.camel@mlindner-lin.skd.de>

From: Mirko Lindner <mlindner@marvell.com>
Date: Tue, 18 Dec 2007 17:03:58 +0100

> +static int xcvr_init_10g_mrvl88x2011(struct niu *np)
> +{
> +	int err;
> +
> +	/* Set LED functions */
> +	mrvl88x2011_led_blink_rate(np, 2);
> +	mrvl88x2011_act_led(np, 0);	/* led activity */
> +
> +	err = mdio_read(np, np->phy_addr, 3, 0x8300);
> +	if (err < 0) {
> +		return(err);
> +	}
> +
> +	err |= 0x0001;
> +
> +	err = mdio_write(np, np->phy_addr, 3, 0x8300, err);
> +	if (err < 0) {
> +		return(err);
> +	}
> +
> +	/* Enable PMD */
> +	err = mdio_write(np, np->phy_addr, 1, 0x0009, 0);
> +	
> +	return (err);
> +}
> +

This code doesn't handle putting the PHY into loopback more etc. like
the BCM8704 chip initialization does.

Please also fully document the registers using defines in the niu.h
header file as is already done for the BCM8704 registers.  Magic
constants are not allowed.

I'd like this Marvell PHY chip to be documented so that, just like the
BCM8704, someone can look at the driver and understand how the chip
works and thus make bug fixes and changes.

  reply	other threads:[~2007-12-20 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18 16:03 [PATCH] drivers/net/niu: Support for Marvell PHY Mirko Lindner
2007-12-20 23:25 ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-10  9:33 Mirko Lindner
2008-01-10 10:24 ` David Miller

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=20071220.152503.263532731.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=mlindner@marvell.com \
    --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