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).
the macro definition, and cause the generation of syntactically
incorrect code that gcc happens to accept.
Reviewed by: schweikh (mentor)
MFC after: 4 weeks
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
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
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: 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>
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
- 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.
- 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).
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
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.
- 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.
(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).
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*.
- 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.
- 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.
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)
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'.