23 #define BACKPACK_VERSION "2.0.2"
25 #include <linux/module.h>
27 #include <linux/kernel.h>
28 #include <linux/slab.h>
29 #include <linux/types.h>
31 #include <linux/parport.h>
40 #define PPCSTRUCT(pi) ((Interface *)(pi->private))
48 #define ATAPI_FEATURES 1
49 #define ATAPI_INT_REASON 2
50 #define ATAPI_COUNT_LOW 4
51 #define ATAPI_COUNT_HIGH 5
52 #define ATAPI_DRIVE_SEL 6
53 #define ATAPI_STATUS 7
54 #define ATAPI_COMMAND 7
55 #define ATAPI_ALT_STATUS 0x0e
56 #define ATAPI_DEVICE_CONTROL 0x0e
59 static int bpck6_read_regr(
PIA *pi,
int cont,
int reg)
68 out=ppc6_rd_port(
PPCSTRUCT(pi),cont?reg|8:reg);
72 static void bpck6_write_regr(
PIA *pi,
int cont,
int reg,
int val)
81 static void bpck6_write_block(
PIA *pi,
char *
buf,
int len )
86 static void bpck6_read_block(
PIA *pi,
char * buf,
int len )
91 static void bpck6_connect (
PIA *pi )
115 static void bpck6_disconnect (
PIA *pi )
125 static int bpck6_test_port (
PIA *pi )
157 static int bpck6_probe_unit (
PIA *pi )
200 char *mode_string[5]=
201 {
"4-bit",
"8-bit",
"EPP-8",
"EPP-16",
"EPP-32"};
204 printk(
"%s: Copyright 2001 by Micro Solutions, Inc., DeKalb IL.\n",pi->
device);
205 printk(
"%s: BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n",
207 printk(
"%s: Unit: %d Mode:%d (%s) Delay %d\n",pi->
device,
211 static int bpck6_init_proto(
PIA *pi)
224 static void bpck6_release_proto(
PIA *pi)
235 .write_regr = bpck6_write_regr,
236 .read_regr = bpck6_read_regr,
237 .write_block = bpck6_write_block,
238 .read_block = bpck6_read_block,
239 .connect = bpck6_connect,
240 .disconnect = bpck6_disconnect,
241 .test_port = bpck6_test_port,
242 .probe_unit = bpck6_probe_unit,
243 .log_adapter = bpck6_log_adapter,
244 .init_proto = bpck6_init_proto,
245 .release_proto = bpck6_release_proto,
248 static int __init bpck6_init(
void)
251 printk(
KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n");
257 static void __exit bpck6_exit(
void)