Go to the documentation of this file.
29 #include <linux/kernel.h>
30 #include <linux/module.h>
33 #include <linux/types.h>
34 #include <linux/ctype.h>
36 #include <linux/pci.h>
40 #include <linux/slab.h>
43 #include <scsi/scsi.h>
48 #define DRV_NAME "mvsas"
49 #define DRV_VERSION "0.8.16"
50 #define MVS_ID_NOT_MAPPED 0x7f
51 #define WIDE_PORT_MAX_PHY 4
52 #define mv_printk(fmt, arg ...) \
53 printk(KERN_DEBUG"%s %d:" fmt, __FILE__, __LINE__, ## arg)
55 #define mv_dprintk(format, arg...) \
56 printk(KERN_DEBUG"%s %d:" format, __FILE__, __LINE__, ## arg)
58 #define mv_dprintk(format, arg...)
60 #define MV_MAX_U32 0xffffffff
63 extern struct mvs_tgt_initiator
mvs_tgt;
69 #define DEV_IS_EXPANDER(type) \
70 ((type == EDGE_DEV) || (type == FANOUT_DEV))
72 #define bit(n) ((u32)1 << n)
74 #define for_each_phy(__lseq_mask, __mc, __lseq) \
75 for ((__mc) = (__lseq_mask), (__lseq) = 0; \
77 (++__lseq), (__mc) >>= 1)
79 #define MV_INIT_DELAYED_WORK(w, f, d) INIT_DELAYED_WORK(w, f)
80 #define UNASSOC_D2H_FIS(id) \
81 ((void *) mvi->rx_fis + 0x100 * id)
82 #define SATA_RECEIVED_FIS_LIST(reg_set) \
83 ((void *) mvi->rx_fis + mvi->chip->fis_offs + 0x100 * reg_set)
84 #define SATA_RECEIVED_SDB_FIS(reg_set) \
85 (SATA_RECEIVED_FIS_LIST(reg_set) + 0x58)
86 #define SATA_RECEIVED_D2H_FIS(reg_set) \
87 (SATA_RECEIVED_FIS_LIST(reg_set) + 0x40)
88 #define SATA_RECEIVED_PIO_FIS(reg_set) \
89 (SATA_RECEIVED_FIS_LIST(reg_set) + 0x20)
90 #define SATA_RECEIVED_DMA_FIS(reg_set) \
91 (SATA_RECEIVED_FIS_LIST(reg_set) + 0x00)
149 struct sas_identify_frame *
id);
171 int buf_len,
int from,
void *prd);
187 #define MVS_MAX_SG (1U << mvi->chip->sg_width)
188 #define MVS_CHIP_SLOT_SZ (1U << mvi->chip->slot_width)
189 #define MVS_RX_FISL_SZ \
190 (mvi->chip->fis_offs + (mvi->chip->fis_count * 0x100))
191 #define MVS_CHIP_DISP (mvi->chip->dispatch)
411 #define TRASH_BUCKET_SIZE 0x20000