aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 12:00:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 12:00:29 -0500
commitb1bf9368407ae7e89d8a005bb40beb70a41df539 (patch)
tree3815c8aab19c6c186736673c624fef5f3faab716 /drivers/scsi
parent524df55725217b13d5a232fb5badb5846418ea0e (diff)
parent4671a1322052425afa38fcb7980d2fd2bb0fc99b (diff)
Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block: (38 commits) block: don't access jiffies when initialising io_context cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds block: fix for "Consolidate phys_segment and hw_segment limits" cfq-iosched: quantum check tweak blktrace: perform cleanup after setup error blkdev: fix merge_bvec_fn return value checks cfq-iosched: requests "in flight" vs "in driver" clarification cciss: Fix problem with scatter gather elements in the scsi half of the driver cciss: eliminate unnecessary pointer use in cciss scsi code cciss: do not use void pointer for scsi hba data cciss: factor out scatter gather chain block mapping code cciss: fix scatter gather chain block dma direction kludge cciss: simplify scatter gather code cciss: factor out scatter gather chain block allocation and freeing cciss: detect bad alignment of scsi commands at build time cciss: clarify command list padding calculation cfq-iosched: rethink seeky detection for SSDs cfq-iosched: rework seeky detection block: remove padding from io_context on 64bit builds block: Consolidate phys_segment and hw_segment limits ...
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c4
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/scsi/pmcraid.c2
-rw-r--r--drivers/scsi/scsi_lib.c6
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/scsi/sg.c6
-rw-r--r--drivers/scsi/st.c3
7 files changed, 11 insertions, 14 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 87b536a97cb4..732f6d35b4a8 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4195,7 +4195,7 @@ static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt)
4195 if (tgt->service_parms.class3_parms[0] & 0x80000000) 4195 if (tgt->service_parms.class3_parms[0] & 0x80000000)
4196 rport->supported_classes |= FC_COS_CLASS3; 4196 rport->supported_classes |= FC_COS_CLASS3;
4197 if (rport->rqst_q) 4197 if (rport->rqst_q)
4198 blk_queue_max_hw_segments(rport->rqst_q, 1); 4198 blk_queue_max_segments(rport->rqst_q, 1);
4199 } else 4199 } else
4200 tgt_dbg(tgt, "rport add failed\n"); 4200 tgt_dbg(tgt, "rport add failed\n");
4201 spin_unlock_irqrestore(vhost->host->host_lock, flags); 4201 spin_unlock_irqrestore(vhost->host->host_lock, flags);
@@ -4669,7 +4669,7 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
4669 } 4669 }
4670 4670
4671 if (shost_to_fc_host(shost)->rqst_q) 4671 if (shost_to_fc_host(shost)->rqst_q)
4672 blk_queue_max_hw_segments(shost_to_fc_host(shost)->rqst_q, 1); 4672 blk_queue_max_segments(shost_to_fc_host(shost)->rqst_q, 1);
4673 dev_set_drvdata(dev, vhost); 4673 dev_set_drvdata(dev, vhost);
4674 spin_lock(&ibmvfc_driver_lock); 4674 spin_lock(&ibmvfc_driver_lock);
4675 list_add_tail(&vhost->queue, &ibmvfc_head); 4675 list_add_tail(&vhost->queue, &ibmvfc_head);
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 9e52d16c7c39..032f0d0e6cb4 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3674,7 +3674,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
3674 if (ipr_is_vset_device(res)) { 3674 if (ipr_is_vset_device(res)) {
3675 blk_queue_rq_timeout(sdev->request_queue, 3675 blk_queue_rq_timeout(sdev->request_queue,
3676 IPR_VSET_RW_TIMEOUT); 3676 IPR_VSET_RW_TIMEOUT);
3677 blk_queue_max_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS); 3677 blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
3678 } 3678 }
3679 if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res)) 3679 if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))
3680 sdev->allow_restart = 1; 3680 sdev->allow_restart = 1;
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index b6f1ef954af1..9b1c1433c26b 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -235,7 +235,7 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev)
235 scsi_dev->allow_restart = 1; 235 scsi_dev->allow_restart = 1;
236 blk_queue_rq_timeout(scsi_dev->request_queue, 236 blk_queue_rq_timeout(scsi_dev->request_queue,
237 PMCRAID_VSET_IO_TIMEOUT); 237 PMCRAID_VSET_IO_TIMEOUT);
238 blk_queue_max_sectors(scsi_dev->request_queue, 238 blk_queue_max_hw_sectors(scsi_dev->request_queue,
239 PMCRAID_VSET_MAX_SECTORS); 239 PMCRAID_VSET_MAX_SECTORS);
240 } 240 }
241 241
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 56977097de9f..1646fe7cbd4b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1630,10 +1630,10 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
1630 /* 1630 /*
1631 * this limit is imposed by hardware restrictions 1631 * this limit is imposed by hardware restrictions
1632 */ 1632 */
1633 blk_queue_max_hw_segments(q, shost->sg_tablesize); 1633 blk_queue_max_segments(q, min_t(unsigned short, shost->sg_tablesize,
1634 blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS); 1634 SCSI_MAX_SG_CHAIN_SEGMENTS));
1635 1635
1636 blk_queue_max_sectors(q, shost->max_sectors); 1636 blk_queue_max_hw_sectors(q, shost->max_sectors);
1637 blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost)); 1637 blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
1638 blk_queue_segment_boundary(q, shost->dma_boundary); 1638 blk_queue_segment_boundary(q, shost->dma_boundary);
1639 dma_set_seg_boundary(dev, shost->dma_boundary); 1639 dma_set_seg_boundary(dev, shost->dma_boundary);
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index f697229ae5a9..4bc8b77a2ef3 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -879,7 +879,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
879 * broken RA4x00 Compaq Disk Array 879 * broken RA4x00 Compaq Disk Array
880 */ 880 */
881 if (*bflags & BLIST_MAX_512) 881 if (*bflags & BLIST_MAX_512)
882 blk_queue_max_sectors(sdev->request_queue, 512); 882 blk_queue_max_hw_sectors(sdev->request_queue, 512);
883 883
884 /* 884 /*
885 * Some devices may not want to have a start command automatically 885 * Some devices may not want to have a start command automatically
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
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index d04ea9a6f673..f67d1a159aad 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3983,8 +3983,7 @@ static int st_probe(struct device *dev)
3983 return -ENODEV; 3983 return -ENODEV;
3984 } 3984 }
3985 3985
3986 i = min(queue_max_hw_segments(SDp->request_queue), 3986 i = queue_max_segments(SDp->request_queue);
3987 queue_max_phys_segments(SDp->request_queue));
3988 if (st_max_sg_segs < i) 3987 if (st_max_sg_segs < i)
3989 i = st_max_sg_segs; 3988 i = st_max_sg_segs;
3990 buffer = new_tape_buffer((SDp->host)->unchecked_isa_dma, i); 3989 buffer = new_tape_buffer((SDp->host)->unchecked_isa_dma, i);