mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Synchronize with Feral CVS repository:
I don't know why I thought this would work- forcing a re-login to the fabric controller just barfs. Make down count reflect jiffies elapsed rather than depend on calls to ISP_FC_RESCAN. Shorten deadloop time default to 10 seconds. At least enable MSI (if not MSI-X) for 24XX cards. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@282 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp.c,v 1.194 2008/01/09 18:57:21 mjacob Exp $ */
|
||||
/* $Id: isp.c,v 1.195 2008/01/25 22:20:15 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -2437,20 +2437,11 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, isp_pdb_t *pdb, int dolock)
|
||||
MEMZERO(&mbs, sizeof (mbs));
|
||||
mbs.param[0] = MBOX_GET_PORT_DB;
|
||||
if (IS_24XX(isp)) {
|
||||
mbs.ibits = (1 << 9) | (1 << 10);
|
||||
mbs.ibits = (1 << 9);
|
||||
mbs.param[1] = id;
|
||||
mbs.param[9] = chan;
|
||||
if (id == NPH_FL_ID) {
|
||||
mbs.param[4] = FL_ID;
|
||||
mbs.param[10] = 1;
|
||||
}
|
||||
} else if (ISP_CAP_2KLOGIN(isp)) {
|
||||
mbs.param[1] = id;
|
||||
mbs.ibits = (1 << 10);
|
||||
if (id == NPH_FL_ID) {
|
||||
mbs.param[4] = FL_ID;
|
||||
mbs.param[10] = 1;
|
||||
}
|
||||
} else {
|
||||
mbs.param[1] = id << 8;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_linux.c,v 1.223 2008/01/19 02:08:48 mjacob Exp $ */
|
||||
/* $Id: isp_linux.c,v 1.224 2008/01/25 22:22:47 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -82,7 +82,7 @@ int isp_maxluns = 8;
|
||||
int isp_fcduplex = 0;
|
||||
int isp_nport_only = 0;
|
||||
int isp_loop_only = 0;
|
||||
int isp_deadloop_time = 30; /* how long to wait before assume loop dead */
|
||||
int isp_deadloop_time = 10; /* how long to wait before assume loop dead */
|
||||
int isp_fc_id = 111;
|
||||
int isp_spi_id = 7;
|
||||
int isp_own_id = 0;
|
||||
@@ -4558,10 +4558,13 @@ isp_task_thread(void *arg)
|
||||
ISP_DATA(isp, chan)->blocked = 0;
|
||||
isplinux_runwaitq(isp);
|
||||
} else {
|
||||
if (ISP_DATA(isp, chan)->downcount == 0) {
|
||||
ISP_DATA(isp, chan)->downcount = jiffies;
|
||||
}
|
||||
/*
|
||||
* Try again in a little while.
|
||||
*/
|
||||
if (++(ISP_DATA(isp, chan)->downcount) == isp_deadloop_time) {
|
||||
if ((jiffies - ISP_DATA(isp, chan)->downcount) > (isp_deadloop_time * HZ)) {
|
||||
fcp->loop_seen_once = 0;
|
||||
ISP_DATA(isp, chan)->deadloop = 1;
|
||||
ISP_DATA(isp, chan)->downcount = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_linux.h,v 1.152 2008/01/16 20:33:48 mjacob Exp $ */
|
||||
/* $Id: isp_linux.h,v 1.153 2008/01/25 22:22:47 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -638,7 +638,7 @@ typedef struct {
|
||||
blocked : 1,
|
||||
deadloop : 1,
|
||||
role : 2;
|
||||
unsigned int downcount;
|
||||
unsigned long downcount;
|
||||
unsigned int qfdelay;
|
||||
} isp_data;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_pci.c,v 1.154 2008/01/16 16:46:30 mjacob Exp $ */
|
||||
/* $Id: isp_pci.c,v 1.155 2008/01/25 22:23:15 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -349,6 +349,7 @@ struct isp_pcisoftc {
|
||||
void * vaddr; /* Mapped Memory Address */
|
||||
vm_offset_t voff;
|
||||
vm_offset_t poff[_NREG_BLKS];
|
||||
int msi_enable;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -448,7 +449,10 @@ isplinux_pci_release(struct Scsi_Host *host)
|
||||
}
|
||||
}
|
||||
pci_release_regions(pcs->pci_dev);
|
||||
|
||||
if (pcs->msi_enable) {
|
||||
pcs->msi_enable = 0;
|
||||
pci_disable_msi(pcs->pci_dev);
|
||||
}
|
||||
if (isp->isp_param) {
|
||||
isp_kfree(isp->isp_param, isp->isp_osinfo.param_amt);
|
||||
isp->isp_param = NULL;
|
||||
@@ -595,6 +599,11 @@ isplinux_pci_init_one(struct Scsi_Host *host)
|
||||
/* enable PCI-INTX */
|
||||
pci_intx(pdev, 1);
|
||||
|
||||
/* enable MSI */
|
||||
if (pci_enable_msi(pdev) == 0) {
|
||||
isp_pci->msi_enable = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Is this a PCI-X card? If so, set max read byte count.
|
||||
*/
|
||||
@@ -3297,6 +3306,10 @@ isplinux_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
ret = scsi_add_host(host, &pdev->dev);
|
||||
if (ret) {
|
||||
scsi_host_put(host);
|
||||
if (pci_isp->msi_enable) {
|
||||
pci_isp->msi_enable = 0;
|
||||
pci_disable_msi(pdev);
|
||||
}
|
||||
pci_disable_device(pdev);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user