2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* sata_qstor.c - Pacific Digital Corporation QStor SATA
|
|
|
|
*
|
|
|
|
* Maintained by: Mark Lord <mlord@pobox.com>
|
|
|
|
*
|
|
|
|
* Copyright 2005 Pacific Digital Corporation.
|
|
|
|
* (OSL/GPL code release authorized by Jalil Fadavi).
|
|
|
|
*
|
2005-08-28 18:18:39 -06:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* libata documentation is available via 'make {ps|pdf}docs',
|
|
|
|
* as Documentation/DocBook/libata.*
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/pci.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/blkdev.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/interrupt.h>
|
2005-10-30 12:39:11 -07:00
|
|
|
#include <linux/device.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <scsi/scsi_host.h>
|
|
|
|
#include <linux/libata.h>
|
|
|
|
|
|
|
|
#define DRV_NAME "sata_qstor"
|
2006-04-02 18:41:36 -06:00
|
|
|
#define DRV_VERSION "0.06"
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
enum {
|
2007-01-31 23:06:36 -07:00
|
|
|
QS_MMIO_BAR = 4,
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
QS_PORTS = 4,
|
|
|
|
QS_MAX_PRD = LIBATA_MAX_PRD,
|
|
|
|
QS_CPB_ORDER = 6,
|
|
|
|
QS_CPB_BYTES = (1 << QS_CPB_ORDER),
|
|
|
|
QS_PRD_BYTES = QS_MAX_PRD * 16,
|
|
|
|
QS_PKT_BYTES = QS_CPB_BYTES + QS_PRD_BYTES,
|
|
|
|
|
|
|
|
/* global register offsets */
|
|
|
|
QS_HCF_CNFG3 = 0x0003, /* host configuration offset */
|
|
|
|
QS_HID_HPHY = 0x0004, /* host physical interface info */
|
|
|
|
QS_HCT_CTRL = 0x00e4, /* global interrupt mask offset */
|
|
|
|
QS_HST_SFF = 0x0100, /* host status fifo offset */
|
|
|
|
QS_HVS_SERD3 = 0x0393, /* PHY enable offset */
|
|
|
|
|
|
|
|
/* global control bits */
|
|
|
|
QS_HPHY_64BIT = (1 << 1), /* 64-bit bus detected */
|
|
|
|
QS_CNFG3_GSRST = 0x01, /* global chip reset */
|
|
|
|
QS_SERD3_PHY_ENA = 0xf0, /* PHY detection ENAble*/
|
|
|
|
|
|
|
|
/* per-channel register offsets */
|
|
|
|
QS_CCF_CPBA = 0x0710, /* chan CPB base address */
|
|
|
|
QS_CCF_CSEP = 0x0718, /* chan CPB separation factor */
|
|
|
|
QS_CFC_HUFT = 0x0800, /* host upstream fifo threshold */
|
|
|
|
QS_CFC_HDFT = 0x0804, /* host downstream fifo threshold */
|
|
|
|
QS_CFC_DUFT = 0x0808, /* dev upstream fifo threshold */
|
|
|
|
QS_CFC_DDFT = 0x080c, /* dev downstream fifo threshold */
|
|
|
|
QS_CCT_CTR0 = 0x0900, /* chan control-0 offset */
|
|
|
|
QS_CCT_CTR1 = 0x0901, /* chan control-1 offset */
|
|
|
|
QS_CCT_CFF = 0x0a00, /* chan command fifo offset */
|
|
|
|
|
|
|
|
/* channel control bits */
|
|
|
|
QS_CTR0_REG = (1 << 1), /* register mode (vs. pkt mode) */
|
|
|
|
QS_CTR0_CLER = (1 << 2), /* clear channel errors */
|
|
|
|
QS_CTR1_RDEV = (1 << 1), /* sata phy/comms reset */
|
|
|
|
QS_CTR1_RCHN = (1 << 4), /* reset channel logic */
|
|
|
|
QS_CCF_RUN_PKT = 0x107, /* RUN a new dma PKT */
|
|
|
|
|
|
|
|
/* pkt sub-field headers */
|
|
|
|
QS_HCB_HDR = 0x01, /* Host Control Block header */
|
|
|
|
QS_DCB_HDR = 0x02, /* Device Control Block header */
|
|
|
|
|
|
|
|
/* pkt HCB flag bits */
|
|
|
|
QS_HF_DIRO = (1 << 0), /* data DIRection Out */
|
|
|
|
QS_HF_DAT = (1 << 3), /* DATa pkt */
|
|
|
|
QS_HF_IEN = (1 << 4), /* Interrupt ENable */
|
|
|
|
QS_HF_VLD = (1 << 5), /* VaLiD pkt */
|
|
|
|
|
|
|
|
/* pkt DCB flag bits */
|
|
|
|
QS_DF_PORD = (1 << 2), /* Pio OR Dma */
|
|
|
|
QS_DF_ELBA = (1 << 3), /* Extended LBA (lba48) */
|
|
|
|
|
|
|
|
/* PCI device IDs */
|
|
|
|
board_2068_idx = 0, /* QStor 4-port SATA/RAID */
|
|
|
|
};
|
|
|
|
|
2005-10-20 23:46:02 -06:00
|
|
|
enum {
|
|
|
|
QS_DMA_BOUNDARY = ~0UL
|
|
|
|
};
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
typedef enum { qs_state_idle, qs_state_pkt, qs_state_mmio } qs_state_t;
|
|
|
|
|
|
|
|
struct qs_port_priv {
|
|
|
|
u8 *pkt;
|
|
|
|
dma_addr_t pkt_dma;
|
|
|
|
qs_state_t state;
|
|
|
|
};
|
|
|
|
|
|
|
|
static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg);
|
|
|
|
static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
|
|
|
|
static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
static irqreturn_t qs_intr (int irq, void *dev_instance);
|
2005-04-16 16:20:36 -06:00
|
|
|
static int qs_port_start(struct ata_port *ap);
|
2006-08-24 01:19:22 -06:00
|
|
|
static void qs_host_stop(struct ata_host *host);
|
2005-04-16 16:20:36 -06:00
|
|
|
static void qs_phy_reset(struct ata_port *ap);
|
|
|
|
static void qs_qc_prep(struct ata_queued_cmd *qc);
|
2006-01-22 21:09:36 -07:00
|
|
|
static unsigned int qs_qc_issue(struct ata_queued_cmd *qc);
|
2005-04-16 16:20:36 -06:00
|
|
|
static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
|
2005-08-26 09:03:19 -06:00
|
|
|
static void qs_bmdma_stop(struct ata_queued_cmd *qc);
|
2005-04-16 16:20:36 -06:00
|
|
|
static u8 qs_bmdma_status(struct ata_port *ap);
|
|
|
|
static void qs_irq_clear(struct ata_port *ap);
|
|
|
|
static void qs_eng_timeout(struct ata_port *ap);
|
|
|
|
|
2005-11-06 22:59:37 -07:00
|
|
|
static struct scsi_host_template qs_ata_sht = {
|
2005-04-16 16:20:36 -06:00
|
|
|
.module = THIS_MODULE,
|
|
|
|
.name = DRV_NAME,
|
|
|
|
.ioctl = ata_scsi_ioctl,
|
|
|
|
.queuecommand = ata_scsi_queuecmd,
|
|
|
|
.can_queue = ATA_DEF_QUEUE,
|
|
|
|
.this_id = ATA_SHT_THIS_ID,
|
|
|
|
.sg_tablesize = QS_MAX_PRD,
|
|
|
|
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
|
|
|
|
.emulated = ATA_SHT_EMULATED,
|
|
|
|
//FIXME .use_clustering = ATA_SHT_USE_CLUSTERING,
|
|
|
|
.use_clustering = ENABLE_CLUSTERING,
|
|
|
|
.proc_name = DRV_NAME,
|
|
|
|
.dma_boundary = QS_DMA_BOUNDARY,
|
|
|
|
.slave_configure = ata_scsi_slave_config,
|
2006-05-31 03:28:09 -06:00
|
|
|
.slave_destroy = ata_scsi_slave_destroy,
|
2005-04-16 16:20:36 -06:00
|
|
|
.bios_param = ata_std_bios_param,
|
|
|
|
};
|
|
|
|
|
2005-10-22 12:27:05 -06:00
|
|
|
static const struct ata_port_operations qs_ata_ops = {
|
2005-04-16 16:20:36 -06:00
|
|
|
.port_disable = ata_port_disable,
|
|
|
|
.tf_load = ata_tf_load,
|
|
|
|
.tf_read = ata_tf_read,
|
|
|
|
.check_status = ata_check_status,
|
|
|
|
.check_atapi_dma = qs_check_atapi_dma,
|
|
|
|
.exec_command = ata_exec_command,
|
|
|
|
.dev_select = ata_std_dev_select,
|
|
|
|
.phy_reset = qs_phy_reset,
|
|
|
|
.qc_prep = qs_qc_prep,
|
|
|
|
.qc_issue = qs_qc_issue,
|
2007-01-31 23:06:36 -07:00
|
|
|
.data_xfer = ata_data_xfer,
|
2005-04-16 16:20:36 -06:00
|
|
|
.eng_timeout = qs_eng_timeout,
|
|
|
|
.irq_handler = qs_intr,
|
|
|
|
.irq_clear = qs_irq_clear,
|
2007-01-26 00:27:58 -07:00
|
|
|
.irq_on = ata_irq_on,
|
|
|
|
.irq_ack = ata_irq_ack,
|
2005-04-16 16:20:36 -06:00
|
|
|
.scr_read = qs_scr_read,
|
|
|
|
.scr_write = qs_scr_write,
|
|
|
|
.port_start = qs_port_start,
|
|
|
|
.host_stop = qs_host_stop,
|
|
|
|
.bmdma_stop = qs_bmdma_stop,
|
|
|
|
.bmdma_status = qs_bmdma_status,
|
|
|
|
};
|
|
|
|
|
2005-11-28 02:06:23 -07:00
|
|
|
static const struct ata_port_info qs_port_info[] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
/* board_2068_idx */
|
|
|
|
{
|
|
|
|
.sht = &qs_ata_sht,
|
2006-08-24 01:19:22 -06:00
|
|
|
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
|
2005-04-16 16:20:36 -06:00
|
|
|
ATA_FLAG_SATA_RESET |
|
|
|
|
//FIXME ATA_FLAG_SRST |
|
2005-09-27 03:39:50 -06:00
|
|
|
ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING,
|
2005-04-16 16:20:36 -06:00
|
|
|
.pio_mask = 0x10, /* pio4 */
|
|
|
|
.udma_mask = 0x7f, /* udma0-6 */
|
|
|
|
.port_ops = &qs_ata_ops,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2005-11-10 09:04:11 -07:00
|
|
|
static const struct pci_device_id qs_ata_pci_tbl[] = {
|
2006-09-28 18:21:59 -06:00
|
|
|
{ PCI_VDEVICE(PDC, 0x2068), board_2068_idx },
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
{ } /* terminate list */
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct pci_driver qs_ata_pci_driver = {
|
|
|
|
.name = DRV_NAME,
|
|
|
|
.id_table = qs_ata_pci_tbl,
|
|
|
|
.probe = qs_ata_init_one,
|
|
|
|
.remove = ata_pci_remove_one,
|
|
|
|
};
|
|
|
|
|
2007-01-31 23:06:36 -07:00
|
|
|
static void __iomem *qs_mmio_base(struct ata_host *host)
|
|
|
|
{
|
|
|
|
return host->iomap[QS_MMIO_BAR];
|
|
|
|
}
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
static int qs_check_atapi_dma(struct ata_queued_cmd *qc)
|
|
|
|
{
|
|
|
|
return 1; /* ATAPI DMA not supported */
|
|
|
|
}
|
|
|
|
|
2005-08-27 02:13:52 -06:00
|
|
|
static void qs_bmdma_stop(struct ata_queued_cmd *qc)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
/* nothing */
|
|
|
|
}
|
|
|
|
|
|
|
|
static u8 qs_bmdma_status(struct ata_port *ap)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_irq_clear(struct ata_port *ap)
|
|
|
|
{
|
|
|
|
/* nothing */
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void qs_enter_reg_mode(struct ata_port *ap)
|
|
|
|
{
|
2007-01-31 23:06:36 -07:00
|
|
|
u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
|
|
|
|
readb(chan + QS_CCT_CTR0); /* flush */
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void qs_reset_channel_logic(struct ata_port *ap)
|
|
|
|
{
|
2007-01-31 23:06:36 -07:00
|
|
|
u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1);
|
|
|
|
readb(chan + QS_CCT_CTR0); /* flush */
|
|
|
|
qs_enter_reg_mode(ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_phy_reset(struct ata_port *ap)
|
|
|
|
{
|
|
|
|
struct qs_port_priv *pp = ap->private_data;
|
|
|
|
|
|
|
|
pp->state = qs_state_idle;
|
|
|
|
qs_reset_channel_logic(ap);
|
|
|
|
sata_phy_reset(ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_eng_timeout(struct ata_port *ap)
|
|
|
|
{
|
|
|
|
struct qs_port_priv *pp = ap->private_data;
|
|
|
|
|
|
|
|
if (pp->state != qs_state_idle) /* healthy paranoia */
|
|
|
|
pp->state = qs_state_mmio;
|
|
|
|
qs_reset_channel_logic(ap);
|
|
|
|
ata_eng_timeout(ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg)
|
|
|
|
{
|
|
|
|
if (sc_reg > SCR_CONTROL)
|
|
|
|
return ~0U;
|
2007-01-31 23:06:36 -07:00
|
|
|
return readl(ap->ioaddr.scr_addr + (sc_reg * 8));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
|
|
|
|
{
|
|
|
|
if (sc_reg > SCR_CONTROL)
|
|
|
|
return;
|
2007-01-31 23:06:36 -07:00
|
|
|
writel(val, ap->ioaddr.scr_addr + (sc_reg * 8));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-11-11 23:27:07 -07:00
|
|
|
static unsigned int qs_fill_sg(struct ata_queued_cmd *qc)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2005-10-05 05:13:30 -06:00
|
|
|
struct scatterlist *sg;
|
2005-04-16 16:20:36 -06:00
|
|
|
struct ata_port *ap = qc->ap;
|
|
|
|
struct qs_port_priv *pp = ap->private_data;
|
|
|
|
unsigned int nelem;
|
|
|
|
u8 *prd = pp->pkt + QS_CPB_BYTES;
|
|
|
|
|
2006-02-11 03:11:13 -07:00
|
|
|
WARN_ON(qc->__sg == NULL);
|
2006-02-20 14:55:56 -07:00
|
|
|
WARN_ON(qc->n_elem == 0 && qc->pad_len == 0);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-10-05 05:13:30 -06:00
|
|
|
nelem = 0;
|
|
|
|
ata_for_each_sg(sg, qc) {
|
2005-04-16 16:20:36 -06:00
|
|
|
u64 addr;
|
|
|
|
u32 len;
|
|
|
|
|
|
|
|
addr = sg_dma_address(sg);
|
|
|
|
*(__le64 *)prd = cpu_to_le64(addr);
|
|
|
|
prd += sizeof(u64);
|
|
|
|
|
|
|
|
len = sg_dma_len(sg);
|
|
|
|
*(__le32 *)prd = cpu_to_le32(len);
|
|
|
|
prd += sizeof(u64);
|
|
|
|
|
|
|
|
VPRINTK("PRD[%u] = (0x%llX, 0x%X)\n", nelem,
|
|
|
|
(unsigned long long)addr, len);
|
2005-10-05 05:13:30 -06:00
|
|
|
nelem++;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-11-11 23:27:07 -07:00
|
|
|
|
|
|
|
return nelem;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_qc_prep(struct ata_queued_cmd *qc)
|
|
|
|
{
|
|
|
|
struct qs_port_priv *pp = qc->ap->private_data;
|
|
|
|
u8 dflags = QS_DF_PORD, *buf = pp->pkt;
|
|
|
|
u8 hflags = QS_HF_DAT | QS_HF_IEN | QS_HF_VLD;
|
|
|
|
u64 addr;
|
2005-11-11 23:27:07 -07:00
|
|
|
unsigned int nelem;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
VPRINTK("ENTER\n");
|
|
|
|
|
|
|
|
qs_enter_reg_mode(qc->ap);
|
|
|
|
if (qc->tf.protocol != ATA_PROT_DMA) {
|
|
|
|
ata_qc_prep(qc);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-11-11 23:27:07 -07:00
|
|
|
nelem = qs_fill_sg(qc);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
if ((qc->tf.flags & ATA_TFLAG_WRITE))
|
|
|
|
hflags |= QS_HF_DIRO;
|
|
|
|
if ((qc->tf.flags & ATA_TFLAG_LBA48))
|
|
|
|
dflags |= QS_DF_ELBA;
|
|
|
|
|
|
|
|
/* host control block (HCB) */
|
|
|
|
buf[ 0] = QS_HCB_HDR;
|
|
|
|
buf[ 1] = hflags;
|
2007-01-03 01:30:39 -07:00
|
|
|
*(__le32 *)(&buf[ 4]) = cpu_to_le32(qc->nbytes);
|
2005-11-11 23:27:07 -07:00
|
|
|
*(__le32 *)(&buf[ 8]) = cpu_to_le32(nelem);
|
2005-04-16 16:20:36 -06:00
|
|
|
addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES;
|
|
|
|
*(__le64 *)(&buf[16]) = cpu_to_le64(addr);
|
|
|
|
|
|
|
|
/* device control block (DCB) */
|
|
|
|
buf[24] = QS_DCB_HDR;
|
|
|
|
buf[28] = dflags;
|
|
|
|
|
|
|
|
/* frame information structure (FIS) */
|
|
|
|
ata_tf_to_fis(&qc->tf, &buf[32], 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void qs_packet_start(struct ata_queued_cmd *qc)
|
|
|
|
{
|
|
|
|
struct ata_port *ap = qc->ap;
|
2007-01-31 23:06:36 -07:00
|
|
|
u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
VPRINTK("ENTER, ap %p\n", ap);
|
|
|
|
|
|
|
|
writeb(QS_CTR0_CLER, chan + QS_CCT_CTR0);
|
|
|
|
wmb(); /* flush PRDs and pkt to memory */
|
|
|
|
writel(QS_CCF_RUN_PKT, chan + QS_CCT_CFF);
|
|
|
|
readl(chan + QS_CCT_CFF); /* flush */
|
|
|
|
}
|
|
|
|
|
2006-01-22 21:09:36 -07:00
|
|
|
static unsigned int qs_qc_issue(struct ata_queued_cmd *qc)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
struct qs_port_priv *pp = qc->ap->private_data;
|
|
|
|
|
|
|
|
switch (qc->tf.protocol) {
|
|
|
|
case ATA_PROT_DMA:
|
|
|
|
|
|
|
|
pp->state = qs_state_pkt;
|
|
|
|
qs_packet_start(qc);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
case ATA_PROT_ATAPI_DMA:
|
|
|
|
BUG();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
pp->state = qs_state_mmio;
|
|
|
|
return ata_qc_issue_prot(qc);
|
|
|
|
}
|
|
|
|
|
2006-08-24 01:19:22 -06:00
|
|
|
static inline unsigned int qs_intr_pkt(struct ata_host *host)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
unsigned int handled = 0;
|
|
|
|
u8 sFFE;
|
2007-01-31 23:06:36 -07:00
|
|
|
u8 __iomem *mmio_base = qs_mmio_base(host);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
do {
|
|
|
|
u32 sff0 = readl(mmio_base + QS_HST_SFF);
|
|
|
|
u32 sff1 = readl(mmio_base + QS_HST_SFF + 4);
|
|
|
|
u8 sEVLD = (sff1 >> 30) & 0x01; /* valid flag */
|
|
|
|
sFFE = sff1 >> 31; /* empty flag */
|
|
|
|
|
|
|
|
if (sEVLD) {
|
|
|
|
u8 sDST = sff0 >> 16; /* dev status */
|
|
|
|
u8 sHST = sff1 & 0x3f; /* host status */
|
|
|
|
unsigned int port_no = (sff1 >> 8) & 0x03;
|
2006-08-24 01:19:22 -06:00
|
|
|
struct ata_port *ap = host->ports[port_no];
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n",
|
|
|
|
sff1, sff0, port_no, sHST, sDST);
|
|
|
|
handled = 1;
|
2006-04-02 08:30:40 -06:00
|
|
|
if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
|
2005-04-16 16:20:36 -06:00
|
|
|
struct ata_queued_cmd *qc;
|
|
|
|
struct qs_port_priv *pp = ap->private_data;
|
|
|
|
if (!pp || pp->state != qs_state_pkt)
|
|
|
|
continue;
|
|
|
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
2005-09-27 03:39:50 -06:00
|
|
|
if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
|
2005-04-16 16:20:36 -06:00
|
|
|
switch (sHST) {
|
2005-10-30 02:44:42 -07:00
|
|
|
case 0: /* successful CPB */
|
2005-04-16 16:20:36 -06:00
|
|
|
case 3: /* device error */
|
|
|
|
pp->state = qs_state_idle;
|
|
|
|
qs_enter_reg_mode(qc->ap);
|
2005-12-05 00:38:02 -07:00
|
|
|
qc->err_mask |= ac_err_mask(sDST);
|
|
|
|
ata_qc_complete(qc);
|
2005-04-16 16:20:36 -06:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} while (!sFFE);
|
|
|
|
return handled;
|
|
|
|
}
|
|
|
|
|
2006-08-24 01:19:22 -06:00
|
|
|
static inline unsigned int qs_intr_mmio(struct ata_host *host)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
unsigned int handled = 0, port_no;
|
|
|
|
|
2006-08-24 01:19:22 -06:00
|
|
|
for (port_no = 0; port_no < host->n_ports; ++port_no) {
|
2005-04-16 16:20:36 -06:00
|
|
|
struct ata_port *ap;
|
2006-08-24 01:19:22 -06:00
|
|
|
ap = host->ports[port_no];
|
2005-08-21 23:59:24 -06:00
|
|
|
if (ap &&
|
2006-04-02 08:30:40 -06:00
|
|
|
!(ap->flags & ATA_FLAG_DISABLED)) {
|
2005-04-16 16:20:36 -06:00
|
|
|
struct ata_queued_cmd *qc;
|
|
|
|
struct qs_port_priv *pp = ap->private_data;
|
|
|
|
if (!pp || pp->state != qs_state_mmio)
|
|
|
|
continue;
|
|
|
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
2005-09-27 03:39:50 -06:00
|
|
|
if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* check main status, clearing INTRQ */
|
2005-10-29 11:58:21 -06:00
|
|
|
u8 status = ata_check_status(ap);
|
2005-04-16 16:20:36 -06:00
|
|
|
if ((status & ATA_BUSY))
|
|
|
|
continue;
|
|
|
|
DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n",
|
|
|
|
ap->id, qc->tf.protocol, status);
|
2005-07-31 11:13:24 -06:00
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
/* complete taskfile transaction */
|
|
|
|
pp->state = qs_state_idle;
|
2005-12-05 00:38:02 -07:00
|
|
|
qc->err_mask |= ac_err_mask(status);
|
|
|
|
ata_qc_complete(qc);
|
2005-04-16 16:20:36 -06:00
|
|
|
handled = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return handled;
|
|
|
|
}
|
|
|
|
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
static irqreturn_t qs_intr(int irq, void *dev_instance)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2006-08-24 01:19:22 -06:00
|
|
|
struct ata_host *host = dev_instance;
|
2005-04-16 16:20:36 -06:00
|
|
|
unsigned int handled = 0;
|
|
|
|
|
|
|
|
VPRINTK("ENTER\n");
|
|
|
|
|
2006-08-24 01:19:22 -06:00
|
|
|
spin_lock(&host->lock);
|
|
|
|
handled = qs_intr_pkt(host) | qs_intr_mmio(host);
|
|
|
|
spin_unlock(&host->lock);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
VPRINTK("EXIT\n");
|
|
|
|
|
|
|
|
return IRQ_RETVAL(handled);
|
|
|
|
}
|
|
|
|
|
2007-01-31 23:06:36 -07:00
|
|
|
static void qs_ata_setup_port(struct ata_ioports *port, void __iomem *base)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
port->cmd_addr =
|
|
|
|
port->data_addr = base + 0x400;
|
|
|
|
port->error_addr =
|
|
|
|
port->feature_addr = base + 0x408; /* hob_feature = 0x409 */
|
|
|
|
port->nsect_addr = base + 0x410; /* hob_nsect = 0x411 */
|
|
|
|
port->lbal_addr = base + 0x418; /* hob_lbal = 0x419 */
|
|
|
|
port->lbam_addr = base + 0x420; /* hob_lbam = 0x421 */
|
|
|
|
port->lbah_addr = base + 0x428; /* hob_lbah = 0x429 */
|
|
|
|
port->device_addr = base + 0x430;
|
|
|
|
port->status_addr =
|
|
|
|
port->command_addr = base + 0x438;
|
|
|
|
port->altstatus_addr =
|
|
|
|
port->ctl_addr = base + 0x440;
|
|
|
|
port->scr_addr = base + 0xc00;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int qs_port_start(struct ata_port *ap)
|
|
|
|
{
|
2006-08-24 01:19:22 -06:00
|
|
|
struct device *dev = ap->host->dev;
|
2005-04-16 16:20:36 -06:00
|
|
|
struct qs_port_priv *pp;
|
2007-01-31 23:06:36 -07:00
|
|
|
void __iomem *mmio_base = qs_mmio_base(ap->host);
|
2005-04-16 16:20:36 -06:00
|
|
|
void __iomem *chan = mmio_base + (ap->port_no * 0x4000);
|
|
|
|
u64 addr;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
rc = ata_port_start(ap);
|
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
qs_enter_reg_mode(ap);
|
2007-01-20 00:00:28 -07:00
|
|
|
pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL);
|
|
|
|
if (!pp)
|
|
|
|
return -ENOMEM;
|
|
|
|
pp->pkt = dmam_alloc_coherent(dev, QS_PKT_BYTES, &pp->pkt_dma,
|
|
|
|
GFP_KERNEL);
|
|
|
|
if (!pp->pkt)
|
|
|
|
return -ENOMEM;
|
2005-04-16 16:20:36 -06:00
|
|
|
memset(pp->pkt, 0, QS_PKT_BYTES);
|
|
|
|
ap->private_data = pp;
|
|
|
|
|
|
|
|
addr = (u64)pp->pkt_dma;
|
|
|
|
writel((u32) addr, chan + QS_CCF_CPBA);
|
|
|
|
writel((u32)(addr >> 32), chan + QS_CCF_CPBA + 4);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-08-24 01:19:22 -06:00
|
|
|
static void qs_host_stop(struct ata_host *host)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2007-01-31 23:06:36 -07:00
|
|
|
void __iomem *mmio_base = qs_mmio_base(host);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */
|
|
|
|
writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe)
|
|
|
|
{
|
2007-01-31 23:06:36 -07:00
|
|
|
void __iomem *mmio_base = pe->iomap[QS_MMIO_BAR];
|
2005-04-16 16:20:36 -06:00
|
|
|
unsigned int port_no;
|
|
|
|
|
|
|
|
writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */
|
|
|
|
writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */
|
|
|
|
|
|
|
|
/* reset each channel in turn */
|
|
|
|
for (port_no = 0; port_no < pe->n_ports; ++port_no) {
|
|
|
|
u8 __iomem *chan = mmio_base + (port_no * 0x4000);
|
|
|
|
writeb(QS_CTR1_RDEV|QS_CTR1_RCHN, chan + QS_CCT_CTR1);
|
|
|
|
writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
|
|
|
|
readb(chan + QS_CCT_CTR0); /* flush */
|
|
|
|
}
|
|
|
|
writeb(QS_SERD3_PHY_ENA, mmio_base + QS_HVS_SERD3); /* enable phy */
|
|
|
|
|
|
|
|
for (port_no = 0; port_no < pe->n_ports; ++port_no) {
|
|
|
|
u8 __iomem *chan = mmio_base + (port_no * 0x4000);
|
|
|
|
/* set FIFO depths to same settings as Windows driver */
|
|
|
|
writew(32, chan + QS_CFC_HUFT);
|
|
|
|
writew(32, chan + QS_CFC_HDFT);
|
|
|
|
writew(10, chan + QS_CFC_DUFT);
|
|
|
|
writew( 8, chan + QS_CFC_DDFT);
|
|
|
|
/* set CPB size in bytes, as a power of two */
|
|
|
|
writeb(QS_CPB_ORDER, chan + QS_CCF_CSEP);
|
|
|
|
}
|
|
|
|
writeb(1, mmio_base + QS_HCT_CTRL); /* enable host interrupts */
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The QStor understands 64-bit buses, and uses 64-bit fields
|
|
|
|
* for DMA pointers regardless of bus width. We just have to
|
|
|
|
* make sure our DMA masks are set appropriately for whatever
|
|
|
|
* bridge lies between us and the QStor, and then the DMA mapping
|
|
|
|
* code will ensure we only ever "see" appropriate buffer addresses.
|
|
|
|
* If we're 32-bit limited somewhere, then our 64-bit fields will
|
|
|
|
* just end up with zeros in the upper 32-bits, without any special
|
|
|
|
* logic required outside of this routine (below).
|
|
|
|
*/
|
|
|
|
static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
|
|
|
|
{
|
|
|
|
u32 bus_info = readl(mmio_base + QS_HID_HPHY);
|
|
|
|
int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT);
|
|
|
|
|
|
|
|
if (have_64bit_bus &&
|
|
|
|
!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
|
|
|
|
rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
|
|
|
|
if (rc) {
|
|
|
|
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
|
|
|
if (rc) {
|
2005-10-30 12:39:11 -07:00
|
|
|
dev_printk(KERN_ERR, &pdev->dev,
|
|
|
|
"64-bit DMA enable failed\n");
|
2005-04-16 16:20:36 -06:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
|
|
|
if (rc) {
|
2005-10-30 12:39:11 -07:00
|
|
|
dev_printk(KERN_ERR, &pdev->dev,
|
|
|
|
"32-bit DMA enable failed\n");
|
2005-04-16 16:20:36 -06:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
|
|
|
if (rc) {
|
2005-10-30 12:39:11 -07:00
|
|
|
dev_printk(KERN_ERR, &pdev->dev,
|
|
|
|
"32-bit consistent DMA enable failed\n");
|
2005-04-16 16:20:36 -06:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int qs_ata_init_one(struct pci_dev *pdev,
|
|
|
|
const struct pci_device_id *ent)
|
|
|
|
{
|
|
|
|
static int printed_version;
|
2007-01-31 23:06:36 -07:00
|
|
|
struct ata_probe_ent *probe_ent;
|
|
|
|
void __iomem * const *iomap;
|
2005-04-16 16:20:36 -06:00
|
|
|
unsigned int board_idx = (unsigned int) ent->driver_data;
|
|
|
|
int rc, port_no;
|
|
|
|
|
|
|
|
if (!printed_version++)
|
2005-10-30 12:39:11 -07:00
|
|
|
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2007-01-20 00:00:28 -07:00
|
|
|
rc = pcim_enable_device(pdev);
|
2005-04-16 16:20:36 -06:00
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
|
2007-01-31 23:06:36 -07:00
|
|
|
if ((pci_resource_flags(pdev, QS_MMIO_BAR) & IORESOURCE_MEM) == 0)
|
2007-01-20 00:00:28 -07:00
|
|
|
return -ENODEV;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2007-01-31 23:06:36 -07:00
|
|
|
rc = pcim_iomap_regions(pdev, 1 << QS_MMIO_BAR, DRV_NAME);
|
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
iomap = pcim_iomap_table(pdev);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2007-01-31 23:06:36 -07:00
|
|
|
rc = qs_set_dma_masks(pdev, iomap[QS_MMIO_BAR]);
|
2005-04-16 16:20:36 -06:00
|
|
|
if (rc)
|
2007-01-20 00:00:28 -07:00
|
|
|
return rc;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2007-01-20 00:00:28 -07:00
|
|
|
probe_ent = devm_kzalloc(&pdev->dev, sizeof(*probe_ent), GFP_KERNEL);
|
|
|
|
if (probe_ent == NULL)
|
|
|
|
return -ENOMEM;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
probe_ent->dev = pci_dev_to_dev(pdev);
|
|
|
|
INIT_LIST_HEAD(&probe_ent->node);
|
|
|
|
|
|
|
|
probe_ent->sht = qs_port_info[board_idx].sht;
|
2006-08-24 01:19:22 -06:00
|
|
|
probe_ent->port_flags = qs_port_info[board_idx].flags;
|
2005-04-16 16:20:36 -06:00
|
|
|
probe_ent->pio_mask = qs_port_info[board_idx].pio_mask;
|
|
|
|
probe_ent->mwdma_mask = qs_port_info[board_idx].mwdma_mask;
|
|
|
|
probe_ent->udma_mask = qs_port_info[board_idx].udma_mask;
|
|
|
|
probe_ent->port_ops = qs_port_info[board_idx].port_ops;
|
|
|
|
|
|
|
|
probe_ent->irq = pdev->irq;
|
2006-07-01 20:29:42 -06:00
|
|
|
probe_ent->irq_flags = IRQF_SHARED;
|
2007-01-31 23:06:36 -07:00
|
|
|
probe_ent->iomap = iomap;
|
2005-04-16 16:20:36 -06:00
|
|
|
probe_ent->n_ports = QS_PORTS;
|
|
|
|
|
|
|
|
for (port_no = 0; port_no < probe_ent->n_ports; ++port_no) {
|
2007-01-31 23:06:36 -07:00
|
|
|
void __iomem *chan =
|
|
|
|
probe_ent->iomap[QS_MMIO_BAR] + (port_no * 0x4000);
|
2005-04-16 16:20:36 -06:00
|
|
|
qs_ata_setup_port(&probe_ent->port[port_no], chan);
|
|
|
|
}
|
|
|
|
|
|
|
|
pci_set_master(pdev);
|
|
|
|
|
|
|
|
/* initialize adapter */
|
|
|
|
qs_host_init(board_idx, probe_ent);
|
|
|
|
|
2007-01-20 00:00:28 -07:00
|
|
|
if (ata_device_add(probe_ent) != QS_PORTS)
|
|
|
|
return -EIO;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2007-01-20 00:00:28 -07:00
|
|
|
devm_kfree(&pdev->dev, probe_ent);
|
|
|
|
return 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static int __init qs_ata_init(void)
|
|
|
|
{
|
2006-08-10 03:13:18 -06:00
|
|
|
return pci_register_driver(&qs_ata_pci_driver);
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit qs_ata_exit(void)
|
|
|
|
{
|
|
|
|
pci_unregister_driver(&qs_ata_pci_driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
MODULE_AUTHOR("Mark Lord");
|
|
|
|
MODULE_DESCRIPTION("Pacific Digital Corporation QStor SATA low-level driver");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_DEVICE_TABLE(pci, qs_ata_pci_tbl);
|
|
|
|
MODULE_VERSION(DRV_VERSION);
|
|
|
|
|
|
|
|
module_init(qs_ata_init);
|
|
|
|
module_exit(qs_ata_exit);
|