isp_library.c (316154) | isp_library.c (317360) |
---|---|
1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 21 unchanged lines hidden (view full) --- 30 */ 31#ifdef __NetBSD__ 32#include <sys/cdefs.h> 33__KERNEL_RCSID(0, "$NetBSD$"); 34#include <dev/ic/isp_netbsd.h> 35#endif 36#ifdef __FreeBSD__ 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 21 unchanged lines hidden (view full) --- 30 */ 31#ifdef __NetBSD__ 32#include <sys/cdefs.h> 33__KERNEL_RCSID(0, "$NetBSD$"); 34#include <dev/ic/isp_netbsd.h> 35#endif 36#ifdef __FreeBSD__ 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: stable/11/sys/dev/isp/isp_library.c 316154 2017-03-29 15:57:50Z mav $"); | 38__FBSDID("$FreeBSD: stable/11/sys/dev/isp/isp_library.c 317360 2017-04-24 10:21:13Z mav $"); |
39#include <dev/isp/isp_freebsd.h> 40#endif 41#ifdef __OpenBSD__ 42#include <dev/ic/isp_openbsd.h> 43#endif 44#ifdef __linux__ 45#include "isp_linux.h" 46#endif --- 9 unchanged lines hidden (view full) --- 56 * Command shipping- finish off first queue entry and do dma mapping and additional segments as needed. 57 * 58 * Called with the first queue entry at least partially filled out. 59 */ 60int 61isp_send_cmd(ispsoftc_t *isp, void *fqe, void *segp, uint32_t nsegs, uint32_t totalcnt, isp_ddir_t ddir, ispds64_t *ecmd) 62{ 63 uint8_t storage[QENTRY_LEN]; | 39#include <dev/isp/isp_freebsd.h> 40#endif 41#ifdef __OpenBSD__ 42#include <dev/ic/isp_openbsd.h> 43#endif 44#ifdef __linux__ 45#include "isp_linux.h" 46#endif --- 9 unchanged lines hidden (view full) --- 56 * Command shipping- finish off first queue entry and do dma mapping and additional segments as needed. 57 * 58 * Called with the first queue entry at least partially filled out. 59 */ 60int 61isp_send_cmd(ispsoftc_t *isp, void *fqe, void *segp, uint32_t nsegs, uint32_t totalcnt, isp_ddir_t ddir, ispds64_t *ecmd) 62{ 63 uint8_t storage[QENTRY_LEN]; |
64 uint8_t type, nqe; 65 uint32_t seg, curseg, seglim, nxt, nxtnxt, ddf; | 64 uint8_t type, nqe, need64; 65 uint32_t seg, seglim, nxt, nxtnxt, ddf; |
66 ispds_t *dsp = NULL; 67 ispds64_t *dsp64 = NULL; 68 void *qe0, *qe1; 69 70 qe0 = isp_getrqentry(isp); 71 if (qe0 == NULL) { 72 return (CMD_EAGAIN); 73 } --- 9 unchanged lines hidden (view full) --- 83 if (type == RQSTYPE_T2RQS || type == RQSTYPE_T3RQS) { 84 ddf = CT2_NO_DATA; 85 } else { 86 ddf = 0; 87 } 88 goto copy_and_sync; 89 } 90 | 66 ispds_t *dsp = NULL; 67 ispds64_t *dsp64 = NULL; 68 void *qe0, *qe1; 69 70 qe0 = isp_getrqentry(isp); 71 if (qe0 == NULL) { 72 return (CMD_EAGAIN); 73 } --- 9 unchanged lines hidden (view full) --- 83 if (type == RQSTYPE_T2RQS || type == RQSTYPE_T3RQS) { 84 ddf = CT2_NO_DATA; 85 } else { 86 ddf = 0; 87 } 88 goto copy_and_sync; 89 } 90 |
91 need64 = 0; 92 for (seg = 0; seg < nsegs; seg++) 93 need64 |= XS_NEED_DMA64_SEG(segp, seg); 94 if (need64) { 95 if (type == RQSTYPE_T2RQS) 96 ((isphdr_t *)fqe)->rqs_entry_type = type = RQSTYPE_T3RQS; 97 else if (type == RQSTYPE_REQUEST) 98 ((isphdr_t *)fqe)->rqs_entry_type = type = RQSTYPE_A64; 99 else if (type == RQSTYPE_CTIO2) 100 ((isphdr_t *)fqe)->rqs_entry_type = type = RQSTYPE_CTIO3; 101 } 102 |
|
91 /* | 103 /* |
92 * First figure out how many pieces of data to transfer and what kind and how many we can put into the first queue entry. | 104 * First figure out how many pieces of data to transfer, what 105 * kind and how many we can put into the first queue entry. |
93 */ 94 switch (type) { 95 case RQSTYPE_REQUEST: 96 ddf = (ddir == ISP_TO_DEVICE)? REQFLAG_DATA_OUT : REQFLAG_DATA_IN; 97 dsp = ((ispreq_t *)fqe)->req_dataseg; 98 seglim = ISP_RQDSEG; 99 break; 100 case RQSTYPE_CMDONLY: --- 15 unchanged lines hidden (view full) --- 116 dsp64 = ((ispreqt3_t *)fqe)->req_dataseg; 117 seglim = ISP_RQDSEG_T3; 118 break; 119 case RQSTYPE_T7RQS: 120 ddf = (ddir == ISP_TO_DEVICE)? FCP_CMND_DATA_WRITE : FCP_CMND_DATA_READ; 121 dsp64 = &((ispreqt7_t *)fqe)->req_dataseg; 122 seglim = 1; 123 break; | 106 */ 107 switch (type) { 108 case RQSTYPE_REQUEST: 109 ddf = (ddir == ISP_TO_DEVICE)? REQFLAG_DATA_OUT : REQFLAG_DATA_IN; 110 dsp = ((ispreq_t *)fqe)->req_dataseg; 111 seglim = ISP_RQDSEG; 112 break; 113 case RQSTYPE_CMDONLY: --- 15 unchanged lines hidden (view full) --- 129 dsp64 = ((ispreqt3_t *)fqe)->req_dataseg; 130 seglim = ISP_RQDSEG_T3; 131 break; 132 case RQSTYPE_T7RQS: 133 ddf = (ddir == ISP_TO_DEVICE)? FCP_CMND_DATA_WRITE : FCP_CMND_DATA_READ; 134 dsp64 = &((ispreqt7_t *)fqe)->req_dataseg; 135 seglim = 1; 136 break; |
137#ifdef ISP_TARGET_MODE 138 case RQSTYPE_CTIO2: 139 dsp = ((ct2_entry_t *)fqe)->rsp.m0.u.ct_dataseg; 140 seglim = ISP_RQDSEG_T2; 141 break; 142 case RQSTYPE_CTIO3: 143 dsp64 = ((ct2_entry_t *)fqe)->rsp.m0.u.ct_dataseg64; 144 seglim = ISP_RQDSEG_T3; 145 break; 146 case RQSTYPE_CTIO7: 147 dsp64 = &((ct7_entry_t *)fqe)->rsp.m0.ds; 148 seglim = 1; 149 break; 150#endif |
|
124 default: 125 return (CMD_COMPLETE); 126 } | 151 default: 152 return (CMD_COMPLETE); 153 } |
127 128 if (seglim > nsegs) { | 154 if (seglim > nsegs) |
129 seglim = nsegs; | 155 seglim = nsegs; |
130 } 131 132 for (seg = curseg = 0; curseg < seglim; curseg++) { | 156 seg = 0; 157 while (seg < seglim) { |
133 if (dsp64) { 134 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 135 } else { 136 XS_GET_DMA_SEG(dsp++, segp, seg++); 137 } 138 } 139 | 158 if (dsp64) { 159 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 160 } else { 161 XS_GET_DMA_SEG(dsp++, segp, seg++); 162 } 163 } 164 |
140 | |
141 /* 142 * Second, start building additional continuation segments as needed. 143 */ 144 while (seg < nsegs) { 145 nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); 146 if (nxtnxt == isp->isp_reqodx) { 147 isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); 148 if (nxtnxt == isp->isp_reqodx) --- 10 unchanged lines hidden (view full) --- 159 dsp64 = crq->req_dataseg; 160 } else { 161 ispcontreq_t *crq = (ispcontreq_t *) storage; 162 seglim = ISP_CDSEG; 163 crq->req_header.rqs_entry_type = RQSTYPE_DATASEG; 164 crq->req_header.rqs_entry_count = 1; 165 dsp = crq->req_dataseg; 166 } | 165 /* 166 * Second, start building additional continuation segments as needed. 167 */ 168 while (seg < nsegs) { 169 nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); 170 if (nxtnxt == isp->isp_reqodx) { 171 isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); 172 if (nxtnxt == isp->isp_reqodx) --- 10 unchanged lines hidden (view full) --- 183 dsp64 = crq->req_dataseg; 184 } else { 185 ispcontreq_t *crq = (ispcontreq_t *) storage; 186 seglim = ISP_CDSEG; 187 crq->req_header.rqs_entry_type = RQSTYPE_DATASEG; 188 crq->req_header.rqs_entry_count = 1; 189 dsp = crq->req_dataseg; 190 } |
167 if (seg + seglim > nsegs) { 168 seglim = nsegs - seg; 169 } 170 for (curseg = 0; curseg < seglim; curseg++) { | 191 seglim += seg; 192 if (seglim > nsegs) 193 seglim = nsegs; 194 while (seg < seglim) { |
171 if (dsp64) { 172 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 173 } else { 174 XS_GET_DMA_SEG(dsp++, segp, seg++); 175 } 176 } 177 if (dsp64) { 178 isp_put_cont64_req(isp, (ispcontreq64_t *)storage, qe1); --- 7 unchanged lines hidden (view full) --- 186 nqe++; 187 } 188 189copy_and_sync: 190 ((isphdr_t *)fqe)->rqs_entry_count = nqe; 191 switch (type) { 192 case RQSTYPE_REQUEST: 193 ((ispreq_t *)fqe)->req_flags |= ddf; | 195 if (dsp64) { 196 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 197 } else { 198 XS_GET_DMA_SEG(dsp++, segp, seg++); 199 } 200 } 201 if (dsp64) { 202 isp_put_cont64_req(isp, (ispcontreq64_t *)storage, qe1); --- 7 unchanged lines hidden (view full) --- 210 nqe++; 211 } 212 213copy_and_sync: 214 ((isphdr_t *)fqe)->rqs_entry_count = nqe; 215 switch (type) { 216 case RQSTYPE_REQUEST: 217 ((ispreq_t *)fqe)->req_flags |= ddf; |
194 /* 195 * This is historical and not clear whether really needed. 196 */ 197 if (nsegs == 0) { | 218 /* This is historical and not clear whether really needed. */ 219 if (nsegs == 0) |
198 nsegs = 1; | 220 nsegs = 1; |
199 } | |
200 ((ispreq_t *)fqe)->req_seg_count = nsegs; 201 isp_put_request(isp, fqe, qe0); 202 break; 203 case RQSTYPE_CMDONLY: 204 ((ispreq_t *)fqe)->req_flags |= ddf; | 221 ((ispreq_t *)fqe)->req_seg_count = nsegs; 222 isp_put_request(isp, fqe, qe0); 223 break; 224 case RQSTYPE_CMDONLY: 225 ((ispreq_t *)fqe)->req_flags |= ddf; |
205 /* 206 * This is historical and not clear whether really needed. 207 */ 208 if (nsegs == 0) { | 226 /* This is historical and not clear whether really needed. */ 227 if (nsegs == 0) |
209 nsegs = 1; | 228 nsegs = 1; |
210 } | |
211 ((ispextreq_t *)fqe)->req_seg_count = nsegs; 212 isp_put_extended_request(isp, fqe, qe0); 213 break; 214 case RQSTYPE_T2RQS: 215 ((ispreqt2_t *)fqe)->req_flags |= ddf; 216 ((ispreqt2_t *)fqe)->req_seg_count = nsegs; 217 ((ispreqt2_t *)fqe)->req_totalcnt = totalcnt; 218 if (ISP_CAP_2KLOGIN(isp)) { --- 9 unchanged lines hidden (view full) --- 228 ((ispreqt3_t *)fqe)->req_totalcnt = totalcnt; 229 if (ISP_CAP_2KLOGIN(isp)) { 230 isp_put_request_t3e(isp, fqe, qe0); 231 } else { 232 isp_put_request_t3(isp, fqe, qe0); 233 } 234 break; 235 case RQSTYPE_T7RQS: | 229 ((ispextreq_t *)fqe)->req_seg_count = nsegs; 230 isp_put_extended_request(isp, fqe, qe0); 231 break; 232 case RQSTYPE_T2RQS: 233 ((ispreqt2_t *)fqe)->req_flags |= ddf; 234 ((ispreqt2_t *)fqe)->req_seg_count = nsegs; 235 ((ispreqt2_t *)fqe)->req_totalcnt = totalcnt; 236 if (ISP_CAP_2KLOGIN(isp)) { --- 9 unchanged lines hidden (view full) --- 246 ((ispreqt3_t *)fqe)->req_totalcnt = totalcnt; 247 if (ISP_CAP_2KLOGIN(isp)) { 248 isp_put_request_t3e(isp, fqe, qe0); 249 } else { 250 isp_put_request_t3(isp, fqe, qe0); 251 } 252 break; 253 case RQSTYPE_T7RQS: |
236 ((ispreqt7_t *)fqe)->req_alen_datadir = ddf; | 254 ((ispreqt7_t *)fqe)->req_alen_datadir = ddf; |
237 ((ispreqt7_t *)fqe)->req_seg_count = nsegs; 238 ((ispreqt7_t *)fqe)->req_dl = totalcnt; 239 isp_put_request_t7(isp, fqe, qe0); 240 break; | 255 ((ispreqt7_t *)fqe)->req_seg_count = nsegs; 256 ((ispreqt7_t *)fqe)->req_dl = totalcnt; 257 isp_put_request_t7(isp, fqe, qe0); 258 break; |
259#ifdef ISP_TARGET_MODE 260 case RQSTYPE_CTIO2: 261 case RQSTYPE_CTIO3: 262 if (((ct2_entry_t *)fqe)->ct_flags & CT2_FLAG_MODE2) { 263 ((ct2_entry_t *)fqe)->ct_seg_count = 1; 264 } else { 265 ((ct2_entry_t *)fqe)->ct_seg_count = nsegs; 266 } 267 if (ISP_CAP_2KLOGIN(isp)) { 268 isp_put_ctio2e(isp, fqe, qe0); 269 } else { 270 isp_put_ctio2(isp, fqe, qe0); 271 } 272 break; 273 case RQSTYPE_CTIO7: 274 if (((ct7_entry_t *)fqe)->ct_flags & CT7_FLAG_MODE2) { 275 ((ct7_entry_t *)fqe)->ct_seg_count = 1; 276 } else { 277 ((ct7_entry_t *)fqe)->ct_seg_count = nsegs; 278 } 279 isp_put_ctio7(isp, fqe, qe0); 280 break; 281#endif |
|
241 default: 242 return (CMD_COMPLETE); 243 } 244 if (isp->isp_dblev & ISP_LOGDEBUG1) { 245 isp_print_bytes(isp, "first queue entry", QENTRY_LEN, qe0); 246 } 247 ISP_ADD_REQUEST(isp, nxt); 248 return (CMD_QUEUED); --- 1803 unchanged lines hidden (view full) --- 2052 ISP_IOZPUT_16(isp, src->fcp_rsp_status_qualifier, &dst->fcp_rsp_status_qualifier); 2053 ISP_IOZPUT_8(isp, src->fcp_rsp_bits, &dst->fcp_rsp_bits); 2054 ISP_IOZPUT_8(isp, src->fcp_rsp_scsi_status, &dst->fcp_rsp_scsi_status); 2055 ISP_IOZPUT_32(isp, src->fcp_rsp_resid, &dst->fcp_rsp_resid); 2056 ISP_IOZPUT_32(isp, src->fcp_rsp_snslen, &dst->fcp_rsp_snslen); 2057 ISP_IOZPUT_32(isp, src->fcp_rsp_rsplen, &dst->fcp_rsp_rsplen); 2058} 2059 | 282 default: 283 return (CMD_COMPLETE); 284 } 285 if (isp->isp_dblev & ISP_LOGDEBUG1) { 286 isp_print_bytes(isp, "first queue entry", QENTRY_LEN, qe0); 287 } 288 ISP_ADD_REQUEST(isp, nxt); 289 return (CMD_QUEUED); --- 1803 unchanged lines hidden (view full) --- 2093 ISP_IOZPUT_16(isp, src->fcp_rsp_status_qualifier, &dst->fcp_rsp_status_qualifier); 2094 ISP_IOZPUT_8(isp, src->fcp_rsp_bits, &dst->fcp_rsp_bits); 2095 ISP_IOZPUT_8(isp, src->fcp_rsp_scsi_status, &dst->fcp_rsp_scsi_status); 2096 ISP_IOZPUT_32(isp, src->fcp_rsp_resid, &dst->fcp_rsp_resid); 2097 ISP_IOZPUT_32(isp, src->fcp_rsp_snslen, &dst->fcp_rsp_snslen); 2098 ISP_IOZPUT_32(isp, src->fcp_rsp_rsplen, &dst->fcp_rsp_rsplen); 2099} 2100 |
2060#ifdef ISP_TARGET_MODE 2061 | |
2062/* | 2101/* |
2063 * Command shipping- finish off first queue entry and do dma mapping and 2064 * additional segments as needed. 2065 * 2066 * Called with the first queue entry mostly filled out. 2067 * Our job here is to finish that and add additional data 2068 * segments if needed. 2069 * 2070 * We used to do synthetic entries to split data and status 2071 * at this level, but that started getting too tricky. 2072 */ 2073int 2074isp_send_tgt_cmd(ispsoftc_t *isp, void *fqe, void *segp, uint32_t nsegs, uint32_t totalcnt, isp_ddir_t ddir, void *snsptr, uint32_t snslen) 2075{ 2076 uint8_t storage[QENTRY_LEN]; 2077 uint8_t type, nqe; 2078 uint32_t seg, curseg, seglim, nxt, nxtnxt; 2079 ispds_t *dsp = NULL; 2080 ispds64_t *dsp64 = NULL; 2081 void *qe0, *qe1; 2082 2083 qe0 = isp_getrqentry(isp); 2084 if (qe0 == NULL) { 2085 return (CMD_EAGAIN); 2086 } 2087 nxt = ISP_NXT_QENTRY(isp->isp_reqidx, RQUEST_QUEUE_LEN(isp)); 2088 2089 type = ((isphdr_t *)fqe)->rqs_entry_type; 2090 nqe = 1; 2091 seglim = 0; 2092 2093 /* 2094 * If we have data to transmit, figure out how many segments can fit into the first entry. 2095 */ 2096 if (ddir != ISP_NOXFR) { 2097 /* 2098 * First, figure out how many pieces of data to transfer and what kind and how many we can put into the first queue entry. 2099 */ 2100 switch (type) { 2101 case RQSTYPE_CTIO2: 2102 dsp = ((ct2_entry_t *)fqe)->rsp.m0.u.ct_dataseg; 2103 seglim = ISP_RQDSEG_T2; 2104 break; 2105 case RQSTYPE_CTIO3: 2106 dsp64 = ((ct2_entry_t *)fqe)->rsp.m0.u.ct_dataseg64; 2107 seglim = ISP_RQDSEG_T3; 2108 break; 2109 case RQSTYPE_CTIO7: 2110 dsp64 = &((ct7_entry_t *)fqe)->rsp.m0.ds; 2111 seglim = 1; 2112 break; 2113 default: 2114 return (CMD_COMPLETE); 2115 } 2116 } 2117 2118 /* 2119 * First, fill out any of the data transfer stuff that fits 2120 * in the first queue entry. 2121 */ 2122 if (seglim > nsegs) { 2123 seglim = nsegs; 2124 } 2125 2126 for (seg = curseg = 0; curseg < seglim; curseg++) { 2127 if (dsp64) { 2128 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 2129 } else { 2130 XS_GET_DMA_SEG(dsp++, segp, seg++); 2131 } 2132 } 2133 2134 /* 2135 * Second, start building additional continuation segments as needed. 2136 */ 2137 while (seg < nsegs) { 2138 nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); 2139 if (nxtnxt == isp->isp_reqodx) { 2140 isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); 2141 if (nxtnxt == isp->isp_reqodx) 2142 return (CMD_EAGAIN); 2143 } 2144 ISP_MEMZERO(storage, QENTRY_LEN); 2145 qe1 = ISP_QUEUE_ENTRY(isp->isp_rquest, nxt); 2146 nxt = nxtnxt; 2147 if (dsp64) { 2148 ispcontreq64_t *crq = (ispcontreq64_t *) storage; 2149 seglim = ISP_CDSEG64; 2150 crq->req_header.rqs_entry_type = RQSTYPE_A64_CONT; 2151 crq->req_header.rqs_entry_count = 1; 2152 dsp64 = crq->req_dataseg; 2153 } else { 2154 ispcontreq_t *crq = (ispcontreq_t *) storage; 2155 seglim = ISP_CDSEG; 2156 crq->req_header.rqs_entry_type = RQSTYPE_DATASEG; 2157 crq->req_header.rqs_entry_count = 1; 2158 dsp = crq->req_dataseg; 2159 } 2160 if (seg + seglim > nsegs) { 2161 seglim = nsegs - seg; 2162 } 2163 for (curseg = 0; curseg < seglim; curseg++) { 2164 if (dsp64) { 2165 XS_GET_DMA64_SEG(dsp64++, segp, seg++); 2166 } else { 2167 XS_GET_DMA_SEG(dsp++, segp, seg++); 2168 } 2169 } 2170 if (dsp64) { 2171 isp_put_cont64_req(isp, (ispcontreq64_t *)storage, qe1); 2172 } else { 2173 isp_put_cont_req(isp, (ispcontreq_t *)storage, qe1); 2174 } 2175 if (isp->isp_dblev & ISP_LOGTDEBUG1) { 2176 isp_print_bytes(isp, "additional queue entry", 2177 QENTRY_LEN, qe1); 2178 } 2179 nqe++; 2180 } 2181 2182 /* 2183 * Third, not patch up the first queue entry with the number of segments 2184 * we actually are going to be transmitting. At the same time, handle 2185 * any mode 2 requests. 2186 */ 2187 ((isphdr_t *)fqe)->rqs_entry_count = nqe; 2188 switch (type) { 2189 case RQSTYPE_CTIO2: 2190 case RQSTYPE_CTIO3: 2191 if (((ct2_entry_t *)fqe)->ct_flags & CT2_FLAG_MODE2) { 2192 ((ct2_entry_t *)fqe)->ct_seg_count = 1; 2193 } else { 2194 ((ct2_entry_t *)fqe)->ct_seg_count = nsegs; 2195 } 2196 if (ISP_CAP_2KLOGIN(isp)) { 2197 isp_put_ctio2e(isp, fqe, qe0); 2198 } else { 2199 isp_put_ctio2(isp, fqe, qe0); 2200 } 2201 break; 2202 case RQSTYPE_CTIO7: 2203 if (((ct7_entry_t *)fqe)->ct_flags & CT7_FLAG_MODE2) { 2204 ((ct7_entry_t *)fqe)->ct_seg_count = 1; 2205 } else { 2206 ((ct7_entry_t *)fqe)->ct_seg_count = nsegs; 2207 } 2208 isp_put_ctio7(isp, fqe, qe0); 2209 break; 2210 default: 2211 return (CMD_COMPLETE); 2212 } 2213 if (isp->isp_dblev & ISP_LOGTDEBUG1) { 2214 isp_print_bytes(isp, "first queue entry", QENTRY_LEN, qe0); 2215 } 2216 ISP_ADD_REQUEST(isp, nxt); 2217 return (CMD_QUEUED); 2218} 2219 2220#endif 2221 2222/* | |
2223 * Find port database entries 2224 */ 2225int 2226isp_find_pdb_empty(ispsoftc_t *isp, int chan, fcportdb_t **lptr) 2227{ 2228 fcparam *fcp = FCPARAM(isp, chan); 2229 int i; 2230 --- 1220 unchanged lines hidden --- | 2102 * Find port database entries 2103 */ 2104int 2105isp_find_pdb_empty(ispsoftc_t *isp, int chan, fcportdb_t **lptr) 2106{ 2107 fcparam *fcp = FCPARAM(isp, chan); 2108 int i; 2109 --- 1220 unchanged lines hidden --- |