Commit Graph

117 Commits

Author SHA1 Message Date
Matt Jacob
d23245c01c remove unnecessary includes 1999-10-11 19:30:59 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bruce Evans
d009ccfaf5 Cast pointers to uintptr_t instead of casting them to u_long, and/or vice
versa.  Cosmetic.
1999-08-24 00:56:50 +00:00
Matt Jacob
0470d791d0 Clarify and cleanup some CAM queueing breakages. 1999-08-16 20:11:45 +00:00
Matt Jacob
1a43c1fc14 add in SIMQFRZ_TIMED && CMD_RQLATER defines 1999-08-16 20:04:06 +00:00
Matt Jacob
4b9f078cf2 add in new ICB structure variant (for 2200) 1999-08-16 20:02:09 +00:00
Matt Jacob
0f747d722c Clarify lun limits for FC && SCSI. 1999-08-16 20:01:14 +00:00
Matt Jacob
ce7f792d94 More code cleanup. Go back to using FULL_LOGIN Fibre Chan if f/w is less than
1.17.0 level. Change where we do the loop database init. Add in the CMD_RQLATER
return. Add some register debounce.
1999-08-16 19:59:55 +00:00
Matt Jacob
0a5f7e8bd9 Set some correct return values. Prefer I/O map all the time unless configured
otherwise.
1999-08-16 19:52:29 +00:00
Justin T. Gibbs
086646f7c6 Properly set the alignment argument to bus_dma_tag_create(). If we
don't care about the alignment, set it to 1, meaning single byte alignment.
1999-08-16 01:52:21 +00:00
Matt Jacob
ecc94a93d5 add in (controlled by option) 2200 Expanded Lun F/W 1999-07-06 05:38:24 +00:00
Matt Jacob
9ba8673786 add in a boot environment isp_disable flag 1999-07-06 01:24:20 +00:00
Matt Jacob
100f099ba4 Wow- too much breakage..wait until you compile it, buckwheat... 1999-07-05 22:04:08 +00:00
Matt Jacob
86cb5d6b95 Oops- got sense of ifdef wrong 1999-07-05 22:01:48 +00:00
Matt Jacob
3692397b0d add 2200 f/w; fix botched define 1999-07-05 20:42:08 +00:00
Matt Jacob
5542fe4b1a add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W 1999-07-05 20:24:46 +00:00
Matt Jacob
a02592816a Well, don't try and probe 65535 luns- things just don't really work well
when this happens. Limit to 16 luns for the 2100/2200 for now.
1999-07-03 01:44:05 +00:00
Matt Jacob
222bb54266 Remove pre-CAM code. Add in getenv_int calls for variables isp_mem_map,
isp_io_map, isp_no_fwload, isp_fwload, isp_no_nvram, isp_fcduplex
which are all bitmaps of isp instances that should or shouldn't
map memory space, I/O space, not load f/w, load f/w, ignore nvram,
not ignore nvarm, set full duplex mode. Also have an isp_seed value
that we can use to generate a pseudo seed for a synthetic WWN.
Other minor cosmetic cleanup. Add in support for the Qlogic ISP
2200. Very important change where we actually check now to see
whether we were successful in mapping request and response queues
(and fibre channel scratch space).
1999-07-02 23:18:03 +00:00
Matt Jacob
02ab33795d Remove all pre-CAM code. Fix breakage for SCCLUN when it is in fact
ISP2100_SCCLUN. Make changes for how ISPASYNC_PDB_CHANGE_COMPLETE
is now ISPASYNC_PDB_CHANGED. Add in ISPASYNC_FABRIC_DEV case.
1999-07-02 23:12:58 +00:00
Matt Jacob
b460c5c9a9 Merge defunct isp_freebsd_cam.h into this file. Do some appropriate
changes like rolling minor revision levels and defines where we now
do default WWN seeding in the platform files.
1999-07-02 23:10:34 +00:00
Matt Jacob
83cdc1a2b0 Roll revision levels. Add support for the Qlogic 2200 (warn about
not having SCSI_ISP_SCCLUN config defined if we don't have f/w for
the 2200- it's resident firmware uses SCCLUN (65535 luns)). Change
the way the default LoopID is gathered (it's now a platform specific
define so that some attempt at a synthetic WWN can be made in case
NVRAM isn't readable).

Change initialization of options a bit- don't use ADISC. Set
FullDuplex mode if config options tells us to do so. Do not use
FULL_LOGIN after LIP- it's the right thing to do but it causes too
much loop disruption (Loop Resets). Sanity check some default
values. Redo construction of port and node WWNs based upon what we
have- if we have 2 in the top nibble, we can have distinct port
and node WWNs. Clean up some SCCLUN related code that we obviously
had never compiled (:-(). Audit commands coming int ispscsicmd and
don't throw commands at Fibre devices that do not have Class 3
service parameters TARGET ROLE defined.

Clean up f/w initialization a bit. Add Fabric support (or at least
the first blush of it). Whew - way too much to describe here.
Basically, after a LIP, hang out until we see a Loop Up or a Port
DataBase Change async event, then see if we're on a Fabric
(GET_PORT_NAME of FL_PORT_ID). If we are, try and scan the fabric
controller for fabric devices using the GetAllNext SNS subcommand.
As we find devices, announce them to the outer layer. Try and do
some guard code for broken (Brocade) SNS servers (that get stuck
in loops- gotta maybe do this a different way using the GP_ID3 cmd
instead).  Then do a scan of the lower (local loop) ids using a
GET_PORT_NAME to see if the f/w has logged into anything at that
loop id. If so, then do a GET_PORT_DATABASE command.  Do this scan
into a local database. At this point we can say the loop is 'Ready'.
After this, we merge our local loop port database with our stored
port database- in a as yet to be really fully exercised fashion we
try and follow the logic of something having moved around. The
first time we see something at a Loop ID, we fix it, for the purpose
of this system instance, at that Loop ID. If things shift around
so it ends up somewhere else, we still keep it at this Loop ID (our
'Target') but use the new (moved) Loop ID when we actually throw
commands at it. Check for insane cases of different Loop IDs both
claiming to have the same WWN- if that happens, invalidate both.
Notify the outer layer of devices that have arrived and devices
that have gone away. *Finally*, when this is done, search the
softc's database of Fabric devices and perform logout/login actions.
The Qlogic f/w maintains logout/login for all local loop devices.
We have to maintain logout/login for fabric devices- total PITA.
Expect to see this area undergo more change over time.
1999-07-02 23:06:38 +00:00
Matt Jacob
77d4e8361d Roll revision levels. Move DEFAULT_LOOPID definition to platform files.
Change some fcp parameter structures such that we can get the portid
(24 bit value), get both node and port WWN, know whether we're on a fabric
or not, note whether we've ever seen the loop up, and note the current
state of the loop.

Replace the isp_pdb_t structure in fcparams with a reduced cost structure
that maintains a static relationship to 'Target', but can have the actual
loop ID used change (in case, post LIP, we discover things have moved
around). This also retains portid and node/port WWNs.  This array gets
larger if we have fabric support compiled in.

Note special loop IDs that are invariate for this device- FL_PORT_ID
(0x7e) which tells us if there's a fabric controller present, FC_PORT_ID
and FC_SNS_ID (fabric controller port and fabric SNS server port). We don't
use the latter two for anything. IDs above FC_SNS_ID up through 255 are
available for mapping fabric devices to 'target' ids.

Add in a config define to set FC full duplex mode. Add in a define to
recognize the Qlogic 2200 boards. Add comments about ISPCTL commands.
Add and change some ISPASYNC enumes.
1999-07-02 22:46:31 +00:00
Matt Jacob
fc9961b5dd Add in SNS and Fabric login/logout commands. Clean up ICBOPT defines.
Remove INVALID_PDB_OPTIONS defines. Define generic SNS request and
response structures and the bare minimum GAN and GP3 subcommands.
1999-07-02 22:31:11 +00:00
Matt Jacob
8df9252043 This file is now obsolete. 1999-07-02 22:26:10 +00:00
Matt Jacob
956d0a937a roll firmware for FC 1999-07-02 17:07:39 +00:00
Matt Jacob
ec69779604 (corrections for type change in softc) 1999-06-24 16:42:33 +00:00
Matt Jacob
67eb623192 Bruce pointed out I was being silly with volatile.
Submitted by:	bde@freebsd.org
1999-06-24 16:34:00 +00:00
Matt Jacob
83ae4407f5 When asked to get the current transfer settings go do a dev_refresh
isp_update call to get a better chance at seeing whether a recent
settings change has latched up.
1999-05-12 19:00:16 +00:00
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