net: rtl8169: Add initialized eth_device structure
PATCH v2 1/10 net: rtl8169: Add initialized eth_device structure
rtl8169 does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/rtl8169.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/rtl8169.c +6 -1
@@ -894,7 +894,12 @@ int rtl8169_initialize(bd_t *bis)debug ("rtl8169: REALTEK RTL8169 @0x%x\n" , iobase); dev = (struct eth_device *)malloc (sizeof *dev); - +if (!dev) { +printf ("Can not allocate memory of rtl8169\n" ); +break ; + } + +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"RTL8169#%d" , card_number); dev->priv = (void *) devno;
Signature · 1 line
1.7.1
PATCH v2 1/10 net: rtl8169: Add initialized eth_device structure
Hi, Ben and Wolfgang.
Could you take in these patches?
Best regards,
Nobuhiro
2010/10/19 Nobuhiro Iwamatsu <[email protected]>:
Quoted 32 lines
rtl8169 does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>---
?drivers/net/rtl8169.c | ? ?7 ++++++-
?1 files changed, 6 insertions(+), 1 deletions(-)drivers/net/rtl8169.c +6
-2@@ -894,7 +894,12 @@ int rtl8169_initialize(bd_t *bis) ? ? ? ? ? ? ? ?debug ("rtl8169: REALTEK RTL8169 @0x%x\n", iobase); ? ? ? ? ? ? ? ?dev = (struct eth_device *)malloc(sizeof *dev); - + ? ? ? ? ? ? ? if (!dev) { + ? ? ? ? ? ? ? ? ? ? ? printf("Can not allocate memory of rtl8169\n"); + ? ? ? ? ? ? ? ? ? ? ? break; + ? ? ? ? ? ? ? } + + ? ? ? ? ? ? ? memset(dev, 0, sizeof(*dev)); ? ? ? ? ? ? ? ?sprintf (dev->name, "RTL8169#%d", card_number); ? ? ? ? ? ? ? ?dev->priv = (void *) devno; --1.7.1
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6PATCH v2 1/10 net: rtl8169: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 2 lines · In message <[email protected]> you…
Could you take in these patches?
Are these bug fixes, or can they wait for the "next" branch?
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de One friend in a lifetime is much; two are many; three are hardly possible. Friendship needs a certain parallelism of life, a community of thought, a rivalry of aim. - Henry Brook Adams
PATCH v2 1/10 net: rtl8169: Add initialized eth_device structure
Hi, Wolfgang.
2010/10/28 Wolfgang Denk <[email protected]>:
Quoted 7 lines
Dear Nobuhiro Iwamatsu,
Quoted 2 lines · In message <[email protected]> you…
Could you take in these patches?
Are these bug fixes, or can they wait for the "next" branch?
There are bug fix.
When we don't apply these patches, the board with the network device of the object does not work.
Best regards,
Nobuhiro
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6PATCH v2 2/10 net: rtl8139: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsurtl8139 driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/rtl8139.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/rtl8139.c +5 -0
@@ -220,6 +220,11 @@ int rtl8139_initialize(bd_t *bis)debug ("rtl8139: REALTEK RTL8139 @0x%x\n" , iobase); dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("Can not allocate memory of rtl8139\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"RTL8139#%d" , card_number);
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 2/10 net: rtl8139: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
rtl8139 driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/rtl8139.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Real computer scientists despise the idea of actual hardware. Hard- ware has limitations, software doesn't. It's a real shame that Turing machines are so poor at I/O.
PATCH v2 3/10 net: dc2114x: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsudc2114x driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/dc2114x.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/dc2114x.c +6 -0
@@ -279,6 +279,12 @@ int dc21x4x_initialize(bd_t *bis)debug ("dc21x4x: DEC 21142 PCI Device @0x%x\n" , iobase); dev = (struct eth_device *)malloc (sizeof *dev); + +if (!dev) { +printf ("Can not allocalte memory of dc21x4x\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));#ifdef CONFIG_TULIP_FIX_DAVICOM sprintf (dev->name,"Davicom#%d" , card_number);
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 3/10 net: dc2114x: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
dc2114x driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/dc2114x.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de panic: kernel trap (ignored)
PATCH v2 4/10 net: eepro100: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsueepro100 driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/eepro100.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/eepro100.c +5 -0
@@ -450,6 +450,11 @@ int eepro100_initialize (bd_t * bis) } dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("eepro100: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"i82559#%d" , card_number); dev->priv = (void *) devno;/* this have to come before bus_to_phys() */
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 4/10 net: eepro100: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
eepro100 driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/eepro100.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "A great many people think they are thinking when they are merely re- arranging their prejudices." - William James
PATCH v2 5/10 net: fec_mxc: Add initialized eth_device structure
In reply to Nobuhiro IwamatsuThis prevents access to the member of eth_device which is not initialized.
--- drivers/net/fec_mxc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/fec_mxc.c +1 -0
@@ -707,6 +707,7 @@ static int fec_probe(bd_t *bd)puts ("fec_mxc: not enough malloc memory\n" );return -ENOMEM ; } +memset (edev,0 ,sizeof (*edev)); edev->priv = fec; edev->init = fec_init; edev->send = fec_send;
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 5/10 net: fec_mxc: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 7 lines · In message <[email protected]> you wrote:
This prevents access to the member of
eth_devicewhich is not initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/fec_mxc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de On our campus the UNIX system has proved to be not only an effective software tool, but an agent of technical and social change within the University. - John Lions (U. of Toronto (?))
PATCH v2 6/10 net: natsemi: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsunatsemi driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/natsemi.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/natsemi.c +5 -0
@@ -321,6 +321,11 @@ natsemi_initialize(bd_t * bis) } dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("natsemi: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"dp83815#%d" , card_number); dev->iobase =bus_to_phys (iobase);
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 6/10 net: natsemi: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
natsemi driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/natsemi.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The good Christian should beware of mathematicians and all those who make empty prophecies. The danger already exists that mathematicians have made a covenant with the devil to darken the spirit and confine man in the bonds of Hell." - Saint Augustine
PATCH v2 7/10 net: ns8382x: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsuns8382x driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/ns8382x.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/ns8382x.c +5 -0
@@ -340,6 +340,11 @@ ns8382x_initialize(bd_t * bis) } dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("ns8382x: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"dp8382x#%d" , card_number); dev->iobase =bus_to_phys (iobase);
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 7/10 net: ns8382x: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
ns8382x driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/ns8382x.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Steal five dollars and you were a petty thief. Steal thousands of
dollars and you are either a government or a hero.
- Terry Pratchett, _Going_Postal_PATCH v2 8/10 net: pcnet: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsupcnet driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/pcnet.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/pcnet.c +5 -0
@@ -187,6 +187,11 @@ int pcnet_initialize (bd_t * bis)* Allocate and pre-fill the device structure. */ dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("pcnet: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev)); dev->priv = (void *) devbusfn;sprintf (dev->name,"pcnet#%d" , dev_nr);
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 8/10 net: pcnet: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
pcnet driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/pcnet.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de READ THIS BEFORE OPENING PACKAGE: According to Certain Suggested Ver- sions of the Grand Unified Theory, the Primary Particles Constituting this Product May Decay to Nothingness Within the Next Four Hundred Million Years.
PATCH v2 9/10 net: tsi108_eth: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsutsi108_eth driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/tsi108_eth.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/net/tsi108_eth.c +5 -1
@@ -731,7 +731,11 @@ int tsi108_eth_initialize (bd_t * bis)for (index =0 ; index <CONFIG_TSI108_ETH_NUM_PORTS ; index++) { dev = (struct eth_device *)malloc (sizeof (struct eth_device )); - +if (!dev) { +printf ("tsi108: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"TSI108_eth%d" , index); dev->iobase =ETH_BASE + (index *ETH_PORT_OFFSET );
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 9/10 net: tsi108_eth: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
tsi108_ethdriver does not havewrite_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/tsi108_eth.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I've finally learned what `upward compatible' means. It means we get to keep all our old mistakes." - Dennie van Tassel
PATCH v2 10/10 net: uli526x: Add initialized eth_device structure
In reply to Nobuhiro Iwamatsuuli526x driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized.
--- drivers/net/uli526x.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/uli526x.c +5 -0
@@ -225,6 +225,11 @@ int uli526x_initialize(bd_t *bis) iobase &= ~0xf ; dev = (struct eth_device *)malloc (sizeof *dev); +if (!dev) { +printf ("uli526x: Can not allocate memory\n" ); +break ; + } +memset (dev,0 ,sizeof (*dev));sprintf (dev->name,"uli526x#%d" , card_number); db = (struct uli526x_board_info *)malloc (sizeof (struct uli526x_board_info ));
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 10/10 net: uli526x: Add initialized eth_device structure
Dear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
uli526x driver does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/uli526x.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Speculation is always more interesting than facts.
- Terry Pratchett, _Making_Money_Wolfgang Denk
AppliedPATCH v2 1/10 net: rtl8169: Add initialized eth_device structure
In reply to Nobuhiro IwamatsuDear Nobuhiro Iwamatsu,
Quoted 9 lines · In message <[email protected]> you wrote:
rtl8169 does not have
write_hwaddrfunction. However, eth stuff executeswrite_hwaddrfunction becauseeth_devicestructure has not been initialized.Signed-off-by Nobuhiro Iwamatsu <[email protected]>CC Ben Warren <[email protected]>--- drivers/net/rtl8169.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "It is better for civilization to be going down the drain than to be coming up it." - Henry Allen