pas16.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  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 <linux/sched.h>
  116. #include <asm/io.h>
  117. #include <asm/dma.h>
  118. #include <linux/blkdev.h>
  119. #include <linux/delay.h>
  120. #include <linux/interrupt.h>
  121. #include <linux/stat.h>
  122. #include <linux/init.h>
  123. #include "scsi.h"
  124. #include <scsi/scsi_host.h>
  125. #include "pas16.h"
  126. #define AUTOPROBE_IRQ
  127. #include "NCR5380.h"
  128. static int pas_maxi = 0;
  129. static int pas_wmaxi = 0;
  130. static unsigned short pas16_addr = 0;
  131. static int pas16_irq = 0;
  132. static const int scsi_irq_translate[] =
  133. { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
  134. /* The default_irqs array contains values used to set the irq into the
  135. * board via software (as must be done on newer model boards without
  136. * irq jumpers on the board). The first value in the array will be
  137. * assigned to logical board 0, the next to board 1, etc.
  138. */
  139. static int default_irqs[] __initdata =
  140. { PAS16_DEFAULT_BOARD_1_IRQ,
  141. PAS16_DEFAULT_BOARD_2_IRQ,
  142. PAS16_DEFAULT_BOARD_3_IRQ,
  143. PAS16_DEFAULT_BOARD_4_IRQ
  144. };
  145. static struct override {
  146. unsigned short io_port;
  147. int irq;
  148. } overrides
  149. #ifdef PAS16_OVERRIDE
  150. [] __initdata = PAS16_OVERRIDE;
  151. #else
  152. [4] __initdata = {{0,IRQ_AUTO}, {0,IRQ_AUTO}, {0,IRQ_AUTO},
  153. {0,IRQ_AUTO}};
  154. #endif
  155. #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
  156. static struct base {
  157. unsigned short io_port;
  158. int noauto;
  159. } bases[] __initdata =
  160. { {PAS16_DEFAULT_BASE_1, 0},
  161. {PAS16_DEFAULT_BASE_2, 0},
  162. {PAS16_DEFAULT_BASE_3, 0},
  163. {PAS16_DEFAULT_BASE_4, 0}
  164. };
  165. #define NO_BASES (sizeof (bases) / sizeof (struct base))
  166. static const unsigned short pas16_offset[ 8 ] =
  167. {
  168. 0x1c00, /* OUTPUT_DATA_REG */
  169. 0x1c01, /* INITIATOR_COMMAND_REG */
  170. 0x1c02, /* MODE_REG */
  171. 0x1c03, /* TARGET_COMMAND_REG */
  172. 0x3c00, /* STATUS_REG ro, SELECT_ENABLE_REG wo */
  173. 0x3c01, /* BUS_AND_STATUS_REG ro, START_DMA_SEND_REG wo */
  174. 0x3c02, /* INPUT_DATA_REGISTER ro, (N/A on PAS16 ?)
  175. * START_DMA_TARGET_RECEIVE_REG wo
  176. */
  177. 0x3c03, /* RESET_PARITY_INTERRUPT_REG ro,
  178. * START_DMA_INITIATOR_RECEIVE_REG wo
  179. */
  180. };
  181. /*----------------------------------------------------------------*/
  182. /* the following will set the monitor border color (useful to find
  183. where something crashed or gets stuck at */
  184. /* 1 = blue
  185. 2 = green
  186. 3 = cyan
  187. 4 = red
  188. 5 = magenta
  189. 6 = yellow
  190. 7 = white
  191. */
  192. #if 1
  193. #define rtrc(i) {inb(0x3da); outb(0x31, 0x3c0); outb((i), 0x3c0);}
  194. #else
  195. #define rtrc(i) {}
  196. #endif
  197. /*
  198. * Function : enable_board( int board_num, unsigned short port )
  199. *
  200. * Purpose : set address in new model board
  201. *
  202. * Inputs : board_num - logical board number 0-3, port - base address
  203. *
  204. */
  205. static void __init
  206. enable_board( int board_num, unsigned short port )
  207. {
  208. outb( 0xbc + board_num, MASTER_ADDRESS_PTR );
  209. outb( port >> 2, MASTER_ADDRESS_PTR );
  210. }
  211. /*
  212. * Function : init_board( unsigned short port, int irq )
  213. *
  214. * Purpose : Set the board up to handle the SCSI interface
  215. *
  216. * Inputs : port - base address of the board,
  217. * irq - irq to assign to the SCSI port
  218. * force_irq - set it even if it conflicts with sound driver
  219. *
  220. */
  221. static void __init
  222. init_board( unsigned short io_port, int irq, int force_irq )
  223. {
  224. unsigned int tmp;
  225. unsigned int pas_irq_code;
  226. /* Initialize the SCSI part of the board */
  227. outb( 0x30, io_port + P_TIMEOUT_COUNTER_REG ); /* Timeout counter */
  228. outb( 0x01, io_port + P_TIMEOUT_STATUS_REG_OFFSET ); /* Reset TC */
  229. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  230. NCR5380_read( RESET_PARITY_INTERRUPT_REG );
  231. /* Set the SCSI interrupt pointer without mucking up the sound
  232. * interrupt pointer in the same byte.
  233. */
  234. pas_irq_code = ( irq < 16 ) ? scsi_irq_translate[irq] : 0;
  235. tmp = inb( io_port + IO_CONFIG_3 );
  236. if( (( tmp & 0x0f ) == pas_irq_code) && pas_irq_code > 0
  237. && !force_irq )
  238. {
  239. printk( "pas16: WARNING: Can't use same irq as sound "
  240. "driver -- interrupts disabled\n" );
  241. /* Set up the drive parameters, disable 5380 interrupts */
  242. outb( 0x4d, io_port + SYS_CONFIG_4 );
  243. }
  244. else
  245. {
  246. tmp = ( tmp & 0x0f ) | ( pas_irq_code << 4 );
  247. outb( tmp, io_port + IO_CONFIG_3 );
  248. /* Set up the drive parameters and enable 5380 interrupts */
  249. outb( 0x6d, io_port + SYS_CONFIG_4 );
  250. }
  251. }
  252. /*
  253. * Function : pas16_hw_detect( unsigned short board_num )
  254. *
  255. * Purpose : determine if a pas16 board is present
  256. *
  257. * Inputs : board_num - logical board number ( 0 - 3 )
  258. *
  259. * Returns : 0 if board not found, 1 if found.
  260. */
  261. static int __init
  262. pas16_hw_detect( unsigned short board_num )
  263. {
  264. unsigned char board_rev, tmp;
  265. unsigned short io_port = bases[ board_num ].io_port;
  266. /* See if we can find a PAS16 board at the address associated
  267. * with this logical board number.
  268. */
  269. /* First, attempt to take a newer model board out of reset and
  270. * give it a base address. This shouldn't affect older boards.
  271. */
  272. enable_board( board_num, io_port );
  273. /* Now see if it looks like a PAS16 board */
  274. board_rev = inb( io_port + PCB_CONFIG );
  275. if( board_rev == 0xff )
  276. return 0;
  277. tmp = board_rev ^ 0xe0;
  278. outb( tmp, io_port + PCB_CONFIG );
  279. tmp = inb( io_port + PCB_CONFIG );
  280. outb( board_rev, io_port + PCB_CONFIG );
  281. if( board_rev != tmp ) /* Not a PAS-16 */
  282. return 0;
  283. if( ( inb( io_port + OPERATION_MODE_1 ) & 0x03 ) != 0x03 )
  284. return 0; /* return if no SCSI interface found */
  285. /* Mediavision has some new model boards that return ID bits
  286. * that indicate a SCSI interface, but they're not (LMS). We'll
  287. * put in an additional test to try to weed them out.
  288. */
  289. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  290. NCR5380_write( MODE_REG, 0x20 ); /* Is it really SCSI? */
  291. if( NCR5380_read( MODE_REG ) != 0x20 ) /* Write to a reg. */
  292. return 0; /* and try to read */
  293. NCR5380_write( MODE_REG, 0x00 ); /* it back. */
  294. if( NCR5380_read( MODE_REG ) != 0x00 )
  295. return 0;
  296. return 1;
  297. }
  298. /*
  299. * Function : pas16_setup(char *str, int *ints)
  300. *
  301. * Purpose : LILO command line initialization of the overrides array,
  302. *
  303. * Inputs : str - unused, ints - array of integer parameters with ints[0]
  304. * equal to the number of ints.
  305. *
  306. */
  307. void __init pas16_setup(char *str, int *ints)
  308. {
  309. static int commandline_current = 0;
  310. int i;
  311. if (ints[0] != 2)
  312. printk("pas16_setup : usage pas16=io_port,irq\n");
  313. else
  314. if (commandline_current < NO_OVERRIDES) {
  315. overrides[commandline_current].io_port = (unsigned short) ints[1];
  316. overrides[commandline_current].irq = ints[2];
  317. for (i = 0; i < NO_BASES; ++i)
  318. if (bases[i].io_port == (unsigned short) ints[1]) {
  319. bases[i].noauto = 1;
  320. break;
  321. }
  322. ++commandline_current;
  323. }
  324. }
  325. /*
  326. * Function : int pas16_detect(struct scsi_host_template * tpnt)
  327. *
  328. * Purpose : detects and initializes PAS16 controllers
  329. * that were autoprobed, overridden on the LILO command line,
  330. * or specified at compile time.
  331. *
  332. * Inputs : tpnt - template for this SCSI adapter.
  333. *
  334. * Returns : 1 if a host adapter was found, 0 if not.
  335. *
  336. */
  337. int __init pas16_detect(struct scsi_host_template * tpnt)
  338. {
  339. static int current_override = 0;
  340. static unsigned short current_base = 0;
  341. struct Scsi_Host *instance;
  342. unsigned short io_port;
  343. int count;
  344. tpnt->proc_name = "pas16";
  345. tpnt->proc_info = &pas16_proc_info;
  346. if (pas16_addr != 0) {
  347. overrides[0].io_port = pas16_addr;
  348. /*
  349. * This is how we avoid seeing more than
  350. * one host adapter at the same I/O port.
  351. * Cribbed shamelessly from pas16_setup().
  352. */
  353. for (count = 0; count < NO_BASES; ++count)
  354. if (bases[count].io_port == pas16_addr) {
  355. bases[count].noauto = 1;
  356. break;
  357. }
  358. }
  359. if (pas16_irq != 0)
  360. overrides[0].irq = pas16_irq;
  361. for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
  362. io_port = 0;
  363. if (overrides[current_override].io_port)
  364. {
  365. io_port = overrides[current_override].io_port;
  366. enable_board( current_override, io_port );
  367. init_board( io_port, overrides[current_override].irq, 1 );
  368. }
  369. else
  370. for (; !io_port && (current_base < NO_BASES); ++current_base) {
  371. #if (PDEBUG & PDEBUG_INIT)
  372. printk("scsi-pas16 : probing io_port %04x\n", (unsigned int) bases[current_base].io_port);
  373. #endif
  374. if ( !bases[current_base].noauto &&
  375. pas16_hw_detect( current_base ) ){
  376. io_port = bases[current_base].io_port;
  377. init_board( io_port, default_irqs[ current_base ], 0 );
  378. #if (PDEBUG & PDEBUG_INIT)
  379. printk("scsi-pas16 : detected board.\n");
  380. #endif
  381. }
  382. }
  383. #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT)
  384. printk("scsi-pas16 : io_port = %04x\n", (unsigned int) io_port);
  385. #endif
  386. if (!io_port)
  387. break;
  388. instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
  389. if(instance == NULL)
  390. break;
  391. instance->io_port = io_port;
  392. NCR5380_init(instance, 0);
  393. if (overrides[current_override].irq != IRQ_AUTO)
  394. instance->irq = overrides[current_override].irq;
  395. else
  396. instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
  397. if (instance->irq != SCSI_IRQ_NONE)
  398. if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "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, NULL);
  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");