summaryrefslogtreecommitdiff
path: root/sys/dev/advansys/advlib.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove adv(4) and adw(4)Warner Losh2018-10-221-2096/+0
| | | | | | | | | | | Remove the advanssy drivers (both adv and adw). They were tagged as gone in 12 a while qgo. The nycbug dmesg database shows this was last seen in 6 and there were only a few adv sightings then (none for adw). Relnotes: yes Notes: svn path=/head/; revision=339567
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Remove EISA support from adv driver. Remove references to it from manWarner Losh2017-02-161-1/+1
| | | | | | | | | page. Remove comment about EISA dual channel card. Remove trivial references in advlib to avoid false positives with grep. Remove stray MCA reference not worth a seperate commit. Notes: svn path=/head/; revision=313833
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys: use our nitems() macro when param.h is available.Pedro F. Giffuni2016-04-211-1/+1
| | | | | | | | | This should cover all the remaining cases in the kernel. Discussed in: freebsd-current Notes: svn path=/head/; revision=298431
* Remove instances of variables that were set, but never used. gcc 4.9Warner Losh2014-03-301-7/+1
| | | | | | | warns about these by default. Notes: svn path=/head/; revision=263954
* Add locking to adv(4) driver and mark it MPSAFE.John Baldwin2012-10-121-15/+25
| | | | | | | | | | | | | | | | | - Disable the support for the second channel on twin-channel EISA cards as the current incarnation can't possibly work correctly (it hasn't worked since switching to new-bus where new-bus allocates the softc). If anyone bothers to test this again it can be fixed properly and brought back. - Use device_printf() and device_get_nameunit() instead of adv_name(). - Remove use of explicit bus space handles and tags. - Use PCI bus accessors and helper routines rather than accessing config registers directly. - Handle failures from adv_attach(). Tested by: no one (hope it works) Notes: svn path=/head/; revision=241492
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEMatt Jacob2006-11-021-7/+0
| | | | | | | | | as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
* The first of 3 major steps to move the CAM layer forward to usingMatt Jacob2006-10-311-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders Notes: svn path=/head/; revision=163816
* Fix -Wundef.Ruslan Ermilov2005-12-041-5/+5
| | | | Notes: svn path=/head/; revision=153072
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-1/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-2/+2
| | | | Notes: svn path=/head/; revision=139749
* Use __FBSDID().David E. O'Brien2003-08-241-2/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Wrap the static endian functions to shutup GCC.David E. O'Brien2003-02-241-0/+2
| | | | Notes: svn path=/head/; revision=111409
* Add adv_adj_endian_qdone_info() & adv_adj_scsiq_endian()David E. O'Brien2003-02-231-0/+18
| | | | | | | so this at least compiles on big-endian machines. Notes: svn path=/head/; revision=111342
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-021-2/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Newbusify adv driver.Yoshihiro Takahashi2000-04-071-0/+3
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=59082
* adv_pci.c:Justin T. Gibbs2000-01-141-37/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update list of supported products. Adjust probe message to include the ASC3030. advansys.c: Fix a long standing bug in the error recovery strategy. In order to keep recovery simple, we freeze the SIMQ, stopping the XPT from submitting new requests. Unfortunately, we also will freeze the SIMQ if bus_dmamap_load blocks or we run out of controller resources. On cards with limited resources it was possible to freeze the SIM a second time and never unfreeze it. Now we more carefully track our exception state so we never freeze the SIMQ more than once. Don't rely on pointers fitting in a 32bit field stored in the per-transaction data structures on the card. Use an index to an array of transaction mapping structures instead. This should allow this driver to work on the Alpha. Deal with the ASC3030 which is almost idistinguishable from the ASC3050. Unfortunately the ASC3030 does not work at Ultra speeds, so if we can't find an eeprom, we must assume that ultra is disabled. The SIIG cards using the 3030 do not have eeproms. As a side effect, we now honor the ultra disable bit in the eeprom if it is present. Don't bother attempting to write corrected eeprom data back to the eeprom. We can function just fine if the data is corrupted and I'd rather not risk messing up the user's eeprom. Modify the interrupt handler to catch latched external bus rests. Dynamically determine the maximum number of S/G elements we can map at a single time. The nature of the firmware interface for these cards makes this value dependent on the number of "queues" the card can support. advlib.c: advlib.h: advmcode.c: advmcode.h: Synchronize with the latest firmware image released in the Linux Advansys driver. Notes: svn path=/head/; revision=55945
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add a number of interrelated CAM feature enhancements and bug fixes.Kenneth D. Merry1999-05-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=46581
* Handle the case when auto sense retrieval fails.Justin T. Gibbs1999-04-191-1/+9
| | | | | | | Give automatic request sense operations a 5 second timeout. Notes: svn path=/head/; revision=45846
* Staticize.Eivind Eklund1999-04-111-3/+3
| | | | Notes: svn path=/head/; revision=45575
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-3/+1
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Correct the reporting of the queue full condition so that the XPT layerJustin T. Gibbs1998-10-291-3/+3
| | | | | | | | | | can properly throttle tags. Add diagnostic printfs for firmware result codes that we encounter but don't know anything about. Notes: svn path=/head/; revision=40733
* Only pull 16 bits of residual information from completing queues. ThisJustin T. Gibbs1998-10-091-2/+10
| | | | | | | | | | is a work-around from an LRAM access bug on the 940UA. In a future microcode revision, the high 16bits of residual information will be moved to a safe location and we'll return to 32bit residuals. Since we only allow 64KB I/O, 16bits is enough. Notes: svn path=/head/; revision=40133
* Don't set the active flag on a transaction resource until it has beenJustin T. Gibbs1998-10-071-13/+15
| | | | | | | | | | | | | | queued. Perform dma segment setup outside of splcam protection as this can take some time and the protection is not necessary. Inline a function. Clean up some whitespace. Notes: svn path=/head/; revision=40027
* Correct compilation with option DIAGNOSTIC set.Justin T. Gibbs1998-09-201-1/+3
| | | | | | | Upgrade to the latest firmware. Notes: svn path=/head/; revision=39505
* Advance Systems SCSI Host Adapter driver for CAM. Currently only supportJustin T. Gibbs1998-09-151-579/+939
| | | | | | | the 8bit SCSI AdvanSys products. Notes: svn path=/head/; revision=39217
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* A little 80 column cleanup.Justin T. Gibbs1996-11-051-15/+28
| | | | Notes: svn path=/head/; revision=19426
* Advanced Systems Inc. SCSI Controller driver and ISA/VL front end.Justin T. Gibbs1996-10-071-0/+1654
I have only tested the ABP5140 card and only with a single CDROM drive but it seems to work fine. This driver relies on features found only in the SCSI branch so will not work in -current until those changes are brought in. It also doesn't have any error handling code *yet*. The goal is to use this driver as the development platform for the new generic SCSI layer error recovery/handling code. PCI and EISA front ends will show up as soon as I get my hands on the cards. There are also a few issues in the driver that I need to clear up with AdvanSys before I can suggest sticking one of these cards in your server. 8-) Thanks to AdvanSys for releasing this code under a suitable copyright. Obtained from: Ported from the Linux driver writen by bobf@advansys.com (Bob Frey). Notes: svn path=/cvs2svn/branches/GIBBS/; revision=18781