summaryrefslogtreecommitdiffstats
path: root/sys/dev/advansys
Commit message (Collapse)AuthorAgeFilesLines
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-1/+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-154-4/+0
|
* Fix typo (accessable --> accessible).alex2000-06-141-1/+1
| | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai
* Unused include: #include "adw.h"peter2000-06-101-1/+0
|
* Use the correct register names, not the FreeBSD 2.2 compatability ones.peter2000-05-282-6/+6
|
* Back out the previous change to the queue(3) interface.jake2000-05-262-8/+8
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-232-8/+8
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Fixed return value of adv_attach function.nyan2000-05-231-17/+18
| | | | Submitted by: Oleg Sharoiko <os@rsu.ru>
* Hide annoying message under boot-verbose.phk2000-04-231-2/+3
| | | | | | | Fix Typo. Approved by: nyan Also: PR-18172
* 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.
* - Release allocated resources on error.nyan2000-04-122-145/+164
| | | | | | Reported by YAMAMOTO Shigeru <shigeru@iij.ad.jp> - Clean up some code. - Set the value of rid variable to PCI_BASEADR0(== 0x10) (adv_pci.c).
* Newbusify adv driver.nyan2000-04-078-157/+166
| | | | Reviewed by: imp
* adv_pci.c:gibbs2000-03-025-99/+115
| | | | | | | | | | | | | | | | | | | adw_pci.c: Update comments describing supported chips/cards. adwcam.c: adwlib.c: adwlib.h: Handle more error return codes from the firmware. Break out the bus reset code into its own function. Usa a constant for the bus reset hold delay. Fix an interrupt race problem in adw_idle_cmd_send by incorporating the poll loop for command completion. Approved by: jkh@FreeBSDorg
* Fix indentation.gibbs2000-02-041-1/+1
| | | | Overlooked by: n_himba@FreeBSD.org but not bde@FreeBSD.org
* Unbreak LINT (missing curly brace).n_hibma2000-02-041-1/+1
| | | | Broken by: gibbs
* Add support for the AdvanSys ASC38C0800 Ultra2 chipset. Preliminarygibbs2000-02-037-1010/+2539
| | | | | | | support is also included for the ASC38C1600 Ultra160 chipset, but as firmware is not yet available for this chip, it is disabled. Approved by: jkh@FreeBSD.org
* Remove a spurious printf left in from debugging.gibbs2000-02-011-1/+0
| | | | PR: 16642
* Remove unneeded #include "eisa.h" and #if NEISA > 0peter2000-01-291-5/+0
|
* Remove unnecessary includes.nyan2000-01-171-2/+0
|
* Pre 4.0 tidy up.peter2000-01-141-1/+1
| | | | | | | | | | | | Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later. Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses. Submitted by: mdodd
* adv_pci.c:gibbs2000-01-146-434/+614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move the declaration of panic() from sys/systm.h to sys/param.h.eivind1999-09-261-1/+1
| | | | | | | | Rationale: Wider access, so we can add assertions to header files. panicstr is still in sys/systm.h Suggested by: phk Discussed with: peter
* Fix a compile warning.gibbs1999-09-111-0/+1
|
* $Id$ -> $FreeBSD$peter1999-08-2816-16/+16
|
* Properly set the alignment argument to bus_dma_tag_create(). If wegibbs1999-08-166-16/+16
| | | | don't care about the alignment, set it to 1, meaning single byte alignment.
* Move the specification of EDGE/LEVEL triggered interrupts tomdodd1999-08-011-2/+2
| | | | | | | | | | | | | | | | | eisa_add_intr() which now takes an additional arguement (one of EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE). The flag RR_SHAREABLE has no effect when passed to bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as the eisa_alloc_resource() call (bus_alloc_resource method) now deals with this flag directly, depending on the device ivars. This change does nothing more than move all the 'shared = inb(foo + iobsse)' nonesense to the device probe methods rather than the device attach. Also, print out 'edge' or 'level' in the IRQ announcement message. Reviewed by: dfr
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-032-10/+2
| | | | files. config will leave the whole file out if configured to do so.
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-092-10/+2
| | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-3/+2
| | | | to the BUS_SETUP_INTR call.
* Use haveseen_ioport() which is now connected up to the resource manager.peter1999-05-081-3/+3
|
* Add a number of interrelated CAM feature enhancements and bug fixes.ken1999-05-063-19/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tpeter1999-04-242-2/+10
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* staticize.gibbs1999-04-231-2/+2
|
* Kill a compiler warning.gibbs1999-04-231-1/+2
|
* Handle the case when auto sense retrieval fails.gibbs1999-04-192-3/+13
| | | | Give automatic request sense operations a 5 second timeout.
* Implement an EISA new-bus framework. The old driver probe mechanismpeter1999-04-181-96/+95
| | | | | | | | | had a quirk that made a shim rather hard to implement properly and it was just easier to convert the drivers in one go. The changes to the buslogic driver go beyond just this - the whole driver was new-bus'ed including pci and isa. I have only tested the EISA part of this so far. Submitted by: Doug Rabson <dfr@nlsystems.com>
* Staticize.eivind1999-04-111-3/+3
|
* Staticize.eivind1999-04-111-3/+3
|
* Beef up the error handling routine to handle more errors.gibbs1999-04-071-25/+67
| | | | | Compensate for a bug in the AdvanSys firmware where a valid queue full condition can be reported via a different error code.
* Unspammed includes in <machine/cpufunc.h> in the !SMP case. Partiallybde1999-01-081-2/+3
| | | | unspammed them in the SMP case.
* Staticize the overrun buffer so that they are not shared betweengibbs1998-12-223-12/+12
| | | | | | | cards of different bus types as each bus type may have a different bus mapping. Submitted by: Eivind Eklund <eivind@yes.no>
* Return NULL on resource shortage instead of blindly continuing.gibbs1998-12-221-2/+4
| | | | Obtained from: Eivind Eklund <eivind@yes.no>
* probe function changed from returning char * to const char *.dillon1998-12-142-6/+6
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-073-9/+12
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-2/+2
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Fix probes when a port address is specified.gibbs1998-11-101-2/+2
|
* Correct the reporting of the queue full condition so that the XPT layergibbs1998-10-292-6/+13
| | | | | | | can properly throttle tags. Add diagnostic printfs for firmware result codes that we encounter but don't know anything about.
* -Wunused cleanup.gibbs1998-10-152-20/+5
| | | | | | | Fixed bug in advansys.c where we did not properly clean up ccb_info data structures in softc teardown. Submitted by: Poul-Henning Kamp <phk@freebsd.org>
* Fix breakage introduced by last patch. bde has added CC_QUIET flag toimp1998-10-121-18/+3
| | | | | | | | hasseen_isadev so this will be less noisy when conflicts do exist. Also eliminate redundant warnings about conflicts. Requested by: bde Reviewed by: gibbs
* Fix conficts in probe:imp1998-10-101-1/+21
| | | | | | | | | | o For bt and aha only probe the one I/O range if a specific I/O is specified in the config file. o Don't even try to probe I/O ranges that have been seen already. o If we conflict with an IRQ or DRQ, then fail the probe. Requested by: bde, gibbs Approved by: jkh
OpenPOWER on IntegriCloud