summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/siop.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* If we call siop_intr manually, make sure it's protected by splbio.art2002-07-201-2/+5
| | | | My filesystem has been chopped to pieces.
* fix the use of "cuz" in the tree; these are all in commentsjsyn2002-06-091-2/+2
| | | | noticed by aaron@, recommended by deraadt@
* First round of __P removal in sysmillert2002-03-141-18/+18
|
* Use the size of the cmd dmamap when syncing the scsi command, not data size.pefo2002-01-231-3/+3
| | | | OK krw@
* Switch everything to the new bus_dmamap_sync API.art2001-11-051-8/+8
| | | | | Most work by Wilbern Cobb <vedge@csoft.org> with some fixes from me, mickey@ and drahn@.
* From NetBSD: add __packed__ attribute to hardware structure thatkrw2001-10-301-2/+2
| | | | | | | lacked it (scr_table). Also remove scr_table_t typedef and just use 'struct scr_table' to be consistant with all other structures.
* Allocate an appropriate number of cbd's for each discovered LUNkrw2001-10-261-15/+16
| | | | | | | | | | | | at probe time, rather than allocating them dynamically as SCSI commands are started. This should eliminate one possible way of calling bus_dmamem_map() while in interrupt context. Potential problem spotted by Art@. Inspired by changes to achieve same effect in NetBSD by bouyer@.
* Complete (I hope) the changes to siop that make it pay attentionkrw2001-10-081-4/+11
| | | | | | | | | | to the quirks table. These latest changes, triggered by problems Dan Weeks was having and developed with a lot of testing by Dan, should ensure that siop is a) using the quirks of the correct LUN during wide/sync negotiations and b) calling siop_add_dev() for all LUN's which return valid information from an INQUIRY command.
* Prepare for transition to 5-parameter bus_dmamap_sync() by creating andkrw2001-08-261-12/+16
| | | | | | | | | | 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.
* Make siop pay attention to quirks table. This not only eliminates thekrw2001-08-181-28/+12
| | | | | | | | | | | | | | | ugly INQUIRY snooping but avoids adding even uglier #ifdef's to turn off stuff, e.g. tagged queuing. Add two disk drives now known to lie about supporting tagged queuing to quirks table. One from millert@ (<MICROP, 4421-07 0329SJ, 0329>) and one from Hakan Olsson (<SEAGATE, ST150176LW, 0002>). Add field 'inquiry_flags2' to struct scsi_link to hold flags2 field from struct scsi_inquiry_data. These flags relate to SCSI-3 specific features. Clean up some logic, eliminating need for TARF_PPR flag.
* Embedding newlines in strings is a bad idea, and prints out badly.espie2001-07-041-3/+3
| | | | Okay millert@, like previous commit.
* Revert change to using sc_link in calls to siop_print_info().krw2001-06-251-3/+3
| | | | | | | | | | | | sc_link->device_softc not necessarily available for devices like cd's that don't issue SCSI commands after INQUIRY during probe, leaving negotiation triggering to next LUN. Spotted by Nikolay Sturm. Fixing this is not worth the effort and added complexity for a cosmetic improvement. Keep code cleanups done at the same time, and add a typo fix (destiation -> destination).
* Remove an over-optimization from the polling loop of siop_scsicmd(),krw2001-06-241-6/+4
| | | | | | | | | | | i.e. calling siop_print_info() immediately for async devices. With the change to use xs->sc_link as parameter to siop_print_info() this immediate call wouldn't work as the sc_link is not initialized until AFTER the return from processing the INQUIRY command. So, just use the default negotiation logic which is triggered by the next command to be handled.
* Pass the device's scsi_link to siop_print_info(), instead of thekrw2001-06-241-4/+4
| | | | | | | | | | | | | | | | adapter's siop_softc. This allows easy access to the dv_xname of the device whose negotiation results are being reported. This makes boot probe and subsequent log messages clearer. e.g. message will now read sd0: negotiated tagged 16 bit 20 MHz 16 REQ/ACK offset xfers instead of siop0: target 0 now using tagged 16 bit 20 MHz 16 REQ/ACK offset xfers Clean up siop_print_info() a bit as long as we are there.
* Clean up supposedly 'impossible' case in siop_intr() sokrw2001-04-231-11/+13
| | | | | | | | | | | | | a) meaningful but not voluminous debug info is printed and clearly associated with the offending siop bus. b) instead of panic'ing, reset the scsi bus and return. This problem was only seen under heavy load on powerpc. Plus fix one typo (exeption -> exception). ok deraadt@
* Support U160 on 53c1010 chips.krw2001-04-151-68/+93
| | | | | | | | | | | | | | Add support for PPR negotiations and DT transfers, and the preservation and restoration of the SCNTL4 register which controls Ultra3 transfers. Redo sync lookup, since the same period factor can mean two things depending on whether you are using DT or ST. Keep a minimum allowed ST period factor, and a minimum allowd DT period factor for each adapter. Currently NO support for QAS or IUS or AIP.
* 1) Enable tag queuing.krw2001-03-061-74/+62
| | | | | | | | | | | | | | | | | | | | | | 2) Negotiate and report wide/sync only after INQUIRY results known. 3) Clean up wide/sync negotiation code a bit, ensuring that an agressive target does not prematurely force negotiation before the INQUIRY is done. Seen by millert@. 4) Ensure that a wide negotiation always resets the sync settings to async. 5) Some error message improvements from thorpej@NetBSD. 6) Some KNF. 7) Print wide/sync negotiation results after each completed negotiation. 8) Print some relevant information just before a panic that should never happen. But does on PowerPC.
* Typo police: various misspelling, capitalizations, etc.krw2001-03-011-37/+35
|
* If you can't do wide xfers, don't tempt the targets by offeringkrw2001-02-201-2/+7
| | | | it. They might not turn you down. Spotted by drahn@.
* Tone down the verbosity level on the siop driver, print negotiationkrw2001-02-201-15/+52
| | | | | | | | | | | | | | | results on one line, during boot polling only. Force wide/sync negotiations for all targets during boot. Delete extraneous name field and associated strings that duplicate info provided in INQUIRY data. Actually timeout during polling rather than wait forever for ITSDONE. Remove unneeded check for SCSI_POLL before calling scsi_done(). Makes logic conform to other drivers.
* Import siop, a replacement for the ncr SCSI driver, from NetBSD.krw2001-02-151-0/+2017
Written for NetBSD by Manuel Bouyer. Tested with various cards on i386 and alpha. Outstanding issue: doesn't work with PowerPC yet.