diff options
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r-- | drivers/message/fusion/mptbase.h | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index f4827d92373..75105277e22 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -65,6 +65,7 @@ | |||
65 | #include "lsi/mpi_fc.h" /* Fibre Channel (lowlevel) support */ | 65 | #include "lsi/mpi_fc.h" /* Fibre Channel (lowlevel) support */ |
66 | #include "lsi/mpi_targ.h" /* SCSI/FCP Target protcol support */ | 66 | #include "lsi/mpi_targ.h" /* SCSI/FCP Target protcol support */ |
67 | #include "lsi/mpi_tool.h" /* Tools support */ | 67 | #include "lsi/mpi_tool.h" /* Tools support */ |
68 | #include "lsi/mpi_sas.h" /* SAS support */ | ||
68 | 69 | ||
69 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 70 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
70 | 71 | ||
@@ -76,8 +77,8 @@ | |||
76 | #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR | 77 | #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR |
77 | #endif | 78 | #endif |
78 | 79 | ||
79 | #define MPT_LINUX_VERSION_COMMON "3.03.02" | 80 | #define MPT_LINUX_VERSION_COMMON "3.03.03" |
80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.02" | 81 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.03" |
81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 82 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
82 | 83 | ||
83 | #define show_mptmod_ver(s,ver) \ | 84 | #define show_mptmod_ver(s,ver) \ |
@@ -423,7 +424,7 @@ typedef struct _MPT_IOCTL { | |||
423 | /* | 424 | /* |
424 | * Event Structure and define | 425 | * Event Structure and define |
425 | */ | 426 | */ |
426 | #define MPTCTL_EVENT_LOG_SIZE (0x0000000A) | 427 | #define MPTCTL_EVENT_LOG_SIZE (0x000000032) |
427 | typedef struct _mpt_ioctl_events { | 428 | typedef struct _mpt_ioctl_events { |
428 | u32 event; /* Specified by define above */ | 429 | u32 event; /* Specified by define above */ |
429 | u32 eventContext; /* Index or counter */ | 430 | u32 eventContext; /* Index or counter */ |
@@ -451,16 +452,13 @@ typedef struct _mpt_ioctl_events { | |||
451 | #define MPT_SCSICFG_ALL_IDS 0x02 /* WriteSDP1 to all IDS */ | 452 | #define MPT_SCSICFG_ALL_IDS 0x02 /* WriteSDP1 to all IDS */ |
452 | /* #define MPT_SCSICFG_BLK_NEGO 0x10 WriteSDP1 with WDTR and SDTR disabled */ | 453 | /* #define MPT_SCSICFG_BLK_NEGO 0x10 WriteSDP1 with WDTR and SDTR disabled */ |
453 | 454 | ||
454 | typedef struct _ScsiCfgData { | 455 | typedef struct _SpiCfgData { |
455 | u32 PortFlags; | 456 | u32 PortFlags; |
456 | int *nvram; /* table of device NVRAM values */ | 457 | int *nvram; /* table of device NVRAM values */ |
457 | IOCPage2_t *pIocPg2; /* table of Raid Volumes */ | ||
458 | IOCPage3_t *pIocPg3; /* table of physical disks */ | ||
459 | IOCPage4_t *pIocPg4; /* SEP devices addressing */ | 458 | IOCPage4_t *pIocPg4; /* SEP devices addressing */ |
460 | dma_addr_t IocPg4_dma; /* Phys Addr of IOCPage4 data */ | 459 | dma_addr_t IocPg4_dma; /* Phys Addr of IOCPage4 data */ |
461 | int IocPg4Sz; /* IOCPage4 size */ | 460 | int IocPg4Sz; /* IOCPage4 size */ |
462 | u8 dvStatus[MPT_MAX_SCSI_DEVICES]; | 461 | u8 dvStatus[MPT_MAX_SCSI_DEVICES]; |
463 | int isRaid; /* bit field, 1 if RAID */ | ||
464 | u8 minSyncFactor; /* 0xFF if async */ | 462 | u8 minSyncFactor; /* 0xFF if async */ |
465 | u8 maxSyncOffset; /* 0 if async */ | 463 | u8 maxSyncOffset; /* 0 if async */ |
466 | u8 maxBusWidth; /* 0 if narrow, 1 if wide */ | 464 | u8 maxBusWidth; /* 0 if narrow, 1 if wide */ |
@@ -472,10 +470,28 @@ typedef struct _ScsiCfgData { | |||
472 | u8 dvScheduled; /* 1 if scheduled */ | 470 | u8 dvScheduled; /* 1 if scheduled */ |
473 | u8 forceDv; /* 1 to force DV scheduling */ | 471 | u8 forceDv; /* 1 to force DV scheduling */ |
474 | u8 noQas; /* Disable QAS for this adapter */ | 472 | u8 noQas; /* Disable QAS for this adapter */ |
475 | u8 Saf_Te; /* 1 to force all Processors as SAF-TE if Inquiry data length is too short to check for SAF-TE */ | 473 | u8 Saf_Te; /* 1 to force all Processors as |
474 | * SAF-TE if Inquiry data length | ||
475 | * is too short to check for SAF-TE | ||
476 | */ | ||
476 | u8 mpt_dv; /* command line option: enhanced=1, basic=0 */ | 477 | u8 mpt_dv; /* command line option: enhanced=1, basic=0 */ |
478 | u8 bus_reset; /* 1 to allow bus reset */ | ||
477 | u8 rsvd[1]; | 479 | u8 rsvd[1]; |
478 | } ScsiCfgData; | 480 | }SpiCfgData; |
481 | |||
482 | typedef struct _SasCfgData { | ||
483 | u8 ptClear; /* 1 to automatically clear the | ||
484 | * persistent table. | ||
485 | * 0 to disable | ||
486 | * automatic clearing. | ||
487 | */ | ||
488 | }SasCfgData; | ||
489 | |||
490 | typedef struct _RaidCfgData { | ||
491 | IOCPage2_t *pIocPg2; /* table of Raid Volumes */ | ||
492 | IOCPage3_t *pIocPg3; /* table of physical disks */ | ||
493 | int isRaid; /* bit field, 1 if RAID */ | ||
494 | }RaidCfgData; | ||
479 | 495 | ||
480 | /* | 496 | /* |
481 | * Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS | 497 | * Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS |
@@ -530,11 +546,16 @@ typedef struct _MPT_ADAPTER | |||
530 | u8 *sense_buf_pool; | 546 | u8 *sense_buf_pool; |
531 | dma_addr_t sense_buf_pool_dma; | 547 | dma_addr_t sense_buf_pool_dma; |
532 | u32 sense_buf_low_dma; | 548 | u32 sense_buf_low_dma; |
549 | u8 *HostPageBuffer; /* SAS - host page buffer support */ | ||
550 | u32 HostPageBuffer_sz; | ||
551 | dma_addr_t HostPageBuffer_dma; | ||
533 | int mtrr_reg; | 552 | int mtrr_reg; |
534 | struct pci_dev *pcidev; /* struct pci_dev pointer */ | 553 | struct pci_dev *pcidev; /* struct pci_dev pointer */ |
535 | u8 __iomem *memmap; /* mmap address */ | 554 | u8 __iomem *memmap; /* mmap address */ |
536 | struct Scsi_Host *sh; /* Scsi Host pointer */ | 555 | struct Scsi_Host *sh; /* Scsi Host pointer */ |
537 | ScsiCfgData spi_data; /* Scsi config. data */ | 556 | SpiCfgData spi_data; /* Scsi config. data */ |
557 | RaidCfgData raid_data; /* Raid config. data */ | ||
558 | SasCfgData sas_data; /* Sas config. data */ | ||
538 | MPT_IOCTL *ioctl; /* ioctl data pointer */ | 559 | MPT_IOCTL *ioctl; /* ioctl data pointer */ |
539 | struct proc_dir_entry *ioc_dentry; | 560 | struct proc_dir_entry *ioc_dentry; |
540 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ | 561 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ |
@@ -554,31 +575,35 @@ typedef struct _MPT_ADAPTER | |||
554 | #else | 575 | #else |
555 | u32 mfcnt; | 576 | u32 mfcnt; |
556 | #endif | 577 | #endif |
557 | u32 NB_for_64_byte_frame; | 578 | u32 NB_for_64_byte_frame; |
558 | u32 hs_req[MPT_MAX_FRAME_SIZE/sizeof(u32)]; | 579 | u32 hs_req[MPT_MAX_FRAME_SIZE/sizeof(u32)]; |
559 | u16 hs_reply[MPT_MAX_FRAME_SIZE/sizeof(u16)]; | 580 | u16 hs_reply[MPT_MAX_FRAME_SIZE/sizeof(u16)]; |
560 | IOCFactsReply_t facts; | 581 | IOCFactsReply_t facts; |
561 | PortFactsReply_t pfacts[2]; | 582 | PortFactsReply_t pfacts[2]; |
562 | FCPortPage0_t fc_port_page0[2]; | 583 | FCPortPage0_t fc_port_page0[2]; |
584 | struct timer_list persist_timer; /* persist table timer */ | ||
585 | int persist_wait_done; /* persist completion flag */ | ||
586 | u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */ | ||
563 | LANPage0_t lan_cnfg_page0; | 587 | LANPage0_t lan_cnfg_page0; |
564 | LANPage1_t lan_cnfg_page1; | 588 | LANPage1_t lan_cnfg_page1; |
565 | /* | 589 | /* |
566 | * Description: errata_flag_1064 | 590 | * Description: errata_flag_1064 |
567 | * If a PCIX read occurs within 1 or 2 cycles after the chip receives | 591 | * If a PCIX read occurs within 1 or 2 cycles after the chip receives |
568 | * a split completion for a read data, an internal address pointer incorrectly | 592 | * a split completion for a read data, an internal address pointer incorrectly |
569 | * increments by 32 bytes | 593 | * increments by 32 bytes |
570 | */ | 594 | */ |
571 | int errata_flag_1064; | 595 | int errata_flag_1064; |
572 | u8 FirstWhoInit; | 596 | u8 FirstWhoInit; |
573 | u8 upload_fw; /* If set, do a fw upload */ | 597 | u8 upload_fw; /* If set, do a fw upload */ |
574 | u8 reload_fw; /* Force a FW Reload on next reset */ | 598 | u8 reload_fw; /* Force a FW Reload on next reset */ |
575 | u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ | 599 | u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ |
576 | u8 pad1[4]; | 600 | u8 pad1[4]; |
577 | int DoneCtx; | 601 | int DoneCtx; |
578 | int TaskCtx; | 602 | int TaskCtx; |
579 | int InternalCtx; | 603 | int InternalCtx; |
580 | struct list_head list; | 604 | struct list_head list; |
581 | struct net_device *netdev; | 605 | struct net_device *netdev; |
606 | struct list_head sas_topology; | ||
582 | } MPT_ADAPTER; | 607 | } MPT_ADAPTER; |
583 | 608 | ||
584 | /* | 609 | /* |
@@ -964,6 +989,7 @@ extern void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size); | |||
964 | extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); | 989 | extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); |
965 | extern int mpt_findImVolumes(MPT_ADAPTER *ioc); | 990 | extern int mpt_findImVolumes(MPT_ADAPTER *ioc); |
966 | extern int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); | 991 | extern int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); |
992 | extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); | ||
967 | 993 | ||
968 | /* | 994 | /* |
969 | * Public data decl's... | 995 | * Public data decl's... |