Commit 28c19d50 authored by Justin T. Gibbs's avatar Justin T. Gibbs

Aic7xxx Driver Update 6.2.28

	o Add some more DV diagnostic code
	o Fix bug that cause sequencer debug code to be
	  downloaded always.

Aic79xx Driver Update 1.3.0.RC2
	o Correct a bug that effectively limited DV to just ID 0.
	o Add some more DV diagnostic code
	o Misc code cleanups.
parent 589be8bd
......@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#154 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#156 $
*
* $FreeBSD$
*/
......@@ -4227,7 +4227,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
* but rejected our response, we already cleared the
* sync rate before sending our WDTR.
*/
if (tinfo->goal.period != tinfo->curr.offset) {
if (tinfo->goal.offset != tinfo->curr.offset) {
/* Start the sync negotiation */
ahd->msgout_index = 0;
......@@ -8245,8 +8245,11 @@ ahd_loadseq(struct ahd_softc *ahd)
}
ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE);
if (bootverbose)
if (bootverbose) {
printf(" %d instructions downloaded\n", downloaded);
printf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n",
ahd_name(ahd), ahd->features, ahd->bugs, ahd->flags);
}
}
static int
......
/*
* Adaptec AIC79xx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#113 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#115 $
*
* --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs.
......@@ -803,7 +803,7 @@ ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
/******************************** Macros **************************************/
#define BUILD_SCSIID(ahd, cmd) \
((((cmd)->target << TID_SHIFT) & TID) | (ahd)->our_id)
((((cmd)->device->id << TID_SHIFT) & TID) | (ahd)->our_id)
/************************ Host template entry points *************************/
static int ahd_linux_detect(Scsi_Host_Template *);
......@@ -2457,10 +2457,10 @@ ahd_linux_next_unit()
static void
ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd)
{
int i;
int numtarg;
u_int target_id;
u_int numtarg;
i = 0;
target_id = 0;
numtarg = 0;
if (aic79xx_no_reset != 0)
......@@ -2475,21 +2475,15 @@ ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd)
* Force negotiation to async for all targets that
* will not see an initial bus reset.
*/
for (; i < numtarg; i++) {
for (; target_id < numtarg; target_id++) {
struct ahd_devinfo devinfo;
struct ahd_initiator_tinfo *tinfo;
struct ahd_tmode_tstate *tstate;
u_int our_id;
u_int target_id;
char channel;
channel = 'A';
our_id = ahd->our_id;
target_id = i;
tinfo = ahd_fetch_transinfo(ahd, channel, our_id,
tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id,
target_id, &tstate);
ahd_compile_devinfo(&devinfo, our_id, target_id,
CAM_LUN_WILDCARD, channel, ROLE_INITIATOR);
ahd_compile_devinfo(&devinfo, ahd->our_id, target_id,
CAM_LUN_WILDCARD, 'A', ROLE_INITIATOR);
ahd_update_neg_request(ahd, &devinfo, tstate,
tinfo, AHD_NEG_ALWAYS);
}
......@@ -3976,9 +3970,11 @@ ahd_linux_dv_timeout(struct scsi_cmnd *cmd)
ahd_lock(ahd, &flags);
#ifdef AHD_DEBUG
if (ahd_debug & AHD_SHOW_DV)
if (ahd_debug & AHD_SHOW_DV) {
printf("%s: Timeout while doing DV command %x.\n",
ahd_name(ahd), cmd->cmnd[0]);
ahd_dump_card_state(ahd);
}
#endif
/*
......
......@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#106 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#107 $
*
*/
#ifndef _AIC79XX_LINUX_H_
......@@ -289,7 +289,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC79XX_DRIVER_VERSION "1.3.0.RC1"
#define AIC79XX_DRIVER_VERSION "1.3.0.RC2"
/**************************** Front End Queues ********************************/
/*
......
......@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#111 $
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
*
* $FreeBSD$
*/
......@@ -4548,7 +4548,8 @@ ahc_init(struct ahc_softc *ahc)
size_t driver_data_size;
uint32_t physaddr;
#ifdef AHC_DEBUG_SEQUENCER
#ifdef AHC_DEBUG
if ((ahc_debug & AHC_DEBUG_SEQUENCER) != 0)
ahc->flags |= AHC_SEQUENCER_DEBUG;
#endif
......@@ -4884,7 +4885,7 @@ ahc_init(struct ahc_softc *ahc)
tinfo->curr.protocol_version = 2;
tinfo->curr.transport_version = 2;
}
tstate->ultraenb = ultraenb;
tstate->ultraenb = 0;
}
ahc->user_discenable = discenable;
ahc->user_tagenable = tagenable;
......@@ -6492,8 +6493,11 @@ ahc_loadseq(struct ahc_softc *ahc)
ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE);
ahc_restart(ahc);
if (bootverbose)
if (bootverbose) {
printf(" %d instructions downloaded\n", downloaded);
printf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n",
ahc_name(ahc), ahc->features, ahc->bugs, ahc->flags);
}
}
static int
......@@ -6711,6 +6715,7 @@ ahc_dump_card_state(struct ahc_softc *ahc)
struct scb *scb;
struct scb_tailq *untagged_q;
u_int cur_col;
int paused;
int target;
int maxtarget;
int i;
......@@ -6721,12 +6726,21 @@ ahc_dump_card_state(struct ahc_softc *ahc)
uint8_t scb_index;
uint8_t saved_scbptr;
saved_scbptr = ahc_inb(ahc, SCBPTR);
if (ahc_is_paused(ahc)) {
paused = 1;
} else {
paused = 0;
ahc_pause(ahc);
}
saved_scbptr = ahc_inb(ahc, SCBPTR);
last_phase = ahc_inb(ahc, LASTPHASE);
printf("%s: Dumping Card State %s, at SEQADDR 0x%x\n",
printf(">>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\n"
"%s: Dumping Card State %s, at SEQADDR 0x%x\n",
ahc_name(ahc), ahc_lookup_phase_entry(last_phase)->phasemsg,
ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
if (paused)
printf("Card was paused\n");
printf("ACCUM = 0x%x, SINDEX = 0x%x, DINDEX = 0x%x, ARG_2 = 0x%x\n",
ahc_inb(ahc, ACCUM), ahc_inb(ahc, SINDEX), ahc_inb(ahc, DINDEX),
ahc_inb(ahc, ARG_2));
......@@ -6872,7 +6886,10 @@ ahc_dump_card_state(struct ahc_softc *ahc)
}
ahc_platform_dump_card_state(ahc);
printf("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n");
ahc_outb(ahc, SCBPTR, saved_scbptr);
if (paused == 0)
ahc_unpause(ahc);
}
/************************* Target Mode ****************************************/
......
/*
* Adaptec AIC7xxx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#178 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#179 $
*
* Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science.
......@@ -3473,9 +3473,11 @@ ahc_linux_dv_timeout(struct scsi_cmnd *cmd)
ahc_lock(ahc, &flags);
#ifdef AHC_DEBUG
if (ahc_debug & AHC_SHOW_DV)
if (ahc_debug & AHC_SHOW_DV) {
printf("%s: Timeout while doing DV command %x.\n",
ahc_name(ahc), cmd->cmnd[0]);
ahc_dump_card_state(ahc);
}
#endif
/*
......
......@@ -53,7 +53,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#122 $
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#123 $
*
*/
#ifndef _AIC7XXX_LINUX_H_
......@@ -302,7 +302,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC7XXX_DRIVER_VERSION "6.2.27"
#define AIC7XXX_DRIVER_VERSION "6.2.28"
/**************************** Front End Queues ********************************/
/*
......
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