isp_freebsd.c (321867) | isp_freebsd.c (321870) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2009-2017 Alexander Motin <mav@FreeBSD.org> |
|
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 * 1. Redistributions of source code must retain the above copyright 9 * notice immediately at the beginning of the file, without modification, --- 13 unchanged lines hidden (view full) --- 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. 29 */ 30#include <sys/cdefs.h> | 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice immediately at the beginning of the file, without modification, --- 13 unchanged lines hidden (view full) --- 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. 30 */ 31#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: stable/11/sys/dev/isp/isp_freebsd.c 321867 2017-08-01 12:58:48Z mav $"); | 32__FBSDID("$FreeBSD: stable/11/sys/dev/isp/isp_freebsd.c 321870 2017-08-01 13:03:06Z mav $"); |
32 33#include <dev/isp/isp_freebsd.h> 34#include <sys/unistd.h> 35#include <sys/kthread.h> 36#include <sys/conf.h> 37#include <sys/module.h> 38#include <sys/ioccom.h> 39#include <dev/isp/isp_ioctl.h> --- 124 unchanged lines hidden (view full) --- 164 struct sysctl_oid *tree = device_get_sysctl_tree(isp->isp_osinfo.dev); 165 char name[16]; 166 167 ISP_LOCK(isp); 168 fc->sim = sim; 169 fc->path = path; 170 fc->isp = isp; 171 fc->ready = 1; | 33 34#include <dev/isp/isp_freebsd.h> 35#include <sys/unistd.h> 36#include <sys/kthread.h> 37#include <sys/conf.h> 38#include <sys/module.h> 39#include <sys/ioccom.h> 40#include <dev/isp/isp_ioctl.h> --- 124 unchanged lines hidden (view full) --- 165 struct sysctl_oid *tree = device_get_sysctl_tree(isp->isp_osinfo.dev); 166 char name[16]; 167 168 ISP_LOCK(isp); 169 fc->sim = sim; 170 fc->path = path; 171 fc->isp = isp; 172 fc->ready = 1; |
173 fcp->isp_use_gft_id = 1; 174 fcp->isp_use_gff_id = 1; |
|
172 173 callout_init_mtx(&fc->gdt, &isp->isp_lock, 0); 174 TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); 175#ifdef ISP_TARGET_MODE 176 TAILQ_INIT(&fc->waitq); 177 STAILQ_INIT(&fc->ntfree); 178 for (i = 0; i < ATPDPSIZE; i++) 179 STAILQ_INSERT_TAIL(&fc->ntfree, &fc->ntpool[i], next); --- 50 unchanged lines hidden (view full) --- 230 "fwstate", CTLFLAG_RD, &fcp->isp_fwstate, 0, 231 "Firmware state"); 232 SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 233 "loopstate", CTLFLAG_RD, &fcp->isp_loopstate, 0, 234 "Loop state"); 235 SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 236 "topo", CTLFLAG_RD, &fcp->isp_topo, 0, 237 "Connection topology"); | 175 176 callout_init_mtx(&fc->gdt, &isp->isp_lock, 0); 177 TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); 178#ifdef ISP_TARGET_MODE 179 TAILQ_INIT(&fc->waitq); 180 STAILQ_INIT(&fc->ntfree); 181 for (i = 0; i < ATPDPSIZE; i++) 182 STAILQ_INSERT_TAIL(&fc->ntfree, &fc->ntpool[i], next); --- 50 unchanged lines hidden (view full) --- 233 "fwstate", CTLFLAG_RD, &fcp->isp_fwstate, 0, 234 "Firmware state"); 235 SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 236 "loopstate", CTLFLAG_RD, &fcp->isp_loopstate, 0, 237 "Loop state"); 238 SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 239 "topo", CTLFLAG_RD, &fcp->isp_topo, 0, 240 "Connection topology"); |
241 SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 242 "use_gft_id", CTLFLAG_RWTUN, &fcp->isp_use_gft_id, 0, 243 "Use GFT_ID during fabric scan"); 244 SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 245 "use_gff_id", CTLFLAG_RWTUN, &fcp->isp_use_gff_id, 0, 246 "Use GFF_ID during fabric scan"); |
|
238 } 239 return (0); 240} 241 242static void 243isp_detach_chan(ispsoftc_t *isp, int chan) 244{ 245 struct cam_sim *sim; --- 4056 unchanged lines hidden --- | 247 } 248 return (0); 249} 250 251static void 252isp_detach_chan(ispsoftc_t *isp, int chan) 253{ 254 struct cam_sim *sim; --- 4056 unchanged lines hidden --- |