Lines Matching +full:max +full:- +full:outbound +full:- +full:regions

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)
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
844 __le32 max_io_commands; /* max outstanding commands */
848 __le32 max_num_aif; /* max number of aif */
861 __le32 max_num_aif; /* max number of aif */
981 * commuication. These regions are accessed by both the host and adapter.
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))
1094 __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */
1100 __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */
1101 __le32 OISR; /* 1330h | 30h | Outbound Interrupt
1103 __le32 OIMR; /* 1334h | 34h | Outbound Interrupt
1108 __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */
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 */
1176 __le32 OIMR; /* 34h | Outbound Int. Mask Register */
1178 __le32 ODR_R; /* 9ch | Outbound Doorbell Read */
1179 __le32 ODR_C; /* a0h | Outbound Doorbell Clear */
1183 __le32 OMR; /* bch | Outbound Message 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
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 - */
1407 u8 max_rrc_drives; /* max. number of ITP-RRC drives/pool */
1408 u8 max_disk_xtasks; /* max. possible num of DiskX Tasks */
1605 *This lock will protect the two 32-bit
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)
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
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 */
2549 /* PMC specific outbound doorbell bits */
2550 #define PmDoorBellResponseSent (1<<1) /* Adapter -> Host */
2631 return pci_channel_offline(dev->pdev) || dev->handle_pci_error; in aac_pci_offline()
2637 return -1; in aac_adapter_check_health()
2639 return (dev)->a_ops.adapter_check_health(dev); in aac_adapter_check_health()
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()
2712 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib_va->data)
2721 #define shost_to_class(shost) &shost->shost_dev
2754 u16 device = dev->pdev->device; in aac_is_src()
2765 return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); in aac_supports_2T()