#
303975 |
|
11-Aug-2016 |
gjb |
Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, and rename it to RC1.
Update __FreeBSD_version.
Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and the dvd1.iso packages population.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
298955 |
|
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
#
296137 |
|
27-Feb-2016 |
jhibbits |
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
|
#
294883 |
|
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
#
276750 |
|
06-Jan-2015 |
rwatson |
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
|
#
271836 |
|
18-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
#
269980 |
|
14-Aug-2014 |
imp |
Delete pp_isadma. It isn't use, and the code that used it has been commented out (temporarily) since 1998 when this driver hit the tree. Also, no need to compute the ethernet header and then never use it.
|
#
267992 |
|
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
#
267985 |
|
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
#
267961 |
|
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
#
257176 |
|
26-Oct-2013 |
glebius |
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.
|
#
243857 |
|
04-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags in sys/dev.
|
#
227309 |
|
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
#
218055 |
|
29-Jan-2011 |
andrew |
Use bus space functions rather than inw/outw to help a future port of the driver to ARM.
Approved by: imp (mentor)
|
#
217538 |
|
18-Jan-2011 |
jhb |
Remove some always-true comparisons.
Submitted by: clang via rdivacky
|
#
207554 |
|
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value.
MFC after: 1 month
|
#
202580 |
|
18-Jan-2010 |
imp |
Fix indentation nit.
|
#
201758 |
|
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
#
195049 |
|
26-Jun-2009 |
rwatson |
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
|
#
180388 |
|
09-Jul-2008 |
imp |
Improve the EEPROM parsing, based on finding a datasheet that describes it in detail.
When setting media, don't error out when a specific media is selected. # Note: There may be some issues still here since the EtherJet PC Card doesn't # conform to the datasheet. Many different kinds of dongles can be plugged in # and it is unknown how to ask which one it is.
Also, add a /* bad! */ comment to a 1/2 second delay after we set the DC/DC parameters. This should be a *sleep of some sort for !cold. Fortunately it is the only one and is only used when setting media, so the benefit from removing it is small. Unfortunately, it likely serves as an exemplar of good programming techniques, which it isn't.
|
#
179621 |
|
06-Jun-2008 |
imp |
Tweak a comment and a constant to restore old 30ms upper bound. cs_readreg takes ~2us not ~1us to run.
|
#
179620 |
|
06-Jun-2008 |
imp |
o Remove unused cs_debug tunable. I think I added it and then nothing with it. Bad imp. Removing us dips us under 10,000 in size too. o Replace an unconditional 30ms DELAY (yes, busy wait) with a check of the SIBUSY bit in the SelfST register before accessing the eeprom. This changes the time to read the EEPROM from 2 * 20 * 30ms (1.2s) to < 20*25us (.0005s) and make the attach of the card tolerable when ethernet media is present. Include data from the datasheet about why this works. While this is a 2500x speed increase, it doesn't really matter at all once the card is probed... o set dev earlier in softc.
|
#
179597 |
|
06-Jun-2008 |
imp |
Minor clean up to shave about 1.5k off the size of the driver: o remove unused fields from softc and args from cs_alloc_irq o remove some commented code that will never be implemented. o Don't try to send a packet and see if it worked. We don't need this anymore, and it doesn't add any value. o tweaks for BNC and AUI. o limit possible time hung in the kernel to 4s rather than 40s.
|
#
179591 |
|
06-Jun-2008 |
imp |
Remove unused fields in softc. If they are ever really needed again, they can re-added. Remove CS_NAME. Don't whine when there's an ignored checksum error: User has said STFU, so we should S the FU. (remove mandated properties).
|
#
179560 |
|
05-Jun-2008 |
jhb |
Make the cs(4) driver MPSAFE: - Add a mutex to the softc to protect the softc and the device hardware. - Add a private timer to manage transmit watchdogs rather than using if_timer/if_watchdog. - Setup the interrupt handler after ether_ifattach().
Tested by: imp
|
#
179553 |
|
05-Jun-2008 |
imp |
Fix the media auto code by breaking it :-). Auto now just means 'use 10BaseT' since it required 10BaseT to have carrier to switch to it. This chip makes it hard to do proper auto, so we don't do it. We can't test carrier on things easily.
Don't insist on carrier when we set the media. Don't report failures. Remove a 1s! delay that appears to not be needed.
With these patches, and John Baldwin's patches, I'm able to pass packets on my IBM EtherJet card again.
|
#
179532 |
|
04-Jun-2008 |
imp |
o Improve the probe code dealing with interrupts. o When forced to be 10baseT, don't require that the 10baseT interface have link to succeed. Still require it for IFM_AUTO, however, since it appears that there's no way to tell if a specific type of interface worked. I'm doing a web search for a datasheet now to see if there's anything obvious. o Minor incidental formatting nits, including collapsing code of the form if (foo) { bar(); } else { if (baz) bing(); } into: if (foo) { bar(); } else if (baz) { bing(); } to save an indentation level. o Remove stray reference to 3.x config file syntax.
# I believe John's patches still apply after this...
|
#
179507 |
|
03-Jun-2008 |
imp |
Correct logic error that would prevent cs pccards from working on systems where the CardBus bridge was connected to a APIC. The case where the probe routine is told to not setup the IRQ was mishandled but the error was masked in the case where the IRQ was a valid one for the card.
MFC after: 1 week
|
#
162321 |
|
15-Sep-2006 |
glebius |
- 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>
|
#
156559 |
|
10-Mar-2006 |
philip |
Fix multicast support for cs89x0 chips. Just setting the RX_MULTCAST_ACCEPT flag isn't enough - the filter needs to be set up too, or no multicast frames are accepted.
Sponsored by: Philips Industrial Applications (indirectly) MFC after: 3 days
|
#
150306 |
|
19-Sep-2005 |
imp |
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
|
#
148887 |
|
09-Aug-2005 |
rwatson |
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
|
#
147256 |
|
10-Jun-2005 |
brooks |
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
|
#
140928 |
|
28-Jan-2005 |
imp |
Fix the worst offenders of style(9) with a small style sweep.
|
#
140927 |
|
28-Jan-2005 |
imp |
Cleanup tabs vs spaces.
|
#
140926 |
|
28-Jan-2005 |
imp |
For the PC Card implementation of the CS8920M that's in my IBM EtherJet, the interrupt is selected in the eeprom based on the layout of the PC Card board. Since this is encoded into the EEPROM, and has no relationship to the IRQ that the pccard bridge routes the PC Card's interrupt pin to.
As such, stop writing to that register. This gets my EtherJet working.
# The eeprom reading code appears to be totally wrong for my EtherJet # card. This causes the card to bogusly detect the media options # available.
|
#
140925 |
|
28-Jan-2005 |
imp |
Setting hw.cs.recv_delay should set the delay, not the ignore the eeprom checksum.
|
#
140921 |
|
28-Jan-2005 |
imp |
error = is needed before ether_ioctl() so that unsupported/unknown IOCLTs are properly handled. This gets the cs driver properly reporting things via ifconfig.
# my pccard still doesn't work.
|
#
140888 |
|
27-Jan-2005 |
imp |
Write cs_detach() and use it. This resolves the twin problems of the cs1 interface linger on card eject, as well as the warnings about the card still using resources. Ooops.
|
#
139749 |
|
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
#
133681 |
|
13-Aug-2004 |
rwatson |
Since if_cs doesn't contain locking or run with INTR_MPSAFE, mark the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
|
#
129616 |
|
23-May-2004 |
mux |
We don't need to initialize if_output, ether_ifattach() does it for us.
|
#
128293 |
|
15-Apr-2004 |
luigi |
Remove improper use of if_addrhead in device drivers to check if the link-level address has been initialized already.
The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers.
This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part.
|
#
127135 |
|
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
#
126966 |
|
14-Mar-2004 |
mdodd |
Announce ethernet MAC addresss in ether_ifattach().
|
#
122024 |
|
04-Nov-2003 |
imp |
o Add sysctl to allow ignoring checksum of eeprom. o Fix minor type problems o Fix minor problem with a couple debug printfs. o Default to a sane media type when none is reported. o Minor style changes
The PR complains this will fix the IBM 300GL cards.
Submitted by: Max Gotlib PR: 11462
|
#
121816 |
|
31-Oct-2003 |
brooks |
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)
|
#
121752 |
|
30-Oct-2003 |
brooks |
There is no way to enter the attach routine twice with the same softc without a detach call in between so don't try to deal with that possiability.
This is a diff-reduction commit for the upcoming if_xname conversion.
|
#
119418 |
|
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
#
111119 |
|
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
#
109623 |
|
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
#
106937 |
|
14-Nov-2002 |
sam |
network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls
Reviewed by: many Approved by: re
|
#
104252 |
|
01-Oct-2002 |
brooks |
Use if_printf(ifp, "blah") instead of printf(CS_NAME"%d: blah", ifp->if_unit);
|
#
72940 |
|
23-Feb-2001 |
imp |
Additional enhancments to allow IBM Etherjet cards to be probed, attached and ifconfigable. The card doesn't interrupt yet.
Also, move towards bus space by introducing new macros/inline functions which make such a move much easier than before.
These inline functions are setup now to work around an IBM EtherJet pccard cardbus bridge incompatibility. The card works in 8 bit mode, but not in 16-bit mode when it is connected to a cardbus bridge for reasons unknown. The Linux driver also has a similar workaround in it.
Future work will include making the above workaround runtime conditional rather than compile time conditional, as well as fixing the interrupts in pccards and converting it to bus space.
|
#
71316 |
|
21-Jan-2001 |
imp |
Break the isa attachment of the Crystal Semiconductor 89x0 into two parts: isa and pccard. The isa one is known to work with an IBM EtherJet ISA card. The pccard one isn't known to work because the EtherJet pccard I purchased recently arrived DOA :-(. I'll commit the pccard.conf entry when the replacement card arrives.
I plan on MFC this in a week or two.
|
#
67164 |
|
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
#
63090 |
|
13-Jul-2000 |
archie |
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
|
#
60536 |
|
14-May-2000 |
archie |
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
|
#
58816 |
|
30-Mar-2000 |
imp |
NewBus the cs driver.
Submitted by: max@rsu.ru
|
#
51646 |
|
25-Sep-1999 |
phk |
Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version of our driver modules.
This does not open any security hole, because the bpf core isn't loadable
The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be.
Add a couple of missing FreeBSD tags.
|
#
50782 |
|
02-Sep-1999 |
peter |
Stub out the old pnp code till these are converted so GENERIC builds again.
|
#
50477 |
|
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
48645 |
|
06-Jul-1999 |
des |
Rename bpfilter to bpf.
|
#
45720 |
|
16-Apr-1999 |
peter |
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman.
Approved by: core
|
#
43314 |
|
28-Jan-1999 |
dillon |
Fix warnings in preparation for adding -Wall -Wcast-qual to the kernel compile
|
#
42545 |
|
12-Jan-1999 |
eivind |
Clean up warnings; a couple of these came because of genuine errors in parameter passing (passing a pointer to u_short where a pointer to int is expected), for which the bugs have been fixed.
|
#
41591 |
|
07-Dec-1998 |
archie |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static and local variables, goto labels, and functions declared but not defined.
|
#
40565 |
|
22-Oct-1998 |
bde |
Initialize isa_devtab entries for interrupt handlers in individual device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet.
pc98 parts approved by: kato
|
#
39937 |
|
04-Oct-1998 |
msmith |
At net-jp@jp.freebsd.org mailing list, if_cs user in Japan reported bug.
At using tcpdump for cs interface, tcpdump only dump packet which src or dst MAC-address is cs interface. cs interface can't look up packet between others.
Submitted by: MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
|
#
38592 |
|
27-Aug-1998 |
msmith |
Enable duplex autodetection if UTP media are autodetected. Add a sysctl 'machdep.cs_recv_delay' to specify how long to wait after receiving a packet in order to check for a subsequent (back-to-back) packet. The cs8900 has a very small receive buffer, so this helps avoid overflows at the cost of some extra CPU overhead.
Submitted by: Oleg Sharoiko <os@rsu.ru>, MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
|
#
38305 |
|
13-Aug-1998 |
msmith |
Fix BNC/AUI autodetection. Submitted by: MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org> Submitted by: Oleg Sharoiko <os@rsu.ru>
|
#
38286 |
|
12-Aug-1998 |
bde |
Removed unused includes.
|
#
37785 |
|
20-Jul-1998 |
msmith |
Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. This supports PnP and if_media. I've been running a slightly older version here for several weeks now. Submitted by: Maxim Bolotin <max@rsu.ru>
|