Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 1999 07:39:35 -0700 (MST)
From:      Nick Hibma <hibma@skylink.it>
To:        FreeBSD SCSI Mailing List <scsi@freebsd.org>
Subject:   queues in CAM
Message-ID:  <Pine.BSF.3.96.991110070739.6087C-100000@henny.plazza.it>

next in thread | raw e-mail | index | archive | help

I'm trying to understand the queueing thing in CAM. The following code
fragment (which is found in all the SIMs)


        devq = cam_simq_alloc(MO /*maximum openings*/);
        sc->sim = cam_sim_alloc(umass_cam_action, umass_cam_poll,
				"umass", sc,
                                device_get_unit(sc->sc_dev),
				MDO /*max_dev_openings*/,
				MTDO /*max_tagged_dev_openings*/,
				devq);

confuses me. Are the MDO and MTDO values related to per device queues?
And is the MO value related to a per SIM queue?

The values in for example the dpt_scsi.c driver indicate that if 1
device has 255 tagged commands outstanding, it blocks the SIM from
accepting more requests. Or are requests transferred from the SIM queue
to the device queue as soon as the SIM accepts them?


Values for other drivers (random selection):

(MO = Maximum openings, MDO = Maximum Device Openings,
 MTDO = Maximum Tagged Device Openings)

dev/aic7xxx/aic7xxx.c: MO=MTDO=255, MDO=1
./dev/dpt/dpt_scsi.c: MO=MTDO=256, MDO=2
./dev/buslogic/bt.c: MO=MTDO+1=192, MDO=2
./dev/buslogic/bt.c: MO=192, MTDO=0, MDO=2 (tagged not supported)
./pci/ncr.c: MO=255, MTDO=32, MDO=1

In my case (dev/usb/umass.c, new version) should it be the following?

	MO=1, MDO=1, MTDO=0

USB Bulk-Only SIM has a maximum of one device and the device does not
support tagged command queueing. 


Any (partial) explanation would be appreciated.

Cheers,

Nick






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?Pine.BSF.3.96.991110070739.6087C-100000>