Thanks for the ideas and patch. I'll try them as soon as I get home tonight.
The TEST UNIT READY command works without any problems.
Bradley.
On Thu, 29 Mar 2001, Douglas Gilbert wrote:
> Bradley Broom wrote:
> >
> > On Wed, 21 Mar 2001, Bradley Broom wrote:
> > > Summary: My system freezes *completely* when doing an INQUIRY under 2.4.x
> > > kernels. SCSI card is a Tekram DC390. Only inquiries to the DISK device cause a
> > > hang, others succeed.
> >
> > This appears to have something to do with tagged queueing on the disk drive.
> > If I disable tagged queueing for the disk, everything works fine. Note that
> > tagged queueing for the disk works ok when I mount the disk as a filesystem.
> >
> > However, both cdrecord and scanbus hang when writing an INQUIRY to /dev/sg0
> > (the scsi device corresponding to the disk). The system freezes either while
> > writing the INQUIRY command or *very* shortly thereafter. The test program I
> > wrote never gets so far as to issue the corresponding read.
> >
> > Obviously, the INQUIRY works when performed by the driver itself; it's just the
> > issueing of them via the SG driver that causes problems. I note that the driver
> > uses a special subroutine for issueing the INQUIRY command, and this routine
> > disables tagged queueing in the DCB. This routine isn't called when the INQUIRY
> > command is sent from userland via the SG driver.
> The mid-level issues an INQUIRY command during a bus scan.
>
> Bradley,
> There is a SCSI_IOCTL_TAGGED_DISABLE ioctl() supported by
> the SCSI mid level. So after opening a sg file descriptor
> and before sending an INQUIRY, you could try calling this
> ioctl().
>
> I am not confident that many adapter drivers take any notice
> of the Scsi_Device::tagged_queue flag, but it is worth a try.
> It is not obvious why sending a single INQUIRY which returns
> up to 256 bytes of data should be affected by the tagged
> queue settings. Do TEST UNIT READY commands work?
>
> Doug Gilbert
--
Bradley Broom
Research Scientist,
Center for High Performance Software, Rice University.
Email: [EMAIL PROTECTED], Phone: 713-348-6220
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]