Hi Sekhar,

In the function "static int __init ip_auto_config(void)" of file net/ipv4/ipconfig.c the implementation for sending DHCP request was/is something like:

_*Kernel implementation:*_
static int __init ip_auto_config(void)
{
---Some code statement ----

try_try_again:

          ---Some code statement ----

int retries = CONF_OPEN_RETRIES;

          Send DHCP request.

          if (--retries) {
             printk(KERN_ERR "IP-Config: Reopening network devices...\n");
  goto try_try_again;
         }

  --- Some code statement.
}

*_Modified implementation:_*

static int __init ip_auto_config(void)
{
---Some code statement ----

int retries = CONF_OPEN_RETRIES;

try_try_again:

          ---Some code statement ----

          Send DHCP request.

          if (--retries) {
             printk(KERN_ERR "IP-Config: Reopening network devices...\n");
goto try_try_again;
         }

   --- Some code statement.
}


--
Regards,
Krunal



On 06/09/2010 06:33 PM, Nori, Sekhar wrote:
Hi Krunal,

On Tue, Jun 08, 2010 at 18:17:20, Krunal Patil wrote:
Hi All,

I came across an issue in DM365 kernel (linux-2.6.18_pro500). When the
network cable is not connected to the board or DHCP server does not
respond. The kernel send DHCP request for N number of times and board
never boots up. I am not sure if it is intentional. Ideally it should
not be if you are not using NFS filesystem.

There was a mistake (Again I am not sure) of initializing the retries
variable in net/ipv4/ipconfig.c file. Here is the change I made in the
file and now it stops after some retries:

1263d1262
<                int retries = CONF_OPEN_RETRIES;
1290a1290
               int retries = CONF_OPEN_RETRIES;
Er, what exactly is the change here?

Please let me know if it is really intentional or just a logical error.
This not specific to DM365 or to any device for that matter. However,
retrying infinitely when not using NFS does sound unnecessary. If you
find the same behavior in the recent kernel, you could report to netdev
list. You should at least get an explanation on why things are the way
they are.

Thanks,
Sekhar


Email Scanned for Virus&  Dangerous Content by : www.CleanMailGateway.com

____________________________________________________________________________________
Disclaimer: This e-mail message and all attachments transmitted with it are 
intended solely for the use of the addressee and may contain legally privileged 
and confidential information. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution, copying, or other use of this message or its attachments is 
strictly prohibited. If you have received this message in error, please notify 
the sender immediately by replying to this message and please delete it from 
your computer. Any views expressed in this message are those of the individual 
sender unless otherwise stated.Company has taken enough precautions to prevent 
the spread of viruses. However the company accepts no liability for any damage 
caused by any virus transmitted by this email.
____________________________________________________________________________________

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to