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
c2fcb46e
Commit
c2fcb46e
authored
May 15, 2003
by
Justin T. Gibbs
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux.bkbits.net/linux-2.5
into overdrive.btc.adaptec.com:/usr/home/gibbs/bk/linux-2.5
parents
77b3055a
abba9390
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
174 additions
and
206 deletions
+174
-206
Documentation/scsi/aic7xxx.txt
Documentation/scsi/aic7xxx.txt
+5
-0
drivers/scsi/aic7xxx/aic79xx.h
drivers/scsi/aic7xxx/aic79xx.h
+17
-17
drivers/scsi/aic7xxx/aic79xx.reg
drivers/scsi/aic7xxx/aic79xx.reg
+10
-10
drivers/scsi/aic7xxx/aic79xx.seq
drivers/scsi/aic7xxx/aic79xx.seq
+14
-14
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_core.c
+36
-36
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
+13
-32
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/aic7xxx/aic79xx_osm.h
+2
-2
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+11
-9
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
+19
-19
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
+11
-11
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
+2
-2
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
+21
-39
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm.h
+4
-4
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+5
-4
drivers/scsi/aic7xxx/aic7xxx_pci.c
drivers/scsi/aic7xxx/aic7xxx_pci.c
+1
-1
drivers/scsi/aic7xxx/aiclib.h
drivers/scsi/aic7xxx/aiclib.h
+3
-6
No files found.
Documentation/scsi/aic7xxx.txt
View file @
c2fcb46e
...
@@ -132,6 +132,11 @@ The following information is available in this file:
...
@@ -132,6 +132,11 @@ The following information is available in this file:
2. Version History
2. Version History
6.2.34 - Fix locking regression instroduced in 6.2.29 that
could cuase a lock order reversal between the io_request_lock
and our per-softc lock. This was only possible on RH9,
SuSE, and kernel.org 2.4.X kernels.
6.2.33 - Dynamically disable PCI parity error reporting after
6.2.33 - Dynamically disable PCI parity error reporting after
10 errors are reported to the user. These errors are
10 errors are reported to the user. These errors are
the result of some other device issuing PCI transactions
the result of some other device issuing PCI transactions
...
...
drivers/scsi/aic7xxx/aic79xx.h
View file @
c2fcb46e
...
@@ -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/aic79xx.h#
89
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#
90
$
*
*
* $FreeBSD$
* $FreeBSD$
*/
*/
...
@@ -1225,20 +1225,20 @@ struct ahd_softc {
...
@@ -1225,20 +1225,20 @@ struct ahd_softc {
int
seltime
;
int
seltime
;
/*
/*
* Interrupt coales
s
ing settings.
* Interrupt coales
c
ing settings.
*/
*/
#define AHD_INT_COALES
S
ING_TIMER_DEFAULT 250
/*us*/
#define AHD_INT_COALES
C
ING_TIMER_DEFAULT 250
/*us*/
#define AHD_INT_COALES
S
ING_MAXCMDS_DEFAULT 10
#define AHD_INT_COALES
C
ING_MAXCMDS_DEFAULT 10
#define AHD_INT_COALES
S
ING_MAXCMDS_MAX 127
#define AHD_INT_COALES
C
ING_MAXCMDS_MAX 127
#define AHD_INT_COALES
S
ING_MINCMDS_DEFAULT 5
#define AHD_INT_COALES
C
ING_MINCMDS_DEFAULT 5
#define AHD_INT_COALES
S
ING_MINCMDS_MAX 127
#define AHD_INT_COALES
C
ING_MINCMDS_MAX 127
#define AHD_INT_COALES
S
ING_THRESHOLD_DEFAULT 2000
#define AHD_INT_COALES
C
ING_THRESHOLD_DEFAULT 2000
#define AHD_INT_COALES
S
ING_STOP_THRESHOLD_DEFAULT 1000
#define AHD_INT_COALES
C
ING_STOP_THRESHOLD_DEFAULT 1000
u_int
int_coales
s
ing_timer
;
u_int
int_coales
c
ing_timer
;
u_int
int_coales
s
ing_maxcmds
;
u_int
int_coales
c
ing_maxcmds
;
u_int
int_coales
s
ing_mincmds
;
u_int
int_coales
c
ing_mincmds
;
u_int
int_coales
s
ing_threshold
;
u_int
int_coales
c
ing_threshold
;
u_int
int_coales
s
ing_stop_threshold
;
u_int
int_coales
c
ing_stop_threshold
;
uint16_t
user_discenable
;
/* Disconnection allowed */
uint16_t
user_discenable
;
/* Disconnection allowed */
uint16_t
user_tagenable
;
/* Tagged Queuing allowed */
uint16_t
user_tagenable
;
/* Tagged Queuing allowed */
...
@@ -1362,11 +1362,11 @@ int ahd_parse_vpddata(struct ahd_softc *ahd,
...
@@ -1362,11 +1362,11 @@ int ahd_parse_vpddata(struct ahd_softc *ahd,
int
ahd_parse_cfgdata
(
struct
ahd_softc
*
ahd
,
int
ahd_parse_cfgdata
(
struct
ahd_softc
*
ahd
,
struct
seeprom_config
*
sc
);
struct
seeprom_config
*
sc
);
void
ahd_intr_enable
(
struct
ahd_softc
*
ahd
,
int
enable
);
void
ahd_intr_enable
(
struct
ahd_softc
*
ahd
,
int
enable
);
void
ahd_update_coales
s
ing_values
(
struct
ahd_softc
*
ahd
,
void
ahd_update_coales
c
ing_values
(
struct
ahd_softc
*
ahd
,
u_int
timer
,
u_int
timer
,
u_int
maxcmds
,
u_int
maxcmds
,
u_int
mincmds
);
u_int
mincmds
);
void
ahd_enable_coales
s
ing
(
struct
ahd_softc
*
ahd
,
void
ahd_enable_coales
c
ing
(
struct
ahd_softc
*
ahd
,
int
enable
);
int
enable
);
void
ahd_pause_and_flushwork
(
struct
ahd_softc
*
ahd
);
void
ahd_pause_and_flushwork
(
struct
ahd_softc
*
ahd
);
int
ahd_suspend
(
struct
ahd_softc
*
ahd
);
int
ahd_suspend
(
struct
ahd_softc
*
ahd
);
...
@@ -1514,7 +1514,7 @@ extern uint32_t ahd_debug;
...
@@ -1514,7 +1514,7 @@ extern uint32_t ahd_debug;
#define AHD_SHOW_QUEUE 0x02000
#define AHD_SHOW_QUEUE 0x02000
#define AHD_SHOW_TQIN 0x04000
#define AHD_SHOW_TQIN 0x04000
#define AHD_SHOW_SG 0x08000
#define AHD_SHOW_SG 0x08000
#define AHD_SHOW_INT_COALES
S
ING 0x10000
#define AHD_SHOW_INT_COALES
C
ING 0x10000
#define AHD_DEBUG_SEQUENCER 0x20000
#define AHD_DEBUG_SEQUENCER 0x20000
#endif
#endif
void
ahd_print_scb
(
struct
scb
*
scb
);
void
ahd_print_scb
(
struct
scb
*
scb
);
...
...
drivers/scsi/aic7xxx/aic79xx.reg
View file @
c2fcb46e
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
*
*
* $FreeBSD$
* $FreeBSD$
*/
*/
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
7
$"
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
8
$"
/*
/*
* 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
...
@@ -286,7 +286,7 @@ register HS_MAILBOX {
...
@@ -286,7 +286,7 @@ register HS_MAILBOX {
address 0x00B
address 0x00B
access_mode RW
access_mode RW
mask HOST_TQINPOS 0x80 /* Boundary at either 0 or 128 */
mask HOST_TQINPOS 0x80 /* Boundary at either 0 or 128 */
mask ENINT_COALES
S 0x40 /* Perform interrupt coaless
ing */
mask ENINT_COALES
CE 0x40 /* Perform interrupt coalesc
ing */
}
}
/*
/*
...
@@ -3704,28 +3704,28 @@ scratch_ram {
...
@@ -3704,28 +3704,28 @@ scratch_ram {
}
}
/*
/*
* The maximum amount of time to wait, when interrupt coales
s
ing
* The maximum amount of time to wait, when interrupt coales
c
ing
* is enabled, before issueing a CMDCMPLT interrupt for a completed
* is enabled, before issueing a CMDCMPLT interrupt for a completed
* command.
* command.
*/
*/
INT_COALES
S
ING_TIMER {
INT_COALES
C
ING_TIMER {
size 2
size 2
}
}
/*
/*
* The maximum number of commands to coales
s
into a single interrupt.
* The maximum number of commands to coales
ce
into a single interrupt.
* Actually the 2's complement of that value to simplify sequencer
* Actually the 2's complement of that value to simplify sequencer
* code.
* code.
*/
*/
INT_COALES
S
ING_MAXCMDS {
INT_COALES
C
ING_MAXCMDS {
size 1
size 1
}
}
/*
/*
* The minimum number of commands still outstanding required
* The minimum number of commands still outstanding required
* to continue coales
s
ing (2's complement of value).
* to continue coales
c
ing (2's complement of value).
*/
*/
INT_COALES
S
ING_MINCMDS {
INT_COALES
C
ING_MINCMDS {
size 1
size 1
}
}
...
@@ -3737,9 +3737,9 @@ scratch_ram {
...
@@ -3737,9 +3737,9 @@ scratch_ram {
}
}
/*
/*
* The count of commands that have been coales
s
ed.
* The count of commands that have been coales
c
ed.
*/
*/
INT_COALES
S
ING_CMDCOUNT {
INT_COALES
C
ING_CMDCOUNT {
size 1
size 1
}
}
...
...
drivers/scsi/aic7xxx/aic79xx.seq
View file @
c2fcb46e
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
* $FreeBSD$
* $FreeBSD$
*/
*/
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
1
$"
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
2
$"
PATCH_ARG_LIST = "struct ahd_softc *ahd"
PATCH_ARG_LIST = "struct ahd_softc *ahd"
PREFIX = "ahd_"
PREFIX = "ahd_"
...
@@ -212,44 +212,44 @@ fill_qoutfifo_dmadone:
...
@@ -212,44 +212,44 @@ fill_qoutfifo_dmadone:
qoutfifo_updated:
qoutfifo_updated:
/*
/*
* If there are more commands waiting to be dma'ed
* If there are more commands waiting to be dma'ed
* to the host, always coales
s
. Otherwise honor the
* to the host, always coales
ce
. Otherwise honor the
* host's wishes.
* host's wishes.
*/
*/
cmp COMPLETE_DMA_SCB_HEAD[1], SCB_LIST_NULL jne coales
s
_by_count;
cmp COMPLETE_DMA_SCB_HEAD[1], SCB_LIST_NULL jne coales
ce
_by_count;
cmp COMPLETE_SCB_HEAD[1], SCB_LIST_NULL jne coales
s
_by_count;
cmp COMPLETE_SCB_HEAD[1], SCB_LIST_NULL jne coales
ce
_by_count;
test LOCAL_HS_MAILBOX, ENINT_COALES
S
jz issue_cmdcmplt;
test LOCAL_HS_MAILBOX, ENINT_COALES
CE
jz issue_cmdcmplt;
/*
/*
* If we have relatively few commands outstanding, don't
* If we have relatively few commands outstanding, don't
* bother waiting for another command to complete.
* bother waiting for another command to complete.
*/
*/
test CMDS_PENDING[1], 0xFF jnz coales
s
_by_count;
test CMDS_PENDING[1], 0xFF jnz coales
ce
_by_count;
/* Add -1 so that jnc means <= not just < */
/* Add -1 so that jnc means <= not just < */
add A, -1, INT_COALES
S
ING_MINCMDS;
add A, -1, INT_COALES
C
ING_MINCMDS;
add NONE, A, CMDS_PENDING;
add NONE, A, CMDS_PENDING;
jnc issue_cmdcmplt;
jnc issue_cmdcmplt;
/*
/*
* If coales
sing, only coaless
up to the limit
* If coales
cing, only coalesce
up to the limit
* provided by the host driver.
* provided by the host driver.
*/
*/
coales
s
_by_count:
coales
ce
_by_count:
mov A, INT_COALES
S
ING_MAXCMDS;
mov A, INT_COALES
C
ING_MAXCMDS;
add NONE, A, INT_COALES
S
ING_CMDCOUNT;
add NONE, A, INT_COALES
C
ING_CMDCOUNT;
jc issue_cmdcmplt;
jc issue_cmdcmplt;
/*
/*
* If the timer is not currently active,
* If the timer is not currently active,
* fire it up.
* fire it up.
*/
*/
test INTCTL, SWTMINTMASK jz return;
test INTCTL, SWTMINTMASK jz return;
bmov SWTIMER, INT_COALES
S
ING_TIMER, 2;
bmov SWTIMER, INT_COALES
C
ING_TIMER, 2;
mvi CLRSEQINTSTAT, CLRSEQ_SWTMRTO;
mvi CLRSEQINTSTAT, CLRSEQ_SWTMRTO;
or INTCTL, SWTMINTEN|SWTIMER_START;
or INTCTL, SWTMINTEN|SWTIMER_START;
and INTCTL, ~SWTMINTMASK ret;
and INTCTL, ~SWTMINTMASK ret;
issue_cmdcmplt:
issue_cmdcmplt:
mvi INTSTAT, CMDCMPLT;
mvi INTSTAT, CMDCMPLT;
clr INT_COALES
S
ING_CMDCOUNT;
clr INT_COALES
C
ING_CMDCOUNT;
or INTCTL, SWTMINTMASK ret;
or INTCTL, SWTMINTMASK ret;
BEGIN_CRITICAL;
BEGIN_CRITICAL;
...
@@ -324,7 +324,7 @@ fill_qoutfifo_loop:
...
@@ -324,7 +324,7 @@ fill_qoutfifo_loop:
mov CCSCBRAM, SCBPTR;
mov CCSCBRAM, SCBPTR;
or CCSCBRAM, A, SCBPTR[1];
or CCSCBRAM, A, SCBPTR[1];
mov NONE, SDSCB_QOFF;
mov NONE, SDSCB_QOFF;
inc INT_COALES
S
ING_CMDCOUNT;
inc INT_COALES
C
ING_CMDCOUNT;
add CMDS_PENDING, -1;
add CMDS_PENDING, -1;
adc CMDS_PENDING[1], -1;
adc CMDS_PENDING[1], -1;
cmp SCB_NEXT_COMPLETE[1], SCB_LIST_NULL je fill_qoutfifo_done;
cmp SCB_NEXT_COMPLETE[1], SCB_LIST_NULL je fill_qoutfifo_done;
...
...
drivers/scsi/aic7xxx/aic79xx_core.c
View file @
c2fcb46e
...
@@ -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/aic79xx.c#19
0
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#19
1
$
*
*
* $FreeBSD$
* $FreeBSD$
*/
*/
...
@@ -4806,12 +4806,12 @@ ahd_alloc(void *platform_arg, char *name)
...
@@ -4806,12 +4806,12 @@ ahd_alloc(void *platform_arg, char *name)
|
AHD_EXTENDED_TRANS_A
|
AHD_STPWLEVEL_A
;
|
AHD_EXTENDED_TRANS_A
|
AHD_STPWLEVEL_A
;
ahd_timer_init
(
&
ahd
->
reset_timer
);
ahd_timer_init
(
&
ahd
->
reset_timer
);
ahd_timer_init
(
&
ahd
->
stat_timer
);
ahd_timer_init
(
&
ahd
->
stat_timer
);
ahd
->
int_coales
sing_timer
=
AHD_INT_COALESS
ING_TIMER_DEFAULT
;
ahd
->
int_coales
cing_timer
=
AHD_INT_COALESC
ING_TIMER_DEFAULT
;
ahd
->
int_coales
sing_maxcmds
=
AHD_INT_COALESS
ING_MAXCMDS_DEFAULT
;
ahd
->
int_coales
cing_maxcmds
=
AHD_INT_COALESC
ING_MAXCMDS_DEFAULT
;
ahd
->
int_coales
sing_mincmds
=
AHD_INT_COALESS
ING_MINCMDS_DEFAULT
;
ahd
->
int_coales
cing_mincmds
=
AHD_INT_COALESC
ING_MINCMDS_DEFAULT
;
ahd
->
int_coales
sing_threshold
=
AHD_INT_COALESS
ING_THRESHOLD_DEFAULT
;
ahd
->
int_coales
cing_threshold
=
AHD_INT_COALESC
ING_THRESHOLD_DEFAULT
;
ahd
->
int_coales
s
ing_stop_threshold
=
ahd
->
int_coales
c
ing_stop_threshold
=
AHD_INT_COALES
S
ING_STOP_THRESHOLD_DEFAULT
;
AHD_INT_COALES
C
ING_STOP_THRESHOLD_DEFAULT
;
if
(
ahd_platform_alloc
(
ahd
,
platform_arg
)
!=
0
)
{
if
(
ahd_platform_alloc
(
ahd
,
platform_arg
)
!=
0
)
{
ahd_free
(
ahd
);
ahd_free
(
ahd
);
...
@@ -6341,14 +6341,14 @@ ahd_chip_init(struct ahd_softc *ahd)
...
@@ -6341,14 +6341,14 @@ ahd_chip_init(struct ahd_softc *ahd)
ahd_outb
(
ahd
,
NEXT_QUEUED_SCB_ADDR
+
3
,
(
busaddr
>>
24
)
&
0xFF
);
ahd_outb
(
ahd
,
NEXT_QUEUED_SCB_ADDR
+
3
,
(
busaddr
>>
24
)
&
0xFF
);
/*
/*
* Default to coales
s
ing disabled.
* Default to coales
c
ing disabled.
*/
*/
ahd_outw
(
ahd
,
INT_COALES
S
ING_CMDCOUNT
,
0
);
ahd_outw
(
ahd
,
INT_COALES
C
ING_CMDCOUNT
,
0
);
ahd_outw
(
ahd
,
CMDS_PENDING
,
0
);
ahd_outw
(
ahd
,
CMDS_PENDING
,
0
);
ahd_update_coales
sing_values
(
ahd
,
ahd
->
int_coaless
ing_timer
,
ahd_update_coales
cing_values
(
ahd
,
ahd
->
int_coalesc
ing_timer
,
ahd
->
int_coales
s
ing_maxcmds
,
ahd
->
int_coales
c
ing_maxcmds
,
ahd
->
int_coales
s
ing_mincmds
);
ahd
->
int_coales
c
ing_mincmds
);
ahd_enable_coales
s
ing
(
ahd
,
FALSE
);
ahd_enable_coales
c
ing
(
ahd
,
FALSE
);
ahd_loadseq
(
ahd
);
ahd_loadseq
(
ahd
);
ahd_set_modes
(
ahd
,
AHD_MODE_SCSI
,
AHD_MODE_SCSI
);
ahd_set_modes
(
ahd
,
AHD_MODE_SCSI
,
AHD_MODE_SCSI
);
...
@@ -6601,30 +6601,30 @@ ahd_intr_enable(struct ahd_softc *ahd, int enable)
...
@@ -6601,30 +6601,30 @@ ahd_intr_enable(struct ahd_softc *ahd, int enable)
}
}
void
void
ahd_update_coales
s
ing_values
(
struct
ahd_softc
*
ahd
,
u_int
timer
,
u_int
maxcmds
,
ahd_update_coales
c
ing_values
(
struct
ahd_softc
*
ahd
,
u_int
timer
,
u_int
maxcmds
,
u_int
mincmds
)
u_int
mincmds
)
{
{
if
(
timer
>
AHD_TIMER_MAX_US
)
if
(
timer
>
AHD_TIMER_MAX_US
)
timer
=
AHD_TIMER_MAX_US
;
timer
=
AHD_TIMER_MAX_US
;
ahd
->
int_coales
s
ing_timer
=
timer
;
ahd
->
int_coales
c
ing_timer
=
timer
;
if
(
maxcmds
>
AHD_INT_COALES
S
ING_MAXCMDS_MAX
)
if
(
maxcmds
>
AHD_INT_COALES
C
ING_MAXCMDS_MAX
)
maxcmds
=
AHD_INT_COALES
S
ING_MAXCMDS_MAX
;
maxcmds
=
AHD_INT_COALES
C
ING_MAXCMDS_MAX
;
if
(
mincmds
>
AHD_INT_COALES
S
ING_MINCMDS_MAX
)
if
(
mincmds
>
AHD_INT_COALES
C
ING_MINCMDS_MAX
)
mincmds
=
AHD_INT_COALES
S
ING_MINCMDS_MAX
;
mincmds
=
AHD_INT_COALES
C
ING_MINCMDS_MAX
;
ahd
->
int_coales
s
ing_maxcmds
=
maxcmds
;
ahd
->
int_coales
c
ing_maxcmds
=
maxcmds
;
ahd_outw
(
ahd
,
INT_COALES
S
ING_TIMER
,
timer
/
AHD_TIMER_US_PER_TICK
);
ahd_outw
(
ahd
,
INT_COALES
C
ING_TIMER
,
timer
/
AHD_TIMER_US_PER_TICK
);
ahd_outb
(
ahd
,
INT_COALES
S
ING_MAXCMDS
,
-
maxcmds
);
ahd_outb
(
ahd
,
INT_COALES
C
ING_MAXCMDS
,
-
maxcmds
);
ahd_outb
(
ahd
,
INT_COALES
S
ING_MINCMDS
,
-
mincmds
);
ahd_outb
(
ahd
,
INT_COALES
C
ING_MINCMDS
,
-
mincmds
);
}
}
void
void
ahd_enable_coales
s
ing
(
struct
ahd_softc
*
ahd
,
int
enable
)
ahd_enable_coales
c
ing
(
struct
ahd_softc
*
ahd
,
int
enable
)
{
{
ahd
->
hs_mailbox
&=
~
ENINT_COALES
S
;
ahd
->
hs_mailbox
&=
~
ENINT_COALES
CE
;
if
(
enable
)
if
(
enable
)
ahd
->
hs_mailbox
|=
ENINT_COALES
S
;
ahd
->
hs_mailbox
|=
ENINT_COALES
CE
;
ahd_outb
(
ahd
,
HS_MAILBOX
,
ahd
->
hs_mailbox
);
ahd_outb
(
ahd
,
HS_MAILBOX
,
ahd
->
hs_mailbox
);
ahd_flush_device_writes
(
ahd
);
ahd_flush_device_writes
(
ahd
);
ahd_run_qoutfifo
(
ahd
);
ahd_run_qoutfifo
(
ahd
);
...
@@ -7718,20 +7718,20 @@ ahd_stat_timer(void *arg)
...
@@ -7718,20 +7718,20 @@ ahd_stat_timer(void *arg)
}
}
ahd_lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
enint_coal
=
ahd
->
hs_mailbox
&
ENINT_COALES
S
;
enint_coal
=
ahd
->
hs_mailbox
&
ENINT_COALES
CE
;
if
(
ahd
->
cmdcmplt_total
>
ahd
->
int_coales
s
ing_threshold
)
if
(
ahd
->
cmdcmplt_total
>
ahd
->
int_coales
c
ing_threshold
)
enint_coal
|=
ENINT_COALES
S
;
enint_coal
|=
ENINT_COALES
CE
;
else
if
(
ahd
->
cmdcmplt_total
<
ahd
->
int_coales
s
ing_stop_threshold
)
else
if
(
ahd
->
cmdcmplt_total
<
ahd
->
int_coales
c
ing_stop_threshold
)
enint_coal
&=
~
ENINT_COALES
S
;
enint_coal
&=
~
ENINT_COALES
CE
;
if
(
enint_coal
!=
(
ahd
->
hs_mailbox
&
ENINT_COALES
S
))
{
if
(
enint_coal
!=
(
ahd
->
hs_mailbox
&
ENINT_COALES
CE
))
{
ahd_enable_coales
s
ing
(
ahd
,
enint_coal
);
ahd_enable_coales
c
ing
(
ahd
,
enint_coal
);
#ifdef AHD_DEBUG
#ifdef AHD_DEBUG
if
((
ahd_debug
&
AHD_SHOW_INT_COALES
S
ING
)
!=
0
)
if
((
ahd_debug
&
AHD_SHOW_INT_COALES
C
ING
)
!=
0
)
printf
(
"%s: Interrupt coales
s
ing "
printf
(
"%s: Interrupt coales
c
ing "
"now %sabled. Cmds %d
\n
"
,
"now %sabled. Cmds %d
\n
"
,
ahd_name
(
ahd
),
ahd_name
(
ahd
),
(
enint_coal
&
ENINT_COALES
S
)
?
"en"
:
"dis"
,
(
enint_coal
&
ENINT_COALES
CE
)
?
"en"
:
"dis"
,
ahd
->
cmdcmplt_total
);
ahd
->
cmdcmplt_total
);
#endif
#endif
}
}
...
...
drivers/scsi/aic7xxx/aic79xx_osm.c
View file @
c2fcb46e
/*
/*
* Adaptec AIC79xx device driver for Linux.
* Adaptec AIC79xx device driver for Linux.
*
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#16
0
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#16
7
$
*
*
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs.
* Copyright (c) 1994-2000 Justin T. Gibbs.
...
@@ -62,11 +62,6 @@
...
@@ -62,11 +62,6 @@
#include <linux/mm.h>
/* For fetching system memory size */
#include <linux/mm.h>
/* For fetching system memory size */
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
static
int
errno
;
/*
/*
* Lock protecting manipulation of the ahd softc list.
* Lock protecting manipulation of the ahd softc list.
*/
*/
...
@@ -755,31 +750,11 @@ ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
...
@@ -755,31 +750,11 @@ ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
consumed
=
1
;
consumed
=
1
;
sg
->
addr
=
ahd_htole32
(
addr
&
0xFFFFFFFF
);
sg
->
addr
=
ahd_htole32
(
addr
&
0xFFFFFFFF
);
scb
->
platform_data
->
xfer_len
+=
len
;
scb
->
platform_data
->
xfer_len
+=
len
;
if
(
sizeof
(
bus_addr_t
)
>
4
&&
(
ahd
->
flags
&
AHD_39BIT_ADDRESSING
)
!=
0
)
{
/*
* Due to DAC restrictions, we can't
* cross a 4GB boundary.
*/
if
((
addr
^
(
addr
+
len
-
1
))
&
~
0xFFFFFFFF
)
{
struct
ahd_dma_seg
*
next_sg
;
uint32_t
next_len
;
printf
(
"Crossed Seg
\n
"
);
if
(
sizeof
(
bus_addr_t
)
>
4
if
((
scb
->
sg_count
+
2
)
>
AHD_NSEG
)
&&
(
ahd
->
flags
&
AHD_39BIT_ADDRESSING
)
!=
0
)
panic
(
"Too few segs for dma mapping. "
len
|=
(
addr
>>
8
)
&
AHD_SG_HIGH_ADDR_MASK
;
"Increase AHD_NSEG
\n
"
);
consumed
++
;
next_sg
=
sg
+
1
;
next_sg
->
addr
=
0
;
next_len
=
0x100000000
-
(
addr
&
0xFFFFFFFF
);
len
-=
next_len
;
next_len
|=
((
addr
>>
8
)
+
0x1000000
)
&
0x7F000000
;
next_sg
->
len
=
ahd_htole32
(
next_len
);
}
len
|=
(
addr
>>
8
)
&
0x7F000000
;
}
sg
->
len
=
ahd_htole32
(
len
);
sg
->
len
=
ahd_htole32
(
len
);
return
(
consumed
);
return
(
consumed
);
}
}
...
@@ -796,14 +771,18 @@ static int ahd_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
...
@@ -796,14 +771,18 @@ static int ahd_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
static
int
ahd_linux_slave_alloc
(
Scsi_Device
*
);
static
int
ahd_linux_slave_alloc
(
Scsi_Device
*
);
static
int
ahd_linux_slave_configure
(
Scsi_Device
*
);
static
int
ahd_linux_slave_configure
(
Scsi_Device
*
);
static
void
ahd_linux_slave_destroy
(
Scsi_Device
*
);
static
void
ahd_linux_slave_destroy
(
Scsi_Device
*
);
#if defined(__i386__)
static
int
ahd_linux_biosparam
(
struct
scsi_device
*
,
static
int
ahd_linux_biosparam
(
struct
scsi_device
*
,
struct
block_device
*
,
sector_t
,
int
[]);
struct
block_device
*
,
sector_t
,
int
[]);
#endif
#else
#else
static
int
ahd_linux_release
(
struct
Scsi_Host
*
);
static
int
ahd_linux_release
(
struct
Scsi_Host
*
);
static
void
ahd_linux_select_queue_depth
(
struct
Scsi_Host
*
host
,
static
void
ahd_linux_select_queue_depth
(
struct
Scsi_Host
*
host
,
Scsi_Device
*
scsi_devs
);
Scsi_Device
*
scsi_devs
);
#if defined(__i386__)
static
int
ahd_linux_biosparam
(
Disk
*
,
kdev_t
,
int
[]);
static
int
ahd_linux_biosparam
(
Disk
*
,
kdev_t
,
int
[]);
#endif
#endif
#endif
static
int
ahd_linux_bus_reset
(
Scsi_Cmnd
*
);
static
int
ahd_linux_bus_reset
(
Scsi_Cmnd
*
);
static
int
ahd_linux_dev_reset
(
Scsi_Cmnd
*
);
static
int
ahd_linux_dev_reset
(
Scsi_Cmnd
*
);
static
int
ahd_linux_abort
(
Scsi_Cmnd
*
);
static
int
ahd_linux_abort
(
Scsi_Cmnd
*
);
...
@@ -1211,6 +1190,7 @@ ahd_linux_select_queue_depth(struct Scsi_Host * host,
...
@@ -1211,6 +1190,7 @@ ahd_linux_select_queue_depth(struct Scsi_Host * host,
}
}
#endif
#endif
#if defined(__i386__)
/*
/*
* Return the disk geometry for the given SCSI device.
* Return the disk geometry for the given SCSI device.
*/
*/
...
@@ -1273,6 +1253,7 @@ ahd_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
...
@@ -1273,6 +1253,7 @@ ahd_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
geom
[
2
]
=
cylinders
;
geom
[
2
]
=
cylinders
;
return
(
0
);
return
(
0
);
}
}
#endif
/*
/*
* Abort the current SCSI command(s).
* Abort the current SCSI command(s).
...
@@ -4211,7 +4192,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev)
...
@@ -4211,7 +4192,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev)
/*
/*
* SCSI controller interrupt handler.
* SCSI controller interrupt handler.
*/
*/
AIC_LINUX_IRQRETURN_T
irqreturn_t
ahd_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
ahd_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
ahd_softc
*
ahd
;
struct
ahd_softc
*
ahd
;
...
@@ -4225,7 +4206,7 @@ ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -4225,7 +4206,7 @@ ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs)
ahd_schedule_runq
(
ahd
);
ahd_schedule_runq
(
ahd
);
ahd_linux_run_complete_queue
(
ahd
);
ahd_linux_run_complete_queue
(
ahd
);
ahd_unlock
(
ahd
,
&
flags
);
ahd_unlock
(
ahd
,
&
flags
);
AIC_LINUX_IRQRETURN
(
ours
);
return
IRQ_RETVAL
(
ours
);
}
}
void
void
...
...
drivers/scsi/aic7xxx/aic79xx_osm.h
View file @
c2fcb46e
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,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/aic79xx_osm.h#13
0
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#13
2
$
*
*
*/
*/
#ifndef _AIC79XX_LINUX_H_
#ifndef _AIC79XX_LINUX_H_
...
@@ -1211,7 +1211,7 @@ void ahd_platform_set_tags(struct ahd_softc *ahd,
...
@@ -1211,7 +1211,7 @@ void ahd_platform_set_tags(struct ahd_softc *ahd,
int
ahd_platform_abort_scbs
(
struct
ahd_softc
*
ahd
,
int
target
,
int
ahd_platform_abort_scbs
(
struct
ahd_softc
*
ahd
,
int
target
,
char
channel
,
int
lun
,
u_int
tag
,
char
channel
,
int
lun
,
u_int
tag
,
role_t
role
,
uint32_t
status
);
role_t
role
,
uint32_t
status
);
AIC_LINUX_IRQRETURN_T
irqreturn_t
ahd_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
ahd_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
void
ahd_platform_flushwork
(
struct
ahd_softc
*
ahd
);
void
ahd_platform_flushwork
(
struct
ahd_softc
*
ahd
);
int
ahd_softc_comp
(
struct
ahd_softc
*
,
struct
ahd_softc
*
);
int
ahd_softc_comp
(
struct
ahd_softc
*
,
struct
ahd_softc
*
);
...
...
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
View file @
c2fcb46e
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,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/aic79xx_osm_pci.c#2
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#2
3
$
*/
*/
#include "aic79xx_osm.h"
#include "aic79xx_osm.h"
...
@@ -157,18 +157,20 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -157,18 +157,20 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if
(
sizeof
(
bus_addr_t
)
>
4
)
{
if
(
sizeof
(
bus_addr_t
)
>
4
)
{
uint64_t
memsize
;
uint64_t
memsize
;
bus_addr_t
mask_64bit
;
bus_addr_t
mask_39bit
;
memsize
=
ahd_linux_get_memsize
();
memsize
=
ahd_linux_get_memsize
();
if
(
memsize
>=
0x8000000000
mask_64bit
=
(
bus_addr_t
)(
0xFFFFFFFFFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
&&
ahd_pci_set_dma_mask
(
pdev
,
0xFFFFFFFFFFFFFFFFULL
)
==
0
)
{
mask_39bit
=
(
bus_addr_t
)(
0x7FFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
if
(
memsize
>=
0x8000000000ULL
&&
ahd_pci_set_dma_mask
(
pdev
,
mask_64bit
)
==
0
)
{
ahd
->
flags
|=
AHD_64BIT_ADDRESSING
;
ahd
->
flags
|=
AHD_64BIT_ADDRESSING
;
ahd
->
platform_data
->
hw_dma_mask
=
ahd
->
platform_data
->
hw_dma_mask
=
mask_64bit
;
(
bus_addr_t
)(
0xFFFFFFFFFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
}
else
if
(
memsize
>
0x80000000
}
else
if
(
memsize
>
0x80000000
&&
ahd_pci_set_dma_mask
(
pdev
,
0x7FFFFFFFFFULL
)
==
0
)
{
&&
ahd_pci_set_dma_mask
(
pdev
,
mask_39bit
)
==
0
)
{
ahd
->
flags
|=
AHD_39BIT_ADDRESSING
;
ahd
->
flags
|=
AHD_39BIT_ADDRESSING
;
ahd
->
platform_data
->
hw_dma_mask
=
ahd
->
platform_data
->
hw_dma_mask
=
mask_39bit
;
(
bus_addr_t
)(
0x7FFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
}
}
}
else
{
}
else
{
ahd_pci_set_dma_mask
(
pdev
,
0xFFFFFFFF
);
ahd_pci_set_dma_mask
(
pdev
,
0xFFFFFFFF
);
...
...
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
View file @
c2fcb46e
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated
* DO NOT EDIT - This file is automatically generated
* from the following source files:
* from the following source files:
*
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
1
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
2
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
8
$
*/
*/
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
typedef struct ahd_reg_parse_entry {
typedef struct ahd_reg_parse_entry {
...
@@ -2134,24 +2134,24 @@ ahd_reg_print_t ahd_allocfifo_scbptr_print;
...
@@ -2134,24 +2134,24 @@ ahd_reg_print_t ahd_allocfifo_scbptr_print;
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coales
s
ing_timer_print;
ahd_reg_print_t ahd_int_coales
c
ing_timer_print;
#else
#else
#define ahd_int_coales
s
ing_timer_print(regvalue, cur_col, wrap) \
#define ahd_int_coales
c
ing_timer_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALES
S
ING_TIMER", 0x14a, regvalue, cur_col, wrap)
ahd_print_register(NULL, 0, "INT_COALES
C
ING_TIMER", 0x14a, regvalue, cur_col, wrap)
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coales
s
ing_maxcmds_print;
ahd_reg_print_t ahd_int_coales
c
ing_maxcmds_print;
#else
#else
#define ahd_int_coales
s
ing_maxcmds_print(regvalue, cur_col, wrap) \
#define ahd_int_coales
c
ing_maxcmds_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALES
S
ING_MAXCMDS", 0x14c, regvalue, cur_col, wrap)
ahd_print_register(NULL, 0, "INT_COALES
C
ING_MAXCMDS", 0x14c, regvalue, cur_col, wrap)
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coales
s
ing_mincmds_print;
ahd_reg_print_t ahd_int_coales
c
ing_mincmds_print;
#else
#else
#define ahd_int_coales
s
ing_mincmds_print(regvalue, cur_col, wrap) \
#define ahd_int_coales
c
ing_mincmds_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALES
S
ING_MINCMDS", 0x14d, regvalue, cur_col, wrap)
ahd_print_register(NULL, 0, "INT_COALES
C
ING_MINCMDS", 0x14d, regvalue, cur_col, wrap)
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
...
@@ -2162,10 +2162,10 @@ ahd_reg_print_t ahd_cmds_pending_print;
...
@@ -2162,10 +2162,10 @@ ahd_reg_print_t ahd_cmds_pending_print;
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
ahd_reg_print_t ahd_int_coales
s
ing_cmdcount_print;
ahd_reg_print_t ahd_int_coales
c
ing_cmdcount_print;
#else
#else
#define ahd_int_coales
s
ing_cmdcount_print(regvalue, cur_col, wrap) \
#define ahd_int_coales
c
ing_cmdcount_print(regvalue, cur_col, wrap) \
ahd_print_register(NULL, 0, "INT_COALES
S
ING_CMDCOUNT", 0x150, regvalue, cur_col, wrap)
ahd_print_register(NULL, 0, "INT_COALES
C
ING_CMDCOUNT", 0x150, regvalue, cur_col, wrap)
#endif
#endif
#if AIC_DEBUG_REGISTERS
#if AIC_DEBUG_REGISTERS
...
@@ -2432,7 +2432,7 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
...
@@ -2432,7 +2432,7 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define HS_MAILBOX 0x0b
#define HS_MAILBOX 0x0b
#define HOST_TQINPOS 0x80
#define HOST_TQINPOS 0x80
#define ENINT_COALES
S
0x40
#define ENINT_COALES
CE
0x40
#define CLRSEQINTSTAT 0x0c
#define CLRSEQINTSTAT 0x0c
#define CLRSEQ_SWTMRTO 0x10
#define CLRSEQ_SWTMRTO 0x10
...
@@ -3612,15 +3612,15 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
...
@@ -3612,15 +3612,15 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
#define ALLOCFIFO_SCBPTR 0x148
#define ALLOCFIFO_SCBPTR 0x148
#define INT_COALES
S
ING_TIMER 0x14a
#define INT_COALES
C
ING_TIMER 0x14a
#define INT_COALES
S
ING_MAXCMDS 0x14c
#define INT_COALES
C
ING_MAXCMDS 0x14c
#define INT_COALES
S
ING_MINCMDS 0x14d
#define INT_COALES
C
ING_MINCMDS 0x14d
#define CMDS_PENDING 0x14e
#define CMDS_PENDING 0x14e
#define INT_COALES
S
ING_CMDCOUNT 0x150
#define INT_COALES
C
ING_CMDCOUNT 0x150
#define LOCAL_HS_MAILBOX 0x151
#define LOCAL_HS_MAILBOX 0x151
...
...
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
View file @
c2fcb46e
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated
* DO NOT EDIT - This file is automatically generated
* from the following source files:
* from the following source files:
*
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
1
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
2
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
8
$
*/
*/
#include "aic79xx_osm.h"
#include "aic79xx_osm.h"
...
@@ -161,7 +161,7 @@ ahd_hescb_qoff_print(u_int regvalue, u_int *cur_col, u_int wrap)
...
@@ -161,7 +161,7 @@ ahd_hescb_qoff_print(u_int regvalue, u_int *cur_col, u_int wrap)
}
}
static ahd_reg_parse_entry_t HS_MAILBOX_parse_table[] = {
static ahd_reg_parse_entry_t HS_MAILBOX_parse_table[] = {
{ "ENINT_COALES
S
", 0x40, 0x40 },
{ "ENINT_COALES
CE
", 0x40, 0x40 },
{ "HOST_TQINPOS", 0x80, 0x80 }
{ "HOST_TQINPOS", 0x80, 0x80 }
};
};
...
@@ -3375,23 +3375,23 @@ ahd_allocfifo_scbptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
...
@@ -3375,23 +3375,23 @@ ahd_allocfifo_scbptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
}
}
int
int
ahd_int_coales
s
ing_timer_print(u_int regvalue, u_int *cur_col, u_int wrap)
ahd_int_coales
c
ing_timer_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
{
return (ahd_print_register(NULL, 0, "INT_COALES
S
ING_TIMER",
return (ahd_print_register(NULL, 0, "INT_COALES
C
ING_TIMER",
0x14a, regvalue, cur_col, wrap));
0x14a, regvalue, cur_col, wrap));
}
}
int
int
ahd_int_coales
s
ing_maxcmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
ahd_int_coales
c
ing_maxcmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
{
return (ahd_print_register(NULL, 0, "INT_COALES
S
ING_MAXCMDS",
return (ahd_print_register(NULL, 0, "INT_COALES
C
ING_MAXCMDS",
0x14c, regvalue, cur_col, wrap));
0x14c, regvalue, cur_col, wrap));
}
}
int
int
ahd_int_coales
s
ing_mincmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
ahd_int_coales
c
ing_mincmds_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
{
return (ahd_print_register(NULL, 0, "INT_COALES
S
ING_MINCMDS",
return (ahd_print_register(NULL, 0, "INT_COALES
C
ING_MINCMDS",
0x14d, regvalue, cur_col, wrap));
0x14d, regvalue, cur_col, wrap));
}
}
...
@@ -3403,9 +3403,9 @@ ahd_cmds_pending_print(u_int regvalue, u_int *cur_col, u_int wrap)
...
@@ -3403,9 +3403,9 @@ ahd_cmds_pending_print(u_int regvalue, u_int *cur_col, u_int wrap)
}
}
int
int
ahd_int_coales
s
ing_cmdcount_print(u_int regvalue, u_int *cur_col, u_int wrap)
ahd_int_coales
c
ing_cmdcount_print(u_int regvalue, u_int *cur_col, u_int wrap)
{
{
return (ahd_print_register(NULL, 0, "INT_COALES
S
ING_CMDCOUNT",
return (ahd_print_register(NULL, 0, "INT_COALES
C
ING_CMDCOUNT",
0x150, regvalue, cur_col, wrap));
0x150, regvalue, cur_col, wrap));
}
}
...
...
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
View file @
c2fcb46e
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* DO NOT EDIT - This file is automatically generated
* DO NOT EDIT - This file is automatically generated
* from the following source files:
* from the following source files:
*
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
1
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#9
2
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#6
8
$
*/
*/
static uint8_t seqprog[] = {
static uint8_t seqprog[] = {
0xff, 0x02, 0x06, 0x78,
0xff, 0x02, 0x06, 0x78,
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.c
View file @
c2fcb46e
/*
/*
* Adaptec AIC7xxx device driver for Linux.
* Adaptec AIC7xxx device driver for Linux.
*
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#22
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#22
9
$
*
*
* 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.
...
@@ -141,11 +141,6 @@
...
@@ -141,11 +141,6 @@
#include <linux/mm.h>
/* For fetching system memory size */
#include <linux/mm.h>
/* For fetching system memory size */
#include <linux/blk.h>
/* For block_size() */
#include <linux/blk.h>
/* For block_size() */
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
static
int
errno
;
/*
/*
* Lock protecting manipulation of the ahc softc list.
* Lock protecting manipulation of the ahc softc list.
*/
*/
...
@@ -746,31 +741,11 @@ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
...
@@ -746,31 +741,11 @@ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
consumed
=
1
;
consumed
=
1
;
sg
->
addr
=
ahc_htole32
(
addr
&
0xFFFFFFFF
);
sg
->
addr
=
ahc_htole32
(
addr
&
0xFFFFFFFF
);
scb
->
platform_data
->
xfer_len
+=
len
;
scb
->
platform_data
->
xfer_len
+=
len
;
if
(
sizeof
(
bus_addr_t
)
>
4
&&
(
ahc
->
flags
&
AHC_39BIT_ADDRESSING
)
!=
0
)
{
/*
* Due to DAC restrictions, we can't
* cross a 4GB boundary.
*/
if
((
addr
^
(
addr
+
len
-
1
))
&
~
0xFFFFFFFF
)
{
struct
ahc_dma_seg
*
next_sg
;
uint32_t
next_len
;
printf
(
"Crossed Seg
\n
"
);
if
(
sizeof
(
bus_addr_t
)
>
4
if
((
scb
->
sg_count
+
2
)
>
AHC_NSEG
)
&&
(
ahc
->
flags
&
AHC_39BIT_ADDRESSING
)
!=
0
)
panic
(
"Too few segs for dma mapping. "
len
|=
(
addr
>>
8
)
&
AHC_SG_HIGH_ADDR_MASK
;
"Increase AHC_NSEG
\n
"
);
consumed
++
;
next_sg
=
sg
+
1
;
next_sg
->
addr
=
0
;
next_len
=
0x100000000
-
(
addr
&
0xFFFFFFFF
);
len
-=
next_len
;
next_len
|=
((
addr
>>
8
)
+
0x1000000
)
&
0x7F000000
;
next_sg
->
len
=
ahc_htole32
(
next_len
);
}
len
|=
(
addr
>>
8
)
&
0x7F000000
;
}
sg
->
len
=
ahc_htole32
(
len
);
sg
->
len
=
ahc_htole32
(
len
);
return
(
consumed
);
return
(
consumed
);
}
}
...
@@ -1195,10 +1170,10 @@ ahc_linux_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs)
...
@@ -1195,10 +1170,10 @@ ahc_linux_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs)
}
}
#endif
#endif
#if defined(__i386__)
/*
/*
* Return the disk geometry for the given SCSI device.
* Return the disk geometry for the given SCSI device.
*/
*/
#if defined(__i386__)
static
int
static
int
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_linux_biosparam
(
struct
scsi_device
*
sdev
,
struct
block_device
*
bdev
,
ahc_linux_biosparam
(
struct
scsi_device
*
sdev
,
struct
block_device
*
bdev
,
...
@@ -1747,7 +1722,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
...
@@ -1747,7 +1722,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
struct
Scsi_Host
*
host
;
struct
Scsi_Host
*
host
;
char
*
new_name
;
char
*
new_name
;
u_long
s
;
u_long
s
;
u_int
target
;
u_int
targ
_offs
et
;
template
->
name
=
ahc
->
description
;
template
->
name
=
ahc
->
description
;
host
=
scsi_register
(
template
,
sizeof
(
struct
ahc_softc
*
));
host
=
scsi_register
(
template
,
sizeof
(
struct
ahc_softc
*
));
...
@@ -1802,14 +1777,19 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
...
@@ -1802,14 +1777,19 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
* negotiation will occur for the first command, and DV
* negotiation will occur for the first command, and DV
* will comence should that first command be successful.
* will comence should that first command be successful.
*/
*/
for
(
target
=
0
;
for
(
targ_offset
=
0
;
target
<
host
->
max_id
*
(
host
->
max_channel
+
1
);
target
++
)
{
targ_offset
<
host
->
max_id
*
(
host
->
max_channel
+
1
);
targ_offset
++
)
{
u_int
channel
;
u_int
channel
;
u_int
target
;
channel
=
0
;
channel
=
0
;
target
=
targ_offset
;
if
(
target
>
7
if
(
target
>
7
&&
(
ahc
->
features
&
AHC_TWIN
)
!=
0
)
&&
(
ahc
->
features
&
AHC_TWIN
)
!=
0
)
{
channel
=
1
;
channel
=
1
;
target
&=
0x7
;
}
/*
/*
* Skip our own ID. Some Compaq/HP storage devices
* Skip our own ID. Some Compaq/HP storage devices
* have enclosure management devices that respond to
* have enclosure management devices that respond to
...
@@ -2443,8 +2423,10 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
...
@@ -2443,8 +2423,10 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
return
;
return
;
}
}
ahc_compile_devinfo
(
&
devinfo
,
ahc
->
our_id
,
targ
->
target
,
/*lun*/
0
,
ahc_compile_devinfo
(
&
devinfo
,
targ
->
channel
+
'A'
,
ROLE_INITIATOR
);
targ
->
channel
==
0
?
ahc
->
our_id
:
ahc
->
our_id_b
,
targ
->
target
,
/*lun*/
0
,
targ
->
channel
+
'A'
,
ROLE_INITIATOR
);
#ifdef AHC_DEBUG
#ifdef AHC_DEBUG
if
(
ahc_debug
&
AHC_SHOW_DV
)
{
if
(
ahc_debug
&
AHC_SHOW_DV
)
{
ahc_print_devinfo
(
ahc
,
&
devinfo
);
ahc_print_devinfo
(
ahc
,
&
devinfo
);
...
@@ -3881,7 +3863,7 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev)
...
@@ -3881,7 +3863,7 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev)
/*
/*
* SCSI controller interrupt handler.
* SCSI controller interrupt handler.
*/
*/
AIC_LINUX_IRQRETURN_T
irqreturn_t
ahc_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
ahc_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
ahc_softc
*
ahc
;
struct
ahc_softc
*
ahc
;
...
@@ -3895,7 +3877,7 @@ ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -3895,7 +3877,7 @@ ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs)
ahc_schedule_runq
(
ahc
);
ahc_schedule_runq
(
ahc
);
ahc_linux_run_complete_queue
(
ahc
);
ahc_linux_run_complete_queue
(
ahc
);
ahc_unlock
(
ahc
,
&
flags
);
ahc_unlock
(
ahc
,
&
flags
);
AIC_LINUX_IRQRETURN
(
ours
);
return
IRQ_RETVAL
(
ours
);
}
}
void
void
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.h
View file @
c2fcb46e
...
@@ -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#14
2
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#14
5
$
*
*
*/
*/
#ifndef _AIC7XXX_LINUX_H_
#ifndef _AIC7XXX_LINUX_H_
...
@@ -305,7 +305,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
...
@@ -305,7 +305,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#define AHC_SCSI_HAS_HOST_LOCK 0
#define AHC_SCSI_HAS_HOST_LOCK 0
#endif
#endif
#define AIC7XXX_DRIVER_VERSION "6.2.3
3
"
#define AIC7XXX_DRIVER_VERSION "6.2.3
4
"
/**************************** Front End Queues ********************************/
/**************************** Front End Queues ********************************/
/*
/*
...
@@ -778,7 +778,7 @@ ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
...
@@ -778,7 +778,7 @@ ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
}
}
static
__inline
void
static
__inline
void
ahc_list_lockinit
(
void
)
ahc_list_lockinit
()
{
{
spin_lock_init
(
&
ahc_list_spinlock
);
spin_lock_init
(
&
ahc_list_spinlock
);
}
}
...
@@ -1165,7 +1165,7 @@ void ahc_platform_set_tags(struct ahc_softc *ahc,
...
@@ -1165,7 +1165,7 @@ void ahc_platform_set_tags(struct ahc_softc *ahc,
int
ahc_platform_abort_scbs
(
struct
ahc_softc
*
ahc
,
int
target
,
int
ahc_platform_abort_scbs
(
struct
ahc_softc
*
ahc
,
int
target
,
char
channel
,
int
lun
,
u_int
tag
,
char
channel
,
int
lun
,
u_int
tag
,
role_t
role
,
uint32_t
status
);
role_t
role
,
uint32_t
status
);
AIC_LINUX_IRQRETURN_T
irqreturn_t
ahc_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
ahc_linux_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
void
ahc_platform_flushwork
(
struct
ahc_softc
*
ahc
);
void
ahc_platform_flushwork
(
struct
ahc_softc
*
ahc
);
int
ahc_softc_comp
(
struct
ahc_softc
*
,
struct
ahc_softc
*
);
int
ahc_softc_comp
(
struct
ahc_softc
*
,
struct
ahc_softc
*
);
...
...
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
View file @
c2fcb46e
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,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_pci.c#4
4
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#4
5
$
*/
*/
#include "aic7xxx_osm.h"
#include "aic7xxx_osm.h"
...
@@ -110,6 +110,7 @@ static int
...
@@ -110,6 +110,7 @@ static int
ahc_linux_pci_dev_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
ahc_linux_pci_dev_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
{
{
char
buf
[
80
];
char
buf
[
80
];
bus_addr_t
mask_39bit
;
struct
ahc_softc
*
ahc
;
struct
ahc_softc
*
ahc
;
ahc_dev_softc_t
pci
;
ahc_dev_softc_t
pci
;
struct
ahc_pci_identity
*
entry
;
struct
ahc_pci_identity
*
entry
;
...
@@ -160,12 +161,12 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -160,12 +161,12 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}
pci_set_master
(
pdev
);
pci_set_master
(
pdev
);
mask_39bit
=
(
bus_addr_t
)(
0x7FFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
if
(
sizeof
(
bus_addr_t
)
>
4
if
(
sizeof
(
bus_addr_t
)
>
4
&&
ahc_linux_get_memsize
()
>
0x80000000
&&
ahc_linux_get_memsize
()
>
0x80000000
&&
ahc_pci_set_dma_mask
(
pdev
,
0x7FFFFFFFFFULL
)
==
0
)
{
&&
ahc_pci_set_dma_mask
(
pdev
,
mask_39bit
)
==
0
)
{
ahc
->
flags
|=
AHC_39BIT_ADDRESSING
;
ahc
->
flags
|=
AHC_39BIT_ADDRESSING
;
ahc
->
platform_data
->
hw_dma_mask
=
ahc
->
platform_data
->
hw_dma_mask
=
mask_39bit
;
(
bus_addr_t
)(
0x7FFFFFFFFFULL
&
(
bus_addr_t
)
~
0
);
}
else
{
}
else
{
ahc_pci_set_dma_mask
(
pdev
,
0xFFFFFFFF
);
ahc_pci_set_dma_mask
(
pdev
,
0xFFFFFFFF
);
ahc
->
platform_data
->
hw_dma_mask
=
0xFFFFFFFF
;
ahc
->
platform_data
->
hw_dma_mask
=
0xFFFFFFFF
;
...
...
drivers/scsi/aic7xxx/aic7xxx_pci.c
View file @
c2fcb46e
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,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_pci.c#6
3
$
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#6
4
$
*
*
* $FreeBSD$
* $FreeBSD$
*/
*/
...
...
drivers/scsi/aic7xxx/aiclib.h
View file @
c2fcb46e
...
@@ -60,12 +60,9 @@
...
@@ -60,12 +60,9 @@
/*
/*
* Linux Interrupt Support.
* Linux Interrupt Support.
*/
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#ifndef IRQ_RETVAL
#define AIC_LINUX_IRQRETURN_T irqreturn_t
typedef
void
irqreturn_t
;
#define AIC_LINUX_IRQRETURN(ours) return (IRQ_RETVAL(ours))
#define IRQ_RETVAL(x)
#else
#define AIC_LINUX_IRQRETURN_T void
#define AIC_LINUX_IRQRETURN(ours) return
#endif
#endif
/*
/*
...
...
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