Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2002 13:38:34 +0500
From:      Andrey Valik <vav@papillon.ru>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: transmission speed
Message-ID:  <3DD20F8A.E594AACE@papillon.ru>
References:  <Pine.BSF.4.21.0211122253210.38177-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Nate Lawson wrote:
> 
> On Wed, 13 Nov 2002, Andrey Valik wrote:
> > Nate Lawson wrote:
> > >
> > > On Tue, 12 Nov 2002, Andrey Valik wrote:
> > > > Hello!
> > > >
> > > > I have a SCSI target mode driver that emulate scanner, but transmission
> > > > speed  is 20Mb/sec.
> > > > Both SCSI cards is Adaptec 19160. What I must do to speedup ?
> > >
> > > Are you using the freebsd target driver, both usermode and kernel
> > > driver?  (i.e. sys/cam/scsi_target.c and /usr/share/examples/scsi_target)
> >
> > Yes, modificated by myself version from FreeBSD 4.5.
> > scsi_target.c version 1.22.2.6 2001/03/05.
> 
> So when you do a rescan, you get a device of type "FreeBSD TM-PT"?
> 
It was before modification. I need emulate scanner AGFA, 

intialization of inq_data:

  softc->inq_data->device = T_SCANNER | (SID_QUAL_LU_CONNECTED << 5);
  softc->inq_data->version = 2;
  softc->inq_data->response_format = 2; /* SCSI2 Inquiry Format */
  softc->inq_data->additional_length = 0x5B;
  strncpy(softc->inq_data->vendor, "AGFA           ", SID_VENDOR_SIZE);
  strncpy(softc->inq_data->product, "DUOSCAN T1200         ", SID_PRODUCT_SIZE);
  strncpy(softc->inq_data->revision, "1.30        ", SID_REVISION_SIZE);

  softc->inq_data->flags &= ~(PI_SDTR_ABLE|PI_WIDE_16|PI_WIDE_32|PI_TAG_ABLE);
  softc->inq_data->flags |= (cpi->hba_inquiry &
(PI_SDTR_ABLE|PI_WIDE_16|PI_WIDE_32|PI_TAG_ABLE));


The second PC is windows and linux - the same speed 20Mb/s.

> > > If so, it only advertises it is capable of async transfers, so set SYNC
> > > and WIDE16 in the inquiry response.
> >
> > I maked this before, but in this case I have 20Mb/s. I think, that I will need to write scsi
> > negotiation, or may be
> > it's already writed in the next versions of scsi_target ?
> 
> If you modify /sys/cam/scsi/scsi_target.c where it allocates inquiry data
> to announce sync + wide16 (see the SCSI specs at t10.org), the
> ahc(4) driver should perform the appropriate negotiation for you at the
> initiatior's request.

wide16 - PI_WIDE_16
sync - ???? (May be problem in this place ?)

-- 
Andrey V. Valik
Papillon Systems
Mailto:vav@papillon.ru

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DD20F8A.E594AACE>