Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d8433379
Commit
d8433379
authored
Dec 20, 2002
by
Justin T. Gibbs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to aic7xxx version 6.2.24 and aic79xx version 1.3.0_ALPHA5.
parent
f211e1fd
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1386 additions
and
684 deletions
+1386
-684
drivers/scsi/aic7xxx/Makefile
drivers/scsi/aic7xxx/Makefile
+3
-3
drivers/scsi/aic7xxx/aic79xx.h
drivers/scsi/aic7xxx/aic79xx.h
+46
-3
drivers/scsi/aic7xxx/aic79xx.reg
drivers/scsi/aic7xxx/aic79xx.reg
+77
-21
drivers/scsi/aic7xxx/aic79xx.seq
drivers/scsi/aic7xxx/aic79xx.seq
+75
-6
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_core.c
+312
-36
drivers/scsi/aic7xxx/aic79xx_inline.h
drivers/scsi/aic7xxx/aic79xx_inline.h
+7
-2
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
+148
-52
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/aic7xxx/aic79xx_osm.h
+11
-3
drivers/scsi/aic7xxx/aic79xx_proc.c
drivers/scsi/aic7xxx/aic79xx_proc.c
+3
-2
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
+101
-41
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
+87
-43
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
+462
-429
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_core.c
+1
-2
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
+46
-35
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm.h
+4
-3
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+3
-3
No files found.
drivers/scsi/aic7xxx/Makefile
View file @
d8433379
#
# Makefile for the Linux aic7xxx SCSI driver.
#
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#
2
$
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#
3
$
#
# Let kbuild descend into aicasm when cleaning
...
...
@@ -53,7 +53,7 @@ aic7xxx_gen = $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
ifeq
($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
aic7xxx_gen
+=
$(obj)
/aic7xxx_reg_print.c
aic7xxx_asm_cmd
=
$(obj)
/aicasm/aicasm
-I
$(src)
-r
$(obj)
/aic7xxx_reg.h
\
-p
aic7xxx_reg_print.c
-i
aic7xxx_osm.h
\
-p
$(obj)
/
aic7xxx_reg_print.c
-i
aic7xxx_osm.h
\
-o
$(obj)
/aic7xxx_seq.h
$(src)
/aic7xxx.seq
else
aic7xxx_asm_cmd
=
$(obj)
/aicasm/aicasm
-I
$(src)
-r
$(obj)
/aic7xxx_reg.h
\
...
...
@@ -69,7 +69,7 @@ aic79xx_gen = $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
ifeq
($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
aic79xx_gen
+=
$(obj)
/aic79xx_reg_print.c
aic79xx_asm_cmd
=
$(obj)
/aicasm/aicasm
-I
$(src)
-r
$(obj)
/aic79xx_reg.h
\
-p
aic79xx_reg_print.c
-i
aic79xx_osm.h
\
-p
$(obj)
/
aic79xx_reg_print.c
-i
aic79xx_osm.h
\
-o
$(obj)
/aic79xx_seq.h
$(src)
/aic79xx.seq
else
aic79xx_asm_cmd
=
$(obj)
/aicasm/aicasm
-I
$(src)
-r
$(obj)
/aic79xx_reg.h
\
...
...
drivers/scsi/aic7xxx/aic79xx.h
View file @
d8433379
...
...
@@ -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.h#7
6
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#7
8
$
*
* $FreeBSD$
*/
...
...
@@ -356,7 +356,9 @@ typedef enum {
AHD_CURRENT_SENSING
=
0x40000
,
AHD_SCB_CONFIG_USED
=
0x80000
,
/* No SEEPROM but SCB had info. */
AHD_HP_BOARD
=
0x100000
,
AHD_RESET_POLL_ACTIVE
=
0x200000
AHD_RESET_POLL_ACTIVE
=
0x200000
,
AHD_UPDATE_PEND_CMDS
=
0x400000
,
AHD_RUNNING_QOUTFIFO
=
0x800000
}
ahd_flag
;
/************************* Hardware SCB Definition ***************************/
...
...
@@ -1063,6 +1065,16 @@ struct ahd_softc {
* Timer handles for timer driven callbacks.
*/
ahd_timer_t
reset_timer
;
ahd_timer_t
stat_timer
;
/*
* Statistics.
*/
#define AHD_STAT_UPDATE_US 250000
/* 250ms */
#define AHD_STAT_BUCKETS 4
u_int
cmdcmplt_bucket
;
uint32_t
cmdcmplt_counts
[
AHD_STAT_BUCKETS
];
uint32_t
cmdcmplt_total
;
/*
* Card characteristics
...
...
@@ -1106,6 +1118,12 @@ struct ahd_softc {
struct
target_cmd
*
targetcmds
;
uint8_t
tqinfifonext
;
/*
* Cached verson of the hs_mailbox so we can avoid
* pausing the sequencer during mailbox updates.
*/
uint8_t
hs_mailbox
;
/*
* Incoming and outgoing message handling.
*/
...
...
@@ -1154,6 +1172,22 @@ struct ahd_softc {
/* Selection Timer settings */
int
seltime
;
/*
* Interrupt coalessing settings.
*/
#define AHD_INT_COALESSING_TIMER_DEFAULT 250
/*us*/
#define AHD_INT_COALESSING_MAXCMDS_DEFAULT 10
#define AHD_INT_COALESSING_MAXCMDS_MAX 127
#define AHD_INT_COALESSING_MINCMDS_DEFAULT 5
#define AHD_INT_COALESSING_MINCMDS_MAX 127
#define AHD_INT_COALESSING_THRESHOLD_DEFAULT 2000
#define AHD_INT_COALESSING_STOP_THRESHOLD_DEFAULT 1000
u_int
int_coalessing_timer
;
u_int
int_coalessing_maxcmds
;
u_int
int_coalessing_mincmds
;
u_int
int_coalessing_threshold
;
u_int
int_coalessing_stop_threshold
;
uint16_t
user_discenable
;
/* Disconnection allowed */
uint16_t
user_tagenable
;
/* Tagged Queuing allowed */
};
...
...
@@ -1240,6 +1274,7 @@ extern const int ahd_num_aic7770_devs;
/*************************** Function Declarations ****************************/
/******************************************************************************/
void
ahd_reset_cmds_pending
(
struct
ahd_softc
*
ahd
);
u_int
ahd_find_busy_tcl
(
struct
ahd_softc
*
ahd
,
u_int
tcl
);
void
ahd_busy_tcl
(
struct
ahd_softc
*
ahd
,
u_int
tcl
,
u_int
busyid
);
...
...
@@ -1273,6 +1308,12 @@ int ahd_default_config(struct ahd_softc *ahd);
int
ahd_parse_cfgdata
(
struct
ahd_softc
*
ahd
,
struct
seeprom_config
*
sc
);
void
ahd_intr_enable
(
struct
ahd_softc
*
ahd
,
int
enable
);
void
ahd_update_coalessing_values
(
struct
ahd_softc
*
ahd
,
u_int
timer
,
u_int
maxcmds
,
u_int
mincmds
);
void
ahd_enable_coalessing
(
struct
ahd_softc
*
ahd
,
int
enable
);
void
ahd_pause_and_flushwork
(
struct
ahd_softc
*
ahd
);
int
ahd_suspend
(
struct
ahd_softc
*
ahd
);
int
ahd_resume
(
struct
ahd_softc
*
ahd
);
...
...
@@ -1295,6 +1336,7 @@ int ahd_wait_flexport(struct ahd_softc *ahd);
/*************************** Interrupt Services *******************************/
void
ahd_pci_intr
(
struct
ahd_softc
*
ahd
);
void
ahd_clear_intstat
(
struct
ahd_softc
*
ahd
);
void
ahd_flush_qoutfifo
(
struct
ahd_softc
*
ahd
);
void
ahd_run_qoutfifo
(
struct
ahd_softc
*
ahd
);
#ifdef AHD_TARGET_MODE
void
ahd_run_tqinfifo
(
struct
ahd_softc
*
ahd
,
int
paused
);
...
...
@@ -1418,7 +1460,8 @@ extern uint32_t ahd_debug;
#define AHD_SHOW_QUEUE 0x02000
#define AHD_SHOW_TQIN 0x04000
#define AHD_SHOW_SG 0x08000
#define AHD_DEBUG_SEQUENCER 0x10000
#define AHD_SHOW_INT_COALESSING 0x10000
#define AHD_DEBUG_SEQUENCER 0x20000
#endif
void
ahd_print_scb
(
struct
scb
*
scb
);
void
ahd_print_devinfo
(
struct
ahd_softc
*
ahd
,
...
...
drivers/scsi/aic7xxx/aic79xx.reg
View file @
d8433379
...
...
@@ -39,7 +39,7 @@
*
* $FreeBSD$
*/
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
6
$"
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
9
$"
/*
* This file is processed by the aic7xxx_asm utility for use in assembling
...
...
@@ -265,16 +265,17 @@ register HESCB_QOFF {
* Host Mailbox
*/
register HS_MAILBOX {
address 0x0B
address 0x0
0
B
access_mode RW
mask HOST_TQINPOS 0x80 /* Boundary at either 0 or 128 */
mask ENINT_COALESS 0x40 /* Perform interrupt coalessing */
}
/*
* Sequencer Interupt Status
*/
register SEQINTSTAT {
address 0x0C
address 0x0
0
C
access_mode RO
field SEQ_SWTMRTO 0x10
field SEQ_SEQINT 0x08
...
...
@@ -287,7 +288,7 @@ register SEQINTSTAT {
* Clear SEQ Interrupt
*/
register CLRSEQINTSTAT {
address 0x0
C0
address 0x0
0C
access_mode WO
field CLRSEQ_SWTMRTO 0x10
field CLRSEQ_SEQINT 0x08
...
...
@@ -300,7 +301,7 @@ register CLRSEQINTSTAT {
* Software Timer
*/
register SWTIMER {
address 0x0
E0
address 0x0
0E
access_mode RW
size 2
}
...
...
@@ -3105,21 +3106,6 @@ register RCVRBIASCALC {
modes M_CFG
}
/*
* Data FIFO Debug Control
*/
register DFDBCTL {
address 0x0C8
access_mode RW
modes M_DFF0, M_DFF1
field DFF_CIO_WR_RDY 0x20
field DFF_CIO_RD_RDY 0x10
field DFF_DIR_ERR 0x08
field DFF_RAMBIST_FAIL 0x04
field DFF_RAMBIST_DONE 0x02
field DFF_RAMBIST_EN 0x01
}
/*
* Data FIFO Backup Read Pointer
* Contains the data FIFO address to be restored if the last
...
...
@@ -3141,6 +3127,21 @@ register SKEWCALC {
modes M_CFG
}
/*
* Data FIFO Debug Control
*/
register DFDBCTL {
address 0x0CB
access_mode RW
modes M_DFF0, M_DFF1
field DFF_CIO_WR_RDY 0x20
field DFF_CIO_RD_RDY 0x10
field DFF_DIR_ERR 0x08
field DFF_RAMBIST_FAIL 0x04
field DFF_RAMBIST_DONE 0x02
field DFF_RAMBIST_EN 0x01
}
/*
* Data FIFO Space Count
* Number of FIFO locations that are free.
...
...
@@ -3226,7 +3227,8 @@ register SEQINTCTL {
field INT1_CONTEXT 0x20
field SCS_SEQ_INT1M1 0x10
field SCS_SEQ_INT1M0 0x08
field INTMASK 0x06
field INTMASK2 0x04
field INTMASK1 0x02
field IRET 0x01
}
...
...
@@ -3686,6 +3688,53 @@ scratch_ram {
size 2
}
/*
* The maximum amount of time to wait, when interrupt coalessing
* is enabled, before issueing a CMDCMPLT interrupt for a completed
* command.
*/
INT_COALESSING_TIMER {
size 2
}
/*
* The maximum number of commands to coaless into a single interrupt.
* Actually the 2's complement of that value to simplify sequencer
* code.
*/
INT_COALESSING_MAXCMDS {
size 1
}
/*
* The minimum number of commands still outstanding required
* to continue coalessing (2's compliment of value).
*/
INT_COALESSING_MINCMDS {
size 1
}
/*
* Number of commands "in-flight".
*/
CMDS_PENDING {
size 2
}
/*
* The count of commands that have been coalessed.
*/
INT_COALESSING_CMDCOUNT {
size 1
}
/*
* Since the HS_MAIBOX is self clearing, copy its contents to
* this position in scratch ram every time it changes.
*/
LOCAL_HS_MAILBOX {
size 1
}
/*
* Target-mode CDB type to CDB length table used
* in non-packetized operation.
...
...
@@ -3860,6 +3909,13 @@ const SCB_TRANSFER_SIZE_1BYTE_LUN 48
/* PKT_OVERRUN_BUFSIZE must be a multiple of 256 less than 64K */
const PKT_OVERRUN_BUFSIZE 512
/*
* Timer parameters.
*/
const AHD_TIMER_US_PER_TICK 25
const AHD_TIMER_MAX_TICKS 0xFFFF
const AHD_TIMER_MAX_US (AHD_TIMER_MAX_TICKS * AHD_TIMER_US_PER_TICK)
/*
* Downloaded (kernel inserted) constants
*/
...
...
drivers/scsi/aic7xxx/aic79xx.seq
View file @
d8433379
...
...
@@ -40,7 +40,7 @@
* $FreeBSD$
*/
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
4
$"
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
7
$"
PATCH_ARG_LIST = "struct ahd_softc *ahd"
PREFIX = "ahd_"
...
...
@@ -164,6 +164,10 @@ idle_loop_next_fifo:
idle_loop_cchan:
SET_MODE(M_CCHAN, M_CCHAN)
test QOFF_CTLSTA, HS_MAILBOX_ACT jz hs_mailbox_empty;
mov LOCAL_HS_MAILBOX, HS_MAILBOX;
or QOFF_CTLSTA, HS_MAILBOX_ACT;
hs_mailbox_empty:
BEGIN_CRITICAL;
test CCSCBCTL, CCARREN|CCSCBEN jz scbdma_idle;
test CCSCBCTL, CCSCBDIR jnz fetch_new_scb_inprog;
...
...
@@ -181,19 +185,65 @@ scbdma_tohost_done:
and CCSCBCTL, ~(CCARREN|CCSCBEN) ret;
fill_qoutfifo_dmadone:
and CCSCBCTL, ~(CCARREN|CCSCBEN);
mvi INTSTAT, CMDCMPLT
;
call qoutfifo_updated
;
mvi COMPLETE_SCB_DMAINPROG_HEAD[1], SCB_LIST_NULL;
bmov QOUTFIFO_NEXT_ADDR, SCBHADDR, 4;
test QOFF_CTLSTA, SDSCB_ROLLOVR jz return;
bmov QOUTFIFO_NEXT_ADDR, SHARED_DATA_ADDR, 4;
xor QOUTFIFO_ENTRY_VALID_TAG, QOUTFIFO_ENTRY_VALID_TOGGLE ret;
qoutfifo_updated:
/*
* If there are more commands waiting to be dma'ed
* to the host, always coaless. Otherwise honor the
* host's wishes.
*/
cmp COMPLETE_DMA_SCB_HEAD[1], SCB_LIST_NULL jne coaless_by_count;
cmp COMPLETE_SCB_HEAD[1], SCB_LIST_NULL jne coaless_by_count;
test LOCAL_HS_MAILBOX, ENINT_COALESS jz issue_cmdcmplt;
/*
* If we have relatively few commands outstanding, don't
* bother waiting for another command to complete.
*/
test CMDS_PENDING[1], 0xFF jnz coaless_by_count;
/* Add -1 so that jnc means <= not just < */
add A, -1, INT_COALESSING_MINCMDS;
add NONE, A, CMDS_PENDING;
jnc issue_cmdcmplt;
/*
* If coalessing, only coaless up to the limit
* provided by the host driver.
*/
coaless_by_count:
mov A, INT_COALESSING_MAXCMDS;
add NONE, A, INT_COALESSING_CMDCOUNT;
jc issue_cmdcmplt;
/*
* If the timer is not currently active,
* fire it up.
*/
test INTCTL, SWTMINTMASK jz return;
bmov SWTIMER, INT_COALESSING_TIMER, 2;
mvi CLRSEQINTSTAT, CLRSEQ_SWTMRTO;
or INTCTL, SWTMINTEN|SWTIMER_START;
and INTCTL, ~SWTMINTMASK ret;
issue_cmdcmplt:
mvi INTSTAT, CMDCMPLT;
clr INT_COALESSING_CMDCOUNT;
or INTCTL, SWTMINTMASK ret;
BEGIN_CRITICAL;
fetch_new_scb_inprog:
test CCSCBCTL, ARRDONE jz return;
fetch_new_scb_done:
and CCSCBCTL, ~(CCARREN|CCSCBEN);
bmov REG0, SCBPTR, 2;
clr A;
add CMDS_PENDING, 1;
adc CMDS_PENDING[1], A;
/* Update the next SCB address to download. */
bmov NEXT_QUEUED_SCB_ADDR, SCB_NEXT_SCB_BUSADDR, 4;
mvi SCB_NEXT[1], SCB_LIST_NULL;
...
...
@@ -229,7 +279,6 @@ scbdma_idle:
/*
* Give precedence to downloading new SCBs to execute
* unless select-outs are currently frozen.
* XXX Use a timer to prevent completion starvation.
*/
test SEQ_FLAGS2, SELECTOUT_QFROZEN jnz . + 2;
BEGIN_CRITICAL;
...
...
@@ -251,6 +300,9 @@ fill_qoutfifo_loop:
mov CCSCBRAM, SCBPTR;
or CCSCBRAM, A, SCBPTR[1];
mov NONE, SDSCB_QOFF;
inc INT_COALESSING_CMDCOUNT;
add CMDS_PENDING, -1;
adc CMDS_PENDING[1], -1;
cmp SCB_NEXT_COMPLETE[1], SCB_LIST_NULL je fill_qoutfifo_done;
cmp CCSCBADDR, CCSCBADDR_MAX je fill_qoutfifo_done;
test QOFF_CTLSTA, SDSCB_ROLLOVR jnz fill_qoutfifo_done;
...
...
@@ -949,7 +1001,7 @@ complete_nomsg:
freeze_queue:
/* Cancel any pending select-out. */
test SSTAT0, SELDO jnz . + 2;
test SSTAT0, SELDO
|SELINGO
jnz . + 2;
and SCSISEQ0, ~ENSELO;
mov ACCUM_SAVE, A;
clr A;
...
...
@@ -1484,11 +1536,28 @@ sgptr_fixup_done:
clr SCB_RESIDUAL_DATACNT[3]; /* We are not the last seg */
bmov SCB_RESIDUAL_DATACNT, SHCNT, 3 ret;
export timer_isr:
call issue_cmdcmplt;
mvi CLRSEQINTSTAT, CLRSEQ_SWTMRTO;
if ((ahd->bugs & AHD_SET_MODE_BUG) != 0) {
/*
* In H2A4, the mode pointer is not saved
* for intvec2, but is restored on iret.
* This can lead to the restoration of a
* bogus mode ptr. Manually clear the
* intmask bits and do a normal return
* to compensate.
*/
and SEQINTCTL, ~(INTMASK2|INTMASK1) ret;
} else {
or SEQINTCTL, IRET ret;
}
export seq_isr:
nop; /* Jumps in the first ISR instruction fail on Rev A. */
test SEQINTSRC, SAVEPTRS jnz saveptr_intr;
test SEQINTSRC, CFG4DATA jnz cfg4data_intr;
test SEQINTSRC, CFG4ISTAT jnz cfg4istat_intr;
test SEQINTSRC, SAVEPTRS jnz saveptr_intr;
test SEQINTSRC, CFG4ICMD jnz cfg4icmd_intr;
SET_SEQINTCODE(INVALID_SEQINT)
...
...
@@ -1793,7 +1862,7 @@ load_overrun_buf:
/* PKT_OVERRUN_BUFSIZE is a multiple of 256 */
clr HCNT[0];
mvi HCNT[1], ((PKT_OVERRUN_BUFSIZE >> 8) & 0xFF);
clr HCNT[2];
clr HCNT[2]
ret
;
}
cfg4icmd_intr:
drivers/scsi/aic7xxx/aic79xx_core.c
View file @
d8433379
This diff is collapsed.
Click to expand it.
drivers/scsi/aic7xxx/aic79xx_inline.h
View file @
d8433379
...
...
@@ -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_inline.h#
39
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#
40
$
*
* $FreeBSD$
*/
...
...
@@ -217,8 +217,11 @@ ahd_unpause(struct ahd_softc *ahd)
* prior to the first change of the mode.
*/
if
(
ahd
->
saved_src_mode
!=
AHD_MODE_UNKNOWN
&&
ahd
->
saved_dst_mode
!=
AHD_MODE_UNKNOWN
)
&&
ahd
->
saved_dst_mode
!=
AHD_MODE_UNKNOWN
)
{
if
((
ahd
->
flags
&
AHD_UPDATE_PEND_CMDS
)
!=
0
)
ahd_reset_cmds_pending
(
ahd
);
ahd_set_modes
(
ahd
,
ahd
->
saved_src_mode
,
ahd
->
saved_dst_mode
);
}
if
((
ahd_inb
(
ahd
,
INTSTAT
)
&
~
(
SWTMINT
|
CMDCMPLT
))
==
0
)
ahd_outb
(
ahd
,
HCNTRL
,
ahd
->
unpause
);
...
...
@@ -913,6 +916,8 @@ ahd_intr(struct ahd_softc *ahd)
ahd_flush_device_writes
(
ahd
);
}
ahd_run_qoutfifo
(
ahd
);
ahd
->
cmdcmplt_counts
[
ahd
->
cmdcmplt_bucket
]
++
;
ahd
->
cmdcmplt_total
++
;
#ifdef AHD_TARGET_MODE
if
((
ahd
->
flags
&
AHD_TARGETROLE
)
!=
0
)
ahd_run_tqinfifo
(
ahd
,
/*paused*/
FALSE
);
...
...
drivers/scsi/aic7xxx/aic79xx_osm.c
View file @
d8433379
This diff is collapsed.
Click to expand it.
drivers/scsi/aic7xxx/aic79xx_osm.h
View file @
d8433379
...
...
@@ -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#9
0
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#9
6
$
*
*/
#ifndef _AIC79XX_LINUX_H_
...
...
@@ -287,7 +287,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA
3
"
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA
5
"
/**************************** Front End Queues ********************************/
/*
...
...
@@ -334,7 +334,8 @@ typedef enum {
AHD_DEV_ON_RUN_LIST
=
0x08
,
/* Queued to be run later */
AHD_DEV_Q_BASIC
=
0x10
,
/* Allow basic device queuing */
AHD_DEV_Q_TAGGED
=
0x20
,
/* Allow full SCSI2 command queueing */
AHD_DEV_PERIODIC_OTAG
=
0x40
/* Send OTAG to prevent starvation */
AHD_DEV_PERIODIC_OTAG
=
0x40
,
/* Send OTAG to prevent starvation */
AHD_DEV_SLAVE_CONFIGURED
=
0x80
/* slave_configure() has been called */
}
ahd_linux_dev_flags
;
struct
ahd_linux_target
;
...
...
@@ -462,6 +463,12 @@ struct ahd_linux_target {
u_int
dv_state_retry
;
uint8_t
*
dv_buffer
;
uint8_t
*
dv_buffer1
;
/*
* Cumulative counter of errors.
*/
u_long
errors_detected
;
u_long
cmds_since_error
;
};
/********************* Definitions Required by the Core ***********************/
...
...
@@ -525,6 +532,7 @@ struct ahd_platform_data {
pid_t
dv_pid
;
struct
timer_list
completeq_timer
;
struct
timer_list
reset_timer
;
struct
timer_list
stats_timer
;
struct
semaphore
eh_sem
;
struct
semaphore
dv_sem
;
struct
semaphore
dv_cmd_sem
;
/* XXX This needs to be in
...
...
drivers/scsi/aic7xxx/aic79xx_proc.c
View file @
d8433379
...
...
@@ -37,7 +37,7 @@
* String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr>
* sym driver.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#
9
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#
11
$
*/
#include "aic79xx_osm.h"
#include "aic79xx_inline.h"
...
...
@@ -103,7 +103,7 @@ ahd_format_transinfo(struct info_str *info, struct ahd_transinfo *tinfo)
u_int
mb
;
if
(
tinfo
->
period
==
AHD_PERIOD_UNKNOWN
)
{
copy_info
(
info
,
"Renegotiation Pending"
);
copy_info
(
info
,
"Renegotiation Pending
\n
"
);
return
;
}
speed
=
3300
;
...
...
@@ -181,6 +181,7 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
ahd_format_transinfo
(
info
,
&
tinfo
->
goal
);
copy_info
(
info
,
"
\t
Curr: "
);
ahd_format_transinfo
(
info
,
&
tinfo
->
curr
);
copy_info
(
info
,
"
\t
Transmission Errors %ld
\n
"
,
targ
->
errors_detected
);
for
(
lun
=
0
;
lun
<
AHD_NUM_LUNS
;
lun
++
)
{
struct
ahd_linux_device
*
dev
;
...
...
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
View file @
d8433379
...
...
@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated
* from the following source files:
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
4
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
6
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
9
$
*/
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
typedef struct ahd_reg_parse_entry {
...
...
@@ -82,6 +82,13 @@ ahd_reg_print_t ahd_hs_mailbox_print;
ahd_print_register(NULL, 0, "HS_MAILBOX", 0x0b, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_clrseqintstat_print;
#else
#define ahd_clrseqintstat_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "CLRSEQINTSTAT", 0x0c, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_seqintstat_print;
#else
...
...
@@ -89,6 +96,13 @@ ahd_reg_print_t ahd_seqintstat_print;
ahd_print_register(NULL, 0, "SEQINTSTAT", 0x0c, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_swtimer_print;
#else
#define ahd_swtimer_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "SWTIMER", 0x0e, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_snscb_qoff_print;
#else
...
...
@@ -1629,13 +1643,6 @@ ahd_reg_print_t ahd_dspfltrctl_print;
ahd_print_register(NULL, 0, "DSPFLTRCTL", 0xc0, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_clrseqintstat_print;
#else
#define ahd_clrseqintstat_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "CLRSEQINTSTAT", 0xc0, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_dspdatactl_print;
#else
...
...
@@ -1713,13 +1720,6 @@ ahd_reg_print_t ahd_rcvrbiascalc_print;
ahd_print_register(NULL, 0, "RCVRBIASCALC", 0xc8, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_dfdbctl_print;
#else
#define ahd_dfdbctl_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "DFDBCTL", 0xc8, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_dfbkptr_print;
#else
...
...
@@ -1734,6 +1734,13 @@ ahd_reg_print_t ahd_skewcalc_print;
ahd_print_register(NULL, 0, "SKEWCALC", 0xc9, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_dfdbctl_print;
#else
#define ahd_dfdbctl_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "DFDBCTL", 0xcb, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_dfscnt_print;
#else
...
...
@@ -1797,13 +1804,6 @@ ahd_reg_print_t ahd_prgmcnt_print;
ahd_print_register(NULL, 0, "PRGMCNT", 0xde, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_swtimer_print;
#else
#define ahd_swtimer_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "SWTIMER", 0xe0, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_accum_print;
#else
...
...
@@ -2140,11 +2140,53 @@ ahd_reg_print_t ahd_allocfifo_scbptr_print;
ahd_print_register(NULL, 0, "ALLOCFIFO_SCBPTR", 0x148, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coalessing_timer_print;
#else
#define ahd_int_coalessing_timer_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALESSING_TIMER", 0x14a, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coalessing_maxcmds_print;
#else
#define ahd_int_coalessing_maxcmds_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALESSING_MAXCMDS", 0x14c, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coalessing_mincmds_print;
#else
#define ahd_int_coalessing_mincmds_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALESSING_MINCMDS", 0x14d, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_cmds_pending_print;
#else
#define ahd_cmds_pending_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "CMDS_PENDING", 0x14e, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coalessing_cmdcount_print;
#else
#define ahd_int_coalessing_cmdcount_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALESSING_CMDCOUNT", 0x150, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_local_hs_mailbox_print;
#else
#define ahd_local_hs_mailbox_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "LOCAL_HS_MAILBOX", 0x151, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_cmdsize_table_print;
#else
#define ahd_cmdsize_table_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "CMDSIZE_TABLE", 0x1
4a
, regvalue, cur_col, wrap)
ahd_print_register(NULL, 0, "CMDSIZE_TABLE", 0x1
52
, regvalue, cur_col, wrap)
#endif
#if AIC_DEBUG_REGISTERS
...
...
@@ -2394,6 +2436,14 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define HS_MAILBOX 0x0b
#define HOST_TQINPOS 0x80
#define ENINT_COALESS 0x40
#define CLRSEQINTSTAT 0x0c
#define CLRSEQ_SWTMRTO 0x10
#define CLRSEQ_SEQINT 0x08
#define CLRSEQ_SCSIINT 0x04
#define CLRSEQ_PCIINT 0x02
#define CLRSEQ_SPLTINT 0x01
#define SEQINTSTAT 0x0c
#define SEQ_SWTMRTO 0x10
...
...
@@ -2402,6 +2452,8 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define SEQ_PCIINT 0x02
#define SEQ_SPLTINT 0x01
#define SWTIMER 0x0e
#define SNSCB_QOFF 0x10
#define SESCB_QOFF 0x12
...
...
@@ -3332,13 +3384,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define EDGESENSE 0x10
#define DSPFCNTSEL 0x0f
#define CLRSEQINTSTAT 0xc0
#define CLRSEQ_SWTMRTO 0x10
#define CLRSEQ_SEQINT 0x08
#define CLRSEQ_SCSIINT 0x04
#define CLRSEQ_PCIINT 0x02
#define CLRSEQ_SPLTINT 0x01
#define DSPDATACTL 0xc1
#define BYPASSENAB 0x80
#define DESQDIS 0x10
...
...
@@ -3375,7 +3420,11 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define RCVRBIASCALC 0xc8
#define DFDBCTL 0xc8
#define DFBKPTR 0xc9
#define SKEWCALC 0xc9
#define DFDBCTL 0xcb
#define DFF_CIO_WR_RDY 0x20
#define DFF_CIO_RD_RDY 0x10
#define DFF_DIR_ERR 0x08
...
...
@@ -3383,10 +3432,6 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define DFF_RAMBIST_DONE 0x02
#define DFF_RAMBIST_EN 0x01
#define DFBKPTR 0xc9
#define SKEWCALC 0xc9
#define DFSCNT 0xcc
#define DFBCNT 0xce
...
...
@@ -3418,15 +3463,14 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define INT1_CONTEXT 0x20
#define SCS_SEQ_INT1M1 0x10
#define SCS_SEQ_INT1M0 0x08
#define INTMASK 0x06
#define INTMASK2 0x04
#define INTMASK1 0x02
#define IRET 0x01
#define SEQRAM 0xda
#define PRGMCNT 0xde
#define SWTIMER 0xe0
#define ACCUM 0xe0
#define SINDEX 0xe2
...
...
@@ -3574,7 +3618,19 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define ALLOCFIFO_SCBPTR 0x148
#define CMDSIZE_TABLE 0x14a
#define INT_COALESSING_TIMER 0x14a
#define INT_COALESSING_MAXCMDS 0x14c
#define INT_COALESSING_MINCMDS 0x14d
#define CMDS_PENDING 0x14e
#define INT_COALESSING_CMDCOUNT 0x150
#define LOCAL_HS_MAILBOX 0x151
#define CMDSIZE_TABLE 0x152
#define SCB_BASE 0x180
...
...
@@ -3646,6 +3702,7 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define SCB_DISCONNECTED_LISTS 0x1b8
#define AHD_TIMER_US_PER_TICK 0x19
#define SCB_TRANSFER_SIZE_FULL_LUN 0x38
#define STATUS_QUEUE_FULL 0x28
#define STATUS_BUSY 0x08
...
...
@@ -3667,6 +3724,8 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define AHD_NUM_PER_DEV_ANNEXCOLS 0x04
#define B_CURRFIFO_0 0x02
#define NVRAM_SCB_OFFSET 0x2c
#define AHD_TIMER_MAX_US 0x18ffe7
#define AHD_TIMER_MAX_TICKS 0xffff
#define STATUS_PKT_SENSE 0xff
#define CMD_GROUP_CODE_SHIFT 0x05
#define AHD_SENSE_BUFSIZE 0x100
...
...
@@ -3713,4 +3772,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
/* Exported Labels */
#define LABEL_seq_isr 0x23b
#define LABEL_seq_isr 0x25a
#define LABEL_timer_isr 0x256
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
View file @
d8433379
...
...
@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated
* from the following source files:
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
4
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
6
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#7
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#5
9
$
*/
#include "aic79xx_osm.h"
...
...
@@ -158,16 +158,32 @@ ahd_hescb_qoff_print(u_int regvalue, u_int *cur_col, u_int wrap)
}
static ahd_reg_parse_entry_t HS_MAILBOX_parse_table[] = {
{ "ENINT_COALESS", 0x40, 0x40 },
{ "HOST_TQINPOS", 0x80, 0x80 }
};
int
ahd_hs_mailbox_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(HS_MAILBOX_parse_table,
1
, "HS_MAILBOX",
return (ahd_print_register(HS_MAILBOX_parse_table,
2
, "HS_MAILBOX",
0x0b, regvalue, cur_col, wrap));
}
static ahd_reg_parse_entry_t CLRSEQINTSTAT_parse_table[] = {
{ "CLRSEQ_SPLTINT", 0x01, 0x01 },
{ "CLRSEQ_PCIINT", 0x02, 0x02 },
{ "CLRSEQ_SCSIINT", 0x04, 0x04 },
{ "CLRSEQ_SEQINT", 0x08, 0x08 },
{ "CLRSEQ_SWTMRTO", 0x10, 0x10 }
};
int
ahd_clrseqintstat_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(CLRSEQINTSTAT_parse_table, 5, "CLRSEQINTSTAT",
0x0c, regvalue, cur_col, wrap));
}
static ahd_reg_parse_entry_t SEQINTSTAT_parse_table[] = {
{ "SEQ_SPLTINT", 0x01, 0x01 },
{ "SEQ_PCIINT", 0x02, 0x02 },
...
...
@@ -183,6 +199,13 @@ ahd_seqintstat_print(u_int regvalue, u_int *cur_col, u_int wrap)
0x0c, regvalue, cur_col, wrap));
}
int
ahd_swtimer_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "SWTIMER",
0x0e, regvalue, cur_col, wrap));
}
int
ahd_snscb_qoff_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
...
...
@@ -2714,21 +2737,6 @@ ahd_dspfltrctl_print(u_int regvalue, u_int *cur_col, u_int wrap)
0xc0, regvalue, cur_col, wrap));
}
static ahd_reg_parse_entry_t CLRSEQINTSTAT_parse_table[] = {
{ "CLRSEQ_SPLTINT", 0x01, 0x01 },
{ "CLRSEQ_PCIINT", 0x02, 0x02 },
{ "CLRSEQ_SCSIINT", 0x04, 0x04 },
{ "CLRSEQ_SEQINT", 0x08, 0x08 },
{ "CLRSEQ_SWTMRTO", 0x10, 0x10 }
};
int
ahd_clrseqintstat_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(CLRSEQINTSTAT_parse_table, 5, "CLRSEQINTSTAT",
0xc0, regvalue, cur_col, wrap));
}
static ahd_reg_parse_entry_t DSPDATACTL_parse_table[] = {
{ "XMITOFFSTDIS", 0x02, 0x02 },
{ "RCVROFFSTDIS", 0x04, 0x04 },
...
...
@@ -2838,6 +2846,20 @@ ahd_rcvrbiascalc_print(u_int regvalue, u_int *cur_col, u_int wrap)
0xc8, regvalue, cur_col, wrap));
}
int
ahd_dfbkptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "DFBKPTR",
0xc9, regvalue, cur_col, wrap));
}
int
ahd_skewcalc_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "SKEWCALC",
0xc9, regvalue, cur_col, wrap));
}
static ahd_reg_parse_entry_t DFDBCTL_parse_table[] = {
{ "DFF_RAMBIST_EN", 0x01, 0x01 },
{ "DFF_RAMBIST_DONE", 0x02, 0x02 },
...
...
@@ -2851,21 +2873,7 @@ int
ahd_dfdbctl_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(DFDBCTL_parse_table, 6, "DFDBCTL",
0xc8, regvalue, cur_col, wrap));
}
int
ahd_dfbkptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "DFBKPTR",
0xc9, regvalue, cur_col, wrap));
}
int
ahd_skewcalc_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "SKEWCALC",
0xc9, regvalue, cur_col, wrap));
0xcb, regvalue, cur_col, wrap));
}
int
...
...
@@ -2935,7 +2943,8 @@ ahd_flags_print(u_int regvalue, u_int *cur_col, u_int wrap)
static ahd_reg_parse_entry_t SEQINTCTL_parse_table[] = {
{ "IRET", 0x01, 0x01 },
{ "INTMASK", 0x06, 0x06 },
{ "INTMASK1", 0x02, 0x02 },
{ "INTMASK2", 0x04, 0x04 },
{ "SCS_SEQ_INT1M0", 0x08, 0x08 },
{ "SCS_SEQ_INT1M1", 0x10, 0x10 },
{ "INT1_CONTEXT", 0x20, 0x20 },
...
...
@@ -2945,7 +2954,7 @@ static ahd_reg_parse_entry_t SEQINTCTL_parse_table[] = {
int
ahd_seqintctl_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(SEQINTCTL_parse_table,
6
, "SEQINTCTL",
return (ahd_print_register(SEQINTCTL_parse_table,
7
, "SEQINTCTL",
0xd9, regvalue, cur_col, wrap));
}
...
...
@@ -2963,13 +2972,6 @@ ahd_prgmcnt_print(u_int regvalue, u_int *cur_col, u_int wrap)
0xde, regvalue, cur_col, wrap));
}
int
ahd_swtimer_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "SWTIMER",
0xe0, regvalue, cur_col, wrap));
}
int
ahd_accum_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
...
...
@@ -3376,11 +3378,53 @@ ahd_allocfifo_scbptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
0x148, regvalue, cur_col, wrap));
}
int
ahd_int_coalessing_timer_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "INT_COALESSING_TIMER",
0x14a, regvalue, cur_col, wrap));
}
int
ahd_int_coalessing_maxcmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "INT_COALESSING_MAXCMDS",
0x14c, regvalue, cur_col, wrap));
}
int
ahd_int_coalessing_mincmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "INT_COALESSING_MINCMDS",
0x14d, regvalue, cur_col, wrap));
}
int
ahd_cmds_pending_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "CMDS_PENDING",
0x14e, regvalue, cur_col, wrap));
}
int
ahd_int_coalessing_cmdcount_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "INT_COALESSING_CMDCOUNT",
0x150, regvalue, cur_col, wrap));
}
int
ahd_local_hs_mailbox_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "LOCAL_HS_MAILBOX",
0x151, regvalue, cur_col, wrap));
}
int
ahd_cmdsize_table_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
return (ahd_print_register(NULL, 0, "CMDSIZE_TABLE",
0x1
4a
, regvalue, cur_col, wrap));
0x1
52
, regvalue, cur_col, wrap));
}
int
...
...
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
View file @
d8433379
This diff is collapsed.
Click to expand it.
drivers/scsi/aic7xxx/aic7xxx_core.c
View file @
d8433379
...
...
@@ -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#10
3
$
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#10
4
$
*
* $FreeBSD$
*/
...
...
@@ -1848,7 +1848,6 @@ ahc_update_neg_request(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
tinfo
->
curr
.
period
=
AHC_PERIOD_UNKNOWN
;
tinfo
->
curr
.
width
=
AHC_WIDTH_UNKNOWN
;
tinfo
->
curr
.
offset
=
AHC_OFFSET_UNKNOWN
;
tinfo
->
curr
.
ppr_options
=
AHC_OFFSET_UNKNOWN
;
}
if
(
tinfo
->
curr
.
period
!=
tinfo
->
goal
.
period
||
tinfo
->
curr
.
width
!=
tinfo
->
goal
.
width
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.c
View file @
d8433379
/*
* Adaptec AIC7xxx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
3
$
*
* Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science.
...
...
@@ -812,9 +812,10 @@ static int ahc_linux_release(struct Scsi_Host *);
static
int
ahc_linux_queue
(
Scsi_Cmnd
*
,
void
(
*
)(
Scsi_Cmnd
*
));
static
const
char
*
ahc_linux_info
(
struct
Scsi_Host
*
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static
int
ahc_linux_slave_alloc
(
Scsi_Device
*
);
static
int
ahc_linux_slave_configure
(
Scsi_Device
*
);
static
void
ahc_linux_slave_destroy
(
Scsi_Device
*
);
static
int
ah
d
_linux_biosparam
(
struct
scsi_device
*
,
static
int
ah
c
_linux_biosparam
(
struct
scsi_device
*
,
struct
block_device
*
,
sector_t
,
int
[]);
#else
...
...
@@ -874,15 +875,6 @@ ahc_linux_detect(Scsi_Host_Template *template)
template
->
proc_dir
=
&
proc_scsi_aic7xxx
;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,7)
/*
* We can only map 16MB per-SG
* so create a sector limit of
* "16MB" in 2K sectors.
*/
template
->
max_sectors
=
8192
;
#endif
/*
* Initialize our softc list lock prior to
* probing for any adapters.
...
...
@@ -1029,9 +1021,11 @@ ahc_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *))
static
int
ahc_linux_slave_alloc
(
Scsi_Device
*
device
)
{
/*
* Nothing to be done for now.
*/
struct
ahc_softc
*
ahc
;
ahc
=
*
((
struct
ahc_softc
**
)
device
->
host
->
hostdata
);
if
(
bootverbose
)
printf
(
"%s: Slave Alloc %d
\n
"
,
ahc_name
(
ahc
),
device
->
id
);
return
(
0
);
}
...
...
@@ -1043,6 +1037,8 @@ ahc_linux_slave_configure(Scsi_Device *device)
u_long
flags
;
ahc
=
*
((
struct
ahc_softc
**
)
device
->
host
->
hostdata
);
if
(
bootverbose
)
printf
(
"%s: Slave Configure %d
\n
"
,
ahc_name
(
ahc
),
device
->
id
);
ahc_midlayer_entrypoint_lock
(
ahc
,
&
flags
);
/*
* Since Linux has attached to the device, configure
...
...
@@ -1055,8 +1051,8 @@ ahc_linux_slave_configure(Scsi_Device *device)
if
(
dev
!=
NULL
)
{
dev
->
flags
&=
~
AHC_DEV_UNCONFIGURED
;
dev
->
scsi_device
=
device
;
}
ahc_linux_device_queue_depth
(
ahc
,
dev
);
}
ahc_midlayer_entrypoint_unlock
(
ahc
,
&
flags
);
return
(
0
);
}
...
...
@@ -1069,12 +1065,26 @@ ahc_linux_slave_destroy(Scsi_Device *device)
u_long
flags
;
ahc
=
*
((
struct
ahc_softc
**
)
device
->
host
->
hostdata
);
if
(
bootverbose
)
printf
(
"%s: Slave Destroy %d
\n
"
,
ahc_name
(
ahc
),
device
->
id
);
ahc_midlayer_entrypoint_lock
(
ahc
,
&
flags
);
dev
=
ahc_linux_get_device
(
ahc
,
device
->
channel
,
device
->
id
,
device
->
lun
,
/*alloc*/
FALSE
);
if
(
dev
!=
NULL
)
/*
* Filter out "silly" deletions of real devices by only
* deleting devices that have had slave_configure()
* called on them. All other devices that have not
* been configured will automatically be deleted by
* the refcounting process.
*/
if
(
dev
!=
NULL
&&
(
dev
->
flags
&
AHC_DEV_SLAVE_CONFIGURED
)
!=
0
)
{
dev
->
flags
|=
AHC_DEV_UNCONFIGURED
;
if
(
TAILQ_EMPTY
(
&
dev
->
busyq
)
&&
dev
->
active
==
0
)
ahc_linux_free_device
(
ahc
,
dev
);
}
ahc_midlayer_entrypoint_unlock
(
ahc
,
&
flags
);
}
#else
...
...
@@ -1135,10 +1145,15 @@ static int
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_linux_biosparam
(
struct
scsi_device
*
sdev
,
struct
block_device
*
bdev
,
sector_t
capacity
,
int
geom
[])
{
uint8_t
*
bh
;
#else
ahc_linux_biosparam
(
Disk
*
disk
,
kdev_t
dev
,
int
geom
[])
#endif
{
struct
scsi_device
*
sdev
=
disk
->
device
;
u_long
capacity
=
disk
->
capacity
;
struct
buffer_head
*
bh
;
#endif
int
heads
;
int
sectors
;
int
cylinders
;
...
...
@@ -1146,23 +1161,9 @@ ahc_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
int
extended
;
struct
ahc_softc
*
ahc
;
u_int
channel
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
uint8_t
*
bh
;
channel
=
sdev
->
channel
;
#else
u_long
capacity
;
struct
buffer_head
*
bh
;
capacity
=
disk
->
capacity
;
channel
=
disk
->
device
->
channel
;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc
=
*
((
struct
ahc_softc
**
)
sdev
->
host
->
hostdata
);
#else
ahc
=
*
((
struct
ahc_softc
**
)
disk
->
device
->
host
->
hostdata
);
#endif
channel
=
sdev
->
channel
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
bh
=
scsi_bios_ptable
(
bdev
);
...
...
@@ -1185,7 +1186,7 @@ ahc_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
}
heads
=
64
;
sectors
=
32
;
cylinders
=
capacity
/
(
heads
*
sectors
);
cylinders
=
aic_sector_div
(
capacity
,
heads
,
sectors
);
if
(
aic7xxx_extended
!=
0
)
extended
=
1
;
...
...
@@ -1196,7 +1197,7 @@ ahc_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
if
(
extended
&&
cylinders
>=
1024
)
{
heads
=
255
;
sectors
=
63
;
cylinders
=
capacity
/
(
heads
*
sectors
);
cylinders
=
aic_sector_div
(
capacity
,
heads
,
sectors
);
}
geom
[
0
]
=
heads
;
geom
[
1
]
=
sectors
;
...
...
@@ -1288,6 +1289,14 @@ Scsi_Host_Template aic7xxx_driver_template = {
.
sg_tablesize
=
AHC_NSEG
,
.
cmd_per_lun
=
2
,
.
use_clustering
=
ENABLE_CLUSTERING
,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,7)
/*
* We can only map 16MB per-SG
* so create a sector limit of
* "16MB" in 2K sectors.
*/
.
max_sectors
=
8192
,
#endif
#if defined CONFIG_HIGHIO
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
/* Assume RedHat Distribution with its different HIGHIO conventions. */
...
...
@@ -1298,6 +1307,8 @@ Scsi_Host_Template aic7xxx_driver_template = {
#endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
.
name
=
"aic7xxx"
,
.
slave_alloc
=
ahc_linux_slave_alloc
,
.
slave_configure
=
ahc_linux_slave_configure
,
.
slave_destroy
=
ahc_linux_slave_destroy
,
#else
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.h
View file @
d8433379
...
...
@@ -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#1
09
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#1
11
$
*
*/
#ifndef _AIC7XXX_LINUX_H_
...
...
@@ -300,7 +300,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC7XXX_DRIVER_VERSION "6.2.2
3
"
#define AIC7XXX_DRIVER_VERSION "6.2.2
4
"
/**************************** Front End Queues ********************************/
/*
...
...
@@ -347,7 +347,8 @@ typedef enum {
AHC_DEV_ON_RUN_LIST
=
0x08
,
/* Queued to be run later */
AHC_DEV_Q_BASIC
=
0x10
,
/* Allow basic device queuing */
AHC_DEV_Q_TAGGED
=
0x20
,
/* Allow full SCSI2 command queueing */
AHC_DEV_PERIODIC_OTAG
=
0x40
/* Send OTAG to prevent starvation */
AHC_DEV_PERIODIC_OTAG
=
0x40
,
/* Send OTAG to prevent starvation */
AHC_DEV_SLAVE_CONFIGURED
=
0x80
/* slave_configure() has been called */
}
ahc_linux_dev_flags
;
struct
ahc_linux_target
;
...
...
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
View file @
d8433379
...
...
@@ -38,7 +38,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#2
7
$
* $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#2
8
$
*
* $FreeBSD$
*/
...
...
@@ -707,7 +707,7 @@ expression:
;
constant:
T_CONST T_SYMBOL
numerical_value
T_CONST T_SYMBOL
expression
{
if ($2->type != UNINITIALIZED) {
stop("Re-definition of symbol as a constant",
...
...
@@ -716,7 +716,7 @@ constant:
}
$2->type = CONST;
initialize_symbol($2);
$2->info.cinfo->value = $3;
$2->info.cinfo->value = $3
.value
;
}
| T_CONST T_SYMBOL T_DOWNLOAD
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment