#
91627368 |
|
26-Dec-2023 |
Mark Johnston <markj@FreeBSD.org> |
ti: Handle errors from copyin() and copyout() This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week
|
#
685dc743 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
de17d6f9 |
|
01-Mar-2022 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert if_ti(4) to IfAPI Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37806
|
#
eae4b615 |
|
06-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
ti: Remove unused devclass argument to DRIVER_MODULE.
|
#
74765431 |
|
03-Dec-2021 |
Scott Long <scottl@FreeBSD.org> |
Fix "set but not used" for the ti driver Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
a4667e09 |
|
19-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). Remove page zeroing code from consumers and stop specifying VM_ALLOC_NOOBJ. In a few places, also convert an allocation loop to simply use VM_ALLOC_WAITOK. Similarly, convert vm_page_alloc_domain() callers. Note that callers are now responsible for assigning the pindex. Reviewed by: alc, hselasky, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31986
|
#
b1603638 |
|
28-Aug-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
Fix a common typo in man pages and src comments - s/desciptor/descriptor/ MFC after: 5 days
|
#
4740159a |
|
01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
ti: clean up empty lines in .c and .h files
|
#
0407b8bf |
|
21-Oct-2019 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Convert to if_foreach_llmaddr() KPI.
|
#
88ea538a |
|
07-Jun-2019 |
Mark Johnston <markj@FreeBSD.org> |
Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m). These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave it alone. But, all existing uses of the former apply to unmanaged pages, which are never enqueued in the first place. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20470
|
#
d7c5a620 |
|
18-May-2018 |
Matt Macy <mmacy@FreeBSD.org> |
ifnet: Replace if_addr_lock rwlock with epoch + mutex Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366
|
#
df57947f |
|
18-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
spdx: initial adoption of licensing ID tags. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133
|
#
92993af4 |
|
23-Sep-2017 |
Alan Cox <alc@FreeBSD.org> |
Since the page "frame" doesn't belong to a vm object, it can't be paged out. Since it can't be paged out, it is never actually enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that the page "frame" is being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE. MFC after: 1 week
|
#
453130d9 |
|
02-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: minor spelling fixes. Most affect comments, very few have user-visible effects.
|
#
d9c9c81c |
|
21-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: use our roundup2/rounddown2() macros when param.h is available. rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
|
#
74b8d63d |
|
10-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Cleanup unnecessary semicolons from the kernel. Found with devel/coccinelle.
|
#
2bab0c55 |
|
08-Jan-2016 |
Gleb Smirnoff <glebius@FreeBSD.org> |
New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and up to now. The new sendfile is the code that Netflix uses to send their multiple tens of gigabits of data per second. The new implementation features asynchronous I/O, when I/O operations are launched, but not awaited to be complete. An explanation of why such behavior is beneficial compared to old one is going to be too long for a commit message, so we will skip it here. Additional features of new syscall are extra flags, which provide an application more control over data sent. The SF_NOCACHE flag tells kernel that data shouldn't be cached after it was sent. The SF_READAHEAD() macro allows to specify readahead size in pages. The new syscalls is a drop in replacement. No modifications are required to applications. One can take nginx binary for stable/10 and run it successfully on head. Although SF_NODISKIO lost its original sense, as now sendfile doesn't block, and now means something completely different (tm), using the new sendfile the old way is absolutely safe. Celebrates: Netflix global launch! Sponsored by: Nginx, Inc. Sponsored by: Netflix Relnotes: yes
|
#
71d82755 |
|
23-Jun-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Fix r284722, by making it actually compile. Pointy hat to: dim
|
#
42e2071b |
|
23-Jun-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0.
|
#
2a8c860f |
|
05-Jan-2015 |
Robert Watson <rwatson@FreeBSD.org> |
In order to reduce use of M_EXT outside of the mbuf allocator and socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division
|
#
0353415e |
|
26-Sep-2014 |
Gleb Smirnoff <glebius@FreeBSD.org> |
- Mechanically convert to if_inc_counter() the rest of counters. - Do not set if_collisions on interrupt, read them in ti_get_counter(). - Add missing bus_dmamap_sync(BUS_DMASYNC_PREREAD) in ti_ioctl2(). [1] Submitted by: mav [1]
|
#
c34f1a08 |
|
17-Jun-2014 |
John Baldwin <jhb@FreeBSD.org> |
Fix teardown of static DMA allocations in various NIC drivers: - Add missing calls to bus_dmamap_unload() in et(4). - Check the bus address against 0 to decide when to call bus_dmamap_unload() instead of comparing the bus_dma map against NULL. - Check the virtual address against NULL to decide when to call bus_dmamem_free() instead of comparing the bus_dma map against NULL. - Don't clear bus_dma map pointers to NULL for static allocations. Instead, treat the value as completely opaque. - Pass the correct virtual address to bus_dmamem_free() in wpi(4) instead of trying to free a pointer to the virtual address. Reviewed by: yongari
|
#
3ae10f74 |
|
16-Jun-2014 |
Attilio Rao <attilio@FreeBSD.org> |
- Modify vm_page_unwire() and vm_page_enqueue() to directly accept the queue where to enqueue pages that are going to be unwired. - Add stronger checks to the enqueue/dequeue for the pagequeues when adding and removing pages to them. Of course, for unmanaged pages the queue parameter of vm_page_unwire() will be ignored, just as the active parameter today. This makes adding new pagequeues quicker. This change effectively modifies the KPI. __FreeBSD_version will be, however, bumped just when the full cache of free pages will be evicted. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
|
#
76039bc8 |
|
26-Oct-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
#
9d1c4ca7 |
|
19-Aug-2013 |
Andre Oppermann <andre@FreeBSD.org> |
Remove unused and incomplete support for delayed fragment checksums from bce(4), bxe(4), mge(4) and ti(4) drivers.
|
#
c6499ecc |
|
04-Dec-2012 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags in sys/dev.
|
#
29658c96 |
|
05-Nov-2012 |
Dimitry Andric <dim@FreeBSD.org> |
Remove duplicate const specifiers in many drivers (I hope I got all of them, please let me know if not). Most of these are of the form: static const struct bzzt_type { [...list of members...] } const bzzt_devs[] = { [...list of initializers...] }; The second const is unnecessary, as arrays cannot be modified anyway, and if the elements are const, the whole thing is const automatically (e.g. it is placed in .rodata). I have verified this does not change the binary output of a full kernel build (except for build timestamps embedded in the object files). Reviewed by: yongari, marius MFC after: 1 week
|
#
a8eeb50c |
|
31-Oct-2012 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove TCP/UDP checksum offloading feature for IP fragmented datagrams. Traditionally upper stack fragmented packets without computing TCP/UDP checksum and these datagrams were passed to driver. But there are chances that other packets slip into the interface queue in SMP world. If this happens firmware running on MIPS 4000 processor in the controller would see mixed packets and it shall send out corrupted packets. While I'm here simplify checksum offloading setup. MFC After: 1 week
|
#
3b03ca3b |
|
14-Dec-2011 |
Alan Cox <alc@FreeBSD.org> |
Eliminate vestiges of page coloring.
|
#
b7c2632d |
|
14-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Overhaul bus_dma(9) usage in driver: - Don't use a single big DMA block for all rings. Create separate DMA area for each ring instead. Currently the following DMA areas are created: Event ring, standard RX ring, jumbo RX ring, RX return ring, hardware MAC statistics and producer/consumer status area. For Tigon II, mini RX ring and TX ring are additionally created. - Added missing bus_dmamap_sync(9) in various TX/RX paths. - TX ring is no longer created for Tigon 1 such that it saves more resources on Tigon 1. - Data sheet is not clear about alignment requirement of each ring so use 32 bytes alignment for normal DMA area but use 64 bytes alignment for jumbo RX ring where the extended RX descriptor size is 64 bytes. - For each TX/RX buffers use separate DMA tag(e.g. the size of a DMA segment, total size of DMA segments etc). - Tigon allows separate DMA area for event producer, RX return producer and TX consumer which is really cool feature. This means TX and RX path could be independently run in parallel. However ti(4) uses a single driver lock so it's meaningless to have separate DMA area for these producer/consumer such that this change creates a single status DMA area. - It seems Tigon has no limits on DMA address space and I also don't see any problem with that but old comments in driver indicates there could be issues on descriptors being located in 64bit region. Introduce a tunable, dev.ti.%d.dac, to disable using 64bit DMA in driver. The default is 0 which means it would use full 64bit DMA. If there are DMA issues, users can disable it by setting the tunable to 0. - Do not increase watchdog timer in ti_txeof(). Previously driver increased the watchdog timer whenever there are queued TX frames. - When stat ticks is set to 0, skip processing ti_stats_update(), avoiding bus_dmamap_sync(9) and updating if_collisions counter. - MTU does not include FCS bytes, replace it with ETHER_VLAN_ENCAP_LEN. With these changes, ti(4) should work on PAE environments. Many thanks to Jay Borkenhagen for remote hardware access.
|
#
e79b2432 |
|
14-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Export sysctl node for various interrupt moderation parameters and have administrators control them. ti(4) provides a character device to control various other features of driver via ioctls but users had to write their own code to manipulate these parameters. It seems some default values for these parameters are not optimal on today's system but leave it as it was and let administrators change them. The following parameters could be changed: dev.ti.%d.rx_coal_ticks dev.ti.%d.rx_max_coal_bds dev.ti.%d.tx_coal_ticks dev.ti.%d.tx_max_coal_bds dev.ti.%d.tx_buf_ratio dev.ti.%d.stat_ticks The interface has to be brought down and up again before a change takes effect. ti(4) controller supports hardware MAC counters with additional DMA statistics. So it's doable to export these counters via sysctl interface. Unfortunately, these counters are cumulative such that driver have to either send an explicit clear command to controller after extracting them or have to maintain internal counters to get actual changes. Neither look good to me so counters were not exported via sysctl.
|
#
9b81d5e3 |
|
14-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
It's bad idea to allocate large memory, 4KB, from stack. Pre-allocate the memory in device attach time. While I'm here remove unnecessary reassignment of error variable as it was already initialized. Also added a missing driver lock in TIIOCSETTRACE handler.
|
#
ecf3f60f |
|
10-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove dead ifdef. Driver should always check raised interrupt is for the device.
|
#
8a9710aa |
|
10-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
style. No functional changes.
|
#
10a4360c |
|
08-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Retire 'options TI_PRIVATE_JUMBOS' and replace local jumbo allocator with UMA backed jumbo allocator by default. Previously ti(4) used sf_buf(9) interface for jumbo buffers but it was broken at this moment such that enabling jumbo frame caused instant panic. Due to the nature of sf_buf(9) it heavily relies on VM changes but it seems ti(4) was not received much blessing from VM gurus. I don't understand VM magic and implications used in driver either. Switching to UMA backed jumbo allocator like other network drivers will make jumbo frame work on ti(4). While I'm here, fully allocate all RX buffers. This means ti(4) now uses 512 RX buffer and 1024 mini RX buffers. To use sf_buf(9) interface for jumbo buffers, introduce a new 'options TI_SF_BUF_JUMBO'. If it is proven that sf_buf(9) is better for jumbo buffers, interesting developers can fix the issue in future. ti(4) still needs more bus_dma(9) cleanups and should use separate DMA tag/map for each ring(standard, jumbo, mini, command, event etc) but it should work on all platforms except PAE. Special thanks to Jay[1] who provided complete remote debugging access. Tested by: Jay Borkenhagen <jayb <> braeburn dot org > [1]
|
#
f9ea040e |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Do not allow changing MTU to be less than the minimum.
|
#
aeeee7ee |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
If ti_chipinit() fails in ti_stop(), ignore the error and release all allocated TX/RX buffer resources. If the interface is brought to up again after the error, we will leak allocated TX/RX buffers.
|
#
4fce1b52 |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Show RX buffer allocation failure and do not blindly send alive message to firmware. Probably the correct way for this error is to send a TI_CMD_CODE_STACK_DOWN message to firmware and let firmware handle the rest.
|
#
6280f2fb |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Mini ring is not available on Tigon 1 so do not create DMA maps for mini ring on Tigon 1 to save resources.
|
#
7beaf112 |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Track which ring was updated in RX handler and update only modified ring. This should reduce unnecessary register accesses.
|
#
18707510 |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
o Remove unnecessary controller reinitialization. o Do not blindly UP controller when MTU is changed. Reinitialize controller only if driver is running. o Remove useless ti_stop() in ti_watchdog() since ti_init_locked() always invokes ti_stop().
|
#
bb6ebb6a |
|
07-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove ti_unit member variable in softc. While I'm here use PCIR_BAR macro.
|
#
129f7efd |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Implement altq(4) support. While I'm here fix a logic error in r227098 where it didn't re-enable interrupts when TX queue is empty.
|
#
9c6960c6 |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Because ti(4) drops a driver lock in RX handler, check whether driver is still running before re-enabling interrupts.
|
#
85d21e66 |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Don't abuse if_hwassist and make sure enabling corresponding TX/RX checksum offloading and VLAN hardware tag insertion/stripping from the currently enabled hardware offloading capabilities. Previously if_hwassist, which was initialized to TX/RX checksum offloading, was blindly used to enable both TX and RX checksum offloading such that disabling either TX or RX checksum offloading was not possible. ti(4) controllers support TX/RX checksum offloading with VLAN tagging so announce TX/RX checksum offloading capability over VLAN to vlan(4). Make VLAN hardware tag insertion/stripping honors currently enabled interface capability instead of blindly enabling VLAN hardware tagging. This change allows disabling hardware support of VLAN tag. Because ti(4) supports VLAN oversized frames, make network stack know the capability by setting if_hdrlen. While I'm here, rewrite SIOCSIFCAP handler and make sure to reinitialize controller whenever TX/RX checksum offloading and VLAN hardware tagging option is changed. The requirement of controller reinitialization comes from the limitation of Tigon I/II firmware. Tigon I/II firmware requires all related RCBs should be reinitialized whenever any of its hardware offloading capabilities change. vlan(4) is also notified whenever the parent interface's capability changes such that it can correctly handle TX/RX checksum offloading based on parent interface's enabled offloading capabilities. RX checksum offloading handler was changed to make upper stack use controller computed partial checksum value. Previously, ti(4) just set the computed value for any frames(IPv4, IPv6) and the value was not used in upper stack because driver didn't set CSUM_DATA_VALID such that upper network stack had to recompute checksum of TCP/UDP packets. I have no idea how this was not noticed for a long time. With this change, upper network stack does not have to fully recompute the checksum such that calculating pseudo checksum based on partial checksum is sufficient to know whether received packet's checksum is correct or not. However, I don't know why ti(4) does not have controller compute pseudo checksum as controller has ability to do it. I'm just guessing enabling that feature could trigger a firmware bug or could be slower than computing it on host side so just leave it as it was. In order not to produce false positives, ti(4) now checks whether controller actually computed IP or TCP/UDP checksum by checking ti_flags field.
|
#
9645f9eb |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Don't clear upper 4bits from VLAN tag information. It's responsibility of vlan(4) to extract VLAN id from the tag information and vlan(4) correctly handles it.
|
#
148386d9 |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Introduce ti_ifmedia_upd_locked() to use in driver initialization and add missing driver lock for both ti_ifmedia_upd() and ti_ifmedia_sts().
|
#
945c2126 |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Announce IFCAP_LINKSTATE capability and let network stack know link state changes. Hide superfluous link up/down message under bootverbose since if_link_state_change(9) shows that information. While I'm here, change baudrate with the resolved speed of the established link instead of blindly setting it 1G. Unfortunately, it seems there is no way to differentiate 10/100Mbps from non-gigabit link so just assume we established a 100Mbps link if current link is not a gigabit link.
|
#
5948254c |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Make sure to unload loaded DMA area(descriptor, command, event ring).
|
#
5ddfea8c |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
s/u_intXX_t/uintXX_t/g
|
#
ee715c5f |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Make ti(4) build with 'options TI_PRIVATE_JUMBOS'. This was broken in r175872. We have a UMA backed jumbo allocator and that is much better implementation than having a local jumbo buffer allocator in driver. This local allocator would be removed in near future but fixing build before removal wouldn't be a bad idea.
|
#
504dc87b |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
style. No functional changes.
|
#
7034f3ad |
|
04-Nov-2011 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Use ANSI function definations.
|
#
a1d090d4 |
|
11-Mar-2011 |
Marius Strobl <marius@FreeBSD.org> |
- Allocate the DMA memory shared between the host and the controller as coherent. - Constify the ti_devs table. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. MFC after: 2 weeks
|
#
a7d5f7eb |
|
19-Oct-2010 |
Jamie Gritton <jamie@FreeBSD.org> |
A new jail(8) with a configuration file, to replace the work currently done by /etc/rc.d/jail.
|
#
492d0176 |
|
03-May-2010 |
Alan Cox <alc@FreeBSD.org> |
Neither the page lock nor the page queues lock is required to unwire and free a VM_ALLOC_NOOBJ page. (Such pages are unmanaged.)
|
#
7cf545d0 |
|
19-Nov-2009 |
John Baldwin <jhb@FreeBSD.org> |
- Add a private timer to drive the transmit watchdog instead of using if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else.
|
#
eb956cd0 |
|
26-Jun-2009 |
Robert Watson <rwatson@FreeBSD.org> |
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
|
#
d7f03759 |
|
19-Oct-2008 |
Ulf Lilleengen <lulf@FreeBSD.org> |
- Import the HEAD csup code which is the basis for the cvsmode work.
|
#
44f8f2fc |
|
26-Apr-2008 |
Marius Strobl <marius@FreeBSD.org> |
Remove some remnant alpha hacks. Approved by: PCI-maintainers (imp, jhb)
|
#
662cac9f |
|
26-Mar-2008 |
Christian Brueffer <brueffer@FreeBSD.org> |
Fix some "in in" typos in comments. PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
|
#
f17edc74 |
|
19-Feb-2008 |
Remko Lodder <remko@FreeBSD.org> |
Set the baudrate for if_ti. PR: kern/40516 Submitted by: "Jin Guojun[VFF]" <jin at adsl-63-198-35-122 dot dsl dot snfc21 dot pacbell dot net> Approved by: imp (mentor, implicit for minor changes) MFC After: 1 week
|
#
cf827063 |
|
01-Feb-2008 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Give MEXTADD() another argument to make both void pointers to the free function controlable, instead of passing the KVA of the buffer storage as the first argument. Fix all conventional users of the API to pass the KVA of the buffer as the first argument, to make this a no-op commit. Likely break the only non-convetional user of the API, after informing the relevant committer. Update the mbuf(9) manual page, which was already out of sync on this point. Bump __FreeBSD_version to 800016 as there is no way to tell how many arguments a CPP macro needs any other way. This paves the way for giving sendfile(9) a way to wait for the passed storage to have been accessed before returning. This does not affect the memory layout or size of mbufs. Parental oversight by: sam and rwatson. No MFC is anticipated.
|
#
6a087a87 |
|
21-Nov-2007 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Fix function prototype for device_shutdown method.
|
#
59a0d28b |
|
03-Mar-2007 |
Christian S.J. Peron <csjp@FreeBSD.org> |
Catch up the rest of the drivers with the ether_vlan_mtap modifications. If these drivers are setting M_VLANTAG because they are stripping the layer 2 802.1Q headers, then they need to be re-inserting them so any bpf(4) peers can properly decode them. It should be noted that this is compiled tested only. MFC after: 3 weeks
|
#
ef544f63 |
|
22-Feb-2007 |
Paolo Pisati <piso@FreeBSD.org> |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
|
#
c2175ff5 |
|
21-Jan-2007 |
Marius Strobl <marius@FreeBSD.org> |
Change the remainder of the drivers for DMA'ing devices enabled in the sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
|
#
78ba57b9 |
|
17-Sep-2006 |
Andre Oppermann <andre@FreeBSD.org> |
Move ethernet VLAN tags from mtags to its own mbuf packet header field m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content. Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field: m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG; to mark the packet m with the specified VLAN tag. On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid: if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... } VLAN tags are stored in host byte order. Byte swapping may be necessary. (Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.) Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done. Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
|
#
6b9f5c94 |
|
15-Sep-2006 |
Gleb Smirnoff <glebius@FreeBSD.org> |
- Consistently use if_printf() only in interface methods: if_start(), if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
|
#
329532e5 |
|
11-Aug-2006 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Fix invalid reference of mbuf chains. Use proper pointer dereference to inform modified mbuf chains to caller. While I'm here perform checksum offload setup after loading DMA maps. In collaboration with: glebius
|
#
ff3ced12 |
|
02-Jan-2006 |
Pyun YongHyeon <yongari@FreeBSD.org> |
- Tx side bus_dmamap_load_mbuf_sg(9) support. This reduces bookkeeping requiried to keep consistent softc state before/after callback function invocation and supposed to be sligntly faster than previous one as it wouldn't incur callback overhead. With this change callback function was gone. - Decrease TI_MAXTXSEGS to 32 from 128. It seems that most mbuf chain length is less than 32 and it would be re-packed with m_defrag(9) if its chain length is larger than TI_MAXTXSEGS. This would protect ti(4) against possible kernel stack overflow when txsegs[] is put on stack. Alternatively, we can embed the txsegs[] into softc. However, that would waste memory and make Tx/Rx speration hard when we want to sperate Tx/Rx handlers to optimize locking. - Fix dma map tracking used in Tx path. Previously it used the dma map of the last mbuf chain in ti_txeof() which was incorrect as ti(4) used dma map of the first mbuf chain when it loads a mbuf chain with bus_dmamap_load_mbuf(9). Correct the bug by introducing queues that keep track of active/inactive dma maps/mbuf chain. - Use ti_txcnt to check whether driver need to set watchdog timer instead of blidnly clearing the timer in ti_txeof(). - Remove the 3rd arg. of ti_encap(). Since ti(4) now caches the last descriptor index(ti_tx_saved_prodidx) used in Tx there is no need to pass it as a fuction arg. - Change data type of producer/consumer index to int from u_int16_t in order to remove implicit type conversions in Tx/Rx handlers. - Check interface queue before getting a mbuf chain to reduce locking overhead. - Check number of available Tx descriptores to be 16 or higher in ti_start(). This wouldn't protect Tx descriptor shortage but it would reduce number of bus_dmamap_unload(9) calls in ti_encap() when we are about to running out of Tx descriptors. - Command NIC to send packets ony when the driver really has packets enqueued. Previously it always set TI_MB_SENDPROD_IDX which would command NIC to DMA Tx descriptors into NIC local memory regardless of Tx descriptor changes. Reviewed by: scottl
|
#
557e53c6 |
|
28-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
Cache the tx producer index instead of reading it every time ti_start is called.
|
#
3c41ebd1 |
|
28-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
Fix a serious regression from the busdma conversion. Check to make sure that we don't overrun the tx descriptor ring before actually trying to overrun it.
|
#
d54c9057 |
|
27-Dec-2005 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Bring big-endian architecture support for ti(4). . remove unnecessay header files after Scott's bus_dma(9) commit. . remove global variable tis which was introduced at the time of zero_copy(9) changes. The variable tis was not used at all. The same applyes to ti_links in softc so axe it. . deregister variables. . axe ti_vhandle and switch to use explicit register access for accessing NIC local memory. Creates three variants of ti_mem to read/write NIC local memory(ti_mem_read, ti_mem_write) and clearing NIC local memory(ti_mem_zero). This greatly enhances code readability and have ti(4) drop using shared memory scheme for Tigon 1. As Tigon 1 switched to use explicit register access for Tx, axe ti_tx_ring_nic/ti_cmd_ring in softc.(Tigon 2 used to host ring scheme which means there is no need to access NIC local memory via register access for Tx and NIC would DMA the modified Tx rings into its local memory.) [1] . introduce new macro TI_EVENT_*/TI_CMD_* to handle NIC envent/command. Instead of using bit fields assginment for accessing the event, use shift operations to set/get it. [1] . add additional check for valid DMA tags in ti_free_dmamaps(). . add missing bus_dmamap_sync/bus_dmamap_unload in ti_free_*_ring_*. . fix locking nits(MTX_RECURSE mutex) and make ti(4) MPSAFE. . change data type of ti_rdata_phys to bus_addr_t and don't blindly cast to uint32_t. . rearrange detach path and make ti(4) survive during device detach. . for Tigon 1, use explicit register access for checking Tx descriptors in ti_encap()/ti_txeof(). [1] . properly call bus_dmamap_sync(9) for updating statistics. . remove extra semicolon in ti_encap() . rewrite loading MAC address to work on strict-alignment architectures. . move TI_RD_OFF macro to if_tireg.h . axe ETHER_ALIGN as it's already defined in <net/ethernet.h>. . make macros immuine from expansion by adding parenthesis and do-while. . remove alpha specific hack as vtophys(9) is no longer used in ti(4) after Scott's bus_dma(9) fix. Reviewed by: scottl Obtained from: OpenBSD [1]
|
#
d147662c |
|
18-Dec-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam
|
#
6239708b |
|
13-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
Fix the Tigon I/II driver to support 64-bit DMA. In the process, convert it to use busdma. Unlike most of the other drivers, but similar to the if_em driver, pre-allocate the dmamaps at init time instead of allocating them on the fly when descriptors need to be filled. This isn't ideal right now because a map is allocated for every descriptor slot in the tx, rx, mini, and jumbo rings (which is a lot!) in order to simplify the bookkeeping, even though the driver might support filling only a subset of those slots. Luckily, maps are typically NULL on i386 and amd64, so the cost isn't very high. It could be an issue with sparc64, but the driver isn't endian clean either, and that is a much bigger problem to solve first. Note that jumbo frame support is under-tested, and I'm not even sure if it till really works correctly given the evil VM magic that is does. The changes here attempt to preserve the existing semanitcs. Thanks to Martin Nillson for contributing the Netgear card for this work. MFC-After: 3 weeks
|
#
d29dab30 |
|
10-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
Allocate the jumbo rx frame buffer with busdma.
|
#
33ffa585 |
|
09-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
if_ti has been operating with locks for a while, so remove the GIANT markers. Also fix man potential locking problems in the cdev ioctl handler.
|
#
73c84207 |
|
09-Dec-2005 |
Scott Long <scottl@FreeBSD.org> |
The if_ti Tigon I/II driver has moved to /sys/dev/ti
|
#
4a0d6638 |
|
11-Nov-2005 |
Ruslan Ermilov <ru@FreeBSD.org> |
- Store pointer to the link-level address right in "struct ifnet" rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
|
#
e019908e |
|
13-Oct-2005 |
Ruslan Ermilov <ru@FreeBSD.org> |
In detach method, move if_free() after bus_teardown_intr().
|
#
dc6f0068 |
|
29-Sep-2005 |
John Baldwin <jhb@FreeBSD.org> |
Use if_printf() and device_printf().
|
#
3badacee |
|
16-Sep-2005 |
Ruslan Ermilov <ru@FreeBSD.org> |
Fix "struct ifnet" leaks when attach() fails in the middle, e.g. when mii_phy_probe() or bus_setup_intr() fails. For drivers that call their detach() in this case, call if_free() there to cover this case too.
|
#
13f4c340 |
|
09-Aug-2005 |
Robert Watson <rwatson@FreeBSD.org> |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
|
#
13b203d0 |
|
02-Aug-2005 |
Robert Watson <rwatson@FreeBSD.org> |
Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
|
#
8225bf4c |
|
06-Jul-2005 |
Scott Long <scottl@FreeBSD.org> |
Fix ifnet fallout in if_ti. Reviewed by: brooks Approved by: re
|
#
fc74a9f9 |
|
10-Jun-2005 |
Brooks Davis <brooks@FreeBSD.org> |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
|
#
d4fcf3cb |
|
28-May-2005 |
Yoshihiro Takahashi <nyan@FreeBSD.org> |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
|
#
69bbb4fe |
|
31-Mar-2005 |
Scott Long <scottl@FreeBSD.org> |
If resource allocation fails, we could wind up freeing the cdev without it being allocated. Add a simple check for this. Submitted by: yongari
|
#
52c94c38 |
|
26-Mar-2005 |
Sam Leffler <sam@FreeBSD.org> |
deal with malloc failure when setting up the multicast filter Noticed by: Coverity Prevent analysis tool
|
#
586cfbb2 |
|
21-Mar-2005 |
Scott Long <scottl@FreeBSD.org> |
Start the process of modernizing the Tigon driver by using busdma for the descriptor and configuration data. Thanks to Martin Nilsson for providing hardware.
|
#
d24ae19d |
|
24-Feb-2005 |
Warner Losh <imp@FreeBSD.org> |
Fix style(9) issues with __P removal. Noticed by: bde
|
#
d701c913 |
|
24-Feb-2005 |
Warner Losh <imp@FreeBSD.org> |
Return BUS_PROBE_DEFAULT instead of 0.
|
#
60727d8b |
|
06-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
/* -> /*- for license, minor formatting changes
|
#
370abcb3 |
|
05-Dec-2004 |
Alan Cox <alc@FreeBSD.org> |
Update the Tigon 1 and 2 driver to use the sf_buf API for implementing zero-copy receive of jumbo frames. This eliminates the need for the jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h. Remove it. Note: Zero-copy receive of jumbo frames did not work without these changes; I believe there was insufficient locking on the jumbo vm object. Tested by: ken@ Discussed with: gallatin@
|
#
2a567ae5 |
|
28-Aug-2004 |
Robert Watson <rwatson@FreeBSD.org> |
Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until they are either locked down or demonstrated MPSAFE.
|
#
140c64b1 |
|
05-Jul-2004 |
Bruce M Simpson <bms@FreeBSD.org> |
Whitespace pass.
|
#
03b37a46 |
|
05-Jul-2004 |
Bruce M Simpson <bms@FreeBSD.org> |
style(9): - Space before bracketized non-void function returns. - Space before condition for conditional blocks.
|
#
fb7411a6 |
|
05-Jul-2004 |
Bruce M Simpson <bms@FreeBSD.org> |
Eliminate redundant return keywords.
|
#
fdafab84 |
|
05-Jul-2004 |
Bruce M Simpson <bms@FreeBSD.org> |
Whitespace nits
|
#
89c9c53d |
|
16-Jun-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
#
f11d01c3 |
|
30-May-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add missing <sys/module.h> includes
|
#
5f96beb9 |
|
17-Mar-2004 |
Nate Lawson <njl@FreeBSD.org> |
Convert callers to the new bus_alloc_resource_any(9) API. Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
#
e3bbbec2 |
|
14-Mar-2004 |
Matthew N. Dodd <mdodd@FreeBSD.org> |
Announce ethernet MAC addresss in ether_ifattach().
|
#
aa0444ec |
|
11-Mar-2004 |
Maxime Henrion <mux@FreeBSD.org> |
Stop setting ifp->if_output to ether_output() since ether_ifattach() does it for us already.
|
#
dc08ffec |
|
21-Feb-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Device megapatch 4/6: Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
|
#
c9c7976f |
|
21-Feb-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Device megapatch 1/6: Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
|
#
5120abbf |
|
14-Nov-2003 |
Sam Leffler <sam@FreeBSD.org> |
Drop the driver lock around calls to if_input to avoid a LOR when the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson
|
#
9bf40ede |
|
31-Oct-2003 |
Brooks Davis <brooks@FreeBSD.org> |
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
|
#
47850d0a |
|
10-Oct-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Sanitize the code relating to the /dev/ti%d entries. In particular evict the evil vnode sniffing code and use destroy_dev() instead.
|
#
19b7ffd1 |
|
22-Aug-2003 |
Warner Losh <imp@FreeBSD.org> |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
#
c357858a |
|
04-Aug-2003 |
Hidetoshi Shimokawa <simokawa@FreeBSD.org> |
Enable IFCAP_VLAN_MTU and increase MTU for it. Reviewed by: wpaul
|
#
d07c19e5 |
|
13-Jun-2003 |
Maxime Henrion <mux@FreeBSD.org> |
Remove code that tries to detect if the MCLSHIFT and MSIZE macros are the same that those of the kernel in the KLD_MODULE case. If we ever want to detect that kind of problems, this is not the right place to do this since every network driver would be affected by such desynchronisation.
|
#
1000b87f |
|
31-May-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Remove now unused pointer to etherheader. Found by: FlexeLint
|
#
214073e5 |
|
21-Apr-2003 |
Warner Losh <imp@FreeBSD.org> |
Use newly minted device_is_attached rather than device_is_alive to see if attach succeeded. device_is_alive just tells us that probe succeeded. Since we were using it to do things like detach net interfaces, this caused problems when there were errors in the attach routine. Symptoms of problem reported by: martin blapp
|
#
693f4477 |
|
17-Apr-2003 |
Nate Lawson <njl@FreeBSD.org> |
Revise attach/detach resource cleanup - Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@. - Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here. - Call ether_ifdetach() in the irq setup failure case - ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does). - Add comments to indicate assumptions of code path
|
#
533294b9 |
|
15-Apr-2003 |
Matthew N. Dodd <mdodd@FreeBSD.org> |
- Don't call pci_enable_io() in drivers (unless needed for resume). - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
|
#
f246e4a1 |
|
15-Apr-2003 |
Matthew N. Dodd <mdodd@FreeBSD.org> |
- Express hard dependencies on bus (pci, isa, pccard) and network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
|
#
8368cf8f |
|
03-Apr-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID rather than rcsid[].
|
#
6f46bf60 |
|
01-Apr-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Fix KASSERT syntax error.
|
#
54f1f1d1 |
|
31-Mar-2003 |
Nate Lawson <njl@FreeBSD.org> |
Clean up locking and resource management for pci/if_* - Remove locking of the softc in the attach method, instead depending on bus_setup_intr being at the end of attach (delaying interrupt enable until after ether_ifattach is called) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This puts all resource freeing in one place, avoiding thinkos that lead to memory leaks. - Add bus_child_present check to calls to *_stop in the detach method to be sure hw is present before touching its registers. - Remove bzero softc calls since device_t should do this for us. - dc: move interrupt allocation back where it was before. It was unnecessary to move it. This reverts part of 1.88 - rl: move irq allocation before ether_ifattach. Problems might have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - xl: add missed error setting in I/O, memory mapping cases - xl: remove multi-level goto on attach failure - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation - Calls to free(9) are unconditional because it is valid to call free with a null pointer. Reviewed by: imp, mdodd
|
#
7ac40f5f |
|
02-Mar-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Gigacommit to improve device-driver source compatibility between branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
|
#
dd7a1461 |
|
02-Mar-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Spell noread() and nowrite() correctly (ie: not "NULL")
|
#
a163d034 |
|
18-Feb-2003 |
Warner Losh <imp@FreeBSD.org> |
Back out M_* changes, per decision of the TRB. Approved by: trb
|
#
44956c98 |
|
21-Jan-2003 |
Alfred Perlstein <alfred@FreeBSD.org> |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
#
9ef8b520 |
|
14-Nov-2002 |
Sam Leffler <sam@FreeBSD.org> |
o track either_ifattach/ether_ifdetach API changes o use if_input for input packet processing o don't strip the Ethernet header for input packets o use BPF_* macros bpf tapping o call ether_ioctl to handle default ioctl case o track vlan changes Reviewed by: many Approved by: re
|
#
f47789c8 |
|
08-Nov-2002 |
John Baldwin <jhb@FreeBSD.org> |
Use %z to print a size_t value.
|
#
2c876e15 |
|
16-Oct-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Be consistent about functions being static. Spotted by: FlexeLint.
|
#
780c174b |
|
03-Oct-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
Static'ify a variable. Submitted by: Matt Emmerton <matt@gsicomp.on.ca>
|
#
8e708563 |
|
23-Aug-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
style: put return types on a line by themselves.
|
#
7c41487d |
|
29-Jun-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
catch up with mextfree callback change when TI_PRIVATE_JUMBOS is defined. Pointed out by: kdm
|
#
160554fb |
|
28-Jun-2002 |
Peter Wemm <peter@FreeBSD.org> |
Remove a couple of __P() stragglers.
|
#
98cb733c |
|
25-Jun-2002 |
Kenneth D. Merry <ken@FreeBSD.org> |
At long last, commit the zero copy sockets code. MAKEDEV: Add MAKEDEV glue for the ti(4) device nodes. ti.4: Update the ti(4) man page to include information on the TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS kernel options, and also include information about the new character device interface and the associated ioctls. man9/Makefile: Add jumbo.9 and zero_copy.9 man pages and associated links. jumbo.9: New man page describing the jumbo buffer allocator interface and operation. zero_copy.9: New man page describing the general characteristics of the zero copy send and receive code, and what an application author should do to take advantage of the zero copy functionality. NOTES: Add entries for ZERO_COPY_SOCKETS, TI_PRIVATE_JUMBOS, TI_JUMBO_HDRSPLIT, MSIZE, and MCLSHIFT. conf/files: Add uipc_jumbo.c and uipc_cow.c. conf/options: Add the 5 options mentioned above. kern_subr.c: Receive side zero copy implementation. This takes "disposable" pages attached to an mbuf, gives them to a user process, and then recycles the user's page. This is only active when ZERO_COPY_SOCKETS is turned on and the kern.ipc.zero_copy.receive sysctl variable is set to 1. uipc_cow.c: Send side zero copy functions. Takes a page written by the user and maps it copy on write and assigns it kernel virtual address space. Removes copy on write mapping once the buffer has been freed by the network stack. uipc_jumbo.c: Jumbo disposable page allocator code. This allocates (optionally) disposable pages for network drivers that want to give the user the option of doing zero copy receive. uipc_socket.c: Add kern.ipc.zero_copy.{send,receive} sysctls that are enabled if ZERO_COPY_SOCKETS is turned on. Add zero copy send support to sosend() -- pages get mapped into the kernel instead of getting copied if they meet size and alignment restrictions. uipc_syscalls.c:Un-staticize some of the sf* functions so that they can be used elsewhere. (uipc_cow.c) if_media.c: In the SIOCGIFMEDIA ioctl in ifmedia_ioctl(), avoid calling malloc() with M_WAITOK. Return an error if the M_NOWAIT malloc fails. The ti(4) driver and the wi(4) driver, at least, call this with a mutex held. This causes witness warnings for 'ifconfig -a' with a wi(4) or ti(4) board in the system. (I've only verified for ti(4)). ip_output.c: Fragment large datagrams so that each segment contains a multiple of PAGE_SIZE amount of data plus headers. This allows the receiver to potentially do page flipping on receives. if_ti.c: Add zero copy receive support to the ti(4) driver. If TI_PRIVATE_JUMBOS is not defined, it now uses the jumbo(9) buffer allocator for jumbo receive buffers. Add a new character device interface for the ti(4) driver for the new debugging interface. This allows (a patched version of) gdb to talk to the Tigon board and debug the firmware. There are also a few additional debugging ioctls available through this interface. Add header splitting support to the ti(4) driver. Tweak some of the default interrupt coalescing parameters to more useful defaults. Add hooks for supporting transmit flow control, but leave it turned off with a comment describing why it is turned off. if_tireg.h: Change the firmware rev to 12.4.11, since we're really at 12.4.11 plus fixes from 12.4.13. Add defines needed for debugging. Remove the ti_stats structure, it is now defined in sys/tiio.h. ti_fw.h: 12.4.11 firmware. ti_fw2.h: 12.4.11 firmware, plus selected fixes from 12.4.13, and my header splitting patches. Revision 12.4.13 doesn't handle 10/100 negotiation properly. (This firmware is the same as what was in the tree previously, with the addition of header splitting support.) sys/jumbo.h: Jumbo buffer allocator interface. sys/mbuf.h: Add a new external mbuf type, EXT_DISPOSABLE, to indicate that the payload buffer can be thrown away / flipped to a userland process. socketvar.h: Add prototype for socow_setup. tiio.h: ioctl interface to the character portion of the ti(4) driver, plus associated structure/type definitions. uio.h: Change prototype for uiomoveco() so that we'll know whether the source page is disposable. ufs_readwrite.c:Update for new prototype of uiomoveco(). vm_fault.c: In vm_fault(), check to see whether we need to do a page based copy on write fault. vm_object.c: Add a new function, vm_object_allocate_wait(). This does the same thing that vm_object allocate does, except that it gives the caller the opportunity to specify whether it should wait on the uma_zalloc() of the object structre. This allows vm objects to be allocated while holding a mutex. (Without generating WITNESS warnings.) vm_object_allocate() is implemented as a call to vm_object_allocate_wait() with the malloc flag set to M_WAITOK. vm_object.h: Add prototype for vm_object_allocate_wait(). vm_page.c: Add page-based copy on write setup, clear and fault routines. vm_page.h: Add page based COW function prototypes and variable in the vm_page structure. Many thanks to Drew Gallatin, who wrote the zero copy send and receive code, and to all the other folks who have tested and reviewed this code over the years.
|
#
b418ad5c |
|
28-Apr-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/
|
#
6008862b |
|
04-Apr-2002 |
John Baldwin <jhb@FreeBSD.org> |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
|
#
e51a25f8 |
|
19-Mar-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
Remove __P.
|
#
27d5f39f |
|
11-Feb-2002 |
Mike Silbersack <silby@FreeBSD.org> |
Remove mbuf exhaustion warning messages; these are handled by the mbuf system in a rate-limited fashion now. MFC after: 3 days
|
#
268cc039 |
|
13-Dec-2001 |
Luigi Rizzo <luigi@FreeBSD.org> |
Remove printf's on mbuf/cluster allocation failures. There are now equivalent and less dangerous (rate limited) messages in the mbuf allocation code. MFC after: 3 days
|
#
437e48e9 |
|
03-Dec-2001 |
Brooks Davis <brooks@FreeBSD.org> |
Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the mbuf instead. Suggested by: fenner
|
#
53de2fb0 |
|
18-Sep-2001 |
Jonathan Lemon <jlemon@FreeBSD.org> |
Have the driver advertise that it is capable of hardware checksums, and allow the user to control the setting. (checksums are enabled by default)
|
#
9d4fe4b2 |
|
05-Sep-2001 |
Brooks Davis <brooks@FreeBSD.org> |
Make vlan(4) loadable, unloadable, and clonable. As a side effect, interfaces must now always enable VLAN support. Reviewed by: jlemon MFC after: 3 weeks
|
#
bbce7eba |
|
24-Jul-2001 |
Brooks Davis <brooks@FreeBSD.org> |
IFT_8021_VLAN -> IFT_L2VLAN per if_vlan_var.h rev 1.9. With this change LINT compiles, but doesn't link.
|
#
75ff968c |
|
09-Jul-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Apply patch supplied by Jonathan Chen: use the correct arguments to pci_enable_io(). We need to use SYS_RES_IOPORT/SYS_RES_MEMORY instead of PCIM_CMD_PORTEN/PCIM_CMD_MEMEN.
|
#
f73cf22a |
|
23-May-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Vlan tags are 12 bits, mask off anything above since the chip doesn't seem to do so for us. PR: 27567 Submitted by: Koji HINO hino@ccm.cl.nec.co.jp MFC after: 1 week
|
#
6263665f |
|
26-Apr-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Fix the definitions for memory bank sizes, which I somehow got wrong. The constant I was using was correct, but I mislabeled it as 256K when it should have been 512K. This doesn't actually change the code, but it clarifies things somewhat. Submitted by: Chuck Cranor <chuck@research.att.com>
|
#
07f65363 |
|
21-Feb-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Big round of minor updates: - Use pci_get_powerstate()/pci_set_powerstate() in all the other drivers that need them so we don't have to fiddle with the PCI power management registers directly. - Use pci_enable_busmaster()/pci_enable_io() to turn on busmastering and PIO/memory mapped accesses. - Add support to the RealTek driver for the D-Link DFE-530TX+ which has a RealTek 8139 with its own PCI ID. (Submitted by Jason Wright) - Have the SiS 900/National DP83815 driver be sure to disable PME mode in sis_reset(). This apparently fixes a problem on some motherboards where the DP83815 chip fails to receive packets. (Submitted by Chuck McCrobie <mccrobie@cablespeed.com>)
|
#
d7d97eb0 |
|
18-Feb-2001 |
Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> |
Preceed/preceeding are not english words. Use precede and preceding.
|
#
6817526d |
|
06-Feb-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Convert if_multiaddrs from LIST to TAILQ so that it can be traversed backwards in the three drivers which want to do that. Reviewed by: mikeh
|
#
fc2ffbe6 |
|
04-Feb-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Mechanical change to use <sys/queue.h> macro API instead of fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
|
#
78d82c8c |
|
03-Feb-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead of <sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5
|
#
08812b39 |
|
18-Jan-2001 |
Bosko Milekic <bmilekic@FreeBSD.org> |
Implement MTX_RECURSE flag for mtx_init(). All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
|
#
031fc810 |
|
04-Dec-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Initialize/grab the mutex earlier in the attach phase, so that bailing out to the fail: label where we release/destroy the mutex will work without exploding.
|
#
b7db1f98 |
|
11-Nov-2000 |
Bosko Milekic <bmilekic@FreeBSD.org> |
Change MEXTADD usage to pass the two new arguments. Reviewed by: jlemon
|
#
ca43854a |
|
20-Oct-2000 |
Bosko Milekic <bmilekic@FreeBSD.org> |
(Introduce something sitting in my repo for 3 weeks now...) Have if_ti stop "hiding" the softc pointer in the buffer region. Rather, use the available void * passed to the free routine and pass the softc pointer through there. To note: in MEXTADD(), TI_JUMBO_FRAMELEN should probably be TI_JLEN. I left it unchanged, because this way I'm sure to not damage anything in this respect...
|
#
db7e3af1 |
|
15-Oct-2000 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Remove unneeded #include <machine/clock.h>
|
#
1e856a7b |
|
13-Oct-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Use device_get_nameunit(dev) as the mutex string when calling mtx_init() instead of hard-coded string constant. Also remember to do the mutex changes to the ste driver, which I forgot in the first commit.
|
#
d1ce9105 |
|
13-Oct-2000 |
Bill Paul <wpaul@FreeBSD.org> |
First round of converting network drivers from spls to mutexes. This takes care of all the 10/100 and gigE PCI drivers that I've done. Next will be the wireless drivers, then the USB ones. I may pick up some stragglers along the way. I'm sort of playing this by ear: if anyone spots any places where I've screwed up horribly, please let me know.
|
#
21c3015a |
|
28-Aug-2000 |
Doug Rabson <dfr@FreeBSD.org> |
* Completely rewrite the alpha busspace to hide the implementation from the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one.
|
#
a5c4836d |
|
19-Aug-2000 |
David Malone <dwmalone@FreeBSD.org> |
Replace the mbuf external reference counting code with something that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
|
#
6f069b49 |
|
02-Aug-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Add support for the Netgear GA620T copper gigabit card.
|
#
54358bfe |
|
20-Jul-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Tweak probe message so that 1000baseSX and 1000baseT cards are explicitly identified.
|
#
e87631b9 |
|
20-Jul-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Update the Tigon driver to support 1000baseTX gigE over copper AceNIC cards. This basically involves switching to the 12.4.13 firmware, plus a couple of minor tweaks to the driver. Also changed the jumbo buffer allocation scheme just a little to avoid 'failed to allocate jumbo buffer' conditions in certain cases.
|
#
21b8ebd9 |
|
13-Jul-2000 |
Archie Cobbs <archie@FreeBSD.org> |
Make all Ethernet drivers attach using ether_ifattach() and detach using ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
|
#
19a6b3fe |
|
07-Jul-2000 |
Andrew Gallatin <gallatin@FreeBSD.org> |
use contigfree() rather than free() to free memory allocated with contigmalloc(). reviewed by: wpaul
|
#
86b0a953 |
|
28-May-2000 |
Peter Wemm <peter@FreeBSD.org> |
Use the correct register name. s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/
|
#
2e2de7f2 |
|
13-May-2000 |
Archie Cobbs <archie@FreeBSD.org> |
Move code to handle BPF and bridging for incoming Ethernet packets out of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
|
#
db4f9cc7 |
|
27-Mar-2000 |
Jonathan Lemon <jlemon@FreeBSD.org> |
Add support for offloading IP/TCP/UDP checksums to NIC hardware which supports them.
|
#
b822a5ea |
|
17-Jan-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Add the vendor/device ID for the Farallon PN9000SX gigabit ethernet card, which is apparently also a Tigon 2 device.
|
#
98a229f6 |
|
22-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
As suggested by phk, unconditionalize BPF support in these drivers. Since there are stubs compiled into the kernel if BPF support is not enabled, there aren't any problems with unresolved symbols. The modules in /modules are compiled with BPF support enabled anyway, so the most this will do is bloat GENERIC a little.
|
#
9e4c647c |
|
22-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Tweak these for what I hope is the last time: change the DRIVER_MODULE() declaration for the interface driver from "foo" to "if_foo" but leave the declaration for the miibus attached to the interface driver alone. This lets the internal module name be "if_foo" while still allowing the miibus instances to attach to "foo." This should allow ifconfig to autoload driver modules again without breaking the miibus attach.
|
#
0355003f |
|
20-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Un-do the changes to the DRIVER_MODULE() declarations in these drivers. This whole idea isn't going to work until somebody makes the bus/kld code smarter. The idea here is to change the module's internal name from "foo" to "if_foo" so that ifconfig can tell a network driver from a non-network one. However doing this doesn't work correctly no matter how you slice it. For everything to work, you have to change the name in both the driver_t struct and the DRIVER_MODULE() declaration. The problems are: - If you change the name in both places, then the kernel thinks that the device's name is now "if_foo", so you get things like: if_foo0: <FOO ethernet> irq foo at device foo on pcifoo if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo This is bogus. Now the device name doesn't agree with the logical interface name. There's no reason for this, and it violates the principle of least astonishment. - If you leave the name in the driver_t struct as "foo" and only change the names in the DRIVER_MODULE() declaration to "if_foo" then attaching drivers to child devices doesn't work because the names don't agree. This breaks miibus: drivers that need to have miibuses and PHY drivers attached never get them. In other words: damned if you do, damned if you don't. This needs to be thought through some more. Since the drivers that use miibus are broken, I have to change these all back in order to make them work again. Yes this will stop ifconfig from being able to demand load driver modules. On the whole, I'd rather have that than having the drivers not work at all.
|
#
fac1f39b |
|
20-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Grrr. Okay, changing the devnames was a bad idea. Put them back the way they were.
|
#
b95a9362 |
|
20-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Fix the strings in the driver_t structs so that they match the new names in the DRIVER_MODULES() declarations. *sigh*
|
#
bd8a15ce |
|
20-Sep-1999 |
David E. O'Brien <obrien@FreeBSD.org> |
Change the name we register with DRIVER_MODULE() to include the leading "if_". Reviewed by: msmith, wpaul
|
#
d1e8f983 |
|
17-Sep-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Remember to account for ETHER_ALIGN when setting the maxmimum packet length for mini receive ring. The max length was MHLEN, however the mbufs are actually shortened to MHLEN - ETHER_ALIGN to force payload alignment. PR: 13793
|
#
3de9d6fb |
|
29-Aug-1999 |
Bruce Evans <bde@FreeBSD.org> |
Don't restrict our requests for contiguous memory to addresses >= 1MB. This fixes, at least, panics in ncr_attach() on i386's with about 5MB of memory. The restriction was a hack to leave some low memory for ISA DMA, but on i386's we now allocate pages from the top down, so all the restriction did was cause our allocations to fail when there is no free memory above 1MB.
|
#
c3aac50f |
|
27-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
2b028af7 |
|
14-Aug-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Minor glitch in ti_newbuf_jumbo(): m_adj() was being called on m instead of m_new. Submitted by: Kenneth D. Merry <ken@kdm.org>
|
#
070f6214 |
|
27-Jul-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Roar! Finish what I started last night: somehow only the header file change got committed.
|
#
eda5a337 |
|
25-Jul-1999 |
Peter Wemm <peter@FreeBSD.org> |
Make this compile on the Alpha. I'm not 100% sure about this but I think it's ok. ti_bhandle is fetched from newbus on both the Alpha and x86, the Alpha-only ti_vhandle is gone.
|
#
571a80b2 |
|
23-Jul-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Clean up the buffer allocation code a bit. Make sure to initialize certain critical mbuf fields to sane values. Simplify the use of ETHER_ALIGN to enforce payload alignment, and turn it on on the x86 as well as alpha since it helps with NFS which wants the payload to be longword aligned even though the hardware doesn't require it. This fixes a problem with the ti driver causing an unaligned access trap on the Alpha due to m_adj() sometimes not setting the alignment correctly because of incomplete mbuf initialization.
|
#
43a095a5 |
|
23-Jul-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Grrr. Return the rman_get_bustag()/rman_get_bushandle() lines to their proper place in ti_attach(). I'm positive I typed them in there, but they must have fallen victim to a drive-by cut & pasting.
|
#
89ca84e6 |
|
22-Jul-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Convert the Alteon Tigon gigabit ethernet driver to newbus. Also upgrade to the latest firmware release from Alteon (12.3.12).
|
#
6b5ca0d8 |
|
06-Jul-1999 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Rename bpfilter to bpf.
|
#
7f971fc2 |
|
05-Jul-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Remove ti_refill_rx_rings() and associated stuff; replace dirty RX buffers in ti_rxeof() instead. This doesn't really seem to provide much in the way of a performance boost, and I'm pretty sure it can cause mbuf leakage in some extreme cases.
|
#
27434230 |
|
18-Jun-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Add a transmit descriptor usage counter and use it to absolutely, positively not let ti_encap() fill up the TX ring all the way and wrap around. This fixes a potential transmit lockup where a really fast machine (or particular TX traffic pattern) can overrun the end of the ring. Reported by: John Plevyak <jplevyak@inktomi.com>
|
#
497760a1 |
|
24-May-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Fix bug that can cause transmit corruption. There are actually two 'rings' in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf pointers, one for each TX descriptor. When transmitting a packet that consists of several fragments in an mbuf chain, we link each fragment to a descriptor in the TX ring, but we only save a pointer to the mbuf chain. This pointer is saved in the shadow ring entry which corresponds to the first fragment in the packet. Later, ti_txeof() can release the whole chain with a single m_freem() call. (We need the second ring to keep track of the virtual addresses of the mbuf chains.) The problem with this is that the Tigon isn't actually through with the mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END bit set), however the current scheme releases the mbuf chain as soon as the first fragment is consumed. This is wrong, since the mbufs can then be yanked out from under the Tigon and modified before the other fragments can be transmitted. The fix is to make a one line change to ti_encap() so that it saves the mbuf chain pointer in the shadow ring entry that corresponds to the last fragment in TX ring instead of the first. This prevents the mbufs from being released until the last fragment is transmitted. Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com> Brought to my attention by: dg
|
#
579f45fa |
|
09-May-1999 |
Peter Wemm <peter@FreeBSD.org> |
Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add: #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
|
#
737267b8 |
|
29-Apr-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Add a test to ti_encap() to try and prevent the transmit producer index from ever catching up to the transmit consumer index. We can't let this happen because ti_txeof() depends on the assumption that producer == consumer means the ring is empty, and producer != consumer means the ring has some number of active descriptors in it.
|
#
96b3554e |
|
24-Apr-1999 |
Peter Wemm <peter@FreeBSD.org> |
Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't hurt the driver portability to 3.x too much for where drivers are shared.
|
#
2075407d |
|
06-Apr-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Remove teensy-weensy bit of debug code that crept in. Oh, I forgot to mention: this driver also works on FreeBSD/alpha (big thanks to Andrew Gallatin). And there is a 2.2.x version available for those who stubbornly refuse to upgrade.
|
#
d02c2331 |
|
06-Apr-1999 |
Bill Paul <wpaul@FreeBSD.org> |
Add driver support for gigabit ethernet adapters based on the Alteon Networks Tigon 1 and Tigon 2 chipsets. There are a _lot_ of OEM'ed gigabit ethernet adapters out there which use the Alteon chipset so this driver covers a fair amount of hardware. I know that it works with the Alteon AceNIC, 3Com 3c985 and Netgear GA620, however it should also work with the DEC/Compaq EtherWORKS 1000, Silicon Graphics Gigabit ethernet board, NEC Gigabit Ethernet board and maybe even the IBM and and Sun boards. The Netgear board is the cheapest (~$350US) but still yields fairly good performance. Support is provided for jumbo frames with all adapters (just set the MTU to something larger than 1500 bytes), as well as hardware multicast filtering and vlan tagging (in conjunction with the vlan support in -current, which I should merge into -stable soon). There are some hooks for checksum offload support, but they're turned off for now since FreeBSD doesn't have an officially sanctioned way to support checksum offloading (yet). I have not added the 'device ti0' entry to GENERIC since the driver with all the firmware compiled in is quite large, and it doesn't really fit into the category of generic hardware.
|