summaryrefslogtreecommitdiffstats
path: root/sys/dev/an/if_an_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-121-14/+0
| | | | | | | | | | | | | | | | | 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
* Convert a number of drivers to obtaining their parent DMA tag from theirscottl2012-03-121-1/+1
| | | | PCI device attachment.
* Use bus_*() rather than bus_space_*().jhb2009-11-241-7/+0
|
* - Use device_printf() instead of printf() with an explicit unit numberjhb2009-11-061-15/+12
| | | | | | | | | in the PCI attach routine. - Simplify PCI probe. - Remove no-longer-used 'unit' from an_attach() parameters. PR: kern/126924 Submitted by: gavin
* Style changes from avatar.ambrisko2008-01-181-9/+9
| | | | Submitted by: avatar
* First real attempt at proper locking. The locking is a little complicatedambrisko2008-01-181-1/+4
| | | | | | | | | | | | | | | | | | | | 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@
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | 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@
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-2/+2
|
* - Bump up the general and status RID sizesambrisko2003-12-301-17/+1
| | | | | | | | | | | - 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.
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-3/+3
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-241-4/+4
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* - Add support for Cisco latest firmware RID sizes that supports 25 SSIDs!ambrisko2003-08-201-1/+1
| | | | | | | | | | | | - 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.
* Mega busdma API commit.scottl2003-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-2/+3
| | | | | | | | 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.)
* Don't lock in the attach routine. It isn't required. Register theimp2003-04-101-4/+7
| | | | | | | interrupt handler last. This gets rid of the sleep while locked messages. Reviewed by: ambrisko
* Use __FBSDID rather than rcsid[].obrien2003-04-031-7/+3
|
* an driver now needs wlan, so put the required explicit dependsimp2003-02-171-0/+1
| | | | | | into the source. Reviewed by: ambrisko
* Support for suspend/resume in laptops. Loosely based on the wi(4) patchesambrisko2003-02-051-0/+20
| | | | | | | but not quite. The memory descriptors and most of the card parameters need to be writen to the card. MFC in: 3 days
* Add support for MPI-350 the mini-pci Cisco Aironet card. This needs moreambrisko2002-12-291-16/+68
| | | | | | | | | | | | | | | | | | | | | | 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
* network interface driver changes:sam2002-11-141-1/+1
| | | | | | | | | | | | | | 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
* Remove __P.alfred2002-03-201-3/+3
|
* Add missing includes of sys/lock.h.jhb2001-10-111-0/+1
|
* Lots of style(9) related white space fixes. Mostly missing spacesbrooks2001-09-101-6/+8
| | | | | after if, for, while, switch, '{', and '}' plus a bunch of bogus whitespace at the end of lines.
* Add PCI ID for Cisco Aironet 350 Series cards. The patch differsbrooks2001-08-061-0/+2
| | | | | | | slightly from the submitted one. PR: kern/29415 Submitted by: Bob Fleck <rfleck@cigital.com>
* Currently, each wireless networking driver has it's own control programphk2001-05-261-0/+2
| | | | | | | | | | | | 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>
* Catch up to moving headers:jhb2000-10-201-1/+1
| | | | | - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
* Remember to assign an_dev to device_t before calling an_attach().wpaul2000-10-131-0/+1
|
* Convert the Aironet driver to use mutexes instead of spls.wpaul2000-10-131-5/+1
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-1/+1
| | | | | | | | | 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
* Oops, nearly forgot to commit this one. Use correct register names, orpeter2000-05-281-3/+3
| | | | this will not compile without COMPAT_OLDPCI.
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-191-1/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* Actually read the PCI device ID when testing the device ID value againstwpaul2000-01-151-1/+1
| | | | the supported devices list.
* Add driver support for the Aironet 4500/4800 series wireless 802.11wpaul2000-01-141-0/+226
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.
OpenPOWER on IntegriCloud