History log of /haiku/src/libs/compat/freebsd_network/compat/sys/haiku-module.h
Revision Date Author Comments
# b0719130 21-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network & drivers: Remove need to specify FBSD_TASKQUEUES.

Instead make FBSD_TASKQUEUES a combination flag of all taskqueues,
so that if even one is needed, the init_taskqueues function will
be invoked appropriately.


# 8548a4ad 12-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Adaptations in preparation for the OpenBSD layer.

Most of these changes however add things that FreeBSD has (with a few
exceptions noted in comments) which the OpenBSD shim layer merely needs
to make use of.

(FreeBSD used to have support for IFF_NEEDSGIANT but removed it. The
support instated here is very similar to what FreeBSD used to have.)


# 423ee7c6 24-Feb-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Adjust and rewrite attach code for USB support.

init_hardware now takes 2 devices arrays: one for PCI and one for USB
drivers, respectively.

The few drivers that have their own __haiku_handle_fbsd_drivers_list
are also adjusted at the same time.


# d8779e44 13-Oct-2019 Kyle Ambroff-Kao <kyle@ambroffkao.com>

Drop requirement for specifying firmware map size

The HAIKU_FIRMWARE_NAME_MAP macro takes a size parameter to define the
firmware map array type, and then a multi-dimensional array literal is
assigned to the array defined by that macro.

This is error-prone. The idualwifi7260 driver, before this patch, had
the size incorrectly set to 6 when the number of entries was 7, which
sliced the last entry off of the map, making it unavailable to the
driver. After fixing this size, the driver properly loads the
iwm-8265-22.ucode firmware on my computer.

This patch changes that macro to take a const char[][2] literal as its
only parameter, making it less likely for this sort of bug to be
re-introduced.

Fixes #15413.

Change-Id: I78a75e692a8637af0f13d1eb16180ce8d95d0852
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1917
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# db4f8332 03-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Reinstate _fbsd_init_hardware and refactor probing.

Previously we just probed and then immediately attached if any devices
were found, after all initialization was done. Now we cannot do that,
as after calling SYSINIT() on certain drivers (e.g. the new ipro1000
driver), certain threads will be created that there is no good way
of tearing down.

Fortunately, it is valid to call probe() on a device before SYSINIT()
(and most other things) have been initialized, and so now we do that
in init_hardware, and then init_driver is called only if we've found
devices we support.

While we're at it, also call pci->reserve_device, which will mark us as
the driver handling said device and prevent other drivers from
using it.


# a9116ea8 01-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Add an "id" field to struct device_method.

"const char* name" is alright for the compat layer's needs to
identify functions, as we only scan the method table once and
copy the function pointers to a struct of function pointers.

iflib doesn't use a function pointer struct, though, and expects
to have the KOBJ system for function lookups, and that depends
on integer-based method IDs for fast lookups. So now every
method gets an integer ID as well as a name (and iflib's method
IDs are in the list of method IDs already.)


# 8267c193 29-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Lots of additions and modifications for iflib.


# dba28784 24-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd11_network -> freebsd_network.

FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.


# 648db733 03-Jan-2013 Jérôme Duval <jerome.duval@gmail.com>

Update FreeBSD network drivers with the 9.1 release


# 283db26d 20-Aug-2011 Siarzhuk Zharski <zharik@gmx.li>

* FreeBSD compatibility layer for network drivers is modified to handle
NULL-terminated list of driver_t* entries instead of single entry.
That allows to combine multiple FreeBSD drivers into single Haiku
driver add-ons;
* Support for DEC 21140 (Tulip) chipsets (provided by the 'de' driver)
incorporated into dec21xxx driver. That brings network connectivity to
Haiku systems running in MS Virtual PC VMs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59236b80 15-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Also mangle the name into the device class symbol - this should help with the
e1000 driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 676e23a6 08-May-2011 Jérôme Duval <korli@users.berlios.de>

NO_HAIKU_FIRMWARE_NAME_MAP defined an element {NULL} whereas the array length is zero


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 560626ba 23-Oct-2010 Colin Günther <coling@gmx.de>

Cody style fixes. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcde9e72 23-Oct-2010 Colin Günther <coling@gmx.de>

* Add a function needed by the ralink 2860 driver.
* Fix a compiler warning about missing braces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39089 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3806c1b 19-Jan-2010 Colin Günther <coling@gmx.de>

* Reworked firmware loading. This gets rid of the need for the settings files.
Name mapping is now defined in the glue code.
* Adding two macros for handling firmware name mapping completely in the glue
code:
- HAIKU_FIRMWARE_NAME_MAP(firmwarePartsCount) is used when mapping is
required. Have a look to iprowifi2100's glue code for an example.
- NO_HAIKU_FIRMWARE_NAME_MAP() is used when the firmware names don't need to
be mapped. For example: broadcom43xx
* Discard usage of vm_map_file() and use the previously read() method again.
After Axel and Ingo agree that both methods are fine in this particular use
case, using read() looks easier on the eye. It needs only 3 parameters, where
vm_map_file() takes 10.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da0be4bf 26-Nov-2009 Colin Günther <coling@gmx.de>

Remove the wlan specific headers to allow a clearer distinction between
ethernet and wlan drivers when compiling them. Also this removes the burden to
recompile every ethernet driver just because of changes in the wlan part.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e08 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0c615a01 01-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed old mutex implementation and renamed cutex to mutex.
* Trivial adjustments of code using mutexes. Mostly removing the
mutex_init() return value check.
* Added mutex_lock_threads_locked(), which is called with the threads
spinlock being held. The spinlock is released while waiting, of
course. This function is useful in cases where the existence of the
mutex object is ensured by holding the threads spinlock.
* Changed the two instances in the VFS code where an IO context of
another team needs to be locked to use mutex_lock_threads_locked().
Before it required a semaphore-based mutex implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25283 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 080b265a 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Completely renovated the FreeBSD compatibility layer:
* Removed NETDEV() and DEVNET() macros and functionality.
* The exported devices are now attached to ifnet objects only, therefore, the
ifnet object now has the receive queue, and everything else a device could
need.
* There is now a root device where everything else is attached, it currently
only holds the pci_info structure, so it's more or less a PCI child.
* This simplified the device handling a bit everywhere.
* We now attach drivers already in init_driver() - this is needed as drivers
may publish more than one interface when being attached.
* Implemented device_delete_child(), device_attach() (which bus_generic_attach()
now uses), device_is_attached(), and device_is_alive().
* Therefore, if_initname() does now the actual job of registering the devices.
* On open, if_init() is called which comes pretty close to what our open()
is supposed to do.
* Updated ukphy.c to the one from FreeBSD 7 where used (we should probably
move that into the compat layer, anyway).
* The MII driver array must now be NULL terminated; therefore you don't need
to specify the count anymore.
* Moved PCI code from compat.c to bus.c.
* Moved the driver code from device.c to driver.c.
* Removed superfluous init_compat_layer() function.
* Fixed a few bugs, a few things weren't brought down correctly.
* The rtl8139 interrupt routine now checks if it really was the cause of the
interrupt - this code is not tested, either, it may not work (which would
then require a work-around like I did for the 3com driver).
* The HAIKU_PROTECT_INTR_REGISTER in the rtl8139 driver was pretty much useless
which is why I removed it.
* Probably introduced a lot of new bugs, though - I haven't tested this code
at all yet. It will probably just crash :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23019 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5450cae1 06-Nov-2007 Hugo Santos <hugosantos@nowhere.fake>

try to hide the gruesome details from the glue code as much as possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7242a223 03-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Added miibus_linkchg and miibus_mediainit methods to device_set_driver(); this was the actual
reason the MII bus did not work as mediainit was never called.
* Got rid of the delayed MII bus scanning again; not only did it not solve the problem, it was
also completely unnecessary.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84eb0b5f 02-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Delayed scanning the MII bus until the first ifm_media has been set for the
device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22807 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00abfdbe 02-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Since vtophys() is no public API in FreeBSD, vtophys() is now a macro to
pmap_kextract() not vice versa, just like it is done in FreeBSD itself.
* Added missing contigmalloc() definition for kernel drivers.
* Fixed the "*_devclass defined but not used" warning.
* Fixed warnings.
* Added/adjusted (to our style guide) the license headers for the files I
touched.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1d1b028 10-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: another go at multiple MII module support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21100 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a436289 10-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: some missing definitions as well as allowing multiple MII modules per driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21099 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4b2286de 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: MII subsystem (needs testers, more to come).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6509511 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: split device structure to handle for miibus devices, added a new network_device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a275df5 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a couple more definitions, minimal, mostly adding a new glue method to re-enable device interrupts since if_rl (rtl 8139) will require it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d1e0a1d 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: fixed a couple warnings, use KernelStaticLibrary as suggested by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21089 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0747d47e 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added swi taskqueue and a couple more methods that if_xl needs. also marked some as unimplemented so its clearer what is left to be done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21080 a95241bf-73f2-0310-859d-f6bbb57e9c96


# adf90245 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: only init taskqueue_fast if FBSD_FAST_TASKQUEUE requirement is set (since it starts a thread and consumes a couple semaphores).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21073 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6ace498 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added a requirements field so not all drivers init all subsystems. pcnet for instance doesn't need taskqueues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25d42ceb 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more definitions, preparing for a DMA-using driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21067 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0bdff524 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: instead of disabling the IRQ, disable the device's interrupts on real interrupt request as suggested by Travis. This solves potential issues with shared IRQs. The check & disable interrupts function is part of the required glue code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21045 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddcaaa61 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added open(), which calls into the driver's attach. when testing with PCNET, a interface is already presented to the stack, it is even able to obtain the MAC address from the device, but still more work to do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747c938b 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: now the glue code properly references the required methods so we have proper linkage with gcc 4


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21017 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 648db7333e8d0ae6e0386ba1e71eafb6a793c97d 03-Jan-2013 Jérôme Duval <jerome.duval@gmail.com>

Update FreeBSD network drivers with the 9.1 release


# 283db26d5c13815ee18d3b4a9a51789db2fa98d2 20-Aug-2011 Siarzhuk Zharski <zharik@gmx.li>

* FreeBSD compatibility layer for network drivers is modified to handle
NULL-terminated list of driver_t* entries instead of single entry.
That allows to combine multiple FreeBSD drivers into single Haiku
driver add-ons;
* Support for DEC 21140 (Tulip) chipsets (provided by the 'de' driver)
incorporated into dec21xxx driver. That brings network connectivity to
Haiku systems running in MS Virtual PC VMs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59236b809b68b893414e8dc6b70654c7e536e8c6 15-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Also mangle the name into the device class symbol - this should help with the
e1000 driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 676e23a6fa91ac92f44c3d6c05f2486de3825a5a 08-May-2011 Jérôme Duval <korli@users.berlios.de>

NO_HAIKU_FIRMWARE_NAME_MAP defined an element {NULL} whereas the array length is zero


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 560626ba87620ee841e29f1fbef93b4d235c494f 23-Oct-2010 Colin Günther <coling@gmx.de>

Cody style fixes. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcde9e72e10d69d6fe78a4a89cb395d4208a17de 23-Oct-2010 Colin Günther <coling@gmx.de>

* Add a function needed by the ralink 2860 driver.
* Fix a compiler warning about missing braces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39089 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3806c1b625acfb78997306de817d5ff2a7e98c8 19-Jan-2010 Colin Günther <coling@gmx.de>

* Reworked firmware loading. This gets rid of the need for the settings files.
Name mapping is now defined in the glue code.
* Adding two macros for handling firmware name mapping completely in the glue
code:
- HAIKU_FIRMWARE_NAME_MAP(firmwarePartsCount) is used when mapping is
required. Have a look to iprowifi2100's glue code for an example.
- NO_HAIKU_FIRMWARE_NAME_MAP() is used when the firmware names don't need to
be mapped. For example: broadcom43xx
* Discard usage of vm_map_file() and use the previously read() method again.
After Axel and Ingo agree that both methods are fine in this particular use
case, using read() looks easier on the eye. It needs only 3 parameters, where
vm_map_file() takes 10.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da0be4bf3f3ba9cb391605e9d552df24933e0da7 26-Nov-2009 Colin Günther <coling@gmx.de>

Remove the wlan specific headers to allow a clearer distinction between
ethernet and wlan drivers when compiling them. Also this removes the burden to
recompile every ethernet driver just because of changes in the wlan part.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e087b920676d05d45cec5f28688744e1fdb 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0c615a01ae49634aaf59fbe35b3d55b3bb8890df 01-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed old mutex implementation and renamed cutex to mutex.
* Trivial adjustments of code using mutexes. Mostly removing the
mutex_init() return value check.
* Added mutex_lock_threads_locked(), which is called with the threads
spinlock being held. The spinlock is released while waiting, of
course. This function is useful in cases where the existence of the
mutex object is ensured by holding the threads spinlock.
* Changed the two instances in the VFS code where an IO context of
another team needs to be locked to use mutex_lock_threads_locked().
Before it required a semaphore-based mutex implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25283 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 080b265acd2f9903dcaf3d1e5076b0ecb8c20c6c 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Completely renovated the FreeBSD compatibility layer:
* Removed NETDEV() and DEVNET() macros and functionality.
* The exported devices are now attached to ifnet objects only, therefore, the
ifnet object now has the receive queue, and everything else a device could
need.
* There is now a root device where everything else is attached, it currently
only holds the pci_info structure, so it's more or less a PCI child.
* This simplified the device handling a bit everywhere.
* We now attach drivers already in init_driver() - this is needed as drivers
may publish more than one interface when being attached.
* Implemented device_delete_child(), device_attach() (which bus_generic_attach()
now uses), device_is_attached(), and device_is_alive().
* Therefore, if_initname() does now the actual job of registering the devices.
* On open, if_init() is called which comes pretty close to what our open()
is supposed to do.
* Updated ukphy.c to the one from FreeBSD 7 where used (we should probably
move that into the compat layer, anyway).
* The MII driver array must now be NULL terminated; therefore you don't need
to specify the count anymore.
* Moved PCI code from compat.c to bus.c.
* Moved the driver code from device.c to driver.c.
* Removed superfluous init_compat_layer() function.
* Fixed a few bugs, a few things weren't brought down correctly.
* The rtl8139 interrupt routine now checks if it really was the cause of the
interrupt - this code is not tested, either, it may not work (which would
then require a work-around like I did for the 3com driver).
* The HAIKU_PROTECT_INTR_REGISTER in the rtl8139 driver was pretty much useless
which is why I removed it.
* Probably introduced a lot of new bugs, though - I haven't tested this code
at all yet. It will probably just crash :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23019 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5450cae1728da32f4ca2378516ca2f3a6c10fd56 06-Nov-2007 Hugo Santos <hugosantos@nowhere.fake>

try to hide the gruesome details from the glue code as much as possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7242a223a1a8d60027239e3959e03fb1958beafc 03-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Added miibus_linkchg and miibus_mediainit methods to device_set_driver(); this was the actual
reason the MII bus did not work as mediainit was never called.
* Got rid of the delayed MII bus scanning again; not only did it not solve the problem, it was
also completely unnecessary.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84eb0b5f5b91830d11a346db8cf39aa0dd8b95f1 02-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Delayed scanning the MII bus until the first ifm_media has been set for the
device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22807 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00abfdbe15a127aa808936e467764b9ce6222a5b 02-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Since vtophys() is no public API in FreeBSD, vtophys() is now a macro to
pmap_kextract() not vice versa, just like it is done in FreeBSD itself.
* Added missing contigmalloc() definition for kernel drivers.
* Fixed the "*_devclass defined but not used" warning.
* Fixed warnings.
* Added/adjusted (to our style guide) the license headers for the files I
touched.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1d1b028f2fb6aa8a2b2291a1798e6332e39a6b8 10-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: another go at multiple MII module support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21100 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a43628971d4e39354a114de545cf858fd3a9b82 10-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: some missing definitions as well as allowing multiple MII modules per driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21099 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4b2286de8280643f2859b280d79fcbaf56f78cae 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: MII subsystem (needs testers, more to come).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b650951128733ee316bb4c9b985b99363b2e72e8 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: split device structure to handle for miibus devices, added a new network_device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a275df505bbca8550b30cc6a92b86e6a3c94f2a 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a couple more definitions, minimal, mostly adding a new glue method to re-enable device interrupts since if_rl (rtl 8139) will require it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d1e0a1da998c8f3d93b0b1bd08541901dcd3e23 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: fixed a couple warnings, use KernelStaticLibrary as suggested by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21089 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0747d47e40a090591b09e6fbf2c750ac7b2359dc 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added swi taskqueue and a couple more methods that if_xl needs. also marked some as unimplemented so its clearer what is left to be done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21080 a95241bf-73f2-0310-859d-f6bbb57e9c96


# adf9024529bff9fe3633e54b30490d571dafbe4b 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: only init taskqueue_fast if FBSD_FAST_TASKQUEUE requirement is set (since it starts a thread and consumes a couple semaphores).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21073 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6ace498dd8b5653028a9802468faebd860c0013 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added a requirements field so not all drivers init all subsystems. pcnet for instance doesn't need taskqueues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25d42ceb99f745c136482397667bc9ebb6bd5013 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more definitions, preparing for a DMA-using driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21067 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0bdff52467a7c86f9d0e33f2b4eb79bbf65aa5bb 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: instead of disabling the IRQ, disable the device's interrupts on real interrupt request as suggested by Travis. This solves potential issues with shared IRQs. The check & disable interrupts function is part of the required glue code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21045 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddcaaa6129d2c66d69c4bd3d0c238ce813ed62d7 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added open(), which calls into the driver's attach. when testing with PCNET, a interface is already presented to the stack, it is even able to obtain the MAC address from the device, but still more work to do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe1c16a1cd1fdef6f0fddb2a67e48af934 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747c938b9b5f92da067800cd995378e20ba23760 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: now the glue code properly references the required methods so we have proper linkage with gcc 4


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21017 a95241bf-73f2-0310-859d-f6bbb57e9c96