Hello Russell,

On 02/19/2013 11:46 AM, Russell Senior wrote:

This doesn't quite build yet.  There are two (known) problems:

  a) drivers/mtd/devices/ar2315.c: In function 'spiflash_probe':
     drivers/mtd/devices/ar2315.c:456:5: error: 'struct mtd_info' has no member 
named 'erase'
     drivers/mtd/devices/ar2315.c:457:5: error: 'struct mtd_info' has no member 
named 'read'
     drivers/mtd/devices/ar2315.c:458:5: error: 'struct mtd_info' has no member 
named 'write'

     due to kernel interface changes (see linux commit
     3c3c10bba1e4ccb75b41442e45c1a072f6cded19), the kernel prefers
     direct calls to mtd_erase, mtd_read, mtd_write instead of via
     function pointers (now removed, or at least renamed).  Not sure
     how to fix this, since I'm not sure where the calls are coming
     from.

As you say it, these should be replaced with proper calls to mtd_erase(), mtd_read() and mtd_write().


  b) in drivers/net/ethernet/ar231x/ar231x.c, since the kernel
     interface get_phy_id() is no longer exported, the call here:

     ++      /* Workaround for Micrel switch, which is only available on
     ++       * one PHY and cannot be configured through MDIO */
     ++      if (!no_phy) {
     ++              u32 phy_id = 0;
     ++              get_phy_id(sp->mii_bus, 1, &phy_id);
     ++              if (phy_id == 0x00221450)
     ++                      no_phy = true;

     doesn't work anymore (at least in 3.7, and I assume for 3.8 as
     well).  I have no idea what device using this switch chip, nor how
     to work around its problem a different way.  It might be possible
     to just drop the patch that inserts the workaround at the cost of
     losing support for whatever hardware that represents.

it should not be too hard to export get_phy_id() again, or just open code it locally. After all, it is just a matter of reading the PHY's ID register 1 (reg 2) and 2 (reg 3) and assembling the two 16-bits halfwords to a 32-bits word.
--
Florian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to