summaryrefslogtreecommitdiffstats
path: root/sys/dev/lnc
Commit message (Collapse)AuthorAgeFilesLines
* Pass a correct lowaddr to bus_dma_tag_create(), lnc(4) cards can onlymux2004-08-221-1/+1
| | | | | | | | | | | | | deal with 24-bit addresses. While the two other attachments, namely isa and cbus, do it properly, the PCI attachment was passing BUS_SPACE_MAXADDR instead of BUS_SPACE_MAXADDR_24BIT. This bug became apparent with the new contigmalloc() code. This fixes the problem reported with lnc(4) interfaces inside VMWare, and should theoritically also fix any user of a PCI lnc(4) card. It is a RELENG_5 MFC candidate. Tested by: Florian Le Goff <madflo@beertech.org>
* Since if_lnc doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Bring in the first chunk of altq driver modifications. This covers themlaier2004-07-021-2/+4
| | | | | | | | | | | following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4), sis(4) and xl(4) More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take a look and tell me if "your" driver is missing, so I can fix this. Tested-by: many No-objection: -current, -net
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-20/+2
|
* Add missing <sys/module.h> includes currently relying on nested includephk2004-06-031-0/+1
| | | | in <sys/kernel.h>
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Remove improper use of if_addrhead in device drivers to checkluigi2004-04-151-7/+0
| | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-173-14/+14
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-4/+2
|
* Peter prefers it this way, bde might also[*]. I just want to have a chanceobrien2004-03-032-2/+2
| | | | | of working on amd64 for vmware use. [*] bde will probably not like either version...
* Adjust lnc(4) for 64-bit platforms should it get newbus'ified.obrien2004-03-032-4/+4
|
* Fix the PCI attach routine to properly setup the IRQ and port resourcejhb2004-01-221-13/+20
| | | | | | | | | rid's and to deallocate resources if a failure occurs during attach. This patch also fixes the driver to return failure if bus_alloc_resource() for the IRQ fails rather than panic'ing on the next line by passing a NULL resource to bus_setup_intr(). The other attachments already do all this. Submitted by: Jun Su <csujun@263.net>
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-4/+4
| | | | Requested by: bde,imp
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-1/+0
|
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-14/+14
| | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-48/+35
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-2/+2
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-244-6/+13
| | | | 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.
* Don't inline ridiculously very large functions.phk2003-07-221-4/+4
| | | | | Compared to the contents of these functions, an extra function call is nano-peanuts.
* Mega busdma API commit.scottl2003-07-013-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-153-3/+9
| | | | | | | | 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.)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-7/+7
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-7/+7
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-144-29/+19
| | | | | | | | | | | | | | 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
* Fix mis-indentation.phk2002-10-021-7/+7
| | | | Spotted by: FlexeLint
* Remove __P.alfred2002-03-202-26/+26
|
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-051-5/+7
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* - Don't overwrite inb, inw and outw.nyan2001-07-047-221/+392
| | | | | | | | - Move the lance_probe function to if_lnc.c. - Support C-NET(98)S again. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and nyan No response from: Paul Richards
* Use a module name of 'if_lnc' in both the PCI and ISA sections ofiedowse2001-03-182-2/+2
| | | | | | | | | | | | the driver. Doing this breaks the ability to unload the unneeded parts of the driver (e.g unload the PCI section when using an ISA card), but currently ifconfig(8) expects an interface `XXX' to have a driver name of `if_XXX'. PR: kern/25582 Submitted by: Alexander N. Kabaev <kabaev@mail.ru>, imp (apparently Warner suggested a similar fix some time ago). Reviewed by: paul (who would prefer to see ifconfig changed instead)
* There were a few changes missed when this file was converted toiedowse2001-03-021-3/+9
| | | | | | | | | | | | | newbus in revision 1.19. As a result, lnc was, I believe, broken for all PCI cards. The softc fields `lnc_btag' and `lnc_bhandle' were not initialised, `rap', `rdp' and `bdp' were initialised to the wrong values, and the size of the DMA ring memory was calculated incorrectly. Paul Richards has further cleanups in the pipeline, but this at least is enough to make the driver usable with VMware. Approved by: paul
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead ofphk2001-02-031-2/+1
| | | | | | | <sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5
* Remove unused #include "lnc.h"peter2001-01-291-1/+0
|
* Make it clear that the macro `inb' is being overridden.wollman2001-01-091-0/+1
|
* The pci and isa drivers were meant to share the same devclass butpaul2000-12-294-4/+5
| | | | | | | the devclass definitions were all wrong so they had their own private ones with the same name. Fix it so they all use the same global devclass.
* Set a lower probe return value for PCI cards so that the pcn driver wins.paul2000-12-291-2/+4
|
* Fix a legacy issue. The offset for reading the MAC address is 0 usingpaul2000-12-291-1/+2
| | | | bus space, not iosize which is what it was when using inb().
* Switch off some debugging code.paul2000-12-162-3/+1
|
* Fixup some problems with the merged code of the previous commit.paul2000-12-163-5/+4
|
* Newbusify.paul2000-12-166-544/+627
| | | | Temporarily disable PC98 until I bring it up to date.
* fix problem with vmware DAD. reported by many, tested @ IETF49 withume2000-12-111-5/+15
| | | | | | help from Florent Parent <Florent.Parent@viagenie.qc.ca>. Obtained from: KAME
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-3/+1
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-132-10/+3
| | | | | | | | | 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
* be sure to wipe out m_pkthdr when you set M_PKTHDR, you may see junk pointeritojun2000-07-041-0/+1
| | | | | in m_pkthdr portion. actually, we should not change pkthdr mbuf <-> non-pkthdr mbuf.
* MF4: add support for the Am79C973.gj2000-06-182-0/+2
|
* Unused includes: #include "pci.h" and #include "lnc.h"peter2000-06-101-3/+0
|
* Dynamically allocate softc structuresbrian2000-06-092-7/+33
| | | | Reviewed by: Mark Knight <mkn@uk.FreeBSD.org>
* Mass update of isa drivers using compatability shims to usepeter2000-05-281-1/+13
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
OpenPOWER on IntegriCloud