Commit Graph

20 Commits

Author SHA1 Message Date
yongari
506226a8f9 Make sure to clear IFF_DRV_RUNNING to reinitialize controller.
While I'm here update if_oerrors counter when driver encounters
watchdog timeout.
2010-09-21 17:31:14 +00:00
delphij
c44e63a4c0 Change copyright holder to author. We prefer using a real legal
entity for copyright holders.

Approved by:	sephe
MFC after:	3 days
2010-07-30 17:51:22 +00:00
yongari
9b1c572dee Only Tx checksum offloading is supported now. Remove experimental
code sneaked in r199611.
2009-11-20 20:43:16 +00:00
yongari
2bcead904d Add __FBSDID. 2009-11-20 20:40:34 +00:00
yongari
e9b6334340 Add IPv4/TCP/UDP Tx checksum offloading support. It seems the
controller also has support for IP/TCP checksum offloading for Rx
path. But I failed to find to way to enable Rx MAC to compute the
checksum of received frames.
2009-11-20 20:33:59 +00:00
yongari
7856588d16 Because we know received bytes including CRC there is no reason to
call m_adj(9). The controller also seems to have a capability to
strip CRC bytes but I failed to activate this feature except for
loopback traffic.
2009-11-20 20:25:21 +00:00
yongari
19294d603b Add initial endianness support. It seems the controller supports
both big-endian and little-endian format in descriptors for Rx path
but I couldn't find equivalent feature in Tx path. So just stick to
little-endian for now.
2009-11-20 20:18:53 +00:00
yongari
7f7c2c1370 Remove unnecessary structure packing. 2009-11-20 20:12:37 +00:00
yongari
5b747869ce Fix copy & paste error and remove extra space before colon.
Pointed out by: danfe
2009-11-19 22:59:52 +00:00
yongari
92a044b3fb Use capability pointer to access PCIe registers rather than
directly access them at fixed address. Frequently the register
offset could be changed if additional PCI capabilities are added to
controller.
One odd thing is ET_PCIR_L0S_L1_LATENCY register. I think it's PCIe
link capabilities register but the location of the register does
not match with PCIe capability pointer + offset. I'm not sure it's
shadow register of PCIe link capabilities register.
2009-11-19 22:53:41 +00:00
yongari
d49024b6f4 Use bus_{read,write}_4 rather than bus_space_{read,write}_4. 2009-11-19 22:06:19 +00:00
yongari
34e178ad01 style(9) 2009-11-19 21:53:21 +00:00
yongari
73e4fc5417 Remove extra spce at the EOL. 2009-11-19 21:46:58 +00:00
yongari
16c3f51160 Add MSI support. 2009-11-19 21:45:06 +00:00
yongari
2192f568cc Destroy driver mutex in device detach. 2009-11-19 21:39:43 +00:00
yongari
6dfe2c48c0 Remove support code for FreeBSD 6.x versions. 2009-11-19 21:08:33 +00:00
yongari
0e9ac8ec16 Remove complex macros that were used to compute bits values.
Although these macros may have its own strength, its complex
definition make hard to read the code.

Approved by:	delphij
2009-11-19 20:57:35 +00:00
rwatson
be5740a255 Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs.  This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.

For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 11:45:06 +00:00
delphij
3b0f89fd90 Don't leak DMA map if not freed.
Submitted by:	kevlo
2008-07-11 18:26:12 +00:00
delphij
ee624c02de Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit
Ethernet device driver, written by sephe@

Obtained from:	DragonFly
Sponsored by:	iXsystems
MFC after:	2 weeks
2008-06-20 19:28:33 +00:00