aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:31:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:31:23 -0400
commita75ee6ecd411a50bf4da927c2fdb2cb56246a2bd (patch)
treefcb06e1940152b115901fda68e7eea1cc1196ff3 /drivers/scsi/sd.c
parentc9651e70ad0aa499814817cbf3cc1d0b806ed3a1 (diff)
parent699316948628dab9e813c415640fe5b9f65cd5e3 (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Pull SCSI updates from James Bottomley: "This is primarily another round of driver updates (lpfc, bfa, fcoe, ipr) plus a new ufshcd driver. There shouldn't be anything controversial in here (The final deletion of scsi proc_ops which caused some build breakage has been held over until the next merge window to give us more time to stabilise it). I'm afraid, with me moving continents at exactly the wrong time, anything submitted after the merge window opened has been held over to the next merge window." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (63 commits) [SCSI] ipr: Driver version 2.5.3 [SCSI] ipr: Increase alignment boundary of command blocks [SCSI] ipr: Increase max concurrent oustanding commands [SCSI] ipr: Remove unnecessary memory barriers [SCSI] ipr: Remove unnecessary interrupt clearing on new adapters [SCSI] ipr: Fix target id allocation re-use problem [SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up [SCSI] bfa: Update the driver version to 3.0.23.0 [SCSI] bfa: BSG and User interface fixes. [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario. [SCSI] bfa: Move service parameter programming logic into firmware. [SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation. [SCSI] bfa: Flash controller IOC pll init fixes. [SCSI] bfa: Serialize the IOC hw semaphore unlock logic. [SCSI] bfa: Modify ISR to process pending completions [SCSI] bfa: Add fc host issue lip support [SCSI] mpt2sas: remove extraneous sas_log_info messages [SCSI] libfc: fcoe_transport_create fails in single-CPU environment [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2] ...
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 09e3df42a402..5ba5c2a9e8e9 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -664,7 +664,7 @@ static void sd_unprep_fn(struct request_queue *q, struct request *rq)
664} 664}
665 665
666/** 666/**
667 * sd_init_command - build a scsi (read or write) command from 667 * sd_prep_fn - build a scsi (read or write) command from
668 * information in the request structure. 668 * information in the request structure.
669 * @SCpnt: pointer to mid-level's per scsi command structure that 669 * @SCpnt: pointer to mid-level's per scsi command structure that
670 * contains request and into which the scsi command is written 670 * contains request and into which the scsi command is written
@@ -711,7 +711,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
711 ret = BLKPREP_KILL; 711 ret = BLKPREP_KILL;
712 712
713 SCSI_LOG_HLQUEUE(1, scmd_printk(KERN_INFO, SCpnt, 713 SCSI_LOG_HLQUEUE(1, scmd_printk(KERN_INFO, SCpnt,
714 "sd_init_command: block=%llu, " 714 "sd_prep_fn: block=%llu, "
715 "count=%d\n", 715 "count=%d\n",
716 (unsigned long long)block, 716 (unsigned long long)block,
717 this_count)); 717 this_count));
@@ -1212,9 +1212,14 @@ static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing)
1212 retval = -ENODEV; 1212 retval = -ENODEV;
1213 1213
1214 if (scsi_block_when_processing_errors(sdp)) { 1214 if (scsi_block_when_processing_errors(sdp)) {
1215 retval = scsi_autopm_get_device(sdp);
1216 if (retval)
1217 goto out;
1218
1215 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); 1219 sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL);
1216 retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, 1220 retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES,
1217 sshdr); 1221 sshdr);
1222 scsi_autopm_put_device(sdp);
1218 } 1223 }
1219 1224
1220 /* failed to execute TUR, assume media not present */ 1225 /* failed to execute TUR, assume media not present */
@@ -2644,8 +2649,8 @@ static void sd_probe_async(void *data, async_cookie_t cookie)
2644 * (e.g. /dev/sda). More precisely it is the block device major 2649 * (e.g. /dev/sda). More precisely it is the block device major
2645 * and minor number that is chosen here. 2650 * and minor number that is chosen here.
2646 * 2651 *
2647 * Assume sd_attach is not re-entrant (for time being) 2652 * Assume sd_probe is not re-entrant (for time being)
2648 * Also think about sd_attach() and sd_remove() running coincidentally. 2653 * Also think about sd_probe() and sd_remove() running coincidentally.
2649 **/ 2654 **/
2650static int sd_probe(struct device *dev) 2655static int sd_probe(struct device *dev)
2651{ 2656{
@@ -2660,7 +2665,7 @@ static int sd_probe(struct device *dev)
2660 goto out; 2665 goto out;
2661 2666
2662 SCSI_LOG_HLQUEUE(3, sdev_printk(KERN_INFO, sdp, 2667 SCSI_LOG_HLQUEUE(3, sdev_printk(KERN_INFO, sdp,
2663 "sd_attach\n")); 2668 "sd_probe\n"));
2664 2669
2665 error = -ENOMEM; 2670 error = -ENOMEM;
2666 sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL); 2671 sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL);