summaryrefslogtreecommitdiffstats
path: root/sys/dev/hfa
Commit message (Collapse)AuthorAgeFilesLines
* Apply error and success logic consistently to the function netisr_queue() andandre2004-08-271-1/+1
| | | | | | | | | | | | | | | | | | its users. netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported. Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets. PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Delete an unused file which no longer compiles anyway.njl2004-04-201-599/+0
| | | | Approved by: mdodd
* 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
* Unbreak after the change to use vm_paddr_t. Since vm_paddr_t ismux2004-02-224-8/+8
| | | | | | | an integer type and the a cast to (void *) was added in the definition of NULL for the kernel, we need to use 0 here instead. Partly submitted by: cperciva
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Use the more appropriate vm_paddr_t in places where a physicalharti2004-02-218-61/+74
| | | | | | address for DMA is handled instead of pointers. Submitted by: Joerg Sonneberger <joerg@britannica.bec.de>
* The token for atm_intr is actually a void *, not an int. Clarifyharti2004-02-211-2/+4
| | | | | what atm_intr expects in a comment and de-obfuscate the code a little bit by replacing the portability macros with the native BSD names.
* Use __FBSDID().obrien2003-08-2410-50/+37
| | | | Also some minor style cleanups.
* s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/devimp2003-08-231-1/+1
|
* Prefer new location of pci include files (which have only been in theimp2003-08-2213-14/+14
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Implement a traffic shaping option for the PCA200 for CBR channels.harti2003-07-315-1/+247
| | | | | | | | This is controlled by a per-adapter sysctl hw.atm.hfaX.shape. When set to 0, no shaping occures. When set to 1 at most 1 channel is shaped. When set to 2 all CBR channels are shaped. Note, that the latter may actually not work, because of the adapter supporting the shaping of only one PDU at the same time.
* Make the driver to work with firmware version 4.1.12 (other 4.X.Y shouldharti2003-07-315-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | also do it). Three problems have been encountered: 1. The initialisation command does not work in interrupt mode. Whether this is a firmware bug or a feature is not clear. The original Fore drivers execute the initialize command always in polling mode, so it appears that this behaviour is expected. When we detect a 4.X.Y firmware do busy wait on the command status. 2. The command code of the GET_PROM command has changed. This is an unofficial command anyway. What was GET_PROM in 3.X.Y is CLEAR_STATS in 4.X.Y (although unimplemented in the firmware). We need to use the correct code depending on the firmware. 3. The 4.X.Y firmware can set the error flag in the command status without also setting the completion flag (as the documenation says). Check both variants. An additional field in the per-card structure fu_ft4 is TRUE when we have detected a 4.X.Y firmware. Otherwise it is false. The behaviour of the driver when using a 3.X.Y firmware should be identical to the previous behaviour. This change will enable traffic shaping of (at least one) CBR channels.
* Use a size_t where a buffer length is meant.harti2003-07-291-2/+4
|
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-13/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-3/+1
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+1
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-2/+2
|
* Adjust some casts to quiet warnings.jhb2002-11-062-2/+2
| | | | Reviewed by: mdodd
* Replace aux mbufs with packet tags:sam2002-10-161-1/+1
| | | | | | | | | | | | | | | | | | | o instead of a list of mbufs use a list of m_tag structures a la openbsd o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit ABI/module number cookie o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and use this in defining openbsd-compatible m_tag_find and m_tag_get routines o rewrite KAME use of aux mbufs in terms of packet tags o eliminate the most heavily used aux mbufs by adding an additional struct inpcb parameter to ip_output and ip6_output to allow the IPsec code to locate the security policy to apply to outbound packets o bump __FreeBSD_version so code can be conditionalized o fixup ipfilter's call to ip_output based on __FreeBSD_version Reviewed by: julian, luigi (silent), -arch, -net, darren Approved by: julian, silence from everyone else Obtained from: openbsd (mostly) MFC after: 1 month
* Use more standard variable names for modevent functions.mdodd2002-10-021-2/+2
|
* Add a field to struct cmn_unit to hold a pointer to the driver's softc.mdodd2002-10-012-0/+2
|
* Replace (ab)uses of "NULL" where "0" is really meant.archie2002-08-221-2/+2
|
* - Remove DMA_* macros as only one, DMA_GET_ADDR, was used.arr2002-06-2410-92/+12
| | | | | - Convert DMA_GET_ADDR() calls to vtophys() calls in order to finish removing the DMA_* macros.
* - Remove the definition for SCHED_ATMarr2002-06-241-1/+1
| | | | - Change SCHED_ATM statements into schednetisr() calls.
* - Turn the hea and hfa HARP storage pools into UMA zones and insertarr2002-06-145-22/+28
| | | | | | | | | | | | | | | | the necesary uma_zcreate() and uma_zdestroy calls into module loading handler and the device attach handling. - Change the related HARP netatm code to use UMA zone functions when dealing with the zones that were formerly the ATM interface (hea, hfa) storage pools. - Have atm_physif_freenifs() now get passed an uma_zone_t so that we can properly free the allocated NIF's back to their zone. This should be the last commit to remove any code that makes use of the netatm storage pool api. I will be removing the api code within the near future. Reviewed by: mdodd
* Move some code around.mdodd2002-06-072-12/+12
| | | | Minor whitespace changes.
* Change two KM_COPY()s to bcopy(). This should have been done when themike2002-04-202-2/+2
| | | | KM_* macros were removed.
* - Convert the 'hfa' ATM interface driver to newbus.mdodd2002-04-175-0/+966
| | | | | | - Add stubs for EISA and SBUS cards. (VME, FutureBUS, and TurboChannel stubs not provided.) - Add infrastructure to build driver and bus front-end modules.
* - Nuke fore_pci_device.arr2002-04-161-67/+41
| | | | | | | | | - Add a device_method_t array, fore_methods. - Add a fore_ident_table that contains the various FORE Systems PCA-200 series devices. - Rewrite of the fore_probe routine (formerly known as fore_pci_probe). - Minor changes... mostly WIP stuff to get this updated... still much to be done.
* - Remove PCA-200E definition -- this will be re-added in the commit toarr2002-04-161-1/+0
| | | | | fore_load.c that will add ``fore_ident_table'' which holds various types of FORE Systems PCA-200 series devices.
* Remove __P.alfred2002-03-206-44/+44
|
* Applied the patch to fix HARP ATM that was broken when KAME IPv6 camepirzyk2001-06-202-1/+4
| | | | | | | | into FreeBSD. PR: kern/23620 Submitted by: rh@matriplex.com MFC after: 1 month
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Minor tweaks to get these to stop breaking LINT. They still dont workpeter2001-01-172-0/+10
| | | | and emit warnings, but we need to get the test coverage elsewhere.
* Add back some now needed #include <sys/systm.h>phk2000-12-072-12/+3
| | | | Fix various warnings while here anyway.
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-3/+1
| | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
* Add back some #include <sys/systm.h> which were needed when <sys/ktr.h>phk2000-10-3013-0/+13
| | | | | | doesn't mess us up. Noted by: Harti Brandt <brandt@fokus.gmd.de>
* Remove 86 unneeded #includesphk2000-10-2713-40/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-153-3/+0
|
* Remove even more unneeded #includes.phk2000-10-1413-280/+0
|
* Remove the #include kitchensink <netatm/kern_include.h> and addphk2000-10-1215-102/+611
| | | | | | | | | the #includes to the respective source files. Also un-nest includes in <dev/hfa/fore_include.h> I have run src/tools/tools/kerninclude to remove 1239 clearly unneeded #includes reducing the total from 3524 includes to 2285.
* More HARP polishina:phk2000-10-129-83/+4
| | | | | unifdef -UFORE_SBUS -DFORE_PCI s/ATM_KERNEL/_KERNER/g
* Do some cleanups of the HARP atm codes interface into the system:phk2000-10-122-954/+0
| | | | | | | | Define the NETISR just like all the other NETISRs. unifdef -Usun -D__FreeBSD__ we will probably never support sun4c and if we do we can't use the solaris code anyway and I doubt anybody will be running Fore ATM cards in then in the first place.
* Ensure that DMA mappings are freed in error situations.mks2000-01-152-7/+52
|
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* Fixed printf format errors (don't assume that ntohl() returns u_long;bde1999-08-292-2/+2
| | | | it returns u_int on i386's and in_addr_t (u_int32_t) on alphas).
* $Id$ -> $FreeBSD$peter1999-08-2819-32/+32
|
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-6/+7
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* This commit should be a extensive NO-OP:phk1999-05-301-14/+22
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
OpenPOWER on IntegriCloud