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
bab90162
Commit
bab90162
authored
Oct 17, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI sd] make cache probe sensitive to unsupported mode page
parent
5a7728c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
drivers/scsi/sd.c
drivers/scsi/sd.c
+23
-14
No files found.
drivers/scsi/sd.c
View file @
bab90162
...
...
@@ -924,20 +924,29 @@ sd_read_cache_type(Scsi_Disk *sdkp, char *diskname,
}
while
(
the_result
&&
retries
);
if
(
the_result
)
{
printk
(
KERN_ERR
"%s : MODE SENSE failed.
\n
"
"%s : status = %x, message = %02x, host = %d, driver = %02x
\n
"
,
diskname
,
diskname
,
status_byte
(
the_result
),
msg_byte
(
the_result
),
host_byte
(
the_result
),
driver_byte
(
the_result
)
);
if
(
driver_byte
(
the_result
)
&
DRIVER_SENSE
)
print_req_sense
(
"sd"
,
SRpnt
);
else
printk
(
KERN_ERR
"%s : sense not available.
\n
"
,
diskname
);
printk
(
KERN_ERR
"%s : assuming drive cache: write through
\n
"
,
diskname
);
if
(
status_byte
(
the_result
)
==
CHECK_CONDITION
&&
(
SRpnt
->
sr_sense_buffer
[
0
]
&
0x70
)
==
0x70
&&
(
SRpnt
->
sr_sense_buffer
[
2
]
&
0x0f
)
==
ILLEGAL_REQUEST
/* The next are ASC 0x24 ASCQ 0x00: Invalid field in CDB */
&&
SRpnt
->
sr_sense_buffer
[
12
]
==
0x24
&&
SRpnt
->
sr_sense_buffer
[
13
]
==
0x00
)
{
printk
(
KERN_NOTICE
"SCSI device %s: cache data unavailable
\n
"
);
}
else
{
printk
(
KERN_ERR
"%s : MODE SENSE failed.
\n
"
"%s : status = %x, message = %02x, host = %d, driver = %02x
\n
"
,
diskname
,
diskname
,
status_byte
(
the_result
),
msg_byte
(
the_result
),
host_byte
(
the_result
),
driver_byte
(
the_result
)
);
if
(
driver_byte
(
the_result
)
&
DRIVER_SENSE
)
print_req_sense
(
"sd"
,
SRpnt
);
else
printk
(
KERN_ERR
"%s : sense not available.
\n
"
,
diskname
);
printk
(
KERN_ERR
"%s : assuming drive cache: write through
\n
"
,
diskname
);
}
sdkp
->
WCE
=
0
;
sdkp
->
RCD
=
0
;
}
else
{
...
...
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