summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
...
* net/console: switch to pr_xxxJean-Christophe PLAGNIOL-VILLARD2013-03-091-2/+4
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: fix typoSascha Hauer2013-02-281-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce console none supportJean-Christophe PLAGNIOL-VILLARD2013-01-231-0/+1
| | | | | | | | | | | | this will allow to have no console support Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and 3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple As on bootstrap we have often very limited size. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/net-link'Sascha Hauer2012-12-131-0/+3
|\
| * net phylib: force to wait for linkSascha Hauer2012-12-121-0/+3
| | | | | | | | | | | | | | | | When starting a network device wait until the link is up. Otherwise autobooting does not work with little timeout and several attempts have to be made until the network is finally up. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers/base: fix corrupt device treeSascha Hauer2012-12-121-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_add_child is a very unsafe function. If called multiple times it allows setting the same device to different parents thus corrupting the siblings list. This happens regularly since: | commit c2e568d19c5c34a05a1002d25280bf113b72b752 | Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | Date: Sat Nov 3 16:11:05 2012 +0100 | | bus: add bus device | | automatically add it as parent of any bus device if none already specified | | we have now a nice output per bus If for example a FATfs is mounted this nice output per bus often ends with: > `---- fat0 > `---- 0 > `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL> > `---- sram00 > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > `---- 0x00000000-0xffffffffffffffff: /dev/<NULL> > unable to handle NULL pointer dereference at address 0x0000000c > pc : [<87f08a20>] lr : [<87f08a04>] > sp : 86eff8c0 ip : 87f3fbde fp : ffffffff > r10: ffffffff r9 : 00000000 r8 : 00000003 > r7 : 86f075b8 r6 : 00000002 r5 : ffffffec r4 : 86f07544 > r3 : 00000000 r2 : 43f900b4 r1 : 00000020 r0 : 00000005 > Flags: Nzcv IRQs off FIQs off Mode SVC_32 > [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130) > > [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c) > [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14) > [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38) > [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60) This patch fixes this by adding a device to its parents children list in register_device so that dev_add_child is no longer needed. This function is removed from the tree. Now callers of register_device have to clearly set the parent *before* registering a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Jan Lübbe <jlu@pengutronix.de>
* net phylib: Call phy_update_status when no link is presentSascha Hauer2012-12-081-1/+2
| | | | | | | | | | | | We call phy_update_status only once in 5 seconds. This makes sure we do not have great overhead when using ethernet devices. However, if phylib tells us the link is down anyway, there won't be ethernet transfers, so it doesn't hurt to call phy_update_status in this case. This makes sure we can use the ethernet device when the link comes up and do not have an additional 5 second penalty in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-081-1/+1
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-081-1/+1
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mem: add the swab (swap bytes) option to memory_display()Antony Pavlov2012-11-261-1/+1
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2012-11-161-1/+1
|\ | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * eth: register device a pure deviceJean-Christophe PLAGNIOL-VILLARD2012-11-121-1/+1
| | | | | | | | | | | | | | as we do not need to probe them and they have no driver or bus attached Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net eth: make edev->init optionalSascha Hauer2012-10-301-1/+2
|/ | | | | | | | | | edev->init is called at eth_register time unconditionally and is supposed to initialize the ethernet hardware. Since it's called unconditionally this could be done by the driver without having an additional hook. Some drivers need their initialization done earlier since they also register a mdiobus which does hardware accesses on registration time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/tftp'Sascha Hauer2012-10-034-439/+0
|\
| * net: remove old tftp supportSascha Hauer2012-09-284-439/+0
| | | | | | | | | | | | | | The old tftp suppoer has been replaced with filesystem based tftp support, so remove the old code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-034-14/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-14/+0
| |/ | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/boot-sequence-dhcp'Sascha Hauer2012-10-031-25/+142
|\ \ | | | | | | | | | | | | Conflicts: drivers/net/miidev.c
| * | dhcp: add retries limit supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via -r opt, global.dhcp.retries or dhcp_retries set the priority order; This will allow to do not stay infinite loop if no dhcp available for boot sequence as example Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | dhcp: add copy_only_if_valid supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-1/+6
| | | | | | | | | | | | | | | | | | | | | This will allow to only update a var if recive a valid data. This is need for hostname. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | dhcp: switch to global var supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-19/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way you can specify as previously set the dhcp parameter via global.dhcp.xxx and get the result via global.dhcp.xxx This is need for the defaultenv-2 to add the bootp suppport. Use it on defaultenv too to have only one set of var. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | defaultenv: switch hostname to global.hostnameJean-Christophe PLAGNIOL-VILLARD2012-10-021-2/+2
| | | | | | | | | | | | | | | | | | Udpate dhcp with it too. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | net/eth: fix link handlingSascha Hauer2012-09-271-18/+57
| | | | | | | | | | | | | | | | | | | | | Check link status on eth device open time and then periodically every 5 seconds. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | net: introduce phylibJean-Christophe PLAGNIOL-VILLARD2012-09-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt phylib from linux switch all the driver to it reimplement mii bus This will allow to have - phy drivers - to only connect the phy at then opening of the device - if the phy is not ready or not up fail on open Same behaviour as in linux and will allow to share code and simplify porting. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | net: catch error on eth_sendJean-Christophe PLAGNIOL-VILLARD2012-09-161-7/+11
| |/ |/| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | net: tftp: timeout only after a proper amount of timeWolfram Sang2012-09-141-1/+2
|/ | | | | | | | | Currently, the timeout when waiting for packages is smaller than the timeout communicated to the TFTP server for retransmitting. Make sure we wait at least for two retransmissions before giving up. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ethernet'Sascha Hauer2012-07-022-3/+3
|\
| * eth: eth MAC addresses are six bytesJohannes Stezenbach2012-06-302-3/+3
| | | | | | | | | | | | | | | | Reduce confusion by making clear six bytes are passed, not a string. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: Use dev_name directlySascha Hauer2012-06-281-3/+1
|/ | | | | | eth_get_byname uses a selfmade dev_name, use dev_name directly instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dns: fix recursive loopSascha Hauer2012-05-161-2/+9
| | | | | | | resolv() uses getenv_ip() which in turn calls resolv(). Fix this inifinite loop by not using getenv_ip directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: eth typo fixJean-Christophe PLAGNIOL-VILLARD2012-05-021-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into nextSascha Hauer2012-05-012-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | improve complete support The following patch serie improve the complete support by adding a complete framework to allow commands complete support. The add also car complete support for eval and setting and executable file support This also include an update of the stringlist API to support asprintf API
| * complete: add eth interface complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+21
| | | | | | | | | | | | use it on ethact Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add empty complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo, reset, true, usb, version for mach-imx and mach-mxs: dump_clocks for u_serial: mycdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | dhcp: set start timeSascha Hauer2012-04-301-0/+1
|/ | | | | | | | | The dhcp command starts with an unitialized start time. The start time is often long in the past which results in an immediate timeout and resend of the dhcp packet. Fix this by initializing the start time correctly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dhcp: fix typo introduce during rebase of hostname patchJean-Christophe PLAGNIOL-VILLARD2012-04-181-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: add support to send the hostname to the dhcp serverJean-Christophe PLAGNIOL-VILLARD2012-04-181-2/+12
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/dns' into nextSascha Hauer2012-04-165-23/+24
|\
| * Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-1/+1
| | | | | | | | | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: remove unused getenv_ip_dnsSascha Hauer2012-04-151-4/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dns: use global nameserver/domainnameSascha Hauer2012-04-151-3/+3
| | | | | | | | | | | | | | nameserver and domainname are now globally available in the 'net' device. use these variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dhcp: set global nameserver/domainnameSascha Hauer2012-04-151-4/+2
| | | | | | | | | | | | | | The nameserver and domainname are now globally available using the 'net' device. Use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: register a 'net' device to store network specific variablesSascha Hauer2012-04-151-0/+9
| | | | | | | | | | | | | | 'nameserver' and 'domainname' should be globally available variables specific to networking. Register a 'net' device to store these variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: use static string in string_to_ipSascha Hauer2012-04-152-10/+7
| | | | | | | | | | | | Simplify usage of ip_to_string by using a static string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net dns: remove debug codeSascha Hauer2012-04-151-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: use net_alloc_packet to allocate packetJean-Christophe PLAGNIOL-VILLARD2012-04-151-2/+2
|/ | | | | | | Was missing in net_init and net_new. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* netconsole: bail out if console_register failsSascha Hauer2012-04-131-1/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: add private extention 224 to pass the oftree file via dhcp.Jean-Christophe PLAGNIOL-VILLARD2012-04-101-0/+5
| | | | | | | | | | | | | | | | | | | | | DHCP option 224 to 254 are for private use, so use one. Export it via env dhcp_oftree_file. E.g. the ISC dhcp server can be configured with | option oftree-path code 224 = string | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek"; | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | option tftp-server-name "192.168.200.98"; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | option oftree-path "/tftpboot/atmel/at91sam9x5/sam9x5ek/sam9g25ek/dtb"; | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: eth: don't say that MAC comes from EEPROMWolfram Sang2012-04-051-1/+1
| | | | | | | Because it can also come in via other means. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>