summaryrefslogtreecommitdiff
path: root/sys/dev/ic/aic79xx_openbsd.c
AgeCommit message (Collapse)Author
2006-03-04All CAM_* values stored in xs->error must be 'interpreted' byKenneth R Westerback
ah[cd]_done() into XS_* values understood by the SCSI code before returning xs to the tender mercies of the SCSI code. So if we bail out without calling ah[cd]_done(), because the request cdb length is excessive, don't use ah[cd]_set_transaction() to put CAM_REQ_INVALID into xs->error, just jam in XS_DRIVER_STUFFUP as ah[cd]_done() would have. If CAM_REQ_INVALID escapes it will be interpreted as XS_SHORT_SENSE as far as I can tell. This code path should never be trod so the net effect should be minimal.
2005-12-28Strip out fancy timeout code that attempts to mimic FreeBSD's threadKenneth R Westerback
based timeout handling. Use the simple timeout == bus reset model instead. Also move verbose debug output inside #ifdef/#endif. Fixes immediate crashes on encountering a timeout. Noted by per englebrecht when trying 'smartctl -d scsi -a /dev/rsd0c'. Thanks to per englebrecht and luiz gustavo for testing. Should only impact timeout handling. No change to normal processing. ok marco@
2005-11-02It is invalid to scsi_done(xs) and then return TRY_AGAIN_LATER.Kenneth R Westerback
scsi_done() can release the scsi_request xs and TRY_AGAIN_LATER will refer to it and submit it for re-execution. This was being done only if bus_dmamap_load() failed. Ensure the controller resources are freed before returning TRY_AGAIN_LATER, since new resources will be allocated when the command is executed again. Don't bother setting xs->error before returning TRY_AGAIN_LATER as the code returned to sets xs->error to XS_BUSY. ok marco@
2005-10-06Use correct timer when reinstating timeouts. Adapted from FreeBSDKenneth R Westerback
aic79xx_osm.c r1.22 fix by gibbs.
2004-12-30Current ahd timeout code does nothing. Add fbsd style timeoutKenneth R Westerback
handling which will at least try to recover. ok marco@.
2004-12-28Don't allow an infinite number of SCSI bus resets per i/o.Kenneth R Westerback
ok marco@.
2004-12-27Fix tag handling for non-U320/packetized devices. Allow tags for theseKenneth R Westerback
devices. Tidy up man page, remove lies and cruft. ok marco@.
2004-12-24Kill bit of ahc cruft. Elminate lots of leading spaces. Other KNF. NoKenneth R Westerback
functional change.
2004-12-20In the rare case that SCSI_RESET is set, ensure that xs->stimeout isKenneth R Westerback
valid and don't call ahd_setup_data() after ahd_execute_scb() may have freed the scb.
2004-12-20Activate packetized status handling.Kenneth R Westerback
ok tdeval@.
2004-12-19Reduce delta to FreeBSD by adding and using ahd_alloc() rather thanKenneth R Westerback
manually reproducing bits in ahd_pci.c. Just as in ahc, avoid allocating and freeing zero length bits of memory for platform data. Don't try to free all or part of ahd_softc, but correctly free allocated memory for seep_config if necessary. Add a final few fields to ahd_softc and scb in preparation for updating/fixing timeout handling. No functional changes.
2004-12-13Use millisends rather than microseconds in parameters to timerKenneth R Westerback
functions, and ultra-conservative calculations, to avoid possible overflow issues. Also consistant with values passed in scsi requests. Whitespace and comment tweaks. Update FreeBSD tags now that we are sync'd to the latest version. From FreeBSD aic79xx.c r1.33, aic79xx.h r1.23, aic_osm_lib.h r1.4.
2004-11-23More FreeBSD delta reduction. Use aic_* defines rather than ahd_* oneKenneth R Westerback
line and zero line functions. Fix a potential bug (ahd_set_transaction_status was used where ahd_set_scsi_status was intended) inside a currently #ifdef 0/#endif section of code. No functional changes intended except for a bit of extra locking via ahd_list_lock*. ok marco@.
2004-11-18More NetBSD cruft removal/FreeBSD delta reduction. Whitespace, function and ↵Kenneth R Westerback
variable shuffle. No functional change.
2004-11-14More NetBSD cruft removal, starting with 'struct ahd_pci_busdata' andKenneth R Westerback
the fallout from that. Ensure pcireg_t variables are being used with pci_conf_read/write functions - found one uint16_t variable (pcix_status) being used to store and restore (32 bit) pcireg_t values. Some KNF. No functional changes.
2004-10-10Work around "overlapped command" issue on devices that are slower than U320. ↵Marco Peereboom
Committing this due to a preemptive "I don't like your fix" comment from krw@ Tested by pval@, krw@ and me, ok krw@
2004-08-23Fix license. ok krw@, deraadt@ tedu@ & Milos Urbanek <urbanek at zoom-int.cz>Marco Peereboom
2004-08-13Fix issue with auto request sense handling for both ahc and ahd.Kenneth R Westerback
Restore hppa functionality, add sgi functionality for ahc. ok deraadt@, plus marco@, mickey@, pefo@ for various bits.
2004-08-06Remove __static inline to make the kernel ~24k smaller on i386 and make the ↵Marco Peereboom
debug sessions bearable. ok krw@ deraadt@
2004-06-22Enable ahd interrupts and reset the channel before scanning the busKenneth R Westerback
for devices. This is how ahc is done too. Fixes probe hang on Theo's box with the 7902B chip. ok marco@
2004-06-21Fix ahd_[get|set]_transaction_status vs ahd_[get|set]_scsi_status confusion.Kenneth R Westerback
Allocate max number of SCB's at initialization. Display negotiated transfer parameters. ok marco@
2004-05-25Attach scsi bus, find devices without crashing, successfully do simpleKenneth R Westerback
i/o's on i386. De-static many functions. ok marco@
2004-05-20Remove bogus $Id.Marco Peereboom
2004-05-20Add ahd. ok krw@Marco Peereboom