summaryrefslogtreecommitdiff
path: root/sys/arch/next68k/dev
AgeCommit message (Collapse)Author
2023-06-10gratuitous commit to fix spelling errordbj
2023-02-11NeXT Turbo Color doesn't have NEXT_P_C16_CMD_REG.tsutsui
Info from Andreas Grabher on port-next68k@.
2023-02-11Add and check machine type NeXT_CUBE_TURBO (type 8).tsutsui
Info from Andreas Grabher on port-next68k@.
2023-02-11Handle NeXT Turbo VRAM regions properly.tsutsui
Info from Andreas Grabher on port-next68k@: https://mail-index.netbsd.org/port-next68k/2023/02/06/msg000052.html Also refactor bus_space_map(9) and fix (unused) bus_space_mmap(9).
2023-02-04Remove trailing spaces and TABs.tsutsui
2023-02-03Use proper C99 int types.tsutsui
2023-02-03Make local functions static.tsutsui
2023-02-03Misc cleanup.tsutsui
- use C99 designated initializer - misc KNF - TAB/space cleanup
2023-02-03Misc KNF and cosmetics.tsutsui
2023-02-03Misc KNF and cosmetics.tsutsui
2023-02-03Use proper C99 int types.tsutsui
2023-02-03TAB/space cleanup.tsutsui
2023-02-03Add proper rnd_add_uint32(9) calls to next68k xe(4) driver.tsutsui
2023-01-27next68k: Fix silent stall of next68k esp(4) SCSI.tsutsui
next68k esp(4) driver requires nextdma(4) interrupts at ipl 6 during ncr53c9x_intr() for esp(4) at ipl 3. It worked on netbsd-5 and prior, but on netbsd-5 splbio() was changed from ipl 3 to 6 for SMP support and on netbsd-6 ncr53c9x driver was changed to use mutex(9) instead of simple_lock(9), so nextdma interrupts were no longer raised during ncr53c9x interrupt handler. For now, just call mutex_exit(9) and mutex_enter(9) during waiting nextdma(4) interrupts in MD esp_dma_intr() handler. This could be wrong and the interrupt handler for nextdma should be reorganized, but it just works. Should be pulled up to netbsd-10 and netbsd-9.
2022-09-18Eliminate use of IFF_OACTIVE. (It was not being used correctly here inthorpej
any case.)
2022-03-17revert broken to borken, it is used spelling in BSD and "tastes better that ↵andvar
way".
2022-03-16s/paniced/panicked/ and s/borken/broken/ in comments.andvar
2021-09-11Add missing double p and d for stopped and overriden accordingly.andvar
Fix few more typos along the way, mainly in copy-pasted comments.
2021-08-07Merge thorpej-cfargs2.thorpej
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2020-11-21malloc(9) -> kmem(9)thorpej
2020-01-29Adopt <net/if_stats.h>.thorpej
2019-11-12 Add missing initialization of sc_dev.msaitoh
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2019-05-29Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA inmsaitoh
sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future.
2019-05-29 KNF. No functional change.msaitoh
2019-05-29 Whitespace fix. No functional change.msaitoh
2019-04-25- KNF.msaitoh
- Use __arraycount. - Remove extra 'n' from debug printf.
2019-04-24 KNF. No functional change.msaitoh
2019-02-05 Remove very old IFF_NOTRAILERS flag.msaitoh
2018-06-26 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backwardmsaitoh
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-22 It's not required to include net/bpfdesc.h. Remove it.msaitoh
2017-05-01PR port-next68k/52205 from Miod Vallat: cosmetic change to print themartin
physical address when attaching zs devices. For the real work, zs_get_chan_addr() will still use the virtual address.
2017-03-31 Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) withmsaitoh
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".
2016-12-15Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_inputozaki-r
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-06-10Introduce m_set_rcvif and m_reset_rcvifozaki-r
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-02-09Introduce softint-based if_inputozaki-r
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!
2015-04-13MD rnd.h cleanups. Please let me know if I broke anything!riastradh
2014-08-10Merge tls-earlyentropy branch into HEAD.tls
2014-03-29fix misplaced linechristos
2014-03-27correct/add protection against snprintf overflow.christos
2014-03-25fix sprintf debugging mess.christos
2014-03-24- use cpu_{g,s}etmodelchristos
- fix unused
2012-10-27split device_t/softc for all remaining drivers.chs
replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
2012-02-02Entropy-pool implementation move and cleanup.tls
1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64.
2011-11-19First step of random number subsystem rework described intls
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes the following: An initial cleanup and minor reorganization of the entropy pool code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are fixed. Some effort is made to accumulate entropy more quickly at boot time. A generic interface, "rndsink", is added, for stream generators to request that they be re-keyed with good quality entropy from the pool as soon as it is available. The arc4random()/arc4randbytes() implementation in libkern is adjusted to use the rndsink interface for rekeying, which helps address the problem of low-quality keys at boot time. An implementation of the FIPS 140-2 statistical tests for random number generator quality is provided (libkern/rngtest.c). This is based on Greg Rose's implementation from Qualcomm. A new random stream generator, nist_ctr_drbg, is provided. It is based on an implementation of the NIST SP800-90 CTR_DRBG by Henric Jungheim. This generator users AES in a modified counter mode to generate a backtracking-resistant random stream. An abstraction layer, "cprng", is provided for in-kernel consumers of randomness. The arc4random/arc4randbytes API is deprecated for in-kernel use. It is replaced by "cprng_strong". The current cprng_fast implementation wraps the existing arc4random implementation. The current cprng_strong implementation wraps the new CTR_DRBG implementation. Both interfaces are rekeyed from the entropy pool automatically at intervals justifiable from best current cryptographic practice. In some quick tests, cprng_fast() is about the same speed as the old arc4randbytes(), and cprng_strong() is about 20% faster than rnd_extract_data(). Performance is expected to improve. The AES code in src/crypto/rijndael is no longer an optional kernel component, as it is required by cprng_strong, which is not an optional kernel component. The entropy pool output is subjected to the rngtest tests at startup time; if it fails, the system will reboot. There is approximately a 3/10000 chance of a false positive from these tests. Entropy pool _input_ from hardware random numbers is subjected to the rngtest tests at attach time, as well as the FIPS continuous-output test, to detect bad or stuck hardware RNGs; if any are detected, they are detached, but the system continues to run. A problem with rndctl(8) is fixed -- datastructures with pointers in arrays are no longer passed to userspace (this was not a security problem, but rather a major issue for compat32). A new kernel will require a new rndctl. The sysctl kern.arandom() and kern.urandom() nodes are hooked up to the new generators, but the /dev/*random pseudodevices are not, yet. Manual pages for the new kernel interfaces are forthcoming.
2011-06-06CFATTACH_DECL(..., sizeof(struct device), -> CFATTACH_DECL_NEW(..., 0matt
struct device * -> device_t struct cfdata * -> cfdata_t use bool when appropriate
2011-01-02Explicitly include <machine/bus.h> here for bus_space_tag_t and bus_dma_tag_t.tsutsui
2010-06-06fix some errors in debug code, found by henning petersen in PR#42529.mrg
2010-04-24switch from 4 clause to 2 clause BSD license.dbj