Commit Graph

255 Commits

Author SHA1 Message Date
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
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
kiyohara
c51a6569f3 Support Armada 370 and DDR3 tags. 2014-03-15 13:33:48 +00:00
kiyohara
5e965d38d2 Add tags to marvell_attach_args. 2014-03-15 11:47:43 +00:00
kiyohara
1fc9bc43dd Add some Armada 370 IDs.
And fix comment-out-ed ID for Discovery VI.  (from Marvell USP)
2014-03-15 10:40:39 +00:00
pooka
4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
kiyohara
a676b54c95 Add MARVELL_TAG_DDR3_CS[0-3] for latest SoC. 2014-02-17 04:52:44 +00:00
msaitoh
3443d04260 Carefully set IFF_OACTIVE in mvgbe_start(). Even if mvgbe_encap()
returns other than 0, the TX ring might not full. Check whether
the TX ring has one or more packets. If the ring is empty,
dont' set IFF_OACTIVE because an TX complete interrupt never
occur and IFF_OACTIVE flags is left. The interface's timer
isn't reset, so a device timeout desn't occur.

 Fixes a bug that IFF_OACTIVE flag is left on heavy load.
Part of PR#48568.
2014-02-03 05:56:23 +00:00
kiyohara
9745ea1238 Support Basic Mode for Armada XP. 2013-12-23 02:23:25 +00:00
mrg
387c0717d0 move some variables inside their #ifdef use. 2013-11-06 06:20:12 +00:00
kiyohara
b1b7c6a2ff Revirt 'Move the Marvell extension to com_mv.c' at Sun Sep 1 04:51:24 UTC 2013.
build test only.
2013-10-03 13:23:03 +00:00
kiyohara
19eccf3fb5 Change address/size of CESA Registers. 2013-09-28 05:46:51 +00:00
kiyohara
b1438b0a3a Add ARMADAXP IDs. 2013-09-28 05:39:06 +00:00
kiyohara
5c651e5b37 Add ARMADAXP MV78{13,16,23,26}0. 2013-09-28 05:37:31 +00:00