History log of /freebsd/sys/dev/dc/if_dc.c (Results 126 – 150 of 506)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8069c79d 04-Dec-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix on sparc64.


# 8df1ebe9 02-Dec-2005 Marcel Moolenaar <marcel@FreeBSD.org>

Fix the misalignment bugs differently than was done in the previous
commit. Copy the ethernet address into a local buffer, which we know
is sufficiently aligned for the width of the memory accesses t

Fix the misalignment bugs differently than was done in the previous
commit. Copy the ethernet address into a local buffer, which we know
is sufficiently aligned for the width of the memory accesses that we
do. This also eliminates all suspicious and potentionally harmful
casts.

In collaboration with: ru

show more ...


# 829733d0 22-Nov-2005 Marcel Moolenaar <marcel@FreeBSD.org>

Resolve misalignment traps caused by changes to IF_LLADDR().
Use de16dec() and le16dec() to fetch the link-level address
from struct ifnet.

Tested on: alpha
Reviewed by: jhb
See also: de(4)


# 4a0d6638 11-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

- Store pointer to the link-level address right in "struct ifnet"
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
on

- Store pointer to the link-level address right in "struct ifnet"
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
one) ifaddr_byindex() users were converted to use ifp->if_addr.

- Stop storing a (pointer to) Ethernet address in "struct arpcom",
and drop the IFP2ENADDR() macro; all users have been converted
to use IF_LLADDR() instead.

show more ...


Revision tags: release/6.0.0_cvs, release/6.0.0
# 6a3033a8 18-Oct-2005 Warner Losh <imp@FreeBSD.org>

Make dc compile after repo-copy.


# f0796cd2 05-Oct-2005 Gleb Smirnoff <glebius@FreeBSD.org>

- Don't pollute opt_global.h with DEVICE_POLLING and introduce
opt_device_polling.h
- Include opt_device_polling.h into appropriate files.
- Embrace with HAVE_KERNEL_OPTION_HEADERS the include in t

- Don't pollute opt_global.h with DEVICE_POLLING and introduce
opt_device_polling.h
- Include opt_device_polling.h into appropriate files.
- Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that
can be compiled as loadable modules.

Reviewed by: bde

show more ...


# 40929967 01-Oct-2005 Gleb Smirnoff <glebius@FreeBSD.org>

Big polling(4) cleanup.

o Axe poll in trap.

o Axe IFF_POLLING flag from if_flags.

o Rework revision 1.21 (Giant removal), in such a way that
poll_mtx is not dropped during call to polling handle

Big polling(4) cleanup.

o Axe poll in trap.

o Axe IFF_POLLING flag from if_flags.

o Rework revision 1.21 (Giant removal), in such a way that
poll_mtx is not dropped during call to polling handler.
This fixes problem with idle polling.

o Make registration and deregistration from polling in a
functional way, insted of next tick/interrupt.

o Obsolete kern.polling.enable. Polling is turned on/off
with ifconfig.

Detailed kern_poll.c changes:
- Remove polling handler flags, introduced in 1.21. The are not
needed now.
- Forget and do not check if_flags, if_capenable and if_drv_flags.
- Call all registered polling handlers unconditionally.
- Do not drop poll_mtx, when entering polling handlers.
- In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx.
- In netisr_poll() axe the block, where polling code asks drivers
to unregister.
- In netisr_poll() and ether_poll() do polling always, if any
handlers are present.
- In ether_poll_[de]register() remove a lot of error hiding code. Assert
that arguments are correct, instead.
- In ether_poll_[de]register() use standard return values in case of
error or success.
- Introduce poll_switch() that is a sysctl handler for kern.polling.enable.
poll_switch() goes through interface list and enabled/disables polling.
A message that kern.polling.enable is deprecated is printed.

Detailed driver changes:
- On attach driver announces IFCAP_POLLING in if_capabilities, but
not in if_capenable.
- On detach driver calls ether_poll_deregister() if polling is enabled.
- In polling handler driver obtains its lock and checks IFF_DRV_RUNNING
flag. If there is no, then unlocks and returns.
- In ioctl handler driver checks for IFCAP_POLLING flag requested to
be set or cleared. Driver first calls ether_poll_[de]register(), then
obtains driver lock and [dis/en]ables interrupts.
- In interrupt handler driver checks IFCAP_POLLING flag in if_capenable.
If present, then returns.This is important to protect from spurious
interrupts.

Reviewed by: ru, sam, jhb

show more ...


# 3badacee 16-Sep-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix "struct ifnet" leaks when attach() fails in the middle, e.g.
when mii_phy_probe() or bus_setup_intr() fails. For drivers that
call their detach() in this case, call if_free() there to cover
this

Fix "struct ifnet" leaks when attach() fails in the middle, e.g.
when mii_phy_probe() or bus_setup_intr() fails. For drivers that
call their detach() in this case, call if_free() there to cover
this case too.

show more ...


# 4f867c2d 15-Sep-2005 Giorgos Keramidas <keramida@FreeBSD.org>

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

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

show more ...


# 919ccba7 29-Aug-2005 Warner Losh <imp@FreeBSD.org>

Better comment


# 667b0824 29-Aug-2005 Warner Losh <imp@FreeBSD.org>

Fix another instance of old info re: miibus


# c8b27aca 18-Aug-2005 John Baldwin <jhb@FreeBSD.org>

Fixup locking and mark MPSAFE:
- Add locked versions of start and init. The SRM_MEDIA code in dc_init()
stayed in dc_init() instead of moving to dc_init_locked() to make the
locking saner.
- Use

Fixup locking and mark MPSAFE:
- Add locked versions of start and init. The SRM_MEDIA code in dc_init()
stayed in dc_init() instead of moving to dc_init_locked() to make the
locking saner.
- Use callout_init_mtx().
- Fixup locking in detach and ioctl.
- Lock the driver in the ifmedia callouts.
- Don't recurse on the driver lock.
- De-spl.

MFC after: 3 days

show more ...


# 22f6205d 10-Aug-2005 John Baldwin <jhb@FreeBSD.org>

Use device_printf() and if_printf() and remove dc_unit from softc.


# 13f4c340 09-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchron

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.

Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.

Reviewed by: pjd, bz
MFC after: 7 days

show more ...


# 13b203d0 03-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Modify device drivers supporting multicast addresses to lock if_addr_mtx
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintain

Modify device drivers supporting multicast addresses to lock if_addr_mtx
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintained list.

Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca>
MFC after: 1 week

show more ...


# fc74a9f9 10-Jun-2005 Brooks Davis <brooks@FreeBSD.org>

Stop embedding struct ifnet at the top of driver softcs. Instead the
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 c

Stop embedding struct ifnet at the top of driver softcs. Instead the
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

show more ...


# d4fcf3cb 29-May-2005 Yoshihiro Takahashi <nyan@FreeBSD.org>

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


Revision tags: release/5.4.0_cvs, release/5.4.0
# 6d431b17 18-Apr-2005 Warner Losh <imp@FreeBSD.org>

Fix newer Xircom CBE2-100 cards that were reporting
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

Fix newer Xircom CBE2-100 cards that were reporting
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

show more ...


# ab0d8702 09-Mar-2005 Scott Long <scottl@FreeBSD.org>

Bugger, wiped out a needed comma in the previous commit.


# c1b677aa 09-Mar-2005 Scott Long <scottl@FreeBSD.org>

The DC driver asks for an alignment of PAGE_SIZE for data buffers, but also
asks that each buffer be (2048 * 256) bytes long. I suspect that alignment
isn't a real requirement since busdma only rece

The DC driver asks for an alignment of PAGE_SIZE for data buffers, but also
asks that each buffer be (2048 * 256) bytes long. I suspect that alignment
isn't a real requirement since busdma only recently started honoring it. The
size is also bogus. Fix both of these and stop busdma from trying to
exhaust the system memory pool with bounce pages.

Submitted by: Kevin Oberman
MFC After: 7 days

show more ...


# d24ae19d 24-Feb-2005 Warner Losh <imp@FreeBSD.org>

Fix style(9) issues with __P removal.

Noticed by: bde


# d701c913 24-Feb-2005 Warner Losh <imp@FreeBSD.org>

Return BUS_PROBE_DEFAULT instead of 0.


Revision tags: release/4.11.0_cvs, release/4.11.0
# 60727d8b 07-Jan-2005 Warner Losh <imp@FreeBSD.org>

/* -> /*- for license, minor formatting changes


Revision tags: release/5.3.0_cvs, release/5.3.0
# 8c7ff1f3 01-Oct-2004 Maxime Henrion <mux@FreeBSD.org>

Read the MAC address in the EEPROM in the correct byte order. This
is a no-op on little endian architectures, but fixes getting the MAC
address for some dc(4) cards on big endian architectures.

Thi

Read the MAC address in the EEPROM in the correct byte order. This
is a no-op on little endian architectures, but fixes getting the MAC
address for some dc(4) cards on big endian architectures.

This is a RELENG_5 candidate.

Tested by: gallatin (powerpc), marius (sparc64)
First version of the patch written by: gallatin

show more ...


# cbaf877f 01-Oct-2004 Brian Feldman <green@FreeBSD.org>

Add ALTQ support for dc(4), based upon a mostly-working patch from mlaier.


12345678910>>...21