X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fimm.c;h=915d593fbf21b2760981fb04b67ed1689a74e880;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=0a3f553f3d8179f5a5e3d632d2b673990c8ed3f4;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 0a3f553f3..915d593fb 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -12,6 +12,18 @@ */ #include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include /* The following #define is to avoid a clash with hosts.c */ #define IMM_PROBE_SPP 0x0001 @@ -20,22 +32,13 @@ #define IMM_PROBE_EPP17 0x0100 #define IMM_PROBE_EPP19 0x0200 -#include -#include -#include -#include -#include -#include -#include -#include "scsi.h" -#include "hosts.h" typedef struct { struct pardevice *dev; /* Parport device entry */ int base; /* Actual port address */ int base_hi; /* Hi Base address for ECP-ISA chipset */ int mode; /* Transfer mode */ - Scsi_Cmnd *cur_cmd; /* Current queued command */ + struct scsi_cmnd *cur_cmd; /* Current queued command */ struct work_struct imm_tq; /* Polling interrupt stuff */ unsigned long jstart; /* Jiffies at start */ unsigned failed:1; /* Failure flag */ @@ -613,7 +616,7 @@ static int imm_init(imm_struct *dev) return device_check(dev); } -static inline int imm_send_command(Scsi_Cmnd *cmd) +static inline int imm_send_command(struct scsi_cmnd *cmd) { imm_struct *dev = imm_dev(cmd->device->host); int k; @@ -633,7 +636,7 @@ static inline int imm_send_command(Scsi_Cmnd *cmd) * The driver appears to remain stable if we speed up the parallel port * i/o in this function, but not elsewhere. */ -static int imm_completion(Scsi_Cmnd *cmd) +static int imm_completion(struct scsi_cmnd *cmd) { /* Return codes: * -1 Error @@ -736,7 +739,7 @@ static int imm_completion(Scsi_Cmnd *cmd) static void imm_interrupt(void *data) { imm_struct *dev = (imm_struct *) data; - Scsi_Cmnd *cmd = dev->cur_cmd; + struct scsi_cmnd *cmd = dev->cur_cmd; struct Scsi_Host *host = cmd->device->host; unsigned long flags; @@ -790,13 +793,13 @@ static void imm_interrupt(void *data) imm_pb_dismiss(dev); spin_lock_irqsave(host->host_lock, flags); - dev->cur_cmd = 0; + dev->cur_cmd = NULL; cmd->scsi_done(cmd); spin_unlock_irqrestore(host->host_lock, flags); return; } -static int imm_engine(imm_struct *dev, Scsi_Cmnd *cmd) +static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd) { unsigned short ppb = dev->base; unsigned char l = 0, h = 0; @@ -937,7 +940,8 @@ static int imm_engine(imm_struct *dev, Scsi_Cmnd *cmd) return 0; } -static int imm_queuecommand(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) +static int imm_queuecommand(struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *)) { imm_struct *dev = imm_dev(cmd->device->host); @@ -980,7 +984,7 @@ static int imm_biosparam(struct scsi_device *sdev, struct block_device *dev, return 0; } -static int imm_abort(Scsi_Cmnd *cmd) +static int imm_abort(struct scsi_cmnd *cmd) { imm_struct *dev = imm_dev(cmd->device->host); /* @@ -1012,7 +1016,7 @@ static void imm_reset_pulse(unsigned int base) w_ctr(base, 0x04); } -static int imm_reset(Scsi_Cmnd *cmd) +static int imm_reset(struct scsi_cmnd *cmd) { imm_struct *dev = imm_dev(cmd->device->host); @@ -1114,7 +1118,13 @@ static int device_check(imm_struct *dev) return -ENODEV; } -static Scsi_Host_Template imm_template = { +static int imm_adjust_queue(struct scsi_device *device) +{ + blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); + return 0; +} + +static struct scsi_host_template imm_template = { .module = THIS_MODULE, .proc_name = "imm", .proc_info = imm_proc_info, @@ -1129,6 +1139,7 @@ static Scsi_Host_Template imm_template = { .cmd_per_lun = 1, .use_clustering = ENABLE_CLUSTERING, .can_queue = 1, + .slave_alloc = imm_adjust_queue, }; /***************************************************************************