Commit Graph

46 Commits

Author SHA1 Message Date
Stefan Eßer
b564b3e73e Don't use vtophys() for constant addresses, cache the translations in
the NCR control block (ncb) and command control block (ccb) instead.
1995-09-08 19:30:11 +00:00
Stefan Eßer
ab14793833 Applied patches that make the driver compile on NetBSD again.
They shouldn't affect FreeBSD, since they are within #ifdef NETBSD
directives.
Changed the HAD_ERROR return code into COMPLETE according to a comment
in "/sys/scsi/scsiconf.h"

Submitted by:	Andreas Wrede <andreas@planix.com>
1995-09-08 14:29:48 +00:00
Stefan Eßer
3a5a6263e3 Add support for 16 targets on WIDE SCSI bus.
This seems to work fine on my 53c810, but really should be tested on
a 53c825 with at least one target set to an ID >= 8.
The script is now copied to memory mapped using vm_page_alloc_contig(),
since it has to be physically contigous. This must be changed, if the
driver is converted into a loadable module !
Two of the probe messages are suppressed, unless "bootverbose" is set.
1995-09-07 20:53:40 +00:00
Stefan Eßer
8befc21fbd The NCR script has grown beyond one page (4KB). Since malloc() returns
contiguous memory in virtual space, but doesn't guarantee any particular
physical layout of pages, the script may be not contguous in physical
memory. This made the first write command fail in very rare cases.
This has been fixed by checking the region returned by malloc() for
being contiguous, but there should be a physical memory allocate
and later mapping to virtual memory instead.

A few assertions and error messages are improved.
1995-09-05 22:37:59 +00:00
Justin T. Gibbs
07b1c6b3c9 Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:34 +00:00
Stefan Eßer
d36d3f0e18 Print more information in case of unspecific error condition.
Do not print "in getcc reselect by" message unless DEBUG_RESTART is set.
1995-08-15 20:19:14 +00:00
Stefan Eßer
d54b39155a Return an extended status of XS_TIMEOUT (instead of XS_DRIVER_STUFFUP)
in case of an unspecific error (most likely software timeout after
SCSI bus reset).
This will make the generic SCSI code retry the failed command.
1995-08-13 14:59:38 +00:00
Stefan Eßer
e9a9607fbb Put back second case of CC handler in NCR script. 1995-07-07 12:30:39 +00:00
Stefan Eßer
57da02d3f3 Changes to support some CDROM drives and the Quantum Grand-Prix
series of hard disk drives, which don't accept any SCSI message
within an REQUEST SENSE command (i.e. even not an IDENTIFY to set
the LUN).
This patch obviates the need for QUIRK_NOMSG and thus all of the
device_tab[] entries in the NCR driver.
1995-06-28 16:40:58 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Stefan Eßer
244c89d543 Include <stddef.h> for standard definition of offsetof() instead of
defining it explicitly in the driver.
1995-03-31 00:05:08 +00:00
Stefan Eßer
41226e9d0a Set request sense data size from xp->req_sense_length if != 0.
Submitted by:	Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-22 19:45:22 +00:00
Stefan Eßer
6bf3dde846 Remove use of unitialised variable xp->req_sense_length.
Submitted by:	Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-22 11:00:23 +00:00
Stefan Eßer
82c5c9a9f0 Major cleanup: Stylistic changes, 386BSD specific code removed.
Adaptec to new PCI code.

Submitted by:	Wolfgang Stnglmeier <wolf@kintaro.cologne.de>
1995-03-21 22:14:27 +00:00
David Greenman
cb09d35cb0 Added a new field to the pci_device struct called pd_shutdown to specify
a device specific shutdown routine for devconf. Assign the value of this
to the kern_devconf struct. Implement a device shutdown routine for if_de
that disables the device. This will stop the device from corrupting memory
after a reboot.
1995-03-17 04:27:21 +00:00
Stefan Eßer
f37ec55185 Make ncr.c compile again (PRINT_ADDR() had been patched
into the middle of a printf() by a buggy diff ...).

Submitted by:	rgrimes
1995-03-16 13:02:40 +00:00
Stefan Eßer
8e95bee6d4 Conditionalise debug message.
Submitted by:	Peter Dufault <dufault@hda.com>
1995-03-15 18:15:32 +00:00
Stefan Eßer
252e349211 Reduce burst length to 4 DWORDs for now, since there seem to
be 486 chip sets that can't tolerate bursts > cache line size.
This should really made dependent on the particular buggy
chip sets, but for now we'll play safe ...
1995-03-03 16:44:33 +00:00
Stefan Eßer
dff6de1a8c Delete bogus semicolon in macro definition. 1995-02-27 17:10:20 +00:00
Stefan Eßer
9b7d1decfc Make people happy, who claim to better know how "interupt"
is to be spelled :).

Submitted by:	<wolf@kintaro.cologne.de> Wolfgang Stanglmeier
1995-02-25 17:34:03 +00:00
Stefan Eßer
fe5278a5cc Cleanup for compatibility with another OS.
Submitted by:	wolf
1995-02-22 18:04:56 +00:00
Stefan Eßer
3453c5d5db Improve diagnostics:
Test for correct execution of cache test script by NCR,
and give meaningful error description if it fails.
(A cache problem was reported before.)
Don't wait forever for cache test to complete (to protect
against faulty hardware).

Submitted by:	wolf
1995-02-17 16:45:08 +00:00
Stefan Eßer
6977dc165f For the sake of people, who like to move pci_configure()
before isa_configure() in autoconf.c:

ncr_intr() protected by splbio()/splx()

Submitted by:	wolf
1995-02-15 20:06:38 +00:00
Stefan Eßer
9ddf96998e ncr.c:
New config option "NCR_IOMAPPED" makes the driver use port I/O.
Put back in 53c815 defines, submitted by Mikael Hybsch <micke@dynas.se>.
These had got lost between cvs rev. 1.14 and now ...

pci.c:

Really write config space register.
Assign ports starting at 0xbc00.

Submitted by:	wolf
Reviewed by:	se
1995-02-14 23:33:38 +00:00
Stefan Eßer
1bc2211b44 Verify that NCR was mapped to uncached address.
Submitted by:	wolf@kintaro.cologne.de <Wolfgang Stanglmeier>
1995-02-14 22:48:01 +00:00
Poul-Henning Kamp
c70f45100d YFfix. 1995-02-14 06:28:25 +00:00
Stefan Eßer
045de8d38f Block interrupts in more places and warn about the NCR exception handler
being called at inappropriate times (should never happen !).

Reviewed by:	se
Submitted by:	wolf@kintaro.cologne.de (Wolfgang Stanglmeier)
1995-02-10 13:24:52 +00:00
Stefan Eßer
91857942bb Add short delay after NCR reset.
Submitted by:	wolf@kintaro.cologne.de (Wolfgang Stanglmeier)
1995-02-06 22:01:58 +00:00
Stefan Eßer
ee1b86ffbd Disable I/O port accesses in case the BIOS enabled them.
Clear all output lines except ATN and ACK when waiting
for target phase change.

Submitted by:	wolf (Wolfgang Stanglmeier)
1995-02-04 14:02:44 +00:00
Stefan Eßer
ea6ecb4e52 Disable disconnect after drive timeouts, since these
may be the result of reselect following too fast for
the driver to notice. Not the final solution, but the
problem has been seen only with very few devices.

Reviewed by:	se
Submitted by:	wolf (Wolfgang Stanglmeier)
1995-02-02 15:50:57 +00:00
David Greenman
6398cf3113 Reapplied all of Stefan's changes. What a mess - the files were modified
and moved at the same time. This made it *very* difficult to fix the
revision log lossage that happend when the files were moved. SIGH.
1995-02-02 13:12:18 +00:00
David Greenman
77e50733d8 Fixed up include paths after copying these in the repository. 1995-02-02 12:36:19 +00:00
Stefan Eßer
cde24835d3 Submitted by: Mikael Hybsch <micke@dynas.se>
Add support for NCR 53c815 PCI SCSI chip.
1995-01-12 14:01:13 +00:00
Stefan Eßer
99e7cabca3 Really deactivated the code that puts scsi stats into dk0.
This should have been disabled for some time, but I had screwed up ...
This made spurious values appear for fd0 in systat, when there was
NCR SCSI activity.
1994-11-28 23:18:46 +00:00
Andreas Schulz
339b10f15d Submitted by: Paul F. Werkowski
Add a quirk line for the SONY SDT-5000 like it is done for the WangDAT tapes.
1994-10-30 00:30:27 +00:00
Stefan Eßer
c3739b59ec Change some compile time defaults, which may be overridden from the
kernel config file by options lines.
Now the default settings are FAST SCSI, max. 4 TAGS, WIDE transfers,
if supported by the hardware ...
1994-10-27 20:12:46 +00:00
Stefan Eßer
6055e04518 Submitted by: "Randall W. Dean" <rwd@osf.org>
Fixed typo in initialisation of DMODE:
PCI burst length now really 16 transfers as advertised ...
1994-10-14 23:59:36 +00:00
Stefan Eßer
152f2ff316 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Debugging option changed, getirr() removed.
1994-10-13 01:11:13 +00:00
Stefan Eßer
5044407419 Submitted by: Bruce Evans <bde@zeta.org.au>
Function getirr() could clobber interrupt controller state.
1994-10-12 04:17:24 +00:00
Stefan Eßer
65772aee92 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Bug fixed, that caused system hang on first interrupt on some motherboards.

New version of PCI bus configuration code, now supports dynamic interrupt
configuration (using BIOS supplied values).
NCR SCSI and DEC Ethernet driver patched to use this feature.
*** Remove PCI IRQ specifications from your kernel config file ! ***
1994-10-12 02:33:23 +00:00
Stefan Eßer
799e5f277f Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
New version with improved support for WIDE SCSI using the NCR 53c825.
Test for buggy secondary cache implementations.
PCI Int to IRQ mapping now specified per slot.
1994-09-28 16:34:13 +00:00
Rodney W. Grimes
1ee6b373eb Add missing closing comment. I have taken the non-knf format
of this code up with the authors and they are looking at converting it,
but until then leave the format alone.
1994-09-24 02:42:11 +00:00
David Greenman
df9ab3049d Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included from
systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some
related code.
1994-09-16 13:33:56 +00:00
Stefan Eßer
45271d26ef Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
New version with support for the NCR 53c810 and 53c825.
Support for WIDE SCSI devices.
1994-09-16 00:22:32 +00:00
Stefan Eßer
5ec480ad23 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Merged in changes required for NetBSD support (by mycroft@gnu.ai.mit.edu)
and support for multiple NCR chips.
1994-09-01 02:01:45 +00:00
Stefan Eßer
37bd2c9c33 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + Stefan Esser <se>
Directory for PCI autoconfigure and device driver code.
1994-09-01 01:45:19 +00:00