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 core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
scsi
/
imm.c
diff --git
a/drivers/scsi/imm.c
b/drivers/scsi/imm.c
index
fc0f30a
..
0464c18
100644
(file)
--- a/
drivers/scsi/imm.c
+++ b/
drivers/scsi/imm.c
@@
-3,15
+3,11
@@
*
* (The IMM is the embedded controller in the ZIP Plus drive.)
*
*
* (The IMM is the embedded controller in the ZIP Plus drive.)
*
- * Current Maintainer: David Campbell (Perth, Western Australia)
- * campbell@torque.net
- *
* My unoffical company acronym list is 21 pages long:
* FLA: Four letter acronym with built in facility for
* future expansion to five letters.
*/
* My unoffical company acronym list is 21 pages long:
* FLA: Four letter acronym with built in facility for
* future expansion to five letters.
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@
-40,7
+36,7
@@
typedef struct {
int base_hi; /* Hi Base address for ECP-ISA chipset */
int mode; /* Transfer mode */
struct scsi_cmnd *cur_cmd; /* Current queued command */
int base_hi; /* Hi Base address for ECP-ISA chipset */
int mode; /* Transfer mode */
struct scsi_cmnd *cur_cmd; /* Current queued command */
- struct
work_struct imm_tq;
/* Polling interrupt stuff */
+ struct
delayed_work imm_tq;
/* Polling interrupt stuff */
unsigned long jstart; /* Jiffies at start */
unsigned failed:1; /* Failure flag */
unsigned dp:1; /* Data phase present */
unsigned long jstart; /* Jiffies at start */
unsigned failed:1; /* Failure flag */
unsigned dp:1; /* Data phase present */
@@
-737,9
+733,9
@@
static int imm_completion(struct scsi_cmnd *cmd)
* the scheduler's task queue to generate a stream of call-backs and
* complete the request when the drive is ready.
*/
* the scheduler's task queue to generate a stream of call-backs and
* complete the request when the drive is ready.
*/
-static void imm_interrupt(
void *data
)
+static void imm_interrupt(
struct work_struct *work
)
{
{
- imm_struct *dev =
(imm_struct *) data
;
+ imm_struct *dev =
container_of(work, imm_struct, imm_tq.work)
;
struct scsi_cmnd *cmd = dev->cur_cmd;
struct Scsi_Host *host = cmd->device->host;
unsigned long flags;
struct scsi_cmnd *cmd = dev->cur_cmd;
struct Scsi_Host *host = cmd->device->host;
unsigned long flags;
@@
-749,7
+745,6
@@
static void imm_interrupt(void *data)
return;
}
if (imm_engine(dev, cmd)) {
return;
}
if (imm_engine(dev, cmd)) {
- INIT_WORK(&dev->imm_tq, imm_interrupt, (void *) dev);
schedule_delayed_work(&dev->imm_tq, 1);
return;
}
schedule_delayed_work(&dev->imm_tq, 1);
return;
}
@@
-957,8
+952,7
@@
static int imm_queuecommand(struct scsi_cmnd *cmd,
cmd->result = DID_ERROR << 16; /* default return code */
cmd->SCp.phase = 0; /* bus free */
cmd->result = DID_ERROR << 16; /* default return code */
cmd->SCp.phase = 0; /* bus free */
- INIT_WORK(&dev->imm_tq, imm_interrupt, dev);
- schedule_work(&dev->imm_tq);
+ schedule_delayed_work(&dev->imm_tq, 0);
imm_pb_claim(dev);
imm_pb_claim(dev);
@@
-1119,6
+1113,10
@@
static int device_check(imm_struct *dev)
return -ENODEV;
}
return -ENODEV;
}
+/*
+ * imm cannot deal with highmem, so this causes all IO pages for this host
+ * to reside in low memory (hence mapped)
+ */
static int imm_adjust_queue(struct scsi_device *device)
{
blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH);
static int imm_adjust_queue(struct scsi_device *device)
{
blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH);
@@
-1141,10
+1139,6
@@
static struct scsi_host_template imm_template = {
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
.slave_alloc = imm_adjust_queue,
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
.slave_alloc = imm_adjust_queue,
- .unchecked_isa_dma = 1, /* imm cannot deal with highmem, so
- * this is an easy trick to ensure
- * all io pages for this host reside
- * in low memory */
};
/***************************************************************************
};
/***************************************************************************
@@
-1157,7
+1151,7
@@
static int __imm_attach(struct parport *pb)
{
struct Scsi_Host *host;
imm_struct *dev;
{
struct Scsi_Host *host;
imm_struct *dev;
- DECLARE_WAIT_QUEUE_HEAD(waiting);
+ DECLARE_WAIT_QUEUE_HEAD
_ONSTACK
(waiting);
DEFINE_WAIT(wait);
int ports;
int modes, ppb;
DEFINE_WAIT(wait);
int ports;
int modes, ppb;
@@
-1229,7
+1223,7
@@
static int __imm_attach(struct parport *pb)
else
ports = 8;
else
ports = 8;
- INIT_
WORK(&dev->imm_tq, imm_interrupt, dev
);
+ INIT_
DELAYED_WORK(&dev->imm_tq, imm_interrupt
);
err = -ENOMEM;
host = scsi_host_alloc(&imm_template, sizeof(imm_struct *));
err = -ENOMEM;
host = scsi_host_alloc(&imm_template, sizeof(imm_struct *));