Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Manish Lachwani <mlachwani@prometheus.mvista.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] Small fix for the Sibyte Mac driver
Date: Tue, 9 Nov 2004 20:59:53 +0100	[thread overview]
Message-ID: <20041109195953.GA25337@linux-mips.org> (raw)
In-Reply-To: <20041108235148.GA20991@prometheus.mvista.com>

On Mon, Nov 08, 2004 at 03:51:48PM -0800, Manish Lachwani wrote:

> Attached is a small patch for the Sibyte MAC Driver. This helps
> print the device name correctly

> -	/* This is needed for PASS2 for Rx H/W checksum feature */
> -	sbmac_set_iphdr_offset(sc);
> -
>  	err = register_netdev(dev);
>  	if (err)
>  		goto out_uninit;
>  
> +	/* This is needed for PASS2 for Rx H/W checksum feature */
> +	sbmac_set_iphdr_offset(sc);
> +

Your patch introduces a race condition - the NIC needs to be fully setup
before register_netdev.  By the time register_netdev returns the driver
could possibly already be opened and traffic be flowing.  What's usually
done is using the PCI device's name as obtained through pci_name().
Which in this case fails, so maybe you should convert the driver to a
platform_device() and print platform_device->name instead.  The Titan GE
driver which I think you're familiar with already use platform_device ;-)

  Ralf

  reply	other threads:[~2004-11-09 20:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 23:51 [PATCH] Small fix for the Sibyte Mac driver Manish Lachwani
2004-11-09 19:59 ` Ralf Baechle [this message]
2004-11-09 20:50   ` Manish Lachwani

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=20041109195953.GA25337@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mlachwani@prometheus.mvista.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