summaryrefslogtreecommitdiffstats
path: root/sys/dev/gem
Commit message (Collapse)AuthorAgeFilesLines
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-063-3/+3
|
* Since if_gem 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.
* - Remove a variable no longer used after the conversion to ether_crc32_le().marius2004-06-101-4/+2
| | | | | - While here, save on another one no longer really necessary after the conversion.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-17/+1
|
* Add missing <sys/module.h> includes currently relying on nested includephk2004-06-032-0/+2
| | | | in <sys/kernel.h>
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Clean up two printf()s that were on a line by themselves unintendedlytmm2004-04-231-2/+2
| | | | after the ethernet address printing was moved to common code.
* Let ether_ifattach() announce our MAC address.mdodd2004-03-201-5/+0
| | | | Submitted by: Marius Strobl <marius@alchemy.franken.de>
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-4/+4
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Add new Apple GEM PCI id.grehan2004-02-021-0/+1
|
* Properly initialize all members of the sentinel entry.obrien2003-12-261-1/+1
|
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+2
| | | | | | | | | | | | | 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)
* Preparatory commit to allow prototypes in ofw_machdep.h to containmarcel2003-09-021-0/+1
| | | | | | | both newbus types and OFW types. This involves either including <machine/bus.h> or <dev/ofw/openfirm.h>. Reviewed by: jake, jmg, tmm
* Use __FBSDID().obrien2003-08-242-4/+7
| | | | Also some minor style cleanups.
* s=gem/foo=dev/gem/foo=imp2003-08-231-2/+2
|
* Mega busdma API commit.scottl2003-07-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Some gem and hme hardware bogusly has the intpin register hardwired totmm2003-07-011-3/+6
| | | | | 0; detect this case and correct it. While being there, clean up nearby comments.
* Miscellaneous fixes:tmm2003-05-152-6/+59
| | | | | | | | | | | | | | | | | - Fix compilation without GEM_DEBUG. - Do not #define GEM_DEBUG by default; it adds overhead (due to bzero()ing RX space) and is not needed any more, since the driver is quite stable now. - Fix watchdog timeouts when failing to load TX packets. - Do not forcibly limit the number of descriptors used for a packet to GEM_NTXSEGS, by passing this number to bus_dma_tag_create(). There is no requirement for a limit any lower than the total number of available descriptors, and the present limit caused network problems due to mbuf chains requiring more descriptors. GEM_NTXSEGS is still used to estimate the interrupt window size, for which we just need an estimate. Approved by: re (rwatson)
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-1/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+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.)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Free resources when failing to set up the interrupt.tmm2003-01-211-0/+1
|
* bus_dmamap_sync() overhaul:tmm2003-01-212-22/+18
| | | | | | | | | | | - Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some cases relaxing the (intended) syncing operation a bit. - Stop pretending that that we can sync part of a dmamap: replace the GEM_CDTXSYNC and GEM_CDRXSYNC macros with GEM_CDSYNC to sync the complete control map, and combine syncs wherever possible to avoid the overhead. - Sync all maps before unloading them. - Remove a few syncs which should be unnecessary.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Add detach, shutdown, suspend and resume methods. The latter two aretmm2003-01-083-42/+97
| | | | not really tested, but are derived from the original NetBSD version.
* - Convert to use bus_dmamap_load_mbuf().tmm2003-01-062-397/+155
| | | | | | - remove DPRINTF(), there is a CTR*() for any of them, and KTR is far more useful to debug this driver. - some cleanups; remove some unused code and definitions.
* Catch up with sam's changes to network interfaces.mux2002-11-151-2/+1
|
* network interface driver changes:sam2002-11-141-5/+3
| | | | | | | | | | | | | | 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
* Call bpf_mtap() on outgoing packets.tmm2002-10-261-3/+6
|
* Fix warning.jake2002-07-241-0/+4
|
* Incorporate changes made to the NetBSD version of this driver.benno2002-07-104-87/+159
| | | | | | | | | | | | | | - Remove some obsolete code (NetBSD gem.c r1.12) - Clean up how the local MAC address is programmed (NetBSD gem.c r1.13) - Make the driver work on PowerMacs with gigabit interfaces (NetBSD gem.c r1.14 and r1.15, gemreg.h r1.3 and r1.4, gemvar.h r1.6 and 1.7) - Suppress RX_MAC interrutps regarding the FRAME_COUNT register. (NetBSD gem.c r1.16 and r1.17) - Fix receiver lockups. (NetBSD gem.c r1.18, gemvar.h r1.8) - Distinguish between Apple and Sun variants (NetBSD if_gem_pci.c r1.9) Reviewed by: tmm Obtained from: NetBSD
* Fully reset a gem on some error conditions; otherwise it would hang intmm2002-05-241-0/+4
| | | | | | about 1 of 10 cases. Proposed and tested by: phk
* Move the new byte order function prototypes from <sys/param.h> tomike2002-04-261-0/+1
| | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
* In some cases, RX descriptors that are signalled to have been completedtmm2002-03-232-3/+26
| | | | | | by the hardware are still marked as owned. Handle this by installing a timeout handler to collect this descriptor to avoid having received packets remain unhandled until the next one arrives.
* Remove __P.alfred2002-03-203-47/+45
|
* Use the pci_enable_* functions instead of manually fiddling with thetmm2002-03-111-6/+4
| | | | | | command register. Pointed out by: msmith
* Set the busmaster enable bit in the PCI command register, as the firmwaretmm2002-03-091-0/+9
| | | | | of sparc64 machines will not do this for us if the interface is not used for booting over the network.
* Add a driver for the Sun GEM (Gigabit) and ERI (100 Mb/s) PCI ethernettmm2002-02-274-0/+2989
adaptors, ported from NetBSD.
OpenPOWER on IntegriCloud