History log of /freebsd-10.3-release/sys/dev/an/if_an_pci.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 254263 12-Aug-2013 scottl

Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR. Thus, the bit is no longer
a reliable indication of capability, and should not be checked. This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by: jhb
Reviewed by: jfv, marius, achadd, achim
MFC after: 1 day


# 232854 12-Mar-2012 scottl

Convert a number of drivers to obtaining their parent DMA tag from their
PCI device attachment.


# 199756 24-Nov-2009 jhb

Use bus_*() rather than bus_space_*().


# 198995 06-Nov-2009 jhb

- Use device_printf() instead of printf() with an explicit unit number
in the PCI attach routine.
- Simplify PCI probe.
- Remove no-longer-used 'unit' from an_attach() parameters.

PR: kern/126924
Submitted by: gavin


# 175446 18-Jan-2008 ambrisko

Style changes from avatar.

Submitted by: avatar


# 175445 18-Jan-2008 ambrisko

First real attempt at proper locking. The locking is a little complicated
since the the command and data that is being built to be sent to or read
from the HW lives in the softc. Commands are later run via an_setdef etc.
In the ioctl path various references are kept to the data stored in
the softc so it needs to be protected. Almost think of the command
in the softc a global variable since it essentially is. Since locking
wasn't done in this type of context the commands would get corrupted.

Thanks to avatar@ for catching some lock issues and dhw@ for testing.

Things are a lot more stable except for the MPI-350 cards. My an(4)
remote laptop stays on the network now.

The driver should be changed so that it uses private memory that is passed
to the functions that talk to the card. Then only those functions would
really need to grab locks.

Reviewed by: avatar@


# 166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


# 143163 05-Mar-2005 imp

Use BUS_PROBE_DEFAULT for pci probe return value


# 123978 30-Dec-2003 ambrisko

- Bump up the general and status RID sizes
- Clear out an_dma_vaddr on free so we can test to see if dma is
setup when the card is kldunloaded/kldloaded etc. only for MPI350
- Use a common detach like wi(4)
- Notify on RID read overflow and truncate this currently causes
a panic in -stable when the stack during an ifconfig an0 is done
with newer firmware
- Convert from UNLOCK/tsleep/LOCK to msleep. I thought I did that
a while ago.


# 119690 02-Sep-2003 jhb

Use PCIR_BAR(x) instead of PCIR_MAPS.

Glanced over by: imp, gibbs
Tested by: i386 LINT


# 119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 119277 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


# 119156 20-Aug-2003 ambrisko

- Add support for Cisco latest firmware RID sizes that supports 25 SSIDs!
- Fix up TX speed changes.
- Make mpi-350 cards sort-of work with new firmware. It RXs okay but TXs
only work for about 14 packets then fails to get an interrupt. The
TX watchdog fires. It has been reported that my hack for now doesn't
break cards with the older firmware. It appears my card has lost
the ability to RX or TX at all but other peoples cards work. I assume
it got damaged in tansport.

MFC: 1 week.


# 117126 01-Jul-2003 scottl

Mega busdma API commit.

Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by: tmm, gibbs


# 113506 15-Apr-2003 mdodd

- Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
such abuse isn't really needed. (And if we do need type information
associated with a module then we should make it explicit and not
use hacks.)


# 113316 10-Apr-2003 imp

Don't lock in the attach routine. It isn't required. Register the
interrupt handler last. This gets rid of the sleep while locked
messages.

Reviewed by: ambrisko


# 113038 03-Apr-2003 obrien

Use __FBSDID rather than rcsid[].


# 111051 17-Feb-2003 imp

an driver now needs wlan, so put the required explicit depends
into the source.

Reviewed by: ambrisko


# 110362 05-Feb-2003 ambrisko

Support for suspend/resume in laptops. Loosely based on the wi(4) patches
but not quite. The memory descriptors and most of the card parameters
need to be writen to the card.

MFC in: 3 days


# 108401 29-Dec-2002 ambrisko

Add support for MPI-350 the mini-pci Cisco Aironet card. This needs more
work. The interface was gleaned from the Linux driver. Currently only
one RX & one TX buffer are used. Firmware support is not tested so for the
MPI-350 so it is disabled. Signal cache and monitor mode are not supported
yet. Signal cache is not supported since in encapsulation mode ethernet
frames are returned by the chip. LAN monitor mode support will be added
shortly. Thanks to Warner for the MPI-350 card he sent me.

Add support for RSSI map from PR kern/32880 which was incomplete. Enhanced
with the ability to select the cache mode of raw, dbm or per-cent.

Clean up Signal/Noise/Quality structures and units with help from
Marco Molteni.

Change flash to use a malloc'ed buffer when needed.

PR: kern/32880
Submitted by: Douglas S. J. De Couto decouto@pdos.lcs.mit.edu,
Marco Molteni
MFC: 3 weeks


# 106937 14-Nov-2002 sam

network interface driver changes:

o don't strip the Ethernet header from inbound packets; pass packets
up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by: many
Approved by: re


# 92739 20-Mar-2002 alfred

Remove __P.


# 84811 11-Oct-2001 jhb

Add missing includes of sys/lock.h.


# 83270 10-Sep-2001 brooks

Lots of style(9) related white space fixes. Mostly missing spaces
after if, for, while, switch, '{', and '}' plus a bunch of bogus
whitespace at the end of lines.


# 81221 06-Aug-2001 brooks

Add PCI ID for Cisco Aironet 350 Series cards. The patch differs
slightly from the submitted one.

PR: kern/29415
Submitted by: Bob Fleck <rfleck@cigital.com>


# 77217 26-May-2001 phk

Currently, each wireless networking driver has it's own control program
despite the fact that most people want to set exactly the same settings
regardless of which card they have. It has been repeatidly suggested
that this configuration should be done via ifconfig. This patch
implements the required functionality in ifconfig and add support to the
wi and an drivers. It also provides partial, untested support for the
awi driver.

PR: 25577
Submitted by: Brooks Davis <brooks@one-eyed-alien.net>


# 67365 20-Oct-2000 jhb

Catch up to moving headers:
- machine/ipl.h -> sys/ipl.h
- machine/mutex.h -> sys/mutex.h


# 67096 13-Oct-2000 wpaul

Remember to assign an_dev to device_t before calling an_attach().


# 67094 13-Oct-2000 wpaul

Convert the Aironet driver to use mutexes instead of spls.


# 63090 13-Jul-2000 archie

Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by: julian, freebsd-net


# 61048 28-May-2000 peter

Oops, nearly forgot to commit this one. Use correct register names, or
this will not compile without COMPAT_OLDPCI.


# 59391 19-Apr-2000 phk

Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>


# 56051 15-Jan-2000 wpaul

Actually read the PCI device ID when testing the device ID value against
the supported devices list.


# 55992 14-Jan-2000 wpaul

Add driver support for the Aironet 4500/4800 series wireless 802.11
NICs. (Finally!) The PCMCIA, ISA and PCI varieties are all supported,
though only the ISA and PCI ones will work on the alpha for now.
PCCARD, ISA and PCI attachments are all provided. Also provided an
ancontrol(8) utility for configuring the NIC, man pages, and updated
pccard.conf.sample. ISA cards are supported in both ISA PnP and hard-wired
mode, although you must configure the kernel explicitly to support the
hardwired mode since you have to know the I/O address and port ahead
of time.

Special thanks to Doug Ambrisko for doing the initial newbus hackery
and getting it to work in infrastructure mode.