Commit Graph

2821 Commits

Author SHA1 Message Date
Matthew N. Dodd
4b31e9d6a7 Make these actually compile. I got a little delete happy pruning includes
and used 'command' instead of 'cmd' in a few cases.  Also clear up some
unused variables.

Pointed out by: phk
1999-08-18 22:14:24 +00:00
Poul-Henning Kamp
f04626ff22 Add pin-numbers for easy reference. 1999-08-18 20:45:57 +00:00
Nick Sayer
7cc9cff983 printf("%x",dev); -> printf("%s",devtoname(dev)); 1999-08-18 17:42:41 +00:00
Nick Hibma
25519565df 1) rename dev->self to be consistent
2) use device_printf
3) properly tear down and disable interrupts when init fails
1999-08-18 10:24:59 +00:00
Matthew N. Dodd
b2864868b3 SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented in
sys/net/if_ethersubr.c:ether_ioctl().  Drivers need not implement generic
behavior.

PR: kern/12126
Submitted by: in part by Boris Popov <bp@butya.kz>
1999-08-18 06:12:00 +00:00
Bill Fumerola
aa498bf3d4 Wrap two declarations that are only used in an #ifdef in their own #ifdef.
Reviewed by:	bde
1999-08-17 22:06:17 +00:00
Bill Fumerola
b8e49f681b Welcome devtoname(), to most likely be used when printing information
about a dev_t.

printf("%x", dev) now becomes printf("%s", devtoname(dev)) because
printing actual information about the device is much more useful then
printing a pointer to an address that would never help the developer debug.

Submitted by:	phk, bde
1999-08-17 20:25:50 +00:00
Kazutaka YOKOTA
e6d37e188f Recognize Interlink VersaPad. `Tap' action will be recognized
as the button 4.

Submitted by: Masachika ISHIZUKA <ishizuka@ish.org>
1999-08-17 12:14:13 +00:00
Nick Hibma
6efd8273f4 - Added documentation
- fix bug in data toggle handling
1999-08-17 07:36:34 +00:00
Justin T. Gibbs
99cfa26a69 Differentiate between aic7895C chips and their earlier brethren
via the PCI revid register.
1999-08-16 22:50:37 +00:00
Justin T. Gibbs
7457cf2d46 Add support for issuing immediate notify event ccbs for bus resets, bdr
messages, abort messages, and abort tag messages.

Fix a bug in how default transfer negotiations are handled if the
user had disabled initial bus resets.

Support multi-targetid on the aic7895C.
1999-08-16 22:49:29 +00:00
Justin T. Gibbs
42aed36923 Kill an unused INTSTAT type. 1999-08-16 22:43:08 +00:00
Justin T. Gibbs
95a5efc2c3 Fix a few compiler nits.
Submitted by:	Bill Fumerola <billf@jade.chc-chimes.com>
1999-08-16 22:42:33 +00:00
Matt Jacob
0470d791d0 Clarify and cleanup some CAM queueing breakages. 1999-08-16 20:11:45 +00:00
Matt Jacob
1a43c1fc14 add in SIMQFRZ_TIMED && CMD_RQLATER defines 1999-08-16 20:04:06 +00:00
Matt Jacob
4b9f078cf2 add in new ICB structure variant (for 2200) 1999-08-16 20:02:09 +00:00
Matt Jacob
0f747d722c Clarify lun limits for FC && SCSI. 1999-08-16 20:01:14 +00:00
Matt Jacob
ce7f792d94 More code cleanup. Go back to using FULL_LOGIN Fibre Chan if f/w is less than
1.17.0 level. Change where we do the loop database init. Add in the CMD_RQLATER
return. Add some register debounce.
1999-08-16 19:59:55 +00:00
Matt Jacob
0a5f7e8bd9 Set some correct return values. Prefer I/O map all the time unless configured
otherwise.
1999-08-16 19:52:29 +00:00
Greg Lehey
b70434e69d free_drive: mark drive down. This may fix a panic in the 'start' command.
Reported-by:	peter
1999-08-16 05:09:39 +00:00
Greg Lehey
0888504040 Clean up some comments.
format_config: code preening.

vinum_scandisk: If we find a partition in the first pass over a drive,
note the fact so we don't grab the compatibility partition as well.

Submitted-by:  peter
1999-08-16 05:08:46 +00:00
Justin T. Gibbs
7debf5e75e Fix a long standing bug in the auto-termination control settings for
the aic7890/91/96/97 cards.  This could cause the system to go into
a long retry/recovery loop during probe.

Fix the alignment argument to bus_dma_tag_create().

Don't set the CACHETHEN bit in dscommand0 for Ultra2 controllers
until we know more about its behavior.  The description for this
bit makes it sound like it could cause problems with certain
PCI chipsets.
1999-08-16 02:33:46 +00:00
Justin T. Gibbs
086646f7c6 Properly set the alignment argument to bus_dma_tag_create(). If we
don't care about the alignment, set it to 1, meaning single byte alignment.
1999-08-16 01:52:21 +00:00
Kazutaka YOKOTA
6c6028fffb Correctly save `flags' bits. 1999-08-15 06:06:14 +00:00
Greg Lehey
3438940a01 Add note that a change needs backing out. 1999-08-15 02:31:19 +00:00
Greg Lehey
3764607a6e Ensure that we can't create two different drives on the same
partition.

Reported-by:	Remy Nonnenmacher <remy@synx.com>
1999-08-15 02:30:34 +00:00
Greg Lehey
60402eb12d Add 'initialized' state for subdisks. After initializing, the subdisk
goes into initialized state, not 'up'.  This makes it easier to ensure
consistency in multi-plex volumes.

update_plex_state: redo transitions from empty and initialized
subdisks to up or reviving, depending on the number of plexes.

Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-15 02:29:14 +00:00
Bill Paul
2b028af745 Minor glitch in ti_newbuf_jumbo(): m_adj() was being called on
m instead of m_new.

Submitted by: Kenneth D. Merry <ken@kdm.org>
1999-08-14 15:45:03 +00:00
Poul-Henning Kamp
49ff4debd3 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
Greg Lehey
af78609425 Tidy up comments.
Add definitions for VINUM_BLOCK_PLEX and VINUM_CHAR_PLEX.

struct plex: add lock-related variables.

struct rangelock: add variables.
1999-08-14 06:31:37 +00:00
Greg Lehey
c515a27bbd Clean up comments.
Don't return "can't do it" when the user requests a state change to
the current state.  This previously caused silly messages like "Can't
start <foo>: invalid argument", when in fact <foo> was already
started.

set_plex_state: don't set state for non-existent plexes.

update_plex_status: as long as we have initializing subdisks, we're
		    initializing.
1999-08-14 06:30:56 +00:00
Greg Lehey
b8962e0ff8 Clean up some comments.
Move the declaration of freerq() to request.h.

logrq: add support for lock events.

vinumstart: solve a problem where removing a plex from an active
	    volume could cause attempts to access non-existent plexes.

launch_requests: don't set a request group active until we're sure we
		 can launch it.  This caused some hangs under unusual
		 circumstances.

bre: don't set XFR_BAD_SUBDISK if we're not going to use it.

build_read_request: correct recovery, which caused some hangs under
		    (other) unusual circumstances.

build_rq_buffer: don't set bp->b_dev if we don't have a dev.

sdio: clean up, remove obsolete code.

deallocrqg: unlock any locks the rqg may have.
1999-08-14 06:30:15 +00:00
Greg Lehey
a87d57a3e8 Tidy up some comments.
bre5:
  Shorten some lines.

  Desired-by:  bde

  If we're reading from a short plex, return EOF indication.

  Always lock the stripe before starting a transfer.  Hopefully the
  current version will solve some data integrity problems that have
  been reported with degraded RAID-5 plexes.

  Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:29:25 +00:00
Greg Lehey
e5738c9f66 Add keypairs replace and readpol. These got forgotten in a previous
commit, but since they don't work yet, nobody noticed.
1999-08-14 06:28:48 +00:00
Greg Lehey
998115ba43 rewrite lockrange and unlockrange. Hopefully the current version will
solve some data integrity problems that have been reported with
degraded RAID-5 plexes.

Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:28:21 +00:00
Greg Lehey
56a39b0546 Add hotspare keyword. 1999-08-14 06:27:52 +00:00
Greg Lehey
55eecd1064 vinumioctl: add ioctls for raw subdisks and plexes. Remove code for
drives (we refuse to touch drives, that's the disk driver's business).
1999-08-14 06:27:25 +00:00
Greg Lehey
4fd49b9f73 Remove some XXX comments (they're not really gone, just invisible).
Tidy other comments.

open_drive: don't call set_drive_state if we decide to take it down.
This could help avoid some race conditions with the daemon.

init_drive: don't set the drive down, we'll let close_locked_drive do
that.

close_locked_drive: set drive state to down without calling
set_drive_state.  This could help avoid some race conditions with the
daemon.

driveio: remove the function, it wasn't being used.

get_volume_label: remove volume dependencies so that we can return a
label for plexes and subdisks as well.  What a kludge.
1999-08-14 06:26:32 +00:00
Greg Lehey
6dd671ea60 Remove some XXX comments (they're not really gone, just invisible).
Remove declarations for freerq and free_rqg.

Remove DEBUG_RESID code.

freerq: check whether the request is holding a lock, free if so.

free_rqg: remove.  It wasn't being used any more.

Change the Debugger calls to panics.
1999-08-14 06:25:52 +00:00
Greg Lehey
5425c19ce4 Change definitions for get_volume_label, lockrange.
Move definition for unlockrange to request.h (it now contains
request-related parameters).

Add sddownstate.
1999-08-14 06:25:14 +00:00
Greg Lehey
b7904c2bf9 Add code which someday will help support hot spares.
checkdiskconfig(): remove.  It didn't make any sense to complain about
kernel keywords in user config files; it just made it more difficult
to convert.  Now we ignore kernel keywords if we're not in kernel
mode.

get_empty_sd: initialize sectors.

free_drive: don't close if we don't have a vp.  Maybe this will help
fix the problem that peter had, but I wouldn't count on it.

config_plex: If the plex is RAID-5, give it a rangelock structure.

start_config: Reset current drive, plex and volume so that a new
'create' command doesn't get long-dead defaults.
1999-08-14 06:24:34 +00:00
Greg Lehey
466c1060d9 vinumopen: add code for opening raw plexes. Volume-related plex
devices will probably die a death soon (yes, DES, that's correct
usage).
1999-08-14 06:22:15 +00:00
Greg Lehey
98256dfef8 Clarify some comments.
struct rqelement, enum rqinfo_type, struct rqinfo, union rqinfou: add
lock requests.

Add declarations for freerq and unlockrange.  Since they include
request structures, they can't go in vinumext.h
1999-08-14 06:21:45 +00:00
Dmitrij Tejblum
e9e879c34d Fix a warning on the alpha. 1999-08-13 16:17:54 +00:00
Poul-Henning Kamp
7dc5cd047f The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
Nick Hibma
e0f5b7a3be Protect the file interface against disconnects. 1999-08-12 18:55:41 +00:00
Søren Schmidt
f63c7e582a Support DMA on ATAPI devices (finally).
This makes my system use only ~5% CPU on reading 4.5Mbyte/sec
from a CDROM, which before was limitted to 1.8Mbyte/sec due
to 100% CPU load..
1999-08-10 21:59:58 +00:00
Bill Paul
ee67e42e43 Small tweak: remember to free the tx ring data (which is malloc()ed) if
we have to bail out of vr_attach().
1999-08-10 21:12:11 +00:00
Bill Paul
08339b4fa4 Convert the VIA Rhine driver to newbus and set it up to be compiled as
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.

While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.
1999-08-10 17:15:20 +00:00
Matthew N. Dodd
2825e76714 Add support for the Am79C978. (AMD PCHome/PCI Ethernet adapter)
See: http://www.amd.com/products/npd/overview/homenetworking/intro.html

PR: kern/12275
Submitted by: Robert Watson <robert@cyrus.watson.org>
1999-08-10 01:03:51 +00:00