summaryrefslogtreecommitdiff
path: root/sys/dev/ic/com.c
AgeCommit message (Collapse)Author
2009-11-09Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tNicholas Marriott
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-11-01Call selwakeup()/KNOTE() even if the queue has emptied completely.Nicholas Marriott
ok miod
2009-10-31Use suser when possible. Suggested by miod@.Federico G. Schwindt
miod@ deraadt@ ok.
2009-10-31Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()Theo de Raadt
calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
2009-10-13Get rid of devact enum, substitute it with an int and coresponding defines.Paul Irofti
This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
2009-01-11Actual final round of timeout_add(to, n * hz) -> timeout_add_sec(to, n)Bret Lambert
conversions. ok kettenis@ ok krw@ (possibly for the second time :)
2008-11-23pccom can finally die; ok kettenis dlg drahn, tested by okanTheo de Raadt
2008-10-15Second pass of simple timeout_add -> timeout_add_sec conversionsBret Lambert
This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
2008-06-08Make serial console on non-primary ports work to on i386.Mark Kettenis
tested by jbg@, "it is right" deraadt@
2008-04-25the code that parses arguments from the boot loader on amd64 wasnt checkingDavid Gwynne
what type of console was specified, so when a glass console was used it was still configuring serial bits. this makes it so serial config only occurs for serial console devices. found by jolan@, thib@, and maybe sthen@ sorry guys
2008-04-24MD_ISA_IOT is not defined anywhere so get rid of it.Joel Sing
Spotted by drahn@, ok dlg@
2008-04-24Keep order of "#if defined..." consistent.Joel Sing
ok dlg@
2008-04-24Clean up comments.Joel Sing
2008-04-24Cleanup serial console handling and remove some of the MD code from com.c.Joel Sing
Specify the serial configuration from within the MD code, rather than passing things via macros. This will allow other platforms to more readily change the serial console configuration. Committing this so it actually gets tested. ok dlg@
2008-04-09Increase buffer size sent to the fifo, and clamp the size correctly.Theo de Raadt
Scrub the buffer afterwards, too
2008-01-23Cleanup cn_pri. Change constants to more meaningful names, rather thanJoel Sing
the hp300 related ones currently in use. CN_NORMAL becomes CN_LOWPRI, CN_INTERNAL becomes CN_MIDPRI and CN_REMOTE becomes CN_HIGHPRI. ok miod@
2008-01-12Make comconsrate initialized to TTYDEF_SPEED at compile-time, for portsMiod Vallat
which need to setup the chip before comcnattach() is invoked.
2008-01-08the rsc-console on the v880 operates at 115200, not the 9600 we think weDavid Gwynne
have to force all console devices to. this change passes the right speed to the com code, and continues to use it when the device is opened as the console device. figured out by kettenis@ ok kettenis@ miod@
2007-08-22fix compilation with KDGBJasper Lievisse Adriaanse
from Nicholas Marriott ok deraadt@
2007-07-15Delay switching to the real serial console until we attach the serial device.Mark Kettenis
The variety of different serial devices is just too big to make a decision up front. This should make the second serial port on four-digit B/C/J-class workstation work as a serial console too. ok miod@
2007-06-22ansify/de-registerJasper Lievisse Adriaanse
no binary change
2007-05-08backout while the amd64 puc situation is rethoughtTheo de Raadt
2007-05-08move com_activate() to where it belongsTheo de Raadt
2007-05-08put more foo_detach() routines where they are usedTheo de Raadt
2006-06-23In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesMiod Vallat
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
2006-04-272 lines of code in most drivers, to do the timestamping; ok miod kettenisTheo de Raadt
2006-03-27in detach, mark device with COM_SW_DEAD, so that close() will not goTheo de Raadt
tapping additional registes. allows it to work on macppc, where doing such a tap after unplug is very bad. drahn helped fkr@bytemine.de ok miod and drahn
2006-01-01Let cons_init() and cons_init_bell() initialize the whole consdev structure,Miod Vallat
thus removing the need for drivers to initialize cn_pri to CN_DEAD when hardware probe fails.
2005-11-21Move contents of sys/select.h to sys/selinfo.h in preparation for aTodd C. Miller
userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
2005-11-11fix kgdb compilation; input and ok miod@.Federico G. Schwindt
2005-09-26Share com probe code between com and pccom; allows us to get rid of awkwardMiod Vallat
code duplication in cardbus, pcmcia and puc attachments. Joint effort with fgs@; blessed deraadt@
2005-07-18fix sparc64 console; same diff as miodTheo de Raadt
2005-07-18COM_CONSOLE & DDB fixTheo de Raadt
2005-07-17Allow the console support code not to be compiled in; this will beMiod Vallat
necessary for and only used on sparc, shortly. Reluctantely ok deraadt@
2005-07-11Enable IR receive mode only for infrared capable PXA2x0 UARTs. NormalUwe Stuehler
reception is blocked while the IR receiver or transmitter is enabled. Also enable the PXA2x0 UART before clearing the FIFO (suggested by drahn@ some time ago), and disable the UART in compwroff(). ok deraadt@
2005-07-02xscale UART FIFOs are 32 bytes deep; found by deraadt@Uwe Stuehler
2005-05-27- Merge changes from pxacom back into the common com driver.Uwe Stuehler
Changes to the common com driver (partly from NetBSD): - Multiply before divide in comspeed() to avoid overflow (from NetBSD). - Don't call getc() and send -1 if the output queue is empty. - Take UART clock frequency as a parameter instead of using COM_FREQ. ok deraadt@
2004-10-20Use bus_addr_t instead of int for port address/offset, ok mickeyPer Fogelstrom
2004-08-09remove old arc stuff and add sgi support.Per Fogelstrom
ok mickey@
2004-05-30serial console hack from tom. who, after having been told a few timesTheo de Raadt
to commit it, has not. what is going on guys?
2004-05-03Remove OpenBSD/pegaos, this has been announced before but delayed untilDale Rahn
the tree was stable. No point in code supporting a company which screws its employees being in the OpenBSD tree.
2003-10-31Use isa iot for pegasos com console attachment, perhaps this couldDale Rahn
be adopted MI?
2003-10-03Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need forMiod Vallat
separate tty registering is gone now that sparc has switched to wscons, and this makes the code less error-prone. Also, remove tests for ttymalloc() failure, since it uses M_WAITOK. ok millert@ deraadt@, tested by various people as well besides me...
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-07-15move prototype for com_raisedtr() to comvar.h (just like pccom).Jason Wright
2003-06-03terms 3 & 4 cleanup based on "terms" fileTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-12-19comparam() does not need an spltty() for it, already called there.Michael Shalayeff
time-bound loops in com_common_cnputc() and lower to spltty(), which i guess is left from times when timeouts were processed at splhigh(). jason@ tested and ok, art@ ok