Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
linux
Commits
fb3ed0dc
Commit
fb3ed0dc
authored
17 years ago
by
Linus Torvalds
Browse files
Options
Download
Email Patches
Plain Diff
Import 1.1.68
parent
079e34c1
Changes
66
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
681 additions
and
390 deletions
+681
-390
CREDITS
CREDITS
+7
-0
Makefile
Makefile
+1
-1
drivers/block/cdu31a.c
drivers/block/cdu31a.c
+1
-1
drivers/char/console.c
drivers/char/console.c
+8
-6
drivers/net/MODULES
drivers/net/MODULES
+1
-0
drivers/net/eexpress.c
drivers/net/eexpress.c
+38
-0
drivers/net/plip.c
drivers/net/plip.c
+1
-1
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.c
+1
-5
drivers/scsi/53c7,8xx.h
drivers/scsi/53c7,8xx.h
+2
-3
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.c
+1
-1
drivers/scsi/aha152x.c
drivers/scsi/aha152x.c
+3
-13
drivers/scsi/aha152x.h
drivers/scsi/aha152x.h
+2
-2
drivers/scsi/aha1542.c
drivers/scsi/aha1542.c
+130
-15
drivers/scsi/aha1542.h
drivers/scsi/aha1542.h
+3
-3
drivers/scsi/aha1740.c
drivers/scsi/aha1740.c
+2
-8
drivers/scsi/aha1740.h
drivers/scsi/aha1740.h
+3
-4
drivers/scsi/aha274x.c
drivers/scsi/aha274x.c
+4
-4
drivers/scsi/aha274x.h
drivers/scsi/aha274x.h
+3
-2
drivers/scsi/buslogic.c
drivers/scsi/buslogic.c
+442
-311
drivers/scsi/buslogic.h
drivers/scsi/buslogic.h
+28
-10
No files found.
CREDITS
View file @
fb3ed0dc
...
...
@@ -539,6 +539,13 @@ S: Ormond
S: Victoria 3163
S: Australia
N: Pauline Middelink
E: middelin@polyware.iaf.nl
D: General low-level bug fixes, /proc fixes, identd support
S: Boterkorfhoek 34
S: 7546 JA Enschede
S: Netherlands
N: Rick Miller
E: rick@discus.mil.wi.us
D: Linux Device Registrar (Major/minor numbers), "au-play", "bwBASIC"
...
...
This diff is collapsed.
Click to expand it.
Makefile
View file @
fb3ed0dc
VERSION
=
1
PATCHLEVEL
=
1
SUBLEVEL
=
6
7
SUBLEVEL
=
6
8
ARCH
=
i386
...
...
This diff is collapsed.
Click to expand it.
drivers/block/cdu31a.c
View file @
fb3ed0dc
...
...
@@ -2773,7 +2773,7 @@ cdu31a_setup(char *strings,
{
irq_used
=
ints
[
2
];
}
if
(
*
strings
!=
'\0'
)
if
((
strings
!=
NULL
)
&&
(
*
strings
!=
'\0'
)
)
{
if
(
strcmp
(
strings
,
"PAS"
)
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
drivers/char/console.c
View file @
fb3ed0dc
...
...
@@ -2106,7 +2106,7 @@ void update_screen(int new_console)
}
lock
=
1
;
#ifdef CONFIG_SELECTION
highlight_pointer
(
fg_console
,
-
1
);
clear_selection
(
);
#endif
/* CONFIG_SELECTION */
if
(
!
console_blanked
)
get_scrmem
(
fg_console
);
...
...
@@ -2148,7 +2148,7 @@ int do_screendump(int arg, int mode)
/* mode 0 needs 2+wd*ht, modes 1 and 2 need 4+2*wd*ht */
chcount
=
video_num_columns
*
video_num_lines
;
l
=
verify_area
(
mode
==
2
?
VERIFY_READ
:
VERIFY_WRITE
,
buf
,
(
2
+
chcount
)
*
(
1
+
mode
!=
0
));
buf
,
(
2
+
chcount
)
*
(
mode
?
2
:
1
));
if
(
l
)
return
l
;
if
(
mode
<
2
)
{
...
...
@@ -2162,12 +2162,14 @@ int do_screendump(int arg, int mode)
put_fs_byte
(
*
sptr
++
,
buf
++
);
break
;
case
1
:
#ifdef CONFIG_SELECTION
clear_selection
();
#endif
put_fs_byte
((
char
)
x
,
buf
++
);
put_fs_byte
((
char
)
y
,
buf
++
);
memcpy_tofs
(
buf
,(
char
*
)
origin
,
2
*
chcount
);
break
;
case
2
:
buf
+=
2
;
/* skip the the numnber 9 and console number */
x
=
get_fs_byte
(
buf
++
);
y
=
get_fs_byte
(
buf
++
);
buf
+=
4
;
/* ioctl#, console#, x,y */
memcpy_fromfs
((
char
*
)
origin
,
buf
,
2
*
chcount
);
break
;
}
...
...
@@ -2356,7 +2358,6 @@ int set_selection(const int arg, struct tty_struct *tty)
case
3
:
/* pointer highlight */
if
(
sel_cons
!=
currcons
)
{
highlight_pointer
(
sel_cons
,
-
1
);
clear_selection
();
sel_cons
=
currcons
;
}
...
...
@@ -2491,7 +2492,8 @@ static void clear_selection()
*/
#define colourmap ((char *)0xa0000)
/* Pauline Middelink reports that we should use 0xA0000 for the bwmap as well.. */
/* Pauline Middelink <middelin@polyware.iaf.nl> reports that we
should use 0xA0000 for the bwmap as well.. */
#define blackwmap ((char *)0xa0000)
#define cmapsz 8192
#define seq_port_reg (0x3c4)
...
...
This diff is collapsed.
Click to expand it.
drivers/net/MODULES
View file @
fb3ed0dc
...
...
@@ -3,5 +3,6 @@ MODULES = \
de600.o \
de620.o \
3c501.o \
eexpress.o \
plip.o \
8390.o
This diff is collapsed.
Click to expand it.
drivers/net/eexpress.c
View file @
fb3ed0dc
...
...
@@ -17,6 +17,8 @@
Move the theory of operation and memory map documentation.
Rework the board error reset
The statistics need to be updated correctly.
Modularized my Pauline Middelink <middelin@polyware.iaf.nl>
*/
static
char
*
version
=
...
...
@@ -53,6 +55,10 @@ static char *version =
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#ifdef MODULE
#include <linux/module.h>
#include "../../tools/version.h"
#endif
#include <linux/malloc.h>
...
...
@@ -435,6 +441,9 @@ eexp_open(struct device *dev)
dev
->
tbusy
=
0
;
dev
->
interrupt
=
0
;
dev
->
start
=
1
;
#ifdef MODULE
MOD_INC_USE_COUNT
;
#endif
return
0
;
}
...
...
@@ -647,6 +656,9 @@ eexp_close(struct device *dev)
/* Update the statistics here. */
#ifdef MODULE
MOD_DEC_USE_COUNT
;
#endif
return
0
;
}
...
...
@@ -981,6 +993,32 @@ eexp_rx(struct device *dev)
outw
(
saved_write_ptr
,
ioaddr
+
WRITE_PTR
);
}
#ifdef MODULE
char
kernel_version
[]
=
UTS_RELEASE
;
static
struct
device
dev_eexpress
=
{
" "
/*"eexpress"*/
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
,
express_probe
};
int
init_module
(
void
)
{
if
(
register_netdev
(
&
dev_eexpress
)
!=
0
)
return
-
EIO
;
return
0
;
}
void
cleanup_module
(
void
)
{
if
(
MOD_IN_USE
)
printk
(
"express: device busy, remove delayed
\n
"
);
else
{
unregister_netdev
(
&
dev_eexpress
);
kfree_s
(
dev_eexpress
.
priv
,
sizeof
(
struct
net_local
));
dev_eexpress
.
priv
=
NULL
;
}
}
#endif
/* MODULE */
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -I/usr/src/linux/drivers/net -Wall -Wstrict-prototypes -O6 -m486 -c eexpress.c"
...
...
This diff is collapsed.
Click to expand it.
drivers/net/plip.c
View file @
fb3ed0dc
...
...
@@ -545,7 +545,7 @@ plip_device_clear(struct device *dev)
enable_irq
(
dev
->
irq
);
}
/* PLIP_ERROR --- wait til other end sett
e
led */
/* PLIP_ERROR --- wait til other end settled */
static
int
plip_error
(
struct
device
*
dev
)
{
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/53c7,8xx.c
View file @
fb3ed0dc
...
...
@@ -2424,7 +2424,7 @@ static struct NCR53c7x0_cmd *create_cmd (Scsi_Cmnd *cmd) {
tmp
->
select
[
0
]
=
IDENTIFY
(
0
,
cmd
->
lun
);
#endif
patch_dsa_32
(
tmp
->
dsa
,
dsa_msgout
,
1
,
tmp
->
select
);
patch_dsa_32
(
tmp
->
dsa
,
dsa_cmdout
,
0
,
COMMAND_SIZE
(
cmd
->
cm
nd
[
0
])
);
patch_dsa_32
(
tmp
->
dsa
,
dsa_cmdout
,
0
,
cmd
->
cm
d_len
);
patch_dsa_32
(
tmp
->
dsa
,
dsa_cmdout
,
1
,
cmd
->
cmnd
);
patch_dsa_32
(
tmp
->
dsa
,
dsa_dataout
,
0
,
cmd_dataout
?
cmd_dataout
:
hostdata
->
script
+
hostdata
->
E_other_transfer
/
...
...
@@ -3742,10 +3742,6 @@ int NCR53c7xx_reset (Scsi_Cmnd *cmd) {
return
SCSI_RESET_SNOOZE
;
}
const
char
*
NCR53c7xx_info
(
void
)
{
return
(
"More info here
\n
"
);
}
/*
* The NCR SDMS bios follows Annex A of the SCSI-CAM draft, and
* therefore shares the scsicam_bios_param function.
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/53c7,8xx.h
View file @
fb3ed0dc
...
...
@@ -50,12 +50,11 @@
#include <linux/scsicam.h>
extern
int
NCR53c7xx_abort
(
Scsi_Cmnd
*
);
extern
int
NCR53c7xx_detect
(
Scsi_Host_Template
*
tpnt
);
extern
const
char
*
NCR53c7xx_info
(
void
);
extern
int
NCR53c7xx_queue_command
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
extern
int
NCR53c7xx_reset
(
Scsi_Cmnd
*
);
#define NCR53c7xx {NULL, "NCR53c{7,8}xx (rel 3)", NCR53c7xx_detect, \
NULL, N
CR53c7xx_info
, \
#define NCR53c7xx {NULL,
NULL,
"NCR53c{7,8}xx (rel 3)", NCR53c7xx_detect, \
NULL, N
ULL
, \
NULL, NCR53c7xx_queue_command, NCR53c7xx_abort, NCR53c7xx_reset,\
NULL, scsicam_bios_param, \
/* can queue */
1,
/* id */
7, 255
/* old SG_ALL */
, \
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/NCR5380.c
View file @
fb3ed0dc
...
...
@@ -2306,7 +2306,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) {
msgout
=
NOP
;
break
;
case
PHASE_CMDOUT
:
len
=
COMMAND_SIZE
(
cmd
->
cm
nd
[
0
])
;
len
=
cmd
->
cm
d_len
;
data
=
cmd
->
cmnd
;
/*
* XXX for performance reasons, on machines with a
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha152x.c
View file @
fb3ed0dc
...
...
@@ -268,8 +268,6 @@
#define P_BUSFREE 1
#define P_PARITY 2
static
char
*
aha152x_id
=
AHA152X_REVID
;
static
int
port_base
=
0
;
static
int
this_host
=
0
;
static
int
can_disconnect
=
0
;
...
...
@@ -734,14 +732,6 @@ int aha152x_detect(Scsi_Host_Template * tpnt)
return
1
;
}
/*
* return the name of the thing
*/
const
char
*
aha152x_info
(
void
)
{
return
(
aha152x_id
);
}
/*
* Queue a command and setup interrupts for a free bus.
*/
...
...
@@ -1590,14 +1580,14 @@ void aha152x_intr( int irqno )
if
(
aha152x_debug
&
debug_cmd
)
{
printk
(
"DFIFOEMP, outsw (%d words), "
,
COMMAND_SIZE
(
current_SC
->
cm
nd
[
0
])
>>
1
);
current_SC
->
cm
d_len
>>
1
);
disp_ports
();
}
#endif
outsw
(
DATAPORT
,
&
current_SC
->
cmnd
,
COMMAND_SIZE
(
current_SC
->
cm
nd
[
0
])
>>
1
);
current_SC
->
cm
d_len
>>
1
);
#if defined(DEBUG_CMD)
if
(
aha152x_debug
&
debug_cmd
)
...
...
@@ -1622,7 +1612,7 @@ void aha152x_intr( int irqno )
#if defined(DEBUG_CMD) || defined(DEBUG_INTR)
if
(
debug_cmd
&
debug_intr
)
printk
(
"sent %d/%d command bytes, "
,
GETSTCNT
(),
COMMAND_SIZE
(
current_SC
->
cm
nd
[
0
])
);
current_SC
->
cm
d_len
);
#endif
}
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha152x.h
View file @
fb3ed0dc
...
...
@@ -12,7 +12,6 @@
#include <asm/io.h>
int
aha152x_detect
(
Scsi_Host_Template
*
);
const
char
*
aha152x_info
(
void
);
int
aha152x_command
(
Scsi_Cmnd
*
);
int
aha152x_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
aha152x_abort
(
Scsi_Cmnd
*
);
...
...
@@ -27,10 +26,11 @@ int aha152x_biosparam(Disk *, int, int*);
/* Initial value of Scsi_Host entry */
#define AHA152X {
/* next */
NULL, \
/* usage_count */
NULL, \
/* name */
AHA152X_REVID, \
/* detect */
aha152x_detect, \
/* release */
NULL, \
/* info */
aha152x_info,
\
/* info */
NULL,
\
/* command */
aha152x_command, \
/* queuecommand */
aha152x_queue, \
/* abort */
aha152x_abort, \
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha1542.c
View file @
fb3ed0dc
...
...
@@ -10,6 +10,8 @@
* have the bios enabled to use the aha1542.
* Modified by David Gentzel
* Don't call request_dma if dma mask is 0 (for BusLogic BT-445S VL-Bus controller).
* Modified by Matti Aarnio
* Accept parameters from LILO cmd-line. -- 1-Oct-94
*/
#include <linux/kernel.h>
...
...
@@ -43,9 +45,38 @@ static const char RCSid[] = "$Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/aha
/* The adaptec can be configured for quite a number of addresses, but
I generally do not want the card poking around at random. We allow
two addresses - this allows people to use the Adaptec with a Midi
card, which also used 0x330 */
card, which also used 0x330 -- can be overriden with LILO! */
#define MAXBOARDS 2
/* Increase this and the sizes of the
arrays below, if you need more.. */
static
unsigned
int
bases
[
MAXBOARDS
]
=
{
0x330
,
0x334
};
/* set by aha1542_setup according to the command line */
static
int
setup_called
[
MAXBOARDS
]
=
{
0
,
0
};
static
int
setup_buson
[
MAXBOARDS
]
=
{
0
,
0
};
static
int
setup_busoff
[
MAXBOARDS
]
=
{
0
,
0
};
static
int
setup_dmaspeed
[
MAXBOARDS
]
=
{
-
1
,
-
1
};
static
char
*
setup_str
[
MAXBOARDS
]
=
{(
char
*
)
NULL
,(
char
*
)
NULL
};
/*
* LILO params: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
*
* Where: <PORTBASE> is any of the valid AHA addresses:
* 0x130, 0x134, 0x230, 0x234, 0x330, 0x334
* <BUSON> is the time (in microsecs) that AHA spends on the AT-bus
* when transferring data. 1542A power-on default is 11us,
* valid values are in range: 2..15 (decimal)
* <BUSOFF> is the time that AHA spends OFF THE BUS after while
* it is transferring data (not to monopolize the bus).
* Power-on default is 4us, valid range: 1..64 microseconds.
* <DMASPEED> Default is jumper selected (1542A: on the J1),
* but experimenter can alter it with this.
* Valid values: 5, 6, 7, 8, 10 (MB/s)
* Factory default is 5 MB/s.
*/
static
unsigned
int
bases
[]
=
{
0x330
,
0x334
};
/* The DMA-Controller. We need to fool with this because we want to
be able to use the aha1542 without having to have the bios enabled */
...
...
@@ -253,6 +284,7 @@ static int aha1542_test_port(int bse, struct Scsi_Host * shpnt)
/* In case some other card was probing here, reset interrupts */
aha1542_intr_reset
(
bse
);
/* reset interrupts, so they don't block */
outb
(
SRST
|
IRST
/*|SCRST*/
,
CONTROL
(
bse
));
i
=
jiffies
+
2
;
...
...
@@ -302,14 +334,6 @@ static int aha1542_test_port(int bse, struct Scsi_Host * shpnt)
return
0
;
/* 0 = not ok */
}
static
const
char
aha_ident
[]
=
"Adaptec 1542"
;
/* What's this little function for? */
const
char
*
aha1542_info
(
void
)
{
return
aha_ident
;
}
/* A "high" level interrupt handler */
static
void
aha1542_intr_handle
(
int
foo
)
{
...
...
@@ -513,7 +537,7 @@ int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
printk
(
"aha1542_command: dev %d cmd %02x pos %d len %d "
,
target
,
*
cmd
,
i
,
bufflen
);
aha1542_stat
();
printk
(
"aha1542_queuecommand: dumping scsi cmd:"
);
for
(
i
=
0
;
i
<
(
COMMAND_SIZE
(
*
cmd
))
;
i
++
)
printk
(
"%02x "
,
cmd
[
i
]);
for
(
i
=
0
;
i
<
SCpnt
->
cmd_len
;
i
++
)
printk
(
"%02x "
,
cmd
[
i
]);
printk
(
"
\n
"
);
if
(
*
cmd
==
WRITE_10
||
*
cmd
==
WRITE_6
)
return
0
;
/* we are still testing, so *don't* write */
...
...
@@ -549,7 +573,7 @@ int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
memset
(
&
ccb
[
mbo
],
0
,
sizeof
(
struct
ccb
));
ccb
[
mbo
].
cdblen
=
COMMAND_SIZE
(
*
cmd
);
/* SCSI Command Descriptor Block Length */
ccb
[
mbo
].
cdblen
=
SCpnt
->
cmd_len
;
direction
=
0
;
if
(
*
cmd
==
READ_10
||
*
cmd
==
READ_6
)
...
...
@@ -590,7 +614,6 @@ int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
any2scsi
(
cptr
[
i
].
datalen
,
sgpnt
[
i
].
length
);
};
any2scsi
(
ccb
[
mbo
].
datalen
,
SCpnt
->
use_sg
*
sizeof
(
struct
chain
));
if
(((
unsigned
int
)
buff
&
0xff000000
))
goto
baddma
;
any2scsi
(
ccb
[
mbo
].
dataptr
,
cptr
);
#ifdef DEBUG
printk
(
"cptr %x: "
,
cptr
);
...
...
@@ -601,6 +624,7 @@ int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
ccb
[
mbo
].
op
=
0
;
/* SCSI Initiator Command */
SCpnt
->
host_scribble
=
NULL
;
any2scsi
(
ccb
[
mbo
].
datalen
,
bufflen
);
if
(((
unsigned
int
)
buff
&
0xff000000
))
goto
baddma
;
any2scsi
(
ccb
[
mbo
].
dataptr
,
buff
);
};
ccb
[
mbo
].
idlun
=
(
target
&
7
)
<<
5
|
direction
|
(
lun
&
7
);
/*SCSI Target Id*/
...
...
@@ -813,6 +837,66 @@ static int aha1542_query(int base_io, int * transl)
return
0
;
}
/* called from init/main.c */
void
aha1542_setup
(
char
*
str
,
int
*
ints
)
{
char
*
ahausage
=
"aha1542: usage: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
\n
"
;
static
int
setup_idx
=
0
;
int
setup_portbase
;
if
(
setup_idx
>=
MAXBOARDS
)
{
printk
(
"aha1542: aha1542_setup called too many times! Bad LILO params ?
\n
"
);
printk
(
" Entryline 1: %s
\n
"
,
setup_str
[
0
]);
printk
(
" Entryline 2: %s
\n
"
,
setup_str
[
1
]);
printk
(
" This line: %s
\n
"
,
str
);
return
;
}
if
(
ints
[
0
]
<
1
||
ints
[
0
]
>
4
)
{
printk
(
"aha1542: %s
\n
"
,
str
);
printk
(
ahausage
);
printk
(
"aha1542: Wrong parameters may cause system malfunction.. We try anyway..
\n
"
);
}
setup_called
[
setup_idx
]
=
ints
[
0
];
setup_str
[
setup_idx
]
=
str
;
setup_portbase
=
ints
[
0
]
>=
1
?
ints
[
1
]
:
0
;
/* Preserve the default value.. */
setup_buson
[
setup_idx
]
=
ints
[
0
]
>=
2
?
ints
[
2
]
:
7
;
setup_busoff
[
setup_idx
]
=
ints
[
0
]
>=
3
?
ints
[
3
]
:
5
;
if
(
ints
[
0
]
>=
4
)
{
int
atbt
=
-
1
;
switch
(
ints
[
4
])
{
case
5
:
atbt
=
0x00
;
break
;
case
6
:
atbt
=
0x04
;
break
;
case
7
:
atbt
=
0x01
;
break
;
case
8
:
atbt
=
0x02
;
break
;
case
10
:
atbt
=
0x03
;
break
;
default:
printk
(
"aha1542: %s
\n
"
,
str
);
printk
(
ahausage
);
printk
(
"aha1542: Valid values for DMASPEED are 5-8, 10 MB/s. Using jumper defaults.
\n
"
);
break
;
}
setup_dmaspeed
[
setup_idx
]
=
atbt
;
}
if
(
setup_portbase
!=
0
)
bases
[
setup_idx
]
=
setup_portbase
;
++
setup_idx
;
}
/* return non-zero on detection */
int
aha1542_detect
(
Scsi_Host_Template
*
tpnt
)
...
...
@@ -826,12 +910,19 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
int
indx
;
DEB
(
printk
(
"aha1542_detect:
\n
"
));
for
(
indx
=
0
;
indx
<
sizeof
(
bases
)
/
sizeof
(
bases
[
0
]);
indx
++
)
if
(
!
check_region
(
bases
[
indx
],
4
))
{
if
(
bases
[
indx
]
!=
0
&&
!
check_region
(
bases
[
indx
],
4
))
{
shpnt
=
scsi_register
(
tpnt
,
sizeof
(
struct
aha1542_hostdata
));
/* For now we do this - until kmalloc is more intelligent
we are resigned to stupid hacks like this */
if
((
unsigned
int
)
shpnt
>
0xffffff
)
{
printk
(
"Invalid address for shpnt with 1542.
\n
"
);
goto
unregister
;
}
if
(
!
aha1542_test_port
(
bases
[
indx
],
shpnt
))
goto
unregister
;
...
...
@@ -841,6 +932,12 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
{
unchar
oncmd
[]
=
{
CMD_BUSON_TIME
,
7
};
unchar
offcmd
[]
=
{
CMD_BUSOFF_TIME
,
5
};
if
(
setup_called
[
indx
])
{
oncmd
[
1
]
=
setup_buson
[
indx
];
offcmd
[
1
]
=
setup_busoff
[
indx
];
}
aha1542_intr_reset
(
base_io
);
aha1542_out
(
base_io
,
oncmd
,
2
);
...
...
@@ -848,6 +945,14 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
aha1542_intr_reset
(
base_io
);
aha1542_out
(
base_io
,
offcmd
,
2
);
WAIT
(
INTRFLAGS
(
base_io
),
INTRMASK
,
HACC
,
0
);
if
(
setup_dmaspeed
[
indx
]
>=
0
)
{
unchar
dmacmd
[]
=
{
CMD_DMASPEED
,
0
};
dmacmd
[
1
]
=
setup_dmaspeed
[
indx
];
aha1542_intr_reset
(
base_io
);
aha1542_out
(
base_io
,
dmacmd
,
2
);
WAIT
(
INTRFLAGS
(
base_io
),
INTRMASK
,
HACC
,
0
);
}
while
(
0
)
{
fail:
printk
(
"aha1542_detect: setting bus on/off-time failed
\n
"
);
...
...
@@ -889,6 +994,7 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
}
aha_host
[
irq_level
-
9
]
=
shpnt
;
shpnt
->
io_port
=
base_io
;
shpnt
->
n_io_port
=
4
;
/* Number of bytes of I/O space used */
shpnt
->
dma_channel
=
dma_chan
;
shpnt
->
irq
=
irq_level
;
HOSTDATA
(
shpnt
)
->
bios_translation
=
trans
;
...
...
@@ -1120,3 +1226,12 @@ int aha1542_biosparam(Scsi_Disk * disk, int dev, int * ip)
/* if (ip[2] >= 1024) ip[2] = 1024; */
return
0
;
}
#ifdef MODULE
/* Eventually this will go into an include file, but this will be later */
Scsi_Host_Template
driver_template
=
AHA1542
;
#include "scsi_module.c"
#endif
This diff is collapsed.
Click to expand it.
drivers/scsi/aha1542.h
View file @
fb3ed0dc
...
...
@@ -69,6 +69,7 @@
#define CMD_EMBOI 0x05
/* Enable MailBox Out Interrupt */
#define CMD_BUSON_TIME 0x07
/* Set Bus-On Time */
#define CMD_BUSOFF_TIME 0x08
/* Set Bus-Off Time */
#define CMD_DMASPEED 0x09
/* Set AT Bus Transfer Speed */
#define CMD_RETDEVS 0x0a
/* Return Installed Devices */
#define CMD_RETCONF 0x0b
/* Return Configuration Data */
#define CMD_RETSETUP 0x0d
/* Return Setup Data */
...
...
@@ -132,7 +133,6 @@ int aha1542_detect(Scsi_Host_Template *);
int
aha1542_command
(
Scsi_Cmnd
*
);
int
aha1542_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
aha1542_abort
(
Scsi_Cmnd
*
);
const
char
*
aha1542_info
(
void
);
int
aha1542_reset
(
Scsi_Cmnd
*
);
int
aha1542_biosparam
(
Disk
*
,
int
,
int
*
);
...
...
@@ -144,11 +144,11 @@ int aha1542_biosparam(Disk *, int, int*);
#define NULL 0
#endif
#define AHA1542 { NULL, \
#define AHA1542 { NULL,
NULL,
\
"Adaptec 1542", \
aha1542_detect, \
NULL, \
aha1542_info,
\
NULL,
\
aha1542_command, \
aha1542_queuecommand, \
aha1542_abort, \
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha1740.c
View file @
fb3ed0dc
...
...
@@ -163,12 +163,6 @@ int aha1740_test_port(void)
return
0
;
}
const
char
*
aha1740_info
(
void
)
{
static
char
buffer
[]
=
"Adaptec 174x (EISA)"
;
return
buffer
;
}
/* A "high" level interrupt handler */
void
aha1740_intr_handle
(
int
foo
)
{
...
...
@@ -273,7 +267,7 @@ int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
i
=
-
1
;
printk
(
"aha1740_queuecommand: dev %d cmd %02x pos %d len %d "
,
target
,
*
cmd
,
i
,
bufflen
);
printk
(
"scsi cmd:"
);
for
(
i
=
0
;
i
<
(
COMMAND_SIZE
(
*
cmd
))
;
i
++
)
printk
(
"%02x "
,
cmd
[
i
]);
for
(
i
=
0
;
i
<
SCpnt
->
cmd_len
;
i
++
)
printk
(
"%02x "
,
cmd
[
i
]);
printk
(
"
\n
"
);
#endif
...
...
@@ -302,7 +296,7 @@ int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
printk
(
"Sending command (%d %x)..."
,
ecbno
,
done
);
#endif
ecb
[
ecbno
].
cdblen
=
COMMAND_SIZE
(
*
cmd
)
;
/* SCSI Command Descriptor Block Length */
ecb
[
ecbno
].
cdblen
=
SCpnt
->
cmd_len
;
/* SCSI Command Descriptor Block Length */
direction
=
0
;
if
(
*
cmd
==
READ_10
||
*
cmd
==
READ_6
)
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha1740.h
View file @
fb3ed0dc
...
...
@@ -156,7 +156,6 @@ int aha1740_detect(Scsi_Host_Template *);
int
aha1740_command
(
Scsi_Cmnd
*
);
int
aha1740_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
aha1740_abort
(
Scsi_Cmnd
*
);
const
char
*
aha1740_info
(
void
);
int
aha1740_reset
(
Scsi_Cmnd
*
);
int
aha1740_biosparam
(
Disk
*
,
int
,
int
*
);
...
...
@@ -167,11 +166,11 @@ int aha1740_biosparam(Disk *, int, int*);
#define NULL 0
#endif
#define AHA1740 {NULL, \
"Adaptec 174
0",
\
#define AHA1740 {NULL,
NULL,
\
"Adaptec 174
x (EISA)",
\
aha1740_detect, \
NULL, \
aha1740_info
, \
NULL
,
\
aha1740_command, \
aha1740_queuecommand, \
aha1740_abort, \
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha274x.c
View file @
fb3ed0dc
...
...
@@ -1033,11 +1033,11 @@ int aha274x_detect(Scsi_Host_Template *template)
found
+=
aha274x_register
(
template
,
type
,
base
);
}
}
template
->
name
=
(
char
*
)
aha274x_info
();
template
->
name
=
(
char
*
)
aha274x_info
(
NULL
);
return
(
found
);
}
const
char
*
aha274x_info
(
void
)
const
char
*
aha274x_info
(
struct
Scsi_Host
*
shost
)
{
return
(
"Adaptec AHA274x/284x (EISA/VL-bus -> Fast SCSI) "
AHA274X_SEQ_VERSION
"/"
...
...
@@ -1100,7 +1100,7 @@ void aha274x_buildscb(struct aha274x_host *p,
* little-endian format.
*/
addr
=
cmd
->
cmnd
;
scb
->
SCSI_cmd_length
=
COMMAND_SIZE
(
cmd
->
cm
nd
[
0
])
;
scb
->
SCSI_cmd_length
=
cmd
->
cm
d_len
;
memcpy
(
scb
->
SCSI_cmd_pointer
,
&
addr
,
sizeof
(
scb
->
SCSI_cmd_pointer
));
if
(
cmd
->
use_sg
)
{
...
...
@@ -1155,7 +1155,7 @@ int aha274x_queue(Scsi_Cmnd *cmd, void (*fn)(Scsi_Cmnd *))
#if 0
debug("aha274x_queue: cmd 0x%x (size %u), target %d, lun %d\n",
cmd->cmnd[0],
COMMAND_SIZE(
cmd->cm
nd[0])
,
cmd->cm
d_len
,
cmd->target,
cmd->lun);
#endif
...
...
This diff is collapsed.
Click to expand it.
drivers/scsi/aha274x.h
View file @
fb3ed0dc
...
...
@@ -32,7 +32,8 @@
*/
#define AHA274X { \
NULL, \
"", \
NULL, \
NULL, \
aha274x_detect, \
NULL, \
aha274x_info, \
...
...
@@ -57,6 +58,6 @@ extern int aha274x_detect(Scsi_Host_Template *);
extern
int
aha274x_command
(
Scsi_Cmnd
*
);
extern
int
aha274x_abort
(
Scsi_Cmnd
*
);
extern
int
aha274x_reset
(
Scsi_Cmnd
*
);
extern
const
char
*
aha274x_info
(
void
);
extern
const
char
*
aha274x_info
(
struct
Scsi_Host
*
);
#endif
This diff is collapsed.
Click to expand it.
drivers/scsi/buslogic.c
View file @
fb3ed0dc
This diff is collapsed.
Click to expand it.
drivers/scsi/buslogic.h
View file @
fb3ed0dc
...
...
@@ -20,15 +20,14 @@ int buslogic_reset(Scsi_Cmnd *);
int
buslogic_biosparam
(
Disk
*
,
int
,
int
*
);
#define BUSLOGIC_CMDLUN 1
/* Do not set this too high. It sucks
up lots of memory on machines
with > 16Mb
because of the huge number of
bounce
buffers that need to be allocated.
up lots of memory on
ISA
machines
with > 16MB
because of the huge number of
bounce
buffers that need to be allocated.
For boards that use non-ISA bus, we can
bump this in the board detect routine.
10/8/94 ERY */
10/8/94 ERY */
#define BUSLOGIC { NULL,
\
#define BUSLOGIC { NULL, \
"BusLogic", \
buslogic_detect, \
NULL, \
...
...
@@ -65,8 +64,11 @@ int buslogic_biosparam(Disk *, int, int *);
#define BD_ABORT 0x0001
#define BD_COMMAND 0x0002
#define BD_DETECT 0x0004
#define BD_INTERRUPT 0x0008
#define BD_RESET 0x0010
#define BD_ERRORS 0x0008
#define BD_INTERRUPT 0x0010
#define BD_IO 0x0020
#define BD_RESET 0x0040
#define BD_UNDOCUMENTED 0x0080
/* I/O Port interface */
/* READ */
...
...
@@ -77,18 +79,27 @@ int buslogic_biosparam(Disk *, int, int *);
#define HARDY 0x10
/* Host Adapter Ready */
#define CPRBSY 0x08
/* Command/Parameter Register Busy */
#define DIRRDY 0x04
/* Data In Register Ready */
/* 0x02 is reserved */
#define CMDINV 0x01
/* Command Invalid */
#define STATMASK 0xFD
/* 0x02 is reserved */
#define DATA_IN(base) (STATUS(base) + 1)
#define INTERRUPT(base) (STATUS(base) + 2)
#define INTV 0x80
/* Interrupt Valid */
/* 0x70 are reserved */
#define RSTS 0x08
/* SCSI Reset State */
#define CMDC 0x04
/* Command Complete */
#define MBOR 0x02
/* Mailbox Out Ready */
#define IMBL 0x01
/* Incoming Mailbox Loaded */
#define INTRMASK 0x8F
/* 0x70 are reserved */
#define INTRMASK 0x8F
/* This undocumented port returns a bitmask indicating geometry translation. */
#define GEOMETRY(base) (STATUS(base) + 3)
#define GEO_GT_1GB 0x80
/* > 1GB under DOS geometry mapping */
/* 0x70 are unknown */
#define GEO_XLATION_S_D1 0x0C
/* Disk 1 geometry ("S" models only) */
#define GEO_XLATION_S_D0 0x03
/* Disk 0 geometry ("S" models only) */
/* WRITE */
#define CONTROL(base) STATUS(base)
...
...
@@ -96,6 +107,7 @@ int buslogic_biosparam(Disk *, int, int *);
#define RSOFT 0x40
/* Soft Reset */
#define RINT 0x20
/* Interrupt Reset */
#define RSBUS 0x10
/* SCSI Bus Reset */
/* 0x0F are reserved */
#define COMMAND_PARAMETER(base) (STATUS(base) + 1)
#define CMD_TSTCMDCINT 0x00
/* Test CMDC Interrupt */
...
...
@@ -120,7 +132,13 @@ int buslogic_biosparam(Disk *, int, int *);
#define CMD_HA_DIAG 0x20
/* Host Adapter Diagnostic */
#define CMD_HA_OPTIONS 0x21
/* Host Adapter Options */
#define CMD_INITEXTMB 0x81
/* Initialize Extended Mailbox */
#define CMD_VER_NO_LAST 0x84
/* Version Number Last Byte (undocumented) */
#define CMD_VER_NO_LETTER 0x85
/* Version Number One Letter (undocumented) */
#define CMD_RET_MODEL_NO 0x8B
/* Return Model Number (undocumented) */
#define CMD_INQEXTSETUP 0x8D
/* Inquire Extended Set-up Information */
#define CMD_ROUND_ROBIN 0x8F
/* Enable strict vs. half-assed round-robin
mailbox filling (undocumented) */
#define CMD_READ_FW_LCL_RAM 0x91
/* Read Firmware Local RAM (undocumented) */
#define CMD_WRITE_INQ_BUF 0x9A
/* Write Inquiry Data Buffer
(Target Mode Only) */
#define CMD_READ_INQ_BUF 0x9B
/* Read Inquiry Data Buffer
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
Next
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