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
45c20ae5
Commit
45c20ae5
authored
Feb 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI PLUTO/FCAL]: Update for scsi_cmnd changes.
parent
681453cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
drivers/scsi/fcal.c
drivers/scsi/fcal.c
+4
-3
drivers/scsi/pluto.c
drivers/scsi/pluto.c
+9
-7
No files found.
drivers/scsi/fcal.c
View file @
45c20ae5
...
...
@@ -292,11 +292,12 @@ static int fcal_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmn
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
/* FC-PLDA tells us... */
memset
(
addr
,
0
,
8
);
f
=
(
struct
fcal
*
)
SCpnt
->
host
->
hostdata
;
if
(
!
f
->
map
[
SCpnt
->
target
])
return
-
EINVAL
;
f
=
(
struct
fcal
*
)
SCpnt
->
device
->
host
->
hostdata
;
if
(
!
f
->
map
[
SCpnt
->
device
->
id
])
return
-
EINVAL
;
/* Now, determine DID: It will be Native Identifier, so we zero upper
2 bytes of the 3 byte DID, lowest byte will be AL-PA */
fcmd
->
did
=
target2alpa
[
SCpnt
->
target
];
fcmd
->
did
=
target2alpa
[
SCpnt
->
device
->
id
];
FCALD
((
"trying DID %06x
\n
"
,
fcmd
->
did
))
return
0
;
}
...
...
drivers/scsi/pluto.c
View file @
45c20ae5
...
...
@@ -156,12 +156,12 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
pluto
->
fc
=
fc
;
SCpnt
->
host
=
host
;
SCpnt
->
cmnd
[
0
]
=
INQUIRY
;
SCpnt
->
cmnd
[
4
]
=
255
;
/* FC layer requires this, so that SCpnt->device->tagged_supported is initially 0 */
SCpnt
->
device
=
&
dev
;
dev
.
host
=
host
;
SCpnt
->
cmd_len
=
COMMAND_SIZE
(
INQUIRY
);
...
...
@@ -325,16 +325,18 @@ const char *pluto_info(struct Scsi_Host *host)
*/
static
int
pluto_encode_addr
(
Scsi_Cmnd
*
SCpnt
,
u16
*
addr
,
fc_channel
*
fc
,
fcp_cmnd
*
fcmd
)
{
PLND
((
"encode addr %d %d %d
\n
"
,
SCpnt
->
channel
,
SCpnt
->
target
,
SCpnt
->
cmnd
[
1
]
&
0xe0
))
PLND
((
"encode addr %d %d %d
\n
"
,
SCpnt
->
device
->
channel
,
SCpnt
->
device
->
id
,
SCpnt
->
cmnd
[
1
]
&
0xe0
))
/* We don't support LUNs - neither does SSA :) */
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
if
(
!
SCpnt
->
channel
)
{
if
(
SCpnt
->
target
)
return
-
EINVAL
;
if
(
SCpnt
->
cmnd
[
1
]
&
0xe0
)
return
-
EINVAL
;
if
(
!
SCpnt
->
device
->
channel
)
{
if
(
SCpnt
->
device
->
id
)
return
-
EINVAL
;
memset
(
addr
,
0
,
4
*
sizeof
(
u16
));
}
else
{
addr
[
0
]
=
1
;
addr
[
1
]
=
SCpnt
->
channel
-
1
;
addr
[
2
]
=
SCpnt
->
target
;
addr
[
1
]
=
SCpnt
->
device
->
channel
-
1
;
addr
[
2
]
=
SCpnt
->
device
->
id
;
addr
[
3
]
=
0
;
}
/* We're Point-to-Point, so target it to the default DID */
...
...
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