Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_spi.h>
#include "cam.h"
#include "queue.h"
#include "scsi_message.h"
#include "scsi_iu.h"
#include "aiclib.h"
#include "aic79xx.h"
#include <linux/spinlock.h>
Go to the source code of this file.
Data Structures | |
union | bus_space_handle_t |
struct | bus_dma_segment |
struct | ahd_linux_dma_tag |
struct | ahd_linux_device |
struct | scb_platform_data |
struct | ahd_platform_data |
struct | info_str |
Macros | |
#define | AIC_LIB_PREFIX ahd |
#define | powerof2(x) ((((x)-1)&(x))==0) |
#define | ahd_htobe16(x) cpu_to_be16(x) |
#define | ahd_htobe32(x) cpu_to_be32(x) |
#define | ahd_htobe64(x) cpu_to_be64(x) |
#define | ahd_htole16(x) cpu_to_le16(x) |
#define | ahd_htole32(x) cpu_to_le32(x) |
#define | ahd_htole64(x) cpu_to_le64(x) |
#define | ahd_be16toh(x) be16_to_cpu(x) |
#define | ahd_be32toh(x) be32_to_cpu(x) |
#define | ahd_be64toh(x) be64_to_cpu(x) |
#define | ahd_le16toh(x) le16_to_cpu(x) |
#define | ahd_le32toh(x) le32_to_cpu(x) |
#define | ahd_le64toh(x) le64_to_cpu(x) |
#define | BUS_DMA_WAITOK 0x0 |
#define | BUS_DMA_NOWAIT 0x1 |
#define | BUS_DMA_ALLOCNOW 0x2 |
#define | BUS_DMA_LOAD_SEGS |
#define | BUS_SPACE_MAXADDR 0xFFFFFFFF |
#define | BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF |
#define | BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF |
#define | BUS_DMASYNC_PREREAD 0x01 /* pre-read synchronization */ |
#define | BUS_DMASYNC_POSTREAD 0x02 /* post-read synchronization */ |
#define | BUS_DMASYNC_PREWRITE 0x04 /* pre-write synchronization */ |
#define | BUS_DMASYNC_POSTWRITE 0x08 /* post-write synchronization */ |
#define | ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op) |
#define | AIC_DEBUG_REGISTERS 0 |
#define | ahd_timer_init init_timer |
#define | ahd_timer_stop del_timer_sync |
#define | AIC79XX_DRIVER_VERSION "3.0" |
#define | AHD_TAG_SUCCESS_INTERVAL 50 |
#define | AHD_LOCK_TAGS_COUNT 50 |
#define | AHD_OTAG_THRESH 500 |
#define | AHD_NSEG 128 |
#define | AHD_LINUX_NOIRQ ((uint32_t)~0) |
#define | PCIR_DEVVENDOR 0x00 |
#define | PCIR_VENDOR 0x00 |
#define | PCIR_DEVICE 0x02 |
#define | PCIR_COMMAND 0x04 |
#define | PCIM_CMD_PORTEN 0x0001 |
#define | PCIM_CMD_MEMEN 0x0002 |
#define | PCIM_CMD_BUSMASTEREN 0x0004 |
#define | PCIM_CMD_MWRICEN 0x0010 |
#define | PCIM_CMD_PERRESPEN 0x0040 |
#define | PCIM_CMD_SERRESPEN 0x0100 |
#define | PCIR_STATUS 0x06 |
#define | PCIR_REVID 0x08 |
#define | PCIR_PROGIF 0x09 |
#define | PCIR_SUBCLASS 0x0a |
#define | PCIR_CLASS 0x0b |
#define | PCIR_CACHELNSZ 0x0c |
#define | PCIR_LATTIMER 0x0d |
#define | PCIR_HEADERTYPE 0x0e |
#define | PCIM_MFDEV 0x80 |
#define | PCIR_BIST 0x0f |
#define | PCIR_CAP_PTR 0x34 |
#define | PCIR_MAPS 0x10 |
#define | PCIR_SUBVEND_0 0x2c |
#define | PCIR_SUBDEV_0 0x2e |
#define | PCIXR_COMMAND 0x96 |
#define | PCIXR_DEVADDR 0x98 |
#define | PCIXM_DEVADDR_FNUM 0x0003 /* Function Number */ |
#define | PCIXM_DEVADDR_DNUM 0x00F8 /* Device Number */ |
#define | PCIXM_DEVADDR_BNUM 0xFF00 /* Bus Number */ |
#define | PCIXR_STATUS 0x9A |
#define | PCIXM_STATUS_64BIT 0x0001 /* Active 64bit connection to device. */ |
#define | PCIXM_STATUS_133CAP 0x0002 /* Device is 133MHz capable */ |
#define | PCIXM_STATUS_SCDISC 0x0004 /* Split Completion Discarded */ |
#define | PCIXM_STATUS_UNEXPSC 0x0008 /* Unexpected Split Completion */ |
#define | PCIXM_STATUS_CMPLEXDEV 0x0010 /* Device Complexity (set == bridge) */ |
#define | PCIXM_STATUS_MAXMRDBC 0x0060 /* Maximum Burst Read Count */ |
#define | PCIXM_STATUS_MAXSPLITS 0x0380 /* Maximum Split Transactions */ |
#define | PCIXM_STATUS_MAXCRDS 0x1C00 /* Maximum Cumulative Read Size */ |
#define | PCIXM_STATUS_RCVDSCEM 0x2000 /* Received a Split Comp w/Error msg */ |
#define | AHD_PCI_CONFIG 0 |
#define | bootverbose aic79xx_verbose |
Typedefs | |
typedef struct pci_dev * | ahd_dev_softc_t |
typedef struct scsi_cmnd * | ahd_io_ctx_t |
typedef uint32_t | bus_size_t |
typedef struct bus_dma_segment | bus_dma_segment_t |
typedef struct ahd_linux_dma_tag * | bus_dma_tag_t |
typedef dma_addr_t | bus_dmamap_t |
typedef int | bus_dma_filter_t (void *, dma_addr_t) |
typedef void | bus_dmamap_callback_t (void *, bus_dma_segment_t *, int, int) |
typedef struct timer_list | ahd_timer_t |
Enumerations | |
enum | bus_space_tag_t { BUS_SPACE_MEMIO, BUS_SPACE_PIO, BUS_SPACE_MEMIO, BUS_SPACE_PIO } |
enum | ahd_linux_dev_flags { AHD_DEV_FREEZE_TIL_EMPTY = 0x02, AHD_DEV_Q_BASIC = 0x10, AHD_DEV_Q_TAGGED = 0x20, AHD_DEV_PERIODIC_OTAG = 0x40 } |
enum | ahd_power_state { AHD_POWER_STATE_D0, AHD_POWER_STATE_D1, AHD_POWER_STATE_D2, AHD_POWER_STATE_D3 } |
Variables | |
uint32_t | aic79xx_allow_memio |
struct scsi_host_template | aic79xx_driver_template |
uint32_t | aic79xx_verbose |
#define ahd_be16toh | ( | x | ) | be16_to_cpu(x) |
Definition at line 110 of file aic79xx_osm.h.
#define ahd_be32toh | ( | x | ) | be32_to_cpu(x) |
Definition at line 111 of file aic79xx_osm.h.
#define ahd_be64toh | ( | x | ) | be64_to_cpu(x) |
Definition at line 112 of file aic79xx_osm.h.
Definition at line 206 of file aic79xx_osm.h.
#define ahd_htobe16 | ( | x | ) | cpu_to_be16(x) |
Definition at line 103 of file aic79xx_osm.h.
#define ahd_htobe32 | ( | x | ) | cpu_to_be32(x) |
Definition at line 104 of file aic79xx_osm.h.
#define ahd_htobe64 | ( | x | ) | cpu_to_be64(x) |
Definition at line 105 of file aic79xx_osm.h.
#define ahd_htole16 | ( | x | ) | cpu_to_le16(x) |
Definition at line 106 of file aic79xx_osm.h.
#define ahd_htole32 | ( | x | ) | cpu_to_le32(x) |
Definition at line 107 of file aic79xx_osm.h.
#define ahd_htole64 | ( | x | ) | cpu_to_le64(x) |
Definition at line 108 of file aic79xx_osm.h.
#define ahd_le16toh | ( | x | ) | le16_to_cpu(x) |
Definition at line 113 of file aic79xx_osm.h.
#define ahd_le32toh | ( | x | ) | le32_to_cpu(x) |
Definition at line 114 of file aic79xx_osm.h.
#define ahd_le64toh | ( | x | ) | le64_to_cpu(x) |
Definition at line 115 of file aic79xx_osm.h.
#define AHD_LINUX_NOIRQ ((uint32_t)~0) |
Definition at line 357 of file aic79xx_osm.h.
#define AHD_LOCK_TAGS_COUNT 50 |
Definition at line 308 of file aic79xx_osm.h.
#define AHD_NSEG 128 |
Definition at line 330 of file aic79xx_osm.h.
#define AHD_OTAG_THRESH 500 |
Definition at line 320 of file aic79xx_osm.h.
#define AHD_PCI_CONFIG 0 |
Definition at line 695 of file aic79xx_osm.h.
#define AHD_TAG_SUCCESS_INTERVAL 50 |
Definition at line 281 of file aic79xx_osm.h.
#define ahd_timer_init init_timer |
Definition at line 220 of file aic79xx_osm.h.
#define ahd_timer_stop del_timer_sync |
Definition at line 221 of file aic79xx_osm.h.
#define AIC79XX_DRIVER_VERSION "3.0" |
Definition at line 226 of file aic79xx_osm.h.
#define AIC_DEBUG_REGISTERS 0 |
Definition at line 215 of file aic79xx_osm.h.
#define AIC_LIB_PREFIX ahd |
Definition at line 66 of file aic79xx_osm.h.
#define bootverbose aic79xx_verbose |
Definition at line 697 of file aic79xx_osm.h.
#define BUS_DMA_ALLOCNOW 0x2 |
Definition at line 156 of file aic79xx_osm.h.
#define BUS_DMA_LOAD_SEGS |
Definition at line 157 of file aic79xx_osm.h.
#define BUS_DMA_NOWAIT 0x1 |
Definition at line 155 of file aic79xx_osm.h.
#define BUS_DMA_WAITOK 0x0 |
Definition at line 154 of file aic79xx_osm.h.
#define BUS_DMASYNC_POSTREAD 0x02 /* post-read synchronization */ |
Definition at line 194 of file aic79xx_osm.h.
#define BUS_DMASYNC_POSTWRITE 0x08 /* post-write synchronization */ |
Definition at line 196 of file aic79xx_osm.h.
#define BUS_DMASYNC_PREREAD 0x01 /* pre-read synchronization */ |
Definition at line 193 of file aic79xx_osm.h.
#define BUS_DMASYNC_PREWRITE 0x04 /* pre-write synchronization */ |
Definition at line 195 of file aic79xx_osm.h.
#define BUS_SPACE_MAXADDR 0xFFFFFFFF |
Definition at line 159 of file aic79xx_osm.h.
#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF |
Definition at line 160 of file aic79xx_osm.h.
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF |
Definition at line 161 of file aic79xx_osm.h.
#define PCIM_CMD_BUSMASTEREN 0x0004 |
Definition at line 422 of file aic79xx_osm.h.
#define PCIM_CMD_MEMEN 0x0002 |
Definition at line 421 of file aic79xx_osm.h.
#define PCIM_CMD_MWRICEN 0x0010 |
Definition at line 423 of file aic79xx_osm.h.
#define PCIM_CMD_PERRESPEN 0x0040 |
Definition at line 424 of file aic79xx_osm.h.
#define PCIM_CMD_PORTEN 0x0001 |
Definition at line 420 of file aic79xx_osm.h.
#define PCIM_CMD_SERRESPEN 0x0100 |
Definition at line 425 of file aic79xx_osm.h.
#define PCIM_MFDEV 0x80 |
Definition at line 434 of file aic79xx_osm.h.
#define PCIR_BIST 0x0f |
Definition at line 435 of file aic79xx_osm.h.
#define PCIR_CACHELNSZ 0x0c |
Definition at line 431 of file aic79xx_osm.h.
#define PCIR_CAP_PTR 0x34 |
Definition at line 436 of file aic79xx_osm.h.
#define PCIR_CLASS 0x0b |
Definition at line 430 of file aic79xx_osm.h.
#define PCIR_COMMAND 0x04 |
Definition at line 419 of file aic79xx_osm.h.
#define PCIR_DEVICE 0x02 |
Definition at line 418 of file aic79xx_osm.h.
#define PCIR_DEVVENDOR 0x00 |
Definition at line 416 of file aic79xx_osm.h.
#define PCIR_HEADERTYPE 0x0e |
Definition at line 433 of file aic79xx_osm.h.
#define PCIR_LATTIMER 0x0d |
Definition at line 432 of file aic79xx_osm.h.
#define PCIR_MAPS 0x10 |
Definition at line 439 of file aic79xx_osm.h.
#define PCIR_PROGIF 0x09 |
Definition at line 428 of file aic79xx_osm.h.
#define PCIR_REVID 0x08 |
Definition at line 427 of file aic79xx_osm.h.
#define PCIR_STATUS 0x06 |
Definition at line 426 of file aic79xx_osm.h.
#define PCIR_SUBCLASS 0x0a |
Definition at line 429 of file aic79xx_osm.h.
#define PCIR_SUBDEV_0 0x2e |
Definition at line 441 of file aic79xx_osm.h.
#define PCIR_SUBVEND_0 0x2c |
Definition at line 440 of file aic79xx_osm.h.
#define PCIR_VENDOR 0x00 |
Definition at line 417 of file aic79xx_osm.h.
#define PCIXM_DEVADDR_BNUM 0xFF00 /* Bus Number */ |
Definition at line 448 of file aic79xx_osm.h.
#define PCIXM_DEVADDR_DNUM 0x00F8 /* Device Number */ |
Definition at line 447 of file aic79xx_osm.h.
#define PCIXM_DEVADDR_FNUM 0x0003 /* Function Number */ |
Definition at line 446 of file aic79xx_osm.h.
#define PCIXM_STATUS_133CAP 0x0002 /* Device is 133MHz capable */ |
Definition at line 451 of file aic79xx_osm.h.
#define PCIXM_STATUS_64BIT 0x0001 /* Active 64bit connection to device. */ |
Definition at line 450 of file aic79xx_osm.h.
#define PCIXM_STATUS_CMPLEXDEV 0x0010 /* Device Complexity (set == bridge) */ |
Definition at line 454 of file aic79xx_osm.h.
#define PCIXM_STATUS_MAXCRDS 0x1C00 /* Maximum Cumulative Read Size */ |
Definition at line 457 of file aic79xx_osm.h.
#define PCIXM_STATUS_MAXMRDBC 0x0060 /* Maximum Burst Read Count */ |
Definition at line 455 of file aic79xx_osm.h.
#define PCIXM_STATUS_MAXSPLITS 0x0380 /* Maximum Split Transactions */ |
Definition at line 456 of file aic79xx_osm.h.
#define PCIXM_STATUS_RCVDSCEM 0x2000 /* Received a Split Comp w/Error msg */ |
Definition at line 458 of file aic79xx_osm.h.
#define PCIXM_STATUS_SCDISC 0x0004 /* Split Completion Discarded */ |
Definition at line 452 of file aic79xx_osm.h.
#define PCIXM_STATUS_UNEXPSC 0x0008 /* Unexpected Split Completion */ |
Definition at line 453 of file aic79xx_osm.h.
#define PCIXR_COMMAND 0x96 |
Definition at line 444 of file aic79xx_osm.h.
#define PCIXR_DEVADDR 0x98 |
Definition at line 445 of file aic79xx_osm.h.
#define PCIXR_STATUS 0x9A |
Definition at line 449 of file aic79xx_osm.h.
Definition at line 95 of file aic79xx_osm.h.
typedef struct pci_dev* ahd_dev_softc_t |
Definition at line 99 of file aic79xx_osm.h.
typedef struct scsi_cmnd* ahd_io_ctx_t |
Definition at line 100 of file aic79xx_osm.h.
typedef struct timer_list ahd_timer_t |
Definition at line 209 of file aic79xx_osm.h.
typedef int bus_dma_filter_t(void *, dma_addr_t) |
Definition at line 151 of file aic79xx_osm.h.
typedef struct bus_dma_segment bus_dma_segment_t |
typedef struct ahd_linux_dma_tag* bus_dma_tag_t |
Definition at line 147 of file aic79xx_osm.h.
typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int) |
Definition at line 152 of file aic79xx_osm.h.
typedef dma_addr_t bus_dmamap_t |
Definition at line 149 of file aic79xx_osm.h.
typedef uint32_t bus_size_t |
Definition at line 123 of file aic79xx_osm.h.
enum ahd_linux_dev_flags |
Definition at line 237 of file aic79xx_osm.h.
enum ahd_power_state |
Definition at line 460 of file aic79xx_osm.h.
enum bus_space_tag_t |
Definition at line 125 of file aic79xx_osm.h.
Definition at line 376 of file aic79xx_osm.c.
int ahd_dma_tag_create | ( | struct ahd_softc * | , |
bus_dma_tag_t | , | ||
bus_size_t | , | ||
bus_size_t | , | ||
dma_addr_t | , | ||
dma_addr_t | , | ||
bus_dma_filter_t * | , | ||
void * | , | ||
bus_size_t | , | ||
int | , | ||
bus_size_t | , | ||
int | , | ||
bus_dma_tag_t * | |||
) |
Definition at line 931 of file aic79xx_osm.c.
void ahd_dma_tag_destroy | ( | struct ahd_softc * | , |
bus_dma_tag_t | |||
) |
Definition at line 959 of file aic79xx_osm.c.
void ahd_dmamap_destroy | ( | struct ahd_softc * | , |
bus_dma_tag_t | , | ||
bus_dmamap_t | |||
) |
Definition at line 1001 of file aic79xx_osm.c.
int ahd_dmamap_load | ( | struct ahd_softc * | ahd, |
bus_dma_tag_t | , | ||
bus_dmamap_t | , | ||
void * | , | ||
bus_size_t | , | ||
bus_dmamap_callback_t * | , | ||
void * | , | ||
int | |||
) |
Definition at line 984 of file aic79xx_osm.c.
int ahd_dmamap_unload | ( | struct ahd_softc * | , |
bus_dma_tag_t | , | ||
bus_dmamap_t | |||
) |
Definition at line 1006 of file aic79xx_osm.c.
int ahd_dmamem_alloc | ( | struct ahd_softc * | , |
bus_dma_tag_t | , | ||
void ** | , | ||
int | , | ||
bus_dmamap_t * | |||
) |
Definition at line 965 of file aic79xx_osm.c.
void ahd_dmamem_free | ( | struct ahd_softc * | , |
bus_dma_tag_t | , | ||
void * | , | ||
bus_dmamap_t | |||
) |
Definition at line 976 of file aic79xx_osm.c.
Definition at line 467 of file aic79xx_osm.c.
irqreturn_t ahd_linux_isr | ( | int | irq, |
void * | dev_id | ||
) |
Definition at line 1685 of file aic79xx_osm.c.
Definition at line 246 of file aic79xx_osm_pci.c.
Definition at line 240 of file aic79xx_osm_pci.c.
Definition at line 322 of file aic79xx_proc.c.
int ahd_linux_register_host | ( | struct ahd_softc * | , |
struct scsi_host_template * | |||
) |
Definition at line 1223 of file aic79xx_osm.c.
Definition at line 431 of file aic79xx_osm.c.
Definition at line 453 of file aic79xx_osm.c.
Definition at line 442 of file aic79xx_osm.c.
Definition at line 382 of file aic79xx_osm_pci.c.
Definition at line 310 of file aic79xx_osm_pci.c.
uint32_t ahd_pci_read_config | ( | ahd_dev_softc_t | pci, |
int | reg, | ||
int | width | ||
) |
Definition at line 482 of file aic79xx_osm.c.
void ahd_pci_write_config | ( | ahd_dev_softc_t | pci, |
int | reg, | ||
uint32_t | value, | ||
int | width | ||
) |
Definition at line 512 of file aic79xx_osm.c.
int ahd_platform_abort_scbs | ( | struct ahd_softc * | ahd, |
int | target, | ||
char | channel, | ||
int | lun, | ||
u_int | tag, | ||
role_t | role, | ||
uint32_t | status | ||
) |
Definition at line 1490 of file aic79xx_osm.c.
Definition at line 1324 of file aic79xx_osm.c.
Definition at line 1338 of file aic79xx_osm.c.
Definition at line 1394 of file aic79xx_osm.c.
Definition at line 1374 of file aic79xx_osm.c.
void ahd_platform_set_tags | ( | struct ahd_softc * | ahd, |
struct scsi_device * | sdev, | ||
struct ahd_devinfo * | devinfo, | ||
ahd_queue_alg | |||
) |
Definition at line 1403 of file aic79xx_osm.c.
void ahd_power_state_change | ( | struct ahd_softc * | ahd, |
ahd_power_state | new_state | ||
) |
Definition at line 395 of file aic79xx_osm_pci.c.
Definition at line 224 of file aic79xx_osm.c.
Definition at line 1699 of file aic79xx_osm.c.
uint32_t aic79xx_allow_memio |
Definition at line 275 of file aic79xx_osm.c.
struct scsi_host_template aic79xx_driver_template |
Definition at line 905 of file aic79xx_osm.c.
uint32_t aic79xx_verbose |
Definition at line 1220 of file aic79xx_osm.c.