summaryrefslogtreecommitdiff
path: root/sys/dev/ic/iha.c
AgeCommit message (Collapse)Author
2003-10-21typos from Tom Cosgrove;Jason McIntyre
Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
2003-03-30As long as I am here pull in some useful changes from NetBSD.Kenneth R Westerback
1) Eliminate some magic numbers. 2) Eliminate some double semi-colons. 3) Rename iha_scsi_req_q to iha_scb.
2003-03-29A few final (I hope) tweaks to the dma fixes.Kenneth R Westerback
1) Return XS_DRIVER_STUFFUP if request sense cannot be loaded. 2) Try to avoid bus_dmamap_unload()'ing maps that have already been unloaded. 3) Try to avoid bus_dmamap_load()'ing maps that are loaded. 4) Be extra paranoid and ensure bus_dmamap_sync()'s are done before a bus_dmamap_unload().
2003-03-29Another chunk of bus_dma fixes. May actually approach correctness now.Kenneth R Westerback
1) Actually map and sync scatter gather list that is also DMA'd. 2) Actually map and sync request sense buffer. 3) Actually POSTREAD/WRITE sync data buffer after I/O, rather than skipping it because the I/O was successful and no chars were left to xfer. 4) Eliminate extra fields, clarify some names, reorder fields to clarify their use. 5) Put common scatter gather preparation logic into separate function. 6) If insertion of request sense command fails, complete active command with XS_SENSE, but zero'd sense data. 7) Eliminate physical address arithmetic as much as possible, centralizing remaining manipulations in code actually sending addresses to adapter.
2003-03-29Use sc_print_addr() where possible to improve messages.Kenneth R Westerback
Put debug messages in #ifdef sections. Eliminate a less than useful error message.
2003-03-28Fix REQUEST SENSE handling based on lessons learned struggling withKenneth R Westerback
osiop. 1) bus_dmamap_sync(POSTREAD) the request sense buffer *before* copying it to xs->sense. 2) Always terminate timeout on completion of command, starting new one for any REQUEST SENSE that is issued for non-polling commands. 3) Use pScb->SCB_Flags rather than xs->flags to ensure correct flags are used during REQUEST_SENSE processing. 4) bzero() sense buffer before reading data into it. This fixes a long standing problem where my Yamaha SCSI CD reported bogus errors during probe.
2002-11-14Rework iha copyight verbiage to make clear what needs to be clear forKenneth R Westerback
it to remain in the tree. With agreement of Initio. ok deraadt@
2002-10-09Remove trailing '\n's from panic messages.Kenneth R Westerback
Started by a commit to siop from provos@netbsd.org. ok miod@ millert@
2002-06-09fix the use of "cuz" in the tree; these are all in commentsJason Peel
noticed by aaron@, recommended by deraadt@
2002-03-14First round of __P removal in sysTodd C. Miller
2001-11-11Remove local defines for SCSI status codes and use those nowKenneth R Westerback
defined in scsi_all.h.
2001-11-05Switch everything to the new bus_dmamap_sync API.Artur Grabowski
Most work by Wilbern Cobb <vedge@csoft.org> with some fixes from me, mickey@ and drahn@.
2001-10-14Andreas Gunnarsson found a bug in iha that causes system crashesKenneth R Westerback
when running a DIAGNOSTIC kernel. This was exposed by the recent migration of the SCSI layer to use pools. timeout_del() was being called on de-allocated memory after every completed SCSI command. Which worked as long as the memory was not reused or zapped ... This patch, slightly modified from Andreas's original diff, moves the timeout_del() to before the call to scsi_done() which de-allocates the memory holding the timeout. All scb's that start a timeout go through this logic and have the timeout_del() called. ok millert@ deraadt@
2001-08-26Prepare for transition to 5-parameter bus_dmamap_sync() by creating andKenneth R Westerback
using *_bus_dmamap_sync() defines that are defined appropriately depending on __HAS_NEW_BUS_DMAMAP_SYNC. Most of the code changes are simple reversions to the original NetBSD code. Slip in a siop_script_sync() instead of a manually done code section.
2001-07-13Change references to inic-950 to inic-940/950 to reflect chipsKenneth R Westerback
actually supported. Update copyright to include 2001. Fold iha_se2_rd_all() into iha_read_eeprom(), eliminating magic number 31 at the same time, calculating correct offset of checksum at run time instead. Eliminate static global variable iha_nvram in favour of dynamic variable in iha_init_tulip(), which is only place it is used. Rectify a few typos in comments.
2001-07-13Remove static'ness of functions in line with normal OpenBSDKenneth R Westerback
preferences. Rename tul_* functions/variables iha_* for consistancy, since all are now visible. As updating the EEPROM did not work, don't try. Remove now unused static dftNvram variable, and functions used only in trying to write it to EEPROM. Make iha_rate_tbl a const.
2001-07-10Use offsetof() from sys/param.h, not a local define.Kenneth R Westerback
2001-07-09Minor code clean ups.Kenneth R Westerback
Rename some functions for better consistancy/clarity, e.g. tul_wdtr_done -> tul_wide_done tul_msgout_wide -> tul_msgout_wdtr Consolidate extended message generation into new function tul_msgout_extended() by using HCS_Msg[] array, replacing several repetitive bus_write_*() code sections. A couple of minor code clarifications to eliminate extra return statements and make absolutely sure HCS_ActScb is NULL during a reselect.
2001-07-09Fix incorrect logic 'optimization' so that sync is negotiated even ifKenneth R Westerback
wide is not. Now my CD drives on the narrow channel of the INI-9100UW negotiate to the same configuration they do on other cards.
2001-02-20Tone down the verbosity level slightly on the iha driver, printKenneth R Westerback
negotiation results on one line, during boot polling only, in same format as now used in siop. Move checking for probe INQUIRY commands to poll loop rather than checking every good I/O. Remove an unwanted debug statement and unneeded (resolved) XXX comment.
2001-02-08Use <scsi/scsi_message.h> defines rather than homegrown ones.Kenneth R Westerback
2001-01-23Add support for Initio INI-91xx SCSI CardsKenneth R Westerback