Commit 6d1101b3 authored by Justin T. Gibbs's avatar Justin T. Gibbs

Update aic7xxx driver

 o Fix async negotiation bug when the initial bus reset is
   disabled if the target device rejects our WDTR of 0.
 o Fix typos.
 o Fix printf formats to work in both C99 and C89 environments.
parent fd30b79d
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#72 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#73 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -692,7 +692,7 @@ struct ahc_tmode_lstate; ...@@ -692,7 +692,7 @@ struct ahc_tmode_lstate;
#define AHC_WIDTH_UNKNOWN 0xFF #define AHC_WIDTH_UNKNOWN 0xFF
#define AHC_PERIOD_UNKNOWN 0xFF #define AHC_PERIOD_UNKNOWN 0xFF
#define AHC_OFFSET_UNKNOWN 0x0 #define AHC_OFFSET_UNKNOWN 0xFF
#define AHC_PPR_OPTS_UNKNOWN 0xFF #define AHC_PPR_OPTS_UNKNOWN 0xFF
/* /*
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
* *
* $FreeBSD$ * $FreeBSD$
*/ */
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $" VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $"
/* /*
* This file is processed by the aic7xxx_asm utility for use in assembling * This file is processed by the aic7xxx_asm utility for use in assembling
...@@ -1580,7 +1580,7 @@ const BUS_32_BIT 0x02 ...@@ -1580,7 +1580,7 @@ const BUS_32_BIT 0x02
const MAX_OFFSET_8BIT 0x0f const MAX_OFFSET_8BIT 0x0f
const MAX_OFFSET_16BIT 0x08 const MAX_OFFSET_16BIT 0x08
const MAX_OFFSET_ULTRA2 0x7f const MAX_OFFSET_ULTRA2 0x7f
const MAX_OFFSET 0xff const MAX_OFFSET 0x7f
const HOST_MSG 0xff const HOST_MSG 0xff
/* Target mode command processing constants */ /* Target mode command processing constants */
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#116 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#119 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -4898,12 +4898,12 @@ ahc_init(struct ahc_softc *ahc) ...@@ -4898,12 +4898,12 @@ ahc_init(struct ahc_softc *ahc)
#ifdef AHC_DEBUG #ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_MISC) { if (ahc_debug & AHC_SHOW_MISC) {
printf("%s: hardware scb %Zu bytes; kernel scb %Zu bytes; " printf("%s: hardware scb %u bytes; kernel scb %u bytes; "
"ahc_dma %Zu bytes\n", "ahc_dma %u bytes\n",
ahc_name(ahc), ahc_name(ahc),
sizeof(struct hardware_scb), (u_int)sizeof(struct hardware_scb),
sizeof(struct scb), (u_int)sizeof(struct scb),
sizeof(struct ahc_dma_seg)); (u_int)sizeof(struct ahc_dma_seg));
} }
#endif /* AHC_DEBUG */ #endif /* AHC_DEBUG */
...@@ -4974,7 +4974,7 @@ ahc_init(struct ahc_softc *ahc) ...@@ -4974,7 +4974,7 @@ ahc_init(struct ahc_softc *ahc)
* connection type we have with the target. * connection type we have with the target.
*/ */
tinfo->user.period = ahc_syncrates->period; tinfo->user.period = ahc_syncrates->period;
tinfo->user.offset = ~0; tinfo->user.offset = MAX_OFFSET;
} else { } else {
u_int scsirate; u_int scsirate;
uint16_t mask; uint16_t mask;
...@@ -5009,7 +5009,7 @@ ahc_init(struct ahc_softc *ahc) ...@@ -5009,7 +5009,7 @@ ahc_init(struct ahc_softc *ahc)
if (offset == 0) if (offset == 0)
tinfo->user.period = 0; tinfo->user.period = 0;
else else
tinfo->user.offset = ~0; tinfo->user.offset = MAX_OFFSET;
if ((scsirate & SXFR_ULTRA2) <= 8/*10MHz*/ if ((scsirate & SXFR_ULTRA2) <= 8/*10MHz*/
&& (ahc->features & AHC_DT) != 0) && (ahc->features & AHC_DT) != 0)
tinfo->user.ppr_options = tinfo->user.ppr_options =
...@@ -5027,7 +5027,7 @@ ahc_init(struct ahc_softc *ahc) ...@@ -5027,7 +5027,7 @@ ahc_init(struct ahc_softc *ahc)
? AHC_SYNCRATE_ULTRA ? AHC_SYNCRATE_ULTRA
: AHC_SYNCRATE_FAST); : AHC_SYNCRATE_FAST);
if (tinfo->user.period != 0) if (tinfo->user.period != 0)
tinfo->user.offset = ~0; tinfo->user.offset = MAX_OFFSET;
} }
if (tinfo->user.period == 0) if (tinfo->user.period == 0)
tinfo->user.offset = 0; tinfo->user.offset = 0;
......
/* /*
* Adaptec AIC7xxx device driver for Linux. * Adaptec AIC7xxx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#188 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#189 $
* *
* Copyright (c) 1994 John Aycock * Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science. * The University of Calgary Department of Computer Science.
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#126 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#127 $
* *
*/ */
#ifndef _AIC7XXX_LINUX_H_ #ifndef _AIC7XXX_LINUX_H_
...@@ -907,7 +907,7 @@ int aic7770_map_int(struct ahc_softc *ahc, u_int irq); ...@@ -907,7 +907,7 @@ int aic7770_map_int(struct ahc_softc *ahc, u_int irq);
*/ */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
#if defined(__sparc_v9__) || defined(__powerpc__) #if defined(__sparc_v9__) || defined(__powerpc__)
#error "PPC and Sparc platforms are only support under 2.1.92 and above" #error "PPC and Sparc platforms are only supported under 2.1.92 and above"
#endif #endif
#include <linux/bios32.h> #include <linux/bios32.h>
#endif #endif
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $
*/ */
typedef int (ahc_reg_print_t)(u_int, u_int *, u_int); typedef int (ahc_reg_print_t)(u_int, u_int *, u_int);
typedef struct ahc_reg_parse_entry { typedef struct ahc_reg_parse_entry {
...@@ -1776,7 +1776,7 @@ ahc_reg_print_t ahc_sg_cache_pre_print; ...@@ -1776,7 +1776,7 @@ ahc_reg_print_t ahc_sg_cache_pre_print;
#define SEQ_MAILBOX_SHIFT 0x00 #define SEQ_MAILBOX_SHIFT 0x00
#define TARGET_DATA_IN 0x01 #define TARGET_DATA_IN 0x01
#define HOST_MSG 0xff #define HOST_MSG 0xff
#define MAX_OFFSET 0xff #define MAX_OFFSET 0x7f
#define BUS_16_BIT 0x01 #define BUS_16_BIT 0x01
#define SCB_UPLOAD_SIZE 0x20 #define SCB_UPLOAD_SIZE 0x20
#define STACK_SIZE 0x04 #define STACK_SIZE 0x04
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $
*/ */
#include "aic7xxx_osm.h" #include "aic7xxx_osm.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $
*/ */
static uint8_t seqprog[] = { static uint8_t seqprog[] = {
0xb2, 0x00, 0x00, 0x08, 0xb2, 0x00, 0x00, 0x08,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment