summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Catch up with some recent changes:imp2001-05-161-1/+6
| | | | | | 1) pcic_isa.c 2) For pc98, add mecia driver and -DPC98 to command line. 3) pcic_p.c -> pcic_pci.c
* Separate out isa attachment to its own file. The pci attachment willimp2001-05-164-84/+189
| | | | | | | | | | | soon attach directly to pcic rather than the kludge pci-pcic device we have now. In some ways, this is similar to the work PAO3 did to try to support cardbus bridges. In some ways different. This and future commits will be taking from the spirit of many of those changes. pcicvar.h is completely different from the pcicvar.h that appeared in PAO3, but similar in concept.
* This file is now obsolete. The #defines in it have never been usedimp2001-05-161-44/+0
| | | | and the pcic_devclass no longer is used by pccard.c.
* remove include of ipl.h because it no longer existsalfred2001-05-161-1/+0
|
* Lock the procfs functions for doing a single step and reading/writingjhb2001-05-164-132/+67
| | | | | | registers better. Hold sched_lock not only for checking the flag but also while performing the actual operation to ensure the process doesn't get swapped out by another CPU while we the operation is being performed.
* pcic98reg.h is now contained in meciareg.h.imp2001-05-152-59/+1
|
* The mecia support has moved to the mecia driver, so remove the copy ofimp2001-05-151-351/+35
| | | | it here.
* Add mecia driver definitions.imp2001-05-151-0/+1
|
* This code touches MD code inappropriately. So we have to include pc98imp2001-05-151-0/+5
| | | | specific file for pc98.
* A new driver for the MECIA. This is the NEC Original PCMCIAimp2001-05-152-0/+792
| | | | | | controller found in many of the early NOTE98 machines that were produced. This controller is completely unlike the intel 82365, so I've separated it out from the main pcic driver.
* "Sir, the deorbit burn completed succesfully."jhb2001-05-156-220/+0
| | | | RIP {sys/machine}/ipl.h.
* Remove unneeded includes of sys/ipl.h and machine/ipl.h.jhb2001-05-1559-63/+0
|
* Add a PROC_TRYLOCK() macro to perform a mtx_trylock() on the process lock.jhb2001-05-151-0/+1
|
* Remove unneeded includes in the i386 case.jhb2001-05-151-5/+0
|
* - Remove unneeded include of sys/ipl.h.jhb2001-05-151-1/+2
| | | | | - Lock the process before calling killproc() to kill it for exceeding the maximum CPU limit.
* - Remove unneeded include of sys/ipl.h.jhb2001-05-151-3/+2
| | | | | | - Require the proc lock be held for killproc() to allow for the vmdaemon to kill a process when memory is exhausted while holding the lock of the process to kill.
* Move the definition of HWI_MASK to the i386/isa/icu.h header right next tojhb2001-05-152-0/+4
| | | | the definition of ICU_LEN.
* - Use ICU_LEN rather than NHWI for the size of the array of ithreads.jhb2001-05-152-4/+2
| | | | - Remove unneeded include of sys/ipl.h.
* - Use PROC_LOCK_ASSERT instead of a direct mtx_assert.jhb2001-05-151-8/+6
| | | | | | | | | | | | - Don't hold Giant in the swapper daemon while we walk the list of processes looking for a process to swap back in. - Don't bother grabbing the sched_lock while checking a process' sleep time in swapout_procs() to ensure that a process has been idle for at least swap_idle_threshold2 before swapping it out. If we lose the race we just let a process stay in memory until the next call of swapout_procs(). - Remove some unneeded spl's, sched_lock does all the locking needed in this case.
* Fix instance of (struct ti_softc *) that should have beenwpaul2001-05-151-1/+1
| | | | | | (struct nge_softc *), which the compiler never complained about. I guess it doesn't matter, a pointer is a pointer, but looked weird to me.
* Include sys/lock.h and sys/mutex.h so that this compiles.jhb2001-05-151-0/+2
|
* Adjust the descriptor structures a little by making the software partswpaul2001-05-151-4/+12
| | | | | | | | | | be unions with enough padding to make sure they always end up being a multiple of 8 bytes in size, since the 83820/83821 chips require descriptors to be aligned on 64-bit boundaries. I happened to get it right for the 32-bit descriptor/x86 case, but botched everything else. Things should work properle on 32-bit/64-bit platforms now. Note that the 64-bit descriptor format isn't being used currently.
* Remove a bogus comment which I forgot to get rid of after testinggreid2001-05-151-1/+1
|
* ahc_eisa.c:gibbs2001-05-1514-323/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ahc_pci.c: Prepare for making ahc a module by adding module dependency and version info. aic7770.c: Remove linux header ifdefs. The headers are handled differently in Linux where local includes (those using "'s instead of <>'s) are allowed. Don't map our interrupt until after we are fully setup to handle interrupts. Our interrupt line may be shared so an interrupt could occur at any time. aic7xxx.c: Remove linux header ifdefs. current->curr to avoid Linux's use of current as a #define for the current task on some architectures. Add a helper function, ahc_assert_atn(), for use in message phases we handle manually. This hides the fact that U160 chips with the expected phase matching disabled need to have SCSISIGO updated differently. if (ahc_check_residual(scb) != 0) ahc_calc_residual(scb); else ahc_set_residual(scb, 0); becomes: ahc_update_residual(scb); Modify scsi parity error (or CRC error) handling to reflect expected phase being disabled on U160 chips. Move SELTO handling above BUSFREE handling so we can use the new busfree interrupt behavior on U160 chips. In ahc_build_transfer_msg() filter the period and ppr_options prior to deciding whether a PPR message is required. ppr_options may be forced to zero which will effect our decision. Correct a long standing but latent bug in ahc_find_syncrate(). We could choose a DT only rate even though DT transfers were disabled. In the CAM environment this was unlikely as CAM filters our rate to a non-DT value if the device does not support such rates. When displaing controller characteristics, include the speed of the chip. This way we can modify the transfer speed based on optional features that are enabled/disabled in a particular application. Add support for switching from fully blown tagged queing to just using simple queue tags should the device reject an ordered tag. Remove per-target "current" disconnect and tag queuing enable flags. These should be per-device and are not referenced internally be the driver, so we let the OSM track this state if it needs to. Use SCSI-3 message terminology. aic7xxx.h: The real 7850 does not support Ultra modes, but there are several cards that use the generic 7850 PCI ID even though they are using an Ultra capable chip (7859/7860). We start out with the AHC_ULTRA feature set and then check the DEVSTATUS register to determine if the capability is really present. current -> curr ahc_calc_residual() is no longer static allowing it to be called from ahc_update_residual() in aic7xxx_inline.h. Update some serial eeprom definitions for the latest BIOS versions. aic7xxx.reg: Add a combined DATA_PHASE mask to the SCSIPHASE register definition to simplify some sequencer code. aic7xxx.seq: Take advantage of some performance features available only on the U160 chips. The auto-ack feature allows us to ack data-in phases up to the data-fifo size while the sequencer is still setting up the DMA engine. This greatly reduces read transfer latency and simplifies testing for transfer complete (check SCSIEN only). We also disable the expected phase feature, and enable the new bus free interrupt behavior, to avoid a few instructions. Re-arrange the Ultra2+ data phase handling to allow us to do more work in parallel with the data fifo flushing on a read. On an SDTR, ack the message immediately so the target can prepare the next phase or message byte in parallel with our work to honor the message. aic7xxx_93cx6.c: Remove linux header ifdefs. aic7xxx_freebsd.c: current -> curr Add a module event handler. Handle tag downgrades in our ahc_send_async() handler. We won't be able to downgrade to "basic queuing" until CAM is made aware of this queuing type. aic7xxx_freebsd.h: Include cleanups. Define offsetof if required. Correct a few comments. Update prototype of ahc_send_async(). aic7xxx_inline.h: Implement ahc_update_residual(). aic7xxx_pci.c: Remove linux header ifdefs. Correct a few product strings. Enable several U160 performance enhancing features. Modify Ultra capability determination so we will enable Ultra speeds on devices with a 7850 PCI id that happen to really be a 7859 or 7860. Don't map our interrupt until after we are fully setup to handle interrupts. Our interrupt line may be shared so an interrupt could occur at any time.
* Use " |= " to enable special media handling for fxp with no MII, insteadjlemon2001-05-152-2/+2
| | | | | | | of " &= ". Also change the MII PHY device mask to check the correct bits. Cookie to: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> Pointy hat to: me
* Support /dev/ctty againbrian2001-05-151-3/+8
| | | | Submitted by: peter
* Back out scanning file descriptors with holding a process lock.tanimura2001-05-153-6/+66
| | | | | selrecord() requires allproc sx in pfind(), resulting in lock order reversal between allproc and a process lock.
* Merged from sys/isa/fd.c revision 1.197.kato2001-05-152-46/+80
|
* Merged from sys/i386/i386/machdep.c revision 1.450.kato2001-05-152-0/+2
|
* {G,S}ET_UNIT are now unused, gc themimp2001-05-151-3/+0
|
* It turns out that pcic_slot::slotnum was really unused, so don't setimp2001-05-141-2/+0
| | | | it.
* Remove static array of slots. We now have state information for eachimp2001-05-141-17/+24
| | | | | slot in a softc for each unit that we probe. Also remove validunits static, since it is no longer necessary.
* Fix the so called "static bug" in polling mode. Some desktop cardsimp2001-05-141-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | have bad grounding characteristics which allow small static discharges (or sunspots, we're not 100% sure which) to reach the bridge chip. This causes the bridge chip to wedge/reset itself. There's no known cure short of rebooting. The bug manifests itself by the STAT_CHG return 0xff when read. This is impossible because the upper bits are reserved (and therefore zero). In addition, some of the lower bits are one only for memory cards, which OLDCARD doesn't support, so if they are set, something seriously foobar'd is going on. So far we've seen this in exactly one brand of pcmcia <-> isa bridge which plug and play identifies only as "VIA PCMCIA CARD". This card just has buffers on the isa card and the actual bridge chip on the remote slot, which is connected by long ribbon cables. We think this long cable run, coupled with the lack of coupling capacitors is a major reason why it is so static sensitive while its bretheren aren't. Work Supported by: Timing Solutions, Inc. MFC After: 3 days
* Implement a few more floppy ioctl commands and IO options, namely:joerg2001-05-145-52/+134
| | | | | | | | | | | | | | | | | | | | | . FD_CLRERR clears the error counter, thus re-enables kernel error printf()s, . FD_GSTAT obtains the last FDC operation state, if any, . FDOPT_NOERRLOG (temporarily) turns off kernel printf() floppy error logging, . FDOPT_NOERROR makes the kernel ignore an FDC error, thus can enable the transfer of an erroneous sector to the user application All options are being cleared on (last) close. Prime consumer of the last features will be fdread(1), to be committed shortly. (FD_CLRERR should be wired into fdcontrol(8), but then fdcontrol(8) needs a major rewrite anyway.)
* Close PR 22208: bring chip out of suspend mode, because Windows mightwpaul2001-05-144-0/+30
| | | | | have put the chip to sleep at shutdown. This is really only for the VT6102, but it doesn't hurt the older chips.
* Add support for the AMD 766 southbridge incl ATA100 supportsos2001-05-142-3/+24
| | | | Fix ATA66 mode for the AMD756, the timing was way to slow
* Further fixes for deadlock in the presence of multiple snapshots.mckusick2001-05-141-7/+20
| | | | | There are still more to find, but this fix should cover the common cases that folks are hitting.
* When calling poll() on a fd associated with a filesystem, let POLLIN/POLLOUTjlemon2001-05-141-3/+3
| | | | | | | | behave identically to POLLRDNORM/POLLWRNORM. Submitted by: bde PR: 27287 merge after: 1 week
* Use the new ability to avoid practically all the gunk in this file.phk2001-05-141-17/+26
| | | | | | | When people access /dev/tty, locate their controlling tty and return the dev_t of it to them. This basically makes /dev/tty act like a variant symlink sort of thing which is much simpler than all the mucking about with vnodes.
* After a successfull poll of the cloning functions, match on thephk2001-05-141-14/+6
| | | | | | | returned dev_t rather than the original name. This allows cloning from one name to another which is useful for /dev/tty and later for the pty's.
* Minor style(9) changes:imp2001-05-144-74/+78
| | | | return (VALUE);
* Take a stab at making this less dependent on having pcic as a parent.imp2001-05-141-24/+17
| | | | | | | For memory for the pccard attribute/common memory mapping allocate on the pccard. For other allocations, use whatever is the parent of this device. There's no doubt other issues lurking, but this should make things closer to being independent.
* Change machdep.pccard.pcic_mem_{start,end} to machdep.pccard.mem_{start,end}imp2001-05-141-10/+8
| | | | | | | since they have nothing to do with pcic and it makes grepping for pcic infection in pccard harder. MFC after: 3 days
* - Convert msleep(9) in select(2) and poll(2) to cv_*wait*(9).tanimura2001-05-144-59/+158
| | | | | | | | | | | | | - Since polling should not involve sleeping, keep holding a process lock upon scanning file descriptors. - Hold a reference to every file descriptor prior to entering polling loop in order to avoid lock order reversal between lockmgr and p_mtx upon calling fdrop() in fo_poll(). (NOTE: this work has not been done for netncp and netsmb yet because a socket itself has no reference counts.) Reviewed by: jhb
* When activating or deactivating a resource, only attempt to deal withimp2001-05-141-0/+8
| | | | | | | | | | the resource activation if we're dealing with our grandchild. Otherwise, we run into two problems. One, if the pccard layer wanted to allocate and activate something, we'd wind up trying to do the wrong thing twice: the ivars are wrong and we don't want the bridge to map the resource to the slot. If we're more than a grandchild, then who knows what kind of ivar is present. In either of these cases, we just pass it up the food chain.
* If the effective link count is zero when an NFS file handle requestmckusick2001-05-131-1/+3
| | | | | | | | | | | | | | | | comes in for it, the file is really gone, so return ESTALE. The problem arises when the last reference to an FFS file is released because soft-updates may delay the actual freeing of the inode for some time. Since there are no filesystem links or open file descriptors referencing the inode, from the point of view of the system, the file is inaccessible. However, if the filesystem is NFS exported, then the remote client can still access the inode via ufs_fhtovp() until the inode really goes away. To prevent this anomoly, it is necessary to begin returning ESTALE at the same time that the file ceases to be accessible to the local filesystem. Obtained from: Ian Dowse <iedowse@maths.tcd.ie>
* Convert DEVFS from an "opt-in" to an "opt-out" option.phk2001-05-1314-18/+14
| | | | | | | | | If for some reason DEVFS is undesired, the "NODEVFS" option is needed now. Pending any significant issues, DEVFS will be made mandatory in -current on july 1st so that we can start reaping the full benefits of having it.
* Use a critical region to protect pushing of the parent's npx state to thebde2001-05-132-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | pcb for fork(). It was possible for the state to be saved twice when an interrupt handler saved it concurrently. This corrupted (reset) the state because fnsave has the (in)convenient side effect of doing an implicit fninit. Mundane null pointer bugs were not possible, because we save to an "arbitrary" process's pcb and not to the "right" place (npxproc). Push the parent's %gs to the pcb for fork(). Changes to %gs before fork() were not preserved in the child unless an accidental context switch did the pushing. Updated the list of pcb contents which is supposed to inhibit bugs like this. pcb_dr*, pcb_gs and pcb_ext were missing. Copying is correct for pcb_dr*, and pcb_ext is already handled specially (although XXX'ly). Reducing the savectx() call to an npxsave() call in rev.1.80 was a mistake. The above bugs are duplicated in many places, including in savectx() itself. The arbitraryness of the parent process pointer for the fork() subroutines, the pcb pointer for savectx(), and the save87 pointer for npxsave(), is illusory. These functions don't work "right" unless the pointers are precisely curproc, curpcb, and the address of npxproc's save87 area, respectively, although the special context in which they are called allows savectx(&dumppcb) to sort of work and npxsave(&dummy) to work. cpu_fork() just doesn't work unless the parent process pointer is curproc, or the caller has pushed %gs to the pcb, or %gs happens to already be in the pcb.
* Remove safety belt that checks for miibus in the config file. Thisjlemon2001-05-131-11/+0
| | | | was only intended for -stable, not -current.
* Return errors for unsupported operations on pcic_get_res_flags ratherimp2001-05-131-1/+1
| | | | than 0.
OpenPOWER on IntegriCloud