summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethoc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵David S. Miller2009-10-271-10/+11
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/sh_eth.c
| * ethoc: clear only pending irqsThomas Chou2009-10-181-1/+1
| | | | | | | | | | | | | | | | | | This patch fixed the problem of dropped packets due to lost of interrupt requests. We should only clear what was pending at the moment we read the irq source reg. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ethoc: inline regs accessThomas Chou2009-10-181-9/+10
| | | | | | | | | | Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2009-10-131-1/+2
|\ \ | |/ | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * ethoc: fix warning from 32bit buildAlan Cox2009-10-131-1/+2
| | | | | | | | | | | | | | | | | | drivers/net/ethoc.c: In function ‘ethoc_open’: drivers/net/ethoc.c:667: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: Use netdev_alloc_skb_ip_align()Eric Dumazet2009-10-131-2/+2
|/ | | | | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethoc: limit the number of buffers to 128Thomas Chou2009-10-071-2/+2
| | | | | | | | Only 128 buffer descriptors are supported in the core. Limit the number in case we have more memory. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethoc: use system memory as bufferThomas Chou2009-10-071-20/+44
| | | | | | | | | | | | | This patch enabled the ethoc to allocate system memory as buffer when there is no dedicated buffer memory. Some hardware designs may not have dedicated buffer memory such as on chip or off chip SRAM. In this case, only one memory resource is supplied in the platform data instead of two. Then a DMA buffer can be allocated from system memory and used for the transfer. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethoc: align received packet to make IP header at word boundaryThomas Chou2009-10-071-0/+4
| | | | | | | | | | | | The packet buffer is allocated at 4 bytes boundary, but the IP header length and version bits is located at byte 14. These bit fields access as 32 bits word and caused exception on processors that do not support unaligned access. The patch adds 2 bytes offset to make the bit fields word aligned. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethoc: fix buffer address mappingThomas Chou2009-10-071-4/+3
| | | | | | | | | | | | The pointer address in buffer descriptors is physical address. The pointer that processor used to access packet is virtual address. Though the higher bits of pointer address used by the MAC may be truncated to zero in special case, it is not always true in larger designs. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethoc: fix typo to compute number of tx descriptorsThomas Chou2009-10-071-1/+1
| | | | | | | | | It should be max() instead of min(). Use 1/4 of available descriptors for tx, and there should be at least 2 tx descriptors. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: Kill now superfluous ->last_rx storesEric Dumazet2009-09-021-1/+0
| | | | | | | | | | The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Neil Horman <nhorman@txudriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger2009-09-011-1/+1
| | | | | | | | | | | | In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: Correct redundant testJulia Lawall2009-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | res has already been tested. It seems that this test should be on the recently returned value mmio. A simplified version of the semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; @@ if (x == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( *x == NULL | *x != NULL ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix network driver ndo_start_xmit() return values (part 1)Patrick McHardy2009-06-131-3/+3
| | | | | | | | | | | | | Fix up drivers that return an errno value to qdisc_restart(), causing qdisc_restart() to print a warning and requeue/retransmit the skb. - xpnet: memory allocation error, intention is to drop - ethoc: oversized packet, packet must be dropped - ibmlana: skb freed: use after free - rrunner: skb freed: use after free Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.Thierry Reding2009-03-271-0/+1112
This patch adds a platform device driver that supports the OpenCores 10/100 Mbps Ethernet MAC. The driver expects three resources: one IORESOURCE_MEM resource defines the memory region for the core's memory-mapped registers while a second IORESOURCE_MEM resource defines the network packet buffer space. The third resource, of type IORESOURCE_IRQ, associates an interrupt with the driver. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud