aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/buslogic/bt.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC: All of those added MODULE_DEPEND clauses to make CAM and theMatt Jacob2006-12-141-0/+3
| | | | | | | | | actual hardware busses get pulled in if they're modules PRs: 106536, 106543 Notes: svn path=/stable/6/; revision=165194
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-8/+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-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Remove merge conflict that I didn't notice as it was in the middle of aDavid E. O'Brien2003-08-251-5/+0
| | | | | | | | | comment and thus compiled. Submitted by: bde Notes: svn path=/head/; revision=119451
* Use __FBSDID().David E. O'Brien2003-08-241-0/+6
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Fixed wrong function names in the error message that was translated toBruce Evans2003-07-261-3/+3
| | | | | | | | C in rev.1.32 so that it doesn't take 2 commits for all branches to fix this message. Notes: svn path=/head/; revision=118052
* Mega busdma API commit.Scott Long2003-07-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* Add /* FALLTHROUGH */Poul-Henning Kamp2003-05-311-0/+7
| | | | | | | | | Remove break after return Found by: FlexeLint Notes: svn path=/head/; revision=115555
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-05-271-2/+2
| | | | | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah) Notes: svn path=/head/; revision=115343
* I deserve a big pointy hat for having missed all those referencesMaxime Henrion2003-04-101-2/+2
| | | | | | | to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
* Clean up argument comments for bus_dma_tag_create() calls.Matthew N. Dodd2003-03-291-32/+51
| | | | Notes: svn path=/head/; revision=112782
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-021-4/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232
* Add some band-aid casts to quiet warnings. This driver still assumesJohn Baldwin2002-11-061-1/+1
| | | | | | | | that sizeof(int) == sizeof(void *) == 4. However, it also seems that the hardware assumes this. Notes: svn path=/head/; revision=106521
* Remove #if 0'ed abuse of NPCIPeter Wemm2002-07-211-3/+0
| | | | Notes: svn path=/head/; revision=100430
* Use ANSI C string contatenation instead of a multi-line string literal.John Baldwin2001-12-131-4/+4
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87797
* Add code, imperfect though it may be, for CAM_NEW_TRAN_CODE compilation.Matt Jacob2001-07-041-11/+115
| | | | Notes: svn path=/head/; revision=79175
* Turn on interrupt-entropy harvesting for all/any mass storage devicesMark Murray2001-03-011-1/+1
| | | | | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl. Notes: svn path=/head/; revision=73280
* Classify all EISA cards with major firmware revions '2' as 742As.Justin T. Gibbs2000-11-131-3/+9
| | | | | | | | | | | | | | | | | | This allows us to successfully attach early Storage Dimension cards. Allocate mailboxes for the 742A bellow the 16MB limit. Although these cards seem to be able to deal with all other types of data anywhere in a 32bit address space, 24bit addresses are required for mailboxes. bt_eisa.c: Add device IDs for all Storage Dimension products I could find from their web site. Thanks to Ted Mittelstaed for loaning me the equipment to diagnose and fix these problems. Notes: svn path=/head/; revision=68661
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Fix typo (accessable --> accessible).Alexander Langer2000-06-141-1/+1
| | | | | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai Notes: svn path=/head/; revision=61686
* Remove unneeded <sys/buf.h> includes.Poul-Henning Kamp2000-04-181-1/+0
| | | | | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes. Notes: svn path=/head/; revision=59368
* - Point the right bits at the new location of the bus front ends.Matthew N. Dodd1999-10-091-3/+4
| | | | | | | | | The 'bt' SCSI driver now lives in sys/dev/buslogic. - Correct a few comments. Notes: svn path=/head/; revision=52052
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Properly set the alignment argument to bus_dma_tag_create(). If weJustin T. Gibbs1999-08-161-5/+5
| | | | | | | don't care about the alignment, set it to 1, meaning single byte alignment. Notes: svn path=/head/; revision=49860
* Poll for interrupts in bt_cmd in case they are masked. A completingJustin T. Gibbs1999-05-231-4/+14
| | | | | | | | | | mailbox command will block the completion of an immediate command, so we must service them for our command to succeed. PR: 11799 Notes: svn path=/head/; revision=47432
* Move the declaration of the interrupt type from the driver structureDoug Rabson1999-05-081-2/+3
| | | | | | | to the BUS_SETUP_INTR call. Notes: svn path=/head/; revision=46743
* 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
* Remove bt_softcs. It is no longer used.Warner Losh1999-05-051-3/+1
| | | | Notes: svn path=/head/; revision=46490
* bt.c:Justin T. Gibbs1999-04-231-7/+15
| | | | | | | | | Simplify some inline functions. btreg.h: Correct a comment. Notes: svn path=/head/; revision=45966
* Check bus_setup_intr() as a seatbelt...Peter Wemm1999-04-181-2/+7
| | | | Notes: svn path=/head/; revision=45795
* Implement an EISA new-bus framework. The old driver probe mechanismPeter Wemm1999-04-181-88/+75
| | | | | | | | | | | | 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> Notes: svn path=/head/; revision=45791
* Improve bt_cmd() so that it has a better chance of working when thereJustin T. Gibbs1999-04-071-59/+82
| | | | | | | | | | are pending I/O transactions. It is not clear that is works 100% of the time under SMP, but since the bt_cmds() that are sent after other CPUs are started are not critical, the driver will function until I can figure out why this is the case. Notes: svn path=/head/; revision=45444
* Add bt_port_probe() a routine shared by the EISA and ISA probe code toJustin T. Gibbs1999-03-081-3/+66
| | | | | | | | | | determine IRQ and DRQ information. Fix a bug that would cause us to attempt to retrieve extended sync rate information on cards/firmware revs that do not support that command. Notes: svn path=/head/; revision=44581
* Remove unsued variable.Justin T. Gibbs1998-12-111-9/+12
| | | | | | | | | | | | If we are not transfering any data, use a non S/G ccb type that doesn't return residual information. It seems that some firmware revisions dislike S/G ccbs with 0 length S/G lists. Correct bt_cmd() so that we always honor command status that was latched by our interrupt routine while polling for completion.. Notes: svn path=/head/; revision=41669
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()Archie Cobbs1998-12-041-5/+5
| | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=41514
* Move a diagnostic behind "if (bootverbose)".Justin T. Gibbs1998-11-131-5/+7
| | | | Notes: svn path=/head/; revision=41133
* Noop Commit - Change was in last revision.Justin T. Gibbs1998-11-101-1/+1
| | | | | | | | | If the next available mailbox is not in the free state, print a warning and handle the condition as a temporary resource shortage. The condition should never happen, but we shouldn't panic since recovery is possible. Notes: svn path=/head/; revision=41050
* Fix probes when a port address is specified.Justin T. Gibbs1998-11-101-23/+98
| | | | Notes: svn path=/head/; revision=41048
* Do not disable the ISA compatibility window if it is the same value asJustin T. Gibbs1998-10-301-1/+7
| | | | | | | that set for our PCI IO address space. This can happen on the BT-946. Notes: svn path=/head/; revision=40749
* -Wunused cleanup.Justin T. Gibbs1998-10-151-4/+2
| | | | | | | Submitted by: Poul-Henning Kamp <phk@freebsd.org> Notes: svn path=/head/; revision=40419
* Honor CAM_TAG_ACTION_NONE.Justin T. Gibbs1998-10-151-3/+4
| | | | Notes: svn path=/head/; revision=40418
* Hook up ahapoll so that dumps, synchronize cache commands or any otherJustin T. Gibbs1998-10-091-1/+2
| | | | | | | command that comes in through xpt_polled_action works correctly. Notes: svn path=/head/; revision=40132
* On wide cards with firmware revisions < 5.06L, we have to infer thatJustin T. Gibbs1998-09-201-1/+17
| | | | | | | | wide targets are in fact running wide since the "setup info" command for these revisions does not fill out the wide negotiation bits. Notes: svn path=/head/; revision=39507
* Use %p with (void *) casts to print pointers with printf.Justin T. Gibbs1998-09-171-6/+6
| | | | Notes: svn path=/head/; revision=39390
* Fix printf format bugs.Justin T. Gibbs1998-09-161-7/+9
| | | | Notes: svn path=/head/; revision=39324
* Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM.Justin T. Gibbs1998-09-151-0/+2154
Notes: svn path=/head/; revision=39223