33 #include <linux/kernel.h>
35 #include <linux/types.h>
36 #include <linux/pci.h>
38 #include <linux/slab.h>
50 static int aac_alloc_comm(
struct aac_dev *
dev,
void **commaddr,
unsigned long commsize,
unsigned long commalign)
54 const unsigned long fibsize = 4096;
55 const unsigned long printfbufsiz = 256;
56 unsigned long host_rrq_size = 0;
59 unsigned long aac_max_hostphysmempages;
65 size = fibsize +
sizeof(
struct aac_init) + commsize +
66 commalign + printfbufsiz + host_rrq_size;
86 dev->
init = (
struct aac_init *)(base + fibsize + host_rrq_size);
87 dev->
init_pa = phys + fibsize + host_rrq_size;
150 base = base + fibsize + host_rrq_size +
sizeof(
struct aac_init);
157 align = (commalign - ((
uintptr_t)(base) & (commalign - 1)));
168 base = base + commsize;
169 phys = phys + commsize;
176 memset(base, 0, printfbufsiz);
185 INIT_LIST_HEAD(&q->
cmdq);
245 static int aac_comm_init(
struct aac_dev * dev)
266 size = hdrsize + queuesize;
347 - sizeof(struct aac_write) + sizeof(struct sgentry))
348 / sizeof(struct sgentry);
353 0, 0, 0, 0, 0, 0, status+0, status+1, status+2,
NULL,
NULL)) &&
354 (status[0] == 0x00000001)) {
358 if (dev->
a_ops.adapter_comm &&
385 "aacraid: unable to map adapter.\n");
393 status+0, status+1, status+2, status+3, status+4))
394 && (status[0] == 0x00000001)) {
420 - sizeof(struct aac_write) + sizeof(struct sgentry))
421 / sizeof(struct sgentry);
465 if (aac_comm_init(dev)<0){