git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
scsi
/
ppa.c
diff --git
a/drivers/scsi/ppa.c
b/drivers/scsi/ppa.c
index
6733e22
..
108910f
100644
(file)
--- a/
drivers/scsi/ppa.c
+++ b/
drivers/scsi/ppa.c
@@
-17,6
+17,8
@@
#include <linux/blkdev.h>
#include <linux/parport.h>
#include <linux/workqueue.h>
#include <linux/blkdev.h>
#include <linux/parport.h>
#include <linux/workqueue.h>
+#include <linux/delay.h>
+#include <linux/jiffies.h>
#include <asm/io.h>
#include <scsi/scsi.h>
#include <asm/io.h>
#include <scsi/scsi.h>
@@
-49,7
+51,7
@@
static inline ppa_struct *ppa_dev(struct Scsi_Host *host)
return *(ppa_struct **)&host->hostdata;
}
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)
{
static void got_it(ppa_struct *dev)
{
@@
-725,7
+727,7
@@
static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
retv--;
if (retv) {
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);
printk
("ppa: Parallel port cable is unplugged!!\n");
ppa_fail(dev, DID_BUS_BUSY);
@@
-739,7
+741,7
@@
static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
}
case 2: /* Phase 2 - We are now talking to the scsi bus */
}
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;
}
ppa_fail(dev, DID_NO_CONNECT);
return 0;
}
@@
-891,9
+893,9
@@
static int ppa_reset(struct scsi_cmnd *cmd)
ppa_connect(dev, CONNECT_NORMAL);
ppa_reset_pulse(dev->base);
ppa_connect(dev, CONNECT_NORMAL);
ppa_reset_pulse(dev->base);
-
udelay(1000);
/* device settle delay */
+
mdelay(1);
/* device settle delay */
ppa_disconnect(dev);
ppa_disconnect(dev);
-
udelay(1000);
/* device settle delay */
+
mdelay(1);
/* device settle delay */
return SUCCESS;
}
return SUCCESS;
}
@@
-980,6
+982,12
@@
static int device_check(ppa_struct *dev)
return -ENODEV;
}
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",
static struct scsi_host_template ppa_template = {
.module = THIS_MODULE,
.proc_name = "ppa",
@@
-995,6
+1003,7
@@
static struct scsi_host_template ppa_template = {
.cmd_per_lun = 1,
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
.cmd_per_lun = 1,
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
+ .slave_alloc = ppa_adjust_queue,
};
/***************************************************************************
};
/***************************************************************************