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
92bde82b
Commit
92bde82b
authored
Dec 30, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
27b3d11b
dc1a5b93
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
191 additions
and
71 deletions
+191
-71
drivers/scsi/Makefile
drivers/scsi/Makefile
+1
-0
drivers/scsi/aic7xxx/Kconfig.aic79xx
drivers/scsi/aic7xxx/Kconfig.aic79xx
+8
-8
drivers/scsi/aic7xxx/Kconfig.aic7xxx
drivers/scsi/aic7xxx/Kconfig.aic7xxx
+2
-2
drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic7770_osm.c
+8
-1
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_core.c
+5
-4
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
+58
-17
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/aic7xxx/aic79xx_osm.h
+8
-4
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+3
-5
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_core.c
+5
-2
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
+68
-16
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm.h
+8
-4
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+2
-3
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
+2
-2
drivers/scsi/aic7xxx/aiclib.c
drivers/scsi/aic7xxx/aiclib.c
+9
-3
drivers/scsi/aic7xxx/aiclib.h
drivers/scsi/aic7xxx/aiclib.h
+4
-0
No files found.
drivers/scsi/Makefile
View file @
92bde82b
...
...
@@ -58,6 +58,7 @@ obj-$(CONFIG_SCSI_AHA152X) += aha152x.o
obj-$(CONFIG_SCSI_AHA1542)
+=
aha1542.o
obj-$(CONFIG_SCSI_AHA1740)
+=
aha1740.o
obj-$(CONFIG_SCSI_AIC7XXX)
+=
aic7xxx/
obj-$(CONFIG_SCSI_AIC79XX)
+=
aic7xxx/
obj-$(CONFIG_SCSI_AACRAID)
+=
aacraid/
obj-$(CONFIG_SCSI_AIC7XXX_OLD)
+=
aic7xxx_old.o
obj-$(CONFIG_SCSI_IPS)
+=
ips.o
...
...
drivers/scsi/aic7xxx/Kconfig.aic79xx
View file @
92bde82b
#
# AIC79XX 2.5.X Kernel configuration File.
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#
2
$
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#
3
$
#
config SCSI_AIC79XX
tristate "Adaptec AIC79xx U320 support"
...
...
@@ -76,20 +76,20 @@ config AIC79XX_DEBUG_ENABLE
driver errors.
config AIC79XX_DEBUG_MASK
int "Debug code enable mask (16383 for all debugging)"
depends on SCSI_AIC79XX
default "0"
help
int "Debug code enable mask (16383 for all debugging)"
depends on SCSI_AIC79XX
default "0"
help
Bit mask of debug options that is only valid if the
CONFIG_AIC79XX_DEBUG_ENBLE option is enabled. The bits in this mask
are defined in the drivers/scsi/aic7xxx/aic79xx.h - search for the
variable ahd_debug in that file to find them.
config AIC79XX_REG_PRETTY_PRINT
bool "Decode registers during diagnostics"
depends on SCSI_AIC79XX && SCSI_AIC7XXX_BUILD_FIRMWARE
bool "Decode registers during diagnostics"
depends on SCSI_AIC79XX
default y
help
help
Compile in register value tables for the output of expanded register
contents in diagnostics. This make it much easier to understand debug
output without having to refer to a data book and/or the aic7xxx.reg
...
...
drivers/scsi/aic7xxx/Kconfig.aic7xxx
View file @
92bde82b
#
# AIC7XXX and AIC79XX 2.5.X Kernel configuration File.
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#
4
$
# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#
5
$
#
config SCSI_AIC7XXX
tristate "Adaptec AIC7xxx Fast -> U160 support (New Driver)"
...
...
@@ -92,7 +92,7 @@ config AIC7XXX_DEBUG_MASK
config AIC7XXX_REG_PRETTY_PRINT
bool "Decode registers during diagnostics"
depends on SCSI_AIC7XXX
&& SCSI_AIC7XXX_BUILD_FIRMWARE
depends on SCSI_AIC7XXX
default y
help
Compile in register value tables for the output of expanded register
...
...
drivers/scsi/aic7xxx/aic7770_osm.c
View file @
92bde82b
...
...
@@ -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/aic7770_osm.c#1
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#1
2
$
*/
#include "aic7xxx_osm.h"
...
...
@@ -61,8 +61,14 @@ aic7770_linux_probe(Scsi_Host_Template *template)
uint32_t
eisa_id
;
size_t
id_size
;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
if
(
check_region
(
eisaBase
,
AHC_EISA_IOSIZE
)
!=
0
)
continue
;
request_region
(
eisaBase
,
AHC_EISA_IOSIZE
,
"aic7xxx"
);
#else
if
(
request_region
(
eisaBase
,
AHC_EISA_IOSIZE
,
"aic7xxx"
)
!=
0
)
continue
;
#endif
eisa_id
=
0
;
id_size
=
sizeof
(
eisa_id
);
...
...
@@ -72,6 +78,7 @@ aic7770_linux_probe(Scsi_Host_Template *template)
eisa_id
|=
inb
(
eisaBase
+
IDOFFSET
+
i
)
<<
((
id_size
-
i
-
1
)
*
8
);
}
release_region
(
eisaBase
,
AHC_EISA_IOSIZE
);
if
(
eisa_id
&
0x80000000
)
continue
;
/* no EISA card in slot */
...
...
drivers/scsi/aic7xxx/aic79xx_core.c
View file @
92bde82b
...
...
@@ -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#14
7
$
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#14
8
$
*
* $FreeBSD$
*/
...
...
@@ -3416,8 +3416,10 @@ ahd_handle_message_phase(struct ahd_softc *ahd)
*/
if
(
ahd
->
msgout_len
!=
0
)
{
#ifdef AHD_DEBUG
if
((
ahd_debug
&
AHD_SHOW_MESSAGES
)
!=
0
)
if
((
ahd_debug
&
AHD_SHOW_MESSAGES
)
!=
0
)
{
ahd_print_devinfo
(
ahd
,
&
devinfo
);
printf
(
"Asserting ATN for response
\n
"
);
}
#endif
ahd_assert_atn
(
ahd
);
}
...
...
@@ -7521,8 +7523,7 @@ ahd_stat_timer(void *arg)
"now %sabled. Cmds %d
\n
"
,
ahd_name
(
ahd
),
(
enint_coal
&
ENINT_COALESS
)
?
"en"
:
"dis"
,
ahd
->
cmdcmplt_total
,
ahd
->
cmdcmplt_counts
[
ahd
->
cmdcmplt_bucket
]);
ahd
->
cmdcmplt_total
);
#endif
}
...
...
drivers/scsi/aic7xxx/aic79xx_osm.c
View file @
92bde82b
/*
* Adaptec AIC79xx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#10
0
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#10
3
$
*
* --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs.
...
...
@@ -1339,7 +1339,7 @@ Scsi_Host_Template aic79xx_driver_template = {
*/
.
max_sectors
=
8192
,
#endif
#if defined CONFIG_HIGHIO
#if defined CONFIG_HIGHIO
|| LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
/* Assume RedHat Distribution with its different HIGHIO conventions. */
.
can_dma_32
=
1
,
...
...
@@ -2486,8 +2486,25 @@ ahd_linux_dv_thread(void *data)
printf
(
"In DV Thread
\n
"
);
#endif
/*
* Don't care about any signals.
*/
siginitsetinv
(
&
current
->
blocked
,
0
);
/*
* Complete thread creation.
*/
lock_kernel
();
daemonize
();
sprintf
(
current
->
comm
,
"ahd_dv_%d"
,
ahd
->
unit
);
unlock_kernel
();
while
(
1
)
{
down
(
&
ahd
->
platform_data
->
dv_sem
);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
/* Check to see if we've been signaled to exit */
ahd_lock
(
ahd
,
&
s
);
...
...
@@ -2510,7 +2527,7 @@ ahd_linux_dv_thread(void *data)
while
(
LIST_FIRST
(
&
ahd
->
pending_scbs
)
!=
NULL
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_EMPTY
;
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
}
...
...
@@ -2521,7 +2538,7 @@ ahd_linux_dv_thread(void *data)
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
}
ahd_unlock
(
ahd
,
&
s
);
...
...
@@ -2623,6 +2640,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
AHD_TRANS_GOAL
,
/*paused*/
FALSE
);
ahd_unlock
(
ahd
,
&
s
);
timeout
=
10
*
HZ
;
targ
->
flags
&=
~
AHD_INQ_VALID
;
/* FALLTHROUGH */
case
AHD_DV_STATE_INQ_VERIFY
:
{
...
...
@@ -2686,7 +2704,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahd_unlock
(
ahd
,
&
s
);
#endif
down
(
&
ahd
->
platform_data
->
dv_cmd_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_cmd_sem
);
/*
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
...
...
@@ -2695,7 +2713,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
}
ahd_unlock
(
ahd
,
&
s
);
...
...
@@ -2704,6 +2722,25 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
}
out:
if
((
targ
->
flags
&
AHD_INQ_VALID
)
!=
0
&&
ahd_linux_get_device
(
ahd
,
devinfo
.
channel
-
'A'
,
devinfo
.
target
,
devinfo
.
lun
,
/*alloc*/
FALSE
)
==
NULL
)
{
/*
* The DV state machine failed to configure this device.
* This is normal if DV is disabled. Since we have inquiry
* data, filter it and use the "optimistic" negotiation
* parameters found in the inquiry string.
*/
ahd_linux_filter_inquiry
(
ahd
,
&
devinfo
);
if
((
targ
->
flags
&
(
AHD_BASIC_DV
|
AHD_ENHANCED_DV
))
!=
0
)
{
ahd_print_devinfo
(
ahd
,
&
devinfo
);
printf
(
"DV failed to configure device. "
"Please file a bug report against "
"this driver.
\n
"
);
}
}
if
(
cmd
!=
NULL
)
free
(
cmd
,
M_DEVBUF
);
...
...
@@ -2789,24 +2826,21 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
break
;
}
if
(
ahd_linux_user_dv_setting
(
ahd
)
==
0
)
{
ahd_linux_filter_inquiry
(
ahd
,
devinfo
)
;
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_EXIT
);
AHD_SET_DV_STATE
(
ahd
,
targ
,
targ
->
dv_state
+
1
);
targ
->
flags
|=
AHD_INQ_VALID
;
if
(
ahd_linux_user_dv_setting
(
ahd
)
==
0
)
break
;
}
spi3data
=
targ
->
inq_data
->
spi3data
;
switch
(
spi3data
&
SID_SPI_CLOCK_DT_ST
)
{
default:
case
SID_SPI_CLOCK_ST
:
/* Assume only basic DV is supported. */
ahd_linux_filter_inquiry
(
ahd
,
devinfo
);
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_INQ_VERIFY
);
targ
->
flags
|=
AHD_BASIC_DV
;
break
;
case
SID_SPI_CLOCK_DT
:
case
SID_SPI_CLOCK_DT_ST
:
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_REBD
)
;
targ
->
flags
|=
AHD_ENHANCED_DV
;
break
;
}
break
;
...
...
@@ -2902,8 +2936,15 @@ ahd_linux_dv_transition(struct ahd_softc *ahd, struct scsi_cmnd *cmd,
case
AHD_DV_STATE_TUR
:
switch
(
status
&
SS_MASK
)
{
case
SS_NOP
:
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_INQ_ASYNC
);
if
((
targ
->
flags
&
AHD_BASIC_DV
)
!=
0
)
{
ahd_linux_filter_inquiry
(
ahd
,
devinfo
);
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_INQ_VERIFY
);
}
else
if
((
targ
->
flags
&
AHD_ENHANCED_DV
)
!=
0
)
{
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_REBD
);
}
else
{
AHD_SET_DV_STATE
(
ahd
,
targ
,
AHD_DV_STATE_EXIT
);
}
break
;
case
SS_RETRY
:
case
SS_TUR
:
...
...
drivers/scsi/aic7xxx/aic79xx_osm.h
View file @
92bde82b
...
...
@@ -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
6
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#9
9
$
*
*/
#ifndef _AIC79XX_LINUX_H_
...
...
@@ -48,6 +48,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
#ifndef AHD_MODVERSION_FILE
#define __NO_VERSION__
...
...
@@ -287,7 +288,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA
5
"
#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA
6
"
/**************************** Front End Queues ********************************/
/*
...
...
@@ -424,16 +425,19 @@ struct ahd_linux_device {
};
typedef
enum
{
AHD_DV_REQUIRED
=
0x01
AHD_DV_REQUIRED
=
0x01
,
AHD_INQ_VALID
=
0x02
,
AHD_BASIC_DV
=
0x04
,
AHD_ENHANCED_DV
=
0x08
}
ahd_linux_targ_flags
;
/* DV States */
typedef
enum
{
AHD_DV_STATE_EXIT
=
0
,
AHD_DV_STATE_INQ_SHORT_ASYNC
,
AHD_DV_STATE_TUR
,
AHD_DV_STATE_INQ_ASYNC
,
AHD_DV_STATE_INQ_ASYNC_VERIFY
,
AHD_DV_STATE_TUR
,
AHD_DV_STATE_REBD
,
AHD_DV_STATE_INQ_VERIFY
,
AHD_DV_STATE_WEB
,
...
...
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
View file @
92bde82b
...
...
@@ -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_pci.c#1
8
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#1
9
$
*/
#include "aic79xx_osm.h"
...
...
@@ -240,10 +240,8 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
if
(
check_region
(
*
base
,
256
)
!=
0
||
check_region
(
*
base2
,
256
)
!=
0
)
return
(
ENOMEM
);
else
{
request_region
(
*
base
,
256
,
"aic79xx"
);
request_region
(
*
base2
,
256
,
"aic79xx"
);
}
request_region
(
*
base
,
256
,
"aic79xx"
);
request_region
(
*
base2
,
256
,
"aic79xx"
);
#else
if
(
request_region
(
*
base
,
256
,
"aic79xx"
)
==
0
)
return
(
ENOMEM
);
...
...
drivers/scsi/aic7xxx/aic7xxx_core.c
View file @
92bde82b
...
...
@@ -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
4
$
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#10
5
$
*
* $FreeBSD$
*/
...
...
@@ -2772,9 +2772,12 @@ ahc_handle_message_phase(struct ahc_softc *ahc)
*/
if
(
ahc
->
msgout_len
!=
0
)
{
#ifdef AHC_DEBUG
if
((
ahc_debug
&
AHC_SHOW_MESSAGES
)
!=
0
)
if
((
ahc_debug
&
AHC_SHOW_MESSAGES
)
!=
0
)
{
ahc_print_devinfo
(
ahc
,
&
devinfo
);
printf
(
"Asserting ATN for response
\n
"
);
}
#endif
ahc_assert_atn
(
ahc
);
}
}
else
ahc
->
msgin_index
++
;
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.c
View file @
92bde82b
/*
* Adaptec AIC7xxx device driver for Linux.
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
3
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
6
$
*
* Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science.
...
...
@@ -2336,8 +2336,25 @@ ahc_linux_dv_thread(void *data)
printf
(
"Launching DV Thread
\n
"
);
#endif
/*
* Don't care about any signals.
*/
siginitsetinv
(
&
current
->
blocked
,
0
);
/*
* Complete thread creation.
*/
lock_kernel
();
daemonize
();
sprintf
(
current
->
comm
,
"ahc_dv_%d"
,
ahc
->
unit
);
unlock_kernel
();
while
(
1
)
{
down
(
&
ahc
->
platform_data
->
dv_sem
);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
/* Check to see if we've been signaled to exit */
ahc_lock
(
ahc
,
&
s
);
...
...
@@ -2360,7 +2377,7 @@ ahc_linux_dv_thread(void *data)
while
(
LIST_FIRST
(
&
ahc
->
pending_scbs
)
!=
NULL
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_EMPTY
;
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
}
...
...
@@ -2371,7 +2388,7 @@ ahc_linux_dv_thread(void *data)
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
}
ahc_unlock
(
ahc
,
&
s
);
...
...
@@ -2473,6 +2490,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
AHC_TRANS_GOAL
,
/*paused*/
FALSE
);
ahc_unlock
(
ahc
,
&
s
);
timeout
=
10
*
HZ
;
targ
->
flags
&=
~
AHC_INQ_VALID
;
/* FALLTHROUGH */
case
AHC_DV_STATE_INQ_VERIFY
:
{
...
...
@@ -2536,7 +2554,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_unlock
(
ahc
,
&
s
);
#endif
down
(
&
ahc
->
platform_data
->
dv_cmd_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_cmd_sem
);
/*
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
...
...
@@ -2545,7 +2563,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
}
ahc_unlock
(
ahc
,
&
s
);
...
...
@@ -2554,6 +2572,25 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
}
out:
if
((
targ
->
flags
&
AHC_INQ_VALID
)
!=
0
&&
ahc_linux_get_device
(
ahc
,
devinfo
.
channel
-
'A'
,
devinfo
.
target
,
devinfo
.
lun
,
/*alloc*/
FALSE
)
==
NULL
)
{
/*
* The DV state machine failed to configure this device.
* This is normal if DV is disabled. Since we have inquiry
* data, filter it and use the "optimistic" negotiation
* parameters found in the inquiry string.
*/
ahc_linux_filter_inquiry
(
ahc
,
&
devinfo
);
if
((
targ
->
flags
&
(
AHC_BASIC_DV
|
AHC_ENHANCED_DV
))
!=
0
)
{
ahc_print_devinfo
(
ahc
,
&
devinfo
);
printf
(
"DV failed to configure device. "
"Please file a bug report against "
"this driver.
\n
"
);
}
}
if
(
cmd
!=
NULL
)
free
(
cmd
,
M_DEVBUF
);
...
...
@@ -2639,24 +2676,21 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
break
;
}
if
(
ahc_linux_user_dv_setting
(
ahc
)
==
0
)
{
ahc_linux_filter_inquiry
(
ahc
,
devinfo
)
;
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_EXIT
);
AHC_SET_DV_STATE
(
ahc
,
targ
,
targ
->
dv_state
+
1
);
targ
->
flags
|=
AHC_INQ_VALID
;
if
(
ahc_linux_user_dv_setting
(
ahc
)
==
0
)
break
;
}
spi3data
=
targ
->
inq_data
->
spi3data
;
switch
(
spi3data
&
SID_SPI_CLOCK_DT_ST
)
{
default:
case
SID_SPI_CLOCK_ST
:
/* Assume only basic DV is supported. */
ahc_linux_filter_inquiry
(
ahc
,
devinfo
);
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_INQ_VERIFY
);
targ
->
flags
|=
AHC_BASIC_DV
;
break
;
case
SID_SPI_CLOCK_DT
:
case
SID_SPI_CLOCK_DT_ST
:
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_REBD
)
;
targ
->
flags
|=
AHC_ENHANCED_DV
;
break
;
}
break
;
...
...
@@ -2752,8 +2786,15 @@ ahc_linux_dv_transition(struct ahc_softc *ahc, struct scsi_cmnd *cmd,
case
AHC_DV_STATE_TUR
:
switch
(
status
&
SS_MASK
)
{
case
SS_NOP
:
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_INQ_ASYNC
);
if
((
targ
->
flags
&
AHC_BASIC_DV
)
!=
0
)
{
ahc_linux_filter_inquiry
(
ahc
,
devinfo
);
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_INQ_VERIFY
);
}
else
if
((
targ
->
flags
&
AHC_ENHANCED_DV
)
!=
0
)
{
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_REBD
);
}
else
{
AHC_SET_DV_STATE
(
ahc
,
targ
,
AHC_DV_STATE_EXIT
);
}
break
;
case
SS_RETRY
:
case
SS_TUR
:
...
...
@@ -4373,6 +4414,17 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
memset
(
&
cmd
->
sense_buffer
[
sense_size
],
0
,
sizeof
(
cmd
->
sense_buffer
)
-
sense_size
);
cmd
->
result
|=
(
DRIVER_SENSE
<<
24
);
#ifdef AHC_DEBUG
if
(
ahc_debug
&
AHC_SHOW_SENSE
)
{
int
i
;
printf
(
"Copied %d bytes of sense data:"
,
sense_size
);
for
(
i
=
0
;
i
<
sense_size
;
i
++
)
printf
(
" 0x%x"
,
cmd
->
sense_buffer
[
i
]);
printf
(
"
\n
"
);
}
#endif
}
break
;
}
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.h
View file @
92bde82b
...
...
@@ -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#11
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#11
4
$
*
*/
#ifndef _AIC7XXX_LINUX_H_
...
...
@@ -65,6 +65,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
#ifndef AHC_MODVERSION_FILE
#define __NO_VERSION__
...
...
@@ -300,7 +301,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
#include <linux/smp.h>
#endif
#define AIC7XXX_DRIVER_VERSION "6.2.2
4
"
#define AIC7XXX_DRIVER_VERSION "6.2.2
5
"
/**************************** Front End Queues ********************************/
/*
...
...
@@ -437,16 +438,19 @@ struct ahc_linux_device {
};
typedef
enum
{
AHC_DV_REQUIRED
=
0x01
AHC_DV_REQUIRED
=
0x01
,
AHC_INQ_VALID
=
0x02
,
AHC_BASIC_DV
=
0x04
,
AHC_ENHANCED_DV
=
0x08
}
ahc_linux_targ_flags
;
/* DV States */
typedef
enum
{
AHC_DV_STATE_EXIT
=
0
,
AHC_DV_STATE_INQ_SHORT_ASYNC
,
AHC_DV_STATE_TUR
,
AHC_DV_STATE_INQ_ASYNC
,
AHC_DV_STATE_INQ_ASYNC_VERIFY
,
AHC_DV_STATE_TUR
,
AHC_DV_STATE_REBD
,
AHC_DV_STATE_INQ_VERIFY
,
AHC_DV_STATE_WEB
,
...
...
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
View file @
92bde82b
...
...
@@ -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/aic7xxx_osm_pci.c#4
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#4
2
$
*/
#include "aic7xxx_osm.h"
...
...
@@ -232,8 +232,7 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, u_long *base)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
if
(
check_region
(
*
base
,
256
)
!=
0
)
return
(
ENOMEM
);
else
request_region
(
*
base
,
256
,
"aic7xxx"
);
request_region
(
*
base
,
256
,
"aic7xxx"
);
#else
if
(
request_region
(
*
base
,
256
,
"aic7xxx"
)
==
0
)
return
(
ENOMEM
);
...
...
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
View file @
92bde82b
...
...
@@ -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/aicasm/aicasm_symbol.c#2
3
$
* $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_symbol.c#2
4
$
*
* $FreeBSD$
*/
...
...
@@ -546,7 +546,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
if
(
num_entries
==
0
)
aic_print_reg_dump_start
(
dfile
,
curnode
);
else
else
if
(
dfile
!=
NULL
)
fputs
(
",
\n
"
,
dfile
);
num_entries
++
;
aic_print_reg_dump_entry
(
dfile
,
fieldnode
);
...
...
drivers/scsi/aic7xxx/aiclib.c
View file @
92bde82b
...
...
@@ -541,12 +541,18 @@ static struct asc_table_entry asc_table[] = {
"Rounded parameter"
)
},
/* DTL WRSOMCAE */
{
SST
(
0x39
,
0x00
,
SS_RDEF
,
"Saving parameters not supported"
)
},
/* DTL WRSOM */
{
SST
(
0x3A
,
0x00
,
SS_
FATAL
|
ENXIO
,
/* DTL WRSOM */
{
SST
(
0x3A
,
0x00
,
SS_
NOP
,
"Medium not present"
)
},
/* DT WR OM */
{
SST
(
0x3A
,
0x01
,
SS_
FATAL
|
ENXIO
,
/* DT WR OM */
{
SST
(
0x3A
,
0x01
,
SS_
NOP
,
"Medium not present - tray closed"
)
},
/* DT WR OM */
{
SST
(
0x3A
,
0x0
2
,
SS_FATAL
|
ENXIO
,
/* DT WR OM */
{
SST
(
0x3A
,
0x0
1
,
SS_NOP
,
"Medium not present - tray open"
)
},
/* DT WR OM */
{
SST
(
0x3A
,
0x03
,
SS_NOP
,
"Medium not present - Loadable"
)
},
/* DT WR OM */
{
SST
(
0x3A
,
0x04
,
SS_NOP
,
"Medium not present - medium auxiliary "
"memory accessible"
)
},
/* DT WR OM */
{
SST
(
0x3A
,
0xFF
,
SS_NOP
,
NULL
)
},
/* Range 0x05->0xFF */
/* TL */
{
SST
(
0x3B
,
0x00
,
SS_RDEF
,
"Sequential positioning error"
)
},
/* T */
{
SST
(
0x3B
,
0x01
,
SS_RDEF
,
...
...
drivers/scsi/aic7xxx/aiclib.h
View file @
92bde82b
...
...
@@ -827,12 +827,16 @@ extern const char *scsi_sense_key_text[];
/************************* Large Disk Handling ********************************/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static
__inline
int
aic_sector_div
(
u_long
capacity
,
int
heads
,
int
sectors
);
static
__inline
int
aic_sector_div
(
u_long
capacity
,
int
heads
,
int
sectors
)
{
return
(
capacity
/
(
heads
*
sectors
));
}
#else
static
__inline
int
aic_sector_div
(
sector_t
capacity
,
int
heads
,
int
sectors
);
static
__inline
int
aic_sector_div
(
sector_t
capacity
,
int
heads
,
int
sectors
)
{
...
...
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