pas16.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. #define AUTOSENSE
  2. #define PSEUDO_DMA
  3. #define FOO
  4. #define UNSAFE /* Not unsafe for PAS16 -- use it */
  5. #define PDEBUG 0
  6. /*
  7. * This driver adapted from Drew Eckhardt's Trantor T128 driver
  8. *
  9. * Copyright 1993, Drew Eckhardt
  10. * Visionary Computing
  11. * (Unix and Linux consulting and custom programming)
  12. * drew@colorado.edu
  13. * +1 (303) 666-5836
  14. *
  15. * ( Based on T128 - DISTRIBUTION RELEASE 3. )
  16. *
  17. * Modified to work with the Pro Audio Spectrum/Studio 16
  18. * by John Weidman.
  19. *
  20. *
  21. * For more information, please consult
  22. *
  23. * Media Vision
  24. * (510) 770-8600
  25. * (800) 348-7116
  26. *
  27. * and
  28. *
  29. * NCR 5380 Family
  30. * SCSI Protocol Controller
  31. * Databook
  32. *
  33. * NCR Microelectronics
  34. * 1635 Aeroplaza Drive
  35. * Colorado Springs, CO 80916
  36. * 1+ (719) 578-3400
  37. * 1+ (800) 334-5454
  38. */
  39. /*
  40. * Options :
  41. * AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  42. * for commands that return with a CHECK CONDITION status.
  43. *
  44. * LIMIT_TRANSFERSIZE - if defined, limit the pseudo-dma transfers to 512
  45. * bytes at a time. Since interrupts are disabled by default during
  46. * these transfers, we might need this to give reasonable interrupt
  47. * service time if the transfer size gets too large.
  48. *
  49. * PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
  50. * increase compared to polled I/O.
  51. *
  52. * PARITY - enable parity checking. Not supported.
  53. *
  54. * SCSI2 - enable support for SCSI-II tagged queueing. Untested.
  55. *
  56. * UNSAFE - leave interrupts enabled during pseudo-DMA transfers. This
  57. * parameter comes from the NCR5380 code. It is NOT unsafe with
  58. * the PAS16 and you should use it. If you don't you will have
  59. * a problem with dropped characters during high speed
  60. * communications during SCSI transfers. If you really don't
  61. * want to use UNSAFE you can try defining LIMIT_TRANSFERSIZE or
  62. * twiddle with the transfer size in the high level code.
  63. *
  64. * USLEEP - enable support for devices that don't disconnect. Untested.
  65. *
  66. * The card is detected and initialized in one of several ways :
  67. * 1. Autoprobe (default) - There are many different models of
  68. * the Pro Audio Spectrum/Studio 16, and I only have one of
  69. * them, so this may require a little tweaking. An interrupt
  70. * is triggered to autoprobe for the interrupt line. Note:
  71. * with the newer model boards, the interrupt is set via
  72. * software after reset using the default_irq for the
  73. * current board number.
  74. *
  75. * 2. With command line overrides - pas16=port,irq may be
  76. * used on the LILO command line to override the defaults.
  77. *
  78. * 3. With the PAS16_OVERRIDE compile time define. This is
  79. * specified as an array of address, irq tuples. Ie, for
  80. * one board at the default 0x388 address, IRQ10, I could say
  81. * -DPAS16_OVERRIDE={{0x388, 10}}
  82. * NOTE: Untested.
  83. *
  84. * 4. When included as a module, with arguments passed on the command line:
  85. * pas16_irq=xx the interrupt
  86. * pas16_addr=xx the port
  87. * e.g. "modprobe pas16 pas16_addr=0x388 pas16_irq=5"
  88. *
  89. * Note that if the override methods are used, place holders must
  90. * be specified for other boards in the system.
  91. *
  92. *
  93. * Configuration notes :
  94. * The current driver does not support interrupt sharing with the
  95. * sound portion of the card. If you use the same irq for the
  96. * scsi port and sound you will have problems. Either use
  97. * a different irq for the scsi port or don't use interrupts
  98. * for the scsi port.
  99. *
  100. * If you have problems with your card not being recognized, use
  101. * the LILO command line override. Try to get it recognized without
  102. * interrupts. Ie, for a board at the default 0x388 base port,
  103. * boot: linux pas16=0x388,255
  104. *
  105. * SCSI_IRQ_NONE (255) should be specified for no interrupt,
  106. * IRQ_AUTO (254) to autoprobe for an IRQ line if overridden
  107. * on the command line.
  108. *
  109. * (IRQ_AUTO == 254, SCSI_IRQ_NONE == 255 in NCR5380.h)
  110. */
  111. #include <linux/module.h>
  112. #include <asm/system.h>
  113. #include <linux/signal.h>
  114. #include <linux/proc_fs.h>
  115. #include <asm/io.h>
  116. #include <asm/dma.h>
  117. #include <linux/blkdev.h>
  118. #include <linux/delay.h>
  119. #include <linux/interrupt.h>
  120. #include <linux/stat.h>
  121. #include <linux/init.h>
  122. #include "scsi.h"
  123. #include <scsi/scsi_host.h>
  124. #include "pas16.h"
  125. #define AUTOPROBE_IRQ
  126. #include "NCR5380.h"
  127. static int pas_maxi = 0;
  128. static int pas_wmaxi = 0;
  129. static unsigned short pas16_addr = 0;
  130. static int pas16_irq = 0;
  131. static const int scsi_irq_translate[] =
  132. { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
  133. /* The default_irqs array contains values used to set the irq into the
  134. * board via software (as must be done on newer model boards without
  135. * irq jumpers on the board). The first value in the array will be
  136. * assigned to logical board 0, the next to board 1, etc.
  137. */
  138. static int default_irqs[] __initdata =
  139. { PAS16_DEFAULT_BOARD_1_IRQ,
  140. PAS16_DEFAULT_BOARD_2_IRQ,
  141. PAS16_DEFAULT_BOARD_3_IRQ,
  142. PAS16_DEFAULT_BOARD_4_IRQ
  143. };
  144. static struct override {
  145. unsigned short io_port;
  146. int irq;
  147. } overrides
  148. #ifdef PAS16_OVERRIDE
  149. [] __initdata = PAS16_OVERRIDE;
  150. #else
  151. [4] __initdata = {{0,IRQ_AUTO}, {0,IRQ_AUTO}, {0,IRQ_AUTO},
  152. {0,IRQ_AUTO}};
  153. #endif
  154. #define NO_OVERRIDES ARRAY_SIZE(overrides)
  155. static struct base {
  156. unsigned short io_port;
  157. int noauto;
  158. } bases[] __initdata =
  159. { {PAS16_DEFAULT_BASE_1, 0},
  160. {PAS16_DEFAULT_BASE_2, 0},
  161. {PAS16_DEFAULT_BASE_3, 0},
  162. {PAS16_DEFAULT_BASE_4, 0}
  163. };
  164. #define NO_BASES ARRAY_SIZE(bases)
  165. static const unsigned short pas16_offset[ 8 ] =
  166. {
  167. 0x1c00, /* OUTPUT_DATA_REG */
  168. 0x1c01, /* INITIATOR_COMMAND_REG */
  169. 0x1c02, /* MODE_REG */
  170. 0x1c03, /* TARGET_COMMAND_REG */
  171. 0x3c00, /* STATUS_REG ro, SELECT_ENABLE_REG wo */
  172. 0x3c01, /* BUS_AND_STATUS_REG ro, START_DMA_SEND_REG wo */
  173. 0x3c02, /* INPUT_DATA_REGISTER ro, (N/A on PAS16 ?)
  174. * START_DMA_TARGET_RECEIVE_REG wo
  175. */
  176. 0x3c03, /* RESET_PARITY_INTERRUPT_REG ro,
  177. * START_DMA_INITIATOR_RECEIVE_REG wo
  178. */
  179. };
  180. /*----------------------------------------------------------------*/
  181. /* the following will set the monitor border color (useful to find
  182. where something crashed or gets stuck at */
  183. /* 1 = blue
  184. 2 = green
  185. 3 = cyan
  186. 4 = red
  187. 5 = magenta
  188. 6 = yellow
  189. 7 = white
  190. */
  191. #if 1
  192. #define rtrc(i) {inb(0x3da); outb(0x31, 0x3c0); outb((i), 0x3c0);}
  193. #else
  194. #define rtrc(i) {}
  195. #endif
  196. /*
  197. * Function : enable_board( int board_num, unsigned short port )
  198. *
  199. * Purpose : set address in new model board
  200. *
  201. * Inputs : board_num - logical board number 0-3, port - base address
  202. *
  203. */
  204. static void __init
  205. enable_board( int board_num, unsigned short port )
  206. {
  207. outb( 0xbc + board_num, MASTER_ADDRESS_PTR );
  208. outb( port >> 2, MASTER_ADDRESS_PTR );
  209. }
  210. /*
  211. * Function : init_board( unsigned short port, int irq )
  212. *
  213. * Purpose : Set the board up to handle the SCSI interface
  214. *
  215. * Inputs : port - base address of the board,
  216. * irq - irq to assign to the SCSI port
  217. * force_irq - set it even if it conflicts with sound driver
  218. *
  219. */
  220. static void __init
  221. init_board( unsigned short io_port, int irq, int force_irq )
  222. {
  223. unsigned int tmp;
  224. unsigned int pas_irq_code;
  225. /* Initialize the SCSI part of the board */
  226. outb( 0x30, io_port + P_TIMEOUT_COUNTER_REG ); /* Timeout counter */
  227. outb( 0x01, io_port + P_TIMEOUT_STATUS_REG_OFFSET ); /* Reset TC */
  228. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  229. NCR5380_read( RESET_PARITY_INTERRUPT_REG );
  230. /* Set the SCSI interrupt pointer without mucking up the sound
  231. * interrupt pointer in the same byte.
  232. */
  233. pas_irq_code = ( irq < 16 ) ? scsi_irq_translate[irq] : 0;
  234. tmp = inb( io_port + IO_CONFIG_3 );
  235. if( (( tmp & 0x0f ) == pas_irq_code) && pas_irq_code > 0
  236. && !force_irq )
  237. {
  238. printk( "pas16: WARNING: Can't use same irq as sound "
  239. "driver -- interrupts disabled\n" );
  240. /* Set up the drive parameters, disable 5380 interrupts */
  241. outb( 0x4d, io_port + SYS_CONFIG_4 );
  242. }
  243. else
  244. {
  245. tmp = ( tmp & 0x0f ) | ( pas_irq_code << 4 );
  246. outb( tmp, io_port + IO_CONFIG_3 );
  247. /* Set up the drive parameters and enable 5380 interrupts */
  248. outb( 0x6d, io_port + SYS_CONFIG_4 );
  249. }
  250. }
  251. /*
  252. * Function : pas16_hw_detect( unsigned short board_num )
  253. *
  254. * Purpose : determine if a pas16 board is present
  255. *
  256. * Inputs : board_num - logical board number ( 0 - 3 )
  257. *
  258. * Returns : 0 if board not found, 1 if found.
  259. */
  260. static int __init
  261. pas16_hw_detect( unsigned short board_num )
  262. {
  263. unsigned char board_rev, tmp;
  264. unsigned short io_port = bases[ board_num ].io_port;
  265. /* See if we can find a PAS16 board at the address associated
  266. * with this logical board number.
  267. */
  268. /* First, attempt to take a newer model board out of reset and
  269. * give it a base address. This shouldn't affect older boards.
  270. */
  271. enable_board( board_num, io_port );
  272. /* Now see if it looks like a PAS16 board */
  273. board_rev = inb( io_port + PCB_CONFIG );
  274. if( board_rev == 0xff )
  275. return 0;
  276. tmp = board_rev ^ 0xe0;
  277. outb( tmp, io_port + PCB_CONFIG );
  278. tmp = inb( io_port + PCB_CONFIG );
  279. outb( board_rev, io_port + PCB_CONFIG );
  280. if( board_rev != tmp ) /* Not a PAS-16 */
  281. return 0;
  282. if( ( inb( io_port + OPERATION_MODE_1 ) & 0x03 ) != 0x03 )
  283. return 0; /* return if no SCSI interface found */
  284. /* Mediavision has some new model boards that return ID bits
  285. * that indicate a SCSI interface, but they're not (LMS). We'll
  286. * put in an additional test to try to weed them out.
  287. */
  288. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  289. NCR5380_write( MODE_REG, 0x20 ); /* Is it really SCSI? */
  290. if( NCR5380_read( MODE_REG ) != 0x20 ) /* Write to a reg. */
  291. return 0; /* and try to read */
  292. NCR5380_write( MODE_REG, 0x00 ); /* it back. */
  293. if( NCR5380_read( MODE_REG ) != 0x00 )
  294. return 0;
  295. return 1;
  296. }
  297. /*
  298. * Function : pas16_setup(char *str, int *ints)
  299. *
  300. * Purpose : LILO command line initialization of the overrides array,
  301. *
  302. * Inputs : str - unused, ints - array of integer parameters with ints[0]
  303. * equal to the number of ints.
  304. *
  305. */
  306. void __init pas16_setup(char *str, int *ints)
  307. {
  308. static int commandline_current = 0;
  309. int i;
  310. if (ints[0] != 2)
  311. printk("pas16_setup : usage pas16=io_port,irq\n");
  312. else
  313. if (commandline_current < NO_OVERRIDES) {
  314. overrides[commandline_current].io_port = (unsigned short) ints[1];
  315. overrides[commandline_current].irq = ints[2];
  316. for (i = 0; i < NO_BASES; ++i)
  317. if (bases[i].io_port == (unsigned short) ints[1]) {
  318. bases[i].noauto = 1;
  319. break;
  320. }
  321. ++commandline_current;
  322. }
  323. }
  324. /*
  325. * Function : int pas16_detect(struct scsi_host_template * tpnt)
  326. *
  327. * Purpose : detects and initializes PAS16 controllers
  328. * that were autoprobed, overridden on the LILO command line,
  329. * or specified at compile time.
  330. *
  331. * Inputs : tpnt - template for this SCSI adapter.
  332. *
  333. * Returns : 1 if a host adapter was found, 0 if not.
  334. *
  335. */
  336. int __init pas16_detect(struct scsi_host_template * tpnt)
  337. {
  338. static int current_override = 0;
  339. static unsigned short current_base = 0;
  340. struct Scsi_Host *instance;
  341. unsigned short io_port;
  342. int count;
  343. tpnt->proc_name = "pas16";
  344. tpnt->proc_info = &pas16_proc_info;
  345. if (pas16_addr != 0) {
  346. overrides[0].io_port = pas16_addr;
  347. /*
  348. * This is how we avoid seeing more than
  349. * one host adapter at the same I/O port.
  350. * Cribbed shamelessly from pas16_setup().
  351. */
  352. for (count = 0; count < NO_BASES; ++count)
  353. if (bases[count].io_port == pas16_addr) {
  354. bases[count].noauto = 1;
  355. break;
  356. }
  357. }
  358. if (pas16_irq != 0)
  359. overrides[0].irq = pas16_irq;
  360. for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
  361. io_port = 0;
  362. if (overrides[current_override].io_port)
  363. {
  364. io_port = overrides[current_override].io_port;
  365. enable_board( current_override, io_port );
  366. init_board( io_port, overrides[current_override].irq, 1 );
  367. }
  368. else
  369. for (; !io_port && (current_base < NO_BASES); ++current_base) {
  370. #if (PDEBUG & PDEBUG_INIT)
  371. printk("scsi-pas16 : probing io_port %04x\n", (unsigned int) bases[current_base].io_port);
  372. #endif
  373. if ( !bases[current_base].noauto &&
  374. pas16_hw_detect( current_base ) ){
  375. io_port = bases[current_base].io_port;
  376. init_board( io_port, default_irqs[ current_base ], 0 );
  377. #if (PDEBUG & PDEBUG_INIT)
  378. printk("scsi-pas16 : detected board.\n");
  379. #endif
  380. }
  381. }
  382. #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT)
  383. printk("scsi-pas16 : io_port = %04x\n", (unsigned int) io_port);
  384. #endif
  385. if (!io_port)
  386. break;
  387. instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
  388. if(instance == NULL)
  389. break;
  390. instance->io_port = io_port;
  391. NCR5380_init(instance, 0);
  392. if (overrides[current_override].irq != IRQ_AUTO)
  393. instance->irq = overrides[current_override].irq;
  394. else
  395. instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
  396. if (instance->irq != SCSI_IRQ_NONE)
  397. if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED,
  398. "pas16", instance)) {
  399. printk("scsi%d : IRQ%d not free, interrupts disabled\n",
  400. instance->host_no, instance->irq);
  401. instance->irq = SCSI_IRQ_NONE;
  402. }
  403. if (instance->irq == SCSI_IRQ_NONE) {
  404. printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
  405. printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
  406. /* Disable 5380 interrupts, leave drive params the same */
  407. outb( 0x4d, io_port + SYS_CONFIG_4 );
  408. outb( (inb(io_port + IO_CONFIG_3) & 0x0f), io_port + IO_CONFIG_3 );
  409. }
  410. #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT)
  411. printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
  412. #endif
  413. printk("scsi%d : at 0x%04x", instance->host_no, (int)
  414. instance->io_port);
  415. if (instance->irq == SCSI_IRQ_NONE)
  416. printk (" interrupts disabled");
  417. else
  418. printk (" irq %d", instance->irq);
  419. printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
  420. CAN_QUEUE, CMD_PER_LUN, PAS16_PUBLIC_RELEASE);
  421. NCR5380_print_options(instance);
  422. printk("\n");
  423. ++current_override;
  424. ++count;
  425. }
  426. return count;
  427. }
  428. /*
  429. * Function : int pas16_biosparam(Disk *disk, struct block_device *dev, int *ip)
  430. *
  431. * Purpose : Generates a BIOS / DOS compatible H-C-S mapping for
  432. * the specified device / size.
  433. *
  434. * Inputs : size = size of device in sectors (512 bytes), dev = block device
  435. * major / minor, ip[] = {heads, sectors, cylinders}
  436. *
  437. * Returns : always 0 (success), initializes ip
  438. *
  439. */
  440. /*
  441. * XXX Most SCSI boards use this mapping, I could be incorrect. Some one
  442. * using hard disks on a trantor should verify that this mapping corresponds
  443. * to that used by the BIOS / ASPI driver by running the linux fdisk program
  444. * and matching the H_C_S coordinates to what DOS uses.
  445. */
  446. int pas16_biosparam(struct scsi_device *sdev, struct block_device *dev,
  447. sector_t capacity, int * ip)
  448. {
  449. int size = capacity;
  450. ip[0] = 64;
  451. ip[1] = 32;
  452. ip[2] = size >> 11; /* I think I have it as /(32*64) */
  453. if( ip[2] > 1024 ) { /* yes, >, not >= */
  454. ip[0]=255;
  455. ip[1]=63;
  456. ip[2]=size/(63*255);
  457. if( ip[2] > 1023 ) /* yes >1023... */
  458. ip[2] = 1023;
  459. }
  460. return 0;
  461. }
  462. /*
  463. * Function : int NCR5380_pread (struct Scsi_Host *instance,
  464. * unsigned char *dst, int len)
  465. *
  466. * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to
  467. * dst
  468. *
  469. * Inputs : dst = destination, len = length in bytes
  470. *
  471. * Returns : 0 on success, non zero on a failure such as a watchdog
  472. * timeout.
  473. */
  474. static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst,
  475. int len) {
  476. register unsigned char *d = dst;
  477. register unsigned short reg = (unsigned short) (instance->io_port +
  478. P_DATA_REG_OFFSET);
  479. register int i = len;
  480. int ii = 0;
  481. while ( !(inb(instance->io_port + P_STATUS_REG_OFFSET) & P_ST_RDY) )
  482. ++ii;
  483. insb( reg, d, i );
  484. if ( inb(instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET) & P_TS_TIM) {
  485. outb( P_TS_CT, instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET);
  486. printk("scsi%d : watchdog timer fired in NCR5380_pread()\n",
  487. instance->host_no);
  488. return -1;
  489. }
  490. if (ii > pas_maxi)
  491. pas_maxi = ii;
  492. return 0;
  493. }
  494. /*
  495. * Function : int NCR5380_pwrite (struct Scsi_Host *instance,
  496. * unsigned char *src, int len)
  497. *
  498. * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from
  499. * src
  500. *
  501. * Inputs : src = source, len = length in bytes
  502. *
  503. * Returns : 0 on success, non zero on a failure such as a watchdog
  504. * timeout.
  505. */
  506. static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src,
  507. int len) {
  508. register unsigned char *s = src;
  509. register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET);
  510. register int i = len;
  511. int ii = 0;
  512. while ( !((inb(instance->io_port + P_STATUS_REG_OFFSET)) & P_ST_RDY) )
  513. ++ii;
  514. outsb( reg, s, i );
  515. if (inb(instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET) & P_TS_TIM) {
  516. outb( P_TS_CT, instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET);
  517. printk("scsi%d : watchdog timer fired in NCR5380_pwrite()\n",
  518. instance->host_no);
  519. return -1;
  520. }
  521. if (ii > pas_maxi)
  522. pas_wmaxi = ii;
  523. return 0;
  524. }
  525. #include "NCR5380.c"
  526. static int pas16_release(struct Scsi_Host *shost)
  527. {
  528. if (shost->irq)
  529. free_irq(shost->irq, shost);
  530. NCR5380_exit(shost);
  531. if (shost->dma_channel != 0xff)
  532. free_dma(shost->dma_channel);
  533. if (shost->io_port && shost->n_io_port)
  534. release_region(shost->io_port, shost->n_io_port);
  535. scsi_unregister(shost);
  536. return 0;
  537. }
  538. static struct scsi_host_template driver_template = {
  539. .name = "Pro Audio Spectrum-16 SCSI",
  540. .detect = pas16_detect,
  541. .release = pas16_release,
  542. .queuecommand = pas16_queue_command,
  543. .eh_abort_handler = pas16_abort,
  544. .eh_bus_reset_handler = pas16_bus_reset,
  545. .bios_param = pas16_biosparam,
  546. .can_queue = CAN_QUEUE,
  547. .this_id = 7,
  548. .sg_tablesize = SG_ALL,
  549. .cmd_per_lun = CMD_PER_LUN,
  550. .use_clustering = DISABLE_CLUSTERING,
  551. };
  552. #include "scsi_module.c"
  553. #ifdef MODULE
  554. module_param(pas16_addr, ushort, 0);
  555. module_param(pas16_irq, int, 0);
  556. #endif
  557. MODULE_LICENSE("GPL");