diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-02-26 00:20:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-26 07:58:08 -0500 |
commit | 8a78362c4eefc1deddbefe2c7f38aabbc2429d6b (patch) | |
tree | c095d95af1aec0f9cee5975b1dcdc6bc1d17d401 /drivers/scsi/sg.c | |
parent | 086fa5ff0854c676ec333760f4c0154b3b242616 (diff) |
block: Consolidate phys_segment and hw_segment limits
Except for SCSI no device drivers distinguish between physical and
hardware segment limits. Consolidate the two into a single segment
limit.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 040f751809ea..c996d98636f3 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -287,8 +287,7 @@ sg_open(struct inode *inode, struct file *filp) | |||
287 | if (list_empty(&sdp->sfds)) { /* no existing opens on this device */ | 287 | if (list_empty(&sdp->sfds)) { /* no existing opens on this device */ |
288 | sdp->sgdebug = 0; | 288 | sdp->sgdebug = 0; |
289 | q = sdp->device->request_queue; | 289 | q = sdp->device->request_queue; |
290 | sdp->sg_tablesize = min(queue_max_hw_segments(q), | 290 | sdp->sg_tablesize = queue_max_segments(q); |
291 | queue_max_phys_segments(q)); | ||
292 | } | 291 | } |
293 | if ((sfp = sg_add_sfp(sdp, dev))) | 292 | if ((sfp = sg_add_sfp(sdp, dev))) |
294 | filp->private_data = sfp; | 293 | filp->private_data = sfp; |
@@ -1376,8 +1375,7 @@ static Sg_device *sg_alloc(struct gendisk *disk, struct scsi_device *scsidp) | |||
1376 | sdp->device = scsidp; | 1375 | sdp->device = scsidp; |
1377 | INIT_LIST_HEAD(&sdp->sfds); | 1376 | INIT_LIST_HEAD(&sdp->sfds); |
1378 | init_waitqueue_head(&sdp->o_excl_wait); | 1377 | init_waitqueue_head(&sdp->o_excl_wait); |
1379 | sdp->sg_tablesize = min(queue_max_hw_segments(q), | 1378 | sdp->sg_tablesize = queue_max_segments(q); |
1380 | queue_max_phys_segments(q)); | ||
1381 | sdp->index = k; | 1379 | sdp->index = k; |
1382 | kref_init(&sdp->d_ref); | 1380 | kref_init(&sdp->d_ref); |
1383 | 1381 | ||