head	1.16;
access;
symbols
	RELENG_8_4:1.16.0.2
	RELENG_9_1_0_RELEASE:1.15.4.1.4.2
	RELENG_9_1:1.15.4.1.0.4
	RELENG_9_1_BP:1.15.4.1
	RELENG_8_3_0_RELEASE:1.15.2.1.8.1
	RELENG_8_3:1.15.2.1.0.8
	RELENG_8_3_BP:1.15.2.1
	RELENG_9_0_0_RELEASE:1.15.4.1.2.1
	RELENG_9_0:1.15.4.1.0.2
	RELENG_9_0_BP:1.15.4.1
	RELENG_9:1.15.0.4
	RELENG_9_BP:1.15
	RELENG_7_4_0_RELEASE:1.14.2.1.8.1
	RELENG_8_2_0_RELEASE:1.15.2.1.6.1
	RELENG_7_4:1.14.2.1.0.8
	RELENG_7_4_BP:1.14.2.1
	RELENG_8_2:1.15.2.1.0.6
	RELENG_8_2_BP:1.15.2.1
	RELENG_8_1_0_RELEASE:1.15.2.1.4.1
	RELENG_8_1:1.15.2.1.0.4
	RELENG_8_1_BP:1.15.2.1
	RELENG_7_3_0_RELEASE:1.14.2.1.6.1
	RELENG_7_3:1.14.2.1.0.6
	RELENG_7_3_BP:1.14.2.1
	RELENG_8_0_0_RELEASE:1.15.2.1.2.1
	RELENG_8_0:1.15.2.1.0.2
	RELENG_8_0_BP:1.15.2.1
	RELENG_8:1.15.0.2
	RELENG_8_BP:1.15
	RELENG_7_2_0_RELEASE:1.14.2.1.4.1
	RELENG_7_2:1.14.2.1.0.4
	RELENG_7_2_BP:1.14.2.1
	RELENG_7_1_0_RELEASE:1.14.2.1.2.1
	RELENG_6_4_0_RELEASE:1.13.26.1
	RELENG_7_1:1.14.2.1.0.2
	RELENG_7_1_BP:1.14.2.1
	RELENG_6_4:1.13.0.26
	RELENG_6_4_BP:1.13
	RELENG_7_0_0_RELEASE:1.14
	RELENG_6_3_0_RELEASE:1.13
	RELENG_7_0:1.14.0.4
	RELENG_7_0_BP:1.14
	RELENG_6_3:1.13.0.24
	RELENG_6_3_BP:1.13
	RELENG_7:1.14.0.2
	RELENG_7_BP:1.14
	RELENG_6_2_0_RELEASE:1.13
	RELENG_6_2:1.13.0.22
	RELENG_6_2_BP:1.13
	RELENG_5_5_0_RELEASE:1.13
	RELENG_5_5:1.13.0.20
	RELENG_5_5_BP:1.13
	RELENG_6_1_0_RELEASE:1.13
	RELENG_6_1:1.13.0.18
	RELENG_6_1_BP:1.13
	RELENG_6_0_0_RELEASE:1.13
	RELENG_6_0:1.13.0.16
	RELENG_6_0_BP:1.13
	RELENG_6:1.13.0.14
	RELENG_6_BP:1.13
	RELENG_5_4_0_RELEASE:1.13
	RELENG_5_4:1.13.0.12
	RELENG_5_4_BP:1.13
	RELENG_4_11_0_RELEASE:1.9
	RELENG_4_11:1.9.0.20
	RELENG_4_11_BP:1.9
	RELENG_5_3_0_RELEASE:1.13
	RELENG_5_3:1.13.0.10
	RELENG_5_3_BP:1.13
	RELENG_5:1.13.0.8
	RELENG_5_BP:1.13
	RELENG_4_10_0_RELEASE:1.9
	RELENG_4_10:1.9.0.18
	RELENG_4_10_BP:1.9
	RELENG_5_2_1_RELEASE:1.13
	RELENG_5_2_0_RELEASE:1.13
	RELENG_5_2:1.13.0.6
	RELENG_5_2_BP:1.13
	RELENG_4_9_0_RELEASE:1.9
	RELENG_4_9:1.9.0.16
	RELENG_4_9_BP:1.9
	RELENG_5_1_0_RELEASE:1.13
	RELENG_5_1:1.13.0.4
	RELENG_5_1_BP:1.13
	RELENG_4_8_0_RELEASE:1.9
	RELENG_4_8:1.9.0.14
	RELENG_4_8_BP:1.9
	RELENG_5_0_0_RELEASE:1.13
	RELENG_5_0:1.13.0.2
	RELENG_5_0_BP:1.13
	RELENG_4_7_0_RELEASE:1.9
	RELENG_4_7:1.9.0.12
	RELENG_4_7_BP:1.9
	RELENG_4_6_2_RELEASE:1.9
	RELENG_4_6_1_RELEASE:1.9
	RELENG_4_6_0_RELEASE:1.9
	RELENG_4_6:1.9.0.10
	RELENG_4_6_BP:1.9
	RELENG_4_5_0_RELEASE:1.9
	RELENG_4_5:1.9.0.8
	RELENG_4_5_BP:1.9
	RELENG_4_4_0_RELEASE:1.9
	RELENG_4_4:1.9.0.6
	RELENG_4_4_BP:1.9
	KSE_MILESTONE_2:1.13
	KSE_PRE_MILESTONE_2:1.13
	RELENG_4_3_0_RELEASE:1.9
	RELENG_4_3:1.9.0.4
	RELENG_4_3_BP:1.9
	RELENG_4_2_0_RELEASE:1.9
	RELENG_4_1_1_RELEASE:1.9
	PRE_SMPNG:1.12
	RELENG_4_1_0_RELEASE:1.9
	RELENG_4_0_0_RELEASE:1.9
	RELENG_4:1.9.0.2
	RELENG_4_BP:1.9;
locks; strict;
comment	@# @;


1.16
date	2012.11.17.01.53.00;	author svnexp;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2008.01.21.04.27.32;	author yongari;	state Exp;
branches
	1.15.2.1
	1.15.4.1;
next	1.14;

1.14
date	2005.09.27.18.10.38;	author mlaier;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2001.01.06.14.00.14;	author obrien;	state Exp;
branches
	1.13.14.1
	1.13.26.1;
next	1.12;

1.12
date	2000.05.27.01.14.10;	author peter;	state Exp;
branches;
next	1.11;

1.11
date	2000.05.04.12.08.13;	author peter;	state Exp;
branches;
next	1.10;

1.10
date	2000.05.01.18.58.43;	author peter;	state Exp;
branches;
next	1.9;

1.9
date	2000.01.28.11.26.35;	author bde;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	99.11.28.18.53.18;	author bde;	state Exp;
branches;
next	1.7;

1.7
date	99.09.27.01.04.41;	author peter;	state Exp;
branches;
next	1.6;

1.6
date	99.09.27.00.34.00;	author peter;	state Exp;
branches;
next	1.5;

1.5
date	99.09.20.06.11.44;	author obrien;	state Exp;
branches;
next	1.4;

1.4
date	99.08.30.23.08.31;	author wpaul;	state Exp;
branches;
next	1.3;

1.3
date	99.08.28.00.47.34;	author peter;	state Exp;
branches;
next	1.2;

1.2
date	99.08.10.17.15.14;	author wpaul;	state Exp;
branches;
next	1.1;

1.1
date	99.07.25.04.32.38;	author wpaul;	state Exp;
branches;
next	;

1.16.2.1
date	2012.11.17.01.53.00;	author svnexp;	state dead;
branches;
next	1.16.2.2;

1.16.2.2
date	2013.03.28.13.05.23;	author svnexp;	state Exp;
branches;
next	;

1.15.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.15.2.1.2.1
	1.15.2.1.4.1
	1.15.2.1.6.1
	1.15.2.1.8.1;
next	1.15.2.2;

1.15.2.2
date	2012.11.17.10.36.58;	author svnexp;	state Exp;
branches;
next	;

1.15.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.15.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.15.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.15.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.15.2.1.8.2;

1.15.2.1.8.2
date	2012.11.17.08.25.34;	author svnexp;	state Exp;
branches;
next	;

1.15.4.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.15.4.1.2.1
	1.15.4.1.4.1;
next	1.15.4.2;

1.15.4.2
date	2012.11.17.11.37.18;	author svnexp;	state Exp;
branches;
next	;

1.15.4.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.15.4.1.2.2;

1.15.4.1.2.2
date	2012.11.17.08.37.14;	author svnexp;	state Exp;
branches;
next	;

1.15.4.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.15.4.1.4.2;

1.15.4.1.4.2
date	2012.11.17.08.48.05;	author svnexp;	state Exp;
branches;
next	;

1.14.2.1
date	2008.04.14.06.21.34;	author yongari;	state Exp;
branches
	1.14.2.1.2.1
	1.14.2.1.4.1
	1.14.2.1.6.1
	1.14.2.1.8.1;
next	1.14.2.2;

1.14.2.2
date	2012.11.17.08.06.55;	author svnexp;	state Exp;
branches;
next	;

1.14.2.1.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.14.2.1.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.14.2.1.6.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.14.2.1.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.14.2.1.8.2;

1.14.2.1.8.2
date	2012.11.17.08.17.27;	author svnexp;	state Exp;
branches;
next	;

1.13.14.1
date	2012.11.17.07.44.25;	author svnexp;	state Exp;
branches;
next	;

1.13.26.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.9.2.1
date	2012.11.17.07.26.34;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.16
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $

.PATH: ${.CURDIR}/../../dev/sf

KMOD=	if_sf
SRCS=	if_sf.c device_if.h bus_if.h pci_if.h
SRCS+=	miibus_if.h

.include <bsd.kmod.mk>
@


1.16.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:23 +0000
@
text
@d1 9
@


1.16.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 9
# $FreeBSD: releng/8.4/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $

.PATH: ${.CURDIR}/../../dev/sf

KMOD=	if_sf
SRCS=	if_sf.c device_if.h bus_if.h pci_if.h
SRCS+=	miibus_if.h

.include <bsd.kmod.mk>
@


1.15
log
@Update file list and Makefile after repocopying sf(4) from
src/sys/pci to src/sys/dev.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.15.4.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.15.4.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $
@


1.15.4.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.15.4.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $
@


1.15.4.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.15.4.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $
@


1.15.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.15.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $
@


1.15.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.15.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/modules/sf/Makefile 175521 2008-01-21 04:27:32Z yongari $
@


1.15.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.15.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.15.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.14
log
@Remove bridge(4) from the tree.  if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on:	-arch
Reviewed by:	thompsa
X-MFC-after:	never (RELENG_6 as transition period)
@
text
@d3 1
a3 1
.PATH: ${.CURDIR}/../../pci
@


1.14.2.1
log
@MFC sf(4) to latest HEAD.
   o sf(4) repocopied from sys/pci to sys/dev/sf

  Overhaul sf(4) to make it run on all architectures and implement
  checksum offoload by downloading AIC-6915 firmware. Changes are
   o Header file cleanup.
   o Simplified probe logic.
   o s/u_int{8,16,32}_t/uint{8,16,32}_t/g
   o K&R -> ANSI C.
   o In register access function, added support both memory mapped and
     IO space register acccess. The function will dynamically detect
     which method would be choosed.
   o sf_setperf() was modified to support strict-alignment
     architectures.
   o Use SF_MII_DATAPORT instead of hardcoded value 0xffff.
   o Added link state/speed, duplex changes handling task q. The task q
     is also responsible for flow control settings.
   o Always hornor link up/down state reported by mii layers. The link
     state information is used in sf_start() to determine whether we
     got a valid link.
   o Added experimental flow-control setup. It was commented out but
     will be activated once we have flow-cotrol infrastructure in mii
     layer.
   o Simplify IFF_UP/IFCAP_POLLING and IFF_PROMISC handling logic. Rx
     filter always honors promiscuous mode.
   o Implemented suspend/resume methods.
   o Reorganized Rx filter routine so promiscuous mode changes doesn't
     require interface re-initialization.
   o Reimplemnted driver probe routine such that it looks for matching
     device from supported hardware list table. This change will help to
     add newer hardware revision to the driver.
   o Use ETHER_ADDR_LEN instead of hardcoded value.
   o Prefer memory space register mapping over I/O space as the hardware
     requires lots of register access to get various consumer/producer
     index. Failing to get memory space mapping, sf(4) falls back to I/O
     space mapping. Use of memory space register mapping requires
     somewhat large memory space(512K), though.
   o Switch to simpler bus_{read,write}_{1,2,4}.
   o Use PCIR_BAR macro to get BARs.
   o Program PCI cache line size if the cache line size was set to 0
     and enable PCI MWI.
   o Add a new sysctl node 'dev.sf.N.stats' that shows various MAC
     counters for Rx/Tx statistics.
   o Add a sysctl node to configure interrupt moderation timer. The
     timer defers interrupts generation until time specified in timer
     control register is expired. The value in the timer register is in
     units of 102.4us. The allowable range for the timer is 0 - 31
     (0 ~ 3.276ms).
     The default value is 1(102.4us). Users can change the timer value
     with dev.sf.N.int_mod sysctl(8) variable/loader(8) tunable.
   o bus_dma(9) conversion
      - Enable 64bit DMA addressing.
      - Enable 64bit descriptor format support.
      - Apply descriptor ring alignment requirements(256 bytes alignment).
      - Apply Rx buffer address alignment requirements(4 bytes alignment).
      - Apply 4GB boundary restrictions(Tx/Rx ring and its completion ring
        should live in the same 4GB address space.)
      - Set number of allowable number of DMA segments to 16. In fact,
        AIC-6915 doesn't have a limit for number of DMA segments but it
        would be waste of Tx descriptor resource if we allow more than 16.
      - Rx/Tx side bus_dmamap_load_mbuf_sg(9) support.
      - Added alignment fixup code for strict-alignment architectures.
      - Added endianness support code in Tx/Rx descriptor access.
      With these changes sf(4) should work on all platforms.
   o Don't set if_mtu in device attach, it's handled in ether_ifattach.
   o Use our own callout to drive watchdog timer.
   o Enable VLAN oversized frames and announce sf(4)'s VLAN capability
     to upper layer.
   o In sf_detach(), remove mtx_initialized KASSERT as it's not possible
     to get there without initialzing the mutex. Also mark that we're
     about to detaching so active bpf listeners do not panic the system.
   o To reduce PCI register access cycles, Rx completion ring is
     directly scanned instead of reading consumer/producer index
     registers. In theory, Tx completion ring also can be directly
     scanned. However the completion ring is composed of two types
     completion(1 for Tx done and 1 and DMA done). So reading producer
     index via register access would be more safer way to detect the
     ring wrap-around.
   o In sf_rxeof(), don't use m_devget(9) to align recevied frames. The
     alignment is required only for strict-alignment architectures and
     now the alignment is handled by sf_fixup_rx() if required. The
     removal of the copy operation in fast path should increase Rx
     performance a lot on non-strict-alignemnt architectures such as
     i386 and amd64.
   o In sf_newbuf(), don't set descriptor valid bit as sf(4) is
     programmed to run with normal mode. In normal mode, the valid bit
     have no meaning. The valid bit should be used only when the
     hardware uses polling(prefetch) mode. The end of descriptor queue
     bit could be used if needed, but sf(4) relys on auto-wrapping of
     hardware on 256 descriptor queue entries so both valid and
     descriptor end bit are not used anymore.
   o Don't disable generation of Tx DMA completion as said in datasheet
     and use the Tx DMA completion entry instead of relying on Tx done
     completion entry. Also added additional Tx completion entry type
     check in Tx completion handler.
   o Don't blindly reset watchdog timer in sf_txeof(). sf(4) now unarm
     the the watchdog only if there are no active Tx descriptors in Tx
     queue.
   o Don't manually update various counters in driver, instead, use
     built-in MAC statistic registers to update them. The statistic
     registers are updated in every second.
   o Modified Tx underrun handlers to increase the threshold value
     in units of 256 bytes. Previously it used to increase 16 bytes
     at a time which seems to take too long to stabalize whenever Tx
     underrun occurrs.
   o In interrupt handler, additional check for the interrupt is
     performed such that interrupts only for this device is allowed to
     process descriptor rings. Because reading SF_ISR register clears
     all interrtups, nuke writing to a SF_ISR register.
   o Tx underrun is abonormal condition and SF_ISR_ABNORMALINTR includes
     the interrupt. So there is no need to inspect the Tx underrun again
     in main interrupt loop.
   o Don't blindly reinitialize hardware for abnormal interrupt
     condition. sf(4) reintializes the hardware only when it encounters
     DMA error which requires an explicit hardware reinitialization.
   o Fix a long standing bug that incorrectly clears MAC statistic
     registers in sf_init_locked.
   o Added strict-alignment safe way of ethernet address reprogramming
     as IF_LLADDR may return unaligned address.
   o Move sf_reset() to sf_init_locked in order to always reset the
     hardware to a known state prior to configuring hardware.
   o Set default Rx DMA, Tx DMA paramters as shown in datasheet.
   o Enable PCI busmaster logic and autopadding for VLAN frames.
   o Rework sf_encap.
       - Previously sf(4) used to type 0 of Tx descriptor with padding
         enabled to store driver private data. Emebedding private data
         structures into descriptors is bad idea as the structure size
         would be different between 64bit and 32bit architectures. The
         type 0 descriptor allows fixed number of DMA segments in
         a descriptor format and provides relatively simple interface to
         manage multi-fragmented frames.
         However, it wastes lots of Tx descriptors as not all frames are
         fragmented as the number of allowable segments in a descriptor.
       - To overcome the limitation of type 0 descriptor, switch to type
         2 descriptor which allows 64bit DMA addressing and can handle
         unliumited number of fragmented DMA segments. The drawback of
         type 2 descriptor is in its complexity in managing descriptors
         as driver should handle the end of Tx ring manually.
      -  Manually set Tx desciptor queue end mark and record number of
         used descriptors to reclaim used descriptors in sf_txeof().
   o Rework sf_start.
       - Honor link up/down state before attempting transmission.
       - Because sf(4) uses only one of two Tx queues, use low priority
         queue instead of high one. This will remove one shift operation
         in each Tx kick command.
       - Cache last produder index into softc such that subsequenet Tx
         operation doesn't need to access producer index register.
   o Rewrote sf_stats_update to include all available MAC statistic
     counters.
   o Employ AIC-6915 firmware from Adaptec and implement firmware
     download routine and TCP/UDP checksum offload.
     Partial checksum offload support was commented out due to the
     possibility of firmware bug in RxGFP.
     The firmware can strip VLAN tag in Rx path but the lack of firmware
     assistance of VLAN tag insertion in transmit side made it useless
     on FreeBSD. Unlike checksum offload, FreeBSD requires both Tx/Rx
     hardware VLAN assistance capability. The firmware may also detect
     wakeup frame and can wake system up from states other than D0.
     However, the lack of wakeup support form D3cold state keep me from
     adding WOL capability. Also detecting WOL frame requires firmware
     support but it's not yet known to me whether the firmware can
     process the WOL frame.
   o Changed *_ADDR_HIADDR to *_ADDR_HI to match other definitions of
     registers.
   o Added definitioan to interrupt moderation related constants.
   o Redefined SF_INTRS to include Tx DMA done and DMA errors. Removed
     Tx done as it's not needed anymore.
   o Added definition for Rx/Tx DMA high priority threshold.
   o Nuked unused marco SF_IDX_LO, SF_IDX_HI.
   o Added complete MAC statistic register definition.
   o Modified sf_stats structure to hold all MAC statistic regiters.
   o Nuke various driver private padding data in Tx/Rx descriptor
     definition. sf(4) no longer requires private padding. Also remove
     unused padding related definitions. This greatly simplifies
     descriptor manipulation on 64bit architectures.
   o Becase we no longer pad driver private data into descriptor,
     remove deprecated/not-applicable comments for padding.
   o Redefine Rx/Tx desciptor status. sf(4) doesn't use bit fileds
     anymore to support endianness.
   o Import AIC-6915 firmware for GFP from Adaptec.
@
text
@d3 1
a3 1
.PATH: ${.CURDIR}/../../dev/sf
@


1.14.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sys/modules/sf/Makefile 178188 2008-04-14 06:21:34Z yongari $
@


1.14.2.1.8.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.14.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sys/modules/sf/Makefile 178188 2008-04-14 06:21:34Z yongari $
@


1.14.2.1.6.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.14.2.1.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.14.2.1.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.13
log
@Use a consistent style and one much closer to the rest of /usr/src
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.12 2000/05/27 01:14:10 peter Exp $
d6 1
a6 1
SRCS=	if_sf.c opt_bdg.h device_if.h bus_if.h pci_if.h
@


1.13.14.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/sys/modules/sf/Makefile 70711 2001-01-06 14:00:42Z obrien $
@


1.13.26.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.12
log
@Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead of
encoding the relative path.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.11 2000/05/04 12:08:13 peter Exp $
d3 5
a7 4
.PATH:	${.CURDIR}/../../pci
KMOD	= if_sf
SRCS	= if_sf.c opt_bdg.h device_if.h bus_if.h pci_if.h
SRCS	+= miibus_if.h
@


1.11
log
@Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.
This means that the kernel can be totally self contained now and is not
dependent on the last buildworld to update /usr/share/mk.  This might
also make it easier to build 5.x kernels on 4.0 boxes etc, assuming
gensetdefs and config(8) are updated.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.10 2000/05/01 18:58:43 peter Exp $
d8 1
a8 1
.include "${.CURDIR}/../../conf/kmod.mk"
@


1.10
log
@Zap KMODDEPS line
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.9 2000/01/28 11:26:35 bde Exp $
d8 1
a8 1
.include <bsd.kmod.mk>
@


1.9
log
@Add ${DEBUG_FLAGS} to CFLAGS in bsd.kmod.mk, not in scattered module
makefiles.  Bad examples in fxp/Makefile keep getting copied to new
makefiles.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.8 1999/11/28 18:53:18 bde Exp $
a6 1
KMODDEPS = miibus
@


1.9.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/sys/modules/sf/Makefile 56735 2000-01-28 11:26:46Z bde $
@


1.8
log
@Removed special rules for building and cleaning device interface files
and empty options files.  The rules are now generated automatically in
bsd.kmod.mk.  Cleaned up related things ($S and ${CLEANFILES}).
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.7 1999/09/27 01:04:41 peter Exp $
a7 2

CFLAGS	+= ${DEBUG_FLAGS}
@


1.7
log
@Zap some unused echo "#define NFOO 1" > foo.h style defunct stuff.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.6 1999/09/27 00:34:00 peter Exp $
d3 1
a3 2
S	= ${.CURDIR}/../..
.PATH:	$S/pci
a6 2
CLEANFILES	+= opt_bdg.h device_if.h bus_if.h pci_if.h
CLEANFILES	+= miibus_if.h
a9 15

opt_bdg.h:
	touch opt_bdg.h

device_if.h: $S/kern/makedevops.pl $S/kern/device_if.m
	perl $S/kern/makedevops.pl -h $S/kern/device_if.m

bus_if.h: $S/kern/makedevops.pl $S/kern/bus_if.m
	perl $S/kern/makedevops.pl -h $S/kern/bus_if.m

pci_if.h: $S/kern/makedevops.pl $S/pci/pci_if.m
	perl $S/kern/makedevops.pl -h $S/pci/pci_if.m

miibus_if.h: $S/kern/makedevops.pl $S/dev/mii/miibus_if.m
	perl $S/kern/makedevops.pl -h $S/dev/mii/miibus_if.m
@


1.6
log
@Don't generate 'bpf.h' since it's not used.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.5 1999/09/20 06:11:44 obrien Exp $
d6 1
a6 1
SRCS	= if_sf.c sf.h opt_bdg.h device_if.h bus_if.h pci_if.h
d8 1
a8 1
CLEANFILES	+= sf.h opt_bdg.h device_if.h bus_if.h pci_if.h
a12 3

sf.h:
	echo "#define NSF 1" > sf.h
@


1.5
log
@Change the name of the installed KLM to contain a leading "if_".
Except for miibus which is now installed as miibus.ko.

Discussed by:	msmith, peter, and wpaul
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/sf/Makefile,v 1.4 1999/08/30 23:08:31 wpaul Exp $
d6 1
a6 1
SRCS	= if_sf.c sf.h bpf.h opt_bdg.h device_if.h bus_if.h pci_if.h
d8 1
a8 1
CLEANFILES	+= sf.h bpf.h opt_bdg.h device_if.h bus_if.h pci_if.h
a15 3

bpf.h:
	echo "#define NBPF 1" > bpf.h
@


1.4
log
@Convert the Adaptec and Winbond drivers to miibus.
@
text
@d1 1
a1 1
# $FreeBSD$
d5 1
a5 1
KMOD	= sf
d10 1
@


1.3
log
@$Id$ -> $FreeBSD$
@
text
@d7 1
d9 2
d30 3
@


1.2
log
@Convert the VIA Rhine driver to newbus and set it up to be compiled as
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.

While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.1 1999/07/25 04:32:38 wpaul Exp $
@


1.1
log
@This commit adds device driver support for Adaptec Duralink PCI fast
ethernet controllers based on the AIC-6915 "Starfire" controller chip.
There are single port, dual port and quad port cards, plus one 100baseFX
card. All are 64-bit PCI devices, except one single port model.

The Starfire would be a very nice chip were it not for the fact that
receive buffers have to be longword aligned. This requires buffer
copying in order to achieve proper payload alignment on the alpha.
Payload alignment is enforced on both the alpha and x86 platforms.
The Starfire has several different DMA descriptor formats and transfer
mechanisms. This driver uses frame descriptors for transmission which
can address up to 14 packet fragments, and a single fragment descriptor
for receive. It also uses the producer/consumer model and completion
queues for both transmit and receive. The transmit ring has 128
descriptors and the receive ring has 256.

This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus
so that it can be compiled as a loadable kernel module. Support for BPF
and hardware multicast filtering is included.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.1 1999/07/23 05:48:01 wpaul Exp $
d11 1
a11 1
	echo "#define NFXP 1" > sf.h
@
