imm.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | imm.c (68b3aa7c9805aee9005a8ca53c5e99177961fbb9) |
---|---|
1/* imm.c -- low level driver for the IOMEGA MatchMaker 2 * parallel port SCSI host adapter. 3 * 4 * (The IMM is the embedded controller in the ZIP Plus drive.) 5 * 6 * Current Maintainer: David Campbell (Perth, Western Australia) 7 * campbell@torque.net 8 * --- 4 unchanged lines hidden (view full) --- 13 14#include <linux/config.h> 15#include <linux/init.h> 16#include <linux/kernel.h> 17#include <linux/module.h> 18#include <linux/blkdev.h> 19#include <linux/parport.h> 20#include <linux/workqueue.h> | 1/* imm.c -- low level driver for the IOMEGA MatchMaker 2 * parallel port SCSI host adapter. 3 * 4 * (The IMM is the embedded controller in the ZIP Plus drive.) 5 * 6 * Current Maintainer: David Campbell (Perth, Western Australia) 7 * campbell@torque.net 8 * --- 4 unchanged lines hidden (view full) --- 13 14#include <linux/config.h> 15#include <linux/init.h> 16#include <linux/kernel.h> 17#include <linux/module.h> 18#include <linux/blkdev.h> 19#include <linux/parport.h> 20#include <linux/workqueue.h> |
21#include <linux/delay.h> |
|
21#include <asm/io.h> 22 23#include <scsi/scsi.h> 24#include <scsi/scsi_cmnd.h> 25#include <scsi/scsi_device.h> 26#include <scsi/scsi_host.h> 27 28/* The following #define is to avoid a clash with hosts.c */ --- 576 unchanged lines hidden (view full) --- 605 return (k) ? 1 : 0; 606} 607 608static int imm_init(imm_struct *dev) 609{ 610 if (imm_connect(dev, 0) != 1) 611 return -EIO; 612 imm_reset_pulse(dev->base); | 22#include <asm/io.h> 23 24#include <scsi/scsi.h> 25#include <scsi/scsi_cmnd.h> 26#include <scsi/scsi_device.h> 27#include <scsi/scsi_host.h> 28 29/* The following #define is to avoid a clash with hosts.c */ --- 576 unchanged lines hidden (view full) --- 606 return (k) ? 1 : 0; 607} 608 609static int imm_init(imm_struct *dev) 610{ 611 if (imm_connect(dev, 0) != 1) 612 return -EIO; 613 imm_reset_pulse(dev->base); |
613 udelay(1000); /* Delay to allow devices to settle */ | 614 mdelay(1); /* Delay to allow devices to settle */ |
614 imm_disconnect(dev); | 615 imm_disconnect(dev); |
615 udelay(1000); /* Another delay to allow devices to settle */ | 616 mdelay(1); /* Another delay to allow devices to settle */ |
616 return device_check(dev); 617} 618 619static inline int imm_send_command(struct scsi_cmnd *cmd) 620{ 621 imm_struct *dev = imm_dev(cmd->device->host); 622 int k; 623 --- 397 unchanged lines hidden (view full) --- 1021 imm_struct *dev = imm_dev(cmd->device->host); 1022 1023 if (cmd->SCp.phase) 1024 imm_disconnect(dev); 1025 dev->cur_cmd = NULL; /* Forget the problem */ 1026 1027 imm_connect(dev, CONNECT_NORMAL); 1028 imm_reset_pulse(dev->base); | 617 return device_check(dev); 618} 619 620static inline int imm_send_command(struct scsi_cmnd *cmd) 621{ 622 imm_struct *dev = imm_dev(cmd->device->host); 623 int k; 624 --- 397 unchanged lines hidden (view full) --- 1022 imm_struct *dev = imm_dev(cmd->device->host); 1023 1024 if (cmd->SCp.phase) 1025 imm_disconnect(dev); 1026 dev->cur_cmd = NULL; /* Forget the problem */ 1027 1028 imm_connect(dev, CONNECT_NORMAL); 1029 imm_reset_pulse(dev->base); |
1029 udelay(1000); /* device settle delay */ | 1030 mdelay(1); /* device settle delay */ |
1030 imm_disconnect(dev); | 1031 imm_disconnect(dev); |
1031 udelay(1000); /* device settle delay */ | 1032 mdelay(1); /* device settle delay */ |
1032 return SUCCESS; 1033} 1034 1035static int device_check(imm_struct *dev) 1036{ 1037 /* This routine looks for a device and then attempts to use EPP 1038 to send a command. If all goes as planned then EPP is available. */ 1039 --- 261 unchanged lines hidden --- | 1033 return SUCCESS; 1034} 1035 1036static int device_check(imm_struct *dev) 1037{ 1038 /* This routine looks for a device and then attempts to use EPP 1039 to send a command. If all goes as planned then EPP is available. */ 1040 --- 261 unchanged lines hidden --- |