summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym
Commit message (Collapse)AuthorAgeFilesLines
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-4/+4
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Remove extraneous semicolons. They are already provided bydds2003-08-051-4/+4
| | | | | | | | the macro definition, and cause the generation of syntactically incorrect code that gcc happens to accept. Reviewed by: schweikh (mentor) MFC after: 4 weeks
* Mega busdma API commit.scottl2003-07-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Add amd64 support.peter2003-06-261-1/+1
|
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-141-22/+1
| | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl
* I deserve a big pointy hat for having missed all those referencesmux2003-04-101-3/+3
| | | | to bus_dmasync_op_t in my last commit.
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-7/+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 typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-303-4/+4
| | | | Add FreeBSD Id tag where missing.
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-2/+2
| | | | Verified by: md5
* Be consistent about functions being static.phk2002-10-161-6/+6
| | | | Spotted by: FlexeLint.
* Move the new byte order function prototypes from <sys/param.h> tomike2002-04-261-0/+1
| | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
* Fix some gcc-3.1+ warnings:peter2002-03-191-0/+2
| | | | | warning: deprecated use of label at end of compound statement umass.c:2626:46: multi-line string literals are deprecated
* Comment tokens after #undef <macroname> and #endif.jhb2001-12-131-4/+4
| | | | Reported by: gcc30
* Submitted by:David E. O'Briengroudier2001-11-241-4/+4
| | | | | | | | MFC after:3 days - Add memory barrier definition for sparc64. Patch sent by David E. O'Brien, approved by maintainer. - Fix an endianization error of a bus physical address used from SCRIPTS that made the driver fail on big endian machines as sparc64.
* MFC after: 0 daysgroudier2001-11-117-8/+8
|
* s/adress/address/kris2001-07-231-1/+1
| | | | | Inspired by: OpenBSD MFC After: 1 week
* Submitted by: Chip Salzenberg <chip@perlsupport.com>.groudier2001-07-011-2/+5
| | | | | | | | | MFC after: 5 days - Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM. This ensures LEDC bit will not be set on 896 and later chips. Submitted by Chip Salzenberg <chip@perlsupport.com>. - Add probe for Tekram 390 U2B/U2W SCSI (53C895) LED handling. Submitted by Chip Salzenberg <chip@valinux.com>
* Correctly initialize free_ccbq so that if we fail to attach (as ismjacob2001-04-091-9/+8
| | | | | | | possible for some systems where the device is there, but the BIOS hasn't allocated memory resources for it), we don't panic. Submitted by: Gerard Roudier
* Add #if'ed support for the future option CAM_NEW_TRAN_CODE.groudier2001-03-241-57/+236
|
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-011-2/+3
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* Fix:groudier2001-02-111-10/+32
| | | | | | | | | | | | | | | | | - Missing cpu_to_scr() added (endian-ness). Improvement (fix|workaroung??): - Blindly firing a PPR can lead to some messy situations due to various causes or misfeatures, for example: * The 53C1010-[33|66] supports offset 62 in DT mode, but only offset 31 in ST mode. As a result, a PPR(DT, offset 62) responded with PPR(ST, any offset > 31) must be rejected. * A device that doesn't know about PPR should reject it, but may also be confused by this message. When a PPR encounters problems, the driver now patches the goal transfer settings for legacy negotiations to be performed later with the offending target. This give a chance for bad situations to be fixed automagically.
* A couple of chip errata work-arounds refined:groudier2001-01-281-3/+3
| | | | | | | | | | | | | - When used on a 33MHz PCI BUS, the 53C1010-66 revision 0 requires extra clocks to be inserted in data out phase. Revision 1 is fixed. - The 53C1010-33 revision 1 requires internal cycles to be disabled due to possible contentions on IO registers. Revision 2 is fixed. Fix: - The probing of HVD from GPIO3 bit by the driver was reversed. The driver could misprobe the bus mode of a 825 or 875 chip that was not previously initialized (no BIOS for example).
* Remove unneeded include of <pci.h>alex2000-12-071-1/+0
| | | | Approved by: groudier
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* PR: kern/20895groudier2000-09-032-26/+46
| | | | | | | | | | | | | | | | | | | | | | | PR kern/20895: - Add FE_DAC new feature flag to distinguish between 64 bit PCI addressing (DAC cycles) and 64 bit PCI interface (64 bit Memory BARs). - Properly deal with chips that have a 32 bit PCI interface but support and may generate DAC. (Only SYM53C895A for now). PR misc/17584 (at least partially addressed): - Try detecting hardware combinations that trigger spurious PCI master parity error detections by the PCI chip. This work-around is implemented in the `snooptest' routine and consists in retrying with PCI master parity checking disabled if such an error is reported by the PCI chip during this test. Other: - Fix a tiny bug in WIDE negotiation that was very unlikely to be triggerred. The BUS width was wrongly compared against chip's max. offset.
* - Various comment fixes and additions.groudier2000-07-022-267/+62
| | | | | | | | | | - Add 2 explicit (paranoid?) memory barriers in the interrupt code (After the reading of the `flag' and prior to looking at the data, of course. :-) ). - Remove obsolete informations from the README.sym file. This commit actually results in no object difference for IA32, but 2x`mb' added for Alpha.
* - Fix a harmless compilation warning on Alpha.groudier2000-06-263-19/+62
| | | | | | | | | | | (Reported by Matthew Jacob) - Fix a couple of __inline__ (changed to __inline). - Check also against DT_DATA_IN phase on parity/crc error. (Merged from Pamela Delaney's changes in the Linux driver) - Fix support for phase mismatch handling from the C code for the C1010 (only useful for testing issue). - Add an asynchonous notification handler for `lost device' (AC_LOST).
* Fix a problem of user settings from TEKRAM NVRAMgroudier2000-06-131-6/+10
| | | | | | | | | | | | layout introduced in driver 1.5.3. The driver was confused by the bogus TEKRAM table used to translate user sync. setting to SCSI sync. factor. Btw, the new TEKRAM DC-390 U3D and U3W Ultra-160 controllers seem to be using BIOS from SYMBIOS/LSI and thus SYMBIOS NVRAM layout. If that means that TEKRAM will now offer real SYMBIOS software compatible SCSI controllers, then it is a *GREAT NEWS*.
* - Use `bus space' primitives for IO and MMIO insteadgroudier2000-06-081-88/+195
| | | | | | of IO/MMIO legacy methods. - Prepare the driver for big endian CPU support. - Clarify memory and IO barriers needed by the driver.
* - Make the NVRAM debug code compile and work.groudier2000-05-283-38/+65
| | | | | | | | | | - Get rid of a fiew uselessly `long' variables and casts to `long'. - Estimate the PCI clock for all chips, except C1010 for now (we should do that for each PCI BUS) - Refine a couple of C1010 errata work-arounds. - For now, make sure AIP generation is disabled for the C1010-66.
* Work-around a couple of C1010 quirks:groudier2000-05-073-40/+93
| | | | | | - Reload SCNTL3 after selection from host (C1010-33). - Reload SCNTL4 prior to any DATA OUT phase (C1010-66). - Use max SCSI offset 31 for ST but 62 for DT.
* Add missing $FreeBSD$peter2000-05-011-0/+2
|
* Phase mismatch handling from SCRIPTS had beengroudier2000-04-301-3/+3
| | | | broken by previous patch.
* This new version adds support for early NCR chips.groudier2000-04-296-2116/+4517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53C810 non 'A', 53C815 and 53C825 non 'A' are now attached by the driver (by default). The driver uses a different SCRIPTS set based on MEMORY MOVE instructions for these chips. 2 SCRIPTS sets (firmwares) numbered #1 and #2 are used for the whole support of the 53C8XX family to get possible: - FW #1 : Only based on MEMORY MOVE instructions. Selected for 810, 815, 825. - FW #2 : LOAD/STORE based. This is the firmware also used by previous driver versions. Selected for other chips. When both `ncr' and `sym' are configured, `sym' will now attach all the 53C8XX devices by default. Previous balancing between `ncr' and `sym' can be preserved by: - Either editing sym_conf.h and commenting the following compile option: #define SYM_CONF_GENERIC_SUPPORT (This also saves about 3.5Kb of kernel memory). - Or setting kernel config option SYM_SETUP_LP_PROBE_MAP to 64 (bit 0x40)
* 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.
* Second patch that prepares for the addition of thegroudier2000-04-161-301/+303
| | | | | | | | | | | | multi-firmware support. This patch just changes numerous names in the driver sources and is actually nilpotent. This has been checked by comparing the generated assembly code. The names that have been changed are related to the script names. They were named `script' and `script H'. They are now named respectively `script A' and `script B'.
* First patch that prepares for the adding of multi-firmwaregroudier2000-04-151-313/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | support. Changes are rather simplifications of the SCRIPTS interface (prior to complexifying it again;) ), dead code removes and comment fixes. Code removed: - Handling of kernel variables referenced from SCRIPTS. - Handling of selection without ATN. Slightly rewritten: - Handling of illegal phase (4/5) and data overrun conditions. Simplifications: - Extended error flag and bits now only set from the C code. - Move the extended error status (xerr_status) and nego status (nego_status) outside the data structure accessed by SCRIPTS (struct dsb). - Get rid of the script status field (scr_st). - Only patch SCR_NO_OP SCRIPTS instructions to adapt SCRIPTS to actual chip capabilities. Cosmetic changes: - Miscellaneous comments in SCRIPTS. - FreeBSD_4_Bus define replaced by FreeBSD_Bus_Io_Abstraction.
* This new driver version uses the DMA mapping interfacegroudier2000-04-022-322/+1023
| | | | | | | | | | | | | | | | | | | | | | | introduced in FreeBSD-4.0. The driver is now full up-to-date with regards to the current kernel interfaces. Another significant change in this driver version applies to the checking of the data direction. The driver is now able to check against the expected data direction in any circumstance and will not hang either if direction is wrong at the start of the IO, or if for some weird reason, the device changes to the wrong direction during the IO. This driver version is still usable under FreeBSD 3.2/3.3, since it only requires CAM, other kernel interface dependencies being #if'ed in the sources according to kernel version. But, in order to use the driver under those early kernel versions, user has to move the driver sources by hand and make appropriate tiny changes to let the kernel know about the driver. Other changes: - Remove the debugging stuff for WSR bit. - Get rid of some warnings about volatile being discarded.
* Simplifications:groudier2000-02-132-584/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove all the code intended to deal with experimental C1010 revisions. This code got useless due to commercial chip revisions having been fixed. Fixes: - Rewrite/rework the WSR condition handling. Previous drivers snooped on the BUS through the SBDL IO register and this has been discovered to trigger a spurious SCSI parity error when WSR had been set by chip and cleared by SCRIPTS prior to reading SBDL bit [0...7]. On the other hand, the C1010 does not use the SWIDE register when synchronous data transfers are taking place and requires a CHMOV (1) WHEN DATA_IN to be performed in order to move to memory the residual byte when WSR is set and the residual byte is useful data. BTW, the new WSR handling by the driver is simpler. - No longer attempt to read from SCRIPTS the SBDL register. This is intended to avoid to be victimized again by any other issue regarding the handling of this register by 8xx chips. Miscellaneous: - The driver is now able to handle the WSR + IGN RESIDUE condition at the end of a DATA IN I/O without need of a programmed interrupt. It is a minor? optimization. - A few other minor cosmetic changes. This driver version fixes notably a permanent SCSI parity error condition at boot that can be triggerred due to recent changes in cam_xpt.c between 1.79 and 1.80. Changes in CAM/XPT are fine, but the new handling of the full INQUIRY may trigger the driver problem when a target returned an odd value in the `additionnal length' field of the INQUIRY response. The diff against previous driver version is large, but it consists approximatively in: - 350 lignes removed and not compiled in previous drivers (They addressed experimental C1010 revisions) - 250 lignes added or changed, half being comments or empty lines. So, in fact, the real changes are about 120 lines of source. About 80 lines address SCRIPTS changes and about 40 lines address C code changes. Approved by: jkh New WSR handling reviewed by Pamela Delaney <pam.delaney@lsil.com> (For back-porting to Linux sym53c8xx driver 1.6x series)
* - Fix an issue that paniced the machine in data overrungroudier2000-01-281-3/+13
| | | | | | | condition. - 1 line change that allows to balance chips between ncr and sym using pci compat option (not compiled by default in 4.0 but maintains the driver source 3.4 compatible).
* - Add year 2000 copyright to driver files.groudier2000-01-083-20/+58
| | | | | | | | | | | - Set MAX_OFFS driver compile option to 63 (was 64 which is wrong). - Fix a typo in the SYMBIOS NVRAM layout structure and add field and bit definition for the support of PIM_NOBUSRESET. - Report to XPT PIM_NOBUSRESET and PIM_SCANHILO if set by user in NVRAM. - Negotiate SYNC immediately after WIDE response from the target as suggested by Justin Gibbs. - Remove some misleading comment about CmdQue handling by CAM. - Apply correctly the MAX_WIDE and MAX_OFFS driver options.
* - Add device entry for the next generation of C1010 devicegroudier2000-01-012-64/+97
| | | | | | | | | | | | | | (pci dev_id 0x21). - Start the SCRIPTS processor without resetting the SCSI BUS at initialization. - Remove the "Host adapter CCB chain" (got useless given the new queuing scheme). - Display correctly the state of SCSI signals, when SCSI BUS looks bad. - Cosmetic changes in messages printed out at initialization. - Notifications and messages on RESET conditions slightly reworked. - TEKRAM 24C16 NVRAM support fixed (also reported ok).
* Go ahead and take these off the vendor branch as Gerard Roudier is nowobrien1999-12-303-0/+8
| | | | | | a committer and will be maintaining these in the usual manner. Add $FreeBSD$'s to get them off on the right foot.
* * The C1010 stepping B0 (Rev 1) tested OK for DT transfers without the U3ENobrien1999-12-163-229/+311
| | | | | | | | | | | | | | broken bit work-around enabled. * Fixed a bug that made MDP not work. (However, MDP is actually not tested due to lack of hardware using this feature). * Chip table changed to support the C1010 B0 w/o the U3EN bit work-around enabled. * Add the SYM_SETUP_MAX_LUN, SYM_SETUP_LP_PROBE_MAP (used to tell the driver about chips that are to be claimed with lower priority than old PCI bus based driver (typically the ncr)), SYM_SETUP_SCSI_DIFF, and SYM_SETUP_PCI_PARITY options. Submitted by: Gerard Roudier <groudier@club-internet.fr>
* Update to the 0.12.0-19991127 patch + my header path & doc changes.obrien1999-11-282-29/+98
|
* Adjust `sym' include file path to match where `sym' landed in our tree.obrien1999-11-281-6/+7
| | | | | Done as vendor import as I hope the author will accept this patch, and I'm not ready to take this thing off the vendor branch yet.
OpenPOWER on IntegriCloud