Commit Graph

132 Commits

Author SHA1 Message Date
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
jdolecek ff8305bbac Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
2002-01-21 21:56:57 +00:00
wiz 1fd7eeefcd "than" instead of "then". 2001-11-21 19:14:19 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
wiz 0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
matthias 2282e42ec2 Fix type in pliptransmit declaration (C version). Noticed by
Tyrel Beede <tb90@mail.csuchico.edu>.
2001-03-22 08:14:23 +00:00
matthias 172ba55ce5 Make it work again after the linediscipline changes. 2000-12-19 16:23:57 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
eeh 8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00
matthias 0688add8e8 Take care of prototype changes for console probe and console getc. 2000-07-14 08:18:49 +00:00
cgd 5f23f3b392 Fix typo: 68681, not 68881. (I'm a UART, Jim, not an FPU!!!) 2000-05-26 23:03:18 +00:00
tsutsui 9100212ef0 Add a "sc_rev" member to ncr5380_softc and handle CXD1180 quirk
in MI ncr5380sbc.
2000-03-25 15:27:54 +00:00
thorpej 7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
mycroft 0af581a1a1 Add a ncr5380_attach() routine which does part of the initialization, attaches
the scsibus, and does the addref/delref dance.
2000-03-18 16:13:22 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
pk 016934b1fe Move advertisement into a comment of its own. 1999-04-06 19:43:04 +00:00
sommerfe bc533621ed defopt MINIROOTSIZE 1999-03-17 18:59:21 +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
matthias dfc0d8e7d5 {bzero, bcopy} -> {memset, memcpy}
add -DINSECURE to stand/Makefile.inc
1998-09-12 19:14:58 +00:00
mycroft 6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +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
matthias 28b0f7408b Make this compile again after the changes to the tty subsystem. 1998-03-30 20:10:26 +00:00
thorpej ac71bb86e2 This file was apparently accidentally ressurected. 1998-01-12 19:59:00 +00:00
thorpej 2d53e59a47 Update for changes to config. 1998-01-12 19:51:03 +00:00
matthias f0faff5a2f sync with /sys/arch/i386/i386/md_root.c. 1997-12-10 21:56:30 +00:00
phil 5050531ac6 Do transfers with interrupts off. 1997-11-24 12:35:20 +00:00
phil b34ae4f929 Get TRUE and FALSE defined again. 1997-10-22 03:35:56 +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
jtk d36d6d14ab use locator defines in "locators.h" to index cf_loc[] 1997-07-17 02:01:26 +00:00
matthias bb66aaeadc * Make it possible to disable disconnect/reconnect on a per target base.
* Eliminate disable interrupts in ncr_pdma_in. No more fifo overflows at
  high baud rates :-) (Thank's to Ian Dall for this).
1997-07-09 19:28:25 +00:00
matthias c5e3d310a6 When booting from a md device set RB_DFLTROOT in boothowto. 1997-07-09 19:28:20 +00:00
matthias 9dd24ca41c * Print device information in md_attach_hook. Since this is a pseudo device,
we have to output the device name as well.
1997-04-21 16:20:39 +00:00
matthias 5a23a56e6b * Apply a fix from Ian Dall to reduce system load and fifo/silo overflows
when running at high speeds. This works by using hardware RTS again and
  using the receive fifo threshold as well as the transmit fifo provided
  by the sc26c92.
1997-04-21 16:16:16 +00:00
matthias 61d420149f * Use higher timeouts for PLIP.
* Do some cosmetic reformatting.
* If the interface is considered dead, re-enable receive interrupts from
  time to time.
1997-04-21 16:16:10 +00:00
matthias 9fea258541 * if queues have to be protected by splimp. Back out last change. Thank's
to Charles for watching out and notifying me about my mistake.
1997-04-04 09:51:26 +00:00
matthias b7624c248a * Add missing & in plipioctl.
* Remove some dead code in plipioctl.
* Use splnet, not splimp to protect IF_PREPEND/IF_DEQUEUE.
1997-04-02 16:36:25 +00:00
matthias 821b15ab3b * Add some missing casts to make this compile with -Werror when KGDB is
defined.
1997-04-01 16:31:53 +00:00
matthias e2a1653bf0 * Only cosmetic changes. 1997-04-01 16:31:45 +00:00
matthias b14adada8f * Include <sys/systm.h> to get printf prototype. 1997-04-01 16:31:37 +00:00
matthias bf4354241e * Use machine/conf.h instead of sys/conf.h to get the
lpt{open,close,write,ioctl} prototypes.
* Remove the cdev_decl(lpt). We get it from machine/conf.h.
* Add and use LPTSOFTC.
* Use level triggered interrupts (seems to work with less spurious interrupts).
* Do not use NLPT. Use lpt_cd.cd_ndevs to get the number of lpt devices.
* ether_ifattach now needs the ethernet address of the device. Supply a
  dummy address.
1997-03-22 08:29:52 +00:00
matthias b49a214439 * Don't reference NSCN.
* Use machine/conf.h not sys/conf.h to get the prototypes for the
  scn cdev functions.
* Include <sys/kgdb.h> to get prototypes for kgdb_connect and kgdb_attach.
* Add missing prototypes for some functions.
* Make ddb work before the console was opend. Thank's to Ian Dall
  for this change. His comment:
	Also, ddb doesn't work if a break is set before the console
	is opened. That is because DTR and RTS are not asserted. It
	would probably work if the console is wired to ingnore DTR
	or RTS. The change below is probably not very correct.
	Proabably the state of DTR and RTS should be saved and DTR
	and RTS asserted on the start of a polled serial input and
	the saved values restored on exiting polled input
* Remove unused function scn_ei.
1997-03-20 12:03:03 +00:00
matthias 80502accfe * Remove unused ncr_minphys prototype.
* Add prototype for ncr_ready.
* Add ncr_wait_not_req function from Ian Dall:
	The ncr_wait_not_req business is to avoid a potential race.
	When the pseudo DMA finishes, the target may not have
	lowered REQ yet. If we just charge ahead, we eventually test
	for phase when REQ is high. However, if REQ has not yet gone
	low for the last byte transferred, this will be the wrong
	phase. This is taken from the dp8490 application notes. The
	last ACK is not deasserted until the dma is completed.
	Deasserting the last ACK should be delayed until the last
	REQ is deasserted. I am not sure if there are ever devices
	this slow, but I believe the code is "more correct".
1997-03-20 12:03:01 +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
matthias c6d2740564 Integrate Phil Budne's latest changes to the scn driver. From his README:
* Uses Counter/Timer dynamicly for rate generation; You can
	  have both 19200 and 38400 on one duart, and 57600 on another!
	* Improved scninfo program to dump driver internal information.
	  implemented counters for parity err, framing err, break
	* Delays changes until transmitter idle to avoid "glitches"
	* Cleaned up scn_softc member names
	* Untested support for sc26c92 (I don't yet have any to test with);
	  + Will use alternate rate tables (include 115.2kbps and 230.4kbps)
	  + Will raise FIFO rx interrupt threshold and watchdog timer
	    at higher rates.
	  + Unknown (to me) how fast pc532 MC145406 driver chips can go

	NOTE: It seems like it may be a BAD idea to use a sc26c92 as
	a console port for now; the PROM doesn't know to reset the
	chip back to scn2692 mode!!
1997-03-13 10:24:14 +00:00