summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Fix races in scstart(). q_to_b() wasn't called at spltty(), so therebde1995-07-112-28/+14
| | | | | | | | | | | | | | were two races: - q_to_b() might unexpectedly return 0 (e.g, after a keyboard signal flushes the output queue and isn't echoed). ansi_put() interprets 0 bytes as 4GB... - more output (e.g. for echoes) might arrive afer q_to_b() returns 0. Then scstart() returns presumably and the new output might not be handled for a long time. Remove unused function scxint(). Fix prototypes (foo() isn't a prototype).
* Speed up the inner loop of ansi_put() by a few percent.bde1995-07-111-2/+10
| | | | | | | syscons' output is now only about 4-5 times slower than I want. It loses a factor of 2 for scrolling output by unnecessarily copying the screen buffer, a factor of 4/3 for dumb OPOST processing, and a factor of 3/2 for clist processing.
* Fix error logging:bde1995-07-051-4/+10
| | | | | - get the timeout countdown right - report everything before turning timeouts off.
* Rewrite:bde1995-07-054-2568/+4554
| | | | | | | | | | | - use pseudo-dma - provide the same features and interface as sio - support multiple boards - fix bugs. Some compile-time configuration constants are set to support higher speeds and Cyclom-16Y's at a 30% relative cost in efficiency. Cyclom-16Y support is untested.
* Protected entire epioctl routine with splimp(). In this case, it is betterdg1995-07-051-1/+6
| | | | | | | | form to do this than it is relying on individual subroutines (the logic in epioctl is itself very minimal). Ideally, unnecessary splimp()'s should now be removed if they exist; I'll leave this for a later date (a complete code review of the driver needs to be done). Fixes a bug I noticed that would show up when ifconfig'ing the interface down.
* Change SCB_LIST_NULL to 0xff from 0x10 to allow for 255 commands. Thisgibbs1995-07-041-7/+8
| | | | | | | | is needed for 3940 support. Have tagged commands look to see if a target is "busy" with a non tagged command before executing. This prevents overlapped tagged and non tagged commands which can happen since request sense commands are not tagged.
* Fight with hanging modems continued:ache1995-06-281-1/+8
| | | | | return EIO after t_timeout expired instead infinite looping in "siotx" in comparam, consuming CPU time.
* Change message "not supported" to "no driver assigned", becausese1995-06-281-2/+2
| | | | | | | people tend to assume their devices won't work if they see this message, though it may indicate that those devices just don't need any PCI driver (e.g. devices that emulate an ISA card, or that have been initialised by the BIOS and need no further care).
* Failure of the consistency checks for BIOS assigned mappings of bussesse1995-06-281-6/+16
| | | | connected via PCI to PCI bridges is considered non fatal for now.
* Fixed bug that was fixed in 1.28.2.1/1.29 a little differently; thedg1995-06-281-4/+5
| | | | | | difference is more or less cosmetic. Submitted by: Matt Thomas
* Reduce timeout frequency from `hz' to 0 if no ports are open or to 1 ifbde1995-06-251-142/+236
| | | | | | | | | | | | | | | | | | | | | no ports are active, provided there are no polled ports and no `LOSESOUTINTS' ports. Do a little more in the interrupt handler instead. This is a little less efficient if there are are many active ports but a little more efficient otherwise. Polled ports are ones with no irq specified (as before). `LOSESOUTINTS' ports are ones with 0x08 set in their config flags. Unless this flag is set, it will now take up to one second to recover from lost output interrupts, if any. Some 8250s and 16450s lose output interrupts. Improve output buffering: copy the clist buffer to 2 linear buffers if necessary and possible instead of to 1. Handle an arbitrary queue of buffers in the interrupt handler. Check for waking up sleepers after copying characters out of the clist buffer instead of before. Delay translation of TIOCM_DTR to MCR_DTR etc. so that the top level routines are more machine independent. Fix bogus device register in unused code.
* Next version, many bugs fixedache1995-06-143-407/+527
|
* Don't convert \n to \r\n in pccnputc(). This is the responsibility ofbde1995-06-141-7/+3
| | | | cnputc().
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-112-5/+5
|
* Remove trailing whitespace.rgrimes1995-05-3032-543/+543
|
* Remove trailing whitespace.rgrimes1995-05-305-26/+26
|
* Increased delay after reset to 10ms. Suggested by several people, the lastdg1995-05-271-2/+2
| | | | | of which was Scott Mace. This fixes a bug where the card would be missed sometimes during the device probe.
* Fixed bugs in multicast address handling (flag was set in wrong register,dg1995-05-261-266/+427
| | | | | | | | | | | etc.). The tulip_start routine was rewritten to use less stack space (I've been having problems with wcarchive overflowing the stack and this should help a little). This version also has preliminary NetBSD support. Rod Grimes helped in testing this version of the driver. Thanks Rod. It's additionally been extensively tested here and on wcarchive. Submitted by: Matt Thomas
* There are two serious bugs in if_de.c. The first should not matterdg1995-05-221-3/+4
| | | | | | | | | | to most users (the wrong length is passed to ether_input). The second is more serious. The multicast hash algorithm uses the wrong (low) bits instead of the right (high) bits. This is only an issue if you use >12 multicast addresses but if you are using IP multicast then it might affect you... Submitted by: Matt Thomas
* Fixed bug in bpf/multicast support that caused multicast packets to getdg1995-05-221-7/+5
| | | | | | | | thrown out if bpfilter support and no BPF listener. (submitted by Bill Fenner) Removed unused variable and changed another from a stack variable to a static - the variable was a rather large array of structs that consumed a lot of stack space. (me)
* Fixed problem with "char" cursor..sos1995-05-211-2/+6
| | | | Submitted by: ache
* Changed read_csr and write_csr to static so that they don't clashdg1995-05-171-2/+2
| | | | | | | with another driver. Reviewed by: Paul Richards Submitted by: Brian Litzinger
* Fixes to the aic7xxx sequencer code and device driver from Justin Gibbs:dg1995-05-171-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) If a target initiated a sync negotiation with us and happened to chose a value above 15, the old code inadvertantly truncated it with an "& 0x0f". If the periferal picked something really bad like 0x32, you'd end up with an offset of 2 which would hang the drive since it didn't expect to ever get something so low. We now do a MIN(maxoffset, given_offset). 2) In the case of Wide cards, we were turning on sync transfers after a sucessfull wide negotiation. Now we leave the offset alone in the per target scratch space (which implies asyncronous transfers since we initialize it that way) until a syncronous negotation occurs. 3) We were advertizing a max offset of 15 instead of 8 for wide devices. 4) If the upper level SCSI code sent down a "SCSI_RESET", it would hang the system because we would end up sending a null command to the sequencer. Now we handle SCSI_RESET correctly by having the sequencer interrupt us when it is about to fill the message buffer so that we can fill it in ourselves. The sequencer will also "simulate" a command complete for these "message only" SCBs so that the kernel driver can finish up properly. The cdplay utility will send a "SCSI_REST" to the cdplayer if you use the reset command. 5) The code that handles SCSIINTs was broken in that if more than one type of error was true at once, we'd do outbs without the card being paused. The else clause after the busfree case was also an accident waiting to happen. I've now turned this into an if, else if, else type of thing, since in most cases when we handle one type of error, it should be okay to ignore the rest (ie if we have a SELTO, who cares if there was a parity error on the transaction?), but the section should really be rewritten after 2.0.5. This fix was the least obtrusive way to patch the problem. 6) Only tag either SDTR or WDTR negotiation on an SCB. The real problem is that I don't account for the case when an SCB that is tagged to do a particular type of negotiation completes or SELTOs (selection timeout) without the negotiation taking place, so the accounting of sdtrpending and wdtrpending gets screwed up. In the wide case, if we tag it to do both wdtr and sdtr, it only performs wdtr (since wdtr must occur first and we spread out the negotiation over two commands) so we always have sdtrpending set for that target and we never do a real SDTR. I fill properly fix the accounting after 2.0.5 goes out the door, but this works (as confirmed by Dan) on wide targets. Other stuff that is also included: 1) Don't do a bzero when recycling SCBs. The only thing that must explicitly be set to zero is the scb control byte which is done in ahc_get_scb. We also need to set the SG_list_pointer and SG_list_count to 0 for commands that do not transfer data. 2) Mask the interrupt type printout for the aic7870 case. The bit we were using to determine interrupt type is only valid for the aic7770. Submitted by: Justin Gibbs
* Changed relase number in snake_saver.c from 2.1 to 2.0.5sos1995-05-161-2/+2
|
* After carefully reading three reference documents, and analyzingdg1995-05-141-4/+4
| | | | | | | | | | | | | | | the 802.3 frames generated by the DC21040 (which does automatic padding of less-than-minimum frames) and the frames generated by the 'ed' driver, I've found that there is indeed a bug in the size of "ETHER_MIN_LEN" as reported by several people, John Hay being the most recent. The driver was actually setting the length to 6+6+2+50 (64 bytes), which when adding in the CRC (which is automatically appended to the frame and not included in the length), the minimum frame is 4 bytes larger than it is supposed to be. All of this is confirmed by tcpdump showing 50 bytes of data for minimum frames from the 'ed' cards and 46 bytes from 'de' cards. This analysis has also revealed that there is garbage in the un-filled in portion at the end of the minimum frames from the 'ed' driver; I don't plan to fix this.
* Only use card's soft-configured irq if no irq was specified in the kerneldg1995-05-121-5/+7
| | | | | config file. This should fix a number of complaints regarding the auto detection behavior.
* RISCom/8 driverache1995-05-123-0/+1682
|
* Fix -Wformat warnings from LINT kernel.rgrimes1995-05-112-4/+4
|
* Fix -Wformat warnings, still need to do something about %b and pointerrgrimes1995-05-092-8/+8
| | | | type args.
* Rewrite the MCD_TRACE macro to be a varargs macro so that the extraneousrgrimes1995-05-091-18/+25
| | | | | | | arguments to printf could be fixed. Correct all but 1 -Wformat warning. Some would have caused garbage to be printed due to missing args!
* Add hook for pstat -tache1995-05-071-1/+3
|
* Restructured the floppy tape probe.joerg1995-05-061-6/+2
| | | | | | | The ``flags 1'' in the fdc line is now only needed for owners of an Insight tape (perhaps there aren't any? Mine is disfunctional). All other probes are safe wrt. to the motor-control line of floppy disk drives. Document the flag in LINT finally.
* Fixed mbuf leak and panic that occurred when packets got too memorydg1995-05-051-99/+313
| | | | | | | | | fragmented. Added support for Cogent em100 boards. Fixed bug that caused BPF to toggle the card to UTP. Various other improvements. Submitted by: Matt Thomas and David Greenman
* Check for 0 before dividing by it. Patch from Paul Traina, modifieddg1995-05-051-2/+10
| | | | slightly by me.
* Kill bogus duplicated code that resulted in an editing screwup of minedg1995-05-041-24/+1
| | | | that happend about 4 months ago.
* bzero the malloced pci_devconf structure. This should fix the problem withdg1995-05-041-1/+2
| | | | several of freefall's recent crashes.
* Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller'sbde1995-04-301-2/+3
| | | | slice pointer and to print the device name in error messages.
* (Sorry about prev. blank message - I realised I needed a change too late).gpalmer1995-04-281-1/+1
| | | | Removed unused var. and correct a printf formatting string.
* *** empty log message ***gpalmer1995-04-281-1/+1
|
* Added nsccons variable for use by pstatsos1995-04-281-1/+2
| | | | Submitted by: ache
* Restructure the arbitration loop to allow for reselections that win out overgibbs1995-04-271-95/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | the adapter's selections. Many fast periferals were getting upset when the sequencer decided to rearbitrate after the device had already won arbitration. This also forced the creation of a list threaded through the SCBs (since we don't have enough space anywhere else) of commands that are awaiting reselection. This list is run down before any new transactions from the input queue are allowed. The list is appened to whenever we begin a selection (simple case since the selecting device is always at the head) and by the kernel driver whenever a request sense occurs. In the common case, the list is only one element long, but when a reselection wins out over a selection and that reselection generates a request sense, the outstanding selection required for the retreval of the sense code grows the list. On machines with many targets, this might cause the list to grow large, so this solution, which will allow up to the maximum number of I/O requests capible of the card elements in the list, was chosen. The list manipulation is trivial and adds three sequencer instructions of overhead to the selection phase. This fixes the "target busy" errors from micropolis drives and the bursty I/O problem when performing I/O between a Quantum Grand Prix and any other device. I anticipate that this will correct many of the problems that have been reported with this driver. Reviewed by: Wcarchive and David Greenman
* Added mark_all() call so that screen is proberly updatedsos1995-04-251-1/+2
| | | | when scroll-lock history is disengaged.
* Added `fe' device drive r for Fujitsu MB86960A family.wollman1995-04-233-0/+3150
| | | | Submitted by: M.S. <seki@sysrap.cs.fujitsu.co.jp>
* Move declarations of console functions to cons.h (they should bebde1995-04-231-12/+5
| | | | | | config(8)ed). Update other misplaced prototypes.
* Correct the type of the `c' arg to pccnputc().bde1995-04-232-11/+10
| | | | | Move declarations of console functions to cons.h so that they can't be defined inconsistently in several places. They should be config(8)ed.
* files for the eisa specific autoconfiguration..julian1995-04-232-0/+242
| | | | | | | | | don't expect this to work yet.. but at least they're here.. (hey this cvs stuff is fun!) activate with a line exactly like the isa line in the config file, (but specifying eisa :) patches to come..
* Reviewed by: no-one yet, but non-intrusivejulian1995-04-201-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: julian@tfs.com Obtained from: written from scratch slight changes to make space for devfs.. (also conditional test code in i386/isa/fd.c) =================================================================== RCS file: /home/ncvs/src/sys/sys/malloc.h,v retrieving revision 1.7 diff -r1.7 malloc.h 113a114,117 > #define M_DEVFSMNT 62 /* DEVFS mount structure */ > #define M_DEVFSBACK 63 /* DEVFS Back node */ > #define M_DEVFSFRONT 64 /* DEVFS Front node */ > #define M_DEVFSNODE 65 /* DEVFS node */ 184c188,192 < NULL, NULL, NULL, NULL, NULL, \ --- > "DEVFS mount", /* 62 M_DEVFSMNT */ \ > "DEVFS back", /* 63 M_DEVFSBACK */ \ > "DEVFS front", /* 64 M_DEVFSFRONT */ \ > "DEVFS node", /* 65 M_DEVFSNODE */ \ > NULL, \ Index: sys/mount.h =================================================================== RCS file: /home/ncvs/src/sys/sys/mount.h,v retrieving revision 1.16 diff -r1.16 mount.h 100c100,101 < #define MOUNT_MAXTYPE 15 --- > #define MOUNT_DEVFS 16 /* existing device Filesystem */ > #define MOUNT_MAXTYPE 16 118a120 > "devfs", /* 15 MOUNT_DEVFS */ \ Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.19 diff -r1.19 vnode.h 61c61 < VT_UNION, VT_MSDOSFS --- > VT_UNION, VT_MSDOSFS, VT_DEVFS
* Escentially a rewrite by John Dyson. This is disgusting, and John agrees,dg1995-04-191-164/+127
| | | | | but the whole thing is, so what the hell. :-) This version is expected to work.
* Matt says that no pre-2.3 pass boards were supposed to ship, but I certainlyjkh1995-04-181-3/+3
| | | | | | | got a 2.2 version DC21040 chip in my SMC ethernet card! He suggests bumping the check all the way down to 2.0 since it's pre-2.0 we're actually guarding against. Submitted by: Matt Thomas <matt@lkg.dec.com>
* Changed minimum supported rev of DC21040 to pass 2.2.dg1995-04-171-3/+3
|
OpenPOWER on IntegriCloud