Commit Graph

21 Commits

Author SHA1 Message Date
brooks
4290fbacd1 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)
2003-10-31 18:32:15 +00:00
brooks
6beed7c27c 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.
2003-10-30 19:45:58 +00:00
jhb
6d9ca0e79a Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by:	imp, gibbs
Tested by:		i386 LINT
2003-09-02 17:30:40 +00:00
obrien
3050fb5684 Use __FBSDID().
Also some minor style cleanups.
2003-08-24 18:03:45 +00:00
imp
d8644cda5e 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.
2003-08-22 07:08:17 +00:00
kan
e5003c047c Fix i386 assembly constraints. The same register cannot be
in output and clobber lists at the same time.
2003-07-11 07:49:40 +00:00
mdodd
23fce71011 - 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.)
2003-04-15 06:37:30 +00:00
imp
1493fd6e76 Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
alfred
8f5153c3ea Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
sam
2bb2c8431a 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
2002-11-14 23:54:55 +00:00
brooks
221235517c Use if_printf() instead of printf() to print "sbni#: blah". 2002-10-01 00:55:22 +00:00
phk
7405ed8561 This driver doesn't need to include <sys/bus_private.h> either.
Spotted by:	FlexeLint
2002-09-28 20:59:59 +00:00
alfred
a6db124c42 use __packed/__aligned rather than GCC-specific __attribute__. 2002-09-23 06:35:33 +00:00
fjoe
2a344e2b72 printf() formats fixes 2002-08-06 17:00:02 +00:00
fjoe
78e0d7d6d4 Make driver portable:
- 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
2002-08-05 18:14:16 +00:00
fjoe
835aafc839 back out one change that crept in (will be committed later) 2002-08-05 17:32:16 +00:00
fjoe
89bf12dc25 style fixes 2002-08-05 17:20:17 +00:00
fjoe
2e7797c9d0 fix driver name in DRIVER_MODULE
MFC after:	3 days
2002-07-15 05:05:50 +00:00
jhb
e3cbbf9804 Change the suser() API to take advantage of td_ucred as well as do a
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@
2002-04-01 21:31:13 +00:00
msmith
4039fb7c95 Rename a variable that might accidentally be duplicated elsewhere. 2002-01-08 19:36:54 +00:00
fjoe
110aefc450 Add driver for Granch SBNI12-xx ISA and PCI network adapters.
MFC after:	1 week
2001-11-21 22:29:35 +00:00