]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi.c
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / drivers / scsi / scsi.c
index 1ad0c36375b8043646bf9bf4078acad9b2c96619..9b3829931f40d95c2cdd4e673c33a56b510edc9b 100644 (file)
@@ -739,33 +739,11 @@ int scsi_track_queue_full(struct scsi_device *sdev, int depth)
 
        if (sdev->last_queue_full_count <= 10)
                return 0;
-       if (sdev->last_queue_full_depth < 8) {
-               /* Drop back to untagged */
-               scsi_set_tag_type(sdev, 0);
-               scsi_change_queue_depth(sdev, sdev->host->cmd_per_lun);
-               return -1;
-       }
 
        return scsi_change_queue_depth(sdev, depth);
 }
 EXPORT_SYMBOL(scsi_track_queue_full);
 
-/**
- * scsi_change_queue_type() - Change a device's queue type
- * @sdev:     The SCSI device whose queue depth is to change
- * @tag_type: Identifier for queue type
- */
-int scsi_change_queue_type(struct scsi_device *sdev, int tag_type)
-{
-       if (!sdev->tagged_supported)
-               return 0;
-
-       scsi_set_tag_type(sdev, tag_type);
-       return tag_type;
-
-}
-EXPORT_SYMBOL(scsi_change_queue_type);
-
 /**
  * scsi_vpd_inquiry - Request a device provide us with a VPD page
  * @sdev: The device to ask
@@ -1008,9 +986,9 @@ int scsi_device_get(struct scsi_device *sdev)
                return -ENXIO;
        if (!get_device(&sdev->sdev_gendev))
                return -ENXIO;
-       /* We can fail this if we're doing SCSI operations
+       /* We can fail try_module_get if we're doing SCSI operations
         * from module exit (like cache flush) */
-       try_module_get(sdev->host->hostt->module);
+       __module_get(sdev->host->hostt->module);
 
        return 0;
 }
@@ -1026,14 +1004,7 @@ EXPORT_SYMBOL(scsi_device_get);
  */
 void scsi_device_put(struct scsi_device *sdev)
 {
-#ifdef CONFIG_MODULE_UNLOAD
-       struct module *module = sdev->host->hostt->module;
-
-       /* The module refcount will be zero if scsi_device_get()
-        * was called from a module removal routine */
-       if (module && module_refcount(module) != 0)
-               module_put(module);
-#endif
+       module_put(sdev->host->hostt->module);
        put_device(&sdev->sdev_gendev);
 }
 EXPORT_SYMBOL(scsi_device_put);