Commit Graph

98 Commits

Author SHA1 Message Date
mjacob
e93f62fa29 Keep interrupts blocked for all of isp_pci_attach. Redo DMA routines
for target mode for cleanliness and accuracy.
2000-07-18 06:40:22 +00:00
mjacob
9d667c3b82 Change startup locking. Use new isp_handle_index function
for indexing off of handles to get dma maps.
2000-07-04 01:01:15 +00:00
mjacob
a66fa325f8 Clean up firmware load issues and remove darn near all config options.
Force alphas to prefer mem mapping as the default.

Basically, we have a pointer to a function which we can call which will
return us a pointer to firmware for the card we have. We call this function
(if it's non-NULL) with the address of our mdvec f/w pointer.

The way this works is that if ispfw (as a module or a static) is loaded,
it initializes the pointer in isp_pci, so we can call into to it to fetch
a pointer to a f/w set.

If ispfw is MOD_UNLOADed, it's retained a pointer to our mdvec f/w pointers,
which then get zeroed out so we don't have any references to data that's
now gone from kernel memory. Removing the f/w saves ~360KBytes.

Alas, there is no autounload mechanism that works for is here.
2000-06-18 05:18:55 +00:00
mjacob
39f4ff01fa Clean up defines for correct 12160/1080 exclusion. Final 4.0.
approved: JKH
2000-02-29 05:48:46 +00:00
mjacob
2d1e2e5550 If the CDB length is greater than 12 for parallel SCSI, ispscsicmd has
made the initial queue entry a EXTENDED CMD queue entry, so we have to
go straight to continuation segments for any data segments.

approved: jkh
2000-02-15 00:50:01 +00:00
mjacob
e7efba4ff7 Add in 12160 (Ultra3) support. Redo things to use the newbus code.
Approved: jkh@freebsd.org

PR:		16141
2000-02-11 19:45:17 +00:00
mjacob
6f78cf499f Remove compile warning not seen when compiling with target mode enabled. 2000-01-15 07:06:44 +00:00
mjacob
af62fb2de8 Redo FC target mode dma routine to try and generate an extra CTIO
in the not so odd case of Moving Data *AND* Sending Status in last CTIO *AND*
status is a CHECK CONDITION *AND* we have Sense Data to send.
2000-01-15 01:54:36 +00:00
mjacob
8928ecdac1 Add in an isp_tdebug environment variable. Clean up some debugging
printouts for clarity.
2000-01-04 03:41:40 +00:00
mjacob
c4a59d8a77 Support target mode operations. This involves having some variant
dma mapping callback routines to select from as target mode
entries are handled a fair bit differently from normal initiator
mode entries.
2000-01-03 23:50:13 +00:00
mjacob
9e5f68a92b Add Dual LVD bus (1280) support 1999-12-16 05:42:02 +00:00
mjacob
b2895f817a Fix dmasetup functions to have 16 bit queue indices. Get the chip revision
out of the PCI CLASS reg and store it in the softc. Use the getenv_quad
function to get a WWN override from the environment. Look for a config
value for same. Make slightly less lame the wwn seed construction.
1999-11-21 02:56:17 +00:00
gallatin
660a7daead Remove calls to alpha_register_pci_scsi(). After Mike's recent boot
changes, it no longer exists and is preventing alpha kernels from building.

reviewed by: msmith
1999-11-05 13:10:39 +00:00
mjacob
be6c08329b Organize things to cope with the (possible) lack of downloadable
firmware a bit better.
1999-10-30 19:35:11 +00:00
mjacob
b412a34789 Add in inclusion of machine/md_var.h (so alpha_scsi_bus_register or what
have you is prototyped). Removed code versions in md struct- not used
any more. Allocate transfer dma maps and xflist stuff in mbxdmasetup based
upon isp->isp_maxcmds. Allow for multiple calls to mbxdmasetup (for
isp_reset cases).
1999-10-17 19:03:11 +00:00
mjacob
e003de9fed remove unnecessary includes 1999-10-11 19:30:59 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bde
faf95163e9 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
mjacob
2c1579fa58 Set some correct return values. Prefer I/O map all the time unless configured
otherwise.
1999-08-16 19:52:29 +00:00
gibbs
c1664fa91a 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
mjacob
85059d8401 add in a boot environment isp_disable flag 1999-07-06 01:24:20 +00:00
mjacob
63bce97701 Wow- too much breakage..wait until you compile it, buckwheat... 1999-07-05 22:04:08 +00:00
mjacob
e1b443309a Oops- got sense of ifdef wrong 1999-07-05 22:01:48 +00:00
mjacob
0cbdaca922 add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W 1999-07-05 20:24:46 +00:00
mjacob
d6b6f6217d 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
mjacob
be4c63bf19 (corrections for type change in softc) 1999-06-24 16:42:33 +00:00
mjacob
f98dc1ea4a 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
peter
41b420910c 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
peter
d6f4bd18f5 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
eivind
57f5464515 Staticize. 1999-04-11 02:50:42 +00:00
mjacob
7ff85e7993 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
mjacob
1a6850fac8 enable 1080 LVD support 1999-03-25 22:53:56 +00:00
mjacob
7b78dc4e25 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
mjacob
866792d022 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
mjacob
3e8f15f133 roll internal release tag 1999-01-30 07:08:55 +00:00
mjacob
da7bad3421 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
mjacob
5c42627795 clarify headers;ansify 1998-12-28 19:24:23 +00:00
dillon
1b46557c21 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
mjacob
0ff3e17e01 trivial header fix 1998-12-05 00:07:04 +00:00
archie
982e80577d Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
dfr
36a8222236 Add hooks so that the alpha can detect which disk has the root partition. 1998-09-26 14:37:49 +00:00
mjacob
4cc465448d (requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver
that had depended on it for compilation within or without CAM to use
__FreeBSD_version instead).
1998-09-18 00:46:42 +00:00
mjacob
2b203e82ec A major amount of cleaning up:
+ Change some messages about CCB memory allocation
	+ Turn a failure to DMA map all of a transaction due to lack of
	  ISP queue entries into a requeue operation (instead of the
	  case where it had been treated the same as a DMA too big
	  operation).
	+ put back splsoftvm around bus_dmamap_load calls.
	+ cleanup (and fix a glaring bug) in the and of the dma setup
	  routine. Also, the dma setup routines either return CMD_QUEUED
	  (for success) or CMD_COMPLETE (for failure) or CMD_EAGAIN
	  (for requeuing for resource shortage reasons).
1998-09-17 21:11:21 +00:00
mjacob
d85d94f4f7 Alpha port related fixes from Doug Rabson.
Submitted by:	dfr
1998-09-16 16:43:17 +00:00
gibbs
ec8a52546b Convert ISP pci front end to CAM/bus space/dma.
Convert ncr driver to CAM.
1998-09-15 10:06:23 +00:00
bde
d09c7eccb2 Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.
1998-08-10 17:21:49 +00:00
bde
925110cd23 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
mjacob
8cd3efb7df Add support for the Qlogic ISP SCSI && FC/AL Adapters 1998-04-22 18:12:29 +00:00