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
fd35598a
Commit
fd35598a
authored
Feb 21, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IEEE1394/SBP2(r1148): Fix a few bugs, and add set blk_queue_dma_alignment to 512.
parent
351d7dda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+19
-9
No files found.
drivers/ieee1394/sbp2.c
View file @
fd35598a
...
@@ -660,7 +660,7 @@ static int sbp2_update(struct unit_directory *ud)
...
@@ -660,7 +660,7 @@ static int sbp2_update(struct unit_directory *ud)
if
(
sbp2_login_device
(
scsi_id
))
{
if
(
sbp2_login_device
(
scsi_id
))
{
/* Login failed too, just fail, and the backend
/* Login failed too, just fail, and the backend
* will call our sbp2_remove for us */
* will call our sbp2_remove for us */
SBP2_
ERR
(
"sbp2_reconnect_device failed!"
);
SBP2_
INFO
(
"sbp2_reconnect_device failed!"
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
}
}
...
@@ -731,7 +731,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
...
@@ -731,7 +731,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
#ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
#ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
/* Handle data movement if physical dma is not
/* Handle data movement if physical dma is not
* enabled/supportedon host controller */
* enabled/supportedon host controller */
hpsb_register_addrspace
(
&
sbp2_highlevel
,
host
,
&
sbp2_physdma_ops
,
hpsb_register_addrspace
(
&
sbp2_highlevel
,
ud
->
ne
->
host
,
&
sbp2_physdma_ops
,
0x0ULL
,
0xfffffffcULL
);
0x0ULL
,
0xfffffffcULL
);
#endif
#endif
}
}
...
@@ -1149,12 +1149,12 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
...
@@ -1149,12 +1149,12 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
SBP2_DEBUG
(
"sbp2_query_logins: written"
);
SBP2_DEBUG
(
"sbp2_query_logins: written"
);
if
(
sbp2util_down_timeout
(
&
scsi_id
->
sbp2_login_complete
,
2
*
HZ
))
{
if
(
sbp2util_down_timeout
(
&
scsi_id
->
sbp2_login_complete
,
2
*
HZ
))
{
SBP2_
ERR
(
"Error querying logins to SBP-2 device - timed out"
);
SBP2_
INFO
(
"Error querying logins to SBP-2 device - timed out"
);
return
(
-
EIO
);
return
(
-
EIO
);
}
}
if
(
scsi_id
->
status_block
.
ORB_offset_lo
!=
scsi_id
->
query_logins_orb_dma
)
{
if
(
scsi_id
->
status_block
.
ORB_offset_lo
!=
scsi_id
->
query_logins_orb_dma
)
{
SBP2_
ERR
(
"Error querying logins to SBP-2 device - timed out"
);
SBP2_
INFO
(
"Error querying logins to SBP-2 device - timed out"
);
return
(
-
EIO
);
return
(
-
EIO
);
}
}
...
@@ -1162,7 +1162,7 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
...
@@ -1162,7 +1162,7 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
STATUS_GET_DEAD_BIT
(
scsi_id
->
status_block
.
ORB_offset_hi_misc
)
||
STATUS_GET_DEAD_BIT
(
scsi_id
->
status_block
.
ORB_offset_hi_misc
)
||
STATUS_GET_SBP_STATUS
(
scsi_id
->
status_block
.
ORB_offset_hi_misc
))
{
STATUS_GET_SBP_STATUS
(
scsi_id
->
status_block
.
ORB_offset_hi_misc
))
{
SBP2_
ERR
(
"Error querying logins to SBP-2 device - timed out"
);
SBP2_
INFO
(
"Error querying logins to SBP-2 device - timed out"
);
return
(
-
EIO
);
return
(
-
EIO
);
}
}
...
@@ -1171,13 +1171,13 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
...
@@ -1171,13 +1171,13 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id)
SBP2_DEBUG
(
"length_max_logins = %x"
,
SBP2_DEBUG
(
"length_max_logins = %x"
,
(
unsigned
int
)
scsi_id
->
query_logins_response
->
length_max_logins
);
(
unsigned
int
)
scsi_id
->
query_logins_response
->
length_max_logins
);
SBP2_
INFO
(
"Query logins to SBP-2 device successful"
);
SBP2_
DEBUG
(
"Query logins to SBP-2 device successful"
);
max_logins
=
RESPONSE_GET_MAX_LOGINS
(
scsi_id
->
query_logins_response
->
length_max_logins
);
max_logins
=
RESPONSE_GET_MAX_LOGINS
(
scsi_id
->
query_logins_response
->
length_max_logins
);
SBP2_
INFO
(
"Maximum concurrent logins supported: %d"
,
max_logins
);
SBP2_
DEBUG
(
"Maximum concurrent logins supported: %d"
,
max_logins
);
active_logins
=
RESPONSE_GET_ACTIVE_LOGINS
(
scsi_id
->
query_logins_response
->
length_max_logins
);
active_logins
=
RESPONSE_GET_ACTIVE_LOGINS
(
scsi_id
->
query_logins_response
->
length_max_logins
);
SBP2_
INFO
(
"Number of active logins: %d"
,
active_logins
);
SBP2_
DEBUG
(
"Number of active logins: %d"
,
active_logins
);
if
(
active_logins
>=
max_logins
)
{
if
(
active_logins
>=
max_logins
)
{
return
(
-
EIO
);
return
(
-
EIO
);
...
@@ -1204,7 +1204,7 @@ static int sbp2_login_device(struct scsi_id_instance_data *scsi_id)
...
@@ -1204,7 +1204,7 @@ static int sbp2_login_device(struct scsi_id_instance_data *scsi_id)
if
(
!
exclusive_login
)
{
if
(
!
exclusive_login
)
{
if
(
sbp2_query_logins
(
scsi_id
))
{
if
(
sbp2_query_logins
(
scsi_id
))
{
SBP2_
ERR
(
"Device does not support any more concurrent logins"
);
SBP2_
INFO
(
"Device does not support any more concurrent logins"
);
return
(
-
EIO
);
return
(
-
EIO
);
}
}
}
}
...
@@ -2687,6 +2687,15 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
...
@@ -2687,6 +2687,15 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
return
;
return
;
}
}
static
int
sbp2scsi_slave_configure
(
struct
scsi_device
*
sdev
)
{
blk_queue_dma_alignment
(
sdev
->
request_queue
,
(
512
-
1
));
return
0
;
}
/*
/*
* Called by scsi stack when something has really gone wrong. Usually
* Called by scsi stack when something has really gone wrong. Usually
* called when a command has timed-out for some reason.
* called when a command has timed-out for some reason.
...
@@ -2802,6 +2811,7 @@ static Scsi_Host_Template scsi_driver_template = {
...
@@ -2802,6 +2811,7 @@ static Scsi_Host_Template scsi_driver_template = {
.
eh_device_reset_handler
=
sbp2scsi_reset
,
.
eh_device_reset_handler
=
sbp2scsi_reset
,
.
eh_bus_reset_handler
=
sbp2scsi_reset
,
.
eh_bus_reset_handler
=
sbp2scsi_reset
,
.
eh_host_reset_handler
=
sbp2scsi_reset
,
.
eh_host_reset_handler
=
sbp2scsi_reset
,
.
slave_configure
=
sbp2scsi_slave_configure
,
.
this_id
=
-
1
,
.
this_id
=
-
1
,
.
sg_tablesize
=
SG_ALL
,
.
sg_tablesize
=
SG_ALL
,
.
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