Commit Graph

85 Commits

Author SHA1 Message Date
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +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
Warner Losh
ed7b35c79d Remove bt_softcs. It is no longer used. 1999-05-05 06:45:10 +00:00
Peter Wemm
8e51a153aa Revert part of 1.9; we don't need to reset the port after release now that
the isa bus doesn't clear the hints at that point.
1999-04-24 06:48:27 +00:00
Peter Wemm
0483b5b696 Typo, use SYS_RES_IRQ when releasing the irq resource, not SYS_RES_IOPORT. 1999-04-24 06:46:10 +00:00
Justin T. Gibbs
1d28309371 ahc_pci.c:
Convert to new bus and bus dma.
	Use latest PCI API.

bt_pci.c:
	Fix a few bugs in how resourses are released left over from
	when this driver was converted to new bus.
1999-04-23 23:30:22 +00:00
Justin T. Gibbs
047a1fb181 bt.c:
Simplify some inline functions.
btreg.h:
	Correct a comment.
1999-04-23 23:28:20 +00:00
Doug Rabson
c2974efdbe Make bt driver work on eisa again.
Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-04-20 09:53:05 +00:00
Peter Wemm
0f6bc47029 Make the bt isa driver work..
- fix cut/paste problem. :-)
- don't forget to call isa_dmacascade()
- reset the port after we release resources.

That last one is a trap to watch out for..  The isa bus driver uses the
same port/irq/mem/etc variables for the initial probe hints as it does
for allocation/deallocation tracking.  Releasing a resource clears the
variable and then you loose the hint during attach.. (ouch!)
1999-04-18 19:08:28 +00:00
Peter Wemm
d6a592e099 Check bus_setup_intr() as a seatbelt... 1999-04-18 19:03:50 +00:00
Peter Wemm
a49a3d4433 Implement an EISA new-bus framework. The old driver probe mechanism
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go.  The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa.  I have only tested the EISA part of this so far.

Submitted by:	 Doug Rabson <dfr@nlsystems.com>
1999-04-18 15:50:35 +00:00
Justin T. Gibbs
2ea77ad9af Improve bt_cmd() so that it has a better chance of working when there
are pending I/O transactions.  It is not clear that is works 100% of
the time under SMP, but since the bt_cmds() that are sent after other
CPUs are started are not critical, the driver will function until I
can figure out why this is the case.
1999-04-07 23:01:43 +00:00
Poul-Henning Kamp
bbca5c9c2c failled spell-check 1999-04-06 21:15:18 +00:00
Justin T. Gibbs
1652f91eb5 Fix a typo.
PR: 10722
Submitted by:	Chris Costello <chris@holly.dyndns.org>
1999-03-23 07:27:38 +00:00
Justin T. Gibbs
49529072c9 Add bt_port_probe() a routine shared by the EISA and ISA probe code to
determine IRQ and DRQ information.

Fix a bug that would cause us to attempt to retrieve extended sync
rate information on cards/firmware revs that do not support that command.
1999-03-08 21:36:34 +00:00
Justin T. Gibbs
e01902feb4 Ask the card where our interrupt is instead of attempting to use the EISA
config info.  On early revision cards (742a), the EISA register space,
other than the location used to determine the address of the card's main
command ports, is write only.
1999-03-08 21:35:03 +00:00
Justin T. Gibbs
4297664797 Pull 'ISA style' probe where interrupt information is determined through
commands sent to card, into the base driver module.  It is now used for
EISA board probes too.
1999-03-08 21:32:59 +00:00
Matthew Dillon
2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Justin T. Gibbs
4c196f451c Remove unsued variable.
If we are not transfering any data, use a non S/G ccb type that doesn't
return residual information.  It seems that some firmware revisions dislike
S/G ccbs with 0 length S/G lists.

Correct bt_cmd() so that we always honor command status that was latched
by our interrupt routine while polling for completion..
1998-12-11 03:50:35 +00:00
Archie Cobbs
2127f26023 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
Justin T. Gibbs
921cb54a13 Move a diagnostic behind "if (bootverbose)". 1998-11-13 13:23:36 +00:00
Justin T. Gibbs
712463b1fa Noop Commit - Change was in last revision.
If the next available mailbox is not in the free state, print a warning
and handle the condition as a temporary resource shortage.  The condition
should never happen, but we shouldn't panic since recovery is possible.
1998-11-10 06:47:11 +00:00
Justin T. Gibbs
4ff057c7b0 Convert to change in ISA compatiblity port handling in the base bt driver. 1998-11-10 06:45:14 +00:00
Justin T. Gibbs
3c1cabf7a2 Fix probes when a port address is specified. 1998-11-10 06:44:54 +00:00
Justin T. Gibbs
400ea5dc6a Do not disable the ISA compatibility window if it is the same value as
that set for our PCI IO address space.  This can happen on the BT-946.
1998-10-30 02:06:44 +00:00
Justin T. Gibbs
4663e36736 -Wunused cleanup.
Submitted by:	Poul-Henning Kamp <phk@freebsd.org>
1998-10-15 23:46:33 +00:00
Justin T. Gibbs
0a42741c4a Honor CAM_TAG_ACTION_NONE. 1998-10-15 23:17:58 +00:00
Warner Losh
bb415a7e88 Fix breakage introduced by last patch. bde has added CC_QUIET flag to
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.

Requested by: bde
Reviewed by: gibbs
1998-10-12 18:53:33 +00:00
Warner Losh
19bed41a5d Fix conficts in probe:
o For bt and aha only probe the one I/O range if a specific I/O is specified
  in the config file.
o Don't even try to probe I/O ranges that have been seen already.
o If we conflict with an IRQ or DRQ, then fail the probe.

Requested by: bde, gibbs
Approved by: jkh
1998-10-10 00:44:12 +00:00
Justin T. Gibbs
9574f7968d Hook up ahapoll so that dumps, synchronize cache commands or any other
command that comes in through xpt_polled_action works correctly.
1998-10-09 21:38:36 +00:00
Bruce Evans
f28d6834e1 Removed unused include of "ioconf.h" again. The CAM changes made ioconf.h
empty but regressed to including it here.
1998-09-24 10:43:42 +00:00
Justin T. Gibbs
8726fc121b On wide cards with firmware revisions < 5.06L, we have to infer that
wide targets are in fact running wide since the "setup info" command
for these revisions does not fill out the wide negotiation bits.
1998-09-20 05:08:15 +00:00
Justin T. Gibbs
c2921d36a9 Use %p with (void *) casts to print pointers with printf. 1998-09-17 00:08:29 +00:00
Justin T. Gibbs
6954e80f7b Fix printf format bugs. 1998-09-16 03:27:12 +00:00
Justin T. Gibbs
532abf3b7a Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM. 1998-09-15 07:32:57 +00:00