- Add a work-around for nForce3, ULi, and VIA chipsets. Aperture base
address encoded in misc. control register and AGP bridge seems to be
inconsistent with some BIOSes. Instead of relying on BIOS settings,
we just take the initial aperture size and encode them for both
miscellaneous control register and AGP bridge.
- Add preliminary ULi M1689 chipset support. The idea was taken from Linux
because hardware and documentation are unavailable. Not tested.
- Add one more VIA chipset PCI ID taken from Linux driver.
- Use if_printf() and device_printf() and remove vr_unit from the softc.
I had to initialize the ifnet a bit earlier in attach so that the
if_printf()'s in vr_reset() didn't explode with a page fault.
- Use M_ZERO with contigmalloc() rather than an explicit bzero.
- Use callout_*() to manage the callout and make it MPSAFE.
- Fix locking in detach(), we only need to lock across vr_stop().
- Remove sis_unit and use device_printf() and if_printf() instead.
- Use callout_init_mtx() for the callout.
- Remove spls.
- Fix locking for ifmedia to happen in the ifmedia handlers rather than in
sis_ioctl().
Approved by: re (scottl)
% When bus_alloc_resource_any() fails, dc_detach() is called and it
% attempts to deallocate busdma tags and resources that haven't been
% allocated yet, causing a panic every time a dc interface fails to
% attach. Fix by checking that we really have something to dealloc
% before calling bus_dma*() functions.
%
% Approved by: jhb
% MFC after: 1 week
Approved by: re (kensmith)
* Solve "No PHY found" problem for more Yukon Lite variants.
* Catch a bus attach error.
* Improve locking.
(missing in original commit message but was not worth a forced commit):
* put interrupt moderation messages under bootverbose
Approved by: re (kensmith)
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
in case of IP fast forwarding. Enqueue a taskqueue(9) task instead of
calling xl_rxeof() directly.
Reported & tested by: Slava Alpatov
Reviewed by: wpaul
MFC after: 1 week
While there also check for failed device_add_child calls.
Found by: Coventry Analysis tool[1].
Submitted by: sam[1]
Approved by: pjd (mentor)
MFC after: 1 week
dc0: MII without any PHY!
We have to enable the connection to the MII first. Doing so fixes the
problem cards without breaking the older, working cards.
Bad card provided by: deischen
This adds support for the SiS intergrated NIC on some Athlon64 motherboards.
The MAC address is stored in the APC CMOS RAM and this fixes the
sis driver ending up with a 00:00:00:00:00:00 MAC address.
Submitted by: Stasys Smailys <ssmailys@komvista.lt>
Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...).
Log if we cannot free because memory still in use[1].
Change locking to avoid ''acquiring duplicate lock of same
type: "network driver"'' and potential deadlock. Also seems to fix LOR #063.
[1] This change does not solve problems if buffers are still in use when
unloading if_sk.ko. There is ongoing work which will address jumbogram
allocations in a more general way.
PR: kern/75677 (with changes, no mii fixes in here)
Tested by: net, Antoine Brodin (slightly different version)
Approved by: rwatson (mentor)
MFC after: 5 days