Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
sata_inic162x.c File Reference
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
#include <linux/blkdev.h>
#include <scsi/scsi_device.h>

Go to the source code of this file.

Data Structures

struct  inic_cpb
 
struct  inic_prd
 
struct  inic_pkt
 
struct  inic_host_priv
 
struct  inic_port_priv
 

Macros

#define DRV_NAME   "sata_inic162x"
 
#define DRV_VERSION   "0.4"
 

Enumerations

enum  {
  MMIO_BAR_PCI = 5, MMIO_BAR_CARDBUS = 1, NR_PORTS = 2, IDMA_CPB_TBL_SIZE = 4 * 32,
  INIC_DMA_BOUNDARY = 0xffffff, HOST_ACTRL = 0x08, HOST_CTL = 0x7c, HOST_STAT = 0x7e,
  HOST_IRQ_STAT = 0xbc, HOST_IRQ_MASK = 0xbe, PORT_SIZE = 0x40, PORT_TF_DATA = 0x00,
  PORT_TF_FEATURE = 0x01, PORT_TF_NSECT = 0x02, PORT_TF_LBAL = 0x03, PORT_TF_LBAM = 0x04,
  PORT_TF_LBAH = 0x05, PORT_TF_DEVICE = 0x06, PORT_TF_COMMAND = 0x07, PORT_TF_ALT_STAT = 0x08,
  PORT_IRQ_STAT = 0x09, PORT_IRQ_MASK = 0x0a, PORT_PRD_CTL = 0x0b, PORT_PRD_ADDR = 0x0c,
  PORT_PRD_XFERLEN = 0x10, PORT_CPB_CPBLAR = 0x18, PORT_CPB_PTQFIFO = 0x1c, PORT_IDMA_CTL = 0x14,
  PORT_IDMA_STAT = 0x16, PORT_RPQ_FIFO = 0x1e, PORT_RPQ_CNT = 0x1f, PORT_SCR = 0x20,
  HCTL_LEDEN = (1 << 3), HCTL_IRQOFF = (1 << 8), HCTL_FTHD0 = (1 << 10), HCTL_FTHD1 = (1 << 11),
  HCTL_PWRDWN = (1 << 12), HCTL_SOFTRST = (1 << 13), HCTL_RPGSEL = (1 << 15), HCTL_KNOWN_BITS,
  HIRQ_PORT0 = (1 << 0), HIRQ_PORT1 = (1 << 1), HIRQ_SOFT = (1 << 14), HIRQ_GLOBAL = (1 << 15),
  PIRQ_OFFLINE = (1 << 0), PIRQ_ONLINE = (1 << 1), PIRQ_COMPLETE = (1 << 2), PIRQ_FATAL = (1 << 3),
  PIRQ_ATA = (1 << 4), PIRQ_REPLY = (1 << 5), PIRQ_PENDING = (1 << 7), PIRQ_ERR = PIRQ_OFFLINE | PIRQ_ONLINE | PIRQ_FATAL,
  PIRQ_MASK_DEFAULT = PIRQ_REPLY | PIRQ_ATA, PIRQ_MASK_FREEZE = 0xff, PRD_CTL_START = (1 << 0), PRD_CTL_WR = (1 << 3),
  PRD_CTL_DMAEN = (1 << 7), IDMA_CTL_RST_ATA = (1 << 2), IDMA_CTL_RST_IDMA = (1 << 5), IDMA_CTL_GO = (1 << 7),
  IDMA_CTL_ATA_NIEN = (1 << 8), IDMA_STAT_PERR = (1 << 0), IDMA_STAT_CPBERR = (1 << 1), IDMA_STAT_LGCY = (1 << 3),
  IDMA_STAT_UIRQ = (1 << 4), IDMA_STAT_STPD = (1 << 5), IDMA_STAT_PSD = (1 << 6), IDMA_STAT_DONE = (1 << 7),
  IDMA_STAT_ERR = IDMA_STAT_PERR | IDMA_STAT_CPBERR, CPB_CTL_VALID = (1 << 0), CPB_CTL_QUEUED = (1 << 1), CPB_CTL_DATA = (1 << 2),
  CPB_CTL_IEN = (1 << 3), CPB_CTL_DEVDIR = (1 << 4), CPB_RESP_DONE = (1 << 0), CPB_RESP_REL = (1 << 1),
  CPB_RESP_IGNORED = (1 << 2), CPB_RESP_ATA_ERR = (1 << 3), CPB_RESP_SPURIOUS = (1 << 4), CPB_RESP_UNDERFLOW = (1 << 5),
  CPB_RESP_OVERFLOW = (1 << 6), CPB_RESP_CPB_ERR = (1 << 7), PRD_DRAIN = (1 << 1), PRD_CDB = (1 << 2),
  PRD_DIRECT_INTR = (1 << 3), PRD_DMA = (1 << 4), PRD_WRITE = (1 << 5), PRD_IOM = (1 << 6),
  PRD_END = (1 << 7)
}
 

Functions

 module_pci_driver (inic_pci_driver)
 
 MODULE_AUTHOR ("Tejun Heo")
 
 MODULE_DESCRIPTION ("low-level driver for Initio 162x SATA")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_DEVICE_TABLE (pci, inic_pci_tbl)
 
 MODULE_VERSION (DRV_VERSION)
 

Variables

struct inic_cpb __packed
 

Macro Definition Documentation

#define DRV_NAME   "sata_inic162x"

Definition at line 51 of file sata_inic162x.c.

#define DRV_VERSION   "0.4"

Definition at line 52 of file sata_inic162x.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MMIO_BAR_PCI 
MMIO_BAR_CARDBUS 
NR_PORTS 
IDMA_CPB_TBL_SIZE 
INIC_DMA_BOUNDARY 
HOST_ACTRL 
HOST_CTL 
HOST_STAT 
HOST_IRQ_STAT 
HOST_IRQ_MASK 
PORT_SIZE 
PORT_TF_DATA 
PORT_TF_FEATURE 
PORT_TF_NSECT 
PORT_TF_LBAL 
PORT_TF_LBAM 
PORT_TF_LBAH 
PORT_TF_DEVICE 
PORT_TF_COMMAND 
PORT_TF_ALT_STAT 
PORT_IRQ_STAT 
PORT_IRQ_MASK 
PORT_PRD_CTL 
PORT_PRD_ADDR 
PORT_PRD_XFERLEN 
PORT_CPB_CPBLAR 
PORT_CPB_PTQFIFO 
PORT_IDMA_CTL 
PORT_IDMA_STAT 
PORT_RPQ_FIFO 
PORT_RPQ_CNT 
PORT_SCR 
HCTL_LEDEN 
HCTL_IRQOFF 
HCTL_FTHD0 
HCTL_FTHD1 
HCTL_PWRDWN 
HCTL_SOFTRST 
HCTL_RPGSEL 
HCTL_KNOWN_BITS 
HIRQ_PORT0 
HIRQ_PORT1 
HIRQ_SOFT 
HIRQ_GLOBAL 
PIRQ_OFFLINE 
PIRQ_ONLINE 
PIRQ_COMPLETE 
PIRQ_FATAL 
PIRQ_ATA 
PIRQ_REPLY 
PIRQ_PENDING 
PIRQ_ERR 
PIRQ_MASK_DEFAULT 
PIRQ_MASK_FREEZE 
PRD_CTL_START 
PRD_CTL_WR 
PRD_CTL_DMAEN 
IDMA_CTL_RST_ATA 
IDMA_CTL_RST_IDMA 
IDMA_CTL_GO 
IDMA_CTL_ATA_NIEN 
IDMA_STAT_PERR 
IDMA_STAT_CPBERR 
IDMA_STAT_LGCY 
IDMA_STAT_UIRQ 
IDMA_STAT_STPD 
IDMA_STAT_PSD 
IDMA_STAT_DONE 
IDMA_STAT_ERR 
CPB_CTL_VALID 
CPB_CTL_QUEUED 
CPB_CTL_DATA 
CPB_CTL_IEN 
CPB_CTL_DEVDIR 
CPB_RESP_DONE 
CPB_RESP_REL 
CPB_RESP_IGNORED 
CPB_RESP_ATA_ERR 
CPB_RESP_SPURIOUS 
CPB_RESP_UNDERFLOW 
CPB_RESP_OVERFLOW 
CPB_RESP_CPB_ERR 
PRD_DRAIN 
PRD_CDB 
PRD_DIRECT_INTR 
PRD_DMA 
PRD_WRITE 
PRD_IOM 
PRD_END 

Definition at line 54 of file sata_inic162x.c.

Function Documentation

MODULE_AUTHOR ( "Tejun Heo"  )
MODULE_DESCRIPTION ( "low-level driver for Initio 162x SATA"  )
MODULE_DEVICE_TABLE ( pci  ,
inic_pci_tbl   
)
MODULE_LICENSE ( "GPL v2 )
module_pci_driver ( inic_pci_driver  )
MODULE_VERSION ( DRV_VERSION  )

Variable Documentation