linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / scsi / ppa.c
index 6733e22..05347ee 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/blkdev.h>
 #include <linux/parport.h>
 #include <linux/workqueue.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 
 #include <scsi/scsi.h>
@@ -49,7 +50,7 @@ static inline ppa_struct *ppa_dev(struct Scsi_Host *host)
        return *(ppa_struct **)&host->hostdata;
 }
 
-static spinlock_t arbitration_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(arbitration_lock);
 
 static void got_it(ppa_struct *dev)
 {
@@ -739,7 +740,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;
                }
@@ -891,9 +892,9 @@ static int ppa_reset(struct scsi_cmnd *cmd)
 
        ppa_connect(dev, CONNECT_NORMAL);
        ppa_reset_pulse(dev->base);
-       udelay(1000);           /* device settle delay */
+       mdelay(1);              /* device settle delay */
        ppa_disconnect(dev);
-       udelay(1000);           /* device settle delay */
+       mdelay(1);              /* device settle delay */
        return SUCCESS;
 }