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
88955e4c
Commit
88955e4c
authored
Dec 19, 2004
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCSI: convert 53c700 driver to use change_queue_depth API
Signed-off-by:
James Bottomley
<
James.Bottomley@SteelEye.com
>
parent
559467ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
drivers/scsi/53c700.c
drivers/scsi/53c700.c
+6
-17
No files found.
drivers/scsi/53c700.c
View file @
88955e4c
...
...
@@ -176,6 +176,7 @@ 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_configure
(
struct
scsi_device
*
SDpnt
);
STATIC
void
NCR_700_slave_destroy
(
struct
scsi_device
*
SDpnt
);
static
int
NCR_700_change_queue_depth
(
struct
scsi_device
*
SDpnt
,
int
depth
);
STATIC
struct
device_attribute
*
NCR_700_dev_attrs
[];
...
...
@@ -338,6 +339,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
tpnt
->
use_clustering
=
ENABLE_CLUSTERING
;
tpnt
->
slave_configure
=
NCR_700_slave_configure
;
tpnt
->
slave_destroy
=
NCR_700_slave_destroy
;
tpnt
->
change_queue_depth
=
NCR_700_change_queue_depth
;
if
(
tpnt
->
name
==
NULL
)
tpnt
->
name
=
"53c700"
;
...
...
@@ -2102,18 +2104,14 @@ NCR_700_slave_destroy(struct scsi_device *SDp)
/* to do here: deallocate memory */
}
static
ssize_
t
NCR_700_
store_queue_depth
(
struct
device
*
dev
,
const
char
*
buf
,
size_t
count
)
static
in
t
NCR_700_
change_queue_depth
(
struct
scsi_device
*
SDp
,
int
depth
)
{
int
depth
;
struct
scsi_device
*
SDp
=
to_scsi_device
(
dev
);
depth
=
simple_strtoul
(
buf
,
NULL
,
0
);
if
(
depth
>
NCR_700_MAX_TAGS
)
return
-
EINVAL
;
depth
=
NCR_700_MAX_TAGS
;
scsi_adjust_queue_depth
(
SDp
,
MSG_ORDERED_TAG
,
depth
);
return
count
;
return
depth
;
}
static
ssize_t
...
...
@@ -2124,14 +2122,6 @@ NCR_700_show_active_tags(struct device *dev, char *buf)
return
snprintf
(
buf
,
20
,
"%d
\n
"
,
NCR_700_get_depth
(
SDp
));
}
static
struct
device_attribute
NCR_700_queue_depth_attr
=
{
.
attr
=
{
.
name
=
"queue_depth"
,
.
mode
=
S_IWUSR
,
},
.
store
=
NCR_700_store_queue_depth
,
};
static
struct
device_attribute
NCR_700_active_tags_attr
=
{
.
attr
=
{
.
name
=
"active_tags"
,
...
...
@@ -2141,7 +2131,6 @@ static struct device_attribute NCR_700_active_tags_attr = {
};
STATIC
struct
device_attribute
*
NCR_700_dev_attrs
[]
=
{
&
NCR_700_queue_depth_attr
,
&
NCR_700_active_tags_attr
,
NULL
,
};
...
...
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