Commit Graph

55 Commits

Author SHA1 Message Date
uch c6ac79b0b3 add NEWSMIPS_WSDISPLAYIO_GINFO ioctl to get frame buffer stride. 2004-08-01 18:53:16 +00:00
tsutsui ab60f77a08 Declare sc_regbase as volatile, so that if_sn.c works with gcc3.
XXX We should switch to MI SONIC driver.
2003-12-02 13:19:06 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
tsutsui 2ddfa78de4 Adapt MI mk48txx(4) changes. Tested on NWS-3470D (hb) and NWS-5000X (apbus). 2003-11-01 22:50:45 +00:00
tsutsui 62c9f07679 Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips. 2003-10-25 04:07:28 +00:00
lukem ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
tsutsui c9058cdc00 Add MI softintr(9) support with common mips/softintr.c. 2003-05-25 14:02:47 +00:00
tsutsui 52827752dc Rename apbus_intr_call() -> apbus_intr_dispatch(). 2003-05-10 10:19:59 +00:00
tsutsui 764da5a461 - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
2003-05-10 09:46:24 +00:00
tsutsui dac2b81da3 Remove bogus comments. 2003-05-09 17:39:12 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
tsutsui f08b4ccb7c - Move some common declarations into z8530var.h.
- Fix struct consdev properly.
- Remove register declarations.
- some more KNF.
2003-04-26 18:43:19 +00:00
tsutsui c069308048 TAB/space cleanup. 2003-04-19 14:56:05 +00:00
thorpej c9228c8ddd Use PAGE_SIZE rather than NBPG. 2003-04-02 04:17:50 +00:00
tsutsui 397febeb94 Backout previous. <sys/lock.h> is pulled from <sys/tty.h>. 2003-02-11 17:25:14 +00:00
tsutsui ff77623786 MI z8530sc driver now requires <sys/lock.h>. 2003-02-10 11:38:30 +00:00
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
thorpej dbb0f0ebed Use aprint_normal() for cfprint routines. 2003-01-01 01:47:30 +00:00
thorpej d52d005f78 Use CFATTACH_DECL(). 2002-10-02 04:27:51 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
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
tsutsui 3fdc4d2b1d Set correct count in spifi_read_count(). 2002-03-06 16:50:34 +00:00
thorpej 75dfddd49d Use bpf_mtap(). 2002-01-16 05:56:54 +00:00
thorpej af66038f73 Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
2001-11-14 18:15:10 +00:00
wiz 0eee1a5c64 Give `spurious' all the `u's it needs. 2001-10-04 14:17:28 +00:00
chs 984d30ac45 don't depend on other headers to include sys/proc.h for us. 2001-09-28 12:36:48 +00:00
wiz e11d04474c issueing -> issuing 2001-07-26 22:55:12 +00:00
tsubai 071e4602d9 Avoid panic when polling is used. 2001-07-26 11:44:06 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
tsubai 520e444562 Cosmetic changes. 2001-04-26 15:52:00 +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
matt c77ccc45d8 Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
2000-12-03 01:42:29 +00:00
tsubai 9b85cc40d4 Keyboard and mouse support for news5000. 2000-11-15 14:04:05 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
tsubai 760413cb15 "xa" frame buffer driver. 2000-11-06 15:00:28 +00:00
tsubai c6c547497d NEWS5000 internal SCSI driver. 2000-10-30 10:07:35 +00:00
onoe 26c411de58 Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
2000-10-18 12:47:37 +00:00
onoe 3c201cca80 change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
2000-10-12 03:17:25 +00:00
onoe 935577e7bc Tulip driver for NWB-5852A, which is an APbus board with DEC-21140A chip.
without MII.  It supports 100BaseTX only.  Half duplex/Full duplex can
be specified manually, but there are no auto negotiation functionality.

XXX:	It takes 34 seconds before sending/receiving packets on the wire
	after initial setup.  It is obviously a bug because the board
	just works fine on NEWS-OS, but I cannot find what's wrong...
	Once it starts working, it seems there are no problems.
2000-10-12 03:15:59 +00:00
onoe 31624ad662 use macro to access interrupt mask register. 2000-10-12 03:15:21 +00:00
onoe f2c3050d29 change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
2000-10-12 03:13:47 +00:00
onoe be4c939451 change the type of the apbus interrupt handler from void to int
for each driver to indicate the interrupt has been handled or not.
add prototype of apbus_dmatag_init() function, which allocates memory
and initialize its member including bus space handle to flush DMA write
cache.  Note that the allocated pointer must be freed.
2000-10-12 03:12:01 +00:00
onoe 655ba83924 Allow multiple interrupt handler on same interrupt event.
Clear interrupt mask for specified interrupt in apbus_intr_establish().
Add dma stuff; define apbus_dmamap_sync() to flush DMA write cache by
accessing the corresponding I/O port.
2000-10-12 03:11:38 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
mrg 4fa952b49a remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:58:50 +00:00
tsubai 7531770fa4 Insert delay() in busy wait. 2000-05-30 11:45:11 +00:00