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
Kirill Smelkov
linux
Commits
e8f064c2
Commit
e8f064c2
authored
Aug 18, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the 32-bit Ninja SCSI driver from YOKOTA Hiroshi.
parent
ad6ab150
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2468 additions
and
2090 deletions
+2468
-2090
MAINTAINERS
MAINTAINERS
+1
-1
drivers/scsi/nsp32.c
drivers/scsi/nsp32.c
+2053
-1913
drivers/scsi/nsp32.h
drivers/scsi/nsp32.h
+360
-113
drivers/scsi/nsp32_debug.c
drivers/scsi/nsp32_debug.c
+5
-4
drivers/scsi/nsp32_io.h
drivers/scsi/nsp32_io.h
+49
-59
No files found.
MAINTAINERS
View file @
e8f064c2
...
...
@@ -1348,7 +1348,7 @@ M: Andreas Mohr <100.30936@germany.net>
L: linux-net@vger.kernel.org
S: Maintained
NINJA SCSI-3 / NINJA SCSI-32Bi PCMCIA SCSI HOST ADAPTER DRIVER
NINJA SCSI-3 / NINJA SCSI-32Bi
(16bit/CardBus)
PCMCIA SCSI HOST ADAPTER DRIVER
P: YOKOTA Hiroshi
M: yokota@netlab.is.tsukuba.ac.jp
W: http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/ninja/
...
...
drivers/scsi/nsp32.c
View file @
e8f064c2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
drivers/scsi/nsp32.h
View file @
e8f064c2
This diff is collapsed.
Click to expand it.
drivers/scsi/nsp32_debug.c
View file @
e8f064c2
/*
* Workbit NinjaSCSI-32Bi/UDE PCI/Card
b
us SCSI Host Bus Adapter driver
* Workbit NinjaSCSI-32Bi/UDE PCI/Card
B
us SCSI Host Bus Adapter driver
* Debug routine
*
* This software may be used and distributed according to the terms of
...
...
@@ -88,7 +88,7 @@ static void print_commandk (unsigned char *command)
int
i
,
s
;
// printk(KERN_DEBUG);
print_opcodek
(
command
[
0
]);
/*printk(KERN_DEBUG
__func__ " "
);*/
/*printk(KERN_DEBUG
"%s ", __FUNCTION__
);*/
if
((
command
[
0
]
>>
5
)
==
6
||
(
command
[
0
]
>>
5
)
==
7
)
{
s
=
12
;
/* vender specific */
...
...
@@ -137,9 +137,9 @@ static void print_commandk (unsigned char *command)
printk
(
"
\n
"
);
}
static
void
show_command
(
Scsi_Cmnd
*
ptr
)
static
void
show_command
(
Scsi_Cmnd
*
SCpnt
)
{
print_commandk
(
ptr
->
cmnd
);
print_commandk
(
SCpnt
->
cmnd
);
}
static
void
show_busphase
(
unsigned
char
stat
)
...
...
@@ -260,3 +260,4 @@ static void nsp32_print_register(int base)
}
}
/* end */
drivers/scsi/nsp32_io.h
View file @
e8f064c2
/*
* Workbit NinjaSCSI-32Bi/UDE PCI/Card
b
us SCSI Host Bus Adapter driver
* Workbit NinjaSCSI-32Bi/UDE PCI/Card
B
us SCSI Host Bus Adapter driver
* I/O routine
*
* This software may be used and distributed according to the terms of
...
...
@@ -26,26 +26,26 @@ static inline void nsp32_write2(unsigned int base,
unsigned
int
index
,
unsigned
short
val
)
{
outw
(
cpu_to_le16
(
val
)
,
(
base
+
index
));
outw
(
val
,
(
base
+
index
));
}
static
inline
unsigned
short
nsp32_read2
(
unsigned
int
base
,
unsigned
int
index
)
{
return
le16_to_cpu
(
inw
(
base
+
index
)
);
return
inw
(
base
+
index
);
}
static
inline
void
nsp32_write4
(
unsigned
int
base
,
unsigned
int
index
,
unsigned
long
val
)
{
outl
(
cpu_to_le32
(
val
)
,
(
base
+
index
));
outl
(
val
,
(
base
+
index
));
}
static
inline
unsigned
long
nsp32_read4
(
unsigned
int
base
,
unsigned
int
index
)
{
return
le32_to_cpu
(
inl
(
base
+
index
)
);
return
inl
(
base
+
index
);
}
/*==============================================*/
...
...
@@ -58,7 +58,7 @@ static inline void nsp32_mmio_write1(unsigned long base,
ptr
=
(
unsigned
char
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
*
ptr
=
val
;
writeb
(
val
,
ptr
)
;
}
static
inline
unsigned
char
nsp32_mmio_read1
(
unsigned
long
base
,
...
...
@@ -68,7 +68,7 @@ static inline unsigned char nsp32_mmio_read1(unsigned long base,
ptr
=
(
unsigned
char
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
return
*
ptr
;
return
readb
(
ptr
)
;
}
static
inline
void
nsp32_mmio_write2
(
unsigned
long
base
,
...
...
@@ -79,7 +79,7 @@ static inline void nsp32_mmio_write2(unsigned long base,
ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
*
ptr
=
cpu_to_le16
(
val
);
writew
(
cpu_to_le16
(
val
),
ptr
);
}
static
inline
unsigned
short
nsp32_mmio_read2
(
unsigned
long
base
,
...
...
@@ -87,11 +87,9 @@ static inline unsigned short nsp32_mmio_read2(unsigned long base,
{
volatile
unsigned
short
*
ptr
;
//printk(__FUNCTION__ "\n");
ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
return
le16_to_cpu
(
*
ptr
);
return
le16_to_cpu
(
readw
(
ptr
)
);
}
static
inline
void
nsp32_mmio_write4
(
unsigned
long
base
,
...
...
@@ -102,7 +100,7 @@ static inline void nsp32_mmio_write4(unsigned long base,
ptr
=
(
unsigned
long
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
*
ptr
=
cpu_to_le32
(
val
);
writel
(
cpu_to_le32
(
val
),
ptr
);
}
static
inline
unsigned
long
nsp32_mmio_read4
(
unsigned
long
base
,
...
...
@@ -110,16 +108,12 @@ static inline unsigned long nsp32_mmio_read4(unsigned long base,
{
volatile
unsigned
long
*
ptr
;
//printk(__FUNCTION__ "\n");
ptr
=
(
unsigned
long
*
)(
base
+
NSP32_MMIO_OFFSET
+
index
);
return
le32_to_cpu
(
*
ptr
);
return
le32_to_cpu
(
readl
(
ptr
)
);
}
/*=============================================*/
/*==============================================*/
static
inline
unsigned
char
nsp32_index_read1
(
unsigned
int
base
,
unsigned
int
reg
)
...
...
@@ -132,7 +126,7 @@ static inline void nsp32_index_write1(unsigned int base,
unsigned
int
reg
,
unsigned
char
val
)
{
outb
(
reg
,
base
+
INDEX_REG
);
outb
(
reg
,
base
+
INDEX_REG
);
outb
(
val
,
base
+
DATA_REG_LOW
);
}
...
...
@@ -140,15 +134,15 @@ static inline unsigned short nsp32_index_read2(unsigned int base,
unsigned
int
reg
)
{
outb
(
reg
,
base
+
INDEX_REG
);
return
le16_to_cpu
(
inw
(
base
+
DATA_REG_LOW
)
);
return
inw
(
base
+
DATA_REG_LOW
);
}
static
inline
void
nsp32_index_write2
(
unsigned
int
base
,
unsigned
int
reg
,
unsigned
short
val
)
{
outb
(
reg
,
base
+
INDEX_REG
);
outw
(
cpu_to_le16
(
val
)
,
base
+
DATA_REG_LOW
);
outb
(
reg
,
base
+
INDEX_REG
);
outw
(
val
,
base
+
DATA_REG_LOW
);
}
static
inline
unsigned
long
nsp32_index_read4
(
unsigned
int
base
,
...
...
@@ -157,8 +151,8 @@ static inline unsigned long nsp32_index_read4(unsigned int base,
unsigned
long
h
,
l
;
outb
(
reg
,
base
+
INDEX_REG
);
l
=
le16_to_cpu
(
inw
(
base
+
DATA_REG_LOW
)
);
h
=
le16_to_cpu
(
inw
(
base
+
DATA_REG_HI
)
);
l
=
inw
(
base
+
DATA_REG_LOW
);
h
=
inw
(
base
+
DATA_REG_HI
);
return
((
h
<<
16
)
|
l
);
}
...
...
@@ -172,13 +166,12 @@ static inline void nsp32_index_write4(unsigned int base,
h
=
(
val
&
0xffff0000
)
>>
16
;
l
=
(
val
&
0x0000ffff
)
>>
0
;
outb
(
reg
,
base
+
INDEX_REG
);
outw
(
cpu_to_le16
(
l
),
base
+
DATA_REG_LOW
);
outw
(
cpu_to_le16
(
h
),
base
+
DATA_REG_HI
);
outb
(
reg
,
base
+
INDEX_REG
);
outw
(
l
,
base
+
DATA_REG_LOW
);
outw
(
h
,
base
+
DATA_REG_HI
);
}
/* ===================================*/
/*==============================================*/
static
inline
unsigned
char
nsp32_mmio_index_read1
(
unsigned
int
base
,
unsigned
int
reg
)
...
...
@@ -188,9 +181,8 @@ static inline unsigned char nsp32_mmio_index_read1(unsigned int base,
index_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
INDEX_REG
);
data_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
DATA_REG_LOW
);
*
index_ptr
=
reg
;
return
((
*
data_ptr
)
&
0xff
);
writeb
(
reg
,
index_ptr
);
return
readb
(
data_ptr
);
}
static
inline
void
nsp32_mmio_index_write1
(
unsigned
int
base
,
...
...
@@ -202,8 +194,8 @@ static inline void nsp32_mmio_index_write1(unsigned int base,
index_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
INDEX_REG
);
data_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
DATA_REG_LOW
);
*
index_ptr
=
reg
;
*
data_ptr
=
(
unsigned
short
)
val
;
writeb
(
reg
,
index_ptr
)
;
writeb
(
val
,
data_ptr
)
;
}
static
inline
unsigned
short
nsp32_mmio_index_read2
(
unsigned
int
base
,
...
...
@@ -214,9 +206,8 @@ static inline unsigned short nsp32_mmio_index_read2(unsigned int base,
index_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
INDEX_REG
);
data_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
DATA_REG_LOW
);
*
index_ptr
=
reg
;
return
le16_to_cpu
(
*
data_ptr
);
writeb
(
reg
,
index_ptr
);
return
le16_to_cpu
(
readw
(
data_ptr
));
}
static
inline
void
nsp32_mmio_index_write2
(
unsigned
int
base
,
...
...
@@ -228,34 +219,33 @@ static inline void nsp32_mmio_index_write2(unsigned int base,
index_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
INDEX_REG
);
data_ptr
=
(
unsigned
short
*
)(
base
+
NSP32_MMIO_OFFSET
+
DATA_REG_LOW
);
*
index_ptr
=
reg
;
*
data_ptr
=
val
;
writeb
(
reg
,
index_ptr
)
;
writew
(
cpu_to_le16
(
val
),
data_ptr
)
;
}
/*
-------------------------------------------------------------------
*/
/*
==============================================
*/
static
inline
void
nsp32_multi_read4
(
unsigned
int
BaseAddr
,
unsigned
int
Register
,
static
inline
void
nsp32_multi_read4
(
unsigned
int
base
,
unsigned
int
reg
,
void
*
buf
,
unsigned
long
count
)
{
insl
(
BaseAddr
+
Register
,
buf
,
count
);
insl
(
base
+
reg
,
buf
,
count
);
}
static
inline
void
nsp32_fifo_read
(
unsigned
int
base
,
void
*
buf
,
unsigned
long
count
)
{
//DEBUG(0, __FUNCTION__ "() buf=0x%p, count=0x%lx*4\n", buf, count);
nsp32_multi_read4
(
base
,
FIFO_DATA_LOW
,
buf
,
count
);
}
static
inline
void
nsp32_multi_write4
(
unsigned
int
BaseAddr
,
unsigned
int
Register
,
static
inline
void
nsp32_multi_write4
(
unsigned
int
base
,
unsigned
int
reg
,
void
*
buf
,
unsigned
long
count
)
{
outsl
(
BaseAddr
+
Register
,
buf
,
count
);
outsl
(
base
+
reg
,
buf
,
count
);
}
static
inline
void
nsp32_fifo_write
(
unsigned
int
base
,
...
...
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