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
27ea13e6
Commit
27ea13e6
authored
Jun 04, 2016
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes
parents
b02b1fbd
6b7e9cde
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_devinfo.c
+1
-0
drivers/scsi/sd.c
drivers/scsi/sd.c
+4
-4
drivers/scsi/sd.h
drivers/scsi/sd.h
+5
-0
No files found.
drivers/scsi/scsi_devinfo.c
View file @
27ea13e6
...
...
@@ -230,6 +230,7 @@ static struct {
{
"PIONEER"
,
"CD-ROM DRM-624X"
,
NULL
,
BLIST_FORCELUN
|
BLIST_SINGLELUN
},
{
"Promise"
,
"VTrak E610f"
,
NULL
,
BLIST_SPARSELUN
|
BLIST_NO_RSOC
},
{
"Promise"
,
""
,
NULL
,
BLIST_SPARSELUN
},
{
"QEMU"
,
"QEMU CD-ROM"
,
NULL
,
BLIST_SKIP_VPD_PAGES
},
{
"QNAP"
,
"iSCSI Storage"
,
NULL
,
BLIST_MAX_1024
},
{
"SYNOLOGY"
,
"iSCSI Storage"
,
NULL
,
BLIST_MAX_1024
},
{
"QUANTUM"
,
"XP34301"
,
"1071"
,
BLIST_NOTQ
},
...
...
drivers/scsi/sd.c
View file @
27ea13e6
...
...
@@ -2867,10 +2867,10 @@ static int sd_revalidate_disk(struct gendisk *disk)
if
(
sdkp
->
opt_xfer_blocks
&&
sdkp
->
opt_xfer_blocks
<=
dev_max
&&
sdkp
->
opt_xfer_blocks
<=
SD_DEF_XFER_BLOCKS
&&
sdkp
->
opt_xfer_blocks
*
sdp
->
sector_size
>=
PAGE_SIZE
)
rw_max
=
q
->
limits
.
io_opt
=
sdkp
->
opt_xfer_blocks
*
sdp
->
sector_size
;
else
logical_to_bytes
(
sdp
,
sdkp
->
opt_xfer_blocks
)
>=
PAGE_SIZE
)
{
q
->
limits
.
io_opt
=
logical_to_bytes
(
sdp
,
sdkp
->
opt_xfer_blocks
);
rw_max
=
logical_to_sectors
(
sdp
,
sdkp
->
opt_xfer_blocks
)
;
}
else
rw_max
=
BLK_DEF_MAX_SECTORS
;
/* Combine with controller limits */
...
...
drivers/scsi/sd.h
View file @
27ea13e6
...
...
@@ -151,6 +151,11 @@ static inline sector_t logical_to_sectors(struct scsi_device *sdev, sector_t blo
return
blocks
<<
(
ilog2
(
sdev
->
sector_size
)
-
9
);
}
static
inline
unsigned
int
logical_to_bytes
(
struct
scsi_device
*
sdev
,
sector_t
blocks
)
{
return
blocks
*
sdev
->
sector_size
;
}
/*
* A DIF-capable target device can be formatted with different
* protection schemes. Currently 0 through 3 are defined:
...
...
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