summaryrefslogtreecommitdiffstats
path: root/sys/dev/aha
Commit message (Collapse)AuthorAgeFilesLines
* Mega busdma API commit.scottl2003-07-013-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though thescottl2003-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)
* I deserve a big pointy hat for having missed all those referencesmux2003-04-101-2/+2
| | | | to bus_dmasync_op_t in my last commit.
* Clean up argument comments for bus_dma_tag_create() calls.mdodd2003-03-293-51/+76
|
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-4/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-2/+2
| | | | especially in troff files.
* Fix build on alpha. It used to case an int to a pointer in order to dopeter2002-10-091-1/+2
| | | | | pointer arithmetic. Detour via uintptr_t, since we're generating an offset not dereferencing them.
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in thepeter2002-10-092-2/+2
| | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int on machines with 64 bit longs.
* Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanlypeter2002-05-241-0/+1
| | | | again.
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-012-2/+2
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* Remove NAHA, NAHATOT and aha_softcs and related code. It was unusedimp2001-02-042-30/+0
| | | | | | | | | except for setting it. Also remove count from aha and replace it with optional. Also add commented out pccard lines for all the old card drivers. They have to be commented out until they are converted because it causes problems in NEWCARD.
* Remove unnecessary includes found by phk's script a long time ago.imp2000-12-132-4/+0
|
* Make a few more mallocs use M_ZERO.dwmalone2000-10-291-2/+1
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: imp
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Fix typo (accessable --> accessible).alex2000-06-141-1/+1
| | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai
* Back out the previous change to the queue(3) interface.jake2000-05-261-5/+5
| | | | | | 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-231-5/+5
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* 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.
* More pnpids.imp2000-03-252-2/+8
|
* Fix plug and play support:imp2000-01-244-119/+97
| | | | | | | | | | | o Cut out the probed stuff. We no longer need it since newbus implicitly checks for this (likely bt can be changed as well in this way). o Add preliminary support for unload. Untested because aha doesn't yet support identify and there are some interactions with PnP that I've not yet worked out. With this I can boot the AHA-1542CP FW F.0. All the aha resources appear to be picked up via pnp now.
* MIN unused, so kill itimp1999-10-251-1/+0
|
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-121-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | resource_list_release. This removes the dependancy on the layout of ivars. * Move set_resource, get_resource and delete_resource from isa_if.m to bus_if.m. * Simplify driver code by providing wrappers to those methods: bus_set_resource(dev, type, rid, start, count); bus_get_resource(dev, type, rid, startp, countp); bus_get_resource_start(dev, type, rid); bus_get_resource_count(dev, type, rid); bus_delete_resource(dev, type, rid); * Delete isa_get_rsrc and use bus_get_resource_start instead. * Fix a stupid typo in isa_alloc_resource reported by Takahashi Yoshihiro <nyan@FreeBSD.org>. * Print a diagnostic message if we can't assign resources to a PnP device. * Change device_print_prettyname() so that it doesn't print "(no driver assigned)-1" for anonymous devices.
* Kill unused includesimp1999-10-112-2/+0
|
* Use the PRVERB() macro instead of 'if (bootverbose) printf()...mdodd1999-10-021-3/+8
| | | | | | | | | | | | | Add debuging for all failure cases in aha_cmd(). Always check DATAIN_REG_READY even if we're ready to exit the read loop. The last fix allows the AHA-1640 MCA SCSI adapter to operate correctly and likely fixes problems on a few other oddball adapters. (I suspect my Dell Drive Array in 1540 mode needs this.) Reviewed by: Warner Losh
* Add support for the AHA-1640 SCSI adapter.mdodd1999-10-011-0/+247
| | | | | | The changes to sys/dev/aha/aha.c that allow these cards to function properly will be here in a day or 2.
* Use rmand_get_bus{tag,handle} rather than hard wiring things toimp1999-09-281-3/+3
| | | | | | I386_BUS_SPACE_IO. Compiles now on the Alpha, but likely will not work due to bus space address <-> virtual address mapping bogons that work for i386 but not alpha.
* Newbusification of aha. dfr sent me the first cut, and I made itimp1999-09-281-129/+165
| | | | | | | | | | | | | work. Be more verbose when one cannot allocate IRQ, et al since this is a common configuration problem. The cards have the IRQ soft wired into their BIOS and do not try to do collision detection. This can cause problems when this IRQ is the same as another card/device. The PNP hasn't been tested. My PNP board is in a deployed system. I'll sneak in testing of it sometime later. I've been able to mount the 3.3R cdrom that arrived today and access files off it. Submitted by: dfr
* Remove vestiges of old pnp code.dfr1999-09-031-8/+0
|
* Missed this use of the old pnp includes. I don't think this is meant topeter1999-09-021-1/+2
| | | | be here though.
* Stub out the old pnp code till these are converted so GENERIC builds again.peter1999-09-021-1/+2
|
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Properly set the alignment argument to bus_dma_tag_create(). If wegibbs1999-08-162-7/+7
| | | | don't care about the alignment, set it to 1, meaning single byte alignment.
* The 1542 cards do not allow adapter commands to be queued while mailboxgibbs1999-05-252-34/+90
| | | | | | | | | | | | commands are outstanding. You'd think they'd just clear the IDLE bit, but alas, no. Delay until all pending mailbox commands have completed in aha_cmd to work around this. Report sync rates correctly on Fast Adaptec cards. Clones may still be reported incorrectly since there is no documenation on how they report extended sync values. Clean up some unused fields in the aha softc.
* Put a small delay in before sending the inquire_setup command. Theimp1999-05-141-4/+6
| | | | | | | | | | | | | docs don't seem to shed light on why this is needed, but reports from the field indicate this helps prevent problems in this area. Ken's changes seem to have exposed this bug, rather than caused it, as far as I can tell. Thanks to Jack O'Neill for tracking this down. Submitted by: jack@germanium.xtalwind.net Very strong 3.2 merge candidate.
* Add another kludge to the card identification probe. It appears thatimp1999-05-111-4/+7
| | | | | | | | | | some aha 1542B cards will return 0x7f for the unimplemented GEOMETRY register. This is a good 3.2 candidate. PR: 11469 Submitted by: Thomas David Rivers
* Use haveseen_ioport() which is now connected up to the resource manager.peter1999-05-081-2/+2
|
* ahatimeout is static..peter1999-05-061-2/+2
|
* Add a number of interrelated CAM feature enhancements and bug fixes.ken1999-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)
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-5/+2
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Staticize.eivind1999-04-111-4/+4
|
* Better logging when the Geometry register probe fails.imp1999-03-021-3/+3
|
* o enable plug and play support for the aha driver. Given the cumbersomeimp1999-01-203-22/+134
| | | | | | | | | | | | | | | | | | | | | | | | | pnp system in freebsd, I'm not sure how useful this will be, but my 1542CP seems to work well in plug and play mode and does seem to probe correctly at all the oddball addresses/irq/drqs that I tried. [[ I was unable to get /kernel.conf or /kernel.config to read in, so I wasn't able to verify that this method of userconfig works. that's one thing that makes pnp so hard to use in the current scheme. Pointers to the right new way of doing this accepted. ]] o Add some kludges to maybe bring support for 1540A/1542A into the driver. Since I have no 154xA cards, and the only person I know that has them hasn't given me feedback, I'm making this commit blind. o Honor unit numbers that are in the config file now. This allows one to hard wire the unit numbers (and have high unit numbers for plug and pray devices, which can't seem to be hardwired) and have the cards not migrate from aha1 -> aha0 should aha0 go on the fritz. I didn't verify that hard wired scsi busses would work, but did verify that hard wired aha addresses did work to a limited extent. Both aha0 and aha1 must be hardwired, or when the card that was in aha0 goes away, the probe for aha0 might pick up the card that otherwise would have been aha1.
* Invalid is spelled with the v *BEFORE* the a.imp1998-12-221-2/+2
|
* Don't calculate the residual twice.gibbs1998-12-221-7/+9
|
* o Convert length of hccb to integer from the array. Eivind Eklundimp1998-12-151-3/+8
| | | | | | | | | pointed this out, but I've not seen a manifestation of this. o Check against 0x00 as well as 0xff for geometry register, as some clone cards don't return 0xff. Vadim Mikhailov pointed this out in PR 8743 for his Dell SCSI Array controller working in AHA-1540 emulation mode. Note that this test is likely to go away in the future in favor of a better one Justin has recommended.
* Pull in fixes similar to those recently committed to the bt driver:gibbs1998-12-131-4/+9
| | | | | | | - For transactions of 0 length, us a non-residual checking CCB type. - Preserve command status if our interrupt handler completes a command while we are polling for completion in aha_cmd.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-11/+11
| | | | | | | | | | | | | | 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>
* o Patch, slightly altered, from Graham Menhennitt for older aha 1542Bimp1998-11-251-6/+15
| | | | | | | | cards. My machine didn't tickle this problem, so I can't tell if it fixed anything or not. However, it didn't break my already working 1542-{B,C,CF,CP} probes. o Minor comment correction o Minor correction in printf
* Noop Commit - Change was in last revision.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.
* Fix probes when a port address is specified.gibbs1998-11-101-25/+11
|
OpenPOWER on IntegriCloud