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.
547 * unsigned Month :4; // 1 - 12
548 * unsigned Day :6; // 1 - 32
549 * unsigned Hour :6; // 0 - 23
550 * unsigned Minute :6; // 0 - 60
551 * unsigned Second :6; // 0 - 60
717 u8 data[512-sizeof(struct aac_fibhdr)]; // Command specific data
849 __le32 max_io_commands; /* max outstanding commands */
853 __le32 max_num_aif; /* max number of aif */
866 __le32 max_num_aif; /* max number of aif */
986 * commuication. These regions are accessed by both the host and adapter.
1022 __le32 reserved[10]; /* 00h-27h | Reserved */
1024 u8 reserved1[3]; /* 29h-2bh | Reserved */
1026 __le32 reserved2[26]; /* 30h-97h | Reserved */
1045 __le32 reserved3[12]; /* d0h-ffh | reserved */
1046 __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */
1076 struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */
1083 #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
1084 #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
1085 #define sa_writew(AEP, CSR, value) writew(value, &((AEP)->regs.sa->CSR))
1086 #define sa_writel(AEP, CSR, value) writel(value, &((AEP)->regs.sa->CSR))
1099 __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */
1105 __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */
1106 __le32 OISR; /* 1330h | 30h | Outbound Interrupt
1108 __le32 OIMR; /* 1334h | 34h | Outbound Interrupt
1113 __le32 OutboundQueue;/*1344h | 44h | Outbound Queue Port relative to firmware */
1140 struct rx_mu_registers MUnit; /* 1300h - 1347h */
1141 __le32 reserved1[2]; /* 1348h - 134ch */
1145 #define rx_readb(AEP, CSR) readb(&((AEP)->regs.rx->CSR))
1146 #define rx_readl(AEP, CSR) readl(&((AEP)->regs.rx->CSR))
1147 #define rx_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rx->CSR))
1148 #define rx_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rx->CSR))
1158 struct rkt_mu_registers MUnit; /* 1300h - 1347h */
1159 __le32 reserved1[1006]; /* 1348h - 22fch */
1160 struct rkt_inbound IndexRegs; /* 2300h - */
1163 #define rkt_readb(AEP, CSR) readb(&((AEP)->regs.rkt->CSR))
1164 #define rkt_readl(AEP, CSR) readl(&((AEP)->regs.rkt->CSR))
1165 #define rkt_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rkt->CSR))
1166 #define rkt_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rkt->CSR))
1177 __le32 IOAR[2]; /* 18h | IOA->host interrupt register */
1181 __le32 OIMR; /* 34h | Outbound Int. Mask Register */
1183 __le32 ODR_R; /* 9ch | Outbound Doorbell Read */
1184 __le32 ODR_C; /* a0h | Outbound Doorbell Clear */
1188 __le32 OMR; /* bch | Outbound Message Register */
1198 struct src_mu_registers MUnit; /* 00h - cbh */
1201 __le32 reserved1[130786]; /* d8h - 7fc5fh */
1205 __le32 reserved1[970]; /* d8h - fffh */
1211 #define src_readb(AEP, CSR) readb(&((AEP)->regs.src.bar0->CSR))
1212 #define src_readl(AEP, CSR) readl(&((AEP)->regs.src.bar0->CSR))
1214 &((AEP)->regs.src.bar0->CSR))
1216 &((AEP)->regs.src.bar0->CSR))
1219 &((AEP)->regs.src.bar0->CSR))
1232 ulong jiffies; // used for cleanup - dmb changed to ulong
1244 * SCSI-2 Standard.
1250 u8 EOM:1; /* End Of Medium - reserved for random access devices */
1251 u8 filemark:1; /* Filemark - reserved for random access devices */
1253 u8 information[4]; /* for direct-access devices, contains the unsigned
1261 u8 FRUC; /* Field Replaceable Unit Code - not used */
1265 u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that
1269 u8 CD:1; /* command data bit: 1- illegal parameter in CDB.
1270 * 0- illegal parameter in data.
1339 s8 reset_state; /* 0 - no reset, 1..x - */
1412 u8 max_rrc_drives; /* max. number of ITP-RRC drives/pool */
1413 u8 max_disk_xtasks; /* max. possible num of DiskX Tasks */
1610 *This lock will protect the two 32-bit
1668 u32 max_msix; /* max. MSI-X vectors */
1669 u32 vector_cap; /* MSI-X vector capab.*/
1670 int msi_enabled; /* MSI/MSI-X enabled */
1685 (dev)->a_ops.adapter_interrupt(dev)
1688 (dev)->a_ops.adapter_notify(dev, event)
1691 (dev)->a_ops.adapter_disable_int(dev)
1694 (dev)->a_ops.adapter_enable_int(dev)
1697 (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)
1700 ((dev)->a_ops.adapter_restart(dev, bled, reset_type))
1703 ((dev)->a_ops.adapter_start(dev))
1706 (dev)->a_ops.adapter_ioremap(dev, size)
1709 ((fib)->dev)->a_ops.adapter_deliver(fib)
1712 dev->a_ops.adapter_bounds(dev,cmd,lba)
1715 ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count)
1718 ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count,fua)
1721 ((fib)->dev)->a_ops.adapter_scsi(fib,cmd)
1724 (dev)->a_ops.adapter_comm(dev, comm)
1946 __le32 count; /* sizeof(((struct aac_synchronize_reply *)NULL)->data) */
1983 __le32 count; /* sizeof(((struct aac_pause_reply *)NULL)->data) */
2049 * SRB Functions - set in aac_srb->function
2070 * SRB SCSI Status - set in aac_srb->scsi_status
2105 * Object-Server / Volume-Manager Dispatch Classes
2133 #define MAX_VMCOMMAND_NUM 23 /* used for sizing stats array - leave last */
2178 __le32 count; /* sizeof(((struct aac_get_config_status_resp *)NULL)->data) */
2201 * Accept the configuration as-is
2254 #define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */
2279 __le32 count; /* sizeof(((struct aac_get_name_resp *)NULL)->data) */
2352 * Ugly - non Linux like ioctl coding for back compat.
2546 #define DoorBellSyncCmdAvailable (1<<0) /* Host -> Adapter */
2547 #define DoorBellPrintfDone (1<<5) /* Host -> Adapter */
2548 #define DoorBellAdapterNormCmdReady (1<<1) /* Adapter -> Host */
2549 #define DoorBellAdapterNormRespReady (1<<2) /* Adapter -> Host */
2550 #define DoorBellAdapterNormCmdNotFull (1<<3) /* Adapter -> Host */
2551 #define DoorBellAdapterNormRespNotFull (1<<4) /* Adapter -> Host */
2552 #define DoorBellPrintfReady (1<<5) /* Adapter -> Host */
2553 #define DoorBellAifPending (1<<6) /* Adapter -> Host */
2555 /* PMC specific outbound doorbell bits */
2556 #define PmDoorBellResponseSent (1<<1) /* Adapter -> Host */
2637 return pci_channel_offline(dev->pdev) || dev->handle_pci_error; in aac_pci_offline()
2643 return -1; in aac_adapter_check_health()
2645 return (dev)->a_ops.adapter_check_health(dev); in aac_adapter_check_health()
2653 schedule_delayed_work(&dev->safw_rescan_work, AAC_RESCAN_DELAY); in aac_schedule_safw_scan_worker()
2658 schedule_delayed_work(&dev->src_reinit_aif_worker, AAC_RESCAN_DELAY); in aac_schedule_src_reinit_aif_worker()
2666 wait_event(dev->scsi_host_ptr->host_wait, in aac_safw_rescan_worker()
2667 !scsi_host_in_recovery(dev->scsi_host_ptr)); in aac_safw_rescan_worker()
2674 cancel_delayed_work_sync(&dev->safw_rescan_work); in aac_cancel_rescan_worker()
2675 cancel_delayed_work_sync(&dev->src_reinit_aif_worker); in aac_cancel_rescan_worker()
2718 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib_va->data)
2727 #define shost_to_class(shost) &shost->shost_dev
2760 u16 device = dev->pdev->device; in aac_is_src()
2771 return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); in aac_supports_2T()