diff options
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 335 |
1 files changed, 174 insertions, 161 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 9abba8b90f70..3195d29f2177 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))) */ |
@@ -12,7 +12,7 @@ | |||
12 | *----------------------------------------------------------------------------*/ | 12 | *----------------------------------------------------------------------------*/ |
13 | 13 | ||
14 | #ifndef AAC_DRIVER_BUILD | 14 | #ifndef AAC_DRIVER_BUILD |
15 | # define AAC_DRIVER_BUILD 2449 | 15 | # define AAC_DRIVER_BUILD 2455 |
16 | # define AAC_DRIVER_BRANCH "-ms" | 16 | # define AAC_DRIVER_BRANCH "-ms" |
17 | #endif | 17 | #endif |
18 | #define MAXIMUM_NUM_CONTAINERS 32 | 18 | #define MAXIMUM_NUM_CONTAINERS 32 |
@@ -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. |
@@ -521,33 +517,39 @@ struct aac_driver_ident | |||
521 | #define AAC_QUIRK_17SG 0x0010 | 517 | #define AAC_QUIRK_17SG 0x0010 |
522 | 518 | ||
523 | /* | 519 | /* |
520 | * Some adapter firmware does not support 64 bit scsi passthrough | ||
521 | * commands. | ||
522 | */ | ||
523 | #define AAC_QUIRK_SCSI_32 0x0020 | ||
524 | |||
525 | /* | ||
524 | * The adapter interface specs all queues to be located in the same | 526 | * The adapter interface specs all queues to be located in the same |
525 | * physically contigous block. The host structure that defines the | 527 | * physically contigous block. The host structure that defines the |
526 | * commuication queues will assume they are each a separate physically | 528 | * commuication queues will assume they are each a separate physically |
527 | * contigous memory region that will support them all being one big | 529 | * contigous memory region that will support them all being one big |
528 | * contigous block. | 530 | * contigous block. |
529 | * 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 |
530 | * commuication. These regions are accessed by both the host and adapter. | 532 | * commuication. These regions are accessed by both the host and adapter. |
531 | */ | 533 | */ |
532 | 534 | ||
533 | struct aac_queue { | 535 | struct aac_queue { |
534 | u64 logical; /*address we give the adapter */ | 536 | u64 logical; /*address we give the adapter */ |
535 | struct aac_entry *base; /*system virtual address */ | 537 | struct aac_entry *base; /*system virtual address */ |
536 | struct aac_qhdr headers; /*producer,consumer q headers*/ | 538 | struct aac_qhdr headers; /*producer,consumer q headers*/ |
537 | u32 entries; /*Number of queue entries */ | 539 | u32 entries; /*Number of queue entries */ |
538 | 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 */ |
539 | wait_queue_head_t cmdready; /*Cmd ready from the adapter */ | 541 | wait_queue_head_t cmdready; /*Cmd ready from the adapter */ |
540 | /* This is only valid for adapter to host command queues. */ | 542 | /* This is only valid for adapter to host command queues. */ |
541 | 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 */ |
542 | 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) */ |
543 | 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 */ |
544 | /* only valid for command queues which receive entries from the adapter. */ | 546 | /* only valid for command queues which receive entries from the adapter. */ |
545 | u32 numpending; /* Number of entries on outstanding queue. */ | 547 | u32 numpending; /* Number of entries on outstanding queue. */ |
546 | struct aac_dev * dev; /* Back pointer to adapter structure */ | 548 | struct aac_dev * dev; /* Back pointer to adapter structure */ |
547 | }; | 549 | }; |
548 | 550 | ||
549 | /* | 551 | /* |
550 | * Message queues. The order here is important, see also the | 552 | * Message queues. The order here is important, see also the |
551 | * queue type ordering | 553 | * queue type ordering |
552 | */ | 554 | */ |
553 | 555 | ||
@@ -559,12 +561,12 @@ struct aac_queue_block | |||
559 | /* | 561 | /* |
560 | * SaP1 Message Unit Registers | 562 | * SaP1 Message Unit Registers |
561 | */ | 563 | */ |
562 | 564 | ||
563 | struct sa_drawbridge_CSR { | 565 | struct sa_drawbridge_CSR { |
564 | /* Offset | Name */ | 566 | /* Offset | Name */ |
565 | __le32 reserved[10]; /* 00h-27h | Reserved */ | 567 | __le32 reserved[10]; /* 00h-27h | Reserved */ |
566 | u8 LUT_Offset; /* 28h | Lookup Table Offset */ | 568 | u8 LUT_Offset; /* 28h | Lookup Table Offset */ |
567 | u8 reserved1[3]; /* 29h-2bh | Reserved */ | 569 | u8 reserved1[3]; /* 29h-2bh | Reserved */ |
568 | __le32 LUT_Data; /* 2ch | Looup Table Data */ | 570 | __le32 LUT_Data; /* 2ch | Looup Table Data */ |
569 | __le32 reserved2[26]; /* 30h-97h | Reserved */ | 571 | __le32 reserved2[26]; /* 30h-97h | Reserved */ |
570 | __le16 PRICLEARIRQ; /* 98h | Primary Clear Irq */ | 572 | __le16 PRICLEARIRQ; /* 98h | Primary Clear Irq */ |
@@ -583,8 +585,8 @@ struct sa_drawbridge_CSR { | |||
583 | __le32 MAILBOX5; /* bch | Scratchpad 5 */ | 585 | __le32 MAILBOX5; /* bch | Scratchpad 5 */ |
584 | __le32 MAILBOX6; /* c0h | Scratchpad 6 */ | 586 | __le32 MAILBOX6; /* c0h | Scratchpad 6 */ |
585 | __le32 MAILBOX7; /* c4h | Scratchpad 7 */ | 587 | __le32 MAILBOX7; /* c4h | Scratchpad 7 */ |
586 | __le32 ROM_Setup_Data; /* c8h | Rom Setup and Data */ | 588 | __le32 ROM_Setup_Data; /* c8h | Rom Setup and Data */ |
587 | __le32 ROM_Control_Addr;/* cch | Rom Control and Address */ | 589 | __le32 ROM_Control_Addr;/* cch | Rom Control and Address */ |
588 | __le32 reserved3[12]; /* d0h-ffh | reserved */ | 590 | __le32 reserved3[12]; /* d0h-ffh | reserved */ |
589 | __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */ | 591 | __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */ |
590 | }; | 592 | }; |
@@ -597,7 +599,7 @@ struct sa_drawbridge_CSR { | |||
597 | #define Mailbox5 SaDbCSR.MAILBOX5 | 599 | #define Mailbox5 SaDbCSR.MAILBOX5 |
598 | #define Mailbox6 SaDbCSR.MAILBOX6 | 600 | #define Mailbox6 SaDbCSR.MAILBOX6 |
599 | #define Mailbox7 SaDbCSR.MAILBOX7 | 601 | #define Mailbox7 SaDbCSR.MAILBOX7 |
600 | 602 | ||
601 | #define DoorbellReg_p SaDbCSR.PRISETIRQ | 603 | #define DoorbellReg_p SaDbCSR.PRISETIRQ |
602 | #define DoorbellReg_s SaDbCSR.SECSETIRQ | 604 | #define DoorbellReg_s SaDbCSR.SECSETIRQ |
603 | #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ | 605 | #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ |
@@ -611,19 +613,19 @@ struct sa_drawbridge_CSR { | |||
611 | #define DOORBELL_5 0x0020 | 613 | #define DOORBELL_5 0x0020 |
612 | #define DOORBELL_6 0x0040 | 614 | #define DOORBELL_6 0x0040 |
613 | 615 | ||
614 | 616 | ||
615 | #define PrintfReady DOORBELL_5 | 617 | #define PrintfReady DOORBELL_5 |
616 | #define PrintfDone DOORBELL_5 | 618 | #define PrintfDone DOORBELL_5 |
617 | 619 | ||
618 | struct sa_registers { | 620 | struct sa_registers { |
619 | struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */ | 621 | struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */ |
620 | }; | 622 | }; |
621 | 623 | ||
622 | 624 | ||
623 | #define Sa_MINIPORT_REVISION 1 | 625 | #define Sa_MINIPORT_REVISION 1 |
624 | 626 | ||
625 | #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) | 627 | #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) |
626 | #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) | 628 | #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR)) |
627 | #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)) |
628 | #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)) |
629 | 631 | ||
@@ -640,21 +642,21 @@ struct rx_mu_registers { | |||
640 | __le32 IMRx[2]; /* 1310h | 10h | Inbound Message Registers */ | 642 | __le32 IMRx[2]; /* 1310h | 10h | Inbound Message Registers */ |
641 | __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */ | 643 | __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */ |
642 | __le32 IDR; /* 1320h | 20h | Inbound Doorbell Register */ | 644 | __le32 IDR; /* 1320h | 20h | Inbound Doorbell Register */ |
643 | __le32 IISR; /* 1324h | 24h | Inbound Interrupt | 645 | __le32 IISR; /* 1324h | 24h | Inbound Interrupt |
644 | Status Register */ | 646 | Status Register */ |
645 | __le32 IIMR; /* 1328h | 28h | Inbound Interrupt | 647 | __le32 IIMR; /* 1328h | 28h | Inbound Interrupt |
646 | Mask Register */ | 648 | Mask Register */ |
647 | __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */ | 649 | __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */ |
648 | __le32 OISR; /* 1330h | 30h | Outbound Interrupt | 650 | __le32 OISR; /* 1330h | 30h | Outbound Interrupt |
649 | Status Register */ | 651 | Status Register */ |
650 | __le32 OIMR; /* 1334h | 34h | Outbound Interrupt | 652 | __le32 OIMR; /* 1334h | 34h | Outbound Interrupt |
651 | Mask Register */ | 653 | Mask Register */ |
652 | __le32 reserved2; /* 1338h | 38h | Reserved */ | 654 | __le32 reserved2; /* 1338h | 38h | Reserved */ |
653 | __le32 reserved3; /* 133Ch | 3Ch | Reserved */ | 655 | __le32 reserved3; /* 133Ch | 3Ch | Reserved */ |
654 | __le32 InboundQueue;/* 1340h | 40h | Inbound Queue Port relative to firmware */ | 656 | __le32 InboundQueue;/* 1340h | 40h | Inbound Queue Port relative to firmware */ |
655 | __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */ | 657 | __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */ |
656 | /* * Must access through ATU Inbound | 658 | /* * Must access through ATU Inbound |
657 | Translation Window */ | 659 | Translation Window */ |
658 | }; | 660 | }; |
659 | 661 | ||
660 | struct rx_inbound { | 662 | struct rx_inbound { |
@@ -710,12 +712,12 @@ struct rkt_registers { | |||
710 | typedef void (*fib_callback)(void *ctxt, struct fib *fibctx); | 712 | typedef void (*fib_callback)(void *ctxt, struct fib *fibctx); |
711 | 713 | ||
712 | struct aac_fib_context { | 714 | struct aac_fib_context { |
713 | s16 type; // used for verification of structure | 715 | s16 type; // used for verification of structure |
714 | s16 size; | 716 | s16 size; |
715 | u32 unique; // unique value representing this context | 717 | u32 unique; // unique value representing this context |
716 | ulong jiffies; // used for cleanup - dmb changed to ulong | 718 | ulong jiffies; // used for cleanup - dmb changed to ulong |
717 | 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 |
718 | 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. |
719 | int wait; // Set to true when thread is in WaitForSingleObject | 721 | int wait; // Set to true when thread is in WaitForSingleObject |
720 | unsigned long count; // total number of FIBs on FibList | 722 | unsigned long count; // total number of FIBs on FibList |
721 | 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 |
@@ -734,9 +736,9 @@ struct sense_data { | |||
734 | u8 EOM:1; /* End Of Medium - reserved for random access devices */ | 736 | u8 EOM:1; /* End Of Medium - reserved for random access devices */ |
735 | u8 filemark:1; /* Filemark - reserved for random access devices */ | 737 | u8 filemark:1; /* Filemark - reserved for random access devices */ |
736 | 738 | ||
737 | u8 information[4]; /* for direct-access devices, contains the unsigned | 739 | u8 information[4]; /* for direct-access devices, contains the unsigned |
738 | * logical block address or residue associated with | 740 | * logical block address or residue associated with |
739 | * the sense key | 741 | * the sense key |
740 | */ | 742 | */ |
741 | 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 */ |
742 | u8 cmnd_info[4]; /* not used */ | 744 | u8 cmnd_info[4]; /* not used */ |
@@ -746,7 +748,7 @@ struct sense_data { | |||
746 | 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 |
747 | * was in error | 749 | * was in error |
748 | */ | 750 | */ |
749 | u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that | 751 | u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that |
750 | * the bit_ptr field has valid value | 752 | * the bit_ptr field has valid value |
751 | */ | 753 | */ |
752 | u8 reserved2:2; | 754 | u8 reserved2:2; |
@@ -780,24 +782,24 @@ struct fib { | |||
780 | /* | 782 | /* |
781 | * The Adapter that this I/O is destined for. | 783 | * The Adapter that this I/O is destined for. |
782 | */ | 784 | */ |
783 | struct aac_dev *dev; | 785 | struct aac_dev *dev; |
784 | /* | 786 | /* |
785 | * 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 |
786 | * caller did not pass one and this is synch io. | 788 | * caller did not pass one and this is synch io. |
787 | */ | 789 | */ |
788 | struct semaphore event_wait; | 790 | struct semaphore event_wait; |
789 | spinlock_t event_lock; | 791 | spinlock_t event_lock; |
790 | 792 | ||
791 | u32 done; /* gets set to 1 when fib is complete */ | 793 | u32 done; /* gets set to 1 when fib is complete */ |
792 | fib_callback callback; | 794 | fib_callback callback; |
793 | void *callback_data; | 795 | void *callback_data; |
794 | u32 flags; // u32 dmb was ulong | 796 | u32 flags; // u32 dmb was ulong |
795 | /* | 797 | /* |
796 | * And for the internal issue/reply queues (we may be able | 798 | * And for the internal issue/reply queues (we may be able |
797 | * to merge these two) | 799 | * to merge these two) |
798 | */ | 800 | */ |
799 | struct list_head fiblink; | 801 | struct list_head fiblink; |
800 | void *data; | 802 | void *data; |
801 | struct hw_fib *hw_fib_va; /* Actual shared object */ | 803 | struct hw_fib *hw_fib_va; /* Actual shared object */ |
802 | dma_addr_t hw_fib_pa; /* physical address of hw_fib*/ | 804 | dma_addr_t hw_fib_pa; /* physical address of hw_fib*/ |
803 | }; | 805 | }; |
@@ -807,7 +809,7 @@ struct fib { | |||
807 | * | 809 | * |
808 | * This is returned by the RequestAdapterInfo block | 810 | * This is returned by the RequestAdapterInfo block |
809 | */ | 811 | */ |
810 | 812 | ||
811 | struct aac_adapter_info | 813 | struct aac_adapter_info |
812 | { | 814 | { |
813 | __le32 platform; | 815 | __le32 platform; |
@@ -826,7 +828,7 @@ struct aac_adapter_info | |||
826 | __le32 biosrev; | 828 | __le32 biosrev; |
827 | __le32 biosbuild; | 829 | __le32 biosbuild; |
828 | __le32 cluster; | 830 | __le32 cluster; |
829 | __le32 clusterchannelmask; | 831 | __le32 clusterchannelmask; |
830 | __le32 serial[2]; | 832 | __le32 serial[2]; |
831 | __le32 battery; | 833 | __le32 battery; |
832 | __le32 options; | 834 | __le32 options; |
@@ -863,9 +865,10 @@ struct aac_supplement_adapter_info | |||
863 | __le32 SupportedOptions2; | 865 | __le32 SupportedOptions2; |
864 | __le32 ReservedGrowth[1]; | 866 | __le32 ReservedGrowth[1]; |
865 | }; | 867 | }; |
866 | #define AAC_FEATURE_FALCON 0x00000010 | 868 | #define AAC_FEATURE_FALCON cpu_to_le32(0x00000010) |
867 | #define AAC_OPTION_MU_RESET 0x00000001 | 869 | #define AAC_FEATURE_JBOD cpu_to_le32(0x08000000) |
868 | #define AAC_OPTION_IGNORE_RESET 0x00000002 | 870 | #define AAC_OPTION_MU_RESET cpu_to_le32(0x00000001) |
871 | #define AAC_OPTION_IGNORE_RESET cpu_to_le32(0x00000002) | ||
869 | #define AAC_SIS_VERSION_V3 3 | 872 | #define AAC_SIS_VERSION_V3 3 |
870 | #define AAC_SIS_SLOT_UNKNOWN 0xFF | 873 | #define AAC_SIS_SLOT_UNKNOWN 0xFF |
871 | 874 | ||
@@ -916,13 +919,13 @@ struct aac_bus_info_response { | |||
916 | #define AAC_OPT_HOST_TIME_FIB cpu_to_le32(1<<4) | 919 | #define AAC_OPT_HOST_TIME_FIB cpu_to_le32(1<<4) |
917 | #define AAC_OPT_RAID50 cpu_to_le32(1<<5) | 920 | #define AAC_OPT_RAID50 cpu_to_le32(1<<5) |
918 | #define AAC_OPT_4GB_WINDOW cpu_to_le32(1<<6) | 921 | #define AAC_OPT_4GB_WINDOW cpu_to_le32(1<<6) |
919 | #define AAC_OPT_SCSI_UPGRADEABLE cpu_to_le32(1<<7) | 922 | #define AAC_OPT_SCSI_UPGRADEABLE cpu_to_le32(1<<7) |
920 | #define AAC_OPT_SOFT_ERR_REPORT cpu_to_le32(1<<8) | 923 | #define AAC_OPT_SOFT_ERR_REPORT cpu_to_le32(1<<8) |
921 | #define AAC_OPT_SUPPORTED_RECONDITION cpu_to_le32(1<<9) | 924 | #define AAC_OPT_SUPPORTED_RECONDITION cpu_to_le32(1<<9) |
922 | #define AAC_OPT_SGMAP_HOST64 cpu_to_le32(1<<10) | 925 | #define AAC_OPT_SGMAP_HOST64 cpu_to_le32(1<<10) |
923 | #define AAC_OPT_ALARM cpu_to_le32(1<<11) | 926 | #define AAC_OPT_ALARM cpu_to_le32(1<<11) |
924 | #define AAC_OPT_NONDASD cpu_to_le32(1<<12) | 927 | #define AAC_OPT_NONDASD cpu_to_le32(1<<12) |
925 | #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13) | 928 | #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13) |
926 | #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14) | 929 | #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14) |
927 | #define AAC_OPT_SUPPLEMENT_ADAPTER_INFO cpu_to_le32(1<<16) | 930 | #define AAC_OPT_SUPPLEMENT_ADAPTER_INFO cpu_to_le32(1<<16) |
928 | #define AAC_OPT_NEW_COMM cpu_to_le32(1<<17) | 931 | #define AAC_OPT_NEW_COMM cpu_to_le32(1<<17) |
@@ -942,7 +945,7 @@ struct aac_dev | |||
942 | 945 | ||
943 | /* | 946 | /* |
944 | * Map for 128 fib objects (64k) | 947 | * Map for 128 fib objects (64k) |
945 | */ | 948 | */ |
946 | dma_addr_t hw_fib_pa; | 949 | dma_addr_t hw_fib_pa; |
947 | struct hw_fib *hw_fib_va; | 950 | struct hw_fib *hw_fib_va; |
948 | struct hw_fib *aif_base_va; | 951 | struct hw_fib *aif_base_va; |
@@ -953,24 +956,24 @@ struct aac_dev | |||
953 | 956 | ||
954 | struct fib *free_fib; | 957 | struct fib *free_fib; |
955 | spinlock_t fib_lock; | 958 | spinlock_t fib_lock; |
956 | 959 | ||
957 | struct aac_queue_block *queues; | 960 | struct aac_queue_block *queues; |
958 | /* | 961 | /* |
959 | * The user API will use an IOCTL to register itself to receive | 962 | * The user API will use an IOCTL to register itself to receive |
960 | * FIBs from the adapter. The following list is used to keep | 963 | * FIBs from the adapter. The following list is used to keep |
961 | * track of all the threads that have requested these FIBs. The | 964 | * track of all the threads that have requested these FIBs. The |
962 | * mutex is used to synchronize access to all data associated | 965 | * mutex is used to synchronize access to all data associated |
963 | * with the adapter fibs. | 966 | * with the adapter fibs. |
964 | */ | 967 | */ |
965 | struct list_head fib_list; | 968 | struct list_head fib_list; |
966 | 969 | ||
967 | struct adapter_ops a_ops; | 970 | struct adapter_ops a_ops; |
968 | unsigned long fsrev; /* Main driver's revision number */ | 971 | unsigned long fsrev; /* Main driver's revision number */ |
969 | 972 | ||
970 | unsigned base_size; /* Size of mapped in region */ | 973 | unsigned base_size; /* Size of mapped in region */ |
971 | struct aac_init *init; /* Holds initialization info to communicate with adapter */ | 974 | struct aac_init *init; /* Holds initialization info to communicate with adapter */ |
972 | dma_addr_t init_pa; /* Holds physical address of the init struct */ | 975 | dma_addr_t init_pa; /* Holds physical address of the init struct */ |
973 | 976 | ||
974 | struct pci_dev *pdev; /* Our PCI interface */ | 977 | struct pci_dev *pdev; /* Our PCI interface */ |
975 | void * printfbuf; /* pointer to buffer used for printf's from the adapter */ | 978 | void * printfbuf; /* pointer to buffer used for printf's from the adapter */ |
976 | void * comm_addr; /* Base address of Comm area */ | 979 | void * comm_addr; /* Base address of Comm area */ |
@@ -984,11 +987,11 @@ struct aac_dev | |||
984 | struct fsa_dev_info *fsa_dev; | 987 | struct fsa_dev_info *fsa_dev; |
985 | struct task_struct *thread; | 988 | struct task_struct *thread; |
986 | int cardtype; | 989 | int cardtype; |
987 | 990 | ||
988 | /* | 991 | /* |
989 | * The following is the device specific extension. | 992 | * The following is the device specific extension. |
990 | */ | 993 | */ |
991 | #if (!defined(AAC_MIN_FOOTPRINT_SIZE)) | 994 | #ifndef AAC_MIN_FOOTPRINT_SIZE |
992 | # define AAC_MIN_FOOTPRINT_SIZE 8192 | 995 | # define AAC_MIN_FOOTPRINT_SIZE 8192 |
993 | #endif | 996 | #endif |
994 | union | 997 | union |
@@ -1009,7 +1012,9 @@ struct aac_dev | |||
1009 | /* These are in adapter info but they are in the io flow so | 1012 | /* These are in adapter info but they are in the io flow so |
1010 | * lets break them out so we don't have to do an AND to check them | 1013 | * lets break them out so we don't have to do an AND to check them |
1011 | */ | 1014 | */ |
1012 | u8 nondasd_support; | 1015 | u8 nondasd_support; |
1016 | u8 jbod; | ||
1017 | u8 cache_protected; | ||
1013 | u8 dac_support; | 1018 | u8 dac_support; |
1014 | u8 raid_scsi_mode; | 1019 | u8 raid_scsi_mode; |
1015 | u8 comm_interface; | 1020 | u8 comm_interface; |
@@ -1066,18 +1071,19 @@ struct aac_dev | |||
1066 | (dev)->a_ops.adapter_comm(dev, comm) | 1071 | (dev)->a_ops.adapter_comm(dev, comm) |
1067 | 1072 | ||
1068 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) | 1073 | #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001) |
1074 | #define FIB_CONTEXT_FLAG (0x00000002) | ||
1069 | 1075 | ||
1070 | /* | 1076 | /* |
1071 | * Define the command values | 1077 | * Define the command values |
1072 | */ | 1078 | */ |
1073 | 1079 | ||
1074 | #define Null 0 | 1080 | #define Null 0 |
1075 | #define GetAttributes 1 | 1081 | #define GetAttributes 1 |
1076 | #define SetAttributes 2 | 1082 | #define SetAttributes 2 |
1077 | #define Lookup 3 | 1083 | #define Lookup 3 |
1078 | #define ReadLink 4 | 1084 | #define ReadLink 4 |
1079 | #define Read 5 | 1085 | #define Read 5 |
1080 | #define Write 6 | 1086 | #define Write 6 |
1081 | #define Create 7 | 1087 | #define Create 7 |
1082 | #define MakeDirectory 8 | 1088 | #define MakeDirectory 8 |
1083 | #define SymbolicLink 9 | 1089 | #define SymbolicLink 9 |
@@ -1173,19 +1179,19 @@ struct aac_dev | |||
1173 | 1179 | ||
1174 | struct aac_read | 1180 | struct aac_read |
1175 | { | 1181 | { |
1176 | __le32 command; | 1182 | __le32 command; |
1177 | __le32 cid; | 1183 | __le32 cid; |
1178 | __le32 block; | 1184 | __le32 block; |
1179 | __le32 count; | 1185 | __le32 count; |
1180 | struct sgmap sg; // Must be last in struct because it is variable | 1186 | struct sgmap sg; // Must be last in struct because it is variable |
1181 | }; | 1187 | }; |
1182 | 1188 | ||
1183 | struct aac_read64 | 1189 | struct aac_read64 |
1184 | { | 1190 | { |
1185 | __le32 command; | 1191 | __le32 command; |
1186 | __le16 cid; | 1192 | __le16 cid; |
1187 | __le16 sector_count; | 1193 | __le16 sector_count; |
1188 | __le32 block; | 1194 | __le32 block; |
1189 | __le16 pad; | 1195 | __le16 pad; |
1190 | __le16 flags; | 1196 | __le16 flags; |
1191 | struct sgmap64 sg; // Must be last in struct because it is variable | 1197 | struct sgmap64 sg; // Must be last in struct because it is variable |
@@ -1193,26 +1199,26 @@ struct aac_read64 | |||
1193 | 1199 | ||
1194 | struct aac_read_reply | 1200 | struct aac_read_reply |
1195 | { | 1201 | { |
1196 | __le32 status; | 1202 | __le32 status; |
1197 | __le32 count; | 1203 | __le32 count; |
1198 | }; | 1204 | }; |
1199 | 1205 | ||
1200 | struct aac_write | 1206 | struct aac_write |
1201 | { | 1207 | { |
1202 | __le32 command; | 1208 | __le32 command; |
1203 | __le32 cid; | 1209 | __le32 cid; |
1204 | __le32 block; | 1210 | __le32 block; |
1205 | __le32 count; | 1211 | __le32 count; |
1206 | __le32 stable; // Not used | 1212 | __le32 stable; // Not used |
1207 | struct sgmap sg; // Must be last in struct because it is variable | 1213 | struct sgmap sg; // Must be last in struct because it is variable |
1208 | }; | 1214 | }; |
1209 | 1215 | ||
1210 | struct aac_write64 | 1216 | struct aac_write64 |
1211 | { | 1217 | { |
1212 | __le32 command; | 1218 | __le32 command; |
1213 | __le16 cid; | 1219 | __le16 cid; |
1214 | __le16 sector_count; | 1220 | __le16 sector_count; |
1215 | __le32 block; | 1221 | __le32 block; |
1216 | __le16 pad; | 1222 | __le16 pad; |
1217 | __le16 flags; | 1223 | __le16 flags; |
1218 | #define IO_TYPE_WRITE 0x00000000 | 1224 | #define IO_TYPE_WRITE 0x00000000 |
@@ -1223,7 +1229,7 @@ struct aac_write64 | |||
1223 | struct aac_write_reply | 1229 | struct aac_write_reply |
1224 | { | 1230 | { |
1225 | __le32 status; | 1231 | __le32 status; |
1226 | __le32 count; | 1232 | __le32 count; |
1227 | __le32 committed; | 1233 | __le32 committed; |
1228 | }; | 1234 | }; |
1229 | 1235 | ||
@@ -1326,10 +1332,10 @@ struct aac_srb_reply | |||
1326 | #define SRB_NoDataXfer 0x0000 | 1332 | #define SRB_NoDataXfer 0x0000 |
1327 | #define SRB_DisableDisconnect 0x0004 | 1333 | #define SRB_DisableDisconnect 0x0004 |
1328 | #define SRB_DisableSynchTransfer 0x0008 | 1334 | #define SRB_DisableSynchTransfer 0x0008 |
1329 | #define SRB_BypassFrozenQueue 0x0010 | 1335 | #define SRB_BypassFrozenQueue 0x0010 |
1330 | #define SRB_DisableAutosense 0x0020 | 1336 | #define SRB_DisableAutosense 0x0020 |
1331 | #define SRB_DataIn 0x0040 | 1337 | #define SRB_DataIn 0x0040 |
1332 | #define SRB_DataOut 0x0080 | 1338 | #define SRB_DataOut 0x0080 |
1333 | 1339 | ||
1334 | /* | 1340 | /* |
1335 | * SRB Functions - set in aac_srb->function | 1341 | * SRB Functions - set in aac_srb->function |
@@ -1352,7 +1358,7 @@ struct aac_srb_reply | |||
1352 | #define SRBF_RemoveDevice 0x0016 | 1358 | #define SRBF_RemoveDevice 0x0016 |
1353 | #define SRBF_DomainValidation 0x0017 | 1359 | #define SRBF_DomainValidation 0x0017 |
1354 | 1360 | ||
1355 | /* | 1361 | /* |
1356 | * SRB SCSI Status - set in aac_srb->scsi_status | 1362 | * SRB SCSI Status - set in aac_srb->scsi_status |
1357 | */ | 1363 | */ |
1358 | #define SRB_STATUS_PENDING 0x00 | 1364 | #define SRB_STATUS_PENDING 0x00 |
@@ -1511,17 +1517,17 @@ struct aac_get_container_count_resp { | |||
1511 | */ | 1517 | */ |
1512 | 1518 | ||
1513 | struct aac_mntent { | 1519 | struct aac_mntent { |
1514 | __le32 oid; | 1520 | __le32 oid; |
1515 | u8 name[16]; /* if applicable */ | 1521 | u8 name[16]; /* if applicable */ |
1516 | struct creation_info create_info; /* if applicable */ | 1522 | struct creation_info create_info; /* if applicable */ |
1517 | __le32 capacity; | 1523 | __le32 capacity; |
1518 | __le32 vol; /* substrate structure */ | 1524 | __le32 vol; /* substrate structure */ |
1519 | __le32 obj; /* FT_FILESYS, etc. */ | 1525 | __le32 obj; /* FT_FILESYS, etc. */ |
1520 | __le32 state; /* unready for mounting, | 1526 | __le32 state; /* unready for mounting, |
1521 | readonly, etc. */ | 1527 | readonly, etc. */ |
1522 | union aac_contentinfo fileinfo; /* Info specific to content | 1528 | union aac_contentinfo fileinfo; /* Info specific to content |
1523 | manager (eg, filesystem) */ | 1529 | manager (eg, filesystem) */ |
1524 | __le32 altoid; /* != oid <==> snapshot or | 1530 | __le32 altoid; /* != oid <==> snapshot or |
1525 | broken mirror exists */ | 1531 | broken mirror exists */ |
1526 | __le32 capacityhigh; | 1532 | __le32 capacityhigh; |
1527 | }; | 1533 | }; |
@@ -1538,7 +1544,7 @@ struct aac_query_mount { | |||
1538 | 1544 | ||
1539 | struct aac_mount { | 1545 | struct aac_mount { |
1540 | __le32 status; | 1546 | __le32 status; |
1541 | __le32 type; /* should be same as that requested */ | 1547 | __le32 type; /* should be same as that requested */ |
1542 | __le32 count; | 1548 | __le32 count; |
1543 | struct aac_mntent mnt[1]; | 1549 | struct aac_mntent mnt[1]; |
1544 | }; | 1550 | }; |
@@ -1608,7 +1614,7 @@ struct aac_delete_disk { | |||
1608 | u32 disknum; | 1614 | u32 disknum; |
1609 | u32 cnum; | 1615 | u32 cnum; |
1610 | }; | 1616 | }; |
1611 | 1617 | ||
1612 | struct fib_ioctl | 1618 | struct fib_ioctl |
1613 | { | 1619 | { |
1614 | u32 fibctx; | 1620 | u32 fibctx; |
@@ -1622,10 +1628,10 @@ struct revision | |||
1622 | __le32 version; | 1628 | __le32 version; |
1623 | __le32 build; | 1629 | __le32 build; |
1624 | }; | 1630 | }; |
1625 | 1631 | ||
1626 | 1632 | ||
1627 | /* | 1633 | /* |
1628 | * Ugly - non Linux like ioctl coding for back compat. | 1634 | * Ugly - non Linux like ioctl coding for back compat. |
1629 | */ | 1635 | */ |
1630 | 1636 | ||
1631 | #define CTL_CODE(function, method) ( \ | 1637 | #define CTL_CODE(function, method) ( \ |
@@ -1633,7 +1639,7 @@ struct revision | |||
1633 | ) | 1639 | ) |
1634 | 1640 | ||
1635 | /* | 1641 | /* |
1636 | * Define the method codes for how buffers are passed for I/O and FS | 1642 | * Define the method codes for how buffers are passed for I/O and FS |
1637 | * controls | 1643 | * controls |
1638 | */ | 1644 | */ |
1639 | 1645 | ||
@@ -1644,15 +1650,15 @@ struct revision | |||
1644 | * Filesystem ioctls | 1650 | * Filesystem ioctls |
1645 | */ | 1651 | */ |
1646 | 1652 | ||
1647 | #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED) | 1653 | #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED) |
1648 | #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED) | 1654 | #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED) |
1649 | #define FSACTL_DELETE_DISK 0x163 | 1655 | #define FSACTL_DELETE_DISK 0x163 |
1650 | #define FSACTL_QUERY_DISK 0x173 | 1656 | #define FSACTL_QUERY_DISK 0x173 |
1651 | #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED) | 1657 | #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED) |
1652 | #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED) | 1658 | #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED) |
1653 | #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED) | 1659 | #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED) |
1654 | #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED) | 1660 | #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED) |
1655 | #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED) | 1661 | #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED) |
1656 | #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER) | 1662 | #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER) |
1657 | #define FSACTL_GET_CONTAINERS 2131 | 1663 | #define FSACTL_GET_CONTAINERS 2131 |
1658 | #define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED) | 1664 | #define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED) |
@@ -1661,7 +1667,7 @@ struct revision | |||
1661 | struct aac_common | 1667 | struct aac_common |
1662 | { | 1668 | { |
1663 | /* | 1669 | /* |
1664 | * If this value is set to 1 then interrupt moderation will occur | 1670 | * If this value is set to 1 then interrupt moderation will occur |
1665 | * in the base commuication support. | 1671 | * in the base commuication support. |
1666 | */ | 1672 | */ |
1667 | u32 irq_mod; | 1673 | u32 irq_mod; |
@@ -1690,11 +1696,11 @@ extern struct aac_common aac_config; | |||
1690 | * The following macro is used when sending and receiving FIBs. It is | 1696 | * The following macro is used when sending and receiving FIBs. It is |
1691 | * only used for debugging. | 1697 | * only used for debugging. |
1692 | */ | 1698 | */ |
1693 | 1699 | ||
1694 | #ifdef DBG | 1700 | #ifdef DBG |
1695 | #define FIB_COUNTER_INCREMENT(counter) (counter)++ | 1701 | #define FIB_COUNTER_INCREMENT(counter) (counter)++ |
1696 | #else | 1702 | #else |
1697 | #define FIB_COUNTER_INCREMENT(counter) | 1703 | #define FIB_COUNTER_INCREMENT(counter) |
1698 | #endif | 1704 | #endif |
1699 | 1705 | ||
1700 | /* | 1706 | /* |
@@ -1726,17 +1732,17 @@ extern struct aac_common aac_config; | |||
1726 | * | 1732 | * |
1727 | * The adapter reports is present state through the phase. Only | 1733 | * The adapter reports is present state through the phase. Only |
1728 | * a single phase should be ever be set. Each phase can have multiple | 1734 | * a single phase should be ever be set. Each phase can have multiple |
1729 | * phase status bits to provide more detailed information about the | 1735 | * phase status bits to provide more detailed information about the |
1730 | * state of the board. Care should be taken to ensure that any phase | 1736 | * state of the board. Care should be taken to ensure that any phase |
1731 | * status bits that are set when changing the phase are also valid | 1737 | * status bits that are set when changing the phase are also valid |
1732 | * for the new phase or be cleared out. Adapter software (monitor, | 1738 | * for the new phase or be cleared out. Adapter software (monitor, |
1733 | * iflash, kernel) is responsible for properly maintining the phase | 1739 | * iflash, kernel) is responsible for properly maintining the phase |
1734 | * status mailbox when it is running. | 1740 | * status mailbox when it is running. |
1735 | * | ||
1736 | * MONKER_API Phases | ||
1737 | * | 1741 | * |
1738 | * Phases are bit oriented. It is NOT valid to have multiple bits set | 1742 | * MONKER_API Phases |
1739 | */ | 1743 | * |
1744 | * Phases are bit oriented. It is NOT valid to have multiple bits set | ||
1745 | */ | ||
1740 | 1746 | ||
1741 | #define SELF_TEST_FAILED 0x00000004 | 1747 | #define SELF_TEST_FAILED 0x00000004 |
1742 | #define MONITOR_PANIC 0x00000020 | 1748 | #define MONITOR_PANIC 0x00000020 |
@@ -1759,16 +1765,22 @@ extern struct aac_common aac_config; | |||
1759 | * For FIB communication, we need all of the following things | 1765 | * For FIB communication, we need all of the following things |
1760 | * to send back to the user. | 1766 | * to send back to the user. |
1761 | */ | 1767 | */ |
1762 | 1768 | ||
1763 | #define AifCmdEventNotify 1 /* Notify of event */ | 1769 | #define AifCmdEventNotify 1 /* Notify of event */ |
1764 | #define AifEnConfigChange 3 /* Adapter configuration change */ | 1770 | #define AifEnConfigChange 3 /* Adapter configuration change */ |
1765 | #define AifEnContainerChange 4 /* Container configuration change */ | 1771 | #define AifEnContainerChange 4 /* Container configuration change */ |
1766 | #define AifEnDeviceFailure 5 /* SCSI device failed */ | 1772 | #define AifEnDeviceFailure 5 /* SCSI device failed */ |
1773 | #define AifEnEnclosureManagement 13 /* EM_DRIVE_* */ | ||
1774 | #define EM_DRIVE_INSERTION 31 | ||
1775 | #define EM_DRIVE_REMOVAL 32 | ||
1776 | #define AifEnBatteryEvent 14 /* Change in Battery State */ | ||
1767 | #define AifEnAddContainer 15 /* A new array was created */ | 1777 | #define AifEnAddContainer 15 /* A new array was created */ |
1768 | #define AifEnDeleteContainer 16 /* A container was deleted */ | 1778 | #define AifEnDeleteContainer 16 /* A container was deleted */ |
1769 | #define AifEnExpEvent 23 /* Firmware Event Log */ | 1779 | #define AifEnExpEvent 23 /* Firmware Event Log */ |
1770 | #define AifExeFirmwarePanic 3 /* Firmware Event Panic */ | 1780 | #define AifExeFirmwarePanic 3 /* Firmware Event Panic */ |
1771 | #define AifHighPriority 3 /* Highest Priority Event */ | 1781 | #define AifHighPriority 3 /* Highest Priority Event */ |
1782 | #define AifEnAddJBOD 30 /* JBOD created */ | ||
1783 | #define AifEnDeleteJBOD 31 /* JBOD deleted */ | ||
1772 | 1784 | ||
1773 | #define AifCmdJobProgress 2 /* Progress report */ | 1785 | #define AifCmdJobProgress 2 /* Progress report */ |
1774 | #define AifJobCtrZero 101 /* Array Zero progress */ | 1786 | #define AifJobCtrZero 101 /* Array Zero progress */ |
@@ -1780,11 +1792,11 @@ extern struct aac_common aac_config; | |||
1780 | #define AifDenVolumeExtendComplete 201 /* A volume extend completed */ | 1792 | #define AifDenVolumeExtendComplete 201 /* A volume extend completed */ |
1781 | #define AifReqJobList 100 /* Gets back complete job list */ | 1793 | #define AifReqJobList 100 /* Gets back complete job list */ |
1782 | #define AifReqJobsForCtr 101 /* Gets back jobs for specific container */ | 1794 | #define AifReqJobsForCtr 101 /* Gets back jobs for specific container */ |
1783 | #define AifReqJobsForScsi 102 /* Gets back jobs for specific SCSI device */ | 1795 | #define AifReqJobsForScsi 102 /* Gets back jobs for specific SCSI device */ |
1784 | #define AifReqJobReport 103 /* Gets back a specific job report or list of them */ | 1796 | #define AifReqJobReport 103 /* Gets back a specific job report or list of them */ |
1785 | #define AifReqTerminateJob 104 /* Terminates job */ | 1797 | #define AifReqTerminateJob 104 /* Terminates job */ |
1786 | #define AifReqSuspendJob 105 /* Suspends a job */ | 1798 | #define AifReqSuspendJob 105 /* Suspends a job */ |
1787 | #define AifReqResumeJob 106 /* Resumes a job */ | 1799 | #define AifReqResumeJob 106 /* Resumes a job */ |
1788 | #define AifReqSendAPIReport 107 /* API generic report requests */ | 1800 | #define AifReqSendAPIReport 107 /* API generic report requests */ |
1789 | #define AifReqAPIJobStart 108 /* Start a job from the API */ | 1801 | #define AifReqAPIJobStart 108 /* Start a job from the API */ |
1790 | #define AifReqAPIJobUpdate 109 /* Update a job report from the API */ | 1802 | #define AifReqAPIJobUpdate 109 /* Update a job report from the API */ |
@@ -1803,8 +1815,8 @@ struct aac_aifcmd { | |||
1803 | }; | 1815 | }; |
1804 | 1816 | ||
1805 | /** | 1817 | /** |
1806 | * Convert capacity to cylinders | 1818 | * Convert capacity to cylinders |
1807 | * accounting for the fact capacity could be a 64 bit value | 1819 | * accounting for the fact capacity could be a 64 bit value |
1808 | * | 1820 | * |
1809 | */ | 1821 | */ |
1810 | static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor) | 1822 | static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor) |
@@ -1861,6 +1873,7 @@ int aac_probe_container(struct aac_dev *dev, int cid); | |||
1861 | int _aac_rx_init(struct aac_dev *dev); | 1873 | int _aac_rx_init(struct aac_dev *dev); |
1862 | int aac_rx_select_comm(struct aac_dev *dev, int comm); | 1874 | int aac_rx_select_comm(struct aac_dev *dev, int comm); |
1863 | int aac_rx_deliver_producer(struct fib * fib); | 1875 | int aac_rx_deliver_producer(struct fib * fib); |
1876 | char * get_container_type(unsigned type); | ||
1864 | extern int numacb; | 1877 | extern int numacb; |
1865 | extern int acbsize; | 1878 | extern int acbsize; |
1866 | extern char aac_driver_version[]; | 1879 | extern char aac_driver_version[]; |