summaryrefslogtreecommitdiffstats
path: root/sys/dev/dpt/dpt_scsi.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Fix some warnings. Here are more part-time volatiles - ie: data thatpeter2000-08-071-3/+3
| | | | | lives in memory and is sometimes busmastered to/from the controller. I believe these are all ok.
* Remove unneeded <sys/buf.h> includes.phk2000-04-181-1/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* - Convert dpt_pci.c to newbus.mdodd2000-04-071-13/+20
| | | | | | | | | | | | | - Add support for ISA based DPT adapters (this doesn't quite work yet). - Sync dpt_eisa.c with my local copy. - Simplify how EISA IDs are matched. - Prototype. - Formatting nits. - Conform to how I do things in dpt_pci.c/dpt_isa.c. - Modify dpt_scsi.c:dpt_alloc() to DTRT with newbus. - Add some comments to dpt_scsi.c:dpt_pio_get_conf(). - Add additional check to dpt_scsi.c:dpt_get_conf(). - Add some useful error messages to dpt_scsi.c:dpt_init().
* - Implement a simple PIO driven function for retreiving the onboardmdodd1999-10-091-0/+106
| | | | | | | | | | | | | configuration information from a DPT card at a given port. This is needed by the ISA bus front end (still to come) and the EISA bus front end (which hasn't ever worked). - Blow away dpt_eisa.h as the information it contains does not justify an additional file. - Convert dpt_eisa.c to use the onboard config instead of trying to read the EISA configuration registers.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-211-1/+2
| | | | | minute. This should cover all of the missed cases (and should let LINT build again).
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-5/+6
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* Properly set the alignment argument to bus_dma_tag_create(). If wegibbs1999-08-161-4/+4
| | | | don't care about the alignment, set it to 1, meaning single byte alignment.
* Add a number of interrelated CAM feature enhancements and bug fixes.ken1999-05-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended. camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate". - The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device. - The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates. - new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases cam_xpt.c, cam_sim.[ch], cam_ccb.h: - new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs. - new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured - bump the CAM version from 0x10 to 0x11 - Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change. - add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value. - Fix the set transfer settings code in the transport layer. scsi_cd.c: - make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive. scsi_da.c: - attach unless we get a "logical unit not supported" error scsi_pass.c: - for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags. scsi_pass.h: - change the CAM ioctls to use the CAM version as their group code. adv driver: - Allow changing the sync rate and offset separately. adw driver - Allow changing the sync rate and offset separately. aha driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. ahc driver: - Allow setting offset and sync rate separately bt driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. NCR driver: - Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs. Reviewed by: gibbs, mjacob (isp), imp (aha)
* Error check is not necessary - this function cannot fail in thiseivind1998-12-221-8/+4
| | | | | | context. Noted by: gibbs
* Better error checking and more complete struct initialization.eivind1998-12-221-5/+13
| | | | Reviewed by: Simon Shapiro <shimon@simon-shapiro.org>
* -Wunused cleanup.gibbs1998-10-151-9/+3
| | | | Submitted by: Poul-Henning Kamp <phk@freebsd.org>
* Honor CAM_TAG_ACTION_NONE.gibbs1998-10-151-2/+3
|
* Call dpt_intr from our timeout routine to clear any pending commands beforegibbs1998-10-091-3/+11
| | | | | | | | performing actual timeout processing. Modify a few printf statements. Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
* Remove a spurious, but benign statement.gibbs1998-10-021-6/+4
| | | | | Correct some panic and printf strings that referenced the 'bt' driver. I should be more careful when I Cut 'n Paste.
* dpt.h:gibbs1998-09-221-12/+14
| | | | | | | | | | Bump the lun field in the eata ccb to 5 bits. We still only use 3 of them, but we may use the rest at a later date. dpt_scsi.c: Default to only 32 S/G segments. Bzero our CCB array after allocation.
* Drop the maximum SG count to 32 from 1024. We can't make use of all ofgibbs1998-09-201-18/+23
| | | | | | | | | | | those extra ones yet, anyway. In dpttimeout, expect that the controller will complete aborted CCBs through the interrupt handler. This corrects a panic that was caused by completing the same transaction twice during timeout recovery. Honor the tag times types expressed by the user and pass them down to the controller.
* Correct printf format bugs.gibbs1998-09-151-4/+5
|
* Conver the DPT driver to CAM. The dpt_control interface is not yetgibbs1998-09-151-2958/+1637
| | | | functional, but will be in another day or so.
* Fix an spl protection botch.gibbs1998-08-261-3/+3
| | | | Submitted by: Gene Stark <stark@FreeBSD.ORG>
* Fixed printf format and spelling errors. Didn't fix relatedbde1998-08-161-3/+3
| | | | | | description of DPT_SHUTDOWN_SLEEP in LINT. Didn't add timestamps so that the (combined?) sleep interval can be printed as intended in the original printf.
* Hide compiler warnings for casting from a long to a pointer of abde1998-08-101-2/+2
| | | | | | different size (on i386's with 64 bit longs). Cosmetic. Non-cosmetic unportabilities were already hidden by using ntohl() to convert a 32-bit user DMA address to a long.
* Fix some things Simon had broken, basically making LINT compile again.eivind1998-08-061-9/+3
| | | | | Submitted by: Simon Shapiro <shimon@simon-shapiro.org> Pointed out by: bde
* Update DPT driver from 1.4.3 to 1.4.5eivind1998-08-051-89/+234
| | | | Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
* Fixed printf format errors (only 1 left in GENERIC now).bde1998-07-131-18/+18
|
* o Return error when the controller can't accept commands.eivind1998-06-021-7/+5
| | | | | | | o Make driver less chatty on boot (only announce version under bootverbose) Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
* Add EISA support for DPT driversjulian1998-03-111-6/+12
| | | | | Submitted by: Matthew Dodd Reviewd by: shimon@simon-shapiro.org (DPT author)
* Fixed a syntax error. Strange but correct code was broken by recentbde1998-02-251-2/+2
| | | | changes to the queue macros.
* Removed unused #includes.bde1998-02-201-11/+1
|
* Staticize. (Diffs by me & and Simon in cooperation.)eivind1998-02-101-17/+17
|
* Add Simon Shapiro's DPT driverjulian1998-01-261-0/+3700
this shouldn't break anything existing. Userland utilities to follow.
OpenPOWER on IntegriCloud