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
a0a05dcb
Commit
a0a05dcb
authored
Oct 15, 2002
by
Doug Ledford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] eata TCQ update
eata.h: Update template eata.c: Add slave_attach and new TCQ method
parent
95e38aa0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
53 deletions
+24
-53
drivers/scsi/eata.c
drivers/scsi/eata.c
+22
-53
drivers/scsi/eata.h
drivers/scsi/eata.h
+2
-0
No files found.
drivers/scsi/eata.c
View file @
a0a05dcb
...
@@ -750,63 +750,34 @@ static int max_queue_depth = CONFIG_SCSI_EATA_MAX_TAGS;
...
@@ -750,63 +750,34 @@ static int max_queue_depth = CONFIG_SCSI_EATA_MAX_TAGS;
static
int
max_queue_depth
=
MAX_CMD_PER_LUN
;
static
int
max_queue_depth
=
MAX_CMD_PER_LUN
;
#endif
#endif
static
void
select_queue_depths
(
struct
Scsi_Host
*
host
,
Scsi_Device
*
devlist
)
{
static
int
eata2x_slave_attach
(
Scsi_Device
*
dev
)
{
Scsi_Device
*
dev
;
int
j
,
tqd
,
utqd
;
int
j
,
ntag
=
0
,
nuntag
=
0
,
tqd
,
utqd
;
char
*
link_suffix
=
""
;
struct
Scsi_Host
*
host
=
dev
->
host
;
j
=
((
struct
hostdata
*
)
host
->
hostdata
)
->
board_number
;
j
=
((
struct
hostdata
*
)
host
->
hostdata
)
->
board_number
;
for
(
dev
=
devlist
;
dev
;
dev
=
dev
->
next
)
{
if
(
dev
->
host
!=
host
)
continue
;
if
(
TLDEV
(
dev
->
type
)
&&
(
dev
->
tagged_supported
||
linked_comm
))
ntag
++
;
else
nuntag
++
;
}
utqd
=
MAX_CMD_PER_LUN
;
utqd
=
MAX_CMD_PER_LUN
;
tqd
=
(
host
->
can_queue
-
utqd
);
tqd
=
(
host
->
can_queue
-
utqd
*
nuntag
)
/
(
ntag
?
ntag
:
1
);
if
(
TLDEV
(
dev
->
type
)
&&
(
dev
->
tagged_supported
||
linked_comm
))
{
if
(
!
dev
->
tagged_supported
)
if
(
tqd
>
max_queue_depth
)
tqd
=
max_queue_depth
;
scsi_adjust_queue_depth
(
dev
,
0
,
tqd
);
if
(
tqd
<
MAX_CMD_PER_LUN
)
tqd
=
MAX_CMD_PER_LUN
;
for
(
dev
=
devlist
;
dev
;
dev
=
dev
->
next
)
{
char
*
tag_suffix
=
""
,
*
link_suffix
=
""
;
if
(
dev
->
host
!=
host
)
continue
;
if
(
TLDEV
(
dev
->
type
)
&&
(
dev
->
tagged_supported
||
linked_comm
))
dev
->
queue_depth
=
tqd
;
else
else
dev
->
queue_depth
=
utqd
;
scsi_adjust_queue_depth
(
dev
,
MSG_SIMPLE_TAG
,
tqd
);
}
else
{
if
(
TLDEV
(
dev
->
type
))
{
scsi_adjust_queue_depth
(
dev
,
0
,
utqd
);
if
(
linked_comm
&&
dev
->
queue_depth
>
2
)
}
link_suffix
=
", sorted"
;
else
link_suffix
=
", unsorted"
;
}
if
(
tagged_comm
&&
dev
->
tagged_supported
&&
TLDEV
(
dev
->
type
))
{
dev
->
tagged_queue
=
1
;
dev
->
current_tag
=
1
;
}
if
(
dev
->
tagged_supported
&&
TLDEV
(
dev
->
type
)
&&
dev
->
tagged_queue
)
tag_suffix
=
", soft-tagged"
;
else
if
(
dev
->
tagged_supported
&&
TLDEV
(
dev
->
type
))
tag_suffix
=
", tagged"
;
printk
(
"%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.
\n
"
,
if
(
!
dev
->
simple_tags
&&
dev
->
new_queue_depth
>
2
)
BN
(
j
),
host
->
host_no
,
dev
->
channel
,
dev
->
id
,
dev
->
lun
,
link_suffix
=
", sorted"
;
dev
->
queue_depth
,
link_suffix
,
tag_suffix
);
else
if
(
dev
->
simple_tags
)
}
link_suffix
=
", unsorted"
;
return
;
printk
(
"%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s.
\n
"
,
BN
(
j
),
host
->
host_no
,
dev
->
channel
,
dev
->
id
,
dev
->
lun
,
dev
->
new_queue_depth
,
link_suffix
);
return
0
;
}
}
static
inline
int
wait_on_busy
(
unsigned
long
iobase
,
unsigned
int
loop
)
{
static
inline
int
wait_on_busy
(
unsigned
long
iobase
,
unsigned
int
loop
)
{
...
@@ -1071,7 +1042,6 @@ static inline int port_detect \
...
@@ -1071,7 +1042,6 @@ static inline int port_detect \
sh
[
j
]
->
this_id
=
(
ushort
)
info
.
host_addr
[
3
];
sh
[
j
]
->
this_id
=
(
ushort
)
info
.
host_addr
[
3
];
sh
[
j
]
->
can_queue
=
(
ushort
)
be16_to_cpu
(
info
.
queue_size
);
sh
[
j
]
->
can_queue
=
(
ushort
)
be16_to_cpu
(
info
.
queue_size
);
sh
[
j
]
->
cmd_per_lun
=
MAX_CMD_PER_LUN
;
sh
[
j
]
->
cmd_per_lun
=
MAX_CMD_PER_LUN
;
sh
[
j
]
->
select_queue_depths
=
select_queue_depths
;
memset
(
HD
(
j
),
0
,
sizeof
(
struct
hostdata
));
memset
(
HD
(
j
),
0
,
sizeof
(
struct
hostdata
));
HD
(
j
)
->
subversion
=
subversion
;
HD
(
j
)
->
subversion
=
subversion
;
HD
(
j
)
->
protocol_rev
=
protocol_rev
;
HD
(
j
)
->
protocol_rev
=
protocol_rev
;
...
@@ -1542,7 +1512,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
...
@@ -1542,7 +1512,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
/* Map DMA buffers and SG list */
/* Map DMA buffers and SG list */
map_dma
(
i
,
j
);
map_dma
(
i
,
j
);
if
(
SCpnt
->
device
->
tagged_queue
)
{
if
(
SCpnt
->
device
->
simple_tags
)
{
if
(
HD
(
j
)
->
target_redo
[
SCpnt
->
target
][
SCpnt
->
channel
]
||
if
(
HD
(
j
)
->
target_redo
[
SCpnt
->
target
][
SCpnt
->
channel
]
||
HD
(
j
)
->
target_to
[
SCpnt
->
target
][
SCpnt
->
channel
])
HD
(
j
)
->
target_to
[
SCpnt
->
target
][
SCpnt
->
channel
])
...
@@ -1560,8 +1530,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
...
@@ -1560,8 +1530,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
cpp
->
mess
[
1
]
=
SCpnt
->
device
->
current_tag
++
;
cpp
->
mess
[
1
]
=
SCpnt
->
device
->
current_tag
++
;
}
}
if
(
linked_comm
&&
SCpnt
->
device
->
queue_depth
>
2
if
(
SCpnt
->
device
->
queue_depth
>
2
&&
!
SCpnt
->
device
->
simple_tags
)
{
&&
TLDEV
(
SCpnt
->
device
->
type
))
{
HD
(
j
)
->
cp_stat
[
i
]
=
READY
;
HD
(
j
)
->
cp_stat
[
i
]
=
READY
;
flush_dev
(
SCpnt
->
device
,
SCpnt
->
request
->
sector
,
j
,
FALSE
);
flush_dev
(
SCpnt
->
device
,
SCpnt
->
request
->
sector
,
j
,
FALSE
);
return
0
;
return
0
;
...
...
drivers/scsi/eata.h
View file @
a0a05dcb
...
@@ -12,6 +12,7 @@ int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
...
@@ -12,6 +12,7 @@ int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int
eata2x_abort
(
Scsi_Cmnd
*
);
int
eata2x_abort
(
Scsi_Cmnd
*
);
int
eata2x_reset
(
Scsi_Cmnd
*
);
int
eata2x_reset
(
Scsi_Cmnd
*
);
int
eata2x_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
int
eata2x_biosparam
(
Disk
*
,
struct
block_device
*
,
int
*
);
static
int
eata2x_slave_attach
(
Scsi_Device
*
);
#define EATA_VERSION "7.22.00"
#define EATA_VERSION "7.22.00"
...
@@ -27,6 +28,7 @@ int eata2x_biosparam(Disk *, struct block_device *, int *);
...
@@ -27,6 +28,7 @@ int eata2x_biosparam(Disk *, struct block_device *, int *);
eh_bus_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: eata2x_reset, \
eh_host_reset_handler: eata2x_reset, \
bios_param: eata2x_biosparam, \
bios_param: eata2x_biosparam, \
slave_attach: eata2x_slave_attach, \
this_id: 7, \
this_id: 7, \
unchecked_isa_dma: 1, \
unchecked_isa_dma: 1, \
use_clustering: ENABLE_CLUSTERING, \
use_clustering: ENABLE_CLUSTERING, \
...
...
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