summaryrefslogtreecommitdiffstats
path: root/drivers/net/rtl8169.c
Commit message (Collapse)AuthorAgeFilesLines
* net: Update Realtek r8169 driverSascha Hauer2023-05-231-562/+0
| | | | | | | | This updates the r8169 driver from Linux-6.3-rc7. The driver code itself is mostly taken from the old driver, but all the initialization code and file structure has been taken from Linux. Tested on a RTL8125 chip. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: pass physical device for DMA APIAhmad Fatoum2023-04-171-4/+5
| | | | | | | | | | | It shouldn't matter for now, but DMA API should always be called for the physical device, i.e. the struct device underlying the struct pci_device. This the Ethernet device interface parent, so use that instead. Cc: Denis Orlov <denorl2009@gmail.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230414145259.3644816-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-101-1/+1
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: free allocated memory on halt()Denis Orlov2022-08-091-0/+12
| | | | | | | | Otherwise it just leaks. Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20220720133100.13580-8-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: enable pci device bus mastering on ifupDenis Orlov2022-08-091-0/+2
| | | | | | | | | Otherwise, the board hangs on doing ifup after ifdown as the latter disables bus mastering for the device in rtl8169_eth_halt(). Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20220720133100.13580-7-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: properly map rx/tx buffers for dmaDenis Orlov2022-08-091-17/+20
| | | | | | Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20220720133100.13580-6-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: make it work on big-endian systemAntony Pavlov2022-06-171-17/+17
| | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Link: https://lore.barebox.org/20220616090351.645589-1-antonynpavlov@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: Do not zero out DMA coherent memoryAndrey Smirnov2019-05-281-3/+0
| | | | | | | | Memory returned by dma_alloc_coherent() should already be zeroed out, so there's no need to do this explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Make use of device_pci_driver()Andrey Smirnov2019-02-181-6/+1
| | | | | | | Replace all of the generic PCI boilerplate with device_pci_driver(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: net: convert drivers to spdxOleksij Rempel2018-12-061-12/+1
| | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: get rid of DMA_ADDRESS_BROKENLucas Stach2015-11-131-4/+6
| | | | | | | | Don't assume a 1:1 virt to phys mapping, but use the real physical address returned by the dma alloc function. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: Make set_ethaddr argument constSascha Hauer2015-06-261-1/+1
| | | | | | | The set_ethaddr callback should not modify the MAC address passed to it, so make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: convert to streaming DMA opsLucas Stach2015-03-061-17/+13
| | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: move DMA alloc functions to dma.hLucas Stach2015-03-061-0/+1
| | | | | | | | | | This better separates the DMA from the MMU functionality. Also move all drivers that only depends on asm/mmu.h for the alloc functions over to the common header. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: change dma_alloc/free_coherent to match other architecturesLucas Stach2015-03-061-2/+2
| | | | | | | | | As a lot drivers currently rely on the 1:1 virt->phys mapping on ARM we define DMA_ADDRESS_BROKEN to mark them. In order to use them on other architectures with a different mapping they need proper fixing. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: silence compiler warningLucas Stach2015-02-251-2/+2
| | | | | | | | Silence warning about cast from volatile to normal pointer, as this is the intended bhavior here. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: remove unnecessary cache maintenanceLucas Stach2015-01-051-19/+5
| | | | | | | | | The buffer descriptors are allocated from coherent memory, so there is no cache maintenance needed. Only tell the compiler that the descriptors can be modified by the hardware. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: clean receive buffer after net handlerLucas Stach2014-11-031-0/+11
| | | | | | | | | | The processing of the buffer might change some data, which will eventually trigger a cache writeback later on, corrupting data written by the network chip. Clean the cache range to make sure there is no writeback pending. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: rtl8169: add support for RTL-8168/8111gLucas Stach2014-11-031-0/+1
| | | | | | | This is the version of the chip found on Jetson-TK1. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: add rtl8169 driverLucas Stach2014-10-081-0/+566
| | | | | | | | This adds the driver for RealTek 8169 and compatible pci attached network chips. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove unported includes and driversSascha Hauer2007-09-211-876/+0
|
* svn_rev_057Sascha Hauer2007-07-051-0/+876
move all ethernet drivers to drivers/net