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
e15e8226
Commit
e15e8226
authored
Aug 21, 2004
by
James Bottomley
Committed by
James Bottomley
Aug 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessor functons for scsi_device 56 byte inquiry data
Signed-off-by:
James Bottomley
<
James.Bottomley@SteelEye.com
>
parent
7dde47cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
include/scsi/scsi_device.h
include/scsi/scsi_device.h
+32
-0
No files found.
include/scsi/scsi_device.h
View file @
e15e8226
...
...
@@ -192,4 +192,36 @@ static inline int scsi_device_online(struct scsi_device *sdev)
{
return
sdev
->
sdev_state
!=
SDEV_OFFLINE
;
}
/* accessor functions for the SCSI parameters */
static
inline
int
scsi_device_sync
(
struct
scsi_device
*
sdev
)
{
return
sdev
->
sdtr
;
}
static
inline
int
scsi_device_wide
(
struct
scsi_device
*
sdev
)
{
return
sdev
->
wdtr
;
}
static
inline
int
scsi_device_dt
(
struct
scsi_device
*
sdev
)
{
return
sdev
->
ppr
;
}
static
inline
int
scsi_device_dt_only
(
struct
scsi_device
*
sdev
)
{
if
(
sdev
->
inquiry_len
<
57
)
return
0
;
return
(
sdev
->
inquiry
[
56
]
&
0x0c
)
==
0x04
;
}
static
inline
int
scsi_device_ius
(
struct
scsi_device
*
sdev
)
{
if
(
sdev
->
inquiry_len
<
57
)
return
0
;
return
sdev
->
inquiry
[
56
]
&
0x01
;
}
static
inline
int
scsi_device_qas
(
struct
scsi_device
*
sdev
)
{
if
(
sdev
->
inquiry_len
<
57
)
return
0
;
return
sdev
->
inquiry
[
56
]
&
0x02
;
}
#endif
/* _SCSI_SCSI_DEVICE_H */
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