1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys/dev
Thomas Moestl 90ce56c287 Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
2002-02-27 17:16:18 +00:00
..
aac Add ID's for a couple of upcoming cards. 2002-02-13 07:44:43 +00:00
acpica Add a new test_counter() function which tries to determine the width of 2002-02-25 09:51:17 +00:00
advansys
agp Correctly identify the Intel 82830 AGP bridge. 2002-02-05 23:13:25 +00:00
aha
ahb
aic Back out the hack from rev 1.13 that was done to initiate a bus rescan 2002-01-17 20:34:58 +00:00
aic7xxx Remove reliance on i++ in multiple arguments to a function. C does not 2001-12-16 17:38:30 +00:00
amd
amr Staticise the amr devclass. 2002-01-08 06:47:02 +00:00
an In ad-hoc mode, the "associate" bit is valid to check to see if it is 2002-02-26 05:43:05 +00:00
ar
asr If we're going to ifdef out the only reference to asr_drvinit, then 2002-02-26 03:22:44 +00:00
ata Finish phk's previous removal of BIO_ORDERED, all code that 2002-02-24 12:28:24 +00:00
atkbdc Add another PS2 PNP id. 2001-12-19 13:32:21 +00:00
awi Set ifp->if_name to "awi" instead of device_get_name(dev) to avoid 2002-02-26 20:09:19 +00:00
bge Remove mbuf exhaustion warning messages; these are handled by the 2002-02-11 23:29:15 +00:00
bktr Modify the critical section API as follows: 2001-12-18 00:27:18 +00:00
buslogic Use ANSI C string contatenation instead of a multi-line string literal. 2001-12-13 11:14:28 +00:00
cardbus Use the pci.c code wherever possible, rather than copying all the pci 2002-02-27 05:09:14 +00:00
ccd Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9). 2001-12-30 17:34:19 +00:00
ciss Fix warning; line 1640: ciss_abort_request defined but not used. 2001-12-18 08:01:48 +00:00
cm - generic Arcnet framework 2002-01-08 20:03:13 +00:00
cnw Get rid of the twisted MFREE() macro entirely. 2002-02-05 02:00:56 +00:00
cs Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
ct
cy Initialize a variable bogusly to avoid a gcc bug that causes a spurious 2002-02-26 17:04:29 +00:00
dc Forgot one part of the VLAN support for the dc(4) driver. 2002-01-16 21:34:11 +00:00
de No FreeBSD/vax here either. 2001-11-03 08:32:28 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
digi #include "opt_compat.h" so that the support for old ioctls can actually 2002-02-15 08:28:34 +00:00
dpt Fix a couple of bogus enums. 2002-01-08 06:47:55 +00:00
ed Add EDIMAX ethernet card for NEWCARD from NetBSD 2002-01-29 07:08:56 +00:00
eisa
em - Added support for receive in multiple 2002-02-13 18:19:27 +00:00
en
ep Two fixes from Jonathan Hanna: 2002-02-12 05:32:58 +00:00
ex
exca Default debugging to OFF now. 2002-02-04 15:55:21 +00:00
fb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
fdc Disksort will not "munge" requests, BIO_ORDERED or not, so remove 2002-02-22 09:14:06 +00:00
fe Supported C-NET(98)P2 PnP mode. 2002-02-04 14:01:27 +00:00
fxp Remove mbuf exhaustion warning messages; these are handled by the 2002-02-04 03:15:27 +00:00
gfb We need to operate on struct thread now, not struct proc. 2001-11-08 01:49:06 +00:00
gx Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
hea
hfa
ic Oops, forgot to commit one file in the fd driver mega update. Here it 2001-12-16 07:52:13 +00:00
ichsmb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ida Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
ie
iicbus Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
iir Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
isp Reorder some of the ioctls and add a few new ones. 2002-02-21 23:30:05 +00:00
ispfw Roll to latest production level firmware. 2002-01-23 06:42:54 +00:00
joy Revert change that breaks the joy module. joydevclass must not be static. 2002-01-08 18:27:49 +00:00
kbd
lge
lmc
lnc Get rid of the twisted MFREE() macro entirely. 2002-02-05 02:00:56 +00:00
mc146818
mca
mcd Don't call cdevsw_add(). 2001-11-04 08:58:22 +00:00
md Staticize the malloc definitions. 2002-02-10 21:42:44 +00:00
mii Remove problematic PHY_WRITE so that autoneg to 10 Mbps 2002-02-27 02:11:34 +00:00
mlx Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mly Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mse
musycc
ncv Staticise a couple of debugging variables. 2002-01-08 19:37:12 +00:00
nge Remove errors in LINT (now that they are fatal) 2002-02-27 02:21:43 +00:00
nmdm Cleanup of nmdm device 2002-02-20 20:13:13 +00:00
nsp o Add KLD support for scsi_low. 2001-12-15 12:32:23 +00:00
null
ofw Move the make_dev call from the cn_probe to a sysinit that runs at 2002-01-09 04:03:55 +00:00
pccard Add u_int16 prodext value in CISTPL_MANF_ID. This gets a fifth byte 2002-02-20 14:30:46 +00:00
pccbb Check the status of the card bridge first thing, rather than last in 2002-02-20 16:20:27 +00:00
pcf Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
pci Use the pci.c code wherever possible, rather than copying all the pci 2002-02-27 05:09:14 +00:00
pcic Fix missing comma in previous commit. 2001-12-28 23:51:48 +00:00
pdq
ppbus Make this driver a better citizen by moving dev creation and 2001-12-19 19:37:31 +00:00
ppc Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
puc Release allocated memory and bus_space_handle on an error. 2002-02-19 14:58:11 +00:00
random Staticise the random_state array. 2002-01-10 00:09:21 +00:00
ray Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
rc Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
rp #include "opt_compat.h" so that the support for old ioctls can actually 2002-02-15 08:28:34 +00:00
sbni Rename a variable that might accidentally be duplicated elsewhere. 2002-01-08 19:36:54 +00:00
scd Don't call cdevsw_add() 2001-11-04 08:54:15 +00:00
sf Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
si
sio Until I can figure out how to live without the volatile qualifier on 2002-02-26 03:46:14 +00:00
sk Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
smbus
sn Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
snc
snp Check the return value of tsleep() in snpread(). This may be 2001-11-24 15:59:46 +00:00
sound Add a sysctl, sysctl hw.snd.report_soft_formats, that controls whether the 2002-02-24 00:49:43 +00:00
speaker Add missing destroy_dev(). 2002-01-23 01:11:52 +00:00
sr
stg Staticise a couple of debugging variables. 2002-01-08 19:37:12 +00:00
streams SMP Lock struct file, filedesc and the global file list. 2002-01-13 11:58:06 +00:00
sym Comment tokens after #undef <macroname> and #endif. 2001-12-13 11:12:30 +00:00
syscons Lock struct pgrp, session and sigio. 2002-02-23 11:12:57 +00:00
tdfx Replace ffind_* with fget calls. 2002-01-14 00:13:45 +00:00
tga
ti Remove mbuf exhaustion warning messages; these are handled by the 2002-02-11 23:38:30 +00:00
twe Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
tx Remove mbuf exhaustion warning messages; these are handled by the 2002-02-11 23:38:30 +00:00
txp Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
usb Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
vinum GC: BIO_ORDERED going away. 2002-02-22 09:18:46 +00:00
vr Remove printf's on mbuf/cluster allocation failures. There are now 2001-12-14 05:56:35 +00:00
vx Get rid of the twisted MFREE() macro entirely. 2002-02-05 02:00:56 +00:00
wds
wi Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
wl
xe Remove an unused variable. 2002-02-26 03:37:35 +00:00