aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Limit CHANNEL_B_PRIMARY's effect to twin channel adapters where we can easilyJustin T. Gibbs2001-02-172-4/+8
| | | | | | | | | | register our sub-busses in the reversed order. In the future, we may provide a hint to CAM on how to order the scans for multi-function adapters that also set this flag, but trying to do it the "twin channel" way will lead to a panic. Notes: svn path=/head/; revision=72552
* Don't assume bus_space_handle_t == the start address of resource.Yoshihiro Takahashi2001-02-161-4/+8
| | | | | | | Use rman_get_start() instead. Notes: svn path=/head/; revision=72535
* Extend kqueue down to the device layer.Jonathan Lemon2001-02-159-17/+26
| | | | | | | Backwards compatible approach suggested by: peter Notes: svn path=/head/; revision=72521
* add a format feeder for conversion from alaw to ulaw and vice versa.Cameron Grant2001-02-131-0/+93
| | | | | | | Submitted by: Orion Hodson <O.Hodson@cs.ucl.ac.uk> Notes: svn path=/head/; revision=72458
* make attempts to set unsupported speeds or formats non-sticky. this shouldCameron Grant2001-02-131-3/+30
| | | | | | | | | fix problems with apps that probe for a variety of settings. Submitted by: Orion Hodson <O.Hodson@cs.ucl.ac.uk> Notes: svn path=/head/; revision=72457
* add power management support.Cameron Grant2001-02-132-95/+107
| | | | | | | Submitted by: Orion Hodson <O.Hodson@cs.ucl.ac.uk> Notes: svn path=/head/; revision=72455
* Oops, its no longer NISA its DEV_ISA, sigh....Søren Schmidt2001-02-121-1/+1
| | | | Notes: svn path=/head/; revision=72413
* Dont rely on isa includes to get at the std port adresses.Søren Schmidt2001-02-122-2/+6
| | | | Notes: svn path=/head/; revision=72410
* Print out sensekey specifik values if set on errorSøren Schmidt2001-02-121-3/+8
| | | | Notes: svn path=/head/; revision=72403
* Properly report the VIA '586 type.Søren Schmidt2001-02-121-1/+3
| | | | Notes: svn path=/head/; revision=72402
* Implement a unified run queue and adjust priority levels accordingly.Jake Burkholder2001-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All processes go into the same array of queues, with different scheduling classes using different portions of the array. This allows user processes to have their priorities propogated up into interrupt thread range if need be. - I chose 64 run queues as an arbitrary number that is greater than 32. We used to have 4 separate arrays of 32 queues each, so this may not be optimal. The new run queue code was written with this in mind; changing the number of run queues only requires changing constants in runq.h and adjusting the priority levels. - The new run queue code takes the run queue as a parameter. This is intended to be used to create per-cpu run queues. Implement wrappers for compatibility with the old interface which pass in the global run queue structure. - Group the priority level, user priority, native priority (before propogation) and the scheduling class into a struct priority. - Change any hard coded priority levels that I found to use symbolic constants (TTIPRI and TTOPRI). - Remove the curpriority global variable and use that of curproc. This was used to detect when a process' priority had lowered and it should yield. We now effectively yield on every interrupt. - Activate propogate_priority(). It should now have the desired effect without needing to also propogate the scheduling class. - Temporarily comment out the call to vm_page_zero_idle() in the idle loop. It interfered with propogate_priority() because the idle process needed to do a non-blocking acquire of Giant and then other processes would try to propogate their priority onto it. The idle process should not do anything except idle. vm_page_zero_idle() will return in the form of an idle priority kernel thread which is woken up at apprioriate times by the vm system. - Update struct kinfo_proc to the new priority interface. Deliberately change its size by adjusting the spare fields. It remained the same size, but the layout has changed, so userland processes that use it would parse the data incorrectly. The size constraint should really be changed to an arbitrary version number. Also add a debug.sizeof sysctl node for struct kinfo_proc. Notes: svn path=/head/; revision=72376
* Make a big improvement to entropy-harvesting speed by not having anyMark Murray2001-02-112-66/+41
| | | | | | | locks (only atomic assigns) in the harvest ringbuffer. Notes: svn path=/head/; revision=72364
* Fix:Gerard Roudier2001-02-111-10/+32
| | | | | | | | | | | | | | | | | | | | - Missing cpu_to_scr() added (endian-ness). Improvement (fix|workaroung??): - Blindly firing a PPR can lead to some messy situations due to various causes or misfeatures, for example: * The 53C1010-[33|66] supports offset 62 in DT mode, but only offset 31 in ST mode. As a result, a PPR(DT, offset 62) responded with PPR(ST, any offset > 31) must be rejected. * A device that doesn't know about PPR should reject it, but may also be confused by this message. When a PPR encounters problems, the driver now patches the goal transfer settings for legacy negotiations to be performed later with the offending target. This give a chance for bad situations to be fixed automagically. Notes: svn path=/head/; revision=72361
* RIP <machine/lock.h>.Mark Murray2001-02-113-6/+42
| | | | | | | | | | Some things needed bits of <i386/include/lock.h> - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to <i386/include/apic.h> (AKA <machine/apic.h>). Reviewed by: jhb Notes: svn path=/head/; revision=72358
* Eliminate ISP2100_FABRIC- we always allow for fabric now. Add anMatt Jacob2001-02-111-18/+85
| | | | | | | | | | | | isp_iid_set/isp_iid for fibre channel- this is because we now fake a port database entry for ourselves. Add the additional loop states between LOOP_PDB_RCVD and LOOP_READY. Change and comment on a wad of Fibre Channel isp_control functions. Change and comment on some of the ISPASYNC Fibre Channel events. Notes: svn path=/head/; revision=72355
* Add structure defining FC-AL position maps. The only tool that I know ofMatt Jacob2001-02-111-0/+16
| | | | | | | that really uses this is luxadm(8) under Solaris. Notes: svn path=/head/; revision=72354
* Shuffle around how we do isp_disable management- make sure we return 0 soMatt Jacob2001-02-111-21/+25
| | | | | | | | | | | | the unit number doesn't get reused. Make sure that if we've compiled for ISP_TARGET_MODE we set the default role to be ISP_ROLE_INITIATOR|ISP_ROLE_TARGET. Do some misc other cleanups. Notes: svn path=/head/; revision=72353
* Add isp_fc_runstate function- this function's purpose is to, in stages,Matt Jacob2001-02-111-0/+54
| | | | | | | | | | | and depending on role, make sure link is up, scan the fabric (if we're connected to a fabric), scan the local loop (if appropriate), merge the results into the local port database then, check once again to make sure we have f/w at FW_READY state and the the loopstate is LOOP_READY. Notes: svn path=/head/; revision=72352
* Roll minor version. Remove ISP2100_FABRIC define (unneeded now).Matt Jacob2001-02-111-2/+6
| | | | | | | | | | Comment out usage of ISP_SMPLOCK- I have my doubts that this works sanely as yet because CAM itself still needs Giant. I *was* dropping my lock and grabbing Giant when doing the upcall for completion, but this is all seems ridiculous until CAM is fixed. Notes: svn path=/head/; revision=72348
* Do some cleanup based upon adapter role- mainly not enabling interruptsMatt Jacob2001-02-111-35/+33
| | | | | | | | | | | | | | if we're ISP_ROLE_NONE. Change ISPASYNC_LOGGED_INOUT to ISPASYNC_PROMENADE. Make sure we note if something is a fabric device. Target mode: Finally fix (to a first approximation) SCSI Target Mode again- we needed to correctly check against CAM_TARGET_WILDCARD and CAM_LUN_WILDCARD so that targbh won't confuse us. Comment out the drainqueue stuff for now. Use isp_fc_runstate instead if isp_control/ISPCTL_FCLINK_TEST. Notes: svn path=/head/; revision=72347
* Minor stuff:Matt Jacob2001-02-111-370/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove ISP2100_FABRIC defines- we always handle fabric now. Insert isp_getmap helper function (for getting Loop Position map). Make sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP, and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications upstream for changes in the name server, changes in the port database, and f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event. Major stuff: Quite massively redo how we handle Loop events- we've now added several intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us a lot finer control about how we scan fabric, whether we go further than scanning fabric, how we look at the local loop, and whether we merge entries at the level or not. This is the next to last step for moving managing loop state out of the core module entirely (whereupon loop && fabric events will simply freeze the command queue and a thread will run to figure out what's changed and *it* will re-enable the queu). This fine amount of control also gets us closer to having an external policy engine decide which fabric devices we really want to log into. Notes: svn path=/head/; revision=72346
* update to latest and greatest f/wMatt Jacob2001-02-115-11570/+13592
| | | | Notes: svn path=/head/; revision=72345
* aic7xxx.c:Justin T. Gibbs2001-02-105-78/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style nits. Make sure that our selection hardware is disabled as soon as possible after detecting a busfree and even go so far as to disable the selection hardware in advance of an event that will cause a busfree (ABORT or BUS DEVICE RESET message). The concern is that the selection hardware will select a target for which, after processing the bus free, there will be no commands pending. The sequencer idle loop will re-enable the selection should it still be necessary. In ahc_handle_scsiint(), clear SSTAT0 events several PCI transactions (most notably reads) prior to clearing SCSIINT. The newer chips seem to take a bit of time to see the change which can make the clearing of SCSIINT ineffective. Don't bother panicing at the end of ahc_handle_scsiint(). Getting to the final else just means we lost the race with clearing SCSIINT. In ahc_free(), handle init-level 0. This can happen when we fail the attach for RAID devices. While I'm here, also kill the parent dma tag. In ahc_match_scb(), consider initiator ccbs to be any that are not from the target mode group. This fixes a bug where an external target reset CCB was not getting cleaned up by the reset code. Don't bother freezing a ccb in any of our "abort" routines when the status is set to CAM_REQ_CMP. This can happen for a target reset ccb. aic7xxx.reg: Reserve space for a completion queue. This will be used to enhance performance in the near future. aic7xxx.seq: Remove an optimization for the 7890 autoflush bug that turned out to allow, in rare cases, some data to get lost. Implement a simpler, faster, fix for the PCI_2_1 retry bug that hangs the sequencer on an SCB dma for certain chips. Test against SAVED_SCSIID rather than SELID during target reselections. This is how we always did it in the past, but the code was modified while trying to work around an issue with the 7895. SAVED_SCSIID takes into account twin channel adapters such as the 2742T, whereas SELID does not have the channel bit. This caused invalid selection warnings and other strangeness on these cards. aic7xxx_pci.c Use the correct mask for checking the generic aic7892 entry. Notes: svn path=/head/; revision=72325
* Revert the spin mutex for the cy(4) driver.John Baldwin2001-02-092-138/+304
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=72262
* Catch up to the new swi API.John Baldwin2001-02-091-7/+6
| | | | Notes: svn path=/head/; revision=72244
* - Use a spin mutex instead of COM_LOCK, since COM_LOCK is going away.John Baldwin2001-02-092-330/+166
| | | | | | | | | The same name from the sio(4) driver was used and an appropriate dictionary item added at the top to reduce diffs. - Catch up to the new swi API. Notes: svn path=/head/; revision=72242
* - Catch up to the new swi API changes:John Baldwin2001-02-091-12/+12
| | | | | | | | | | - Use swi_* function names. - Use void * to hold cookies to handlers instead of struct intrhand *. - In sio.c, use 'driver_name' instead of "sio" as the name of the driver lock to minimize diffs with cy(4). Notes: svn path=/head/; revision=72238
* Unbreak EISA. The PCI-EISA bridge bus is named `eisab', not `isab'.Joerg Wunsch2001-02-091-1/+1
| | | | | | | | | | | This mistake seems to have been benign until very recently, probably until msmith's PCI code reshuffle which cleaned up a lot of things. Still, my AIC7770 doesn't work again, but it at least probes the EISA bus now. Notes: svn path=/head/; revision=72228
* Change and clean the mutex lock interface.Bosko Milekic2001-02-0921-151/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order) Notes: svn path=/head/; revision=72200
* Add includes of sys/malloc.h so this actually compiles.John Baldwin2001-02-092-1/+2
| | | | | | | Pointy-hat to: asmodai Notes: svn path=/head/; revision=72196
* Whoops... forgotten a few pieces in previous patch:Luigi Rizzo2001-02-081-5/+9
| | | | | | | | | | * a ">" is really ">=" ; * do not try to fetch zero-sized blocks from the card; * make sure that bpf gets the packets it wants even with bridging active; Notes: svn path=/head/; revision=72193
* Make sure that we do not accept packets shorter than a full ethernetLuigi Rizzo2001-02-081-1/+3
| | | | | | | header, or we would have a negative length passed to ether_input(). Notes: svn path=/head/; revision=72190
* Fix memory leaks with dev_get_children().Warner Losh2001-02-081-0/+6
| | | | | | | Submitted by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> Notes: svn path=/head/; revision=72189
* Fix a memory leak.Søren Schmidt2001-02-081-5/+4
| | | | | | | Pointed out by: Asmodai Notes: svn path=/head/; revision=72187
* Fix memoryleaks with device_get_children().Jeroen Ruigrok van der Werven2001-02-082-0/+3
| | | | | | | Approved by: wpaul Notes: svn path=/head/; revision=72186
* Fix memory leaks with dev_get_children().Warner Losh2001-02-081-0/+3
| | | | | | | Submitted by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> Notes: svn path=/head/; revision=72185
* Fix typos: initalise -> initialise.Jeroen Ruigrok van der Werven2001-02-081-5/+5
| | | | | | | Initalise is not an english word. Notes: svn path=/head/; revision=72180
* - Check if the ccb_infos in the softc is NULL before trying to free it inJohn Baldwin2001-02-082-2/+11
| | | | | | | | | | | adv_free() as the ISA probe routine doesn't malloc() ccb_infos but does call adv_free(). - Release the ISA-only overrun DMA tags, bufs, and maps if the probe fails. Tested by: rwatson Notes: svn path=/head/; revision=72147
* Oops... I knew i shouldn't use arrows in vi. Fix a typo causing errors inSemen Ustimenko2001-02-071-1/+0
| | | | | | | compilation. Notes: svn path=/head/; revision=72144
* back out rev 1.49, looks like i committed it from the wrong tree.Cameron Grant2001-02-071-421/+800
| | | | | | | | | include the changes 1.49 was supposed to have. Noticed by: peter Notes: svn path=/head/; revision=72136
* Add support for SMC9432FTX card, possibly othe fiber optic SMC9432 familySemen Ustimenko2001-02-073-43/+216
| | | | | | | cards will work too. Notes: svn path=/head/; revision=72134
* Add QS6612, AC101 and LXT970 personal drivers and register definitions.Semen Ustimenko2001-02-077-6/+1367
| | | | | | | Obtained from: NetBSD/OpenBSD Notes: svn path=/head/; revision=72132
* Use correct index when counting short errors.Poul-Henning Kamp2001-02-071-1/+1
| | | | Notes: svn path=/head/; revision=72121
* conditionalize "hwptr went backwards" messagesCameron Grant2001-02-071-798/+422
| | | | | | | | modify default buffer size heuristic to not max out at 4k. mpg123 should now behave better under load. Notes: svn path=/head/; revision=72118
* Introduce busspace instead of the good old in/out instructions.Søren Schmidt2001-02-069-253/+312
| | | | | | | Not pretty but it works (I hope)... Notes: svn path=/head/; revision=72106
* Regen.Nick Hibma2001-02-062-2/+17
| | | | Notes: svn path=/head/; revision=72099
* Add a comment about the fact that adding an ID doesn't actually do anything.Nick Hibma2001-02-061-0/+15
| | | | Notes: svn path=/head/; revision=72098
* Damn! that was the wrong patch! get it right this time....Søren Schmidt2001-02-061-1/+1
| | | | Notes: svn path=/head/; revision=72096
* Fix the clone functionality in atapi-cd, it didn't work forSøren Schmidt2001-02-063-6/+17
| | | | | | | | devs other than the first, and allowed to clone a nonexistent device.. Notes: svn path=/head/; revision=72094
* Fix typo: compatability -> compatibility.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | Compatability is not an existing english word. Notes: svn path=/head/; revision=72093