History log of /freebsd-10.0-release/sys/dev/sym/sym_hipd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 254263 12-Aug-2013 scottl

Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR. Thus, the bit is no longer
a reliable indication of capability, and should not be checked. This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by: jhb
Reviewed by: jfv, marius, achadd, achim
MFC after: 1 day


# 251403 04-Jun-2013 marius

- Flag sym(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713.
- Revert a part of r251402 in order to appease clang.


# 251402 04-Jun-2013 marius

Handle/mark/nuke unused arguments.


# 251394 04-Jun-2013 marius

CAM_DEV_QFREEZE handling should only be done on request submission but
neither on completion nor by SIM drivers in the first place. This issue
has been revealed by r249466.

Reviewed by: mav
MFC after: 3 days


# 247266 25-Feb-2013 mjacob

Don't try and negotiate sync mode if either period or offset are zero.

PR: kern/163064
Partially Submitted by: Peter <pmc@citylink.dinoex.sub.org>
MFC after: 1 month


# 246713 12-Feb-2013 kib

Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c. It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code. The MD busdma is then given a chance to do any final processing
in the complete() callback.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync(). Previously this was done in a type specific
way. Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by: jeff (sponsored by EMC/Isilon)
Reviewed by: kan (previous version), scottl,
mjacob (isp(4), no objections for target mode changes)
Discussed with: ian (arm changes)
Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)


# 245275 10-Jan-2013 imp

Use better arm memory barrier


# 245263 10-Jan-2013 imp

Clang complains about the comparision of fak < 0 always being
false. It is right. Delete it because on the next line we catch all
'negative' cases with the test > 2, since 'negative' numbers are just
really big unsigned numbers and we do an identical action.


# 244170 13-Dec-2012 gonzo

Add memory barrier macros for ARM


# 238621 19-Jul-2012 marius

Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user
data introduced in r236061. Using that flag doesn't make that much
sense on this case as the DMA maps using it are also created during
sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing
so may exhaust the bounce pages pool on architectures requiring
bounce pages. [1]
While at it, use a slightly more appropriate maxsegsz parameter.

PR: 169526
Submitted by: Mike Watters [1]
MFC after: 3 days


# 237101 14-Jun-2012 marius

Fix a braino in r236469; the number of DMA tags required for handling
MAXPHYS should be based on PAGE_SIZE rather than SYM_CONF_DMA_BOUNDARY.
While at it, reuse the SYM_CONF_MAX_SG macro for specifying the maximum
number of DMA tags so sym(4) itself doesn't size memory beyond what's
required for handling MAXPHYS.

PR: 168928
MFC after: 3 days


# 236488 02-Jun-2012 marius

Take advantage of nitems().

MFC after: 3 days


# 236063 26-May-2012 marius

Remove extraneous empty lines.

MFC after: 3 day


# 236061 26-May-2012 marius

- When creating the DMA tag for user data, don't ask for more segments
than required for handling MAXPHYS and report the resulting maximum
I/O size to CAM instead of implicitly limiting it to DFLTPHYS.
- Move the variables of sym_action2() out of nested scope as required
by style(9) and remove extraneous curly braces.
- Replace a magic value for PCIR_COMMAND with the appropriate macro.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Tested with a HBA donated by wilko.

MFC after: 3 days


# 226095 07-Oct-2011 marius

Merge from r225950:

Set the sense residual properly.

Reviewed by: ken


# 220944 22-Apr-2011 marius

- Correct spelling. [1]
- Remove variables which are unused besides initialization. [2]

Submitted by: brucec [1], Christoph Mallon [2]


# 207285 27-Apr-2010 marius

- On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.


# 198719 31-Oct-2009 se

While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)
do support 64bit addresses, the current SCRIPTS code supports only 32bit
addresses causing data corruption for buffer addresses >4GB. This problem
affects 64bit machines with more than 4GB RAM or amd64 with 4GB and
memory hole remapping.
Work-around this problem with a bus_dma tag that requests bounce-buffers
for addresses >4GB. This causes some overhead, but given the maximum SCSI
bus speed of 160MB/s compared, the effect should hardly be noticeable.
The problem was reported by Mike Watters (mike at mwatters net) who also
verified that this fix cures the problem.

Since this change is a NOOP on systems with less than 4GB RAM and fixes
data corruption (in RAM and on disk) on systems with more than 4GB, I hope
that this change is accepted for 8.0.

MFC after: 3 days (pending approval)


# 183895 14-Oct-2008 marius

Use xpt_register_async() in order to remove code duplication.

MFC after: 1 month


# 181399 07-Aug-2008 marius

Allow 53C1010 without NVRAM to negotiate Ultra-3.

MFC after: 3 days


# 179029 15-May-2008 marius

- Const'ify firmware and lookup-tables.
- Obsolete redundant inst_name and unit members of struct sym_hcb.
- Fix three more NULL vs. 0 confusions.
- Use device_set_softc(9) to tell the bus layer that this driver
allocates a instance of struct sym_hcb itself.


# 178468 24-Apr-2008 marius

- Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
in order to get rid of bus space handle and tag in struct sym_hcb.
- Remove unused members related to bus addresses in struct sym_hcb.
- sym(4) takes care of allocating an instance of struct sym_hcb
itself so don't let newbus allocate it as an unused softc also.
- Add basic MPSAFE locking. This includes changing the sym(4) CCBs
to be allocated up-front instead of on demand as needed. Besides
making these allocations more likely to succeed, this also solves
the problem of calling bus_dmamap_create(9) with the SIM mutex
held.

Reviewed by: scottl
MFC after: 1 month


# 178466 24-Apr-2008 marius

- Use NULL instead of 0 for pointers.
- Remove superfluous returns in functions returning void.
- In sym_alloc_lcb_tags() return directly instead of jumping
to a label which just returns.
- Fix some spelling in comments.
- Remove trailing whitespace.


# 171524 20-Jul-2007 se

Fix Symbios driver on amd64: Since amd64 has 64 bit pointers but the same
4KB pages as i386, data structures that just fit in one page on i386 (and
on 64 bit architectures with 8KB pages) can be distributed over two pages
on amd64. This is a porblem in the case of the Symbios driver, since the
SCRIPTS engine in the SCSI chip operates on physical addresses and needs
physically contiguous memory. Earlier patches used contigmalloc on amd64,
but this version replaces part of a structure by a pointer to that data.
In order to not introduce an extra indirection for other architectures,
the change has been made conditional on __amd64__.

Earlier attempts to repair this problem are removed (i.e. the macros that
made amd64 use contigmalloc). The fix was submitted by Jan Mikkelsen and
modified by me to only affect amd64.

PR: 89550
Submitted by: janm at transactionware dot com (Jan Mikkelsen)
Approved by: re (Hiroki Sato)
MFC after: 2 weeks


# 170996 22-Jun-2007 mjacob

Fix various compilation warnings for gcc-4.2.

Approved by: re (bruce)


# 170872 17-Jun-2007 scottl

Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now. This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.


# 168752 15-Apr-2007 scottl

Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM. Drivers that are not yet MPSAFE register Giant and operate as
usual. RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.


# 167248 05-Mar-2007 thomas

Fix typo in comment.


# 166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


# 166165 21-Jan-2007 marius

Change the remainder of the drivers for DMA'ing devices enabled in the
sparc64 GENERIC and the sound device drivers known working on sparc64
to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid
of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4),
stge(4) and ti(4) these changes are runtime tested (unless I booted up
the wrong kernels again...).


# 163896 01-Nov-2006 mjacob

2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.


# 158471 12-May-2006 jhb

Remove various bits of conditional Alpha code and fixup a few comments.


# 153145 05-Dec-2005 scottl

FreeBSD has had endian conversion macros for a long time. Axe the custom
macros in this driver.

MFC After: 3 days


# 153085 04-Dec-2005 ru

Use a compile-time detection of 64-bit addressing so that this
compiles on 32-bit machines.

Reported by: ale


# 153072 04-Dec-2005 ru

Fix -Wundef.


# 146734 29-May-2005 nyan

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


# 144147 26-Mar-2005 sam

eliminate double free when sym_cam_attach fails

Noticed by: Coverity Prevent analysis tool


# 143168 06-Mar-2005 imp

Use BUS_PROBE_DEFAULT


# 142515 25-Feb-2005 sam

avoid null ptr deref

Noticed by: Coverity Prevent analysis tool
Reviewed by: scottl


# 139545 01-Jan-2005 se

Attempt to fix Symbios driver on amd64. The private memory allocation
function provided by the driver limits allocations to the page size,
i.e. 4KB on i385 and 8KB on typical 64 bit processors. Since amd64
has 64 bit pointers, but only 4KB pages, an array of pointers that
just fits into one page on all the other processors, does require
2 pages on amd64.

In order to make this driver useful on amd64, the allocation unit
has been increased to 2 pages on amd64 and contigmalloc() is used
instead of malloc(). All other processor types are unaffected by
this change. This modification has only been compile-tested on
amd64, yet, but should just work (FLW).


# 135041 10-Sep-2004 mjacob

Make it depend on PCI as well.

Submitted by: Stefan eSSer


# 135040 10-Sep-2004 mjacob

Make sym depend, as a module, on cam.

Submitted by:"Norikatsu Shigemura" <nork@FreeBSD.org>


# 127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


# 123218 07-Dec-2003 imp

unifdef old interface support out to prevent false positives.

Suggested by: jeffr, obrien, and others


# 119690 02-Sep-2003 jhb

Use PCIR_BAR(x) instead of PCIR_MAPS.

Glanced over by: imp, gibbs
Tested by: i386 LINT


# 119420 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 119287 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


# 117126 01-Jul-2003 scottl

Mega busdma API commit.

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


# 116857 25-Jun-2003 peter

Add amd64 support.


# 116351 14-Jun-2003 njl

Merge common XPT_CALC_GEOMETRY functions into a single convenience function.
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


# 113350 10-Apr-2003 mux

I deserve a big pointy hat for having missed all those references
to bus_dmasync_op_t in my last commit.


# 110232 02-Feb-2003 alfred

Consolidate MIN/MAX macros into one place (param.h).

Submitted by: Hiten Pandya <hiten@unixdaemons.com>


# 108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


# 108470 30-Dec-2002 schweikh

Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.


# 105215 16-Oct-2002 phk

Be consistent about functions being static.

Spotted by: FlexeLint.


# 95533 26-Apr-2002 mike

Move the new byte order function prototypes from <sys/param.h> to
<sys/endian.h>. This puts us in line with NetBSD and OpenBSD.


# 92732 19-Mar-2002 peter

Fix some gcc-3.1+ warnings:
warning: deprecated use of label at end of compound statement
umass.c:2626:46: multi-line string literals are deprecated


# 87796 13-Dec-2001 jhb

Comment tokens after #undef <macroname> and #endif.

Reported by: gcc30


# 86850 24-Nov-2001 groudier

Submitted by:David E. O'Brien
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.


# 86268 11-Nov-2001 groudier

Change Copyright and email address (log omitted un previous commit)


# 86266 11-Nov-2001 groudier

MFC after: 0 days


# 80203 23-Jul-2001 kris

s/adress/address/

Inspired by: OpenBSD
MFC After: 1 week


# 79042 01-Jul-2001 groudier

Submitted by: Chip Salzenberg <chip@perlsupport.com>.
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>


# 75329 09-Apr-2001 mjacob

Correctly initialize free_ccbq so that if we fail to attach (as is
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


# 74755 24-Mar-2001 groudier

Add #if'ed support for the future option CAM_NEW_TRAN_CODE.


# 73280 01-Mar-2001 markm

Turn on interrupt-entropy harvesting for all/any mass storage devices
I could find. I have no doubt missed a couple.

Interrupt entropy harvesting is still conditional on the
kern.random.sys.harvest_interrupt sysctl.


# 72361 11-Feb-2001 groudier

Fix:
- 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.


# 71742 28-Jan-2001 groudier

A couple of chip errata work-arounds refined:
- 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).


# 69719 07-Dec-2000 alex

Remove unneeded include of <pci.h>

Approved by: groudier


# 67708 27-Oct-2000 phk

Convert all users of fldoff() to offsetof(). fldoff() is bad
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


# 67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


# 65404 03-Sep-2000 groudier

PR: kern/20895
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.


# 62422 02-Jul-2000 groudier

- Various comment fixes and additions.
- 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.


# 62134 26-Jun-2000 groudier

- Fix a harmless compilation warning on Alpha.
(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).


# 61639 13-Jun-2000 groudier

Fix a problem of user settings from TEKRAM NVRAM
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*.


# 61429 08-Jun-2000 groudier

- Use `bus space' primitives for IO and MMIO instead
of IO/MMIO legacy methods.
- Prepare the driver for big endian CPU support.
- Clarify memory and IO barriers needed by the driver.


# 61051 28-May-2000 groudier

- Make the NVRAM debug code compile and work.
- 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.


# 60134 07-May-2000 groudier

Work-around a couple of C1010 quirks:
- 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.


# 59800 30-Apr-2000 groudier

Phase mismatch handling from SCRIPTS had been
broken by previous patch.


# 59743 29-Apr-2000 groudier

This new version adds support for early NCR chips.
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)


# 59368 18-Apr-2000 phk

Remove unneeded <sys/buf.h> includes.

Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.


# 59292 16-Apr-2000 groudier

Second patch that prepares for the addition of the
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'.


# 59252 15-Apr-2000 groudier

First patch that prepares for the adding of multi-firmware
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.


# 58927 02-Apr-2000 groudier

This new driver version uses the DMA mapping interface
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.


# 57186 13-Feb-2000 groudier

Simplifications:
- 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)


# 56762 28-Jan-2000 groudier

- Fix an issue that paniced the machine in data overrun
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).


# 55628 08-Jan-2000 groudier

- Add year 2000 copyright to driver files.
- 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.


# 55300 01-Jan-2000 groudier

- Add device entry for the next generation of C1010 device
(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).


# 55258 30-Dec-1999 obrien

Go ahead and take these off the vendor branch as Gerard Roudier is now
a committer and will be maintaining these in the usual manner.

Add $FreeBSD$'s to get them off on the right foot.


# 54691 16-Dec-1999 obrien

This commit was generated by cvs2svn to compensate for changes in r54690,
which included commits to RCS files with non-trunk default branches.


# 54690 16-Dec-1999 obrien

* The C1010 stepping B0 (Rev 1) tested OK for DT transfers without the U3EN
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>


# 53809 27-Nov-1999 obrien

Update to the 0.12.0-19991127 patch + my header path & doc changes.


# 53799 27-Nov-1999 obrien

Adjust `sym' include file path to match where `sym' landed in our tree.

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.


# 53796 27-Nov-1999 obrien

Update to the SYM-0.11.0-19991120 patch.

Submitted by: Gerard Roudier <groudier@club-internet.fr>


# 53793 27-Nov-1999 obrien

Update to the SYM-0.10.0-19991111 patch.

Submitted by: Gerard Roudier <groudier@club-internet.fr>


# 53790 27-Nov-1999 obrien

New `sym' device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010
PCI SCSI controllers. This driver also supports the following Symbios/LSI
PCI SCSI chips: 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895.

However, it does NOT support earlier chips as the following ones: 53C810,
53C815, 53C825.

See README.sym for more details.

Submitted-by: Gerard Roudier <groudier@club-internet.fr>