diff options
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 4f8b4c53d435..39ecd0d22eb0 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define _nblank(x) #x | 5 | #define _nblank(x) #x |
6 | #define nblank(x) _nblank(x)[0] | 6 | #define nblank(x) _nblank(x)[0] |
7 | 7 | ||
8 | #include <linux/interrupt.h> | ||
8 | 9 | ||
9 | /*------------------------------------------------------------------------------ | 10 | /*------------------------------------------------------------------------------ |
10 | * D E F I N E S | 11 | * D E F I N E S |
@@ -485,16 +486,28 @@ enum aac_log_level { | |||
485 | 486 | ||
486 | struct aac_dev; | 487 | struct aac_dev; |
487 | struct fib; | 488 | struct fib; |
489 | struct scsi_cmnd; | ||
488 | 490 | ||
489 | struct adapter_ops | 491 | struct adapter_ops |
490 | { | 492 | { |
493 | /* Low level operations */ | ||
491 | void (*adapter_interrupt)(struct aac_dev *dev); | 494 | void (*adapter_interrupt)(struct aac_dev *dev); |
492 | void (*adapter_notify)(struct aac_dev *dev, u32 event); | 495 | void (*adapter_notify)(struct aac_dev *dev, u32 event); |
493 | void (*adapter_disable_int)(struct aac_dev *dev); | 496 | void (*adapter_disable_int)(struct aac_dev *dev); |
497 | void (*adapter_enable_int)(struct aac_dev *dev); | ||
494 | int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4); | 498 | int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4); |
495 | int (*adapter_check_health)(struct aac_dev *dev); | 499 | int (*adapter_check_health)(struct aac_dev *dev); |
496 | int (*adapter_send)(struct fib * fib); | 500 | /* Transport operations */ |
497 | int (*adapter_ioremap)(struct aac_dev * dev, u32 size); | 501 | int (*adapter_ioremap)(struct aac_dev * dev, u32 size); |
502 | irqreturn_t (*adapter_intr)(int irq, void *dev_id); | ||
503 | /* Packet operations */ | ||
504 | int (*adapter_deliver)(struct fib * fib); | ||
505 | int (*adapter_bounds)(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba); | ||
506 | int (*adapter_read)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count); | ||
507 | int (*adapter_write)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count); | ||
508 | int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd); | ||
509 | /* Administrative operations */ | ||
510 | int (*adapter_comm)(struct aac_dev * dev, int comm); | ||
498 | }; | 511 | }; |
499 | 512 | ||
500 | /* | 513 | /* |
@@ -1018,7 +1031,9 @@ struct aac_dev | |||
1018 | u8 nondasd_support; | 1031 | u8 nondasd_support; |
1019 | u8 dac_support; | 1032 | u8 dac_support; |
1020 | u8 raid_scsi_mode; | 1033 | u8 raid_scsi_mode; |
1021 | u8 new_comm_interface; | 1034 | u8 comm_interface; |
1035 | # define AAC_COMM_PRODUCER 0 | ||
1036 | # define AAC_COMM_MESSAGE 1 | ||
1022 | /* macro side-effects BEWARE */ | 1037 | /* macro side-effects BEWARE */ |
1023 | # define raw_io_interface \ | 1038 | # define raw_io_interface \ |
1024 | init->InitStructRevision==cpu_to_le32(ADAPTER_INIT_STRUCT_REVISION_4) | 1039 | init->InitStructRevision==cpu_to_le32(ADAPTER_INIT_STRUCT_REVISION_4) |
@@ -1036,18 +1051,36 @@ struct aac_dev | |||
1036 | #define aac_adapter_disable_int(dev) \ | 1051 | #define aac_adapter_disable_int(dev) \ |
1037 | (dev)->a_ops.adapter_disable_int(dev) | 1052 | (dev)->a_ops.adapter_disable_int(dev) |
1038 | 1053 | ||
1054 | #define aac_adapter_enable_int(dev) \ | ||
1055 | (dev)->a_ops.adapter_enable_int(dev) | ||
1056 | |||
1039 | #define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \ | 1057 | #define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \ |
1040 | (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) | 1058 | (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) |
1041 | 1059 | ||
1042 | #define aac_adapter_check_health(dev) \ | 1060 | #define aac_adapter_check_health(dev) \ |
1043 | (dev)->a_ops.adapter_check_health(dev) | 1061 | (dev)->a_ops.adapter_check_health(dev) |
1044 | 1062 | ||
1045 | #define aac_adapter_send(fib) \ | ||
1046 | ((fib)->dev)->a_ops.adapter_send(fib) | ||
1047 | |||
1048 | #define aac_adapter_ioremap(dev, size) \ | 1063 | #define aac_adapter_ioremap(dev, size) \ |
1049 | (dev)->a_ops.adapter_ioremap(dev, size) | 1064 | (dev)->a_ops.adapter_ioremap(dev, size) |
1050 | 1065 | ||
1066 | #define aac_adapter_deliver(fib) \ | ||
1067 | ((fib)->dev)->a_ops.adapter_deliver(fib) | ||
1068 | |||
1069 | #define aac_adapter_bounds(dev,cmd,lba) \ | ||
1070 | dev->a_ops.adapter_bounds(dev,cmd,lba) | ||
1071 | |||
1072 | #define aac_adapter_read(fib,cmd,lba,count) \ | ||
1073 | ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count) | ||
1074 | |||
1075 | #define aac_adapter_write(fib,cmd,lba,count) \ | ||
1076 | ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count) | ||
1077 | |||
1078 | #define aac_adapter_scsi(fib,cmd) \ | ||
1079 | ((fib)->dev)->a_ops.adapter_scsi(fib,cmd) | ||
1080 | |||
1081 | #define aac_adapter_comm(dev,comm) \ | ||
1082 | (dev)->a_ops.adapter_comm(dev, comm) | ||
1083 | |||
1051 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) | 1084 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) |
1052 | 1085 | ||
1053 | /* | 1086 | /* |
@@ -1767,7 +1800,6 @@ static inline u32 cap_to_cyls(sector_t capacity, u32 divisor) | |||
1767 | return (u32)capacity; | 1800 | return (u32)capacity; |
1768 | } | 1801 | } |
1769 | 1802 | ||
1770 | struct scsi_cmnd; | ||
1771 | /* SCp.phase values */ | 1803 | /* SCp.phase values */ |
1772 | #define AAC_OWNER_MIDLEVEL 0x101 | 1804 | #define AAC_OWNER_MIDLEVEL 0x101 |
1773 | #define AAC_OWNER_LOWLEVEL 0x102 | 1805 | #define AAC_OWNER_LOWLEVEL 0x102 |
@@ -1794,7 +1826,9 @@ int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg); | |||
1794 | int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg); | 1826 | int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg); |
1795 | int aac_rx_init(struct aac_dev *dev); | 1827 | int aac_rx_init(struct aac_dev *dev); |
1796 | int aac_rkt_init(struct aac_dev *dev); | 1828 | int aac_rkt_init(struct aac_dev *dev); |
1829 | int aac_nark_init(struct aac_dev *dev); | ||
1797 | int aac_sa_init(struct aac_dev *dev); | 1830 | int aac_sa_init(struct aac_dev *dev); |
1831 | int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify); | ||
1798 | unsigned int aac_response_normal(struct aac_queue * q); | 1832 | unsigned int aac_response_normal(struct aac_queue * q); |
1799 | unsigned int aac_command_normal(struct aac_queue * q); | 1833 | unsigned int aac_command_normal(struct aac_queue * q); |
1800 | unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index); | 1834 | unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index); |