Commit Graph

255 Commits

Author SHA1 Message Date
bouyer b55e87ab48 Remove unused WAITTIME definition. Pointed out by Andreas Johansson. 2003-06-29 17:03:47 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
thorpej 577fd9d8fa * Use aprint*().
* Add Ultra/133 to wdc_print_modes().
2003-05-17 21:52:03 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
bouyer a704b24037 Fix typo. 2003-04-27 14:33:20 +00:00
bouyer 07e96ff3d7 Acceptable cache operations are r and rw, not none and w
Properly initialise the timeout value.
2003-04-27 14:27:36 +00:00
bouyer 1e2dac7786 Add support for the getcache/setcache ioctls. 2003-04-26 09:54:15 +00:00
explorer 2248468d68 add my 80 GB SATA drive to the quirk table. 2003-04-18 04:32:19 +00:00
mason d1b448c6e5 From current-users:
On Thu, Apr 17, 2003 at 11:26:26AM -0500, Dave Huang wrote:

> Typo police here :) "whose," not "who's."
2003-04-18 00:35:14 +00:00
darrenr 0b2e3c6317 add missing setting of b_error (thanks Manuel) 2003-04-16 00:07:17 +00:00
nathanw ad743e234b Add a missing paren. 2003-04-15 19:14:58 +00:00
darrenr 8dac8843a5 Implement (and document!) "dkctl <dev> badsector .." to `manage' the bad
sector information in the kernel.  Doing this uncovered some shortcomings
that should have been pretty obvious with the code committed prior, addressing
the major kludge with a new struct - disk_bacsecinfo to be passed into
DIOCBSLIST.
2003-04-15 18:27:26 +00:00
dogcow 277607fced fix typos 2003-04-15 17:42:44 +00:00
darrenr f4965045a0 Automatically build up a list of bad sectors from failed read operations and
prempt read operations on matching regions with a failure rather than waiting
for the device to return a failure.  The I/O operation must have already failed
MAXRETRIES times before being added to the list - this can generally take up
to 12 seconds.
List is made accessible to userspace via DIOCBSLIST and DIOCBSFLUSH.
2003-04-15 14:11:00 +00:00
fvdl 8103646465 Check RAW_PART against the media size instead of the disklabel.
Add the media size in 512-byte sectors to the softc, to avoid
some 64 bit computations. Bump the capacity stored in softcs
for disks to 64 bits.
2003-04-03 22:18:23 +00:00
thorpej 3f2184def7 Work around a buggy PHY in some Seagate S-ATA drives which get confused
by the way some S-ATA controllers packetize data when the sector count of
the transfer mod 15 is 1.
2003-03-21 22:40:56 +00:00
yamt bcd7beec98 initialize b_interlock properly.
(for ioctl)
2003-02-23 08:50:58 +00:00
thorpej 3381232270 Experimental support for RAID volumes configured by ATA "RAID" controllers.
Such RAID controllers are actually just IDE controllers with a BIOS that
can create RAID volumes and write the configuration info to config blocks
on the disks.  The BIOS can do I/O to these volumes, and the OS must
understand the config blocks and implement RAID in software in order to be
able to use these volumes.

Only SPAN (simple concatenation) and RAID0 are supported at this time,
and writing back config blocks is also not supported at this time.  Currently,
only the Promise configuration scheme is supported, although supporting
the Highpoint scheme should not be too difficult.

In any case, this is sufficient to use the Promise RAID0 volume (thus
preserving the win2k AS installation) on this new Intel server I have.

Thanks to Soren Schmidt for doing the work in FreeBSD; it made this
task much easier.  The config block parsing code is adapted from his
work.
2003-01-27 18:21:23 +00:00
bad f4aacfe9fc Being able to make image backups of your whole disk, not to mention not
causing certain ata disks to lock up by reading beyond the last block,
beats catering to broken devices.

bounds_check_with_label() RAW_PART too.
2003-01-23 00:00:32 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
fvdl 8db111aeb4 Fix error in ODIOCGDINFO handling caused by previous change to it. 2003-01-07 18:35:04 +00:00
fvdl 74fe783bef Avoid using a lot of kernel stack. 2002-12-15 01:56:02 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
junyoung cc537c2f3a Add option NEW_BUFQ_STRATEGY, a new buffer queue strategy for better
system responsiness under high disk I/O load.

OK'ed by Juergen Hannken-Illjes.
2002-10-18 14:31:10 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
drochner 0766f7d128 Remove a check whether the drive is initialized before crashdump.
It prevents dumping on an otherwise unused disk and seems
unnecessary anyway - the driver will deal with initialization.
fixes my PR kern/18135
2002-09-27 17:17:53 +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 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken 10ff5e6607 Implement a new device buffer queue interface.
One basic struct, a function to setup a queue with a specific strategy and
three macros to put buf's into the queue, get and remove the next buf or
get the next buf without removal.

The BUFQ_XXX interface will be removed in the future.
The B_ORDERED flag is not longer supported.

Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-07-16 18:03:17 +00:00
yamt ec594e3ef5 do previous differently for wddump case. 2002-06-28 16:50:30 +00:00
yamt 2d80988a26 - remove big buffers on stack. discussed on tech-kern.
- constify.
2002-06-28 16:40:50 +00:00
christos f9b7ffe292 Add LBA48 support based on patches from Keisuke YOSHIDA. KNF a bit while
I am there.
2002-01-13 17:24:28 +00:00
tsutsui 1267bddc09 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:29:30 +00:00
bouyer bfc80822c7 Update my copyrigth. 2001-12-03 00:20:22 +00:00
bouyer 4ca5497111 Allow wd to attach to something else than wdc/pciide (like USB<->ATA bridges):
- move some functions from ata.c to ata_wdc.c or wdc.c.
- add callbacks to struct ata_bustype so that wd.c doesn't call directly
  functions from the lower level driver.
2001-12-03 00:11:15 +00:00
bouyer 4809ad42cb Clean up attach of wd/atapibus:
kill ata_atapi_attach. Change atapibus to use a struct scsipi_channel instead
of ata_atapi_attach as attach arch. Create a ata_device, compatible with
scsipi_channel, to attach wd.
2001-12-02 22:44:32 +00:00
lukem f61cbe7489 add RCSID 2001-11-13 12:51:12 +00:00
bjh21 4bc5a3b295 Add explicit support for IDE and SCSI adaptors which don't support interrupts.
On such adaptors, all transfers are done in polling mode.

OK'ed by Manuel on tech-kern.
2001-06-13 18:17:38 +00:00
drochner 06fc2f85cc Since __HAVE_OLD_DISKLABEL, DISKMINOR(u, p) isn't continuous over "p"
anymore. So we can't pass a range to vdevgone() but have to loop over the
partitions explicitely.
(otherwise the next device unit will be killed)
2001-05-06 18:30:56 +00:00
fvdl d040bd5908 Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.
2001-01-08 02:03:45 +00:00
fvdl e2d1c1f926 Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).
2001-01-07 18:09:01 +00:00
lukem 146ab1ba9b s/pio/PIO/ and s/lba/LBA/ in messages output to users 2000-12-14 23:56:18 +00:00
thorpej 5297dab6a8 Use device_lookup() *more*. 2000-07-06 00:48:53 +00:00
thorpej cfaba33937 Use device_lookup(). 2000-07-06 00:43:04 +00:00
thorpej cde72a2c2b Garbage-collect __BDEVSW_DUMP_OLD_TYPE. 2000-07-05 23:31:12 +00:00
mrg 261538ecac remove include of <vm/vm.h> 2000-06-28 16:39:25 +00:00