aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Fixed the problem where the floppy has incorrectly failed probingJoerg Wunsch1994-09-171-17/+34
| | | | | | | | | | | | | | when the drive had been left on a cylinder > 67 after kernel boot. The most common case for this is booting a kernel that is located on the inner cylinders of a floppy. Also removed all occurences of spinwait(), replaced by DELAY. Nuked a return line saying nothing, this might make Bruce happy 8^) Submitted by: partially by Bruce Evans Notes: svn path=/head/; revision=2841
* Updated driver to the 1.1.5 version:David Greenman1994-09-173-308/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 1994/05/22 12:35:38; author: joerg; state: Exp; lines: +6 -6 First round of floppy changes. Try making `fd' more robust. New features: . ioctl command for setting the drive type (density etc.); restricted to the super-user . ioctl for getting/seting `drive options'; currently only option is FDOPT_NORETRY: inhibit the usual retries; used when verifying a newly formatted track Fixes: . function prototypes . made all internal functions `static' . cleaned up & corrected .h files . restructured, to make the chaotic function sequence more rational . compiled with -Wall, and cleared all warnings . introduced a mirror for the (write-only) `digital output register', to avoid the current kludge . device probing completed by seeking/recalibrating, and looking for track 0 being found . holding the controller down in reset state while it is idle (and thus saving allot of headaches) . make requests fail that are not a multiple of the (physical) sector size . removed the fixed physical sector size (512 bytes), allowing for any size the controller could handle (128/256/512/1024 bytes) . replaced some silly messages . fixed the TRACE* macro usage, debugging reports should be complete now again (debugging output is HUGE! though) . removed fd_timeout for SEEK command; seeks are always reported by the controller to succeed, since the `success' only refers to the controller's idea of success - there is no hardware line to tell about the seek end (other than the `track 0' line) . catch SENSEI's that report about a `terminated due to READY changed' status - could happen after a controller reset . converted ``hz / <something>'' divide operations to divisors that are powers of two, so gcc can optimize them into shifts . write/format operations are checked against a write-protected medium now *prior* starting the operation . error reports of `invalid command' and `wrong cylinder' will cause shortcuts in the retrier() now . fixed a bug in the retrier() causing bogus block numbers to be reported . fdformat() does care for errors now Known Bugs: . no attempts have been made (yet) to improve the performance . sometimes, bogus ``seek/recalib failed'' messages are logged; this is still a bug in the driver, but it's not harmful since it's usually caught by the retrier() Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=2838
* Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included fromDavid Greenman1994-09-162-6/+2
| | | | | | | | systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some related code. Notes: svn path=/head/; revision=2826
* Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + <se>Stefan Eßer1994-09-161-126/+131
| | | | | | | | | Improved bus probing, symbolic names for registers.. Chip set parameters get dumped for intel PCI chip sets (82424+82434 only, for now). Notes: svn path=/head/; revision=2815
* Added support for many more videomodes, including graphic modes up tilSøren Schmidt1994-09-151-189/+249
| | | | | | | | | | | | | | 320x200 256col VGA. This is nessesary for the iBCS stuff to work right. (And we get the benefit of more video modes). Uses the videocard BIOS to optain mode tables. Added a "green" saver, switches off the syncs for "green" monitors. Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=2783
* Increase transfer speed by waiting much less than 10ms after requestAndrey A. Chernov1994-09-141-2/+11
| | | | | | | Submitted by: stark@sbstark.cs.sunysb.edu & slightly modifyed by me Notes: svn path=/head/; revision=2762
* Added a bit of missing functionality to make this work correctly on aGarrett Wollman1994-09-141-70/+92
| | | | | | | | | | | | | | | | | wider variety of systems. Include the deivers from pci_intel.c in pci_config.c (I hope this is what was intended; my system works ok). Use pmap_mapdev(). Automatically map any large linear frame buffers or whatnot in VGA-style devices which ordinarily would not have their own drivers, and don't call not_supported() for them. (This shuts up complaints about my Matrox card.) Include the beginnings of what could eventually become dynamically-loadable PCI devices. Allow for the possibility of PCI devices simply providing a PCI veneer over an existing ISA device, and shut up about them, too. Make autoconfiguration text conform more to the style of other supported buses. Notes: svn path=/head/; revision=2753
* Digicom Systems Inc, makes "softmodems". What this means is simply thatPoul-Henning Kamp1994-09-131-2/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | you download the microcode to the DSP everytime you power on your system. They provide a dos-program to do so, but no other support. This commit adds code to the sio-driver, which implement an ioctl, which will down-load the micro-code. To get this functionality, you must define DSI_SOFT_MODEM. The program to actually employ the ioctl is not included, but the entire source looks like this: #include <sys/ioctl.h> #include <stdio.h> main() { unsigned char buffer[100000]; int i; read(0,buffer,100000); if((i = ioctl(1,TIOCDSIMICROCODE,buffer)) < 0) perror("ioctl"); return i; } And you use it like this: smload < data144b.dsi > /dev/ttyid3 You need to copy the *.DSI files from the dos-media provide with your modem. You can see what is downloaded by issuing the ATI3 command to the modem. DSI's scheme for what code you can run on your modem isn't violated by this. Poul-Henning Kamp phk@freefall.cdrom.com Notes: svn path=/head/; revision=2704
* Removed MULTICAST ifdef's; it's no longer optional. Cleaned up code aDavid Greenman1994-09-071-196/+96
| | | | | | | little. Notes: svn path=/head/; revision=2534
* unifdef -DMULTICAST, since multicast support is always enabled in 4.4.Garrett Wollman1994-09-071-20/+1
| | | | Notes: svn path=/head/; revision=2533
* Reviewed by: Stefan Esser <se>Stefan Eßer1994-09-061-2/+2
| | | | | | | | Submitted by: Changed "bp->av_forw" into "bp->b_actf" to make it compile ... Notes: svn path=/head/; revision=2526
* Reviewed by:Andreas Schulz1994-09-051-4/+68
| | | | | | | | | | | Add initialization to the if_ie driver for the Micom Interlan NI5210 card. This is a very old 82586 based card with only 8Kb or 16Kb on board memory. Also only 8-bit wide instead of 16-bit like the AT& or 3COM card. Warning: this thing is only tested so far that it detects all bits correctly but is not yet on an ethernet. Will do that tomorrow. Notes: svn path=/head/; revision=2518
* Reviewed by:Andreas Schulz1994-09-032-77/+247
| | | | | | | | | | | | Submitted by: Update the if_ep driver for the 3C579 and bring over some of the changes from the netbsd driver. This is not complete: the detection of the irq in the eisa does not work and sometimes the reset for the 3C509 in ISA in an EISA bus system don't work ( Need a hard reset to be found again == reset knob). Notes: svn path=/head/; revision=2478
* Newly implemented ioctls list:Andrey A. Chernov1994-09-032-245/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DIOCGDINFO, DIOCGPART, DIOCWDINFO, DIOCSDINFO, CDIOCPLAYMSF, CDIOCRESET, CDIOCEJECT. CDIOCPLAYBLOCKS removed (old implementation completely wrong and I don't know how to implement it correctly). All routines now detects media change correctly. DELAY_GETREPLAY increased for long time access from first track to last. mcd_waitrdy() now use MIN_DELAY=15 as minimal delay which independs of machine speed. mcd_doread() now uses real status (old code uses obsoleted soft copy of it). clear XBSY on error in mcd_doread() mcd_statrt(): add missing splx(s), cause dead hang with unmatched slpbio() optimize mcd_doread(), don't set CD mode each time, keep soft copy of mode. call getdisklabel() _after_ mcdsize() for proper sizes mcdopen(): old code forget to set MCDREADRAW in flags when open RAW partition, doread check it for setting RAW CD mode. Do nothing on stray interrupt (which sometimes occurse, because driver read data block too slow, DOS driver use 'insb' here). Old stray code cause timeouts. Read toc entries code rewritten to return many requested entries (as supposed) instead of one entry with incorrect structure. CMDREAD2 requests covered with disable_intr()/enable_intr() (from DOS driver) Read junk code added after read block code in doread (from DOS driver) mcd_read_toc() code fixed to read all needed entries, old code cause some audio tracks is not played. mcd_playtracks() code fixed to proper check valid track range. New binary read modes implemented (from DOS driver). Notes: svn path=/head/; revision=2477
* Reviewed by:Andreas Schulz1994-09-021-1/+3
| | | | | | | | | Submitted by: Put the printf("can't map 3c507 ram.. into an ifdef DEBUG. This will confuse only normal users and the ie0 found/not found is sufficient. Notes: svn path=/head/; revision=2467
* Reviewed by:Andreas Schulz1994-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Submitted by: 1) if_ie.c: Changed a printf and put a space in it. Formerly the "<3C507>" confused the syslog. He tried to see that as the priority to log that message. 2) isa_device.h: Changed the iobase variable from short to u_short. EISA Adresses can go up to 0xf000 and the sign extension doesn't look good in the probe output. Example: ep1 at 0xffff8000-0xffff8000f is not good :-), i like more a ep1 at 0x8000-0x8000f. 3) isa.c: Changed a string constant from "probe" to "prob", it gets later already an "ed" tagged on the end. Notes: svn path=/head/; revision=2466
* Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + Stefan Esser <se>Stefan Eßer1994-09-011-0/+598
| | | | | | | Directory for PCI autoconfigure and device driver code. Notes: svn path=/cvs2svn/branches/WST_SE/; revision=2432
* Use RAW_PART=2 to trick diskerrAndrey A. Chernov1994-08-291-2/+4
| | | | Notes: svn path=/head/; revision=2397
* Raw partition is 2 nowAndrey A. Chernov1994-08-291-2/+2
| | | | Notes: svn path=/head/; revision=2395
* Bruce was right, stupid device returns non-busy state too early,Andrey A. Chernov1994-08-281-8/+6
| | | | | | | add only one DELAY(10) after inb(non_busy) now Notes: svn path=/head/; revision=2377
* 1) Changed ddb into a option rather than a pseudo-device (use options DDBDavid Greenman1994-08-271-6/+2
| | | | | | | | | | | | | in your kernel config now). 2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its own file. 3) Added \r handing in db_printf. 4) Added missing memory usage stats to statclock(). 5) Added dummy function to pseudo_set so it will be emitted if there are no other pseudo declarations. Notes: svn path=/head/; revision=2320
* Continue previous fix:Andrey A. Chernov1994-08-271-3/+5
| | | | | | | Add MIN_DELAY definition instead of hard-coded 10 Notes: svn path=/head/; revision=2314
* 1) Raw partition number was incorrectly 0, changed to 3Andrey A. Chernov1994-08-271-5/+22
| | | | | | | | | 2) DELAY(1) does nothing, it affects audio playing f.e: driver can't play second half of disk, changed to DELAY(10) 3) Debugging messages #ifdef DEBUGed Notes: svn path=/head/; revision=2310
* Add Charles Martin Hannum to copyright notice so he can stop whining andGarrett Wollman1994-08-251-101/+109
| | | | | | | | | find something useful to do other than taking credit for other people's work. Also make the 3C507 bits match the indentation style of the rest of the code. Notes: svn path=/head/; revision=2281
* Updated to final 1.1.5 version (revision 1.56).Bruce Evans1994-08-251-471/+508
| | | | | | | | | | | | | | | | | | | Merged changes from 2.0 version (revisions 1.46-1.50) by hand. Finished conversion to clists: removed flush of tty output buffer in comflush() (most writes were truncated to 256 bytes) and restored bypass of ttyinput() in siopoll(). Finished conversion to 2.0 types - more void *'s, less caddr_t's, less casts, no Dev_t's. Only these things are seriously broken now compared with 1.1.5: waiting for output complete is impossible so ttywait() can deadlock; sioclose() isn't called enough so sioopen() sometimes returns EBUSY unnecessarily; input flow control is not implemented. Notes: svn path=/head/; revision=2272
* Reviewed by:Andreas Schulz1994-08-242-3/+154
| | | | | | | | | | | | Submitted by: Add the 3com 3C507 card to the if_ie.c driver. The files elink.c and elink.h are helding routines that are shared between the 3C507 and the 3C509/3C579. if_ie507.h are constant declarations unique to the 3C507. The code is based on the NetBSD driver if_ie.c donated to NetBSD by Rafal Boni and then modified by Charles Hannum. Notes: svn path=/head/; revision=2268
* Ran ft.c through ident.Paul Richards1994-08-232-23/+22
| | | | | | | | | | | | | | | | Added a missing #ifdef INET wrapper in lpt.c Main change: Removed the timeout_func_t casts from timeout calls and correctly defined the timeout routines to conform to the new format. lpt.c doesn't have this change. Reviewed by: Submitted by: Notes: svn path=/head/; revision=2234
* Fixed minor typo in diagnostic message.David Greenman1994-08-221-2/+2
| | | | Notes: svn path=/head/; revision=2200
* 1) cleaned up after Garrett - fixed more redundant declarations, changedDavid Greenman1994-08-201-4/+1
| | | | | | | | | | | use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers. 2) fix a bug in the portalfs that was uncovered by better prototyping - specifically, the time must be converted from timeval to timespec before storing in va_atime. 3) fixed/added some miscellaneous prototypes Notes: svn path=/head/; revision=2142
* Fix up some sloppy coding practices:Garrett Wollman1994-08-181-3/+1
| | | | | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. Notes: svn path=/head/; revision=2112
* Bruce Evans' dynamic interrupt support.David Greenman1994-08-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /usr/src/sys/i386/isa/clock.c: o Garrett's statclock changes. o Wire xxxintr, not Vclk. o Wire using register_intr(), not setidt(). /usr/src/sys/i386/isa/icu.s: o Garrett's statclock changes. o Removed unused variable high_imask. o Fake int 8 for rtc as well as int 0 for clk. Required for kernel profiling with statclock, harmless otherwise. /usr/src/sys/i386/isa/isa.c: o Allow isdp->id_irq and other things in *isdp to be changed by probes. Changing interrupts later requires direct calls to register_intr() and unregister_intr() and more care. ALLOW_CONFLICT_* is brought over from 1.1.5, except ALLOW_CONFLICT_IRQ is not supported. IRQ conflict checking is delayed until after probing so that drivers can change the IRQ to a free one; real conflicts require more cooperation between drivers to handle. o Too many details to list. o This file requires splitting and a lot more work. /usr/src/sys/i386/isa/isa_device.h: o Declare more things more completely. /usr/src/sys/i386/isa/sio.c: o Prepare to register interrupt handlers as fast. /usr/src/sys/i386/isa/vector.s: o Generate entry code for 16 fast interrupt handlers and 16 normal interrupt handlers. Changed some constants to variables: # $unit is now intr_unit[intr]. Type is int. Someday it should be a cookie suitable for the handler (e.g., a struct com_s for sio). # $handler is now intr_handler[intr]. # intrcnt_actv[id_num] is now *intr_countp[intr]. The indirection is required to get a contiguous range of counters for vmstat and so that the drivers depend more in the driver than on the interrupt number (drivers could take turns using an interrupt and the counts would remain correct). There is a separate counter for each device and for each stray interrupt. In 1.1.5, stray interrupt 7 clobbers the count for device 7 or something worse if there is no device 7 :-(. # mask is now intr_mask[intr] (was already indirect). o Entry points are now _XintrI and _XfastintrI (I = intr = 0-15), not _VdevU (U = unit). o Removed BUILD_VECTORS stuff. There's a trace of it left for the string table for vmstat but config now generates the string in one piece because nothing more is required. o Removed old handling of stray interrupts and older comments about it. Submitted by: Bruce Evans Notes: svn path=/head/; revision=2103
* Oops, changed order of include lines...Søren Schmidt1994-08-171-5/+5
| | | | | | | | Reviewed by: Submitted by: Notes: svn path=/head/; revision=2092
* Updated to latest 1.1.5.1+ versionSøren Schmidt1994-08-171-386/+432
| | | | | | | | Reviewed by: Submitted by: Notes: svn path=/head/; revision=2087
* Add option KBD_RESET_FAIL_OK so that GCC 2.6 doesn't break myGarrett Wollman1994-08-151-1/+4
| | | | | | | console. Notes: svn path=/head/; revision=2078
* Change all #includes to follow the current Berkeley style. Some of theseGarrett Wollman1994-08-139-143/+144
| | | | | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make Notes: svn path=/head/; revision=2056
* Removed some unnecessary code that sets the link layer address. This shouldDavid Greenman1994-08-121-29/+1
| | | | | | | | be removed from the other drivers, too, as it is already done at a higher level in the kernel. Notes: svn path=/head/; revision=2037
* Add missing ifr variable declaration that I forgot when adding MTUDavid Greenman1994-08-121-3/+4
| | | | | | | ioctl support. Notes: svn path=/head/; revision=2036
* Fix a compilation-stopping typo; whoops, David - more sleep! :-)Jordan K. Hubbard1994-08-081-2/+2
| | | | | | | Submitted by: jkh Notes: svn path=/head/; revision=1954
* Added support for SIOCSIFMTU.David Greenman1994-08-082-2/+25
| | | | Notes: svn path=/head/; revision=1946
* Added ioctl support for SIOCSIFMTU.David Greenman1994-08-081-3/+15
| | | | Notes: svn path=/head/; revision=1944
* Updated to include improvements from FreeBSD 1.1.5. Fixed brokenessDavid Greenman1994-08-042-637/+897
| | | | | | | with multicast support and BPF. Notes: svn path=/head/; revision=1831
* Added $Id$David Greenman1994-08-025-5/+16
| | | | Notes: svn path=/head/; revision=1817
* Fixed a bug that was introduced in the conversion from 1.1.5 to 2.0.David Greenman1994-08-011-6/+14
| | | | Notes: svn path=/head/; revision=1808
* Cast arguments to timeout() to quite compiler warnings. Should weRodney W. Grimes1994-05-271-5/+5
| | | | | | | | | | | | | change all of these to be timeout_funt_t and remove the casts and typedef? Remove secound argument (uban) from ifp->if_reset routines since it is now obsolete. Reviewed by: David Greenman Notes: svn path=/head/; revision=1572
* Since we have removed com.c and renamed comreg.h to sioreg.h I need toRodney W. Grimes1994-05-261-1/+1
| | | | | | | fix sio.c to #include sioreg.h. Notes: svn path=/head/; revision=1568
* Fix some references to MIN() and MAX() that have been replaced by min() andRodney W. Grimes1994-05-262-2/+2
| | | | | | | max(). Notes: svn path=/head/; revision=1567
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-258-103/+90
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* Added the bugfixes from the current NetBSD driver. Put in some parts ofAndreas Schulz1994-05-021-64/+98
| | | | | | | the 3c579 support, but not the init/probe part. Notes: svn path=/head/; revision=1444
* Change old alias b_cylin to b_residGary Clark II1994-04-301-2/+2
| | | | Notes: svn path=/head/; revision=1437
* Updated swedish keymap.Søren Schmidt1994-04-261-18/+18
| | | | Notes: svn path=/head/; revision=1417