^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * linux/drivers/acorn/scsi/powertec.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 1997-2005 Russell King
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #include <linux/blkdev.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/string.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/ioport.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/proc_fs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/interrupt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/dma-mapping.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/pgtable.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <asm/dma.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <asm/ecard.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <asm/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include "../scsi.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #include <scsi/scsi_host.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #include "fas216.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #include "scsi.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #include <scsi/scsicam.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define POWERTEC_FAS216_OFFSET 0x3000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define POWERTEC_FAS216_SHIFT 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define POWERTEC_INTR_STATUS 0x2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define POWERTEC_INTR_BIT 0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define POWERTEC_RESET_CONTROL 0x1018
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #define POWERTEC_RESET_BIT 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #define POWERTEC_TERM_CONTROL 0x2018
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define POWERTEC_TERM_ENABLE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define POWERTEC_INTR_CONTROL 0x101c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define POWERTEC_INTR_ENABLE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define POWERTEC_INTR_DISABLE 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #define VERSION "1.10 (19/01/2003 2.5.59)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * Use term=0,1,0,0,0 to turn terminators on/off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * One entry per slot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #define NR_SG 256
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) struct powertec_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) FAS216_Info info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) struct expansion_card *ec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) void __iomem *base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) unsigned int term_ctl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) struct scatterlist sg[NR_SG];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) /* Prototype: void powertecscsi_irqenable(ec, irqnr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * Purpose : Enable interrupts on Powertec SCSI card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * Params : ec - expansion card structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * : irqnr - interrupt number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) static void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) powertecscsi_irqenable(struct expansion_card *ec, int irqnr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) struct powertec_info *info = ec->irq_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) writeb(POWERTEC_INTR_ENABLE, info->base + POWERTEC_INTR_CONTROL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) /* Prototype: void powertecscsi_irqdisable(ec, irqnr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) * Purpose : Disable interrupts on Powertec SCSI card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) * Params : ec - expansion card structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) * : irqnr - interrupt number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) static void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) powertecscsi_irqdisable(struct expansion_card *ec, int irqnr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) struct powertec_info *info = ec->irq_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) writeb(POWERTEC_INTR_DISABLE, info->base + POWERTEC_INTR_CONTROL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) static const expansioncard_ops_t powertecscsi_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) .irqenable = powertecscsi_irqenable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) .irqdisable = powertecscsi_irqdisable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) /* Prototype: void powertecscsi_terminator_ctl(host, on_off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) * Purpose : Turn the Powertec SCSI terminators on or off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) * Params : host - card to turn on/off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) * : on_off - !0 to turn on, 0 to turn off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) static void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) powertecscsi_terminator_ctl(struct Scsi_Host *host, int on_off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) info->term_ctl = on_off ? POWERTEC_TERM_ENABLE : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) writeb(info->term_ctl, info->base + POWERTEC_TERM_CONTROL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) /* Prototype: void powertecscsi_intr(irq, *dev_id, *regs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) * Purpose : handle interrupts from Powertec SCSI card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) * Params : irq - interrupt number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) * dev_id - user-defined (Scsi_Host structure)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) static irqreturn_t powertecscsi_intr(int irq, void *dev_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) struct powertec_info *info = dev_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) return fas216_intr(&info->info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) /* Prototype: fasdmatype_t powertecscsi_dma_setup(host, SCpnt, direction, min_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) * Purpose : initialises DMA/PIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) * Params : host - host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) * SCpnt - command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) * direction - DMA on to/off of card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) * min_type - minimum DMA support that we must have for this transfer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) * Returns : type of transfer to be performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) static fasdmatype_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) powertecscsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) fasdmadir_t direction, fasdmatype_t min_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) struct device *dev = scsi_get_device(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) int dmach = info->info.scsi.dma;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) if (info->info.ifcfg.capabilities & FASCAP_DMA &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) min_type == fasdma_real_all) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) int bufs, map_dir, dma_dir;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) bufs = copy_SCp_to_sg(&info->sg[0], SCp, NR_SG);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) if (direction == DMA_OUT) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) map_dir = DMA_TO_DEVICE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) dma_dir = DMA_MODE_WRITE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) map_dir = DMA_FROM_DEVICE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) dma_dir = DMA_MODE_READ;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) dma_map_sg(dev, info->sg, bufs, map_dir);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) disable_dma(dmach);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) set_dma_sg(dmach, info->sg, bufs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) set_dma_mode(dmach, dma_dir);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) enable_dma(dmach);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) return fasdma_real_all;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) * If we're not doing DMA,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * we'll do slow PIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) return fasdma_pio;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) /* Prototype: int powertecscsi_dma_stop(host, SCpnt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) * Purpose : stops DMA/PIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) * Params : host - host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) * SCpnt - command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) static void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) powertecscsi_dma_stop(struct Scsi_Host *host, struct scsi_pointer *SCp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) if (info->info.scsi.dma != NO_DMA)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) disable_dma(info->info.scsi.dma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) /* Prototype: const char *powertecscsi_info(struct Scsi_Host * host)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) * Purpose : returns a descriptive string about this interface,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * Params : host - driver host structure to return info for.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * Returns : pointer to a static buffer containing null terminated string.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) const char *powertecscsi_info(struct Scsi_Host *host)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) static char string[150];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) sprintf(string, "%s (%s) in slot %d v%s terminators o%s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) host->hostt->name, info->info.scsi.type, info->ec->slot_no,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) VERSION, info->term_ctl ? "n" : "ff");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) return string;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) /* Prototype: int powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) * Purpose : Set a driver specific function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * Params : host - host to setup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) * : buffer - buffer containing string describing operation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) * : length - length of string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) * Returns : -EINVAL, or 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) static int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) int ret = length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) if (length >= 12 && strncmp(buffer, "POWERTECSCSI", 12) == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) buffer += 12;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) length -= 12;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) if (length >= 5 && strncmp(buffer, "term=", 5) == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) if (buffer[5] == '1')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) powertecscsi_terminator_ctl(host, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) else if (buffer[5] == '0')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) powertecscsi_terminator_ctl(host, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) ret = -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) } else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) ret = -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) } else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) ret = -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) /* Prototype: int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) * int length, int host_no, int inout)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) * Purpose : Return information about the driver to a user process accessing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) * the /proc filesystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) * Params : buffer - a buffer to write information to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) * start - a pointer into this buffer set by this routine to the start
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) * of the required information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) * offset - offset into information that we have read up to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) * length - length of buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) * inout - 0 for reading, 1 for writing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) * Returns : length of data written to buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) static int powertecscsi_show_info(struct seq_file *m, struct Scsi_Host *host)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) struct powertec_info *info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) seq_printf(m, "PowerTec SCSI driver v%s\n", VERSION);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) fas216_print_host(&info->info, m);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) seq_printf(m, "Term : o%s\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) info->term_ctl ? "n" : "ff");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) fas216_print_stats(&info->info, m);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) fas216_print_devices(&info->info, m);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) static ssize_t powertecscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) struct expansion_card *ec = ECARD_DEV(dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) struct Scsi_Host *host = ecard_get_drvdata(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) return sprintf(buf, "%d\n", info->term_ctl ? 1 : 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) static ssize_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) powertecscsi_store_term(struct device *dev, struct device_attribute *attr, const char *buf, size_t len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) struct expansion_card *ec = ECARD_DEV(dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) struct Scsi_Host *host = ecard_get_drvdata(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) if (len > 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) powertecscsi_terminator_ctl(host, buf[0] != '0');
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) return len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) powertecscsi_show_term, powertecscsi_store_term);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) static struct scsi_host_template powertecscsi_template = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) .module = THIS_MODULE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) .show_info = powertecscsi_show_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) .write_info = powertecscsi_set_proc_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) .name = "PowerTec SCSI",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) .info = powertecscsi_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) .queuecommand = fas216_queue_command,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) .eh_host_reset_handler = fas216_eh_host_reset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) .eh_bus_reset_handler = fas216_eh_bus_reset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) .eh_device_reset_handler = fas216_eh_device_reset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) .eh_abort_handler = fas216_eh_abort,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) .can_queue = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) .this_id = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) .sg_tablesize = SG_MAX_SEGMENTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) .dma_boundary = IOMD_DMA_BOUNDARY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) .cmd_per_lun = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) .proc_name = "powertec",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) static int powertecscsi_probe(struct expansion_card *ec,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) const struct ecard_id *id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) struct Scsi_Host *host;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) struct powertec_info *info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) void __iomem *base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) ret = ecard_request_resources(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) if (!base) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) ret = -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) goto out_region;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) host = scsi_host_alloc(&powertecscsi_template,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) sizeof (struct powertec_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) if (!host) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) ret = -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) goto out_region;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) ecard_set_drvdata(ec, host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) info->base = base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) powertecscsi_terminator_ctl(host, term[ec->slot_no]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) info->ec = ec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) info->info.scsi.io_base = base + POWERTEC_FAS216_OFFSET;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) info->info.scsi.io_shift = POWERTEC_FAS216_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) info->info.scsi.irq = ec->irq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) info->info.scsi.dma = ec->dma;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) info->info.ifcfg.clockrate = 40; /* MHz */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) info->info.ifcfg.select_timeout = 255;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) info->info.ifcfg.asyncperiod = 200; /* ns */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) info->info.ifcfg.sync_max_depth = 7;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) info->info.ifcfg.cntl3 = CNTL3_BS8 | CNTL3_FASTSCSI | CNTL3_FASTCLK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) info->info.ifcfg.disconnect_ok = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) info->info.ifcfg.wide_max_size = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) info->info.ifcfg.capabilities = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) info->info.dma.setup = powertecscsi_dma_setup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) info->info.dma.pseudo = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) info->info.dma.stop = powertecscsi_dma_stop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) ec->irqaddr = base + POWERTEC_INTR_STATUS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) ec->irqmask = POWERTEC_INTR_BIT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) ecard_setirq(ec, &powertecscsi_ops, info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) device_create_file(&ec->dev, &dev_attr_bus_term);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) ret = fas216_init(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) goto out_free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) ret = request_irq(ec->irq, powertecscsi_intr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 0, "powertec", info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) if (ret) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) printk("scsi%d: IRQ%d not free: %d\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) host->host_no, ec->irq, ret);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) goto out_release;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) if (info->info.scsi.dma != NO_DMA) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) if (request_dma(info->info.scsi.dma, "powertec")) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) printk("scsi%d: DMA%d not free, using PIO\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) host->host_no, info->info.scsi.dma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) info->info.scsi.dma = NO_DMA;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) set_dma_speed(info->info.scsi.dma, 180);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) info->info.ifcfg.capabilities |= FASCAP_DMA;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) ret = fas216_add(host, &ec->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) if (ret == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) if (info->info.scsi.dma != NO_DMA)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) free_dma(info->info.scsi.dma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) free_irq(ec->irq, info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) out_release:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) fas216_release(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) out_free:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) device_remove_file(&ec->dev, &dev_attr_bus_term);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) scsi_host_put(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) out_region:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) ecard_release_resources(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) static void powertecscsi_remove(struct expansion_card *ec)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) struct Scsi_Host *host = ecard_get_drvdata(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) struct powertec_info *info = (struct powertec_info *)host->hostdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) ecard_set_drvdata(ec, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) fas216_remove(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) device_remove_file(&ec->dev, &dev_attr_bus_term);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) if (info->info.scsi.dma != NO_DMA)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) free_dma(info->info.scsi.dma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) free_irq(ec->irq, info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) fas216_release(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) scsi_host_put(host);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) ecard_release_resources(ec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) static const struct ecard_id powertecscsi_cids[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) { MANU_ALSYSTEMS, PROD_ALSYS_SCSIATAPI },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) { 0xffff, 0xffff },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) static struct ecard_driver powertecscsi_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) .probe = powertecscsi_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) .remove = powertecscsi_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) .id_table = powertecscsi_cids,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) .drv = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) .name = "powertecscsi",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) static int __init powertecscsi_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) return ecard_register_driver(&powertecscsi_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) static void __exit powertecscsi_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) ecard_remove_driver(&powertecscsi_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) module_init(powertecscsi_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) module_exit(powertecscsi_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) MODULE_AUTHOR("Russell King");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) MODULE_DESCRIPTION("Powertec SCSI driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) module_param_array(term, int, NULL, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) MODULE_PARM_DESC(term, "SCSI bus termination");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) MODULE_LICENSE("GPL");