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
3a0e045b
Commit
3a0e045b
authored
Oct 17, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI 53c700] update with new TCQ code
parent
8759fe8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
drivers/scsi/53c700.c
drivers/scsi/53c700.c
+28
-5
drivers/scsi/53c700.h
drivers/scsi/53c700.h
+5
-0
No files found.
drivers/scsi/53c700.c
View file @
3a0e045b
...
...
@@ -170,6 +170,8 @@ STATIC int NCR_700_host_reset(Scsi_Cmnd * SCpnt);
STATIC
int
NCR_700_proc_directory_info
(
char
*
,
char
**
,
off_t
,
int
,
int
,
int
);
STATIC
void
NCR_700_chip_setup
(
struct
Scsi_Host
*
host
);
STATIC
void
NCR_700_chip_reset
(
struct
Scsi_Host
*
host
);
STATIC
int
NCR_700_slave_attach
(
Scsi_Device
*
SDpnt
);
STATIC
void
NCR_700_slave_detach
(
Scsi_Device
*
SDpnt
);
static
char
*
NCR_700_phase
[]
=
{
""
,
...
...
@@ -280,9 +282,11 @@ NCR_700_detect(Scsi_Host_Template *tpnt,
tpnt
->
eh_host_reset_handler
=
NCR_700_host_reset
;
tpnt
->
can_queue
=
NCR_700_COMMAND_SLOTS_PER_HOST
;
tpnt
->
sg_tablesize
=
NCR_700_SG_SEGMENTS
;
tpnt
->
cmd_per_lun
=
NCR_700_
MAX_TAGS
;
tpnt
->
cmd_per_lun
=
NCR_700_
CMD_PER_LUN
;
tpnt
->
use_clustering
=
DISABLE_CLUSTERING
;
tpnt
->
proc_info
=
NCR_700_proc_directory_info
;
tpnt
->
slave_attach
=
NCR_700_slave_attach
;
tpnt
->
slave_detach
=
NCR_700_slave_detach
;
tpnt
->
use_blk_tcq
=
1
;
tpnt
->
highmem_io
=
1
;
...
...
@@ -891,8 +895,8 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
printk
(
KERN_WARNING
"scsi%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing
\n
"
,
host
->
host_no
,
pun
,
lun
);
NCR_700_clear_flag
(
SCp
->
device
,
NCR_700_DEV_BEGIN_TAG_QUEUEING
);
hostdata
->
tag_negotiated
&=
~
(
1
<<
SCp
->
target
);
SCp
->
device
->
tagged_queue
=
0
;
SCp
->
device
->
tagged_supported
=
0
;
scsi_deactivate_tcq
(
SCp
->
device
);
}
else
{
printk
(
KERN_WARNING
"scsi%d (%d:%d) Unexpected REJECT Message %s
\n
"
,
host
->
host_no
,
pun
,
lun
,
...
...
@@ -1739,7 +1743,7 @@ NCR_700_proc_directory_info(char *proc_buf, char **startp,
Target Depth Active Next Tag
\n
\
====== ===== ====== ========
\n
"
);
for
(
SDp
=
host
->
host_queue
;
SDp
!=
NULL
;
SDp
=
SDp
->
next
)
{
len
+=
sprintf
(
&
buf
[
len
],
" %2d:%2d %4d %4d %4d
\n
"
,
SDp
->
id
,
SDp
->
lun
,
SDp
->
queue_depth
,
NCR_700_get_depth
(
SDp
),
SDp
->
current_tag
);
len
+=
sprintf
(
&
buf
[
len
],
" %2d:%2d %4d %4d %4d
\n
"
,
SDp
->
id
,
SDp
->
lun
,
SDp
->
current_
queue_depth
,
NCR_700_get_depth
(
SDp
),
SDp
->
current_tag
);
}
if
((
len
-=
offset
)
<=
0
)
return
0
;
...
...
@@ -1776,13 +1780,13 @@ NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *))
DEBUG
((
KERN_ERR
"scsi%d (%d:%d) has non zero depth %d
\n
"
,
SCp
->
host
->
host_no
,
SCp
->
target
,
SCp
->
lun
,
NCR_700_get_depth
(
SCp
->
device
)));
return
1
;
return
SCSI_MLQUEUE_DEVICE_BUSY
;
}
if
(
NCR_700_get_depth
(
SCp
->
device
)
>=
NCR_700_MAX_TAGS
)
{
DEBUG
((
KERN_ERR
"scsi%d (%d:%d) has max tag depth %d
\n
"
,
SCp
->
host
->
host_no
,
SCp
->
target
,
SCp
->
lun
,
NCR_700_get_depth
(
SCp
->
device
)));
return
1
;
return
SCSI_MLQUEUE_DEVICE_BUSY
;
}
NCR_700_set_depth
(
SCp
->
device
,
NCR_700_get_depth
(
SCp
->
device
)
+
1
);
...
...
@@ -1998,6 +2002,25 @@ NCR_700_host_reset(Scsi_Cmnd * SCp)
return
SUCCESS
;
}
STATIC
int
NCR_700_slave_attach
(
Scsi_Device
*
SDp
)
{
/* to do here: allocate memory; build a queue_full list */
if
(
SDp
->
tagged_supported
)
{
/* do TCQ stuff here */
}
else
{
/* initialise to default depth */
scsi_adjust_queue_depth
(
SDp
,
0
,
SDp
->
host
->
cmd_per_lun
);
}
return
0
;
}
STATIC
void
NCR_700_slave_detach
(
Scsi_Device
*
SDp
)
{
/* to do here: deallocate memory */
}
EXPORT_SYMBOL
(
NCR_700_detect
);
EXPORT_SYMBOL
(
NCR_700_release
);
EXPORT_SYMBOL
(
NCR_700_intr
);
drivers/scsi/53c700.h
View file @
3a0e045b
...
...
@@ -30,6 +30,11 @@
/* Alter this with care: too many tags won't give the elevator a chance to
* work; too few will cause the device to operate less efficiently */
#define NCR_700_MAX_TAGS 16
/* This is the default number of commands per LUN in the untagged case.
* two is a good value because it means we can have one command active and
* one command fully prepared and waiting
*/
#define NCR_700_CMD_PER_LUN 2
/* magic byte identifying an internally generated REQUEST_SENSE command */
#define NCR_700_INTERNAL_SENSE_MAGIC 0x42
...
...
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