Deleted Added
full compact
isp_freebsd.c (208119) isp_freebsd.c (208129)
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 * 1. Redistributions of source code must retain the above copyright

--- 14 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>
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 * 1. Redistributions of source code must retain the above copyright

--- 14 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>
31__FBSDID("$FreeBSD: head/sys/dev/isp/isp_freebsd.c 208119 2010-05-15 20:26:10Z mjacob $");
31__FBSDID("$FreeBSD: head/sys/dev/isp/isp_freebsd.c 208129 2010-05-16 06:40:05Z mjacob $");
32#include <dev/isp/isp_freebsd.h>
33#include <sys/unistd.h>
34#include <sys/kthread.h>
35#include <sys/conf.h>
36#include <sys/module.h>
37#include <sys/ioccom.h>
38#include <dev/isp/isp_ioctl.h>
39#include <sys/devicestat.h>

--- 3898 unchanged lines hidden (view full) ---

3938isp_gdt(void *arg)
3939{
3940 struct isp_fc *fc = arg;
3941 ispsoftc_t *isp = fc->isp;
3942 int chan = fc - isp->isp_osinfo.pc.fc;
3943 fcportdb_t *lp;
3944 int dbidx, tgt, more_to_do = 0;
3945
32#include <dev/isp/isp_freebsd.h>
33#include <sys/unistd.h>
34#include <sys/kthread.h>
35#include <sys/conf.h>
36#include <sys/module.h>
37#include <sys/ioccom.h>
38#include <dev/isp/isp_ioctl.h>
39#include <sys/devicestat.h>

--- 3898 unchanged lines hidden (view full) ---

3938isp_gdt(void *arg)
3939{
3940 struct isp_fc *fc = arg;
3941 ispsoftc_t *isp = fc->isp;
3942 int chan = fc - isp->isp_osinfo.pc.fc;
3943 fcportdb_t *lp;
3944 int dbidx, tgt, more_to_do = 0;
3945
3946 isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d GDT timer expired @ %lu", chan, time_uptime);
3946 isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d GDT timer expired @ %lu", chan, (unsigned long) time_uptime);
3947 for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) {
3948 lp = &FCPARAM(isp, chan)->portdb[dbidx];
3949
3950 if (lp->state != FC_PORTDB_STATE_ZOMBIE) {
3951 continue;
3952 }
3953 if (lp->dev_map_idx == 0 || lp->target_mode) {
3954 continue;

--- 1105 unchanged lines hidden (view full) ---

5060 * announce that it's gone.
5061 *
5062 */
5063 if (lp->dev_map_idx && lp->reserved == 0) {
5064 lp->reserved = 1;
5065 lp->state = FC_PORTDB_STATE_ZOMBIE;
5066 lp->gone_timer = ISP_FC_PC(isp, bus)->gone_device_time;
5067 if (fc->ready && !callout_active(&fc->gdt)) {
3947 for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) {
3948 lp = &FCPARAM(isp, chan)->portdb[dbidx];
3949
3950 if (lp->state != FC_PORTDB_STATE_ZOMBIE) {
3951 continue;
3952 }
3953 if (lp->dev_map_idx == 0 || lp->target_mode) {
3954 continue;

--- 1105 unchanged lines hidden (view full) ---

5060 * announce that it's gone.
5061 *
5062 */
5063 if (lp->dev_map_idx && lp->reserved == 0) {
5064 lp->reserved = 1;
5065 lp->state = FC_PORTDB_STATE_ZOMBIE;
5066 lp->gone_timer = ISP_FC_PC(isp, bus)->gone_device_time;
5067 if (fc->ready && !callout_active(&fc->gdt)) {
5068 isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Starting Gone Device Timer with %u seconds time now %lu", bus, lp->gone_timer, time_uptime);
5068 isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Starting Gone Device Timer with %u seconds time now %lu", bus, lp->gone_timer, (unsigned long)time_uptime);
5069 callout_reset(&fc->gdt, hz, isp_gdt, fc);
5070 }
5071 tgt = lp->dev_map_idx - 1;
5072 isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, roles[lp->roles], "gone zombie at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn);
5073 } else if (lp->reserved == 0) {
5074 isp_prt(isp, ISP_LOGCONFIG, prom, bus, lp->portid, lp->handle, roles[lp->roles], "departed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn);
5075 }
5076 break;

--- 526 unchanged lines hidden ---
5069 callout_reset(&fc->gdt, hz, isp_gdt, fc);
5070 }
5071 tgt = lp->dev_map_idx - 1;
5072 isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, roles[lp->roles], "gone zombie at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn);
5073 } else if (lp->reserved == 0) {
5074 isp_prt(isp, ISP_LOGCONFIG, prom, bus, lp->portid, lp->handle, roles[lp->roles], "departed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn);
5075 }
5076 break;

--- 526 unchanged lines hidden ---