summaryrefslogtreecommitdiffstats
path: root/sys/dev/sbni/if_sbni.c
Commit message (Collapse)AuthorAgeFilesLines
* Quiet framelen uninitialized warning. I think it was a false alarm.peter2007-07-051-1/+3
| | | | | | | If check_fhdr() returns false, the frame_ok variable should protect any meaningful evaluations of framelen. Approved by: re (rwatson)
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-2/+3
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-3/+3
| | | | | | | | | | 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.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-9/+9
| | | | | | | | | | | | | | 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-23/+26
| | | | | | | | | | | | | | | | | | | | 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
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Since if_sbni doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Remove improper use of if_addrhead in device drivers to checkluigi2004-04-151-4/+0
| | | | | | | | | | | | 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.
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-2/+1
|
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-3/+2
| | | | | | | | | | | | | 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)
* There is no way to enter the attach routine twice with the same softcbrooks2003-10-301-19/+17
| | | | | | | 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.
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Fix i386 assembly constraints. The same register cannot bekan2003-07-111-3/+3
| | | | in output and clobber lists at the same time.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-15/+7
| | | | | | | | | | | | | | 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
* Use if_printf() instead of printf() to print "sbni#: blah".brooks2002-10-011-4/+3
|
* use __packed/__aligned rather than GCC-specific __attribute__.alfred2002-09-231-1/+1
|
* Make driver portable:fjoe2002-08-051-34/+39
| | | | | | | | | | | | - bus_space'ify - generate fake ethernet address using read_random() instead of reading from timer i/o ports Other minor fixes: - remove "hack" in connect_to_master() - use M_ZERO - remove unused variable in sbni_ioctl() - properly release irq in sbni_attach_isa() on attach errors
* style fixesfjoe2002-08-051-14/+16
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-3/+5
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Rename a variable that might accidentally be duplicated elsewhere.msmith2002-01-081-2/+2
|
* Add driver for Granch SBNI12-xx ISA and PCI network adapters.fjoe2001-11-211-0/+1312
MFC after: 1 week
OpenPOWER on IntegriCloud