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
88544416
Commit
88544416
authored
Jun 02, 2004
by
Tom 'spot' Callaway
Committed by
David S. Miller
Jun 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SBUS]: Stop using drivers/scsi/{scsi,hosts}.h in drivers.
parent
9c5cdec2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
88 deletions
+106
-88
drivers/scsi/esp.c
drivers/scsi/esp.c
+61
-63
drivers/scsi/esp.h
drivers/scsi/esp.h
+14
-3
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.c
+19
-21
drivers/scsi/qlogicpti.h
drivers/scsi/qlogicpti.h
+12
-1
No files found.
drivers/scsi/esp.c
View file @
88544416
This diff is collapsed.
Click to expand it.
drivers/scsi/esp.h
View file @
88544416
...
...
@@ -10,9 +10,20 @@
#include <linux/config.h>
/* #include "scsi.h" */
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_request.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
/* For dvma controller register definitions. */
#include <asm/dma.h>
#define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
/* The ESP SCSI controllers have their register sets in three
* "classes":
*
...
...
@@ -181,9 +192,9 @@ struct esp {
int
bursts
;
/* Burst sizes our DVMA supports */
/* Our command queues, only one cmd lives in the current_SC queue. */
Scsi_Cmnd
*
issue_SC
;
/* Commands to be issued */
Scsi_Cmnd
*
current_SC
;
/* Who is currently working the bus */
Scsi_Cmnd
*
disconnected_SC
;
/* Commands disconnected from the bus */
struct
scsi_cmnd
*
issue_SC
;
/* Commands to be issued */
struct
scsi_cmnd
*
current_SC
;
/* Who is currently working the bus */
struct
scsi_cmnd
*
disconnected_SC
;
/* Commands disconnected from the bus */
/* Message goo */
u8
cur_msgout
[
16
];
...
...
drivers/scsi/qlogicpti.c
View file @
88544416
...
...
@@ -26,8 +26,6 @@
#include <asm/byteorder.h>
#include "scsi.h"
#include "hosts.h"
#include "qlogicpti.h"
#include <asm/sbus.h>
...
...
@@ -809,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti)
}
/* Detect all PTI Qlogic ISP's in the machine. */
static
int
__init
qlogicpti_detect
(
Scsi_Host_T
emplate
*
tpnt
)
static
int
__init
qlogicpti_detect
(
struct
scsi_host_t
emplate
*
tpnt
)
{
struct
qlogicpti
*
qpti
;
struct
Scsi_Host
*
qpti_host
;
...
...
@@ -878,7 +876,7 @@ static int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
qpti_get_bursts
(
qpti
);
qpti_get_clock
(
qpti
);
/* Clear out
Scsi_C
mnd array. */
/* Clear out
scsi_c
mnd array. */
memset
(
qpti
->
cmd_slots
,
0
,
sizeof
(
qpti
->
cmd_slots
));
if
(
qpti_map_queues
(
qpti
)
<
0
)
...
...
@@ -997,7 +995,7 @@ static inline void marker_frob(struct Command_Entry *cmd)
marker
->
rsvd
=
0
;
}
static
inline
void
cmd_frob
(
struct
Command_Entry
*
cmd
,
Scsi_C
mnd
*
Cmnd
,
static
inline
void
cmd_frob
(
struct
Command_Entry
*
cmd
,
struct
scsi_c
mnd
*
Cmnd
,
struct
qlogicpti
*
qpti
)
{
memset
(
cmd
,
0
,
sizeof
(
struct
Command_Entry
));
...
...
@@ -1027,7 +1025,7 @@ static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
}
/* Do it to it baby. */
static
inline
int
load_cmd
(
Scsi_C
mnd
*
Cmnd
,
struct
Command_Entry
*
cmd
,
static
inline
int
load_cmd
(
struct
scsi_c
mnd
*
Cmnd
,
struct
Command_Entry
*
cmd
,
struct
qlogicpti
*
qpti
,
u_int
in_ptr
,
u_int
out_ptr
)
{
struct
dataseg
*
ds
;
...
...
@@ -1115,11 +1113,11 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
/*
* Until we scan the entire bus with inquiries, go throught this fella...
*/
static
void
ourdone
(
Scsi_C
mnd
*
Cmnd
)
static
void
ourdone
(
struct
scsi_c
mnd
*
Cmnd
)
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
int
tgt
=
Cmnd
->
device
->
id
;
void
(
*
done
)
(
Scsi_C
mnd
*
);
void
(
*
done
)
(
struct
scsi_c
mnd
*
);
/* This grot added by DaveM, blame him for ugliness.
* The issue is that in the 2.3.x driver we use the
...
...
@@ -1127,7 +1125,7 @@ static void ourdone(Scsi_Cmnd *Cmnd)
* completion linked list at interrupt service time,
* so we have to store the done function pointer elsewhere.
*/
done
=
(
void
(
*
)(
Scsi_C
mnd
*
))
done
=
(
void
(
*
)(
struct
scsi_c
mnd
*
))
(((
unsigned
long
)
Cmnd
->
SCp
.
Message
)
#ifdef __sparc_v9__
|
((
unsigned
long
)
Cmnd
->
SCp
.
Status
<<
32UL
)
...
...
@@ -1164,10 +1162,10 @@ static void ourdone(Scsi_Cmnd *Cmnd)
done
(
Cmnd
);
}
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_C
mnd
*
));
static
int
qlogicpti_queuecommand
(
struct
scsi_cmnd
*
Cmnd
,
void
(
*
done
)(
struct
scsi_c
mnd
*
));
static
int
qlogicpti_queuecommand_slow
(
Scsi_C
mnd
*
Cmnd
,
void
(
*
done
)(
Scsi_C
mnd
*
))
static
int
qlogicpti_queuecommand_slow
(
struct
scsi_c
mnd
*
Cmnd
,
void
(
*
done
)(
struct
scsi_c
mnd
*
))
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
...
...
@@ -1238,7 +1236,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
*
* "This code must fly." -davem
*/
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_C
mnd
*
))
static
int
qlogicpti_queuecommand
(
struct
scsi_cmnd
*
Cmnd
,
void
(
*
done
)(
struct
scsi_c
mnd
*
))
{
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
...
...
@@ -1351,9 +1349,9 @@ static int qlogicpti_return_status(struct Status_Entry *sts, int id)
return
(
sts
->
scsi_status
&
STATUS_MASK
)
|
(
host_status
<<
16
);
}
static
Scsi_C
mnd
*
qlogicpti_intr_handler
(
struct
qlogicpti
*
qpti
)
static
struct
scsi_c
mnd
*
qlogicpti_intr_handler
(
struct
qlogicpti
*
qpti
)
{
Scsi_C
mnd
*
Cmnd
,
*
done_queue
=
NULL
;
struct
scsi_c
mnd
*
Cmnd
,
*
done_queue
=
NULL
;
struct
Status_Entry
*
sts
;
u_int
in_ptr
,
out_ptr
;
...
...
@@ -1433,16 +1431,16 @@ static irqreturn_t qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
{
struct
qlogicpti
*
qpti
=
dev_id
;
unsigned
long
flags
;
Scsi_C
mnd
*
dq
;
struct
scsi_c
mnd
*
dq
;
spin_lock_irqsave
(
qpti
->
qhost
->
host_lock
,
flags
);
dq
=
qlogicpti_intr_handler
(
qpti
);
if
(
dq
!=
NULL
)
{
do
{
Scsi_C
mnd
*
next
;
struct
scsi_c
mnd
*
next
;
next
=
(
Scsi_C
mnd
*
)
dq
->
host_scribble
;
next
=
(
struct
scsi_c
mnd
*
)
dq
->
host_scribble
;
dq
->
scsi_done
(
dq
);
dq
=
next
;
}
while
(
dq
!=
NULL
);
...
...
@@ -1452,7 +1450,7 @@ static irqreturn_t qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
return
IRQ_HANDLED
;
}
static
int
qlogicpti_abort
(
Scsi_C
mnd
*
Cmnd
)
static
int
qlogicpti_abort
(
struct
scsi_c
mnd
*
Cmnd
)
{
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
...
...
@@ -1489,7 +1487,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return
return_status
;
}
static
int
qlogicpti_reset
(
Scsi_C
mnd
*
Cmnd
)
static
int
qlogicpti_reset
(
struct
scsi_c
mnd
*
Cmnd
)
{
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
...
...
@@ -1513,7 +1511,7 @@ static int qlogicpti_reset(Scsi_Cmnd *Cmnd)
return
return_status
;
}
static
Scsi_Host_T
emplate
driver_template
=
{
static
struct
scsi_host_t
emplate
driver_template
=
{
.
detect
=
qlogicpti_detect
,
.
release
=
qlogicpti_release
,
.
info
=
qlogicpti_info
,
...
...
drivers/scsi/qlogicpti.h
View file @
88544416
...
...
@@ -8,6 +8,17 @@
#include <linux/config.h>
/* #include "scsi.h" */
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_request.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
/* Qlogic/SBUS controller registers. */
#define SBUS_CFG1 0x006UL
#define SBUS_CTRL 0x008UL
...
...
@@ -352,7 +363,7 @@ struct qlogicpti {
* Ex000 sparc64 machines with >4GB of ram we just keep track of the
* scsi command pointers here. This is essentially what Matt Jacob does. -DaveM
*/
Scsi_Cmnd
*
cmd_slots
[
QLOGICPTI_REQ_QUEUE_LEN
+
1
];
struct
scsi_cmnd
*
cmd_slots
[
QLOGICPTI_REQ_QUEUE_LEN
+
1
];
/* The rest of the elements are unimportant for performance. */
struct
qlogicpti
*
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