Commit Graph

89 Commits

Author SHA1 Message Date
Matt Jacob
442257d9c5 be a bit more chatty about some speed negotiations 1999-05-12 18:56:55 +00:00
Matt Jacob
ea6f23cd7a A large set of changes to handle dual bus adapters. 1999-05-11 05:10:06 +00:00
Matt Jacob
5a025c82c6 Some massive thwunking in initialization to handle dual bus adapters. More
massive thwunking to include an XS_CHANNEL value. Some changes of how
parameters are reported to outer layers (including bus, e.g.). Yet more
stirring around in isp_mboxcmd to try and get it right. Decode of 1080/1240
NVRAM.
1999-05-11 05:06:55 +00:00
Matt Jacob
3e280ff080 Add in SCSI_QFULL definitions. Add in local storage for second SIM for
dual bus adapters. Add in XS_CHANNEL macro to get at it.
1999-05-11 05:04:24 +00:00
Matt Jacob
bb430bf78d Clean up some sprintfs. Add in a SCSI_QFULL an XS_CHANNEL definition
for 2.X versions. Disable fast posting for FC.
1999-05-11 05:03:33 +00:00
Matt Jacob
8259d0816f Roll core minor number. Re-layout a lot of SCSI fields to accomodate multiple
bus adapters.
1999-05-11 05:02:23 +00:00
Matt Jacob
981e6b253d Clean up some macros. Add in ISP 1080/1240 NVRAM layout definitions. 1999-05-11 05:01:26 +00:00
Matt Jacob
a8234ad186 add a couple of missing commands 1999-05-11 05:00:35 +00:00
Matt Jacob
c6608df332 Clean up 2.2.X support (which might have to be cleaned up again
after some of the previous commits). Add in support for the 1240
dual channel ISP card. Try the dance of unmapping a PCI interrupt
if we don't configure (if that ever works it'll be helpful).
1999-05-11 04:53:57 +00:00
Matt Jacob
41dce92a25 roll ISP 1080/1240 f/w 1999-05-11 02:56:34 +00:00
Peter Wemm
579f45fa60 Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it.  Driver writers can do
this if it's not defined.  (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)
1999-05-09 17:07:30 +00:00
Kenneth D. Merry
9deea8574e Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE:  These changes will require recompilation of any userland
applications, like cdrecord, xmcd, etc., that use the CAM passthrough
interface.  A make world is recommended.

camcontrol.[c8]:
 - We now support two new commands, "tags" and "negotiate".

	- The tags commands allows users to view the number of tagged
	  openings for a device as well as a number of other related
	  parameters, and it allows users to set tagged openings for
	  a device.

	- The negotiate command allows users to enable and disable
	  disconnection and tagged queueing, set sync rates, offsets
	  and bus width.  Note that not all of those features are
	  available for all controllers.  Only the adv, ahc, and ncr
	  drivers fully support all of the features at this point.
	  Some cards do not allow the setting of sync rates, offsets and
	  the like, and some of the drivers don't have any facilities to
	  do so.  Some drivers, like the adw driver, only support enabling
	  or disabling sync negotiation, but do not support setting sync
	  rates.

 - new description in the camcontrol man page of how to format a disk
 - cleanup of the camcontrol inquiry command
 - add support in the 'devlist' command for skipping unconfigured devices if
   -v was not specified on the command line.
 - make use of the new base_transfer_speed in the path inquiry CCB.
 - fix CCB bzero cases

cam_xpt.c, cam_sim.[ch], cam_ccb.h:

 - new flags on many CCB function codes to designate whether they're
   non-immediate, use a user-supplied CCB, and can only be passed from
   userland programs via the xpt device.  Use these flags in the transport
   layer and pass driver to categorize CCBs.

 - new flag in the transport layer device matching code for device nodes
   that indicates whether a device is unconfigured

 - bump the CAM version from 0x10 to 0x11

 - Change the CAM ioctls to use the version as their group code, so we can
   force users to recompile code even when the CCB size doesn't change.

 - add + fill in a new value in the path inquiry CCB, base_transfer_speed.
   Remove a corresponding field from the cam_sim structure, and add code to
   every SIM to set this field to the proper value.

 - Fix the set transfer settings code in the transport layer.

scsi_cd.c:

 - make some variables volatile instead of just casting them in various
   places
 - fix a race condition in the changer code
 - attach unless we get a "logical unit not supported" error.  This should
   fix all of the cases where people have devices that return weird errors
   when they don't have media in the drive.

scsi_da.c:

 - attach unless we get a "logical unit not supported" error

scsi_pass.c:

 - for immediate CCBs, just malloc a CCB to send the user request in.  This
   gets rid of the 'held' count problem in camcontrol tags.

scsi_pass.h:

 - change the CAM ioctls to use the CAM version as their group code.

adv driver:

 - Allow changing the sync rate and offset separately.

adw driver

 - Allow changing the sync rate and offset separately.

aha driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

ahc driver:

 - Allow setting offset and sync rate separately

bt driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

NCR driver:

 - Fix the ultra/ultra 2 negotiation bug
 - allow setting both the sync rate and offset separately

Other HBA drivers:
 - Put code in to set the base_transfer_speed field for
   XPT_GET_TRAN_SETTINGS CCBs.

Reviewed by:	gibbs, mjacob (isp), imp (aha)
1999-05-06 20:16:39 +00:00
Peter Wemm
96b3554e5c Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.
1999-04-24 20:17:05 +00:00
Matt Jacob
17b1ea0341 temp fix for internal queue overflow problem 1999-04-14 17:37:36 +00:00
Eivind Eklund
66235db57f Staticize. 1999-04-11 02:50:42 +00:00
Matt Jacob
3c6e29e07a Make firmware revision a triple. Clean up some FC init stuff for
board versions with no BIOS. Separate mailbox interrupts from
IOCB interrupts. Read OUTMAILBOX5 while RISC_INT is active- not
after you clear it (potential race condition). Clear out older broken
BIG_ENDIAN goop. Don't negotiate narrow/async for LVD busses at startup
if already in LVD mode. Note usage of presumptive 1040C revision. For
all the LIP, PDB Changed, Loop UP/DOWN async events, mark fw state
as unknown as well as marking the need to do a getpdb on targets- after
a LIP for certain the f/w has to do PRLI/PLOGI for all targets again
and marking f/w state as unknown gives us a fighting chance to (start
to) hold up for that to complete.
1999-04-04 02:28:29 +00:00
Matt Jacob
8ea807adf5 oops on this last 1999-04-04 02:22:42 +00:00
Matt Jacob
92718a7fc7 F/W revisions now a tuple (not a duple). Fix pre-CAM code. 1999-04-04 01:35:03 +00:00
Matt Jacob
bc3dacd6c7 Fix for pre-CAM kernels (again). Turn back on fast posting. 1999-04-04 01:34:06 +00:00
Matt Jacob
3c0e51c709 Remove incorrect BIG_ENDIAN defines and substitute in the SBus only macros
that will SBusify an isp header or the lun/target portions of a request IOCB-
and have these only valid iff __sparc__ (no non-sparc SBus machine that *I*
know about).
1999-04-04 01:32:09 +00:00
Matt Jacob
12b36e2d97 Change f/w revision to major,minor,micro version. Add in ISP1040C definition. 1999-04-04 01:26:08 +00:00
Matt Jacob
57fb3fbbac roll ISP1040 and ISP2100 f/w to latest release 1999-04-04 01:20:25 +00:00
Matt Jacob
ab6d004056 Read the board revision and trim cache line size back from 16 to 1
for early revision 2100 boards. Make sure to turn ROM off for these
boards.
1999-04-04 01:14:02 +00:00
Matt Jacob
3bd28825dd Annoying little nigglet- apparently *some* Qlogic temporarily ignore
settings you've just sent them and return random values if you follow
the set by a get. This causes problems when you latter run a Tag-enabled
command when you've command tagged mode off.
1999-03-26 00:33:13 +00:00
Matt Jacob
92c49d78da enable 1080 LVD support 1999-03-25 22:53:56 +00:00
Matt Jacob
4394c92f52 Add in 1080 LVD support and some basis also for the 1240. The port database
printout is now enabled.
1999-03-25 22:52:45 +00:00
Matt Jacob
7aae9d1348 roll internal tag level 1999-03-25 19:53:54 +00:00
Matt Jacob
dcb409d935 roll internal tag level 1999-03-25 19:47:33 +00:00
Matt Jacob
d59bd46908 Prep for 1080/1240 support. Those fine h/w engineers at Qlogic
gave yet another internal register layout model for what is
*still* the same architecture. I hope they saved billyuns of gates
'coz otherwise this is *really* annoying.
1999-03-17 05:07:18 +00:00
Matt Jacob
57c801f5cf A wad of changes- prepping for 1080/1240 support (which caused a massive
thwank in register layout goop). A different mboxcmd approach. Some PDB change
infrastructure. Some better management of loopdown/loopup events (keep them
distinct from resource starvation for simq freeze/unfreeze actions).
1999-03-17 05:04:39 +00:00
Matt Jacob
d951bbca48 Cleanup. Set all PCI parameters of importance. Set a define that will
allow us via config options prefer mem space to I/O space.
1999-02-09 01:12:52 +00:00
Matt Jacob
10f20e4038 Roll internal release tag. Roll core version minor. Fix broken DPARM_DEFAULT
define. Add a new config flag param (ISP_CFG_NONVRAM) whose intent it is
to cause NVRAM to be ignored. Add ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP
isp_async enums.

Amazingly enough, I did all my scsi_sa work recently without realizing
that I had a broken isp card whose (unchangeable- it's an old old old
isp1020) NVRAM has sync mode enabled, but disconnect/reconnect disabled-
the ISP_CFG_NONVRAM is definitely warranted when you want to bloody well
ignore the NVRAM and set something sensible.
1999-02-09 01:11:35 +00:00
Matt Jacob
68ce4ba588 clean up some NVRAM defines 1999-02-09 01:09:35 +00:00
Matt Jacob
cd5622a63b Add in defines that disable (temp) fast posting. 1999-02-09 01:09:03 +00:00
Matt Jacob
2b05293160 Allow fibre channel 'bus resets' to go through. Handle Loop Down/Loop Up
events by freezing/unfreezing the simq- nice to have such control at this
level! Do bus resets in attach layer (non-CAM defined code).
1999-02-09 01:08:38 +00:00
Matt Jacob
3c688670f5 Roll internal release tag. Print out if we're in a 64 bit PCI slot.
Use fast memory timing NVRAM parameter. Clean up and fix establishment
of default target parameters. Don't use NVRAM if are flagged as not to
do so (I had a busted NVRAM setup which I couldn't edit that enabled SYNC
mode but disabled disconnect/reconnect and wide!!). Fix delays after
resets. BUS resets not done in isp_init anymore- relegated to OS
specific outer layers. Fix a buglet where you can get in a loop for
a NULL xs in the completion list in isp_intr. Add in some defines that
can disable fast posting. Add in code for Loop Up/Loop Down events that
call into the outer layers as to what to do.
1999-02-09 01:07:06 +00:00
Matt Jacob
289b93c044 roll internal release tag 1999-02-09 01:05:42 +00:00
Matt Jacob
cbf57b472d Implement and use Fast Posting for both parallel && fibre. Redo a bit of
the startup code. Implement a call to outer framework function so that
asynchronous events can be handled (e.g., speed negotiation, target mode).

Roll internal release tags.
1999-01-30 07:29:00 +00:00
Matt Jacob
495bfaf206 Grrr.. Do the *correct* and *usable* 1.31 firmware. You have to power
cycle to get rid of the old 1.31 firmware. *@!$&^@&$!&^&^!!!!!

But anyway comment it out and use new SBus 7.55 firmware. We get fast posting
with this as well as 32 luns and target mode support.

(not that this is used yet in FreeBSD, but it's ready for FreeBSD-sparc
whenever it happens....)
1999-01-30 07:22:30 +00:00
Matt Jacob
73d5e7854f roll internal release tag 1999-01-30 07:20:50 +00:00
Matt Jacob
1d74fa4ca5 roll internal release tag 1999-01-30 07:08:55 +00:00
Matt Jacob
bff85e290f Suggested by bde@freebsd.org- memcpy not necessarily good to use. D'oh- not in
the BSD DKI. Stop being lazy and finish the defines so MEMCPY becomes bzero
for FreeBSD.
1999-01-10 11:15:23 +00:00
Matt Jacob
f7102a20c6 Add some prototype deadchip detection. Set FIFO bursting (1XX0 only-
it's already on for the 2XX0) and detect the broken 1040A FIFO. Change
bzero to MEMZERO (portability with **nux). Use memcpy for same reason.

Finally detect QUEUE FULL conditions and return this as an error that
will get cam_periph_error to do it's 'tagged openings now XXX' dance.
1999-01-10 02:55:10 +00:00
Matt Jacob
128101f362 up isp_fifo_threshold NVRAM storage to 3 bits (for future 128 bit) 1999-01-10 02:51:48 +00:00
Matt Jacob
f28c2b3f0b add MEMZERO portability defines 1999-01-10 02:51:06 +00:00
Matt Jacob
285e230daf Amazingly stupid forgetfullness had me forgetting to turn on FIFO bursts
for the 1XX0 cards. That cost > 50% performance.
1999-01-10 02:45:51 +00:00
Matt Jacob
17e318c604 clarify headers;ansify 1998-12-28 19:24:23 +00:00
Matt Jacob
c305536317 clarify headers;move uninit to outer layer;remove watchdog 1998-12-28 19:22:27 +00:00
Matthew Dillon
2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Matt Jacob
cc56928232 oops on last 1998-12-05 01:46:40 +00:00