freebsd-skq/sys/dev
Poul-Henning Kamp b0b0334878 Device megapatch 2/6:
This commit adds a couple of functions for pseudodrivers to use for
implementing cloning in a manner we will be able to lock down (shortly).

Basically what happens is that pseudo drivers get a way to ask for
"give me the dev_t with this unit number" or alternatively "give
me a dev_t with the lowest guaranteed free unit number" (there is
unfortunately a lot of non-POLA in the exact numeric value of this
number, just live with it for now)

Managing the unit number space this way removes the need to use
rman(9) to do so in the drivers this greatly simplifies the code in
the drivers because even using rman(9) they still needed to manage
their dev_t's anyway.

I have taken the if_tun, if_tap, snp and nmdm drivers through the
mill, partly because they (ab)used makedev(), but mostly because
together they represent three different problems for device-cloning:

if_tun and snp is the plain case: just give me a device.

if_tap has two kinds of devices, with a flag for device type.

nmdm has paired devices (ala pty) can you can clone either of them.
2004-02-21 20:29:52 +00:00
..
aac Fix a major brain-o. If the command needs to be put on the deferred queue, 2004-02-21 05:32:40 +00:00
acpi_support Only remove the handler if we installed it. 2004-01-12 19:35:31 +00:00
acpica Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
adlink The present defaults for the open and close for device drivers which 2003-09-27 12:01:01 +00:00
advansys Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
agp Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
aha Save the device so we can do a device_printf. 2003-11-13 04:14:53 +00:00
ahb Make this at least compile on 64 bit platforms. Its been breaking 2003-07-30 20:09:22 +00:00
aic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
aic7xxx Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
amd Setting pccb->ccb_h.status to CAM_REQ_CMP one time is enough. 2004-01-21 10:49:42 +00:00
amr Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
an Remove the HACK section it breaks the older firmware and doesn't totally 2004-01-10 03:02:04 +00:00
ar Get rid of the last two uses of NG_NODELEN + 1 in the base system by 2004-01-26 16:41:21 +00:00
asr Remove code previously under #ifdef ASR_VERY_BROKEN 2003-09-26 15:56:42 +00:00
ata Dont alloc size 0 buffers. 2004-02-21 18:30:03 +00:00
ath Make this compile on amd64. 2004-02-06 00:10:54 +00:00
atkbdc Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
awi Correct beacon (src/bssid) for hostap and adhoc mode. 2004-01-15 13:30:06 +00:00
bfe Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
bge Fix typo in a comment 2004-01-13 11:31:09 +00:00
bktr Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
buslogic Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
cardbus Make the cardbus driver a derived class of the pci driver. In theory, this 2003-11-01 12:45:03 +00:00
ciss Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
cm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cnw Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cs o Add sysctl to allow ignoring checksum of eeprom. 2003-11-04 02:59:57 +00:00
ct Use __FBSDID(). 2003-08-24 17:55:58 +00:00
cx Fixing copyright and adding vendor cvs id. 2004-02-14 21:08:11 +00:00
cy Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
dc Some integrated Davicom cards in sparc64 boxes have an all zeros 2004-01-08 19:08:27 +00:00
dcons Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
de Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
dec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
digi Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
dpt Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
drm Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
ed Added TDK LAK-CD031 (simple NE2000 device). 2003-12-31 04:25:00 +00:00
eisa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
em Only reset the phy when it is absolutely required. 2004-02-10 21:31:09 +00:00
en Move the locking of the softc up to before the allocation of the 2003-12-17 10:01:46 +00:00
ep MFp4: 2003-11-02 20:13:39 +00:00
ex Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
exca Card type stuff was backwards, so assume io for the moment. mem needs 2003-10-07 04:29:04 +00:00
fatm Fix 0 / NULL mixup (this module isn't in LINT!) 2003-12-24 05:24:24 +00:00
fb Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
fdc Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
fe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
firewire Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
fxp Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
gem Add new Apple GEM PCI id. 2004-02-02 01:11:39 +00:00
gfb Catch a few places where NULL (pointer) was used where 0 (integer) was 2003-12-23 02:36:43 +00:00
gx Avoid overwriting capability bits marked earlier 2004-01-18 10:15:48 +00:00
harp Make sure that the first mbuf in the chain passed to atm_intr 2004-02-21 13:01:54 +00:00
hatm change NULL to 0 to silence warning. 2003-12-24 18:23:02 +00:00
hfa Use the more appropriate vm_paddr_t in places where a physical 2004-02-21 19:08:23 +00:00
hifn Add CRD_F_KEY_EXPLICIT which allows the key to be changed per 2004-02-02 17:06:34 +00:00
hme Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ic Add a header for the i8259A register definitions. This is based on 2004-01-06 18:59:37 +00:00
ichsmb Update the comment to indicate ICH5 support 2003-08-31 19:23:00 +00:00
ida Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
idt Use contigmalloc() instead of vm_page_alloc_contig(). Pass M_ZERO to 2004-01-14 06:14:35 +00:00
ie Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_ndis Add yet more bulletproofing. This is to guard against the case that 2004-02-11 21:53:40 +00:00
iicbus Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
iir Remove the static major assignment for iir(4). 2004-02-14 23:18:58 +00:00
ips Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
isp Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
ispfw Update firmware sets for the 12160, 2200 and 2300 cards to the (more or 2004-01-14 18:38:03 +00:00
joy Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
kbd Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
led Use standard style for cdevsw initialization. 2004-02-14 20:03:36 +00:00
lge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
lnc Fix the PCI attach routine to properly setup the IRQ and port resource 2004-01-22 16:07:03 +00:00
matcd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
mc146818
mca Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mcd Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
md Allow specification of a geometry for vnode backed devices as well as 2004-01-12 10:52:00 +00:00
mii Make sure set the media type in the phy, we cannot trust it to have chosen 2004-01-17 10:44:39 +00:00
mk48txx Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mlx Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
mly Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
mpt Catch a few places where NULL (pointer) was used where 0 (integer) was 2003-12-23 02:36:43 +00:00
mse Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
musycc Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
my Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
ncv Const poison string accessor functions. 2003-10-26 00:51:40 +00:00
nge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
nmdm Device megapatch 2/6: 2004-02-21 20:29:52 +00:00
nsp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
null Shorten the code by removing one "do-nothing" function, replacing it 2003-11-01 09:31:54 +00:00
ofw Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
owi Nursemaid: Fix compilation. 2003-12-10 15:09:38 +00:00
patm Added missing DPADD. 2004-02-05 22:01:28 +00:00
pccard Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
pccbb MFp4: 2004-01-04 22:10:00 +00:00
pcf fix another LP64 problem. READ_IVAR takes a pointer to an uintptr_t, not 2003-06-20 07:22:54 +00:00
pci It appears that the changes in the resources allocated is causing much 2004-01-17 21:54:04 +00:00
pcic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pdq Use contigmalloc() and contigfree() instead of vm_page_alloc_contig() and 2004-01-13 20:36:03 +00:00
ppbus Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
ppc Forgot an added file in the last commit. 2003-08-01 05:02:55 +00:00
pst Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
puc Expand the mask for the Avlab Technology, PCI IO 2S entry to cover the 2004-02-04 18:01:02 +00:00
raidframe Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
random Correct the cleanup of the alias dev_t for /dev/urandom: being an 2004-02-12 20:46:49 +00:00
ray fix warnings. NULL -> 0 2003-12-24 19:00:49 +00:00
rc Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
re Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
rndtest Use __FBSDID(). 2003-08-24 17:55:58 +00:00
rp Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sab Fix wrong check. 2004-02-05 09:50:57 +00:00
safe Compile on amd64. (pointer/int mismatches and printf int vs long ) 2004-02-05 01:35:33 +00:00
sbni Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
sbsh Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
scd Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sf Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
si Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sio Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sk Fix multicast and promiscuous mode handling for Yukon devices. 2004-01-21 22:32:15 +00:00
smbus Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sn Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
snc Do if_xname conversion. I missed this one because it's pc98 only. 2003-11-01 23:24:38 +00:00
snp Device megapatch 2/6: 2004-02-21 20:29:52 +00:00
sound Fix a glitch in my last commit and revert to using selwakeuppri 2004-02-20 01:24:57 +00:00
speaker Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sr Get rid of the last two uses of NG_NODELEN + 1 in the base system by 2004-01-26 16:41:21 +00:00
stg Fix some becuase -> because typos. 2003-12-17 16:12:01 +00:00
streams Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
sym unifdef old interface support out to prevent false positives. 2003-12-07 05:17:13 +00:00
syscons Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
tdfx Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
tga Use __FBSDID(). 2003-08-24 17:55:58 +00:00
ti Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
trm Do not test if pDCB is not NULL, we dereference it before anyway, and it 2004-02-20 20:36:55 +00:00
twe Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
tx Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
txp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
uart Use standard style for cdevsw initializtion 2004-02-14 20:01:24 +00:00
ubsec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
usb Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
utopia Generate events when the carrier goes up or down. 2003-07-30 08:35:58 +00:00
vinum Remove some more 'makedev' related macros. 2004-02-16 23:14:13 +00:00
vr Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
vx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
wds Use __FBSDID(). 2003-08-24 17:55:58 +00:00
wi update radiotap support to reflect recent changes: 2003-12-28 06:58:52 +00:00
wl Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
xe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
zs Fix wrong check. 2004-02-05 09:50:57 +00:00