Fix numerous problems with the abort/recovery code. Highlights include fixing

a race condition in how SDTR and WDTR negotiation are handled, fixes for multi-lun
non-tagged device recovery, and ensuring that the timedout scbs in the waiting queue
are cleaned up.

Fix a problem with SCB paging that caused bogus residuals to be reported.
This commit is contained in:
Justin T. Gibbs 1997-02-25 03:05:35 +00:00
parent 9df674522b
commit 5a02006d3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23099
2 changed files with 371 additions and 194 deletions

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: aic7xxx.h,v 1.39 1997/02/22 09:38:42 peter Exp $
*/
#ifndef _AIC7XXX_H_
@ -56,7 +56,7 @@
#define stqe_next sqe_next
#endif
#define AHC_NSEG 32 /* The number of dma segments supported.
#define AHC_NSEG 32 /* The number of dma segments supported.
* AHC_NSEG can be maxed out at 256 entries,
* but the kernel will never need to transfer
* such a large (1MB) request. To reduce the
@ -147,17 +147,17 @@ typedef enum {
SCB_ACTIVE = 0x0001,
SCB_ABORTED = 0x0002,
SCB_DEVICE_RESET = 0x0004,
SCB_IMMED = 0x0008,
SCB_SENSE = 0x0010,
SCB_TIMEDOUT = 0x0020,
SCB_QUEUED_FOR_DONE = 0x0040,
SCB_RECOVERY_SCB = 0x0080,
SCB_WAITINGQ = 0x0100,
SCB_ASSIGNEDQ = 0x0200,
SCB_SENTORDEREDTAG = 0x0400,
SCB_MSGOUT_SDTR = 0x0800,
SCB_MSGOUT_WDTR = 0x1000,
SCB_ABORT = 0x2000
SCB_SENSE = 0x0008,
SCB_TIMEDOUT = 0x0010,
SCB_QUEUED_FOR_DONE = 0x0020,
SCB_RECOVERY_SCB = 0x0040,
SCB_WAITINGQ = 0x0080,
SCB_ASSIGNEDQ = 0x0100,
SCB_SENTORDEREDTAG = 0x0200,
SCB_MSGOUT_SDTR = 0x0400,
SCB_MSGOUT_WDTR = 0x0800,
SCB_ABORT = 0x1000,
SCB_QUEUED_ABORT = 0x2000
} scb_flag;
/*
@ -290,8 +290,8 @@ struct ahc_softc {
u_int8_t pause;
u_int8_t in_timeout;
u_int8_t in_reset;
#define CHANNEL_A_RESET 0x01
#define CHANNEL_B_RESET 0x02
#define CHANNEL_A_RESET 0x01
#define CHANNEL_B_RESET 0x02
};
struct full_ahc_softc {
@ -313,7 +313,6 @@ extern int ahc_debug; /* Initialized in i386/scsi/aic7xxx.c */
#endif
#if defined(__FreeBSD__)
char *ahc_name __P((struct ahc_softc *ahc));
struct ahc_softc *ahc_alloc __P((int unit, u_int32_t io_base,