mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC V2 5/6] net: add Realtek 8139 Ethernet controller support
Date: Fri, 9 Mar 2012 19:17:22 +0100	[thread overview]
Message-ID: <20120309181722.GL3852@pengutronix.de> (raw)
In-Reply-To: <1331236232-32735-6-git-send-email-antonynpavlov@gmail.com>

On Thu, Mar 08, 2012 at 11:50:31PM +0400, Antony Pavlov wrote:
> This driver is based on Linux 2.6.39 8139too driver.
> 
> +
> +static void rtl8139_chip_reset(struct rtl8139_priv *priv)
> +{
> +	int i;
> +
> +#ifdef RTL8139_DEBUG
> +	printf("rtl8139_chip_reset()\n");
> +#endif

Please use dev_dbg()

> +
> +	/* Soft reset the chip. */
> +	RTL_W8(priv, ChipCmd, CmdReset);
> +
> +	/* Check that the chip has finished the reset. */
> +	for (i = 1000; i > 0; i--) {
> +		//barrier();
> +		if ((RTL_R8(priv, ChipCmd) & CmdReset) == 0)
> +			break;
> +		udelay(10);
> +	}

while (!is_timeout(start, 10 * MSECOND)

> +static struct pci_driver rtl8139_eth_driver = {
> +	.name = "rtl8139_eth",
> +	.id_table = rtl8139_pci_tbl,
> +	.probe = rtl8139_probe,
> +};
> +
> +static int rtl8139_init(void)
> +{
> +	pci_register_driver(&rtl8139_eth_driver);
> +
> +	add_generic_device("rtl8139_eth", -1, NULL, 0xb0000000, 16,
> +		IORESOURCE_MEM, NULL);

This makes me wonder. I assumed the PCI core would register the device.
Or is this just a leftover from an earlier version?

SAscha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-03-09 18:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 19:50 [RFC V2 0/6] barebox PCI support Antony Pavlov
2012-03-08 19:50 ` [RFC V2 1/6] PCI: initial commit (draft) Antony Pavlov
2012-03-09 18:01   ` Sascha Hauer
2012-03-08 19:50 ` [RFC V2 2/6] MIPS: add file gt64120.h from linux 2.6.39 Antony Pavlov
2012-03-08 19:50 ` [RFC V2 3/6] MIPS: add PCI support for GT64120-based malta Antony Pavlov
2012-03-08 19:50 ` [RFC V2 4/6] PCI: add draft lspci command Antony Pavlov
2012-03-08 19:50 ` [RFC V2 5/6] net: add Realtek 8139 Ethernet controller support Antony Pavlov
2012-03-09 18:17   ` Sascha Hauer [this message]
2012-03-08 19:50 ` [RFC V2 6/6] net: add DEC 21143 (tulip) " Antony Pavlov
2012-03-09 17:56 ` [RFC V2 0/6] barebox PCI support Sascha Hauer

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=20120309181722.GL3852@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.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