[U-Boot] [PATCH 07/10] ARM Add New Board GEC2410

Ben Warren biggerbadderben at gmail.com
Fri Oct 30 13:56:44 CET 2009


Hui.Tang,

On Fri, Oct 30, 2009 at 3:39 AM, Hui.Tang <zetalabs at gmail.com> wrote:

> Fix CS8900 dev->priv not init issue.
>
> Signed-off-by: Hui.Tang <zetalabs at gmail.com>
> ---
>  drivers/net/cs8900.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
> index 587f7f6..962b74c 100644
> --- a/drivers/net/cs8900.c
> +++ b/drivers/net/cs8900.c
> @@ -320,12 +320,12 @@ int cs8900_initialize(u8 dev_num, int base_addr)
>        }
>        memset(priv, 0, sizeof(*priv));
>        priv->regs = (struct cs8900_regs *)base_addr;
> +       dev->priv = priv;
>
>        /* Load MAC address from EEPROM */
>        cs8900_get_enetaddr(dev);
>
>        dev->iobase = base_addr;
> -       dev->priv = priv;
>        dev->init = cs8900_init;
>        dev->halt = cs8900_halt;
>        dev->send = cs8900_send;
>
Since you've decided to re-send this, please do so again.  This time, do it
this way:

 -
 -       /* Load MAC address from EEPROM */
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l325>-
cs8900_get_enetaddr(dev);
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l326>
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l327>
       dev->iobase = base_addr;
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l328>
       dev->priv = priv;
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l329>
       dev->init = cs8900_init;
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l330>
       dev->halt = cs8900_halt;
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l331>
       dev->send = cs8900_send;
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l332>
       dev->recv = cs8900_recv;
+
 +       /* Load MAC address from EEPROM */
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l325>+
cs8900_get_enetaddr(dev);
<http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l333>
       sprintf(dev->name, "%s-%hu", CS8900_DRIVERNAME, dev_num);

> --
> 1.6.0.4
>
> Since this fixes a bug, it may get in the current release.  The other parts
of you submission will have to wait.

regards,
Ben


More information about the U-Boot mailing list