I may be stating the obvious but AFAIK spt requests can be directed to
either disk(or other FDOs) or port instances. If directed to disk, you
don’t need to pass in PTL because disk class driver already knows PTL.
If directed to port, you need to supply the PTL thereby telling the port
as to which lun do you want to send the command.
Harish
-----Original Message-----
From: Mark Roddy [mailto:xxxxx@hollistech.com]
Sent: Wednesday, September 09, 2009 10:06 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SCSI passthrough target/path/lun data
Offhand PTL is inferred from the target device object. If I recall
correctly, a long time ago SPT used to go to the HBA FDO and the
caller had to specify the device address in the request. Then it got
changed to go directly to the device FDO and in the process PTL in the
request became irrelevant.
You can ask the device FDO what its PTL is.
"This structure includes a SCSI CDB, which must be initialized by the
caller except for the path, target ID, and LUN, which are filled in by
the port driver. " some version or other of the WDK docs, the sample
of course ignores this advice just to confuse the innocent.
Mark Roddy
On Tue, Sep 8, 2009 at 12:00 PM, <ben.simpson> wrote:
> Ok, thanks I’ve got that sorted now, using another completion routine
for the IRP_MJ_SCSIs. Going back to the original problem I had with the
PTL info, I’ve now realised that the info I’m capturing from the
SCSI_PASS_THROUGH_DIRECT structure isn’t correct. The numbers are almost
random every time for different devices, it was just that the original
devices I was testing with happened to throw out the correct numbers by
coincidence. Now that I’ve hooked up more devices I’ve found the PTL
info is not changing between devices, I think the numbers I’m seeing are
ones left on the stack from previous commands…
>
> Can someone help advise why these numbers are not being set correctly,
either in the initial IRP_MJ_DEVICE_CONTROL’s, or the completion routine
for these IRPs? Whilst I implemented the suggested fix of passing the
PTL info using the Context parameter of the IoSetCompletionRoutine call,
I have also tested for the correct PTL info being set in the completion
routine, but no luck.
>
>
> Thanks,
>
> Ben
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</ben.simpson>