summaryrefslogtreecommitdiffstats
path: root/share/examples/scsi_target
Commit message (Collapse)AuthorAgeFilesLines
* Tell about the full name we opened, not the unit.mjacob2009-09-191-1/+1
| | | | | Obtained from: Sean Bruno MFC after: 1 month
* A few enhancements I made while working on the Firewire target (sbp_targ).sbruno2009-09-072-3/+7
| | | | | | | | | | | Update the error handling in a couple of cases to exit gracefully if certain mandatory conditions aren't met. Reduce the maximum number of initiators to 8 for this example code. While 1024 is more correct, this example code would act like it was stalled out even though it was merely allocating the needed structures in init_ccbs() Reviewed by: scottl@freebsd.org
* Bump MAX_INITIATORS to 1024- the LSI-Logic can go even higher thanmjacob2006-09-273-96/+150
| | | | | | | | | | | | | | this for 'initiator id'- this is a stopgap until a sparse map is added. Make compat defines for offset format (FreeBSD 5 or less). Add no-asyncio flag. There's some breakage with ASYNC I/O that every now and then drops us into an infinite loop. This also then does a fallback to no-asyncio if the AIO option isn't loaded/compiled into the kernel. A number of other chanes to try and track some breakage.
* If we end up with a CTIO completing with CAM_REQUEUE_REQ,mjacob2006-04-111-2/+16
| | | | | be obliging and just redo the request instead of squawking and dying.
* Move the check for non-ATIO_CMD ahead of the cache chech so thatmjacob2006-03-251-9/+10
| | | | | | | completion for unsupported commands doesn't abort. Reviewed by: nate MFC after: 2 weeks
* Make scsi_target actually compile after a structure membermjacob2006-03-221-1/+1
| | | | | | change. Obtained from: Either Scott, Nate, Ken or A. Nagy
* At least respond to REPORT LUNS with an ILLEGAL COMMAND response.mjacob2006-03-221-1/+4
| | | | | This keeps us from dumping core when modern OS' like Windows and Linux see us.
* Sort sections.ru2005-01-211-7/+7
|
* Typo.pjd2004-06-261-1/+1
|
* Fixed static build.ru2004-02-041-2/+2
|
* Note that REPORT_LUNS should be implemented to work better with Linuxnjl2004-01-091-0/+1
| | | | and Windows as initiators.
* Enable autosense by default. This shouldn't hurt SPI and is requirednjl2004-01-091-1/+1
| | | | for FC.
* Bump the max number of initiators to 256 from 16. This is appropriate fornjl2004-01-091-3/+3
| | | | fibre channel and shouldn't hurt SPI.
* - Enable 16byte commands.simokawa2003-10-184-19/+159
| | | | | | | - Fix printf warnings on 64bit architectures. - Accept 'k', 'm' and etc. for -s option. Reviewed by: njl
* * scsi_cmds.csimokawa2003-09-252-4/+28
| | | | | | | | | | - Fill in autosense data. - Add compatibility for RELENG_4. * scsi_target.c - Raw device support - Set correct value in c_descr->offset for CAM_DIR_NONE case. - Support for CTIO abort.
* kernel:njl2003-01-162-4/+9
| | | | | | | | | | | | * Fix a bug where devices weren't cleaned up on close(): CAM_REQ_CMP != 0 user: * Increase timeout in usermode to CAM_TIME_INFINITY. The initiator is in charge of timeouts and the value was in ms, not seconds. * Bring two debugging printfs under the debug flag * Clean up man page to show increased testing on isp(4) Submitted by: gibbs (bugfixes)
* Add check for AIO support before starting up.njl2003-01-131-0/+27
|
* mdoc(7) police: markup overhaul.ru2002-12-121-40/+45
| | | | Approved by: re
* Add a DPADD section to fix 'make checkdpadd'njl2002-11-251-0/+1
| | | | | Submitted by: ru Approved by: re (previously)
* New SCSI target emulator codenjl2002-11-225-238/+1692
| | | | | | | | | | | | | | | | | | | | | This code allows a user program to enable target mode on a SIM and then emulate any number of devices (disks, tape drives, etc.) All decisions about device behavior (UA, CA, inquiry response) are left to the usermode program and the kernel driver is merely a conduit for CCBs. This enables multiple concurrent target emulators, each using its own backing store and IO model. Also included is a user program that emulates a disk (RBC) using a file as a backing store. This provides functionality similar to md(4) at the CAM layer. Code has been tested on ahc(4) and should also work on isp(4) (and other SIMs that gain target mode support). It is a complete rewrite of /sys/cam/scsi_target* and /usr/share/examples/scsi_target. Design, comments from: gibbs Supported by: Cryptography Research Approved by: re
* include paths.h for _PATH_DEVmjacob2001-03-031-0/+1
|
* Add `_PATH_DEVZERO'.obrien2000-12-091-1/+1
| | | | Use _PATH_* where where possible.
* Don't get stuck in a loop calling exit from an atexit routine. Cleanmjacob2000-07-181-8/+9
| | | | | | up cam_fill_ctio usage to passed atio flags. Clear periph_priv area of new ctio so if the kernel is dumb enough to look at them (this is a SECURITY hole) the panic will be obvious instead of subtle.
* Clean up after oneself on exit.mjacob2000-07-171-0/+10
|
* Whoops- more changes in last checkin than TARGIODEBUG-mjacob2000-07-141-1/+0
| | | | | | | some additional TARGIOCCLEAREXCEPTION ioctls added as needed. Obtained from: gibbs@freebsd.org
* Make use of the new TARGIODEBUG ioctl (i.e., add an option for it's use).mjacob2000-07-141-6/+23
|
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Add a cleanup handler called "atexit" to make sure we free up targetgibbs1999-08-161-2/+14
| | | | | | | mode instances. Print out exception information passed out from the kernel target mode driver to this userland daemon.
* Allocate a target mode instance to handle our target mode session, cleangibbs1999-03-051-16/+79
| | | | | | it up on exit. The address for attaching the emulator (path, target id, lun) is now specified on the command line. Some attempt at cathing signals and cleaning up target mode instances is now made.
* Remove debugging printfs.gibbs1998-12-101-3/+1
|
* SCSI Target userland process example. Provides/Dumps the data related togibbs1998-09-152-0/+281
RECEIVE/SEND processor target requests to the "targ" sample target mode driver.
OpenPOWER on IntegriCloud