summaryrefslogtreecommitdiffstats
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* Don't include <isa/isavar.h> or compile code depending on it when isabde2002-01-301-0/+5
| | | | | | | | is not configured. Including <isa/isavar.h> when it is not used is harmful as well as bogus, since it includes "isa_if.h" which is not generated when isa is not configured. This was fixed in 1999 but was broken by unconditionalizing PNPBIOS.
* Use the new resource_list_print_type() function.tmm2001-12-212-41/+6
| | | | | Pass the bus device to isa_init() (this is needed for the sparc64 version).
* Introduce a standard name for the lock protecting an interrupt controllerjhb2001-12-201-0/+10
| | | | | | | | and it's associated state variables: icu_lock with the name "icu". This renames the imen_mtx for x86 SMP, but also uses the lock to protect access to the 8259 PIC on x86 UP. This also adds an appropriate lock to the various Alpha chipsets which fixes problems with Alpha SMP machines dropping interrupts with an SMP kernel.
* Add another PS2 PNP id.sheldonh2001-12-191-0/+1
| | | | | PR: 32973 Submitted by: KT Sin <ktsin@acm.org>
* Change the test for _MACHINE_ARCH == i386 into #ifdef __i386__ since itjoerg2001-12-181-2/+8
| | | | | | otherwise breaks on the Alpha arch. I think this is wrong since i'd actually like to probe for a PC architecture, not for a particular CPU type. Anyway, now it's again the way it used to be.
* Remove PC98 code. This file is not used by PC98.nyan2001-12-161-17/+0
|
* Long promised major enhancement set for the floppy disk driver:joerg2001-12-152-282/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . The main device node now supports automatic density selection for commonly used media densities. So you can stuff your 1.44 MB and 720 KB media into your drive and just access /dev/fd0, no questions asked. It's all that easy, isn't it? :) . Device density handling has been completely overhauled. The old way of hardwired kernel density knowledge is no longer there. Instead, the kernel now implements 16 subdevices per drive. The first subdevice uses automatic density selection, while the remaining 15 devices are freely programmable. They can be assigned an arbitrary name of the form /dev/fd[:digit]+.[:digit:]{1,4}, where the second number is meant to either implement device names that are mnemonic for their raw capacity (as it used to be), or they can alternatively be created as "anonymous" devices like fd0.1 through fd0.15, depending on the taste of the administrator. After creating a subdevice, it is initialized to the maximal native density of the respective drive type, so it needs to be customized for other densities by using fdcontrol(8). Pseudo-partition devices (fd0a through fd0h) are still supported as symlinks. . The old hack to use flags 0x1 to always assume drive 0 were there is no longer supported; this is now supposed to be done by wiring the devices down from the loader via device flags. On IA32 architectures, the first two drives are looked up in the CMOS configuration records though. On PCMCIA (i. e., the Y-E Data controller of the Toshiba Libretto), a single drive is always assumed. . Other specialities like disabling the FIFO and not probing the drive at boot-time are selected by per-controller or per-drive flags, too. . Unit attentions (media has been changed) are supposed to be detected now; density autoselection only occurs after a unit attention. (Can be turned off by a per-drive flag, this will cause each Fdopen() to perform the autoselection.) . FM floppies can be handled now (on controllers that actually support it -- not all do these days). . Fdopen() can be told to avoid density selection by setting O_NONBLOCK; this leaves the descriptor in a half-opened state where only a few ioctls are accepted. This is necessary to run fdformat on a device that uses automatic density selection (since you cannot autoselect on an unformatted medium, obviously). . Just differentiate between a plain old NE765 and the enhanced chips, but don't try more; the existing code was wrong and only misdetected the chips anyway. BUGS and TODOs: . All documentation update still needs to be done. . Formatting not-so-standard format yields unpredictable results; i have yet to figure out why this happens. "Standard" formats like 720 and 1440 KB do work, however. . rc scripts are needed to setup device nodes with nonstandard densities (like the old /dev/fdN.MMM we used to have). . Obtaining device flags from the kernel environment doesn't work yet, thus currently only drives that are present in (IA32) CMOS are really detected. Someone who knows the odds and ends about device flags is needed here, i can't figure out what i'm doing wrong. . 2.88 MB still needs to be done.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-11/+11
| | | | also don't use ANSI string concatenation.
* Moved to dev/joyimp2001-12-051-275/+0
|
* Some fix for the recent apm module changes.iwasaki2001-11-011-7/+4
| | | | | | | | | | | | | | - Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@
* Break out the bus front ends into their own files. Rewriteimp2001-10-231-1/+0
| | | | | | | | | | | sio_pccard_detach to use new siodetach. Add an extra arg to sioprobe to tell driver to probe/not probe the device for IRQs. This incorporates most of Bruce's review material. I'm at a good checkpoint, but there will be more to come based on bde's further reviews. Reviewed by: bde
* First commit after a repo copy of isa/sio* -> dev/sio:imp2001-10-222-3526/+0
| | | | | | | | | | Move sio from isa/sio.c to dev/sio/sio.c. The next step is to break out the front end attachments, improve support for these parts on different busses, and maybe, if we're lucky, merging in pc98 support. It will also be MI and live in conf/files rather than files.*. Approved by: bde Tested with: i386, pc98
* - Make the sio_inited handling more properly MP safe.jhb2001-10-201-2/+6
| | | | | - If we are booting with a serial console, then pass the MTX_QUIET flag to mtx_init of the sio lock as otherwise KTR_VERBOSE simply doesn't work.
* Hack for the "out-of-sync" error.yokota2001-10-131-109/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | - Count the number of this error. - When the error is detected for the first time, the psm driver will throw few data bytes (up to entire packet size) and see if it can get back to sync. - If the error still persists, the psm driver disable/enable the mouse and see if it works. - If the error still persists and the count goes up to 20, the psm driver reset and reinitialize the mouse. The counter is reset to zero. - It also discards an incomplete data packet when the interval between two consequtive bytes are longer than pre-defined timeout (2 seconds). The last byte which arrived late will be regarded as the first byte of a new packet. This is louie's idea. You may see the following error logs during the above operations: "psmintr: delay too long; resetting byte count" "psmintr: out of sync (%04x != %04x)" "psmintr: discard a byte (%d)" "psmintr: re-enable the mouse" "psmintr: reset the mouse" MFC after: 1 month
* Remove an unneeded variable declaration and statement.robert2001-10-091-2/+0
| | | | Approved by: jake
* Add PnP ID 'IBM3781' for TP240 mouse.takawata2001-10-031-0/+1
|
* Add support for 28800 baud to sio.jlemon2001-09-291-0/+1
| | | | | PR: 30906 Submitted by: "Daniel O'Connor" <darius@chowder.dons.net.au>
* Gate low level console output on mtx_lock_spin(&sio_lock), if thejlemon2001-09-271-0/+4
| | | | | | sio_lock has been initialized. This prevents the low level console output (kernel printf) from clobbering the sio settings if the system happens to be in the middle of comstart().
* Yet another turn of workaround for psm/ACPI/PnP BIOSyokota2001-09-252-39/+84
| | | | | | | problems currently experienced in -CURRENT. This should fix the problem that the PS/2 mouse is detected twice if the acpi module is not loaded on some systems.
* Reinitialize the keyboard after the ACPI resume event.yokota2001-09-231-1/+10
| | | | | | | | | I am not sure if this is absolutely necessary on all systems. Yet, there certainly are motherboards and notebook systems which require this, although there are other systems which just don't. I hope we shall know when to do this on which systems, as the development of our ACPI subsystem progresses... (I know we didn't need this for the APM resume.)
* Tweak so I can use a serial console on ia64.dfr2001-09-221-1/+1
|
* Recognize two cheap PCI 16550 devices :murray2001-09-161-2/+4
| | | | | | | CyberSerial (1-port) 16550 Oxford Semiconductor Dual Port 16550 Sort the list of PCI devices while I'm here.
* Handle "identifier strings" right. Each ISA PnP card must have ayokota2001-09-151-2/+12
| | | | | | | | | | | | mandatory "card" identifier string. A logical devices on the ISA PnP card may optionally have a "device" identifier string. Do not confuse them. The "card" identifier string is assigned to a logical device as the default description string when the device is found. (If the "card" identifier string has not been found, use the EISA PnP ID string. Strictly speaking, this is an error.) We will override it when a "device" identifier string is found later.
* Refine ACPI/PnP BIOS probe/attach routines a bit.yokota2001-09-152-14/+37
| | | | | | | | | | | - Add workaround for the problematic PnP BIOS which does not assign irq resource for the PS/2 mouse device node; if there is no irq assigned for the PS/2 mouse node, refer to device.hints for an irq number. If we still don't find an irq number in the hints database, use a hard-coded value. - Delete unused ivars. - Bit of clean up in probe/attach. - Add PnP ID for the PS/2 mouse port on some IBM ThinkPad models.
* KSE Milestone 2julian2001-09-125-29/+29
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Add a missing newline to an error message.dd2001-09-091-1/+1
| | | | | PR: 30436 Submitted by: Joerg Lehners <Lehners@Informatik.Uni-Oldenburg.DE>
* Update the atkbdc, atkbd, and psm drivers to probe/attachyokota2001-09-063-125/+279
| | | | | | | | more cleanly and consistently in all APCI, PnP BIOS, and "hint" cases. NOTE: this doesn't necessarily solve the problem that the PS/2 mouse is not detected after the recent ACPI update.
* Rework the ISA PnP driver pnp and the PnP resource parser to fixyokota2001-09-056-350/+659
| | | | | | | | | | | | | | | | | | | | | | | | the following bugs. - When constructing a resource configuration, respect the order in which resource descriptors are read, in order to establish the correct mapping between the descriptors and configuration registers. "Plug and Play ISA Specification, Version 1.0a", Sec 4.6.1, May 5, 1994. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1, Dec. 10, 1994. - Do not ignore null (empty) descriptors; they are valid descriptors acting as filler. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1. - Correctly set up logical device configuration registers for null resources. "Clarifications to the Plug and Play ISA Specification, Version 1.0a" - Handle null resources properly in the resource allocator for the ISA bus.
* Reenable RTC interrupts after wakeup. Some laptops have a problemiwasaki2001-09-041-1/+22
| | | | | | | | | with system statistics monitoring tools (such as systat, vmstat...) because of stopping RTC interrupts generation. Restore all the timers (RTC and i8254) atomically. Reviewed by: bde MFC after: 1 week
* Add a new field, id_config_attr to the struct isa_device.yokota2001-09-033-1/+14
| | | | | It will be later used to store some flags to control PnP device configurations.
* Add ID for the Best Data Smart One 56SPS Voice modem.murray2001-08-311-0/+1
| | | | | PR: kern/24851 Submitted by: Daniel Rudy <dcrudy@aol.com>
* Correct the ID for the ALS0120 PnP Joystick. It is different from themurray2001-08-311-1/+1
| | | | | | | ALS0110. PR: kern/22617 Submitted by: Mike Holling <myke@fks.bt>
* Add OMRON ME5614ISA PnP modem.murray2001-08-311-0/+1
| | | | | PR: kern/22801 Submitted by: Ryuzo Okada <R.Okada@mm.neweb.ne.jp>
* Add PCI device IDs for Kuotech dual port serial cards.murray2001-08-311-0/+2
| | | | | | | Also give example of the flags needed to use these cards. PR: kern/21242 Submitted by: Shigeki Moride <moride@portside.net>
* Add ACPI attachments.msmith2001-08-306-0/+6
|
* Safety-check against empty PnP ID lists.msmith2001-08-301-1/+1
|
* Fix the so-called "half-baked-probe" code that I wrote a long time agoimp2001-08-161-0/+2
| | | | | | | | | | | | | | to properly clear the interrupt register on the no error case. Also, set the mcr register to zero when we find we can't support the chip. This fixes the hang on sio driver attach problem in the new pci pccard code that some people have reported. At least on my machine. I'd like to get this into 4.4. Submitted by: bde PR: kern/29742 MFC after: 1 day
* DO NOT ALLOCATE 2+K OBJECTS ON THE KERNEL STACK!!!!julian2001-08-101-12/+25
| | | | found by: Getting my u-area overwritten
* Return consistent key action codes at key press and releaseyokota2001-07-201-0/+1
| | | | | | | | | | events. Otherwise you would see unexpected results if shift or locking keys are defined to give different actions depending on other shift/locking keys' state. Please keep the ukbd module and the kernel in sync, otherwise the USB keyboard won't work after this change. MFC after: 10 days
* Hrmpf. nyan's rev 1.25 commit to fdc.h crossed with my removal of it.joerg2001-07-141-0/+17
| | | | Back-integrate his (PC98) changes into fd.c.
* Yet another large non-function change.joerg2001-07-142-292/+271
| | | | | | | | | | | | | | | | | | | | . Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer a reason to scatter things across two files. . Sanitize comments. Convert them into the style(9)-recommended multi-line form, make them sentences where apprpriate, etc. . Declare all functions on top, and declare them in the order they appear in the file. This order is totally chaotic, but Bruce convinced me that reordering the file wouldn't make it better either. . Kill a `possibly uninitialized' warning (only seen with -O2) in fd_read_status(). . Make the comments at return (0|1) statements in fdstate() consistent. . Nuke a ``keep the compiler happy'' dummy return at the end of fdstate(), gcc is smart enough to detect that it would never be reached anyway.
* - Refine pc98 supports.nyan2001-07-141-0/+17
| | | | | - Use bus_space stuff. - Rename FDO_* -> FDC_* (obtained from NetBSD/pc98)
* Log when the user is turning debugging on/off.joerg2001-07-091-5/+9
| | | | | | | Also sanitize the TRACE* macros a bit so they syntactically behave like single C statements (even inside in `if' statement). Submitted by: des
* Hmpf, remove two variables that got unused by rev 1.214.joerg2001-07-091-2/+1
|
* Ouch, calculate correctly. With 300 rpm and 25 retries, it's 5 secondsjoerg2001-07-091-1/+1
| | | | till timeout.
* Remove parts of rev 1.211 again: do not delete our children iff theyjoerg2001-07-091-7/+0
| | | | | | haven't been probed successfully. It's a known bug that ISA hints processing instantiates those devices, and prematurely killing them has other unwanted side-effects.
* As des' example shows us, DMA overruns could happen in a situationjoerg2001-07-092-9/+38
| | | | | | | | where they will never succeed. Add a stop-gap measure that will at least eventually timeout the operation instead of retrying it indefinately. MFC after: 1 month
* Another large patchset from Bruce.joerg2001-07-081-158/+113
| | | | | | | | | | | | | | | Despite of a few cosmetic things like adding ``irritating silly parentheses'' around all return values, this mainly improves FDC reset handling by no longer gratuitously resetting the FDC all the time (which causes it to lose the notion of the current track) but only in case of errors, and it sanitizes the block and offset calculations in fdstrategy() and fdstate(). Some additional cleanup added by me, in particular the large switch in fdstate() now always uses return to break out, and no branch falls off the end of the switch statement anymore. Per Bruce's suggestion, removed M_NOWAIT from the malloc()s to simplify things. Submitted by: bde (mostly)
* More cleanup when detaching. Clone device entries will now bejoerg2001-07-041-17/+41
| | | | | | | | | | | | | | | | | | | | | destroyed properly (otherwise bad things would happen after a clone dev had been created, and the module was kldunloaded). Allocated children that have not successfully probed are being deleted again (otherwise fd0 and fd1 have always been allocated, even if only fd0 was acutally present, and fd1 even survived kldunloading the module). Still, kldunloading leaves remnants of the previously existing devices intact. Why doesn't it destroy all the devices? As a consequence, since dev->descr now points into no longer allocated memory, the system panics deep inside printf(9) when running devinfo(1) after kldunloading the module. Ideas sought... Also, when kldloading the module on a hints-populated isab0, this bus somehow has already created an fdc0 entry (a dummy) so the load attempt fails and will register fdc1 instead. What are those dummy entries for? Loading the module from the bootloader works, and it can be unloaded an re-loaded then later.
* Remove the resume method. It is not necessary any more, becauseyokota2001-06-301-7/+0
| | | | | keyboard drivers have it now... MFC after: 4 weeks
OpenPOWER on IntegriCloud