Commit Graph

46 Commits

Author SHA1 Message Date
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +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
yamt
bcd7beec98 initialize b_interlock properly.
(for ioctl)
2003-02-23 08:50:58 +00:00
tsutsui
1267bddc09 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:29:30 +00:00
lukem
2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem
7ba10b3532 add RCSIDs 2001-11-13 06:54:32 +00:00
thorpej
38bdc75312 bcopy -> memcpy 2001-07-18 18:25:41 +00:00
thorpej
03746a443a bzero -> memset 2001-07-18 18:21:04 +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
16a9d90e17 Cleanup the scsipi_xfer flags:
- `flags' is now gone, replaced with `xs_control' and `xs_status'.
- Massive cleanup of the control flags.  Now we explicitly say that
  a job is to complete asynchronously, rather than relying on side-effects,
  and use a new flag to now that device discovery is being performed.
- Do SCSI device discovery interrupt-driven.
1999-09-30 22:57:52 +00:00
thorpej
ae8a556ce5 Add missing XS_SELTIMEOUT case in user command completion path, returning
SCCMD_TIMEOUT.  Based on PR #6720, Andreas Wrede.
1999-01-11 22:07:08 +00:00
bouyer
00d93f776b Rename scsi_interpret_sense() to scsipi_interpret_sense() and move it from
scsi_base.c to scsipi_base.c. Rename the functions from scsi_verbose.c
too, and rename the file itself. Cleaup includes too (scsi_*.h should not
be #included in scsipi_*.h files, which are supposed to be
common to atapi and scsi).
1998-11-17 14:38:42 +00:00
thorpej
45bf57f8a6 Garbage-collect the SCIOCREPROBE and OSCIOCREPROBE ioctls. This is a
bus-oriented command.  (How much sense does it make to open a device
to rescan the bus?!)
1998-10-10 02:35:30 +00:00
mycroft
04f0dc658c Assign my copyrights to TNF. 1998-08-17 00:49:01 +00:00
mycroft
6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +00:00
jonathan
d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
thorpej
1a2cb1b9d4 defopt COMPAT_FREEBSD 1998-06-25 22:49:18 +00:00
bouyer
eeb09bb8c8 Treat OSCIOCIDENTIFY just as SCIOCIDENTIFY regarding permissions, don't
require the file descriptor to be open read/write. Fix PR kern/5592
from John F. Woods.
1998-06-15 08:16:01 +00:00
thorpej
75e554c27d Implement two macros, scsipi_command() and scsipi_command_direct(), and
use them to hide the structure of the function pointers we jump through
to issue a command.
1997-10-18 19:50:51 +00:00
enami
d7d845c3d2 Cosmetic changes to keep coding style consistency in this directory;
- Indent with tab of width 8.
- Use four column to indent continuation line.
- Fold long line if possible.
- Use return (xx) instead of return xx.
- Compare pointer against NULL instead of testing like boolean.
- Delete whitespace at the end of line.
- Delete whitespace in front of function call operator.
- Delete whitespace after cast.
- Dereference a pointer to function explicitly.
- Add an empty line after local variable declaration.
- Use NULL instead of (char *)0.
- Dont use block for single statement.
1997-10-01 01:18:38 +00:00
enami
a0c4d0c2e6 Add new ioctl OSCIOCREPROBE and OSCIOCIDENTIFY to support binary
compatibility with NetBSD 1.2.
1997-09-19 00:59:49 +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
augustss
81a10d7725 Don't require that a device is open for writing to perform a raw
SCSI command that just reads.
1997-04-26 22:24:46 +00:00
christos
9a2c8cf28c revert previous kprintf change 1996-10-12 23:23:13 +00:00
christos
9beb92aad7 printf -> kprintf, sprintf -> ksprintf 1996-10-10 23:32:59 +00:00
thorpej
fcde57a426 For ioctl commands which may change the device's state, ensure that
the caller has the device open for writing.
1996-09-13 00:35:59 +00:00
christos
0bc63f486d scsi prototypes 1996-02-14 21:46:52 +00:00
thorpej
249cddaaa7 Don't declare Debugger(). It's handled in <sys/systm.h>.
#include <sys/systm.h> where necessary, as suggested by Jonathan Stone.
Fixes PR #1511.
1995-09-26 19:26:48 +00:00
mycroft
52bacd79d6 Fix invocation of scsi_scsi_cmd(), per John Kohl. 1995-01-30 15:54:42 +00:00
mycroft
feb5b29596 Remove old, misleading comment. 1995-01-23 17:56:26 +00:00
mycroft
8fd135209c Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
mycroft
c1cbd9c635 Set UIO residual count. 1994-12-01 12:36:35 +00:00
mycroft
71ab8bb627 Always set the device number correctly, even though we don't need it. 1994-12-01 12:26:37 +00:00
mycroft
d18cbacd88 Redux. 1994-12-01 12:12:08 +00:00
mycroft
1066219897 Uncomment call to scsi_user_done(), and remove a duplicate biodone() (and
another si_free()).
1994-12-01 12:04:43 +00:00
mycroft
a10cbd7179 Remove the silly statically allocated array, and simply malloc the data
structures as needed.  Also, put the buf in the malloc()ed area.  Remove a
duplicate si_free() (though this was harmless before).
1994-12-01 11:53:56 +00:00
cgd
6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
mycroft
28cbceeec7 Make this more likely to work. 1994-10-23 19:24:01 +00:00
mycroft
e5d974c51f First cut at making user-level SCSI commands work. This is untested.
Partly from John Brezak.
1994-10-20 20:31:23 +00:00
cgd
fccfa11af5 New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
mycroft
a69dd750a2 b_un.b_addr -> b_data 1994-06-16 01:07:30 +00:00
mycroft
58dfc9dffc Fix various types. Remove some outdated flags. 1994-04-11 03:53:58 +00:00
mycroft
2e5a28159f New SCSI system, based on Julian's more recent work. 1994-03-29 04:29:20 +00:00
mycroft
8caf0ca62b Use new struct buf fields. 1993-11-29 20:33:25 +00:00
mycroft
e985f4041a Still under construction... 1993-11-24 09:45:04 +00:00
mycroft
37548328a1 Under construction... 1993-11-24 04:52:44 +00:00