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 <linux/signal.h>
  113. #include <linux/proc_fs.h>
  114. #include <asm/io.h>
  115. #include <asm/dma.h>
  116. #include <linux/blkdev.h>
  117. #include <linux/delay.h>
  118. #include <linux/interrupt.h>
  119. #include <linux/stat.h>
  120. #include <linux/init.h>
  121. #include "scsi.h"
  122. #include <scsi/scsi_host.h>
  123. #include "pas16.h"
  124. #define AUTOPROBE_IRQ
  125. #include "NCR5380.h"
  126. static int pas_maxi = 0;
  127. static int pas_wmaxi = 0;
  128. static unsigned short pas16_addr = 0;
  129. static int pas16_irq = 0;
  130. static const int scsi_irq_translate[] =
  131. { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
  132. /* The default_irqs array contains values used to set the irq into the
  133. * board via software (as must be done on newer model boards without
  134. * irq jumpers on the board). The first value in the array will be
  135. * assigned to logical board 0, the next to board 1, etc.
  136. */
  137. static int default_irqs[] __initdata =
  138. { PAS16_DEFAULT_BOARD_1_IRQ,
  139. PAS16_DEFAULT_BOARD_2_IRQ,
  140. PAS16_DEFAULT_BOARD_3_IRQ,
  141. PAS16_DEFAULT_BOARD_4_IRQ
  142. };
  143. static struct override {
  144. unsigned short io_port;
  145. int irq;
  146. } overrides
  147. #ifdef PAS16_OVERRIDE
  148. [] __initdata = PAS16_OVERRIDE;
  149. #else
  150. [4] __initdata = {{0,IRQ_AUTO}, {0,IRQ_AUTO}, {0,IRQ_AUTO},
  151. {0,IRQ_AUTO}};
  152. #endif
  153. #define NO_OVERRIDES ARRAY_SIZE(overrides)
  154. static struct base {
  155. unsigned short io_port;
  156. int noauto;
  157. } bases[] __initdata =
  158. { {PAS16_DEFAULT_BASE_1, 0},
  159. {PAS16_DEFAULT_BASE_2, 0},
  160. {PAS16_DEFAULT_BASE_3, 0},
  161. {PAS16_DEFAULT_BASE_4, 0}
  162. };
  163. #define NO_BASES ARRAY_SIZE(bases)
  164. static const unsigned short pas16_offset[ 8 ] =
  165. {
  166. 0x1c00, /* OUTPUT_DATA_REG */
  167. 0x1c01, /* INITIATOR_COMMAND_REG */
  168. 0x1c02, /* MODE_REG */
  169. 0x1c03, /* TARGET_COMMAND_REG */
  170. 0x3c00, /* STATUS_REG ro, SELECT_ENABLE_REG wo */
  171. 0x3c01, /* BUS_AND_STATUS_REG ro, START_DMA_SEND_REG wo */
  172. 0x3c02, /* INPUT_DATA_REGISTER ro, (N/A on PAS16 ?)
  173. * START_DMA_TARGET_RECEIVE_REG wo
  174. */
  175. 0x3c03, /* RESET_PARITY_INTERRUPT_REG ro,
  176. * START_DMA_INITIATOR_RECEIVE_REG wo
  177. */
  178. };
  179. /*----------------------------------------------------------------*/
  180. /* the following will set the monitor border color (useful to find
  181. where something crashed or gets stuck at */
  182. /* 1 = blue
  183. 2 = green
  184. 3 = cyan
  185. 4 = red
  186. 5 = magenta
  187. 6 = yellow
  188. 7 = white
  189. */
  190. #if 1
  191. #define rtrc(i) {inb(0x3da); outb(0x31, 0x3c0); outb((i), 0x3c0);}
  192. #else
  193. #define rtrc(i) {}
  194. #endif
  195. /*
  196. * Function : enable_board( int board_num, unsigned short port )
  197. *
  198. * Purpose : set address in new model board
  199. *
  200. * Inputs : board_num - logical board number 0-3, port - base address
  201. *
  202. */
  203. static void __init
  204. enable_board( int board_num, unsigned short port )
  205. {
  206. outb( 0xbc + board_num, MASTER_ADDRESS_PTR );
  207. outb( port >> 2, MASTER_ADDRESS_PTR );
  208. }
  209. /*
  210. * Function : init_board( unsigned short port, int irq )
  211. *
  212. * Purpose : Set the board up to handle the SCSI interface
  213. *
  214. * Inputs : port - base address of the board,
  215. * irq - irq to assign to the SCSI port
  216. * force_irq - set it even if it conflicts with sound driver
  217. *
  218. */
  219. static void __init
  220. init_board( unsigned short io_port, int irq, int force_irq )
  221. {
  222. unsigned int tmp;
  223. unsigned int pas_irq_code;
  224. /* Initialize the SCSI part of the board */
  225. outb( 0x30, io_port + P_TIMEOUT_COUNTER_REG ); /* Timeout counter */
  226. outb( 0x01, io_port + P_TIMEOUT_STATUS_REG_OFFSET ); /* Reset TC */
  227. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  228. NCR5380_read( RESET_PARITY_INTERRUPT_REG );
  229. /* Set the SCSI interrupt pointer without mucking up the sound
  230. * interrupt pointer in the same byte.
  231. */
  232. pas_irq_code = ( irq < 16 ) ? scsi_irq_translate[irq] : 0;
  233. tmp = inb( io_port + IO_CONFIG_3 );
  234. if( (( tmp & 0x0f ) == pas_irq_code) && pas_irq_code > 0
  235. && !force_irq )
  236. {
  237. printk( "pas16: WARNING: Can't use same irq as sound "
  238. "driver -- interrupts disabled\n" );
  239. /* Set up the drive parameters, disable 5380 interrupts */
  240. outb( 0x4d, io_port + SYS_CONFIG_4 );
  241. }
  242. else
  243. {
  244. tmp = ( tmp & 0x0f ) | ( pas_irq_code << 4 );
  245. outb( tmp, io_port + IO_CONFIG_3 );
  246. /* Set up the drive parameters and enable 5380 interrupts */
  247. outb( 0x6d, io_port + SYS_CONFIG_4 );
  248. }
  249. }
  250. /*
  251. * Function : pas16_hw_detect( unsigned short board_num )
  252. *
  253. * Purpose : determine if a pas16 board is present
  254. *
  255. * Inputs : board_num - logical board number ( 0 - 3 )
  256. *
  257. * Returns : 0 if board not found, 1 if found.
  258. */
  259. static int __init
  260. pas16_hw_detect( unsigned short board_num )
  261. {
  262. unsigned char board_rev, tmp;
  263. unsigned short io_port = bases[ board_num ].io_port;
  264. /* See if we can find a PAS16 board at the address associated
  265. * with this logical board number.
  266. */
  267. /* First, attempt to take a newer model board out of reset and
  268. * give it a base address. This shouldn't affect older boards.
  269. */
  270. enable_board( board_num, io_port );
  271. /* Now see if it looks like a PAS16 board */
  272. board_rev = inb( io_port + PCB_CONFIG );
  273. if( board_rev == 0xff )
  274. return 0;
  275. tmp = board_rev ^ 0xe0;
  276. outb( tmp, io_port + PCB_CONFIG );
  277. tmp = inb( io_port + PCB_CONFIG );
  278. outb( board_rev, io_port + PCB_CONFIG );
  279. if( board_rev != tmp ) /* Not a PAS-16 */
  280. return 0;
  281. if( ( inb( io_port + OPERATION_MODE_1 ) & 0x03 ) != 0x03 )
  282. return 0; /* return if no SCSI interface found */
  283. /* Mediavision has some new model boards that return ID bits
  284. * that indicate a SCSI interface, but they're not (LMS). We'll
  285. * put in an additional test to try to weed them out.
  286. */
  287. outb( 0x01, io_port + WAIT_STATE ); /* 1 Wait state */
  288. NCR5380_write( MODE_REG, 0x20 ); /* Is it really SCSI? */
  289. if( NCR5380_read( MODE_REG ) != 0x20 ) /* Write to a reg. */
  290. return 0; /* and try to read */
  291. NCR5380_write( MODE_REG, 0x00 ); /* it back. */
  292. if( NCR5380_read( MODE_REG ) != 0x00 )
  293. return 0;
  294. return 1;
  295. }
  296. /*
  297. * Function : pas16_setup(char *str, int *ints)
  298. *
  299. * Purpose : LILO command line initialization of the overrides array,
  300. *
  301. * Inputs : str - unused, ints - array of integer parameters with ints[0]
  302. * equal to the number of ints.
  303. *
  304. */
  305. void __init pas16_setup(char *str, int *ints)
  306. {
  307. static int commandline_current = 0;
  308. int i;
  309. if (ints[0] != 2)
  310. printk("pas16_setup : usage pas16=io_port,irq\n");
  311. else
  312. if (commandline_current < NO_OVERRIDES) {
  313. overrides[commandline_current].io_port = (unsigned short) ints[1];
  314. overrides[commandline_current].irq = ints[2];
  315. for (i = 0; i < NO_BASES; ++i)
  316. if (bases[i].io_port == (unsigned short) ints[1]) {
  317. bases[i].noauto = 1;
  318. break;
  319. }
  320. ++commandline_current;
  321. }
  322. }
  323. /*
  324. * Function : int pas16_detect(struct scsi_host_template * tpnt)
  325. *
  326. * Purpose : detects and initializes PAS16 controllers
  327. * that were autoprobed, overridden on the LILO command line,
  328. * or specified at compile time.
  329. *
  330. * Inputs : tpnt - template for this SCSI adapter.
  331. *
  332. * Returns : 1 if a host adapter was found, 0 if not.
  333. *
  334. */
  335. int __init pas16_detect(struct scsi_host_template * tpnt)
  336. {
  337. static int current_override = 0;
  338. static unsigned short current_base = 0;
  339. struct Scsi_Host *instance;
  340. unsigned short io_port;
  341. int count;
  342. tpnt->proc_name = "pas16";
  343. tpnt->proc_info = &pas16_proc_info;
  344. if (pas16_addr != 0) {
  345. overrides[0].io_port = pas16_addr;
  346. /*
  347. * This is how we avoid seeing more than
  348. * one host adapter at the same I/O port.
  349. * Cribbed shamelessly from pas16_setup().
  350. */
  351. for (count = 0; count < NO_BASES; ++count)
  352. if (bases[count].io_port == pas16_addr) {
  353. bases[count].noauto = 1;
  354. break;
  355. }
  356. }
  357. if (pas16_irq != 0)
  358. overrides[0].irq = pas16_irq;
  359. for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
  360. io_port = 0;
  361. if (overrides[current_override].io_port)
  362. {
  363. io_port = overrides[current_override].io_port;
  364. enable_board( current_override, io_port );
  365. init_board( io_port, overrides[current_override].irq, 1 );
  366. }
  367. else
  368. for (; !io_port && (current_base < NO_BASES); ++current_base) {
  369. #if (PDEBUG & PDEBUG_INIT)
  370. printk("scsi-pas16 : probing io_port %04x\n", (unsigned int) bases[current_base].io_port);
  371. #endif
  372. if ( !bases[current_base].noauto &&
  373. pas16_hw_detect( current_base ) ){
  374. io_port = bases[current_base].io_port;
  375. init_board( io_port, default_irqs[ current_base ], 0 );
  376. #if (PDEBUG & PDEBUG_INIT)
  377. printk("scsi-pas16 : detected board.\n");
  378. #endif
  379. }
  380. }
  381. #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT)
  382. printk("scsi-pas16 : io_port = %04x\n", (unsigned int) io_port);
  383. #endif
  384. if (!io_port)
  385. break;
  386. instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
  387. if(instance == NULL)
  388. break;
  389. instance->io_port = io_port;
  390. NCR5380_init(instance, 0);
  391. if (overrides[current_override].irq != IRQ_AUTO)
  392. instance->irq = overrides[current_override].irq;
  393. else
  394. instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
  395. if (instance->irq != SCSI_IRQ_NONE)
  396. if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED,
  397. "pas16", instance)) {
  398. printk("scsi%d : IRQ%d not free, interrupts disabled\n",
  399. instance->host_no, instance->irq);
  400. instance->irq = SCSI_IRQ_NONE;
  401. }
  402. if (instance->irq == SCSI_IRQ_NONE) {
  403. printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
  404. printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
  405. /* Disable 5380 interrupts, leave drive params the same */
  406. outb( 0x4d, io_port + SYS_CONFIG_4 );
  407. outb( (inb(io_port + IO_CONFIG_3) & 0x0f), io_port + IO_CONFIG_3 );
  408. }
  409. #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT)
  410. printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
  411. #endif
  412. printk("scsi%d : at 0x%04x", instance->host_no, (int)
  413. instance->io_port);
  414. if (instance->irq == SCSI_IRQ_NONE)
  415. printk (" interrupts disabled");
  416. else
  417. printk (" irq %d", instance->irq);
  418. printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
  419. CAN_QUEUE, CMD_PER_LUN, PAS16_PUBLIC_RELEASE);
  420. NCR5380_print_options(instance);
  421. printk("\n");
  422. ++current_override;
  423. ++count;
  424. }
  425. return count;
  426. }
  427. /*
  428. * Function : int pas16_biosparam(Disk *disk, struct block_device *dev, int *ip)
  429. *
  430. * Purpose : Generates a BIOS / DOS compatible H-C-S mapping for
  431. * the specified device / size.
  432. *
  433. * Inputs : size = size of device in sectors (512 bytes), dev = block device
  434. * major / minor, ip[] = {heads, sectors, cylinders}
  435. *
  436. * Returns : always 0 (success), initializes ip
  437. *
  438. */
  439. /*
  440. * XXX Most SCSI boards use this mapping, I could be incorrect. Some one
  441. * using hard disks on a trantor should verify that this mapping corresponds
  442. * to that used by the BIOS / ASPI driver by running the linux fdisk program
  443. * and matching the H_C_S coordinates to what DOS uses.
  444. */
  445. int pas16_biosparam(struct scsi_device *sdev, struct block_device *dev,
  446. sector_t capacity, int * ip)
  447. {
  448. int size = capacity;
  449. ip[0] = 64;
  450. ip[1] = 32;
  451. ip[2] = size >> 11; /* I think I have it as /(32*64) */
  452. if( ip[2] > 1024 ) { /* yes, >, not >= */
  453. ip[0]=255;
  454. ip[1]=63;
  455. ip[2]=size/(63*255);
  456. if( ip[2] > 1023 ) /* yes >1023... */
  457. ip[2] = 1023;
  458. }
  459. return 0;
  460. }
  461. /*
  462. * Function : int NCR5380_pread (struct Scsi_Host *instance,
  463. * unsigned char *dst, int len)
  464. *
  465. * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to
  466. * dst
  467. *
  468. * Inputs : dst = destination, len = length in bytes
  469. *
  470. * Returns : 0 on success, non zero on a failure such as a watchdog
  471. * timeout.
  472. */
  473. static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst,
  474. int len) {
  475. register unsigned char *d = dst;
  476. register unsigned short reg = (unsigned short) (instance->io_port +
  477. P_DATA_REG_OFFSET);
  478. register int i = len;
  479. int ii = 0;
  480. while ( !(inb(instance->io_port + P_STATUS_REG_OFFSET) & P_ST_RDY) )
  481. ++ii;
  482. insb( reg, d, i );
  483. if ( inb(instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET) & P_TS_TIM) {
  484. outb( P_TS_CT, instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET);
  485. printk("scsi%d : watchdog timer fired in NCR5380_pread()\n",
  486. instance->host_no);
  487. return -1;
  488. }
  489. if (ii > pas_maxi)
  490. pas_maxi = ii;
  491. return 0;
  492. }
  493. /*
  494. * Function : int NCR5380_pwrite (struct Scsi_Host *instance,
  495. * unsigned char *src, int len)
  496. *
  497. * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from
  498. * src
  499. *
  500. * Inputs : src = source, len = length in bytes
  501. *
  502. * Returns : 0 on success, non zero on a failure such as a watchdog
  503. * timeout.
  504. */
  505. static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src,
  506. int len) {
  507. register unsigned char *s = src;
  508. register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET);
  509. register int i = len;
  510. int ii = 0;
  511. while ( !((inb(instance->io_port + P_STATUS_REG_OFFSET)) & P_ST_RDY) )
  512. ++ii;
  513. outsb( reg, s, i );
  514. if (inb(instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET) & P_TS_TIM) {
  515. outb( P_TS_CT, instance->io_port + P_TIMEOUT_STATUS_REG_OFFSET);
  516. printk("scsi%d : watchdog timer fired in NCR5380_pwrite()\n",
  517. instance->host_no);
  518. return -1;
  519. }
  520. if (ii > pas_maxi)
  521. pas_wmaxi = ii;
  522. return 0;
  523. }
  524. #include "NCR5380.c"
  525. static int pas16_release(struct Scsi_Host *shost)
  526. {
  527. if (shost->irq)
  528. free_irq(shost->irq, shost);
  529. NCR5380_exit(shost);
  530. if (shost->dma_channel != 0xff)
  531. free_dma(shost->dma_channel);
  532. if (shost->io_port && shost->n_io_port)
  533. release_region(shost->io_port, shost->n_io_port);
  534. scsi_unregister(shost);
  535. return 0;
  536. }
  537. static struct scsi_host_template driver_template = {
  538. .name = "Pro Audio Spectrum-16 SCSI",
  539. .detect = pas16_detect,
  540. .release = pas16_release,
  541. .queuecommand = pas16_queue_command,
  542. .eh_abort_handler = pas16_abort,
  543. .eh_bus_reset_handler = pas16_bus_reset,
  544. .bios_param = pas16_biosparam,
  545. .can_queue = CAN_QUEUE,
  546. .this_id = 7,
  547. .sg_tablesize = SG_ALL,
  548. .cmd_per_lun = CMD_PER_LUN,
  549. .use_clustering = DISABLE_CLUSTERING,
  550. };
  551. #include "scsi_module.c"
  552. #ifdef MODULE
  553. module_param(pas16_addr, ushort, 0);
  554. module_param(pas16_irq, int, 0);
  555. #endif
  556. MODULE_LICENSE("GPL");