<br><br><div class="gmail_quote">2011/4/10 Jean-Christophe PLAGNIOL-VILLARD <span dir="ltr"><<a href="mailto:plagnioj@jcrosoft.com">plagnioj@jcrosoft.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> > index 0000000..2687377<br>
> > --- /dev/null<br>
> > +<br>
> > +static int tse_get_ethaddr(struct eth_device *edev, unsigned char *m)<br>
> > +{<br>
> > + /* There is no eeprom */<br>
> so return the content of the register no?<br>
><br>
> Well, the register is reseted to 0 when the MAC starts so there is no<br>
> Ethernet address<br>
> to get.<br>
><br>
</div>except this function is supposed to return the mac address of the device at<br>
any time so after a set of it it will not be true any more<br></blockquote><div><br></div><div>If I implement the function I get a "eth@eth0: got MAC address from EEPROM: 00:00:00:00:00:00" at startup.</div><div>
That why I returned -1 as what I could find int at91_ether.c......</div><div>Or, I could find something to return -1 as long as the MAC address hasn't been set.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">><br>
> > + return -1;<br>
> > +}<br>
> > +<br>
> > +static int tse_eth_send(struct eth_device *edev, void *packet, int<br>
> length)<br>
> > +{<br>
> > +<br>
> > + struct altera_tse_priv *priv = edev->priv;<br>
> > + struct alt_sgdma_registers *tx_sgdma = priv->sgdma_tx;<br>
> > + struct alt_sgdma_descriptor *tx_desc = (struct<br>
> alt_sgdma_descriptor *)priv->tx_desc;<br>
> > +<br>
> > + struct alt_sgdma_descriptor *tx_desc_cur = (struct<br>
> alt_sgdma_descriptor *)&tx_desc[0];<br>
> > +<br>
> > + flush_dcache_range((uint32_t)packet, (uint32_t)packet + length);<br>
> > + alt_sgdma_construct_descriptor_burst(<br>
> > + (struct alt_sgdma_descriptor *)&tx_desc[0],<br>
> > + (struct alt_sgdma_descriptor *)&tx_desc[1],<br>
> > + (uint32_t *)packet, /* read addr */<br>
> > + (uint32_t *)0, /* */<br>
> > + length, /* length or EOP ,will change for<br>
> each tx */<br>
> > + 0x1, /* gen eop */<br>
> > + 0x0, /* read fixed */<br>
> > + 0x1, /* write fixed or sop */<br>
> > + 0x0, /* read burst */<br>
> > + 0x0, /* write burst */<br>
> > + 0x0 /* channel */<br>
> please use tab for indent I see other in the patch please check<br>
><br>
> I use tab for indent, spaces for alignment. I checked the patch with<br>
> checkpatch and it<br>
> didn't find errors.....<br>
</div></div>try to use tab when u can even for alignment please<br></blockquote><div><br></div><div>OK........</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">><br>
><br>
> > +<br>
> why this?<br>
><br>
> Because sometimes (often ?), hardware doesn't run first time. So I like to<br>
> have some information on MII bus running correctly....One day I had a PHY<br>
> getting the address 1 and sometimes this f***ing PHY got 31 and this<br>
> kind of auto scan helped me to immediately find the problem......<br>
> I could remove those function if it is a problem....<br>
</div>so it's no the right place as it's phy specific and not ehtern drivers<br>
specific<br></blockquote><div><br></div><div>We could put this in the MII code ? Or should I simply remove it ?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Best Regards,<br>
<font color="#888888">J.<br>
</font></blockquote></div><br>