summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-112-10/+10
|
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-102-4/+4
| | | | ok dlg@ tobhe@
* Fix previous commit.visa2020-06-061-2/+2
|
* change wsdisplay attribute type from long to uint32_tjsg2020-05-252-21/+21
| | | | | | | | miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
* rename wsdisplay alloc_attr() to pack_attr()jsg2020-05-252-7/+7
| | | | | | | | Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
* Use <dev/clock_subr.h> in dsrtc(4).visa2020-05-211-65/+82
| | | | | | Tested on IP30 with DS1687. Looks good to miod@
* sgi: iockbc(4), mkbc(4): tsleep(9) -> tsleep_nsec(9); ok kn@ visa@cheloha2019-10-172-4/+4
|
* Remove an unused variable. Spotted by clang.visa2019-01-151-5/+1
| | | | OK miod@
* Clean up the mec(4) MII read/write routines a bit.visa2018-12-102-32/+15
| | | | | | | The PHY register offsets are adjusted because the registers are accessed using 64-bit loads and stores. From miod@
* Fix phy discovery on O2 systems.visa2018-12-101-5/+40
| | | | | | | | | | | | | | | | | After a cold boot, the mii bus appears to take some time to initialize; the phy does not answer to address 8 but to a larger address (10 or 11), then, after being reset, to its correct address of 8. So the kernel would discover the phy at a wrong address, attach it, and after it gets reset, reading from the phy at the wrong address would return either all bits clear or all bits set, confusing the link speed logic without any way to recover. Work around the issue by resetting all phys found when the interface is reset for the first time. Thus, by the time mii_attach() runs and walks the bus again, the phy will answer at the right address. From miod@
* Remove the unused interrupt type (edge/level) from the mace interruptvisa2018-12-034-8/+8
| | | | | | | | handler registration. The code is inherited from isa(4), but on the O2, although some interrupt sources on CRIME are edge-triggered, all the MACE interrupts are level-triggered. From miod@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* Fix memory leak in iec_get(). If MCLGET fails free the mbuf as well.claudio2017-07-191-1/+2
| | | | | Found by Ilja Van Sprundel OK bluhm@ deraadt@
* Always leave one free slot in the Tx ring to avoid ambiguity with ringvisa2017-02-111-3/+3
| | | | | head and tail in the interrupt handler. This fixes an old bug that causes a Tx stall when Tx ring gets full.
* Simplify ifq_deq_{begin,rollback,commit} sequence to ifq_dequeue.visa2017-02-111-9/+3
|
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-222-4/+2
| | | | | | | this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
* m_free() and m_freem() test for NULL. Simplify callers which had their ownjsg2016-11-291-3/+2
| | | | | | NULL tests. ok mpi@
* Remove unused getdev() audio driver functions.ratchov2016-09-191-16/+1
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-38/+2
| | | | | methods from all audio drivers and from the audio_if structure as they are never called.
* G/C IFQ_SET_READY().mpi2016-04-132-4/+2
|
* Remove now uneeded bus_space_unmap calls in the DS1742W/Origin path thatjsg2016-01-211-4/+1
| | | | | | | have had uninitialised bus space handle arguments since the mapping became conditional in rev 1.9 confirmed with miod
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-252-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
* You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.mpi2015-11-242-4/+2
|
* The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.mpi2015-11-242-4/+2
|
* shuffle struct ifqueue so in flight mbufs are protected by a mutex.dlg2015-11-202-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the code is refactored so the IFQ macros call newly implemented ifq functions. the ifq code is split so each discipline (priq and hfsc in our case) is an opaque set of operations that the common ifq code can call. the common code does the locking, accounting (ifq_len manipulation), and freeing of the mbuf if the disciplines enqueue function rejects it. theyre kind of like bufqs in the block layer with their fifo and nscan disciplines. the new api also supports atomic switching of disciplines at runtime. the hfsc setup in pf_ioctl.c has been tweaked to build a complete hfsc_if structure which it attaches to the send queue in a single operation, rather than attaching to the interface up front and building up a list of queues. the send queue is now mutexed, which raises the expectation that packets can be enqueued or purged on one cpu while another cpu is dequeueing them in a driver for transmission. a lot of drivers use IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before committing to it with a later IFQ_DEQUEUE operation. if the mbuf gets freed in between the POLL and DEQUEUE operations, fireworks will ensue. to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback, and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq mutex and get a reference to the mbuf they wish to try and tx. if there's space, they can ifq_deq_commit it to remove the mbuf and release the mutex. if there's no space, ifq_deq_rollback simply releases the mutex. this api was developed to make updating the drivers using IFQ_POLL easy, instead of having to do significant semantic changes to avoid POLL that we cannot test on all the hardware. the common code has been tested pretty hard, and all the driver modifications are straightforward except for de(4). if that breaks it can be dealt with later. ok mpi@ jmatthew@
* arp_ifinit() is no longer needed.mpi2015-10-252-8/+2
|
* Fix an uninitialized variable found by Maxime Villard's Brainy.visa2015-09-181-5/+5
| | | | | | | While here, fix the size parameter of bus_dmamem_unmap() in iec_alloc_physical(). ok miod@
* sizes for free(); ok semariederaadt2015-09-082-5/+5
|
* Increment if_ipackets in if_input().mpi2015-06-242-6/+2
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Remove all audio format conversion code from the kernel (btw holdingratchov2015-05-111-213/+16
| | | | | | | | | the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi ok armani@
* Convert to if_input(), tested by jasper@.mpi2015-03-111-13/+5
|
* Convert to if_input(), tested by jasper@, thanks!mpi2015-03-111-13/+5
|
* no md code wants lockmgr locks, so no md code needs to include sys/lock.hdlg2015-02-112-4/+2
| | | | with and ok miod@
* unifdef INETtedu2014-12-222-6/+2
|
* yet more mallocarray() changes.doug2014-12-131-5/+4
| | | | ok tedu@ deraadt@
* <netinet/in_systm.h> is no longer needed.mpi2014-07-222-14/+4
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-5/+5
| | | | after discussions with beck deraadt kettenis.
* It's init as a process that's special, not init's original thread.guenther2014-07-111-2/+2
| | | | | | Remember initprocess instead of initproc. ok matthew@ blambert@
* Format string fixes and removal of -Wno-format for sgi. Based upon anmiod2014-05-192-7/+7
| | | | initial diff from jasper@
* Force clock clamping after one byte received instead of three. There are stillmiod2013-12-291-7/+7
| | | | | circumstances where the pckbc code gets confused otherwise, on *some* controllers.
* Instead of deciding which iockbc port is the keyboard port, and which one is themiod2013-12-251-43/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | mouse port, depending upon the system time, match what the prom is doing and actually probe for a keyboard on both ports, and decide the first port with a keyboard is the keyboard port. If no keyboard is found, but a mouse is found, decide the keyboard port is the empty one. If no device is found, then we can try and pick the defaults, depending upon the system we are running on, as this used to be the case (i.e. coping with Fuel having keyboard on port 1 and mouse on port 0 when connecting devices according to the chassis' markings). This is necessary because different IO9 board revisions on Tezro come with different wirings, and we can not tell these boards apart. Discussed with "nullnilaki" (nullnilaki on gmail) who is the lucky owner of an Onyx 350 with correct wiring and a Tezro with inverted wiring. Tested on Octane and Fuel with all combinations of devices connected (mouse only, keyboard only, keyboard and mouse) in both ports, glass and serial console. XXX We probably want to allow for more pckbd attachment flexibility on non-x86 XXX platforms eventually (at least where the PS/2 slots are really independent, XXX so that we can attach pckbd to any port and better cope with human error XXX when connecting devices.
* Add load_font and list_font accessops to all rasops-based wsdisplay drivers.miod2013-10-212-7/+42
| | | | | Trivial except for tga(4) and gpx(4/vax) which need a bit more care setting up a new font.
* Use C99 named initializers for struct wsdisplay_accessops fields.miod2013-10-202-22/+13
| | | | No functional change.
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-172-4/+2
| | | | | don't have to. Remove these include lines from sgi drivers. test jsing@
* enable 24-bit, lsb-aligned encoding, which is the device'sratchov2013-06-211-5/+12
| | | | | native one. Allows encoding conversions to be handled in userland
* Replace all ovbcopy with memmove; swap the src and dst arguments tooderaadt2013-06-111-5/+5
| | | | ok otto
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-6/+19
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Correctly specify the visible part of the rightmost tile when the currentmiod2013-05-271-3/+3
| | | | | | | | | resolution is not a multiple of the tile size, in emulation (text) mode. The usual 1280x1024 resolution ended up with the correct value, by chance, but a width of 1600 would be wrong. (X11 was running fine) Tested on the 1600x1024 resolution of the 1600SW display. Thanks to Johan Sanchez for lending me a 1600SW monitor and an adapter board.
* Introduce a global interrupt-aware mutex protecting dataratchov2013-05-151-4/+11
| | | | | | | | | | | | | structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping). ok and help from kettenis, a lot of work from armani
* Don't include <mips64/archtype.h> unless you really need it.miod2012-10-034-10/+4
|