Commit Graph

368 Commits

Author SHA1 Message Date
riastradh 9fc453562f Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@
2020-09-05 16:30:10 +00:00
riastradh 2499f515fc Make this build with or without options IPSEC.
Not really that useful without options IPSEC, but simply uncommenting
mvxpsec in conf/ARMADAXP didn't build, and this change is trivial, so
why not.
2020-07-25 22:37:48 +00:00
riastradh b594f6630a Omit needless rijndael dependencies. 2020-07-25 22:37:16 +00:00
thorpej ca8ce3aeb1 Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
  Provide a new resource provider API:

  ==> pciconf_resource_init() -- Initialize a PCI configuration resources
      container.
  ==> pciconf_resource_add() -- Add a PCI configuration resource to the
      container (I/O, MEM, or prefetchable MEM).  Multiple resources of
      each type may be added.
  ==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
      container once the bus has been configured.

  This is much easier to use than the previous method of providing an
  extent map for each kind of resource, and works better for e.g. ACPI
  platforms that provide potentially multiple PCI resources in tables
  provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
  rather than extent maps.
2020-07-07 03:38:45 +00:00
riastradh 9da090b0a4 mvcesa(4): Don't use prev msg's last block as IV for next msg in CBC.
This violates the security contract of the CBC construction, which
requires that the IV be unpredictable in advance; an adaptive adversary
can exploit this to verify plaintext guesses.

XXX Compile-tested only.
2020-06-14 23:29:23 +00:00
chs 69a3e9b705 replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
2020-06-14 01:40:02 +00:00
rin b203ba4088 Make crypto/rijindael optional again as cprng_strong does no longer
depend on it. Dependency is explicitly declared in files.foo if a
component requires it.
2020-04-22 09:15:39 +00:00
skrll 58613969ea Adopt <net/if_stats.h> 2020-02-05 08:33:19 +00:00
skrll 11704b9814 Adopt <net/if_stats.h> 2020-02-04 07:35:21 +00:00
skrll ed7083cb05 Adopt <net/if_stats.h> 2020-02-03 07:47:53 +00:00
thorpej 92b1a40bcb Clean up gttwsi's register access stuff:
- Garbage-collect the obsolete GTTWSI_ALLWINNER option; it hasn't been
  needed since FDT'ization of the Allwinner support code.
- Redefine thw "TWSI_*" register definitions to clearly call out:
  -> The Marvell flavor of the offsets
  -> The Allwinner flavor of the offsets
  ...and make the regular definitions indices into a register map.
- Pass the appropriate register map from the front-end to the core.
- Remove the customer register read/write callbacks -- they are no longer
  needed now that each front-end passes an appropriate register map to
  the core.
2020-01-12 17:48:42 +00:00
gutteridge 080f089b4f Fix typos in messages. 2019-12-28 03:07:18 +00:00
msaitoh a0403cde04 s/transfered/transferred/ 2019-12-27 09:41:48 +00:00
msaitoh b932d49383 s/expresion/expression/ in comment. 2019-12-27 09:32:09 +00:00
msaitoh 88af233251 s/opration/operation/ 2019-12-27 07:41:22 +00:00
msaitoh 40064e2457 s/lenght/length/ 2019-12-26 04:53:11 +00:00
chs d47bcd296c in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
2019-11-10 21:16:21 +00:00
chs 0a827a3f50 convert more KM_NOSLEEP to KM_SLEEP and remove code to handle failures. 2019-10-15 00:13:52 +00:00
chs 17b5168399 make this compile again:
- remove unused config attributes
 - rename a local variable to avoid a name conflict
2019-10-01 17:35:09 +00:00
msaitoh 70b25bc928 if_flags is neither int nor short. It's unsigned short. 2019-09-13 07:55:05 +00:00
tnn 9555f4172b ensure spibus_attach_args is zero'ed 2019-08-13 17:03:10 +00:00
msaitoh 8375928380 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*. 2019-05-28 07:41:46 +00:00
msaitoh fad27932dd Whilespace fix. No functional change. 2019-05-24 06:26:38 +00:00
msaitoh 5542e458a9 Whitespace fix (mainly tabify). 2019-05-23 13:10:50 +00:00
msaitoh 811add33d1 No functional change:
- Simplify MII structure initialization and reference.
 - u_int*_t -> uint*_t.
 - KNF
2019-05-23 10:51:38 +00:00
msaitoh 932c4f3e96 -No functional change:
- Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
  - Simplify MII structure initialization.
  - u_int*_t -> uint*_t.
  - KNF
2019-05-23 10:40:39 +00:00
msaitoh d458c9876d This driver uses MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). This driver might require some additional fixes
for SIOCSIFMTU and other ioctl()s.
2019-04-24 10:56:24 +00:00
msaitoh 242bcfcd2e These drivers do ether_ioctl() on SIOC{ADD,DEL}MULTI, SIOC{G,S}IFMEDIA and
default case in the switch statement. Only the default case didn't check the
return value with ENETRESET. Integrate them to one ether_ioctl() with
ENETRESET test. This change might improve some other ioctl()s which return
ENETRESET by calling if_init().
2019-04-22 08:36:03 +00:00
msaitoh 7de944bcbf On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
2019-04-22 08:05:00 +00:00
msaitoh ad2fa80c12 s/pakcet/packet/ in comment. 2019-03-18 11:38:03 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
msaitoh a5cdd4b441 Change MII PHY read/write API from:
int (*mii_readreg_t)(device_t, int, int);
	void (*mii_writereg_t)(device_t, int, int, int);
to:

	int (*mii_readreg_t)(device_t, int, int, uint16_t *);
	int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

 In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

 Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

	arm/at91/at91emac.c
	arm/ep93xx/epe.c
	arm/omap/omapl1x_emac.c
	mips/ralink/ralink_eth.c
	arch/powerpc/booke/dev/pq3etsec.c(read)
	dev/cadence/if_cemac.c <- hkenken
	dev/ic/lan9118.c


Tested with the following device:

	axe+ukphy
	axe+rgephy
	axen+rgephy	(tested by Andrius V)
	wm+atphy
	wm+ukphy
	wm+igphy
	wm+ihphy
	wm+makphy
	sk+makphy
	sk+brgphy
	sk+gentbi
	msk+makphy
	sip+icsphy
	sip+ukphy
	re+rgephy
	bge+brgphy
	bnx+brgphy
	gsip+gphyter
	rtk+rlphy
	fxp+inphy	(tested by Andrius V)
	tlp+acphy
	ex+exphy
	epic+qsphy
	vge+ciphy	(tested by Andrius V)
	vr+ukphy	(tested by Andrius V)
	vte+ukphy	(tested by Andrius V)

Not tested (MAC):
	arm:at91emac
	arm:cemac
	arm:epe
	arm:geminigmac
	arm:enet
	arm:cpsw
	arm:emac(omac)
	arm:emac(sunxi)
	arm:npe
	evbppc:temac
	macppc:bm
	macppc:gm
	mips:aumac
	mips:ae
	mips:cnmac
	mips:reth
	mips:sbmac
	playstation2:smap
	powerpc:tsec
	powerpc:emac(ibm4xx)
	sgimips:mec
	sparc:be
	sf
	ne(ax88190, dl10019)
	awge
	ep
	gem
	hme
	smsh
	mtd
	sm
	age
	alc
	ale
	bce
	cas
	et
	jme
	lii
	nfe
	pcn
	ste
	stge
	tl
	xi
	aue
	mue
	smsc
	udav
	url

Not tested (PHY):
	amhphy
	bmtphy
	dmphy
	etphy
	glxtphy
	ikphy
	iophy
	lxtphy
	nsphyter
	pnaphy
	rdcphy
	sqphy
	tlphy
	tqphy
	urlphy
2019-01-22 03:42:24 +00:00
martin 0173341c0a Remove stray ; to fix the build 2018-12-11 19:40:54 +00:00
thorpej f5ab653ca0 Add a convenience function, com_init_regs_stride(), that shifts the register
offsets and size by the specified amount.  Use in front-ends as appropriate.
2018-12-11 06:34:00 +00:00
thorpej 7266b92d32 Remove the COM_REGMAP option -- just use it all the time. While here,
garbage-collect the COM_FUNCMAP and COM_AU1X00 options, as there are
not used anywhere.
2018-12-08 21:14:36 +00:00
thorpej 6d4870476f Clean up initialization of com_regs structure, in preparation for
some additional changers.
2018-12-08 17:46:09 +00:00
jmcneill cce19cc266 Add intr_establish_xname support to arm and expose it to intrctl 2018-11-16 15:06:21 +00:00
riastradh d1579b2d70 Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)
2018-09-03 16:29:22 +00:00
msaitoh 3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
maxv ecc6d10cdd Rename
M_CSUM_DATA_IPv6_HL -> M_CSUM_DATA_IPv6_IPHL
	M_CSUM_DATA_IPv6_HL_SET -> M_CSUM_DATA_IPv6_SET

Reduces the diff against IPv4. Also, clarify the definitions.
2018-06-01 08:56:00 +00:00
maxv d9e33aef12 Fix double-free, m_tag_delete_chain is already called by m_free. 2018-05-07 09:41:10 +00:00
christos 87fd18f8e5 s/static inline/static __inline/g for consistency. 2018-04-19 21:50:06 +00:00
jakllsch 8021ad2ed9 Stop potential misuse of vendor names and USB vendor IDs in root hub
device and string descriptors.

Firstly: Few vendors have identical PCI-SIG vendor IDs and USB-IF vendor
IDs.  As such, using the PCI vendor ID as a USB vendor ID may trample
on whomever is allocated that USB vendor ID.

Secondly: The vendor of the host controller hardware implementation has
little to nothing to do with our usbroothub implementation.  Thus we
should not potentially associate any problems therewith to such third
party.

This change will result in root hubs being identified by USB Vendor ID
0x0000.  Root hub vendor string will now be "NetBSD" (or, specifically:
ostype). Product ID (0x0000) and product strings remain unchanged.
2018-04-09 16:21:09 +00:00
christos 127c64cbda use PR_NOWAIT instead of 0 2017-11-09 22:22:58 +00:00
chs fd34ea77eb remove checks for failure after memory allocation calls that cannot fail:
kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
2017-06-01 02:45:05 +00:00
msaitoh eabd5e1de9 Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".
2017-03-31 08:38:13 +00:00
jakllsch c634706878 Add check during mvsdio_attach that CMD line is in idle state.
If the CMD line is not in idle state, the interrupt handler routine will
misbehave causing an endless interrupt handler loop.  This would prevent
the the kernel from getting to mountroot.

On my Pogoplug POGO-V4-A3-01, this was caused by U-Boot routing com1's TX
and RX signals to the SD card slot's CMD and DAT[0] lines respectively.

We should probably grow Marvell SoC MPP (pinmux) configuration frobs.
2017-03-03 16:52:08 +00:00
kiyohara 258d35a1f0 Add ATTR_AXI_DDR. 2017-01-09 14:06:35 +00:00
kiyohara 463bc92121 Support Marvell Dove. Use irq array. Dove's irqs not sequencial.
And remove debug printf().
2017-01-07 14:44:26 +00:00
kiyohara 8f245e3b7f Remove unused function. 2017-01-07 14:36:51 +00:00
kiyohara f342ff86d4 Fix macro MVXORE_CHAN2BASE(). The XORE has 2 channels per port. 2017-01-07 14:32:32 +00:00
kiyohara e51c7e73b4 Add tags for AXI_CS[01]. 2017-01-07 14:26:37 +00:00
kiyohara ba749f27a4 Support Marvell Dove. 2017-01-07 14:24:27 +00:00
kiyohara 89ea2da7c5 Change MVSPI_SIZE to 0x80 instead of 0x50. 2017-01-07 14:19:45 +00:00
ozaki-r dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
ozaki-r c0e7885f20 Apply deferred if_start framework
if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
2016-12-08 01:12:00 +00:00
skrll d3e93ac2c2 Fix regisers typo 2016-10-20 09:53:07 +00:00
kiyohara 4964aa11de The bus_dmamap_sync(PREREAD) is unnecessary for sent mbuf.
Moreover bus_dmamap_sync(POSTWRITE), before unload.
2016-10-10 14:23:35 +00:00
christos 9015c01fa3 PR/51540: Henning Petersen: replace , with ; 2016-10-09 14:49:51 +00:00
kiyohara fa071fd5eb Add 88AP510. 2016-10-04 15:02:27 +00:00
ozaki-r d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
skrll 4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
jklos 7f15b0acd9 Add kernel configuration file for PogoPlug Pink, PogoPlug Mobile and
PogoPlug v4. Add conditional because PogoPlug v4 can't run SD interface at
50 MHz.
2016-03-12 00:41:30 +00:00
hikaru 03068386e3 Pass all unicast addresses if it is promisc mode. 2016-02-13 08:44:22 +00:00
hikaru e5a183c233 Make all packets are enqueued into queue 0.
queue 7 is not default, it is caused by the filter tables.
The fields are including queue number, not bitfields.
So MVXPE_DF_QUEUE_ALL (b111) means queue 7.

And also, pass all unicast addresses if it is promisc mode.
MVXPE_PXC_UPM is working in almost cases,
but this change is needed for some cases; bridging frames through inter units,
using products have consecutive MAC addresses.
2016-02-13 08:05:06 +00:00
hikaru cbb771782b Fix typo in sysctls. 2016-02-13 06:44:22 +00:00
hikaru 65e1200c74 Count up if_{opackets,oerrors,ierrors,collisions}.
And also "MAC Transmit Error" is tx error, not rx.
2016-02-13 06:33:21 +00:00
hikaru e48ad7e887 Style. 2016-02-13 06:12:46 +00:00
hikaru ea31d1a6f5 Preserve rx csum bad flags. 2016-02-13 06:02:31 +00:00
hikaru 3cb6f1bced Fix mitake, disable SERDES error interrupts again. 2016-02-13 05:47:38 +00:00
hikaru e26a9e7c97 Don't use RXTX intr that is excess and requires another IRQ handler,
and disable SERDES error interrupts.
2016-02-13 05:44:01 +00:00
hikaru d841c5696c Correct bus_dmamap_sync operaion. 2016-02-13 05:21:11 +00:00
hikaru 141ef376c5 Correct locks and missing breaks. 2016-02-13 03:33:02 +00:00
hikaru 16e5bed744 Fix the bitmask of MVXPE_PMACC0_FRAMESIZELIMIT. It did no harm. 2016-02-12 09:24:15 +00:00
kiyohara 5e7343a705 Add more #warning message 'Please use mvxpe instead of this'. 2016-02-09 12:53:17 +00:00
ozaki-r 9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
joerg 33ff1f692a Switch to generic __BIT/__BITS macro, which doesn't depend on
left-shifting negative values.
2016-01-15 12:09:15 +00:00
christos 5d545ea021 PR/50533: David Binderman: Fix incorrect logic 2015-12-13 18:35:26 +00:00
nonaka c7bca87e42 Use device name instead of fixed string "mvpex" for evcnt group. 2015-11-27 00:08:43 +00:00
msaitoh 605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
kiyohara a2bdc95972 Fix calculate to address for window register.
Thanks knakahara@.
2015-08-08 14:35:06 +00:00
knakahara 158635859e fix: panic at doing "vmstat -ev" after a PCIe device detached. 2015-07-28 01:57:55 +00:00
kamil f874bd0561 Improve spelling: regsiter -> register
This change is non-functional.

Approved by <riastradh>, <pgoyette>
2015-07-11 10:32:45 +00:00
knakahara 1770f95f58 fix: pexih->ih_evcnt->ev_name pointed stack address wrongly. 2015-06-24 10:00:37 +00:00
hsuenaga 1a8031e111 add new cryptographic accelerator driver 'mvxpsec.'
this driver controls CESA unit as same as mvcesa, but uses DMA engines and
does CBC operations, HMAC operations by hardware. about 2 kbytes of data
are processed at one. supported algorithms are:

 - DES-CBC, 3DES-CBC, AES-CBC
 - HMAC-SHA1, HMAC-MD5

non-CBC algorithm such as AES-GCM is not supported by CESA's acceleration
engine. mvcesa is still useful to implement such algorithms as combination of
accelerated block cipher and software chaining.
2015-06-03 04:20:02 +00:00
hsuenaga 149ad0c83b reduce magic numbers. SDRAM address space attribute register has cache coherency
control bits. this bit is important for AURORA_IO_CACHE_COHERENCY.
2015-06-03 04:00:06 +00:00
hsuenaga ea5bc4c33e separate buffer management codes 'mvxpbm.c' from if_mvxpe.c.
the buffer management(ex. fill the rx descriptors/buffers) is done by H/W in
ARMADA XP/380, and is done by S/W in ARMADA 370. the H/W BM support is not yet
implemented, so all devices use the S/W management mode at this time.
2015-06-03 03:55:47 +00:00
hsuenaga 9400e05df8 move Marvell ARMADA SoC's device driver definitions from arm/marvell
to dev/marvell.
2015-06-03 03:34:38 +00:00
hsuenaga 4e3bd6105a add new ethernet driver mvxpe for recent MARVELL's SoC after ARMADA/XP.
this driver supports 'counter mode', and is disabled by default.

ARMADA SoC family has new ethernet controller acceleration mode called
'enhanced mode' or 'counter mode.' it seems that backward compatibility mode
used by if_mvgbe is still working, but the specification of the old mode
is completely disappeared from SoC's reference manual.

I tested the driver using MIRABOX(ARMADA/370).
2015-05-03 14:38:09 +00:00
hsuenaga c3635de7de add u-boot argument parser for Marvell ARMADA XP/370.
use 'ethaddr' and 'eth1addr' in u-boot argument to setup MAC address of mvgbe.
2015-04-15 10:15:40 +00:00
riastradh 56d3242969 Include <sys/rndsource.h> where it is actually used.
I had removed <sys/rnd.h> from files that didn't mention anything of
the rnd(9) API.  But they included other files which assumed
<sys/rnd.h> had already been included.
2015-04-14 20:32:35 +00:00
riastradh 233f556c2e Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
joerg d40a88a875 sizeof doesn't evaluate the expression, so increment of rxd doesn't
happen. Move it out.
2015-01-11 22:59:57 +00:00
christos 6ca6d5d665 centralize the dialout/call unit macros. 2014-11-15 19:18:18 +00:00
christos a568d0213e this is not python (add braces) 2014-09-21 17:00:35 +00:00
tls ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
dholland f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
christos 5bdbb846e0 provide a buffer for pci_intr_string() 2014-03-30 23:25:20 +00:00
htodd 85550bc7a9 Fix typo. 2014-03-30 22:39:29 +00:00
christos 070dd9a4c8 catch up with pci_intr_string changes 2014-03-30 01:17:51 +00:00