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
b579dd43
Commit
b579dd43
authored
Dec 11, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the max_sectors warning afflicting some host adapter drivers
Also merge in missing printk \n's noticed by Robert Love
parent
7984899a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
drivers/scsi/hosts.c
drivers/scsi/hosts.c
+1
-8
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+7
-0
drivers/scsi/scsi.h
drivers/scsi/scsi.h
+8
-0
No files found.
drivers/scsi/hosts.c
View file @
b579dd43
...
...
@@ -485,17 +485,10 @@ int scsi_register_host(Scsi_Host_Template *shost_tp)
BUG_ON
(
!
shost_tp
->
detect
);
if
(
!
shost_tp
->
max_sectors
)
{
printk
(
KERN_WARNING
"scsi HBA driver %s didn't set max_sectors, "
"please fix the template"
,
shost_tp
->
name
);
shost_tp
->
max_sectors
=
1024
;
}
if
(
!
shost_tp
->
release
)
{
printk
(
KERN_WARNING
"scsi HBA driver %s didn't set a release method, "
"please fix the template"
,
shost_tp
->
name
);
"please fix the template
\n
"
,
shost_tp
->
name
);
shost_tp
->
release
=
&
scsi_host_legacy_release
;
}
...
...
drivers/scsi/scsi.c
View file @
b579dd43
...
...
@@ -177,6 +177,13 @@ void scsi_initialize_queue(Scsi_Device * SDpnt, struct Scsi_Host * SHpnt)
*/
blk_queue_max_phys_segments
(
q
,
MAX_PHYS_SEGMENTS
);
if
(
!
SHpnt
->
max_sectors
)
/* driver imposes no hard sector transfer limit.
* start at machine infinity initially */
SHpnt
->
max_sectors
=
SCSI_DEFAULT_MAX_SECTORS
;
/* FIXME: we should also adjust this limit later on
* after we know what the device capabilities are */
blk_queue_max_sectors
(
q
,
SHpnt
->
max_sectors
);
if
(
!
SHpnt
->
use_clustering
)
...
...
drivers/scsi/scsi.h
View file @
b579dd43
...
...
@@ -373,6 +373,14 @@ extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
#define ASKED_FOR_SENSE 0x20
#define SYNC_RESET 0x40
/*
* This specifies "machine infinity" for host templates which don't
* limit the transfer size. Note this limit represents an absolute
* maximum, and may be over the transfer limits allowed for individual
* devices (e.g. 256 for SCSI-1)
*/
#define SCSI_DEFAULT_MAX_SECTORS 1024
/*
* This is the crap from the old error handling code. We have it in a special
* place so that we can more easily delete it later on.
...
...
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