From: Manish Lachwani <mlachwani@mvista.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] Small fix for the Sibyte Mac driver
Date: Tue, 09 Nov 2004 12:50:52 -0800 [thread overview]
Message-ID: <41912DAC.6070905@mvista.com> (raw)
In-Reply-To: <20041109195953.GA25337@linux-mips.org>
Ralf Baechle wrote:
> 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
>
Hi Ralf
Thanks for the response. To make it really simple and avoid lot of
changes to the driver code, we can continue to do
sbmac_set_iphdr_offset() before the call to register_netdev() and print
the "...enabling TCP rcv checksum" after register_netdev().
Since we need the driver to print the device name correctly, this change
can keep things really simple :)
Thanks
Manish Lachwani
prev parent reply other threads:[~2004-11-09 20:51 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
2004-11-09 20:50 ` Manish Lachwani [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=41912DAC.6070905@mvista.com \
--to=mlachwani@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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