lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 04 Jul 2015 20:31:33 +0200
From:	Martin Devera <devik@....cz>
To:	linux-kernel@...r.kernel.org
Subject: bug in ARM/LPC32XX eth init code / probably OF related

Hi,

I compiled vanilla 4.1.1 for LPC3240 MPU without loadable module support.
I created own dts and board .c source:

static void __init lpc3250_machine_init(void)
{
         __raw_writel(0x1600 ,LPC32XX_GPIO_P_MUX_SET); // SSP0
         __raw_writel(1<<6 , io_p2v(0x40028004)); // ETH unreset

         lpc32xx_serial_init();
         of_platform_populate(NULL, of_default_bus_match_table,
                              lpc32xx_auxdata_lookup, NULL);
}

All seems to be ok, only ETH doesn't work. I found the problem -
Micrel PHY driver is inited later than lpc_eth driver and it doesn't bind
to the eth.
I solved it by ugly hack - set status="disabled" for eth in dts and adding:

static struct of_device_id __initdata of_ids[] = {
                  { .compatible = "nxp,lpc-eth" },{}
};
static void __init devik_late_init(void) // errorchecking omited
{
         struct device_node *np;
         np = of_find_compatible_node(NULL, NULL, "nxp,lpc-eth");
         struct property *p = of_find_property(np,"status",NULL);
         of_remove_property(np,p);
         of_node_clear_flag(np, OF_POPULATED);
         of_platform_bus_probe(np,of_ids,NULL);
}

Other solutiuon is to make it module a load later (we prefer no modules 
here),
or editing lpc_eth.c to register in device_initcall_sync.

Is there some better solution for the bug ?

devik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ