# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1595 -> 1.1596 # drivers/scsi/scsiiom.c 1.7 -> 1.8 # drivers/scsi/tmscsim.h 1.6 -> 1.7 # drivers/scsi/tmscsim.c 1.32 -> 1.33 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/02/22 hch@bird.bsdonline.org 1.1596 # cleanups # -------------------------------------------- # diff -Nru a/drivers/scsi/scsiiom.c b/drivers/scsi/scsiiom.c --- a/drivers/scsi/scsiiom.c Sun Feb 22 19:10:44 2004 +++ b/drivers/scsi/scsiiom.c Sun Feb 22 19:10:44 2004 @@ -1315,9 +1315,8 @@ void dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB ) { - UCHAR bval, status, i, DCB_removed; + UCHAR bval, status, i; PSCSICMD pcmd; - PSCSI_INQDATA ptr; PSGL ptr2; ULONG swlval; @@ -1325,12 +1324,8 @@ /* KG: Moved pci_unmap here */ dc390_pci_unmap(pSRB); - DCB_removed = 0; status = pSRB->TargetStatus; - ptr = (PSCSI_INQDATA) (pcmd->request_buffer); - if( pcmd->use_sg ) - ptr = (PSCSI_INQDATA) sg_dma_address((PSGL) ptr); - + DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\ pSRB, pcmd->pid)); if(pSRB->SRBFlag & AUTO_REQSENSE) @@ -1484,21 +1479,11 @@ SET_RES_DID(pcmd->result,DID_OK); } } - if ((pcmd->result & RES_DID) == 0 && - pcmd->cmnd[0] == INQUIRY && - pcmd->cmnd[2] == 0 && - pcmd->request_bufflen >= 8 && - ptr && - (ptr->Vers & 0x07) >= 2) - pDCB->Inquiry7 = ptr->Flags; ckc_e: - -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,30) pcmd->resid = pcmd->request_bufflen - pSRB->TotalXferredLen; -#endif - if (!DCB_removed) dc390_Going_remove (pDCB, pSRB); + dc390_Going_remove (pDCB, pSRB); /* Add to free list */ dc390_Free_insert (pACB, pSRB); @@ -1510,7 +1495,6 @@ dc390_Waiting_process (pACB); return; } - /* Remove all SRBs from Going list and inform midlevel */ void diff -Nru a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c --- a/drivers/scsi/tmscsim.c Sun Feb 22 19:10:44 2004 +++ b/drivers/scsi/tmscsim.c Sun Feb 22 19:10:44 2004 @@ -1065,7 +1065,7 @@ pSRB->AdaptStatus = 0; pSRB->TargetStatus = 0; pSRB->MsgCnt = 0; - if( pDCB->DevType != TYPE_TAPE ) + if (pcmd->device->type != TYPE_TAPE) pSRB->RetryCnt = 1; else pSRB->RetryCnt = 0; @@ -1119,8 +1119,10 @@ cmd->result = 0; pSRB = dc390_Free_get(pACB); - if (!pSRB) - goto requeue; + if (!pSRB) { + DC390_UNLOCK_ACB; + return SCSI_MLQUEUE_HOST_BUSY; + } dc390_BuildSRB(cmd, pDCB, pSRB); if (pDCB->pWaitingSRB) { @@ -1132,10 +1134,6 @@ DC390_UNLOCK_ACB; DEBUG1(printk (KERN_DEBUG " ... command (pid %li) queued successfully.\n", cmd->pid)); return(0); - - requeue: - DC390_UNLOCK_ACB; - return 1; } /* We ignore mapping problems, as we expect everybody to respect @@ -1412,7 +1410,6 @@ } } -NOT_RUN: status = SCSI_ABORT_NOT_RUNNING; ABO_X: @@ -1643,7 +1640,6 @@ pDCB->CtrlR3 = pDCB2->CtrlR3; pDCB->CtrlR4 = pDCB2->CtrlR4; - pDCB->Inquiry7 = pDCB2->Inquiry7; } else { @@ -1658,7 +1654,6 @@ pDCB->CtrlR4 = pACB->glitch_cfg | CTRL4_RESERVED; if( dc390_eepromBuf[index][EE_MODE2] & ACTIVE_NEGATION) pDCB->CtrlR4 |= NEGATE_REQACKDATA | NEGATE_REQACK; - pDCB->Inquiry7 = 0; } dc390_updateDCB(pACB, pDCB); @@ -1782,7 +1777,6 @@ pACB->DCBCnt = 0; pACB->TagMaxNum = 2 << dc390_eepromBuf[index][EE_TAG_CMD_NUM]; pACB->ACBFlag = 0; - pACB->scan_devices = 1; pACB->MsgLen = 0; pACB->Ignore_IRQ = 0; pACB->Gmode2 = dc390_eepromBuf[index][EE_MODE2]; diff -Nru a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h --- a/drivers/scsi/tmscsim.h Sun Feb 22 19:10:44 2004 +++ b/drivers/scsi/tmscsim.h Sun Feb 22 19:10:44 2004 @@ -150,7 +150,6 @@ UCHAR WaitSRBCnt; /* Not used */ UCHAR GoingSRBCnt; -UCHAR DevType; UCHAR MaxCommand; /* 0x20: */ @@ -401,63 +400,6 @@ typedef struct { dma_addr_t saved_dma_handle; } dc390_cmd_scp_t; - -/* -** Inquiry Data format -*/ - -typedef struct _SCSIInqData { /* INQUIRY */ - - UCHAR DevType; /* Periph Qualifier & Periph Dev Type*/ - UCHAR RMB_TypeMod; /* rem media bit & Dev Type Modifier */ - UCHAR Vers; /* ISO, ECMA, & ANSI versions */ - UCHAR RDF; /* AEN, TRMIOP, & response data format*/ - UCHAR AddLen; /* length of additional data */ - UCHAR Res1; /* reserved */ - UCHAR Res2; /* reserved */ - UCHAR Flags; /* RelADr,Wbus32,Wbus16,Sync,etc. */ - UCHAR VendorID[8]; /* Vendor Identification */ - UCHAR ProductID[16]; /* Product Identification */ - UCHAR ProductRev[4]; /* Product Revision */ - - -} SCSI_INQDATA, *PSCSI_INQDATA; - - -/* Inquiry byte 0 masks */ - - -#define SCSI_DEVTYPE 0x1F /* Peripheral Device Type */ -#define SCSI_PERIPHQUAL 0xE0 /* Peripheral Qualifier */ -#define TYPE_NODEV SCSI_DEVTYPE /* Unknown or no device type */ - - -/* Inquiry byte 1 mask */ - -#define SCSI_REMOVABLE_MEDIA 0x80 /* Removable Media bit (1=removable) */ - - -/* Peripheral Device Type definitions */ -/* see include/scsi/scsi.h for the rest */ - -#ifndef TYPE_PRINTER -# define TYPE_PRINTER 0x02 /* Printer device */ -#endif -#ifndef TYPE_COMM -# define TYPE_COMM 0x09 /* Communications device */ -#endif - -/* -** Inquiry flag definitions (Inq data byte 7) -*/ - -#define SCSI_INQ_RELADR 0x80 /* device supports relative addressing*/ -#define SCSI_INQ_WBUS32 0x40 /* device supports 32 bit data xfers */ -#define SCSI_INQ_WBUS16 0x20 /* device supports 16 bit data xfers */ -#define SCSI_INQ_SYNC 0x10 /* device supports synchronous xfer */ -#define SCSI_INQ_LINKED 0x08 /* device supports linked commands */ -#define SCSI_INQ_CMDQUEUE 0x02 /* device supports command queueing */ -#define SCSI_INQ_SFTRE 0x01 /* device supports soft resets */ /*