From: "Moore, Eric Dean" I have created a patch with only domain validation fixes made against 2.6.13-rc2 plus James scsi-misc-2.6.diff from about a week ago. In dv we do reserve/release, around the issuing of read/write buffer patterns. The release is failing for some reason on id=1. Perhaps you could apply the patch and let me know if it is still occurring. Or perhaps you could enable the MPT_DEBUG_DV define in the Makefile and recompile. Then send me the dmesg. On Wednesday, July 27, 2005 12:24 AM, Andrew Morton wrote: > > I got this while booting my ia64 box. Running the latest of > everything. > Does it matter? > > > mptbase: Initiating ioc0 bringup > ioc0: 53C1030: Capabilities={Initiator} > scsi0 : ioc0: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=49 > Vendor: MAXTOR Model: ATLASU320_18_SCA Rev: B120 > Type: Direct-Access ANSI SCSI revision: 03 > SCSI device sda: 35916548 512-byte hdwr sectors (18389 MB) > SCSI device sda: drive cache: write back > SCSI device sda: 35916548 512-byte hdwr sectors (18389 MB) > SCSI device sda: drive cache: write back > sda: sda1 sda2 sda3 > Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 > Vendor: QUANTUM Model: ATLAS IV 9 SCA Rev: 0909 > Type: Direct-Access ANSI SCSI revision: 03 > SCSI device sdb: 17942584 512-byte hdwr sectors (9187 MB) > SCSI device sdb: drive cache: write back > SCSI device sdb: 17942584 512-byte hdwr sectors (9187 MB) > SCSI device sdb: drive cache: write back > sdb: sdb1 > Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0 > Vendor: QUANTUM Model: ATLAS IV 9 SCA Rev: 0B0B > Type: Direct-Access ANSI SCSI revision: 03 > SCSI device sdc: 17942584 512-byte hdwr sectors (9187 MB) > SCSI device sdc: drive cache: write back > SCSI device sdc: 17942584 512-byte hdwr sectors (9187 MB) > SCSI device sdc: drive cache: write back > sdc: unknown partition table > Attached scsi disk sdc at scsi0, channel 0, id 2, lun 0 > Vendor: ESG-SHV Model: SCA HSBP M17 Rev: 0101 > Type: Processor ANSI SCSI revision: 02 > GSI 29 (level, low) -> CPU 2 (0xc418) vector 50 > ACPI: PCI Interrupt 0000:06:02.1[B] -> GSI 29 (level, low) -> IRQ 50 > mptbase: Initiating ioc1 bringup > mptscsih: ioc0: DV: Release failed. id 1<6>ioc1: 53C1030: > Capabilities={Initiator} > scsi1 : ioc1: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=50 > Calling initcall 0xa0000001007e5ed0: mptfc_init+0x0/0x140() > Fusion MPT FC Host driver 3.03.02 > Calling initcall 0xa0000001007e1f00: mptctl_init+0x0/0x1e0() > Fusion MPT misc device (ioctl) driver 3.03.02 > mptctl: Registered with Fusion MPT base driver > mptctl: /dev/mptctl @ (major,minor=10,220) > Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/message/fusion/mptscsih.c | 59 +++++++++++++++++++++++--------------- 1 files changed, 36 insertions(+), 23 deletions(-) diff -puN drivers/message/fusion/mptscsih.c~mpt-fusion-dv-fixes drivers/message/fusion/mptscsih.c --- devel/drivers/message/fusion/mptscsih.c~mpt-fusion-dv-fixes 2005-07-27 17:34:06.000000000 -0700 +++ devel-akpm/drivers/message/fusion/mptscsih.c 2005-07-27 17:34:06.000000000 -0700 @@ -93,8 +93,9 @@ typedef struct _BIG_SENSE_BUF { #define MPT_ICFLAG_BUF_CAP 0x01 /* ReadBuffer Read Capacity format */ #define MPT_ICFLAG_ECHO 0x02 /* ReadBuffer Echo buffer format */ -#define MPT_ICFLAG_PHYS_DISK 0x04 /* Any SCSI IO but do Phys Disk Format */ -#define MPT_ICFLAG_TAGGED_CMD 0x08 /* Do tagged IO */ +#define MPT_ICFLAG_EBOS 0x04 /* ReadBuffer Echo buffer has EBOS */ +#define MPT_ICFLAG_PHYS_DISK 0x08 /* Any SCSI IO but do Phys Disk Format */ +#define MPT_ICFLAG_TAGGED_CMD 0x10 /* Do tagged IO */ #define MPT_ICFLAG_DID_RESET 0x20 /* Bus Reset occurred with this command */ #define MPT_ICFLAG_RESERVED 0x40 /* Reserved has been issued */ @@ -1418,6 +1419,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v return 0; fail: + hd->ScsiLookup[my_idx] = NULL; mptscsih_freeChainBuffers(hd->ioc, my_idx); mpt_free_msg_frame(hd->ioc, mf); return SCSI_MLQUEUE_HOST_BUSY; @@ -3085,7 +3087,7 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, in MPT_ADAPTER *ioc = hd->ioc; Config_t *pReq; SCSIDevicePage1_t *pData; - VirtDevice *pTarget; + VirtDevice *pTarget=NULL; MPT_FRAME_HDR *mf; dma_addr_t dataDma; u16 req_idx; @@ -3169,7 +3171,7 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, in width = pTarget->maxWidth; factor = pTarget->minSyncFactor; offset = pTarget->maxOffset; - negoFlags = pTarget->negoFlags; + negoFlags |= pTarget->negoFlags; } #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION @@ -3184,7 +3186,7 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, in #endif if (flags & MPT_SCSICFG_BLK_NEGO) - negoFlags = MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC; + negoFlags |= MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC; mptscsih_setDevicePage1Flags(width, factor, offset, &requested, &configuration, negoFlags); @@ -3194,8 +3196,8 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, in /* Get a MF for this command. */ if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { - dprintk((MYIOC_s_WARN_FMT "write SDP1: no msg frames!\n", - ioc->name)); + dfailprintk((MYIOC_s_WARN_FMT "write SDP1: no msg frames!\n", + ioc->name)); return -EAGAIN; } @@ -3289,7 +3291,7 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd /* Get a MF for this command. */ if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { - dprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n", + dfailprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n", ioc->name)); return -EAGAIN; } @@ -4711,8 +4713,13 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus if (inq0 != 0) goto target_done; - if ( ioc->spi_data.PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY ) + ddvprintk((MYIOC_s_NOTE_FMT "DV: bus, id, lun (%d, %d, %d) PortFlags=%x\n", + ioc->name, bus, id, lun, ioc->spi_data.PortFlags)); + if ( ioc->spi_data.PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY ) { + ddvprintk((MYIOC_s_NOTE_FMT "DV Basic Only: bus, id, lun (%d, %d, %d) PortFlags=%x\n", + ioc->name, bus, id, lun, ioc->spi_data.PortFlags)); goto target_done; + } /* Start the Enhanced Test. * 0) issue TUR to clear out check conditions @@ -4809,6 +4816,8 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus notDone = 0; if (iocmd.flags & MPT_ICFLAG_ECHO) { bufsize = ((pbuf1[2] & 0x1F) <<8) | pbuf1[3]; + if (pbuf1[0] & 0x01) + iocmd.flags |= MPT_ICFLAG_EBOS; } else { bufsize = pbuf1[1]<<16 | pbuf1[2]<<8 | pbuf1[3]; } @@ -4905,6 +4914,9 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus } iocmd.flags &= ~MPT_ICFLAG_DID_RESET; + if (iocmd.flags & MPT_ICFLAG_EBOS) + goto skip_Reserve; + repeat = 5; while (repeat && (!(iocmd.flags & MPT_ICFLAG_RESERVED))) { iocmd.cmd = RESERVE; @@ -4948,6 +4960,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus } } +skip_Reserve: mptscsih_fillbuf(pbuf1, sz, patt, 1); iocmd.cmd = WRITE_BUFFER; iocmd.data_dma = buf1_dma; @@ -5192,11 +5205,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP * If not an LVD bus, the adapter minSyncFactor has been * already throttled back. */ + negoFlags = hd->ioc->spi_data.noQas; if ((hd->Targets)&&((pTarget = hd->Targets[(int)id]) != NULL) && !pTarget->raidVolume) { width = pTarget->maxWidth; offset = pTarget->maxOffset; factor = pTarget->minSyncFactor; - negoFlags = pTarget->negoFlags; + negoFlags |= pTarget->negoFlags; } else { if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) { data = hd->ioc->spi_data.nvram[id]; @@ -5217,7 +5231,6 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP } /* Set the negotiation flags */ - negoFlags = hd->ioc->spi_data.noQas; if (!width) negoFlags |= MPT_TARGET_NO_NEGO_WIDE; @@ -5238,7 +5251,7 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP dv->max.offset = offset; dv->max.factor = factor; dv->max.flags = negoFlags; - ddvprintk((" id=%d width=%d factor=%x offset=%x flags=%x\n", + ddvprintk((" id=%d width=%d factor=%x offset=%x negoFlags=%x\n", id, width, factor, offset, negoFlags)); break; @@ -5248,7 +5261,7 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP /* Update tmax values with those from Device Page 0.*/ pPage0 = (SCSIDevicePage0_t *) pPage; if (pPage0) { - val = cpu_to_le32(pPage0->NegotiatedParameters); + val = le32_to_cpu(pPage0->NegotiatedParameters); dv->max.width = val & MPI_SCSIDEVPAGE0_NP_WIDE ? 1 : 0; dv->max.offset = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK) >> 16; dv->max.factor = (val&MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK) >> 8; @@ -5257,7 +5270,7 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP dv->now.width = dv->max.width; dv->now.offset = dv->max.offset; dv->now.factor = dv->max.factor; - ddvprintk(("id=%d width=%d factor=%x offset=%x flags=%x\n", + ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x\n", id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); break; @@ -5276,12 +5289,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP dv->now.offset, &val, &configuration, dv->now.flags); dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); - pPage1->RequestedParameters = le32_to_cpu(val); + pPage1->RequestedParameters = cpu_to_le32(val); pPage1->Reserved = 0; - pPage1->Configuration = le32_to_cpu(configuration); + pPage1->Configuration = cpu_to_le32(configuration); } - ddvprintk(("id=%d width=%d factor=%x offset=%x flags=%x request=%x configuration=%x\n", + ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x configuration=%x\n", id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); break; @@ -5301,9 +5314,9 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP offset, &val, &configuration, negoFlags); dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", id, width, factor, offset, negoFlags, val, configuration)); - pPage1->RequestedParameters = le32_to_cpu(val); + pPage1->RequestedParameters = cpu_to_le32(val); pPage1->Reserved = 0; - pPage1->Configuration = le32_to_cpu(configuration); + pPage1->Configuration = cpu_to_le32(configuration); } ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n", id, width, factor, offset, val, configuration, negoFlags)); @@ -5377,12 +5390,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP if (pPage1) { mptscsih_setDevicePage1Flags (width, factor, offset, &val, &configuration, dv->now.flags); - dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x flags=%x request=%x config=%x\n", + dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x request=%x config=%x\n", id, width, offset, factor, dv->now.flags, val, configuration)); - pPage1->RequestedParameters = le32_to_cpu(val); + pPage1->RequestedParameters = cpu_to_le32(val); pPage1->Reserved = 0; - pPage1->Configuration = le32_to_cpu(configuration); + pPage1->Configuration = cpu_to_le32(configuration); } ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n", @@ -5392,7 +5405,7 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP case MPT_SAVE: ddvprintk((MYIOC_s_NOTE_FMT "Saving to Target structure: ", hd->ioc->name)); - ddvprintk(("id=%d width=%x factor=%x offset=%d flags=%x\n", + ddvprintk(("id=%d width=%x factor=%x offset=%d negoFlags=%x\n", id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); /* Save these values to target structures _