mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
Synchronize with Feral CVS repository:
Fix a comment typo. Force on HARD ADDRESS for the 24XX. Fix retry on error case- most of the time we *don't* want to retry a command sent back with TDFL_ERROR set- instead we want to set PARITY ERROR as a CA condition and just FIN the cmd. Comment for r270: 1. A major botch for local loop handling - we were never getting past loopid zero in isp_scan_loop. Bad doggie! 2. *Do* scan our loopid- this seems to allow us to find entities which are there and have a N-port handle that is identical to ours. I have no idea how the QLogic sorts this out. At least, this is how it seems to work for the 24XX in local loop mode. Don't deadlock with the HBA lock when performing a rescan ioctl. Also, mark the loop state as if we'd just received a PDB event- that way git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@271 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp.c,v 1.187 2007/12/29 04:48:46 mjacob Exp $ */
|
||||
/* $Id: isp.c,v 1.188 2007/12/30 20:48:14 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -1894,9 +1894,12 @@ isp_fibre_init_2400(ispsoftc_t *isp)
|
||||
if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) {
|
||||
icbp->icb_hardaddr = 0;
|
||||
}
|
||||
if (isp->isp_confopts & ISP_CFG_OWNLOOPID) {
|
||||
icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Force this on.
|
||||
*/
|
||||
icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS;
|
||||
|
||||
icbp->icb_fwoptions2 = fcp->isp_xfwoptions;
|
||||
switch(isp->isp_confopts & ISP_CFG_PORT_PREF) {
|
||||
case ISP_CFG_NPORT:
|
||||
@@ -3859,7 +3862,7 @@ isp_scan_fabric(ispsoftc_t *isp, int chan)
|
||||
lp->new_roles = nr;
|
||||
lp->state = FC_PORTDB_STATE_NEW;
|
||||
isp_prt(isp, ISP_LOGSANCFG,
|
||||
"Chan %d Fabric Port 0x%06x is New Entry",
|
||||
"Chan %d Fabric Port 0x%06x is a New Entry",
|
||||
chan, portid);
|
||||
continue;
|
||||
}
|
||||
|
||||
+25
-16
@@ -1,4 +1,4 @@
|
||||
/* $Id: scsi_target.c,v 1.77 2007/12/12 21:19:04 mjacob Exp $ */
|
||||
/* $Id: scsi_target.c,v 1.78 2007/12/30 20:23:18 mjacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2007 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -397,6 +397,9 @@ static uint8_t nosense[TMD_SENSELEN] = {
|
||||
static uint8_t invchg[TMD_SENSELEN] = {
|
||||
0xf0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3f, 0x0e
|
||||
};
|
||||
static uint8_t parity[TMD_SENSELEN] = {
|
||||
0xf0, 0, 0xb, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0x47, 0x02
|
||||
};
|
||||
|
||||
static bus_t busses[MAX_BUS];
|
||||
static sdata_t *sdp = NULL;
|
||||
@@ -1887,25 +1890,31 @@ scsi_target_handler(qact_e action, void *arg)
|
||||
SDprintk2("scsi_target: TMD_DONE[%llx] %p hf %x lf %x\n", tmd->cd_tagval, tmd, xact->td_hflags, xact->td_lflags);
|
||||
|
||||
if (xact->td_lflags & TDFL_ERROR) {
|
||||
ini_t *ini;
|
||||
printk("scsi_target: [%llx] ended in error (%d)\n", tmd->cd_tagval, xact->td_error);
|
||||
if (xact->td_error != -ENOMEM) {
|
||||
xact->td_hflags &= ~TDFH_DATA_MASK;
|
||||
xact->td_hflags |= TDFH_STSVALID|TDFH_SNSVALID;
|
||||
xact->td_xfrlen = 0;
|
||||
memcpy(tmd->cd_sense, ua, TMD_SENSELEN);
|
||||
tmd->cd_scsi_status = SCSI_CHECK;
|
||||
if (xact->td_error == -ENOMEM) {
|
||||
spin_lock_irqsave(&scsi_target_lock, flags);
|
||||
tmd->cd_next = NULL;
|
||||
if (r_front) {
|
||||
r_last->cd_next = tmd;
|
||||
} else {
|
||||
r_front = tmd;
|
||||
}
|
||||
r_last = tmd;
|
||||
spin_unlock_irqrestore(&scsi_target_lock, flags);
|
||||
up(&scsi_thread_sleep_semaphore);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* This command is dead. Mark CA for Parity Error and drive on.
|
||||
*/
|
||||
spin_lock_irqsave(&scsi_target_lock, flags);
|
||||
tmd->cd_next = NULL;
|
||||
if (r_front) {
|
||||
r_last->cd_next = tmd;
|
||||
} else {
|
||||
r_front = tmd;
|
||||
}
|
||||
r_last = tmd;
|
||||
ini = ini_from_tmd(bp, tmd);
|
||||
spin_unlock_irqrestore(&scsi_target_lock, flags);
|
||||
up(&scsi_thread_sleep_semaphore);
|
||||
return;
|
||||
if (ini) {
|
||||
add_sdata(ini, parity);
|
||||
}
|
||||
xact->td_hflags &= ~(TDFH_DATA_OUT|TDFH_DATA_IN|TDFH_STSVALID|TDFH_SNSVALID);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user