Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[pandora-kernel.git] / drivers / scsi / ppa.c
index fafcf5d..d58ac5a 100644 (file)
@@ -6,8 +6,6 @@
  * (c) 1995,1996 Grant R. Guenther, grant@torque.net,
  * under the terms of the GNU General Public License.
  * 
- * Current Maintainer: David Campbell (Perth, Western Australia, GMT+0800)
- *                     campbell@torque.net
  */
 
 #include <linux/config.h>
@@ -18,6 +16,7 @@
 #include <linux/parport.h>
 #include <linux/workqueue.h>
 #include <linux/delay.h>
+#include <linux/jiffies.h>
 #include <asm/io.h>
 
 #include <scsi/scsi.h>
@@ -726,7 +725,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
                                retv--;
 
                        if (retv) {
-                               if ((jiffies - dev->jstart) > (1 * HZ)) {
+                               if (time_after(jiffies, dev->jstart + (1 * HZ))) {
                                        printk
                                            ("ppa: Parallel port cable is unplugged!!\n");
                                        ppa_fail(dev, DID_BUS_BUSY);
@@ -740,7 +739,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
                }
 
        case 2:         /* Phase 2 - We are now talking to the scsi bus */
-               if (!ppa_select(dev, cmd->device->id)) {
+               if (!ppa_select(dev, scmd_id(cmd))) {
                        ppa_fail(dev, DID_NO_CONNECT);
                        return 0;
                }
@@ -981,6 +980,12 @@ static int device_check(ppa_struct *dev)
        return -ENODEV;
 }
 
+static int ppa_adjust_queue(struct scsi_device *device)
+{
+       blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH);
+       return 0;
+}
+
 static struct scsi_host_template ppa_template = {
        .module                 = THIS_MODULE,
        .proc_name              = "ppa",
@@ -996,6 +1001,7 @@ static struct scsi_host_template ppa_template = {
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
        .can_queue              = 1,
+       .slave_alloc            = ppa_adjust_queue,
 };
 
 /***************************************************************************