aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aacraid.h
diff options
context:
space:
mode:
authorMark Haverkamp <markh@linux-foundation.org>2007-01-23 17:59:20 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-27 10:27:06 -0500
commit28713324a0f3c055186ecec27239673c36ba1de5 (patch)
treeaa17c4441b0fda12f1d3a9a58a374a917666b781 /drivers/scsi/aacraid/aacraid.h
parent9cd065ab80d6c14c6693a93c8f47ef4cb80e770f (diff)
[SCSI] aacraid: rework communication support code
Received from Mark Salyzyn, Replace all if/else communication transports with a platform function call. This is in recognition of the need to migrate to up-and-coming transports. Currently the Linux driver does not support two available communication transports provided by our products, these will be added in future patches, and will expand the platform function set. Signed-off-by Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r--drivers/scsi/aacraid/aacraid.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 4f8b4c53d435..813e68993aa6 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
@@ -488,13 +489,20 @@ struct fib;
488 489
489struct adapter_ops 490struct adapter_ops
490{ 491{
492 /* Low level operations */
491 void (*adapter_interrupt)(struct aac_dev *dev); 493 void (*adapter_interrupt)(struct aac_dev *dev);
492 void (*adapter_notify)(struct aac_dev *dev, u32 event); 494 void (*adapter_notify)(struct aac_dev *dev, u32 event);
493 void (*adapter_disable_int)(struct aac_dev *dev); 495 void (*adapter_disable_int)(struct aac_dev *dev);
496 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); 497 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); 498 int (*adapter_check_health)(struct aac_dev *dev);
496 int (*adapter_send)(struct fib * fib); 499 /* Transport operations */
497 int (*adapter_ioremap)(struct aac_dev * dev, u32 size); 500 int (*adapter_ioremap)(struct aac_dev * dev, u32 size);
501 irqreturn_t (*adapter_intr)(int irq, void *dev_id);
502 /* Packet operations */
503 int (*adapter_deliver)(struct fib * fib);
504 /* Administrative operations */
505 int (*adapter_comm)(struct aac_dev * dev, int comm);
498}; 506};
499 507
500/* 508/*
@@ -1018,7 +1026,9 @@ struct aac_dev
1018 u8 nondasd_support; 1026 u8 nondasd_support;
1019 u8 dac_support; 1027 u8 dac_support;
1020 u8 raid_scsi_mode; 1028 u8 raid_scsi_mode;
1021 u8 new_comm_interface; 1029 u8 comm_interface;
1030# define AAC_COMM_PRODUCER 0
1031# define AAC_COMM_MESSAGE 1
1022 /* macro side-effects BEWARE */ 1032 /* macro side-effects BEWARE */
1023# define raw_io_interface \ 1033# define raw_io_interface \
1024 init->InitStructRevision==cpu_to_le32(ADAPTER_INIT_STRUCT_REVISION_4) 1034 init->InitStructRevision==cpu_to_le32(ADAPTER_INIT_STRUCT_REVISION_4)
@@ -1036,18 +1046,24 @@ struct aac_dev
1036#define aac_adapter_disable_int(dev) \ 1046#define aac_adapter_disable_int(dev) \
1037 (dev)->a_ops.adapter_disable_int(dev) 1047 (dev)->a_ops.adapter_disable_int(dev)
1038 1048
1049#define aac_adapter_enable_int(dev) \
1050 (dev)->a_ops.adapter_enable_int(dev)
1051
1039#define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \ 1052#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) 1053 (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)
1041 1054
1042#define aac_adapter_check_health(dev) \ 1055#define aac_adapter_check_health(dev) \
1043 (dev)->a_ops.adapter_check_health(dev) 1056 (dev)->a_ops.adapter_check_health(dev)
1044 1057
1045#define aac_adapter_send(fib) \
1046 ((fib)->dev)->a_ops.adapter_send(fib)
1047
1048#define aac_adapter_ioremap(dev, size) \ 1058#define aac_adapter_ioremap(dev, size) \
1049 (dev)->a_ops.adapter_ioremap(dev, size) 1059 (dev)->a_ops.adapter_ioremap(dev, size)
1050 1060
1061#define aac_adapter_deliver(fib) \
1062 ((fib)->dev)->a_ops.adapter_deliver(fib)
1063
1064#define aac_adapter_comm(dev,comm) \
1065 (dev)->a_ops.adapter_comm(dev, comm)
1066
1051#define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) 1067#define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001)
1052 1068
1053/* 1069/*
@@ -1795,6 +1811,7 @@ int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg);
1795int aac_rx_init(struct aac_dev *dev); 1811int aac_rx_init(struct aac_dev *dev);
1796int aac_rkt_init(struct aac_dev *dev); 1812int aac_rkt_init(struct aac_dev *dev);
1797int aac_sa_init(struct aac_dev *dev); 1813int aac_sa_init(struct aac_dev *dev);
1814int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify);
1798unsigned int aac_response_normal(struct aac_queue * q); 1815unsigned int aac_response_normal(struct aac_queue * q);
1799unsigned int aac_command_normal(struct aac_queue * q); 1816unsigned int aac_command_normal(struct aac_queue * q);
1800unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index); 1817unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index);