beaglebone ethernet improvements

. added enable interrupts routine at the HW init stage
	. remove workaround, obsoleted by libnetdriver change
	. change netconf.sh to allow configuring this driver,
	  changed README.txt to reflect this

Change-Id: Ib659d5a55be96022b5e9013caa556dca5092ce89
This commit is contained in:
Michal Maka 2013-08-13 17:01:14 +02:00 committed by Ben Gras
parent 3ef93645b9
commit 0c044c6b02
3 changed files with 10 additions and 23 deletions

View file

@ -99,17 +99,18 @@ card()
printf "%2d. %s %s\n" "$card_number" "$card_mark" "$card_name"
}
first_pcicard=4
first_pcicard=5
cards()
{
# Run lspci once to a temp file for use in 'card' function
lspci >$LSPCI || exit
lspci >$LSPCI 2>/dev/null || true
card 0 "No Ethernet card (no networking)"
card 1 "3Com 501 or 3Com 509 based card"
card 2 "Realtek 8029 based card (also emulated by Qemu)" "10EC:8029"
card 3 "NE2000, 3com 503 or WD based card (also emulated by Bochs)"
card 4 "lan8710a (on BeagleBone, BeagleBone Black)"
n=$first_pcicard
for pcicard in $pci_list
do var=\$pci_descr$pcicard; descr="`eval echo $var`"
@ -201,6 +202,7 @@ drv_params()
test "$v" = 1 && echo "Note: After installing, edit $LOCALRC to the right configuration."
test "$v" = 1 && echo " chose option 4, the defaults for emulation by Bochs have been set."
;;
4) driver=lan8710a; ;;
$first_after_pci) driver="psip0"; ;;
*) warn "choose a number"
esac

View file

@ -8,14 +8,9 @@ created July 2013, JPEmbedded (info@jpembedded.eu)
--------------------------------------------------------------------------------
* INSTALLATION: *
--------------------------------------------------------------------------------
To install LAN8710A for BeagleBone under MINIX you have to edit /etc/inet.conf
by adding line:
eth0 lan8710a 0 { default; };
and changing:
psip0 { default; };
to:
psip1;
Restart the system and the driver should work.
To install LAN8710A for BeagleBone under MINIX you execute 'netconf' as
usual. Select the LAN8710A driver from the list. Restart the system
and the driver should work.
--------------------------------------------------------------------------------
* TESTS: *

View file

@ -58,7 +58,6 @@ main(int argc, char *argv[])
message m;
int r;
int ipc_status;
static int rx_first_enabled = FALSE;
/* SEF local startup */
env_setargs(argc, argv);
@ -90,18 +89,6 @@ main(int argc, char *argv[])
break;
case DL_GETSTAT_S:
lan8710a_getstat(&m);
/*
* Workaround:
* Re-enabling interrupts here is made to avoid
* problem that Rx interrupt came when it can't
* be handled. When this problem occurs next Rx
* interrupts don't appear.
*/
if(rx_first_enabled == FALSE) {
rx_first_enabled = TRUE;
lan8710a_enable_interrupt(RX_INT |
TX_INT);
}
break;
default:
panic("Illegal message: %d", m.m_type);
@ -796,6 +783,9 @@ lan8710a_init_hw(void)
/* GMII RX and TX release from reset. */
lan8710a_reg_set(CPSW_SL_MACCONTROL(1), CPSW_SL_GMII_EN);
/* Enable interrupts. */
lan8710a_enable_interrupt(RX_INT | TX_INT);
return TRUE;
}