Commit Graph

412 Commits

Author SHA1 Message Date
bouyer f6f9f8a965 Change DIOCEJECT to do what's needed to eject a device before the eject
command (unlock for sd and cd) if no other partitions are open, return
EBUSY otherwise. DIOCEJECT will have the old semantic if its argument is not
0. The old ioctl has been renamed to ODIOCEJECT for binary compatibility.
1999-02-08 16:33:16 +00:00
mycroft be1af660c0 Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
1999-02-03 20:25:05 +00:00
fair 14ec3b84b7 Bracket calls to Debugger() with #ifdef DDB (won't compile otherwise;
the prototype isn't there without DDB).
1999-02-02 04:57:11 +00:00
fair 7a738d840b Make gcc happy by changing %x to %lx hiding in a DEBUG. 1998-12-23 04:53:44 +00:00
kleink 072888839b Printf format warning cleanup. 1998-12-13 18:00:10 +00:00
kleink 1bf1bbfc56 xdc_piodriver: sync function definition with declaration; also eliminates
the use of a char as an array subscript.
1998-12-13 17:57:19 +00:00
thorpej 5f0577babc Adapt to the new scsipi_adapter interface. 1998-11-19 21:43:00 +00:00
thorpej 29d472f53d Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 00:28:28 +00:00
thorpej 8253135408 Update for bcopy/bzero -> memcpy/memset changes. 1998-10-01 20:05:09 +00:00
pk 7c5210bcab Assign my copyrights to TNF. 1998-09-05 15:20:47 +00:00
mycroft 6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +00:00
gwr 4eeeee6a7c Print a complaint when no children were specified
in the config file.  Better than a link error...
1998-07-23 23:48:33 +00:00
drochner 49bb9d8214 adapt to LANCE driver split 1998-07-21 17:36:01 +00:00
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
mrg 53559837db <dev/sun/disklabel.h> not <dev/sun/sun_disklabel.h> 1998-06-30 04:35:37 +00:00
jeremy 665cf08eec Changed to include sun_disklabel.h from its new location in dev/sun. 1998-06-24 21:36:05 +00:00
gwr 6e85156429 Simplify ifdefs in cg4b_ldcmap() 1998-06-09 16:10:25 +00:00
gwr 3634eb6176 Make this work on the 3/80, which has the Brooktree DAC
wired high-byte-only like the sparc. (yuck!)
1998-06-09 14:38:59 +00:00
gwr ba4cb4e29d Kill the printf: enabling zs interrupts 1998-06-08 20:34:43 +00:00
gwr 24903a0744 Deal with missing P4 register on old Sun3/60 machines. 1998-03-21 21:38:24 +00:00
gwr d342d51752 Fix comments 1998-03-08 18:56:08 +00:00
gwr 4242e2ab10 No need for default base addresses here anymore. 1998-03-08 18:54:23 +00:00
gwr 5242b3b02a Need to use an offset to map the colormap H/W now that the
config address is that of the P4 register.  Oops.
1998-03-08 18:53:17 +00:00
gwr 23b16936e8 Fix build with NFB=0 1998-02-26 16:01:18 +00:00
gwr 22c20779d0 Rewrite the match/attch routines to use the P4 register
(when it exists).  Also get the size right; other fixes.
1998-02-08 05:22:08 +00:00
gwr 0378cb2ff6 Define the CG4B_OFF_* values to be relative to the location of
the P4 register so the probe routine finds the P4 at off=0.
1998-02-08 05:20:08 +00:00
gwr 99fd045ec0 Add fb_eeprom_setsize() for setting the FB size based on the EEPROM
value (to be used only if unit=0).  Add P4 helper functions:
fb_pfour_id, fb_pfour_setsize, fb_pfour_{get,set}_video
1998-02-08 05:15:35 +00:00
gwr ab8340e9da cosmetic 1998-02-08 05:13:17 +00:00
gwr eff2e270bd Merge arch/sun3x into arch/sun3 1998-02-05 04:56:24 +00:00
gwr faf4390c38 Save the "bustype" from our attach args in the controller "softc"
and use that instead of hard-coding BUS_VME32 everywhere.
(The Sun3X needs a more specific bustype value.)
1998-01-26 21:03:43 +00:00
gwr 3ba1e07ef5 Simplify the colormap and blanking stuff a little. 1998-01-26 20:53:17 +00:00
gwr 119b962a9d Add: extern struct cfdriver cgtwo_cd; 1998-01-23 00:01:28 +00:00
gwr ccf791aa2e Add: extern struct cfdriver fdc_cd; 1998-01-22 21:26:25 +00:00
thorpej 2565ff444a Update for config changes. 1998-01-12 20:35:04 +00:00
thorpej 1adb4489a6 Update for changes to config. 1998-01-12 20:23:38 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
gwr e0170ea83c Remove local definition of DEBUG (left there by accident). 1997-12-09 22:29:01 +00:00
gwr 1e1b53cba9 The ie_reset function needs to turn off loopback mode.
(Remember the TDR complaint: short X clocks away?
that was because the chip was in looback mode! 8)
1997-12-09 22:25:42 +00:00
gwr 2e40be26b8 The ie_reset function needs to turn off loopback mode.
(Remember the TDR complaint: short X clocks away?
that was because the chip was in looback mode! 8)
1997-12-08 21:49:50 +00:00
gwr ec9abe23be Several fixes. This version actually works! 1997-12-08 19:22:52 +00:00
gwr 1a340a5921 Fix missing newline in attach 1997-12-08 19:19:25 +00:00
gwr c497f2ca2b Define the interrupt vector registers as 16-bit fields as
shown in the documentation.  (Thanks to Michael Thompson)
1997-12-08 19:17:12 +00:00
gwr 7c95ede823 Kill some noise from -DDEBUG 1997-12-02 19:48:45 +00:00
gwr 5eda2e37e8 Oops...(pasto) 1997-11-08 05:42:07 +00:00
gwr 924c57cce0 Disable DMA and interrupts for now (via se_options). 1997-11-07 22:11:19 +00:00
gwr 7a33a8aaef Silence collisions 1997-11-05 00:02:51 +00:00
mycroft ec5fd4954e Set rr0_dcd.
Don't set DCD_IE and CTS_IE here; let the MI code do it.
Handle MDMBUF.
1997-11-02 08:05:06 +00:00
gwr 38d61d7805 Left DEBUG there by accident. Remove it 1997-10-28 21:12:58 +00:00
gwr 923a3fcbff Quiet down those "interrupt stuck?" messages. 1997-10-28 21:10:07 +00:00
gwr 5770fa53f1 I had the memory map wrong for the SCSI/Ethernet board.
Fixes from Michael Thompson.
1997-10-25 18:20:09 +00:00
gwr 1182affa8f I had the memory map wrong for the SCSI/Ethernet board.
Fixes from Michael Thompson.
1997-10-25 18:04:20 +00:00
gwr 2476c3a858 Fix a warning 1997-10-21 22:14:08 +00:00
gwr f246430dba Nuke same-unit hack in match. 1997-10-17 21:49:07 +00:00
gwr 1ea958fad8 Move initialization code from xxattach to xx_init and call that
from both xxattach and xxopen instead of calling xxattach from
xxopen with faked up autoconfig args.  Fix warnings.
1997-10-17 03:47:52 +00:00
gwr f14029fcd6 Clean up the match function. 1997-10-17 03:44:49 +00:00
gwr 703ed32e6c Clean up cg2match() 1997-10-17 03:43:56 +00:00
gwr 98eb63d8f8 Add support for the Sun3/E "se" (Ethernet/SCSI) board.
Compiles, but NOT YET TESTED.
1997-10-17 03:39:44 +00:00
gwr 81f2d0b179 Move si_reset_adapter() from si.c into the bus-specific modules.
Support the Sun3/470 (sun3x).  Adapt to the new DVMA interface.
Set the si_xxx_options in the config file (easier for users).
1997-10-17 03:33:34 +00:00
gwr 5a1f692161 Sync. with the sun3x (mostly cosmetic changes). 1997-10-17 03:25:05 +00:00
gwr 38b2ba3e3f typo 1997-10-07 20:05:00 +00:00
gwr c9d8d6ae1d Use sizeof(struct ieob) instead of a sun3-specific macro,
so this driver will work on the sun3x as well.  (Works!)
1997-10-07 18:17:19 +00:00
gwr b298a0b98c fix warnings 1997-10-07 17:56:30 +00:00
gwr 076ab3f536 Tweak the console support a little (more like the sparc version). 1997-10-06 21:04:21 +00:00
gwr 210e726aba Use vm_offset_t to represent control space addresses, because
they are more like physical addresses in that you can not just
dereference a pointer to access the space.  (Also, if you use a
pointer type for such things, gdb will _try_ to deference it.)
1997-10-06 19:58:01 +00:00
gwr ede5144deb read regs in the right order 1997-10-05 21:00:12 +00:00
gwr 39bf0bf971 normalize include order 1997-10-05 20:59:02 +00:00
thorpej 3b4ad2b60e Copyright assigned to The NetBSD Foundation. 1997-10-05 18:15:51 +00:00
gwr 0ec1cda62f Move the call to cninit() up a level (easier to find). 1997-10-04 19:46:17 +00:00
bouyer 6f3bab1f59 Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
1997-08-27 11:22:52 +00:00
fair 7a06252f07 %x -> 0x%x, fixes for PR#3757 1997-07-29 06:43:51 +00:00
jtk 9388f271a9 use locator defines in "locators.h" to index cf_loc[] 1997-07-17 02:12:50 +00:00
jeremy 63c23f2337 Add reference to DMA selection variable used in dev/ic/ncr53c9x.c and sample
code to enable it.  Currently commented out.
1997-06-27 02:07:32 +00:00
jeremy 335b7a2d00 Duplicate changes recently made to the SPARC version of this file:
Do not print warnings if selection of a target via DMA was interrupted
by another target.
1997-06-26 02:47:09 +00:00
thorpej cf016f61f4 foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
1997-06-24 00:56:28 +00:00
pk f9d3344f9c xysize(): only call xyopen()/xyclose() if not already open, per the
current `openmask'.
1997-06-18 20:47:00 +00:00
pk 4269e0eab1 xdsize(): only call xdopen()/xdclose() if not already open, per the
current `openmask'.
1997-06-18 20:45:03 +00:00
jeremy 4502541573 When turning off the drive motor, de-select the drive so the busy light
extinguishes.
1997-05-30 03:23:11 +00:00
jeremy fc60f1979e Prevent RAM disk hooks from compiling until sun3 md_root.c can support
ram disk images that are read in from the outside.
Sync with some old local changes.
1997-05-24 00:09:49 +00:00
gwr 589bdf49d5 si_intr: if our CSR indicates an interrupt, return 1. 1997-04-28 22:10:41 +00:00
gwr df35245ac0 Fix a bug where OBIO locators were not presented to the children.
Rename obio_alloc to obio_mapin; add comments, etc.  (like sun3x)
1997-04-28 22:02:43 +00:00
gwr 388bf0e0e0 Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
1997-04-28 21:59:19 +00:00
gwr a5efc65699 Sync. up with the sun3x version. 1997-04-28 21:55:59 +00:00
gwr 479d3fa66d No longer needs an early init call (just normal autoconfig). 1997-04-28 21:51:49 +00:00
gwr e2ca51d2a1 Fixed OBIO locators bug, so this can do the normal thing now.
Also improved handling of spurious interrupts, and sync up with
the sparc version.
1997-04-25 18:55:05 +00:00
jeremy fa9f5b2448 Constants for the p4 register. 1997-04-09 04:50:43 +00:00
jeremy 3c962bb544 First working version. 1997-04-09 04:49:09 +00:00
gwr c3f299a527 Now using dev/ic/ncr53c9x.c 1997-03-20 16:01:36 +00:00
gwr 9f13c3afe5 Read the EEPROM once at attach time, then do user I/O on the copy.
Make /dev/eeprom support normal "read to EOF" behaviour.
Removed ee_console, ee_get_byte (dead code).
1997-03-18 23:31:59 +00:00
thorpej 1d987a161b #include <net/if_media.h> 1997-03-17 03:17:34 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
gwr 4756c63625 Call isr_soft_request() at most once per zshard interrupt.
In the softintr, raise to spltty before calling tty code.
1997-03-11 21:54:35 +00:00
gwr d0a45ab470 Use the macros sc_if, sc_addr to avoid lots of references to sc_arpcom. 1997-03-10 21:45:01 +00:00
gwr 403bdb83fa Add xxc_print functions to pass to config_found() instead of NULL.
(Thanks to Chris Demetriou suggesting the improvement.)
1997-02-28 21:23:06 +00:00
gwr 1354ca2916 Get rid of some printf noise. 1997-02-28 17:17:22 +00:00
gwr 07b4e45308 Allow per-target control over disconnect/reselect. 1997-02-26 22:26:00 +00:00
gwr ae70fb71ec No need for dma_cd, so move it into the #if 0 section too. 1997-02-24 15:02:23 +00:00
jeremy ad9700fa62 Initial import from SPARC port. 1997-02-24 01:45:13 +00:00
gwr 7e74608bf9 Get the screen size right on the 3/260 (Fixes PR#2402) 1997-02-19 00:22:40 +00:00
gwr 443faad4e1 Reorganize/simplify the way the memory layout is done.
Update to the latest sys/dev/isa/if_ie.c (new ieget).
1997-02-13 20:48:36 +00:00
gwr 5997a69a3e Tune MXFRAMES and MXFRAMES down a little.
Reorganize the softc for convenience in ddb.
1997-02-13 20:43:18 +00:00
gwr 6a83772a4e Replace caddr_t with u_int in device structs.
Reduce MAXMCAST by a few to be safe.
1997-02-13 20:40:11 +00:00
gwr a4b09086fe Actually works now! 1997-02-12 01:07:56 +00:00
gwr f55c7652b7 Export zs_get_chan_addr() for zs_kgdb.c
Print the "console on ..." in cninit(), and
avoid reference to kbd/kd drivers if NKBD==0
1997-02-10 23:29:52 +00:00
gwr 196f91101a Make some more things static, and cosmetic stuff. 1997-02-10 23:26:21 +00:00
gwr 9f9e8281e0 Add zs_get_chan_addr(), zs_kgdb_init() 1997-02-10 23:24:18 +00:00
gwr a5b114c665 Forgot to initialize cn->cn_dev, cn->cn_pri 1997-02-10 19:11:12 +00:00
gwr d9267b93fd Forgot to initialize cs->cs_rr0_dcd and fiends in attach. 1997-01-31 00:07:06 +00:00
gwr 46cb437677 Nuke sunmon.h, add machdep.h 1997-01-27 21:57:44 +00:00
gwr ca8e9852d2 Use sunmon_abort() instead of mon_panic(), etc. 1997-01-27 20:50:36 +00:00
gwr 9b52402303 Use sunmon_abort() instead of mon_panic()
Let idprom_init() have void return.
1997-01-27 20:35:58 +00:00
gwr f8d04bcffb Update comment about si_obio_options 1997-01-27 19:54:06 +00:00
gwr 340699a2b1 Fix copyrights (/s/REGENTS/FOUNDATION/) 1997-01-27 19:40:46 +00:00
gwr dff67a76a8 Map regs using sizeof(struct lereg1) instead of OBIO_AMD_ETHER_SIZE.
Also fix copyright (s/REGENTS/FOUNDATION/)
1997-01-27 16:57:12 +00:00
gwr 090dfd13c2 Now that interrupts are enabled AFTER autoconfiguration, put in the
cute little trick where the zs interrupts are enabled as soon as the
zs driver has done its attachments.   That allows a console break to
enter the debugger during the rest of autoconfiguration.
1997-01-18 19:49:01 +00:00
gwr 84bd1d6f2c Use the same names (OBIO_ZS_*) as the sun3x port... 1997-01-18 19:17:28 +00:00
gwr 8ea480525d Use the same names (OBIO_ZS_*) as the sun3x port so we can share zs. 1997-01-18 17:19:52 +00:00
pk 3bbf01bfb7 rename: ramdisk => md 1996-12-28 23:53:10 +00:00
gwr 3cc81b9726 Add a diagnostic to panic when obio config data has a
default address, which is no longer supported on obio.
1996-12-17 21:21:13 +00:00
gwr 0c5e3e4955 Make this compile with -Werror -Wall -Wstrict-prototypes
(finally! yea!)  Also get rid of __BROKEN_INDIRECT_CONFIG
1996-12-17 21:10:35 +00:00
gwr 1169ecb0a2 Adapt to the new definition of struct zsc_softc
(the zsc_cs[2] members are now POINTERS!)
Also fix warnings...
1996-12-17 20:46:11 +00:00
gwr 31a2dbff56 No longer used. 1996-12-14 15:51:31 +00:00
gwr 5eaee56ccf Increase MAXMCAST from 50 to 250 (to match dev/ic/i82586.h). 1996-12-13 19:54:08 +00:00
gwr 5736d8f544 Kill some dead code. 1996-12-13 19:50:10 +00:00
gwr 0332502588 Most files that were copyright Adam Glass and/or Gordon W. Ross
are now copyright The NetBSD Foundation (rights assigned).
1996-11-20 18:56:49 +00:00
gwr 576fa146ac kill some outdated stuff 1996-11-19 20:58:32 +00:00
thorpej a0dffcafc2 Use bitmask_snprintf(). 1996-11-13 07:00:30 +00:00
gwr f9d54194d5 Allow the config line "flags" to set bits in si_options.
Thanks to Jason Thorpe for the fix! (PR#1929)
1996-10-30 00:31:39 +00:00
gwr 769fe0dfca Get rid of some cruft in the match function. 1996-10-30 00:24:32 +00:00
gwr aac9e275ac Add a "submatch" function to the obio bus driver so the children
of this driver can get rid of the cruft in their match functions.
1996-10-30 00:20:01 +00:00
gwr d6dfd783d9 Checkpoint new version of this driver with support for the "Type A"
variant of the CG4 (the one with the AMD colormap DACs).  This has
been tested only on the "Type B" H/W at this point (Brooktree DACs).
Thanks to Ezra Story and Scott Ellis for the "Type A" support.
1996-10-29 19:54:19 +00:00
gwr cb78378201 Fix typo (fbattach => fb_attach) 1996-10-29 19:27:37 +00:00
christos a087bfeb5c backout previous kprintf change 1996-10-13 03:47:25 +00:00
christos 19d8368f2f printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:44:42 +00:00
thorpej 401d011da6 Merge netbsd-1-2 branch back into mainline. 1996-10-09 00:14:32 +00:00
mycroft b3eac79b64 tty stop functions really should return void, not int, and certainly not both. 1996-09-02 06:43:16 +00:00
cgd 71ad30d0e9 (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
    single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
    function, and kill any locally-defined print function.
1996-08-28 18:59:15 +00:00
cgd 2a73ef60b7 change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
1996-08-27 21:53:46 +00:00
chuck c0bae2d189 sync with sparc version:
repair XDC_HWAIT macro to handle the fact that waithead is now
unsigned.   should fix xdc watchdog timeouts noted in port-sparc
by nathanw@mit.edu.
1996-08-12 20:28:54 +00:00
gwr bf7ab63c97 Move some of the DMA engine initialization from the "start" routine
to the "setup" routine.  Doing the initialization earlier prevents
nasty race conditions where the 5380 prefetch changes the counter.
1996-06-17 23:21:29 +00:00
gwr dc066b6a10 KGDB support 1996-06-17 15:40:36 +00:00
gwr 3274834c18 Use the PROM->input_source setting instead of EEPROM to determine
where the console is, because that is correct if, for example, you
boot with the diag/norm switch set for diagnostics and the EEPROM
is set for keyboard/display.
1996-06-17 15:17:06 +00:00
gwr 8ef4845dec merge 1.2 changes 1996-06-15 14:58:02 +00:00
gwr a0d3ad800b Add the version line. 1996-05-17 19:39:30 +00:00
gwr 50ecbc1c84 Rename cs_pclk_div16 to cs_brg_clk to clarify the fact that the
Baud Rate Generator (BRG) clock is not necessarily PCLK/16.
1996-05-17 19:32:06 +00:00
thorpej dedd4cceab Fix typo, noticed by Curt Sampson <curt@portal.ca>. 1996-05-09 21:15:47 +00:00
thorpej 69351e2be6 Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:35:48 +00:00
thorpej 0584bf86a8 Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:32:31 +00:00
gwr 035d12359e Remove some hacks that "went around" the linesw[] operations. 1996-04-26 18:36:54 +00:00