patch-2.4.8 linux/drivers/scsi/cpqfcTSworker.c
Next file: linux/drivers/scsi/g_NCR5380.c
Previous file: linux/drivers/scsi/cpqfcTSstructs.h
Back to the patch index
Back to the overall index
- Lines: 78
- Date:
Sun Aug 5 13:12:41 2001
- Orig file:
v2.4.7/linux/drivers/scsi/cpqfcTSworker.c
- Orig date:
Fri Mar 2 18:38:38 2001
diff -u --recursive --new-file v2.4.7/linux/drivers/scsi/cpqfcTSworker.c linux/drivers/scsi/cpqfcTSworker.c
@@ -149,7 +149,6 @@
CPQFCHBA* cpqfcHBAdata,
TachFCHDR_GCMND* fchs);
-
// (see scsi_error.c comments on kernel task creation)
void cpqfcTSWorkerThread( void *host)
@@ -1069,6 +1068,7 @@
pFcPort->flogi = FALSE;
pFcPort->LOGO_timer = 0;
pFcPort->device_blocked = TRUE; // block Scsi Requests
+ pFcPort->ScsiNexus.VolumeSetAddressing=0;
}
@@ -2934,7 +2934,6 @@
ULONG ulStatus;
UCHAR *ucBuff;
-
if( !cpqfcHBAdata->PortDiscDone) // cleared by LDn
{
printk("Discard Q'd ReportLun command\n");
@@ -2976,7 +2975,7 @@
Cmnd->channel = pLoggedInPort->ScsiNexus.channel;
Cmnd->target = pLoggedInPort->ScsiNexus.target;
-
+
ulStatus = cpqfcTSBuildExchange(
cpqfcHBAdata,
@@ -3404,7 +3403,7 @@
if( port_id_valid ) // look for alpa first
{
if( pLoggedInPort->port_id == port_id )
- break; // found it!
+ break; // found it!
}
if( wwn_valid ) // look for wwn second
{
@@ -4326,7 +4325,6 @@
break;
-
case BLS_ABTS: // FC defined basic link service command ABTS
// Abort Sequence
@@ -4498,6 +4496,7 @@
// Fibre Channel SCSI 'originator' sequences...
// (originator means 'initiator' in FCP-SCSI)
+
case SCSI_IWE: // TachLite Initiator Write Entry
{
PFC_LOGGEDIN_PORT pLoggedInPort =
@@ -6171,7 +6170,18 @@
// 4 bytes Control Field FCP_CNTL
*payload++ = 0; // byte 0: (MSB) reserved
*payload++ = 0; // byte 1: task codes
- *payload++ = 0; // byte 2: task management flags
+
+ // byte 2: task management flags
+ // another "use" of the spare field to accomplish TDR
+ // note combination needed
+ if( (Cmnd->cmnd[0] == RELEASE) &&
+ (Cmnd->SCp.buffers_residual == FCP_TARGET_RESET) )
+ {
+ Cmnd->cmnd[0] = 0; // issue "Test Unit Ready" for TDR
+ *payload++ = 0x20; // target device reset bit
+ }
+ else
+ *payload++ = 0; // no TDR
// byte 3: (LSB) execution management codes
// bit 0 write, bit 1 read (don't set together)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)