Lines Matching +full:int +full:- +full:clock +full:- +full:stable +full:- +full:broken

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
9 * Copyright (c) 2000-2010 Adaptec, Inc.
10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
11 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com)
34 /*------------------------------------------------------------------------------
36 *----------------------------------------------------------------------------*/
61 /* Bit definitions in IOA->Host Interrupt Register */
90 # define AAC_DRIVER_BRANCH "-custom"
95 #define AAC_NUM_IO_FIB (1024 - AAC_NUM_MGT_FIB)
106 /* Thor: 5 phys. buses: #0: empty, 1-4: 256 targets each */
133 u32 addr_lo; /* Lower 32-bits of SGL element address */
134 u32 addr_hi; /* Upper 32-bits of SGL element address */
191 * [1:0] DIR - 0=No data, 0x1 = IN, 0x2 = OUT
192 * [2] TYPE - 0=PCI, 1=DDR
193 * [3] CRYPTO_ENABLE - 0=Crypto disabled, 1=Crypto enabled
200 /* Lower 32-bits of tweak value for crypto enabled IOs */
216 /* Lower 32-bits of reserved error data target location on the host */
219 /* Upper 32-bits of reserved error data target location on the host */
225 /* Upper 32-bits of tweak value for crypto enabled IOs */
232 * AAC_MAX_NATIVE_SIZE-FW_ERROR_BUFFER_SIZE
258 /* Lower 32-bits of reserved error data target location on the host */
260 /* Upper 32-bits of reserved error data target location on the host */
268 /* 0 - reset specified device, 1 - reset all devices */
275 /* Lower 32-bits of reserved error data target location on the host */
277 /* Upper 32-bits of reserved error data target location on the host */
290 u8 datapres; /* [1:0] - data present, [7:2] - reserved */
301 u8 cmd_bytes[AAC_MAX_NATIVE_SIZE-FW_ERROR_BUFFER_SIZE];
316 u8 list_length[4]; /* LUN list length (N-7, big endian) */
424 #define aac_logical_to_phys(x) ((x)?(x)-1:0)
430 #define AAC_CHARDEV_UNREGISTERED (-1)
431 #define AAC_CHARDEV_NEEDS_REINIT (-2)
437 int heads;
438 int sectors;
439 int cylinders;
450 #define FT_DRIVE 9 /* physical disk - addressable in scsi by bus/id/lun */
459 __le32 addr; /* 32-bit address. */
464 u32 addr; /* 32-bit address. */
469 __le32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */
474 u32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */
505 * 32-bit addressing.
542 * unsigned Month :4; // 1 - 12
543 * unsigned Day :6; // 1 - 32
544 * unsigned Hour :6; // 0 - 23
545 * unsigned Minute :6; // 0 - 60
546 * unsigned Second :6; // 0 - 60
712 u8 data[512-sizeof(struct aac_fibhdr)]; // Command specific data
901int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5,…
902 int (*adapter_check_health)(struct aac_dev *dev);
903 int (*adapter_restart)(struct aac_dev *dev, int bled, u8 reset_type);
906 int (*adapter_ioremap)(struct aac_dev * dev, u32 size);
909 int (*adapter_deliver)(struct fib * fib);
910 int (*adapter_bounds)(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba);
911 int (*adapter_read)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count);
912 int (*adapter_write)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua);
913 int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd);
915 int (*adapter_comm)(struct aac_dev * dev, int comm);
924 int (*init)(struct aac_dev *dev);
929 int quirks;
1017 __le32 reserved[10]; /* 00h-27h | Reserved */
1019 u8 reserved1[3]; /* 29h-2bh | Reserved */
1021 __le32 reserved2[26]; /* 30h-97h | Reserved */
1040 __le32 reserved3[12]; /* d0h-ffh | reserved */
1041 __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */
1071 struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */
1078 #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
1079 #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
1080 #define sa_writew(AEP, CSR, value) writew(value, &((AEP)->regs.sa->CSR))
1081 #define sa_writel(AEP, CSR, value) writel(value, &((AEP)->regs.sa->CSR))
1135 struct rx_mu_registers MUnit; /* 1300h - 1347h */
1136 __le32 reserved1[2]; /* 1348h - 134ch */
1140 #define rx_readb(AEP, CSR) readb(&((AEP)->regs.rx->CSR))
1141 #define rx_readl(AEP, CSR) readl(&((AEP)->regs.rx->CSR))
1142 #define rx_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rx->CSR))
1143 #define rx_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rx->CSR))
1153 struct rkt_mu_registers MUnit; /* 1300h - 1347h */
1154 __le32 reserved1[1006]; /* 1348h - 22fch */
1155 struct rkt_inbound IndexRegs; /* 2300h - */
1158 #define rkt_readb(AEP, CSR) readb(&((AEP)->regs.rkt->CSR))
1159 #define rkt_readl(AEP, CSR) readl(&((AEP)->regs.rkt->CSR))
1160 #define rkt_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rkt->CSR))
1161 #define rkt_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rkt->CSR))
1172 __le32 IOAR[2]; /* 18h | IOA->host interrupt register */
1174 __le32 IISR; /* 24h | Inbound Int. Status Register */
1176 __le32 OIMR; /* 34h | Outbound Int. Mask Register */
1193 struct src_mu_registers MUnit; /* 00h - cbh */
1196 __le32 reserved1[130786]; /* d8h - 7fc5fh */
1200 __le32 reserved1[970]; /* d8h - fffh */
1206 #define src_readb(AEP, CSR) readb(&((AEP)->regs.src.bar0->CSR))
1207 #define src_readl(AEP, CSR) readl(&((AEP)->regs.src.bar0->CSR))
1209 &((AEP)->regs.src.bar0->CSR))
1211 &((AEP)->regs.src.bar0->CSR))
1214 &((AEP)->regs.src.bar0->CSR))
1227 ulong jiffies; // used for cleanup - dmb changed to ulong
1230 int wait; // Set to true when thread is in WaitForSingleObject
1239 * SCSI-2 Standard.
1245 u8 EOM:1; /* End Of Medium - reserved for random access devices */
1246 u8 filemark:1; /* Filemark - reserved for random access devices */
1248 u8 information[4]; /* for direct-access devices, contains the unsigned
1256 u8 FRUC; /* Field Replaceable Unit Code - not used */
1260 u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that
1264 u8 CD:1; /* command data bit: 1- illegal parameter in CDB.
1265 * 0- illegal parameter in data.
1334 s8 reset_state; /* 0 - no reset, 1..x - */
1352 __le32 clock; member
1407 u8 max_rrc_drives; /* max. number of ITP-RRC drives/pool */
1521 int vector_no;
1529 int id;
1534 unsigned int max_fib_size;
1535 unsigned int sg_tablesize;
1536 unsigned int max_num_aif;
1538 unsigned int max_cmd_size; /* max_fib_size or MAX_NATIVE */
1596 int maximum_num_containers;
1597 int maximum_num_physicals;
1598 int maximum_num_channels;
1603 int cardtype;
1605 *This lock will protect the two 32-bit
1656 int management_fib_count;
1659 int sync_mode;
1663 u32 max_msix; /* max. MSI-X vectors */
1664 u32 vector_cap; /* MSI-X vector capab.*/
1665 int msi_enabled; /* MSI/MSI-X enabled */
1679 (dev)->a_ops.adapter_interrupt(dev)
1682 (dev)->a_ops.adapter_notify(dev, event)
1685 (dev)->a_ops.adapter_disable_int(dev)
1688 (dev)->a_ops.adapter_enable_int(dev)
1691 (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)
1694 ((dev)->a_ops.adapter_restart(dev, bled, reset_type))
1697 ((dev)->a_ops.adapter_start(dev))
1700 (dev)->a_ops.adapter_ioremap(dev, size)
1703 ((fib)->dev)->a_ops.adapter_deliver(fib)
1706 dev->a_ops.adapter_bounds(dev,cmd,lba)
1709 ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count)
1712 ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count,fua)
1715 ((fib)->dev)->a_ops.adapter_scsi(fib,cmd)
1718 (dev)->a_ops.adapter_comm(dev, comm)
1883 __le32 stable; // Not used member
1940 __le32 count; /* sizeof(((struct aac_synchronize_reply *)NULL)->data) */
1977 __le32 count; /* sizeof(((struct aac_pause_reply *)NULL)->data) */
2043 * SRB Functions - set in aac_srb->function
2064 * SRB SCSI Status - set in aac_srb->scsi_status
2099 * Object-Server / Volume-Manager Dispatch Classes
2127 #define MAX_VMCOMMAND_NUM 23 /* used for sizing stats array - leave last */
2172 __le32 count; /* sizeof(((struct aac_get_config_status_resp *)NULL)->data) */
2195 * Accept the configuration as-is
2242 broken mirror exists */
2247 #define FSCS_READONLY 0x0002 /* possible result of broken mirror */
2248 #define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */
2273 __le32 count; /* sizeof(((struct aac_get_name_resp *)NULL)->data) */
2346 * Ugly - non Linux like ioctl coding for back compat.
2540 #define DoorBellSyncCmdAvailable (1<<0) /* Host -> Adapter */
2541 #define DoorBellPrintfDone (1<<5) /* Host -> Adapter */
2542 #define DoorBellAdapterNormCmdReady (1<<1) /* Adapter -> Host */
2543 #define DoorBellAdapterNormRespReady (1<<2) /* Adapter -> Host */
2544 #define DoorBellAdapterNormCmdNotFull (1<<3) /* Adapter -> Host */
2545 #define DoorBellAdapterNormRespNotFull (1<<4) /* Adapter -> Host */
2546 #define DoorBellPrintfReady (1<<5) /* Adapter -> Host */
2547 #define DoorBellAifPending (1<<6) /* Adapter -> Host */
2550 #define PmDoorBellResponseSent (1<<1) /* Adapter -> Host */
2623 static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor) in cap_to_cyls()
2629 static inline int aac_pci_offline(struct aac_dev *dev) in aac_pci_offline()
2631 return pci_channel_offline(dev->pdev) || dev->handle_pci_error; in aac_pci_offline()
2634 static inline int aac_adapter_check_health(struct aac_dev *dev) in aac_adapter_check_health()
2637 return -1; in aac_adapter_check_health()
2639 return (dev)->a_ops.adapter_check_health(dev); in aac_adapter_check_health()
2643 int aac_scan_host(struct aac_dev *dev);
2647 schedule_delayed_work(&dev->safw_rescan_work, AAC_RESCAN_DELAY); in aac_schedule_safw_scan_worker()
2652 schedule_delayed_work(&dev->src_reinit_aif_worker, AAC_RESCAN_DELAY); in aac_schedule_src_reinit_aif_worker()
2660 wait_event(dev->scsi_host_ptr->host_wait, in aac_safw_rescan_worker()
2661 !scsi_host_in_recovery(dev->scsi_host_ptr)); in aac_safw_rescan_worker()
2668 cancel_delayed_work_sync(&dev->safw_rescan_work); in aac_cancel_rescan_worker()
2669 cancel_delayed_work_sync(&dev->src_reinit_aif_worker); in aac_cancel_rescan_worker()
2680 int (*callback)(struct scsi_cmnd *);
2681 int status;
2693 int aac_acquire_irq(struct aac_dev *dev);
2695 int aac_setup_safw_adapter(struct aac_dev *dev);
2700 int aac_fib_setup(struct aac_dev *dev);
2705 int aac_fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int
2706 int aac_hba_send(u8 command, struct fib *context,
2708 int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);
2710 int aac_fib_complete(struct fib * context);
2712 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib_va->data)
2714 void aac_src_access_devreg(struct aac_dev *dev, int mode);
2716 int aac_get_config_status(struct aac_dev *dev, int commit_flag);
2717 int aac_get_containers(struct aac_dev *dev);
2718 int aac_scsi_cmd(struct scsi_cmnd *cmd);
2719 int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
2721 #define shost_to_class(shost) &shost->shost_dev
2724 int aac_do_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
2725 int aac_rx_init(struct aac_dev *dev);
2726 int aac_rkt_init(struct aac_dev *dev);
2727 int aac_nark_init(struct aac_dev *dev);
2728 int aac_sa_init(struct aac_dev *dev);
2729 int aac_src_init(struct aac_dev *dev);
2730 int aac_srcv_init(struct aac_dev *dev);
2731 int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, str…
2733 unsigned int aac_response_normal(struct aac_queue * q);
2734 unsigned int aac_command_normal(struct aac_queue * q);
2735 unsigned int aac_intr_normal(struct aac_dev *dev, u32 Index,
2736 int isAif, int isFastResponse,
2738 int aac_reset_adapter(struct aac_dev *dev, int forced, u8 reset_type);
2739 int aac_check_health(struct aac_dev * dev);
2740 int aac_command_thread(void *data);
2741 int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);
2742 int aac_fib_adapter_complete(struct fib * fibptr, unsigned short size);
2743 struct aac_driver_ident* aac_get_driver_ident(int devtype);
2744 int aac_get_adapter_info(struct aac_dev* dev);
2745 int aac_send_shutdown(struct aac_dev *dev);
2746 int aac_probe_container(struct aac_dev *dev, int cid);
2747 int _aac_rx_init(struct aac_dev *dev);
2748 int aac_rx_select_comm(struct aac_dev *dev, int comm);
2749 int aac_rx_deliver_producer(struct fib * fib);
2750 void aac_reinit_aif(struct aac_dev *aac, unsigned int index);
2752 static inline int aac_is_src(struct aac_dev *dev) in aac_is_src()
2754 u16 device = dev->pdev->device; in aac_is_src()
2763 static inline int aac_supports_2T(struct aac_dev *dev) in aac_supports_2T()
2765 return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); in aac_supports_2T()
2769 extern int numacb;
2771 extern int startup_timeout;
2772 extern int aif_timeout;
2773 extern int expose_physicals;
2774 extern int aac_reset_devices;
2775 extern int aac_msi;
2776 extern int aac_commit;
2777 extern int update_interval;
2778 extern int check_interval;
2779 extern int aac_check_reset;
2780 extern int aac_fib_dump;