<div dir="ltr"><span style="font-size:14px">Sorry I forget another thing.....</span><div style="font-size:14px">It should be :</div><div style="font-size:14px"><div><span style="white-space:pre-wrap"> </span>pcie-bridge {</div><div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>mt76@0,0 {</div><div><br></div></div><div style="font-size:14px">instead of:</div><div style="font-size:14px"><div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>pcie0 {</div><div><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </span>mt76@0,0 {</div></div><div style="font-size:14px"><br></div><div style="font-size:14px">I'll send another patch later....................</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-06 20:22 GMT+08:00 Roger Pueyo Centelles <span dir="ltr"><<a href="mailto:rogerpueyo@rogerpueyo.com" target="_blank">rogerpueyo@rogerpueyo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>I added some prints to the eeprom.c file and saw that in function:<br><br>static int mt76_get_of_eeprom(struct mt76_dev *dev, int len)<br>{<br> int ret = -ENOENT;<br>#ifdef CONFIG_OF<br> struct device_node *np = dev->dev->of_node;<br> struct mtd_info *mtd;<br> const __be32 *list;<br> const char *part;<br> phandle phandle;<br> int offset = 0;<br> int size;<br> size_t retlen;<br><br> dev_printk(KERN_INFO, dev->dev, "mt76_get_of_eeprom. Step 0 (before !np)");<br><br> if (!np)<br> return -ENOENT;<br><br> dev_printk(KERN_INFO, dev->dev, "mt76_get_of_eeprom. Step 0 (after !np)");<br>[...]<br><br></div>if does not go further than ( if (!np) ).<br><br></div>Any ideas?<br><br><div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-02-04 23:13 GMT+01:00 John Crispin <span dir="ltr"><<a href="mailto:blogic@openwrt.org" target="_blank">blogic@openwrt.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br>
<br>
On 04/02/2015 22:11, Roger Pueyo Centelles wrote:<br>
> root@OpenWrt:/# hexdump -C /dev/mtd2<br>
> 00000000 20 76 05 01 64 09 80 01 66 5d ff ff ff ff ff ff |<br>
> v..d...f]......|<br>
> 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> 00000020 ff ff ff ff ff ff ff ff 64 09 80 01 66 5c 00 d0<br>
> |........d...f\..|<br>
> 00000030 59 60 00 04 22 0c 04 04 ff ff 15 01 55 77 a8 aa<br>
> |Y`..".......Uw..|<br>
> 00000040 8c 88 ff ff 0d 00 00 00 00 00 00 00 00 00 ff ff<br>
> |................|<br>
> 00000050 ff ff 10 10 10 10 10 10 11 11 11 11 11 11 12 12<br>
> |................|<br>
> 00000060 12 12 12 12 12 12 13 13 13 14 14 14 15 15 80 ff<br>
> |................|<br>
> 00000070 ff ff 80 ff ff ff 00 f4 ff ff ff ff ff ff ff ff<br>
> |................|<br>
> 00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> *<br>
> 000000d0 1e 00 ff ff ff ff ff ff ff ff ff ff ff ff 08 08<br>
> |................|<br>
> 000000e0 06 06 04 00 06 06 04 00 06 06 04 00 06 06 04 00<br>
> |................|<br>
> 000000f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> *<br>
> 00008000 62 76 00 00 64 09 80 01 66 5e 62 76 c3 14 00 00<br>
<br>
</div></div> ^^ that is the mac at 0x8004<br>
<div><div><br>
<br>
<br>
<br>
<br>
> |bv..d...f^bv....|<br>
> 00008010 00 00 62 76 c3 14 00 00 00 00 ff ff ff ff ff ff<br>
> |..bv............|<br>
> 00008020 ff ff 37 d8 9d 00 60 7f fd 9b ff ff ff ff ff ff<br>
> |..7...`.........|<br>
> 00008030 ff ff ff ff 22 ff 00 20 ff ff 9b 01 00 00 00 00 |...."..<br>
> ........|<br>
> 00008040 00 00 ff df 00 82 00 00 00 81 00 00 00 00 e0 01<br>
> |................|<br>
> 00008050 00 00 00 00 00 00 84 0a 1a 00 00 00 83 0b 1a 00<br>
> |................|<br>
> 00008060 00 00 7a 06 22 82 82 7a 06 22 82 82 78 08 22 82<br>
> |..z."..z."..x.".|<br>
> 00008070 82 7e 02 22 82 82 76 16 22 82 82 75 1c 22 82 82<br>
> |.~."..v."..u."..|<br>
> 00008080 79 0a 22 82 82 79 0a 22 82 82 7b 06 22 82 82 77<br>
> |y."..y."..{."..w|<br>
> 00008090 14 22 82 82 7e 05 22 82 82 79 11 22 82 82 00 1b<br>
> |."..~."..y."....|<br>
> 000080a0 c3 c3 c3 c3 00 00 c4 c4 c2 82 c4 c4 c2 82 00 00<br>
> |................|<br>
> 000080b0 00 00 c4 c4 c2 00 00 00 00 00 c2 c2 82 82 86 00<br>
> |................|<br>
> 000080c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> *<br>
> 000080f0 ff ff ff ff ff ff ff ff 22 ff ff ff ff ff ff ff<br>
> |........".......|<br>
> 00008100 0f ca 74 c5 e8 07 30 3d 01 b0 08 26 00 0e 04 15<br>
> |..t...0=...&....|<br>
> 00008110 00 8a 00 40 00 00 00 08 00 9d 08 00 12 c0 00 00<br>
> |...@............|<br>
> 00008120 08 20 04 2a 90 00 00 24 01 04 54 08 d0 a0 28 20 |.<br>
> .*...$..T...( |<br>
> 00008130 ff ff ff ff ff ff ff 08 ff ff ff ff ff ff 00 00<br>
> |................|<br>
> 00008140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> *<br>
> 000081e0 c0 81 82 c3 04 45 46 07 08 09 ff ff ff ff ff ff<br>
> |.....EF.........|<br>
> 000081f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br>
> |................|<br>
> *<br>
> 00010000<br>
><br>
> The MACs are there, at 0x4, 0x28 and 0x8004.<br>
><br>
> 2015-02-04 20:29 GMT+01:00 John Crispin <<a href="mailto:blogic@openwrt.org" target="_blank">blogic@openwrt.org</a><br>
</div></div>> <mailto:<a href="mailto:blogic@openwrt.org" target="_blank">blogic@openwrt.org</a>>>:<br>
<div><div>><br>
><br>
><br>
> On 04/02/2015 20:18, Roger Pueyo Centelles wrote:<br>
> > Hi,<br>
> ><br>
> > I tried with 0x8004 and I also got a random IP address. Actually,<br>
> > I changed this block in in eeprom.c (line 571) [1]:<br>
><br>
> can you do a "hexdump -C /dev/mtd2" and paste the output please ?<br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>