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
681453cc
Commit
681453cc
authored
Feb 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI QLOGICPTI]: Update for scsi_cmnd changes.
parent
79fbc0d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.c
+17
-17
No files found.
drivers/scsi/qlogicpti.c
View file @
681453cc
...
@@ -1004,16 +1004,16 @@ static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
...
@@ -1004,16 +1004,16 @@ static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
memset
(
cmd
,
0
,
sizeof
(
struct
Command_Entry
));
memset
(
cmd
,
0
,
sizeof
(
struct
Command_Entry
));
cmd
->
hdr
.
entry_cnt
=
1
;
cmd
->
hdr
.
entry_cnt
=
1
;
cmd
->
hdr
.
entry_type
=
ENTRY_COMMAND
;
cmd
->
hdr
.
entry_type
=
ENTRY_COMMAND
;
cmd
->
target_id
=
Cmnd
->
target
;
cmd
->
target_id
=
Cmnd
->
device
->
id
;
cmd
->
target_lun
=
Cmnd
->
lun
;
cmd
->
target_lun
=
Cmnd
->
device
->
lun
;
cmd
->
cdb_length
=
Cmnd
->
cmd_len
;
cmd
->
cdb_length
=
Cmnd
->
cmd_len
;
cmd
->
control_flags
=
0
;
cmd
->
control_flags
=
0
;
if
(
Cmnd
->
device
->
tagged_supported
)
{
if
(
Cmnd
->
device
->
tagged_supported
)
{
if
(
qpti
->
cmd_count
[
Cmnd
->
target
]
==
0
)
if
(
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
==
0
)
qpti
->
tag_ages
[
Cmnd
->
target
]
=
jiffies
;
qpti
->
tag_ages
[
Cmnd
->
device
->
id
]
=
jiffies
;
if
((
jiffies
-
qpti
->
tag_ages
[
Cmnd
->
target
])
>
(
5
*
HZ
))
{
if
((
jiffies
-
qpti
->
tag_ages
[
Cmnd
->
device
->
id
])
>
(
5
*
HZ
))
{
cmd
->
control_flags
=
CFLAG_ORDERED_TAG
;
cmd
->
control_flags
=
CFLAG_ORDERED_TAG
;
qpti
->
tag_ages
[
Cmnd
->
target
]
=
jiffies
;
qpti
->
tag_ages
[
Cmnd
->
device
->
id
]
=
jiffies
;
}
else
}
else
cmd
->
control_flags
=
CFLAG_SIMPLE_TAG
;
cmd
->
control_flags
=
CFLAG_SIMPLE_TAG
;
}
}
...
@@ -1097,7 +1097,7 @@ static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
...
@@ -1097,7 +1097,7 @@ static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
cmd
->
handle
=
in_ptr
;
cmd
->
handle
=
in_ptr
;
qpti
->
cmd_slots
[
in_ptr
]
=
Cmnd
;
qpti
->
cmd_slots
[
in_ptr
]
=
Cmnd
;
qpti
->
cmd_count
[
Cmnd
->
target
]
++
;
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
++
;
sbus_writew
(
in_ptr
,
qpti
->
qregs
+
MBOX4
);
sbus_writew
(
in_ptr
,
qpti
->
qregs
+
MBOX4
);
qpti
->
req_in_ptr
=
in_ptr
;
qpti
->
req_in_ptr
=
in_ptr
;
...
@@ -1118,8 +1118,8 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
...
@@ -1118,8 +1118,8 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
*/
*/
static
void
ourdone
(
Scsi_Cmnd
*
Cmnd
)
static
void
ourdone
(
Scsi_Cmnd
*
Cmnd
)
{
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
int
tgt
=
Cmnd
->
target
;
int
tgt
=
Cmnd
->
device
->
id
;
void
(
*
done
)
(
Scsi_Cmnd
*
);
void
(
*
done
)
(
Scsi_Cmnd
*
);
/* This grot added by DaveM, blame him for ugliness.
/* This grot added by DaveM, blame him for ugliness.
...
@@ -1170,7 +1170,7 @@ static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *));
...
@@ -1170,7 +1170,7 @@ static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *));
static
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
Cmnd
,
static
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
Cmnd
->
device
->
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
/*
/*
...
@@ -1229,7 +1229,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
...
@@ -1229,7 +1229,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
* and can rock on..
* and can rock on..
*/
*/
if
(
qpti
==
NULL
)
if
(
qpti
==
NULL
)
Cmnd
->
host
->
hostt
->
queuecommand
=
qlogicpti_queuecommand
;
Cmnd
->
device
->
host
->
hostt
->
queuecommand
=
qlogicpti_queuecommand
;
spin_unlock_irqrestore
(
&
qpti
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
qpti
->
lock
,
flags
);
...
@@ -1246,7 +1246,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
...
@@ -1246,7 +1246,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
*/
*/
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
static
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
Cmnd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
{
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
Command_Entry
*
cmd
;
struct
Command_Entry
*
cmd
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -1431,7 +1431,7 @@ static Scsi_Cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
...
@@ -1431,7 +1431,7 @@ static Scsi_Cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
Cmnd
->
request_bufflen
,
Cmnd
->
request_bufflen
,
scsi_to_sbus_dma_dir
(
Cmnd
->
sc_data_direction
));
scsi_to_sbus_dma_dir
(
Cmnd
->
sc_data_direction
));
}
}
qpti
->
cmd_count
[
Cmnd
->
target
]
--
;
qpti
->
cmd_count
[
Cmnd
->
device
->
id
]
--
;
sbus_writew
(
out_ptr
,
qpti
->
qregs
+
MBOX5
);
sbus_writew
(
out_ptr
,
qpti
->
qregs
+
MBOX5
);
Cmnd
->
host_scribble
=
(
unsigned
char
*
)
done_queue
;
Cmnd
->
host_scribble
=
(
unsigned
char
*
)
done_queue
;
done_queue
=
Cmnd
;
done_queue
=
Cmnd
;
...
@@ -1468,7 +1468,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1468,7 +1468,7 @@ static void qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
static
int
qlogicpti_abort
(
Scsi_Cmnd
*
Cmnd
)
static
int
qlogicpti_abort
(
Scsi_Cmnd
*
Cmnd
)
{
{
u_short
param
[
6
];
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
SUCCESS
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -1476,7 +1476,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
...
@@ -1476,7 +1476,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
int
i
;
int
i
;
printk
(
KERN_WARNING
"qlogicpti : Aborting cmd for tgt[%d] lun[%d]
\n
"
,
printk
(
KERN_WARNING
"qlogicpti : Aborting cmd for tgt[%d] lun[%d]
\n
"
,
(
int
)
Cmnd
->
target
,
(
int
)
Cmnd
->
lun
);
(
int
)
Cmnd
->
device
->
id
,
(
int
)
Cmnd
->
device
->
lun
);
spin_lock_irqsave
(
&
qpti
->
lock
,
flags
);
spin_lock_irqsave
(
&
qpti
->
lock
,
flags
);
...
@@ -1491,7 +1491,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
...
@@ -1491,7 +1491,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
cmd_cookie
=
i
;
cmd_cookie
=
i
;
param
[
0
]
=
MBOX_ABORT
;
param
[
0
]
=
MBOX_ABORT
;
param
[
1
]
=
(((
u_short
)
Cmnd
->
target
)
<<
8
)
|
Cmnd
->
lun
;
param
[
1
]
=
(((
u_short
)
Cmnd
->
device
->
id
)
<<
8
)
|
Cmnd
->
device
->
lun
;
param
[
2
]
=
cmd_cookie
>>
16
;
param
[
2
]
=
cmd_cookie
>>
16
;
param
[
3
]
=
cmd_cookie
&
0xffff
;
param
[
3
]
=
cmd_cookie
&
0xffff
;
if
(
qlogicpti_mbox_command
(
qpti
,
param
,
0
)
||
if
(
qlogicpti_mbox_command
(
qpti
,
param
,
0
)
||
...
@@ -1510,7 +1510,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
...
@@ -1510,7 +1510,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
static
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
static
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
{
{
u_short
param
[
6
];
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
Scsi_Host
*
host
=
Cmnd
->
device
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
SUCCESS
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
unsigned
long
flags
;
...
...
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