Commit Graph

52 Commits

Author SHA1 Message Date
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +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
hannken c32ed76dba Convert to new device buffer queue interface.
Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2002-07-26 13:19:52 +00:00
gmcgarry dea19257e2 Create default disklabel correctly. 2002-04-08 21:41:44 +00:00
gmcgarry 97ef6567ad Add RCSIDs. 2002-03-15 05:55:35 +00:00
gmcgarry d934377152 Implement DIOCGDEFLABEL ioctl. 2002-02-10 00:49:57 +00:00
gmcgarry aee7bee1a7 bcopy -> memcpy
bzero -> memset
bcmp -> memcmp
2001-12-08 03:34:38 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
he 489b832f9b Add randomness sampling from hil, sd and rd devices. 2000-10-10 19:58:42 +00:00
thorpej 21fc65e1a8 sleep() -> tsleep() 2000-05-27 04:52:27 +00:00
thorpej 071aed40ac A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well.  This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
2000-05-19 18:54:22 +00:00
thorpej b667a5a357 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:30:07 +00:00
kleink 3a09830119 printf format mismatch in DEBUG code (related to already fixed PR hp300/9388). 2000-02-11 23:00:47 +00:00
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
kleink 09dd6fc81d Make these build again after buf.h/disksort changes. 2000-01-31 19:04:52 +00:00
thorpej 52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
thorpej 871cf5e7ce Update for changes to config. 1998-01-12 18:30:41 +00:00
thorpej 2d397943d4 Copyright assigned to The NetBSD Foundation. 1997-10-04 09:59:35 +00:00
kleink ac7da90b83 Remove old *_UNK style default defines, use standard names from locators.h.
Missed in "locators.h" cleanup; reported by Thorsten Frueauf in PR 3906.
1997-07-22 15:20:20 +00:00
kleink 49324f585c Remove misplaced/unnecessary VM #include cruft; from Thorsten Frueauf
<frueauf@ira.uka.de> in PR port-hp300/3851.
1997-07-10 18:14:08 +00:00
thorpej ee8581a255 foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
1997-06-24 00:44:03 +00:00
thorpej 9eddfbfca3 Update for USELEDS changes. 1997-05-05 21:07:31 +00:00
thorpej f0f9811df2 Use the %x printf format where appropriate 1997-04-09 20:01:04 +00:00
scottr aa88a240fe Fix printf() and other warnings when compiled with DEBUG defined. 1997-04-02 22:37:21 +00:00
scottr c008fc0aa0 Add prototypes, and make this compile with -Wall. Remove register
modifier from all declarations.
1997-03-31 07:32:14 +00:00
thorpej 9bb27910a9 Convert to new-style autoconfiguration; old-style config is no longer
supported.
1997-01-30 09:14:10 +00:00
thorpej c56e780e4f Bring some sanity into my frazzled existence:
- Always ensure that RAW_PART ("c") can be opened.
- Disallow unused or non-existent partitions from being opened.
- Don't do bounds checking or partition translation on RAW_PART.
This is consistent with other disk drivers in the NetBSD source tree,
and fixes a condition where the user could not fix a corrupted disklabel
due to a bogus offset for partition "c".
1997-01-07 09:29:30 +00:00
thorpej 8acf9f0215 Set the device class on non-dull devices. This is a transitional thing. 1996-10-14 07:14:11 +00:00
christos 30b3cc3d09 backout previous kprintf changes 1996-10-13 03:14:05 +00:00
christos 60dd5ceebe printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:06:28 +00:00
thorpej 39cbdb7e9f Fix kernel crash dumps. Still uses the old format for now. 1996-10-06 00:14:12 +00:00
thorpej bcab59cd3c Remove the old-style disk instrumentation support. Nothing uses it
anymore.
1996-06-06 16:17:41 +00:00
thorpej d6f4511690 All interrupt routines (except the HIL; don't ask) now take a pointer
to a softc, rather than a unit number.  Add a "dq_softc" member
to struct devqueue; this is a temporary measure until the
dma/controller/device callback spaghetti is untangled.

YAY!  No more need for dcafastservice!

HIL: squish instances of "(void) splhil()" and "(void) spl0();".
1996-02-14 02:43:54 +00:00
thorpej 996edfa606 Remove bogus "return (0);" in rdmatch() that wiggled its way in uninvited. 1996-02-03 03:00:29 +00:00
thorpej 524cf97f54 Kludge around a case where a flaky HP-IB disk might be slow to respond
to the identification request in rdmatch().  Similar in spirit to a
patch from Jason Downs (written eons ago), but limited to the broken
device we're trying to reach.  My patch tested (and fixed :-) by
Herb Peyerl.
1996-01-10 20:54:29 +00:00
thorpej 5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
thorpej 862bb3adc1 Pass the correct number of arguments to readdisklabel(). 1995-12-09 07:31:03 +00:00
thorpej 52ec09e420 Use a "match/attach" rather than "init" scheme for probing devices.
This is a step towards getting the drivers ready for new config.
1995-12-02 18:21:49 +00:00
thorpej 905cb9dda1 Re-arrange things such that we can print out disk geometry regardless of
COMPAT_NOLABEL.

XXX One day when the world doesn't assume DEV_BSIZE bytes/sector, we'll be
able to actually use the stuff sensed from the drive, rather than a table.
1995-11-19 19:07:18 +00:00
thorpej 2d5f7a7b07 Pass correct number of arguments to hpibgo(). 1995-10-09 07:57:43 +00:00
thorpej fc1f217977 Update for conf.h changes. 1995-08-04 08:12:57 +00:00
mycroft e25c1817cf kernel_pmap --> pmap_kernel() 1995-04-10 13:08:28 +00:00
cgd 132b41434c new RCS ID format. 1994-10-26 07:22:45 +00:00
mycroft 0dfc96374d Bug fixes from Mike Hibler. 1994-05-27 17:18:50 +00:00
mycroft c1e1831b84 Merge with 4.4-Lite. 1994-05-23 05:58:16 +00:00
mycroft bbc1b37ee0 Get rid of private *read() and *write() functions. 1994-05-11 10:16:11 +00:00
mycroft 89a5de9e12 Most of the changes needed to make this continue to run. 1994-05-05 10:10:21 +00:00
mycroft 20f96b580e Add arg to ioctl functions. Clean up #includes. 1994-02-10 13:59:25 +00:00
mycroft efdb9fa688 *strategy functions return void. 1994-01-11 17:19:37 +00:00
mycroft 4862b84c92 Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
1993-08-01 19:22:24 +00:00