diff options
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 310 |
1 files changed, 153 insertions, 157 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 858b97494343..8a5b9c898e5b 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #if (!defined(dprintk)) | 1 | #ifndef dprintk |
2 | # define dprintk(x) | 2 | # define dprintk(x) |
3 | #endif | 3 | #endif |
4 | /* eg: if (nblank(dprintk(x))) */ | 4 | /* eg: if (nblank(dprintk(x))) */ |
@@ -50,9 +50,9 @@ struct diskparm | |||
50 | /* | 50 | /* |
51 | * Firmware constants | 51 | * Firmware constants |
52 | */ | 52 | */ |
53 | 53 | ||
54 | #define CT_NONE 0 | 54 | #define CT_NONE 0 |
55 | #define CT_OK 218 | 55 | #define CT_OK 218 |
56 | #define FT_FILESYS 8 /* ADAPTEC's "FSA"(tm) filesystem */ | 56 | #define FT_FILESYS 8 /* ADAPTEC's "FSA"(tm) filesystem */ |
57 | #define FT_DRIVE 9 /* physical disk - addressable in scsi by bus/id/lun */ | 57 | #define FT_DRIVE 9 /* physical disk - addressable in scsi by bus/id/lun */ |
58 | 58 | ||
@@ -107,12 +107,12 @@ struct user_sgentryraw { | |||
107 | 107 | ||
108 | struct sgmap { | 108 | struct sgmap { |
109 | __le32 count; | 109 | __le32 count; |
110 | struct sgentry sg[1]; | 110 | struct sgentry sg[1]; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct user_sgmap { | 113 | struct user_sgmap { |
114 | u32 count; | 114 | u32 count; |
115 | struct user_sgentry sg[1]; | 115 | struct user_sgentry sg[1]; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | struct sgmap64 { | 118 | struct sgmap64 { |
@@ -137,18 +137,18 @@ struct user_sgmapraw { | |||
137 | 137 | ||
138 | struct creation_info | 138 | struct creation_info |
139 | { | 139 | { |
140 | u8 buildnum; /* e.g., 588 */ | 140 | u8 buildnum; /* e.g., 588 */ |
141 | u8 usec; /* e.g., 588 */ | 141 | u8 usec; /* e.g., 588 */ |
142 | u8 via; /* e.g., 1 = FSU, | 142 | u8 via; /* e.g., 1 = FSU, |
143 | * 2 = API | 143 | * 2 = API |
144 | */ | 144 | */ |
145 | u8 year; /* e.g., 1997 = 97 */ | 145 | u8 year; /* e.g., 1997 = 97 */ |
146 | __le32 date; /* | 146 | __le32 date; /* |
147 | * unsigned Month :4; // 1 - 12 | 147 | * unsigned Month :4; // 1 - 12 |
148 | * unsigned Day :6; // 1 - 32 | 148 | * unsigned Day :6; // 1 - 32 |
149 | * unsigned Hour :6; // 0 - 23 | 149 | * unsigned Hour :6; // 0 - 23 |
150 | * unsigned Minute :6; // 0 - 60 | 150 | * unsigned Minute :6; // 0 - 60 |
151 | * unsigned Second :6; // 0 - 60 | 151 | * unsigned Second :6; // 0 - 60 |
152 | */ | 152 | */ |
153 | __le32 serial[2]; /* e.g., 0x1DEADB0BFAFAF001 */ | 153 | __le32 serial[2]; /* e.g., 0x1DEADB0BFAFAF001 */ |
154 | }; | 154 | }; |
@@ -184,7 +184,7 @@ struct creation_info | |||
184 | /* | 184 | /* |
185 | * Set the queues on a 16 byte alignment | 185 | * Set the queues on a 16 byte alignment |
186 | */ | 186 | */ |
187 | 187 | ||
188 | #define QUEUE_ALIGNMENT 16 | 188 | #define QUEUE_ALIGNMENT 16 |
189 | 189 | ||
190 | /* | 190 | /* |
@@ -203,9 +203,9 @@ struct aac_entry { | |||
203 | * The adapter assumes the ProducerIndex and ConsumerIndex are grouped | 203 | * The adapter assumes the ProducerIndex and ConsumerIndex are grouped |
204 | * adjacently and in that order. | 204 | * adjacently and in that order. |
205 | */ | 205 | */ |
206 | 206 | ||
207 | struct aac_qhdr { | 207 | struct aac_qhdr { |
208 | __le64 header_addr;/* Address to hand the adapter to access | 208 | __le64 header_addr;/* Address to hand the adapter to access |
209 | to this queue head */ | 209 | to this queue head */ |
210 | __le32 *producer; /* The producer index for this queue (host address) */ | 210 | __le32 *producer; /* The producer index for this queue (host address) */ |
211 | __le32 *consumer; /* The consumer index for this queue (host address) */ | 211 | __le32 *consumer; /* The consumer index for this queue (host address) */ |
@@ -215,7 +215,7 @@ struct aac_qhdr { | |||
215 | * Define all the events which the adapter would like to notify | 215 | * Define all the events which the adapter would like to notify |
216 | * the host of. | 216 | * the host of. |
217 | */ | 217 | */ |
218 | 218 | ||
219 | #define HostNormCmdQue 1 /* Change in host normal priority command queue */ | 219 | #define HostNormCmdQue 1 /* Change in host normal priority command queue */ |
220 | #define HostHighCmdQue 2 /* Change in host high priority command queue */ | 220 | #define HostHighCmdQue 2 /* Change in host high priority command queue */ |
221 | #define HostNormRespQue 3 /* Change in host normal priority response queue */ | 221 | #define HostNormRespQue 3 /* Change in host normal priority response queue */ |
@@ -286,17 +286,17 @@ struct aac_fibhdr { | |||
286 | u8 StructType; /* Type FIB */ | 286 | u8 StructType; /* Type FIB */ |
287 | u8 Flags; /* Flags for FIB */ | 287 | u8 Flags; /* Flags for FIB */ |
288 | __le16 Size; /* Size of this FIB in bytes */ | 288 | __le16 Size; /* Size of this FIB in bytes */ |
289 | __le16 SenderSize; /* Size of the FIB in the sender | 289 | __le16 SenderSize; /* Size of the FIB in the sender |
290 | (for response sizing) */ | 290 | (for response sizing) */ |
291 | __le32 SenderFibAddress; /* Host defined data in the FIB */ | 291 | __le32 SenderFibAddress; /* Host defined data in the FIB */ |
292 | __le32 ReceiverFibAddress;/* Logical address of this FIB for | 292 | __le32 ReceiverFibAddress;/* Logical address of this FIB for |
293 | the adapter */ | 293 | the adapter */ |
294 | u32 SenderData; /* Place holder for the sender to store data */ | 294 | u32 SenderData; /* Place holder for the sender to store data */ |
295 | union { | 295 | union { |
296 | struct { | 296 | struct { |
297 | __le32 _ReceiverTimeStart; /* Timestamp for | 297 | __le32 _ReceiverTimeStart; /* Timestamp for |
298 | receipt of fib */ | 298 | receipt of fib */ |
299 | __le32 _ReceiverTimeDone; /* Timestamp for | 299 | __le32 _ReceiverTimeDone; /* Timestamp for |
300 | completion of fib */ | 300 | completion of fib */ |
301 | } _s; | 301 | } _s; |
302 | } _u; | 302 | } _u; |
@@ -311,7 +311,7 @@ struct hw_fib { | |||
311 | * FIB commands | 311 | * FIB commands |
312 | */ | 312 | */ |
313 | 313 | ||
314 | #define TestCommandResponse 1 | 314 | #define TestCommandResponse 1 |
315 | #define TestAdapterCommand 2 | 315 | #define TestAdapterCommand 2 |
316 | /* | 316 | /* |
317 | * Lowlevel and comm commands | 317 | * Lowlevel and comm commands |
@@ -350,10 +350,6 @@ struct hw_fib { | |||
350 | #define ContainerCommand64 501 | 350 | #define ContainerCommand64 501 |
351 | #define ContainerRawIo 502 | 351 | #define ContainerRawIo 502 |
352 | /* | 352 | /* |
353 | * Cluster Commands | ||
354 | */ | ||
355 | #define ClusterCommand 550 | ||
356 | /* | ||
357 | * Scsi Port commands (scsi passthrough) | 353 | * Scsi Port commands (scsi passthrough) |
358 | */ | 354 | */ |
359 | #define ScsiPortCommand 600 | 355 | #define ScsiPortCommand 600 |
@@ -375,19 +371,19 @@ struct hw_fib { | |||
375 | */ | 371 | */ |
376 | 372 | ||
377 | enum fib_xfer_state { | 373 | enum fib_xfer_state { |
378 | HostOwned = (1<<0), | 374 | HostOwned = (1<<0), |
379 | AdapterOwned = (1<<1), | 375 | AdapterOwned = (1<<1), |
380 | FibInitialized = (1<<2), | 376 | FibInitialized = (1<<2), |
381 | FibEmpty = (1<<3), | 377 | FibEmpty = (1<<3), |
382 | AllocatedFromPool = (1<<4), | 378 | AllocatedFromPool = (1<<4), |
383 | SentFromHost = (1<<5), | 379 | SentFromHost = (1<<5), |
384 | SentFromAdapter = (1<<6), | 380 | SentFromAdapter = (1<<6), |
385 | ResponseExpected = (1<<7), | 381 | ResponseExpected = (1<<7), |
386 | NoResponseExpected = (1<<8), | 382 | NoResponseExpected = (1<<8), |
387 | AdapterProcessed = (1<<9), | 383 | AdapterProcessed = (1<<9), |
388 | HostProcessed = (1<<10), | 384 | HostProcessed = (1<<10), |
389 | HighPriority = (1<<11), | 385 | HighPriority = (1<<11), |
390 | NormalPriority = (1<<12), | 386 | NormalPriority = (1<<12), |
391 | Async = (1<<13), | 387 | Async = (1<<13), |
392 | AsyncIo = (1<<13), // rpbfix: remove with new regime | 388 | AsyncIo = (1<<13), // rpbfix: remove with new regime |
393 | PageFileIo = (1<<14), // rpbfix: remove with new regime | 389 | PageFileIo = (1<<14), // rpbfix: remove with new regime |
@@ -420,7 +416,7 @@ struct aac_init | |||
420 | __le32 AdapterFibAlign; | 416 | __le32 AdapterFibAlign; |
421 | __le32 printfbuf; | 417 | __le32 printfbuf; |
422 | __le32 printfbufsiz; | 418 | __le32 printfbufsiz; |
423 | __le32 HostPhysMemPages; /* number of 4k pages of host | 419 | __le32 HostPhysMemPages; /* number of 4k pages of host |
424 | physical memory */ | 420 | physical memory */ |
425 | __le32 HostElapsedSeconds; /* number of seconds since 1970. */ | 421 | __le32 HostElapsedSeconds; /* number of seconds since 1970. */ |
426 | /* | 422 | /* |
@@ -481,7 +477,7 @@ struct adapter_ops | |||
481 | 477 | ||
482 | struct aac_driver_ident | 478 | struct aac_driver_ident |
483 | { | 479 | { |
484 | int (*init)(struct aac_dev *dev); | 480 | int (*init)(struct aac_dev *dev); |
485 | char * name; | 481 | char * name; |
486 | char * vname; | 482 | char * vname; |
487 | char * model; | 483 | char * model; |
@@ -489,7 +485,7 @@ struct aac_driver_ident | |||
489 | int quirks; | 485 | int quirks; |
490 | }; | 486 | }; |
491 | /* | 487 | /* |
492 | * Some adapter firmware needs communication memory | 488 | * Some adapter firmware needs communication memory |
493 | * below 2gig. This tells the init function to set the | 489 | * below 2gig. This tells the init function to set the |
494 | * dma mask such that fib memory will be allocated where the | 490 | * dma mask such that fib memory will be allocated where the |
495 | * adapter firmware can get to it. | 491 | * adapter firmware can get to it. |
@@ -531,29 +527,29 @@ struct aac_driver_ident | |||
531 | * physically contigous block. The host structure that defines the | 527 | * physically contigous block. The host structure that defines the |
532 | * commuication queues will assume they are each a separate physically | 528 | * commuication queues will assume they are each a separate physically |
533 | * contigous memory region that will support them all being one big | 529 | * contigous memory region that will support them all being one big |
534 | * contigous block. | 530 | * contigous block. |
535 | * There is a command and response queue for each level and direction of | 531 | * There is a command and response queue for each level and direction of |
536 | * commuication. These regions are accessed by both the host and adapter. | 532 | * commuication. These regions are accessed by both the host and adapter. |
537 | */ | 533 | */ |
538 | 534 | ||
539 | struct aac_queue { | 535 | struct aac_queue { |
540 | u64 logical; /*address we give the adapter */ | 536 | u64 logical; /*address we give the adapter */ |
541 | struct aac_entry *base; /*system virtual address */ | 537 | struct aac_entry *base; /*system virtual address */ |
542 | struct aac_qhdr headers; /*producer,consumer q headers*/ | 538 | struct aac_qhdr headers; /*producer,consumer q headers*/ |
543 | u32 entries; /*Number of queue entries */ | 539 | u32 entries; /*Number of queue entries */ |
544 | wait_queue_head_t qfull; /*Event to wait on if q full */ | 540 | wait_queue_head_t qfull; /*Event to wait on if q full */ |
545 | wait_queue_head_t cmdready; /*Cmd ready from the adapter */ | 541 | wait_queue_head_t cmdready; /*Cmd ready from the adapter */ |
546 | /* This is only valid for adapter to host command queues. */ | 542 | /* This is only valid for adapter to host command queues. */ |
547 | spinlock_t *lock; /* Spinlock for this queue must take this lock before accessing the lock */ | 543 | spinlock_t *lock; /* Spinlock for this queue must take this lock before accessing the lock */ |
548 | spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */ | 544 | spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */ |
549 | struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */ | 545 | struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */ |
550 | /* only valid for command queues which receive entries from the adapter. */ | 546 | /* only valid for command queues which receive entries from the adapter. */ |
551 | u32 numpending; /* Number of entries on outstanding queue. */ | 547 | u32 numpending; /* Number of entries on outstanding queue. */ |
552 | struct aac_dev * dev; /* Back pointer to adapter structure */ | 548 | struct aac_dev * dev; /* Back pointer to adapter structure */ |
553 | }; | 549 | }; |
554 | 550 | ||
555 | /* | 551 | /* |
556 | * Message queues. The order here is important, see also the | 552 | * Message queues. The order here is important, see also the |
557 | * queue type ordering | 553 | * queue type ordering |
558 | */ | 554 | */ |
559 | 555 | ||
@@ -565,12 +561,12 @@ struct aac_queue_block | |||
565 | /* | 561 | /* |
566 | * SaP1 Message Unit Registers | 562 | * SaP1 Message Unit Registers |
567 | */ | 563 | */ |
568 | 564 | ||
569 | struct sa_drawbridge_CSR { | 565 | struct sa_drawbridge_CSR { |
570 | /* Offset | Name */ | 566 | /* Offset | Name */ |
571 | __le32 reserved[10]; /* 00h-27h | Reserved */ | 567 | __le32 reserved[10]; /* 00h-27h | Reserved */ |
572 | u8 LUT_Offset; /* 28h | Lookup Table Offset */ | 568 | u8 LUT_Offset; /* 28h | Lookup Table Offset */ |
573 | u8 reserved1[3]; /* 29h-2bh | Reserved */ | 569 | u8 reserved1[3]; /* 29h-2bh | Reserved */ |
574 | __le32 LUT_Data; /* 2ch | Looup Table Data */ | 570 | __le32 LUT_Data; /* 2ch | Looup Table Data */ |
575 | __le32 reserved2[26]; /* 30h-97h | Reserved */ | 571 | __le32 reserved2[26]; /* 30h-97h | Reserved */ |
576 | __le16 PRICLEARIRQ; /* 98h | Primary Clear Irq */ | 572 | __le16 PRICLEARIRQ; /* 98h | Primary Clear Irq */ |
@@ -589,8 +585,8 @@ struct sa_drawbridge_CSR { | |||
589 | __le32 MAILBOX5; /* bch | Scratchpad 5 */ | 585 | __le32 MAILBOX5; /* bch | Scratchpad 5 */ |
590 | __le32 MAILBOX6; /* c0h | Scratchpad 6 */ | 586 | __le32 MAILBOX6; /* c0h | Scratchpad 6 */ |
591 | __le32 MAILBOX7; /* c4h | Scratchpad 7 */ | 587 | __le32 MAILBOX7; /* c4h | Scratchpad 7 */ |
592 | __le32 ROM_Setup_Data; /* c8h | Rom Setup and Data */ | 588 | __le32 ROM_Setup_Data; /* c8h | Rom Setup and Data */ |
593 | __le32 ROM_Control_Addr;/* cch | Rom Control and Address */ | 589 | __le32 ROM_Control_Addr;/* cch | Rom Control and Address */ |
594 | __le32 reserved3[12]; /* d0h-ffh | reserved */ | 590 | __le32 reserved3[12]; /* d0h-ffh | reserved */ |
595 | __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */ | 591 | __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */ |
596 | }; | 592 | }; |
@@ -603,7 +599,7 @@ struct sa_drawbridge_CSR { | |||
603 | #define Mailbox5 SaDbCSR.MAILBOX5 | 599 | #define Mailbox5 SaDbCSR.MAILBOX5 |
604 | #define Mailbox6 SaDbCSR.MAILBOX6 | 600 | #define Mailbox6 SaDbCSR.MAILBOX6 |
605 | #define Mailbox7 SaDbCSR.MAILBOX7 | 601 | #define Mailbox7 SaDbCSR.MAILBOX7 |
606 | 602 | ||
607 | #define DoorbellReg_p SaDbCSR.PRISETIRQ | 603 | #define DoorbellReg_p SaDbCSR.PRISETIRQ |
608 | #define DoorbellReg_s SaDbCSR.SECSETIRQ | 604 | #define DoorbellReg_s SaDbCSR.SECSETIRQ |
609 | #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ | 605 | #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ |
@@ -617,19 +613,19 @@ struct sa_drawbridge_CSR { | |||
617 | #define DOORBELL_5 0x0020 | 613 | #define DOORBELL_5 0x0020 |
618 | #define DOORBELL_6 0x0040 | 614 | #define DOORBELL_6 0x0040 |
619 | 615 | ||
620 | 616 | ||
621 | #define PrintfReady DOORBELL_5 | 617 | #define PrintfReady DOORBELL_5 |
622 | #define PrintfDone DOORBELL_5 | 618 | #define PrintfDone DOORBELL_5 |
623 | 619 | ||
624 | struct sa_registers { | 620 | struct sa_registers { |
625 | struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */ | 621 | struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */ |
626 | }; | 622 | }; |
627 | 623 | ||
628 | 624 | ||
629 | #define Sa_MINIPORT_REVISION 1 | 625 | #define Sa_MINIPORT_REVISION 1 |
630 | 626 | ||
631 | #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) | 627 | #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) |
632 | #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) | 628 | #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) |
633 | #define sa_writew(AEP, CSR, value) writew(value, &((AEP)->regs.sa->CSR)) | 629 | #define sa_writew(AEP, CSR, value) writew(value, &((AEP)->regs.sa->CSR)) |
634 | #define sa_writel(AEP, CSR, value) writel(value, &((AEP)->regs.sa->CSR)) | 630 | #define sa_writel(AEP, CSR, value) writel(value, &((AEP)->regs.sa->CSR)) |
635 | 631 | ||
@@ -646,21 +642,21 @@ struct rx_mu_registers { | |||
646 | __le32 IMRx[2]; /* 1310h | 10h | Inbound Message Registers */ | 642 | __le32 IMRx[2]; /* 1310h | 10h | Inbound Message Registers */ |
647 | __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */ | 643 | __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */ |
648 | __le32 IDR; /* 1320h | 20h | Inbound Doorbell Register */ | 644 | __le32 IDR; /* 1320h | 20h | Inbound Doorbell Register */ |
649 | __le32 IISR; /* 1324h | 24h | Inbound Interrupt | 645 | __le32 IISR; /* 1324h | 24h | Inbound Interrupt |
650 | Status Register */ | 646 | Status Register */ |
651 | __le32 IIMR; /* 1328h | 28h | Inbound Interrupt | 647 | __le32 IIMR; /* 1328h | 28h | Inbound Interrupt |
652 | Mask Register */ | 648 | Mask Register */ |
653 | __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */ | 649 | __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */ |
654 | __le32 OISR; /* 1330h | 30h | Outbound Interrupt | 650 | __le32 OISR; /* 1330h | 30h | Outbound Interrupt |
655 | Status Register */ | 651 | Status Register */ |
656 | __le32 OIMR; /* 1334h | 34h | Outbound Interrupt | 652 | __le32 OIMR; /* 1334h | 34h | Outbound Interrupt |
657 | Mask Register */ | 653 | Mask Register */ |
658 | __le32 reserved2; /* 1338h | 38h | Reserved */ | 654 | __le32 reserved2; /* 1338h | 38h | Reserved */ |
659 | __le32 reserved3; /* 133Ch | 3Ch | Reserved */ | 655 | __le32 reserved3; /* 133Ch | 3Ch | Reserved */ |
660 | __le32 InboundQueue;/* 1340h | 40h | Inbound Queue Port relative to firmware */ | 656 | __le32 InboundQueue;/* 1340h | 40h | Inbound Queue Port relative to firmware */ |
661 | __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */ | 657 | __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */ |
662 | /* * Must access through ATU Inbound | 658 | /* * Must access through ATU Inbound |
663 | Translation Window */ | 659 | Translation Window */ |
664 | }; | 660 | }; |
665 | 661 | ||
666 | struct rx_inbound { | 662 | struct rx_inbound { |
@@ -716,12 +712,12 @@ struct rkt_registers { | |||
716 | typedef void (*fib_callback)(void *ctxt, struct fib *fibctx); | 712 | typedef void (*fib_callback)(void *ctxt, struct fib *fibctx); |
717 | 713 | ||
718 | struct aac_fib_context { | 714 | struct aac_fib_context { |
719 | s16 type; // used for verification of structure | 715 | s16 type; // used for verification of structure |
720 | s16 size; | 716 | s16 size; |
721 | u32 unique; // unique value representing this context | 717 | u32 unique; // unique value representing this context |
722 | ulong jiffies; // used for cleanup - dmb changed to ulong | 718 | ulong jiffies; // used for cleanup - dmb changed to ulong |
723 | struct list_head next; // used to link context's into a linked list | 719 | struct list_head next; // used to link context's into a linked list |
724 | struct semaphore wait_sem; // this is used to wait for the next fib to arrive. | 720 | struct semaphore wait_sem; // this is used to wait for the next fib to arrive. |
725 | int wait; // Set to true when thread is in WaitForSingleObject | 721 | int wait; // Set to true when thread is in WaitForSingleObject |
726 | unsigned long count; // total number of FIBs on FibList | 722 | unsigned long count; // total number of FIBs on FibList |
727 | struct list_head fib_list; // this holds fibs and their attachd hw_fibs | 723 | struct list_head fib_list; // this holds fibs and their attachd hw_fibs |
@@ -740,9 +736,9 @@ struct sense_data { | |||
740 | u8 EOM:1; /* End Of Medium - reserved for random access devices */ | 736 | u8 EOM:1; /* End Of Medium - reserved for random access devices */ |
741 | u8 filemark:1; /* Filemark - reserved for random access devices */ | 737 | u8 filemark:1; /* Filemark - reserved for random access devices */ |
742 | 738 | ||
743 | u8 information[4]; /* for direct-access devices, contains the unsigned | 739 | u8 information[4]; /* for direct-access devices, contains the unsigned |
744 | * logical block address or residue associated with | 740 | * logical block address or residue associated with |
745 | * the sense key | 741 | * the sense key |
746 | */ | 742 | */ |
747 | u8 add_sense_len; /* number of additional sense bytes to follow this field */ | 743 | u8 add_sense_len; /* number of additional sense bytes to follow this field */ |
748 | u8 cmnd_info[4]; /* not used */ | 744 | u8 cmnd_info[4]; /* not used */ |
@@ -752,7 +748,7 @@ struct sense_data { | |||
752 | u8 bit_ptr:3; /* indicates which byte of the CDB or parameter data | 748 | u8 bit_ptr:3; /* indicates which byte of the CDB or parameter data |
753 | * was in error | 749 | * was in error |
754 | */ | 750 | */ |
755 | u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that | 751 | u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that |
756 | * the bit_ptr field has valid value | 752 | * the bit_ptr field has valid value |
757 | */ | 753 | */ |
758 | u8 reserved2:2; | 754 | u8 reserved2:2; |
@@ -786,24 +782,24 @@ struct fib { | |||
786 | /* | 782 | /* |
787 | * The Adapter that this I/O is destined for. | 783 | * The Adapter that this I/O is destined for. |
788 | */ | 784 | */ |
789 | struct aac_dev *dev; | 785 | struct aac_dev *dev; |
790 | /* | 786 | /* |
791 | * This is the event the sendfib routine will wait on if the | 787 | * This is the event the sendfib routine will wait on if the |
792 | * caller did not pass one and this is synch io. | 788 | * caller did not pass one and this is synch io. |
793 | */ | 789 | */ |
794 | struct semaphore event_wait; | 790 | struct semaphore event_wait; |
795 | spinlock_t event_lock; | 791 | spinlock_t event_lock; |
796 | 792 | ||
797 | u32 done; /* gets set to 1 when fib is complete */ | 793 | u32 done; /* gets set to 1 when fib is complete */ |
798 | fib_callback callback; | 794 | fib_callback callback; |
799 | void *callback_data; | 795 | void *callback_data; |
800 | u32 flags; // u32 dmb was ulong | 796 | u32 flags; // u32 dmb was ulong |
801 | /* | 797 | /* |
802 | * And for the internal issue/reply queues (we may be able | 798 | * And for the internal issue/reply queues (we may be able |
803 | * to merge these two) | 799 | * to merge these two) |
804 | */ | 800 | */ |
805 | struct list_head fiblink; | 801 | struct list_head fiblink; |
806 | void *data; | 802 | void *data; |
807 | struct hw_fib *hw_fib_va; /* Actual shared object */ | 803 | struct hw_fib *hw_fib_va; /* Actual shared object */ |
808 | dma_addr_t hw_fib_pa; /* physical address of hw_fib*/ | 804 | dma_addr_t hw_fib_pa; /* physical address of hw_fib*/ |
809 | }; | 805 | }; |
@@ -813,7 +809,7 @@ struct fib { | |||
813 | * | 809 | * |
814 | * This is returned by the RequestAdapterInfo block | 810 | * This is returned by the RequestAdapterInfo block |
815 | */ | 811 | */ |
816 | 812 | ||
817 | struct aac_adapter_info | 813 | struct aac_adapter_info |
818 | { | 814 | { |
819 | __le32 platform; | 815 | __le32 platform; |
@@ -832,7 +828,7 @@ struct aac_adapter_info | |||
832 | __le32 biosrev; | 828 | __le32 biosrev; |
833 | __le32 biosbuild; | 829 | __le32 biosbuild; |
834 | __le32 cluster; | 830 | __le32 cluster; |
835 | __le32 clusterchannelmask; | 831 | __le32 clusterchannelmask; |
836 | __le32 serial[2]; | 832 | __le32 serial[2]; |
837 | __le32 battery; | 833 | __le32 battery; |
838 | __le32 options; | 834 | __le32 options; |
@@ -922,13 +918,13 @@ struct aac_bus_info_response { | |||
922 | #define AAC_OPT_HOST_TIME_FIB cpu_to_le32(1<<4) | 918 | #define AAC_OPT_HOST_TIME_FIB cpu_to_le32(1<<4) |
923 | #define AAC_OPT_RAID50 cpu_to_le32(1<<5) | 919 | #define AAC_OPT_RAID50 cpu_to_le32(1<<5) |
924 | #define AAC_OPT_4GB_WINDOW cpu_to_le32(1<<6) | 920 | #define AAC_OPT_4GB_WINDOW cpu_to_le32(1<<6) |
925 | #define AAC_OPT_SCSI_UPGRADEABLE cpu_to_le32(1<<7) | 921 | #define AAC_OPT_SCSI_UPGRADEABLE cpu_to_le32(1<<7) |
926 | #define AAC_OPT_SOFT_ERR_REPORT cpu_to_le32(1<<8) | 922 | #define AAC_OPT_SOFT_ERR_REPORT cpu_to_le32(1<<8) |
927 | #define AAC_OPT_SUPPORTED_RECONDITION cpu_to_le32(1<<9) | 923 | #define AAC_OPT_SUPPORTED_RECONDITION cpu_to_le32(1<<9) |
928 | #define AAC_OPT_SGMAP_HOST64 cpu_to_le32(1<<10) | 924 | #define AAC_OPT_SGMAP_HOST64 cpu_to_le32(1<<10) |
929 | #define AAC_OPT_ALARM cpu_to_le32(1<<11) | 925 | #define AAC_OPT_ALARM cpu_to_le32(1<<11) |
930 | #define AAC_OPT_NONDASD cpu_to_le32(1<<12) | 926 | #define AAC_OPT_NONDASD cpu_to_le32(1<<12) |
931 | #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13) | 927 | #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13) |
932 | #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14) | 928 | #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14) |
933 | #define AAC_OPT_SUPPLEMENT_ADAPTER_INFO cpu_to_le32(1<<16) | 929 | #define AAC_OPT_SUPPLEMENT_ADAPTER_INFO cpu_to_le32(1<<16) |
934 | #define AAC_OPT_NEW_COMM cpu_to_le32(1<<17) | 930 | #define AAC_OPT_NEW_COMM cpu_to_le32(1<<17) |
@@ -948,7 +944,7 @@ struct aac_dev | |||
948 | 944 | ||
949 | /* | 945 | /* |
950 | * Map for 128 fib objects (64k) | 946 | * Map for 128 fib objects (64k) |
951 | */ | 947 | */ |
952 | dma_addr_t hw_fib_pa; | 948 | dma_addr_t hw_fib_pa; |
953 | struct hw_fib *hw_fib_va; | 949 | struct hw_fib *hw_fib_va; |
954 | struct hw_fib *aif_base_va; | 950 | struct hw_fib *aif_base_va; |
@@ -959,24 +955,24 @@ struct aac_dev | |||
959 | 955 | ||
960 | struct fib *free_fib; | 956 | struct fib *free_fib; |
961 | spinlock_t fib_lock; | 957 | spinlock_t fib_lock; |
962 | 958 | ||
963 | struct aac_queue_block *queues; | 959 | struct aac_queue_block *queues; |
964 | /* | 960 | /* |
965 | * The user API will use an IOCTL to register itself to receive | 961 | * The user API will use an IOCTL to register itself to receive |
966 | * FIBs from the adapter. The following list is used to keep | 962 | * FIBs from the adapter. The following list is used to keep |
967 | * track of all the threads that have requested these FIBs. The | 963 | * track of all the threads that have requested these FIBs. The |
968 | * mutex is used to synchronize access to all data associated | 964 | * mutex is used to synchronize access to all data associated |
969 | * with the adapter fibs. | 965 | * with the adapter fibs. |
970 | */ | 966 | */ |
971 | struct list_head fib_list; | 967 | struct list_head fib_list; |
972 | 968 | ||
973 | struct adapter_ops a_ops; | 969 | struct adapter_ops a_ops; |
974 | unsigned long fsrev; /* Main driver's revision number */ | 970 | unsigned long fsrev; /* Main driver's revision number */ |
975 | 971 | ||
976 | unsigned base_size; /* Size of mapped in region */ | 972 | unsigned base_size; /* Size of mapped in region */ |
977 | struct aac_init *init; /* Holds initialization info to communicate with adapter */ | 973 | struct aac_init *init; /* Holds initialization info to communicate with adapter */ |
978 | dma_addr_t init_pa; /* Holds physical address of the init struct */ | 974 | dma_addr_t init_pa; /* Holds physical address of the init struct */ |
979 | 975 | ||
980 | struct pci_dev *pdev; /* Our PCI interface */ | 976 | struct pci_dev *pdev; /* Our PCI interface */ |
981 | void * printfbuf; /* pointer to buffer used for printf's from the adapter */ | 977 | void * printfbuf; /* pointer to buffer used for printf's from the adapter */ |
982 | void * comm_addr; /* Base address of Comm area */ | 978 | void * comm_addr; /* Base address of Comm area */ |
@@ -990,11 +986,11 @@ struct aac_dev | |||
990 | struct fsa_dev_info *fsa_dev; | 986 | struct fsa_dev_info *fsa_dev; |
991 | struct task_struct *thread; | 987 | struct task_struct *thread; |
992 | int cardtype; | 988 | int cardtype; |
993 | 989 | ||
994 | /* | 990 | /* |
995 | * The following is the device specific extension. | 991 | * The following is the device specific extension. |
996 | */ | 992 | */ |
997 | #if (!defined(AAC_MIN_FOOTPRINT_SIZE)) | 993 | #ifndef AAC_MIN_FOOTPRINT_SIZE |
998 | # define AAC_MIN_FOOTPRINT_SIZE 8192 | 994 | # define AAC_MIN_FOOTPRINT_SIZE 8192 |
999 | #endif | 995 | #endif |
1000 | union | 996 | union |
@@ -1015,7 +1011,7 @@ struct aac_dev | |||
1015 | /* These are in adapter info but they are in the io flow so | 1011 | /* These are in adapter info but they are in the io flow so |
1016 | * lets break them out so we don't have to do an AND to check them | 1012 | * lets break them out so we don't have to do an AND to check them |
1017 | */ | 1013 | */ |
1018 | u8 nondasd_support; | 1014 | u8 nondasd_support; |
1019 | u8 cache_protected; | 1015 | u8 cache_protected; |
1020 | u8 dac_support; | 1016 | u8 dac_support; |
1021 | u8 raid_scsi_mode; | 1017 | u8 raid_scsi_mode; |
@@ -1078,14 +1074,14 @@ struct aac_dev | |||
1078 | /* | 1074 | /* |
1079 | * Define the command values | 1075 | * Define the command values |
1080 | */ | 1076 | */ |
1081 | 1077 | ||
1082 | #define Null 0 | 1078 | #define Null 0 |
1083 | #define GetAttributes 1 | 1079 | #define GetAttributes 1 |
1084 | #define SetAttributes 2 | 1080 | #define SetAttributes 2 |
1085 | #define Lookup 3 | 1081 | #define Lookup 3 |
1086 | #define ReadLink 4 | 1082 | #define ReadLink 4 |
1087 | #define Read 5 | 1083 | #define Read 5 |
1088 | #define Write 6 | 1084 | #define Write 6 |
1089 | #define Create 7 | 1085 | #define Create 7 |
1090 | #define MakeDirectory 8 | 1086 | #define MakeDirectory 8 |
1091 | #define SymbolicLink 9 | 1087 | #define SymbolicLink 9 |
@@ -1181,19 +1177,19 @@ struct aac_dev | |||
1181 | 1177 | ||
1182 | struct aac_read | 1178 | struct aac_read |
1183 | { | 1179 | { |
1184 | __le32 command; | 1180 | __le32 command; |
1185 | __le32 cid; | 1181 | __le32 cid; |
1186 | __le32 block; | 1182 | __le32 block; |
1187 | __le32 count; | 1183 | __le32 count; |
1188 | struct sgmap sg; // Must be last in struct because it is variable | 1184 | struct sgmap sg; // Must be last in struct because it is variable |
1189 | }; | 1185 | }; |
1190 | 1186 | ||
1191 | struct aac_read64 | 1187 | struct aac_read64 |
1192 | { | 1188 | { |
1193 | __le32 command; | 1189 | __le32 command; |
1194 | __le16 cid; | 1190 | __le16 cid; |
1195 | __le16 sector_count; | 1191 | __le16 sector_count; |
1196 | __le32 block; | 1192 | __le32 block; |
1197 | __le16 pad; | 1193 | __le16 pad; |
1198 | __le16 flags; | 1194 | __le16 flags; |
1199 | struct sgmap64 sg; // Must be last in struct because it is variable | 1195 | struct sgmap64 sg; // Must be last in struct because it is variable |
@@ -1201,26 +1197,26 @@ struct aac_read64 | |||
1201 | 1197 | ||
1202 | struct aac_read_reply | 1198 | struct aac_read_reply |
1203 | { | 1199 | { |
1204 | __le32 status; | 1200 | __le32 status; |
1205 | __le32 count; | 1201 | __le32 count; |
1206 | }; | 1202 | }; |
1207 | 1203 | ||
1208 | struct aac_write | 1204 | struct aac_write |
1209 | { | 1205 | { |
1210 | __le32 command; | 1206 | __le32 command; |
1211 | __le32 cid; | 1207 | __le32 cid; |
1212 | __le32 block; | 1208 | __le32 block; |
1213 | __le32 count; | 1209 | __le32 count; |
1214 | __le32 stable; // Not used | 1210 | __le32 stable; // Not used |
1215 | struct sgmap sg; // Must be last in struct because it is variable | 1211 | struct sgmap sg; // Must be last in struct because it is variable |
1216 | }; | 1212 | }; |
1217 | 1213 | ||
1218 | struct aac_write64 | 1214 | struct aac_write64 |
1219 | { | 1215 | { |
1220 | __le32 command; | 1216 | __le32 command; |
1221 | __le16 cid; | 1217 | __le16 cid; |
1222 | __le16 sector_count; | 1218 | __le16 sector_count; |
1223 | __le32 block; | 1219 | __le32 block; |
1224 | __le16 pad; | 1220 | __le16 pad; |
1225 | __le16 flags; | 1221 | __le16 flags; |
1226 | #define IO_TYPE_WRITE 0x00000000 | 1222 | #define IO_TYPE_WRITE 0x00000000 |
@@ -1231,7 +1227,7 @@ struct aac_write64 | |||
1231 | struct aac_write_reply | 1227 | struct aac_write_reply |
1232 | { | 1228 | { |
1233 | __le32 status; | 1229 | __le32 status; |
1234 | __le32 count; | 1230 | __le32 count; |
1235 | __le32 committed; | 1231 | __le32 committed; |
1236 | }; | 1232 | }; |
1237 | 1233 | ||
@@ -1334,10 +1330,10 @@ struct aac_srb_reply | |||
1334 | #define SRB_NoDataXfer 0x0000 | 1330 | #define SRB_NoDataXfer 0x0000 |
1335 | #define SRB_DisableDisconnect 0x0004 | 1331 | #define SRB_DisableDisconnect 0x0004 |
1336 | #define SRB_DisableSynchTransfer 0x0008 | 1332 | #define SRB_DisableSynchTransfer 0x0008 |
1337 | #define SRB_BypassFrozenQueue 0x0010 | 1333 | #define SRB_BypassFrozenQueue 0x0010 |
1338 | #define SRB_DisableAutosense 0x0020 | 1334 | #define SRB_DisableAutosense 0x0020 |
1339 | #define SRB_DataIn 0x0040 | 1335 | #define SRB_DataIn 0x0040 |
1340 | #define SRB_DataOut 0x0080 | 1336 | #define SRB_DataOut 0x0080 |
1341 | 1337 | ||
1342 | /* | 1338 | /* |
1343 | * SRB Functions - set in aac_srb->function | 1339 | * SRB Functions - set in aac_srb->function |
@@ -1360,7 +1356,7 @@ struct aac_srb_reply | |||
1360 | #define SRBF_RemoveDevice 0x0016 | 1356 | #define SRBF_RemoveDevice 0x0016 |
1361 | #define SRBF_DomainValidation 0x0017 | 1357 | #define SRBF_DomainValidation 0x0017 |
1362 | 1358 | ||
1363 | /* | 1359 | /* |
1364 | * SRB SCSI Status - set in aac_srb->scsi_status | 1360 | * SRB SCSI Status - set in aac_srb->scsi_status |
1365 | */ | 1361 | */ |
1366 | #define SRB_STATUS_PENDING 0x00 | 1362 | #define SRB_STATUS_PENDING 0x00 |
@@ -1519,17 +1515,17 @@ struct aac_get_container_count_resp { | |||
1519 | */ | 1515 | */ |
1520 | 1516 | ||
1521 | struct aac_mntent { | 1517 | struct aac_mntent { |
1522 | __le32 oid; | 1518 | __le32 oid; |
1523 | u8 name[16]; /* if applicable */ | 1519 | u8 name[16]; /* if applicable */ |
1524 | struct creation_info create_info; /* if applicable */ | 1520 | struct creation_info create_info; /* if applicable */ |
1525 | __le32 capacity; | 1521 | __le32 capacity; |
1526 | __le32 vol; /* substrate structure */ | 1522 | __le32 vol; /* substrate structure */ |
1527 | __le32 obj; /* FT_FILESYS, etc. */ | 1523 | __le32 obj; /* FT_FILESYS, etc. */ |
1528 | __le32 state; /* unready for mounting, | 1524 | __le32 state; /* unready for mounting, |
1529 | readonly, etc. */ | 1525 | readonly, etc. */ |
1530 | union aac_contentinfo fileinfo; /* Info specific to content | 1526 | union aac_contentinfo fileinfo; /* Info specific to content |
1531 | manager (eg, filesystem) */ | 1527 | manager (eg, filesystem) */ |
1532 | __le32 altoid; /* != oid <==> snapshot or | 1528 | __le32 altoid; /* != oid <==> snapshot or |
1533 | broken mirror exists */ | 1529 | broken mirror exists */ |
1534 | __le32 capacityhigh; | 1530 | __le32 capacityhigh; |
1535 | }; | 1531 | }; |
@@ -1546,7 +1542,7 @@ struct aac_query_mount { | |||
1546 | 1542 | ||
1547 | struct aac_mount { | 1543 | struct aac_mount { |
1548 | __le32 status; | 1544 | __le32 status; |
1549 | __le32 type; /* should be same as that requested */ | 1545 | __le32 type; /* should be same as that requested */ |
1550 | __le32 count; | 1546 | __le32 count; |
1551 | struct aac_mntent mnt[1]; | 1547 | struct aac_mntent mnt[1]; |
1552 | }; | 1548 | }; |
@@ -1616,7 +1612,7 @@ struct aac_delete_disk { | |||
1616 | u32 disknum; | 1612 | u32 disknum; |
1617 | u32 cnum; | 1613 | u32 cnum; |
1618 | }; | 1614 | }; |
1619 | 1615 | ||
1620 | struct fib_ioctl | 1616 | struct fib_ioctl |
1621 | { | 1617 | { |
1622 | u32 fibctx; | 1618 | u32 fibctx; |
@@ -1630,10 +1626,10 @@ struct revision | |||
1630 | __le32 version; | 1626 | __le32 version; |
1631 | __le32 build; | 1627 | __le32 build; |
1632 | }; | 1628 | }; |
1633 | 1629 | ||
1634 | 1630 | ||
1635 | /* | 1631 | /* |
1636 | * Ugly - non Linux like ioctl coding for back compat. | 1632 | * Ugly - non Linux like ioctl coding for back compat. |
1637 | */ | 1633 | */ |
1638 | 1634 | ||
1639 | #define CTL_CODE(function, method) ( \ | 1635 | #define CTL_CODE(function, method) ( \ |
@@ -1641,7 +1637,7 @@ struct revision | |||
1641 | ) | 1637 | ) |
1642 | 1638 | ||
1643 | /* | 1639 | /* |
1644 | * Define the method codes for how buffers are passed for I/O and FS | 1640 | * Define the method codes for how buffers are passed for I/O and FS |
1645 | * controls | 1641 | * controls |
1646 | */ | 1642 | */ |
1647 | 1643 | ||
@@ -1652,15 +1648,15 @@ struct revision | |||
1652 | * Filesystem ioctls | 1648 | * Filesystem ioctls |
1653 | */ | 1649 | */ |
1654 | 1650 | ||
1655 | #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED) | 1651 | #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED) |
1656 | #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED) | 1652 | #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED) |
1657 | #define FSACTL_DELETE_DISK 0x163 | 1653 | #define FSACTL_DELETE_DISK 0x163 |
1658 | #define FSACTL_QUERY_DISK 0x173 | 1654 | #define FSACTL_QUERY_DISK 0x173 |
1659 | #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED) | 1655 | #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED) |
1660 | #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED) | 1656 | #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED) |
1661 | #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED) | 1657 | #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED) |
1662 | #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED) | 1658 | #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED) |
1663 | #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED) | 1659 | #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED) |
1664 | #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER) | 1660 | #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER) |
1665 | #define FSACTL_GET_CONTAINERS 2131 | 1661 | #define FSACTL_GET_CONTAINERS 2131 |
1666 | #define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED) | 1662 | #define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED) |
@@ -1669,7 +1665,7 @@ struct revision | |||
1669 | struct aac_common | 1665 | struct aac_common |
1670 | { | 1666 | { |
1671 | /* | 1667 | /* |
1672 | * If this value is set to 1 then interrupt moderation will occur | 1668 | * If this value is set to 1 then interrupt moderation will occur |
1673 | * in the base commuication support. | 1669 | * in the base commuication support. |
1674 | */ | 1670 | */ |
1675 | u32 irq_mod; | 1671 | u32 irq_mod; |
@@ -1698,11 +1694,11 @@ extern struct aac_common aac_config; | |||
1698 | * The following macro is used when sending and receiving FIBs. It is | 1694 | * The following macro is used when sending and receiving FIBs. It is |
1699 | * only used for debugging. | 1695 | * only used for debugging. |
1700 | */ | 1696 | */ |
1701 | 1697 | ||
1702 | #ifdef DBG | 1698 | #ifdef DBG |
1703 | #define FIB_COUNTER_INCREMENT(counter) (counter)++ | 1699 | #define FIB_COUNTER_INCREMENT(counter) (counter)++ |
1704 | #else | 1700 | #else |
1705 | #define FIB_COUNTER_INCREMENT(counter) | 1701 | #define FIB_COUNTER_INCREMENT(counter) |
1706 | #endif | 1702 | #endif |
1707 | 1703 | ||
1708 | /* | 1704 | /* |
@@ -1734,17 +1730,17 @@ extern struct aac_common aac_config; | |||
1734 | * | 1730 | * |
1735 | * The adapter reports is present state through the phase. Only | 1731 | * The adapter reports is present state through the phase. Only |
1736 | * a single phase should be ever be set. Each phase can have multiple | 1732 | * a single phase should be ever be set. Each phase can have multiple |
1737 | * phase status bits to provide more detailed information about the | 1733 | * phase status bits to provide more detailed information about the |
1738 | * state of the board. Care should be taken to ensure that any phase | 1734 | * state of the board. Care should be taken to ensure that any phase |
1739 | * status bits that are set when changing the phase are also valid | 1735 | * status bits that are set when changing the phase are also valid |
1740 | * for the new phase or be cleared out. Adapter software (monitor, | 1736 | * for the new phase or be cleared out. Adapter software (monitor, |
1741 | * iflash, kernel) is responsible for properly maintining the phase | 1737 | * iflash, kernel) is responsible for properly maintining the phase |
1742 | * status mailbox when it is running. | 1738 | * status mailbox when it is running. |
1743 | * | ||
1744 | * MONKER_API Phases | ||
1745 | * | 1739 | * |
1746 | * Phases are bit oriented. It is NOT valid to have multiple bits set | 1740 | * MONKER_API Phases |
1747 | */ | 1741 | * |
1742 | * Phases are bit oriented. It is NOT valid to have multiple bits set | ||
1743 | */ | ||
1748 | 1744 | ||
1749 | #define SELF_TEST_FAILED 0x00000004 | 1745 | #define SELF_TEST_FAILED 0x00000004 |
1750 | #define MONITOR_PANIC 0x00000020 | 1746 | #define MONITOR_PANIC 0x00000020 |
@@ -1767,8 +1763,8 @@ extern struct aac_common aac_config; | |||
1767 | * For FIB communication, we need all of the following things | 1763 | * For FIB communication, we need all of the following things |
1768 | * to send back to the user. | 1764 | * to send back to the user. |
1769 | */ | 1765 | */ |
1770 | 1766 | ||
1771 | #define AifCmdEventNotify 1 /* Notify of event */ | 1767 | #define AifCmdEventNotify 1 /* Notify of event */ |
1772 | #define AifEnConfigChange 3 /* Adapter configuration change */ | 1768 | #define AifEnConfigChange 3 /* Adapter configuration change */ |
1773 | #define AifEnContainerChange 4 /* Container configuration change */ | 1769 | #define AifEnContainerChange 4 /* Container configuration change */ |
1774 | #define AifEnDeviceFailure 5 /* SCSI device failed */ | 1770 | #define AifEnDeviceFailure 5 /* SCSI device failed */ |
@@ -1792,11 +1788,11 @@ extern struct aac_common aac_config; | |||
1792 | #define AifDenVolumeExtendComplete 201 /* A volume extend completed */ | 1788 | #define AifDenVolumeExtendComplete 201 /* A volume extend completed */ |
1793 | #define AifReqJobList 100 /* Gets back complete job list */ | 1789 | #define AifReqJobList 100 /* Gets back complete job list */ |
1794 | #define AifReqJobsForCtr 101 /* Gets back jobs for specific container */ | 1790 | #define AifReqJobsForCtr 101 /* Gets back jobs for specific container */ |
1795 | #define AifReqJobsForScsi 102 /* Gets back jobs for specific SCSI device */ | 1791 | #define AifReqJobsForScsi 102 /* Gets back jobs for specific SCSI device */ |
1796 | #define AifReqJobReport 103 /* Gets back a specific job report or list of them */ | 1792 | #define AifReqJobReport 103 /* Gets back a specific job report or list of them */ |
1797 | #define AifReqTerminateJob 104 /* Terminates job */ | 1793 | #define AifReqTerminateJob 104 /* Terminates job */ |
1798 | #define AifReqSuspendJob 105 /* Suspends a job */ | 1794 | #define AifReqSuspendJob 105 /* Suspends a job */ |
1799 | #define AifReqResumeJob 106 /* Resumes a job */ | 1795 | #define AifReqResumeJob 106 /* Resumes a job */ |
1800 | #define AifReqSendAPIReport 107 /* API generic report requests */ | 1796 | #define AifReqSendAPIReport 107 /* API generic report requests */ |
1801 | #define AifReqAPIJobStart 108 /* Start a job from the API */ | 1797 | #define AifReqAPIJobStart 108 /* Start a job from the API */ |
1802 | #define AifReqAPIJobUpdate 109 /* Update a job report from the API */ | 1798 | #define AifReqAPIJobUpdate 109 /* Update a job report from the API */ |
@@ -1815,8 +1811,8 @@ struct aac_aifcmd { | |||
1815 | }; | 1811 | }; |
1816 | 1812 | ||
1817 | /** | 1813 | /** |
1818 | * Convert capacity to cylinders | 1814 | * Convert capacity to cylinders |
1819 | * accounting for the fact capacity could be a 64 bit value | 1815 | * accounting for the fact capacity could be a 64 bit value |
1820 | * | 1816 | * |
1821 | */ | 1817 | */ |
1822 | static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor) | 1818 | static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor) |