Re: Help regarding DFU.



The WDFDEVICE created in DriverEntry is a KMDF driver object, not the NT
object. you do not want to reset the pipe, you want to reset the entire
device. I think you proably want to use
WdfUsbTargetDeviceCyclePortSynchronously to reset the device.

you probably want to download new firmware in EvtDevicePrepareHardware or
EvtDeviceD0Entry, most likely EvtDevicePrepareHardware though and then
immediately reset the device.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"zyx" <vidhya_542001@xxxxxxxxxxx> wrote in message
news:1166272288.627796.222700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have few more doubts.
I have found few things to reset the device
1.In the EvtDeviceD0Exit function which is registered in adddevice
callback function I have to reset the device.I havent started to
work.jus a idea.
2.In the EvtDeviceD0Exit function I have given
WdfUsbTargetPipeResetSynchronously or
WdfUsbTargetPipeFormatRequestForReset(dont know which exactly)followed
by wdfrequestsend.This should reset the device.Hope I am correct.
correct me if I am wrong.
IT WOULD BE GREAT IF YOU CLARIFY ALL MY DOUBTS.
THAKS IN ADVANCE


zyx wrote:
Hi Doron,
I have another doubt regarding driver entry routine.
The input parameter for that routine is driver object and registry
path.
what does the wdfdrivercreate function do.The documentation says that
it creates a driver object for calling the driver.what is the diff
between both the driver object.ie,the input parameter and the one
obtained by wdfdrivercreate method.
I am not able to get it.
Thanks in advance.

zyx wrote:
Hi Doron,
I have gone thru the KMDF architecture to an extent.I think so I can
pick up the remaining things while implementing it.Right now I need to
get the basic idea of what I should do.
My work is to upgrade the device firmware.I have gone thru USB Device
Firmware Upgrade Specification.
According to my understanding for upgrading the device,I need to reset
the device so that the next time the device enumerates as a DFU device.
WdfUsbTargetPipeFormatRequestForReset is a method I found in the
documentation to reset device.I dont know whether it is correct.correct
me if I am wrong.The spec for USB DFU says to reset the device.Does it
mean resetting the pipe,or someother thing which I dont know.
Does resetting the device take place in driver entry routine as the
driver gets loaded in driver entry routine.
My first aim is to upgrade.so I will be concentarting on the write path
rather than reading from the driver.
In the spec they have given that the firmware upgrdation takes place in
4 phases.
I am not able to get the function which takes place in enumeration
state.The question is ,
Is there anything special thing that happens only in DFU class driver
than other driver.Normally all the driver's first step is
enumeration.Do I need to do anything special in DFU.
It is said in the documentation that DFU class interface descriptor is
embbeded in the normal run time descriptor of the device.If this is
so,does all the usb drivers have support for DFU naturally.It is only
we who decide whether to do it or not.or should we modify anything in
the usb driver for it to support DFU class driver over it.
I am confused.
according to my understanding special thing that need to take place in
DFU is resetting the device so that it enumerates as DFU device.Once
upgrade is over again resetting it to normal mode.other functionalities
are similar to other drivers.either pass the IRP down the stack or
handle it.In this case I should concentrate the write path
ie,EvtIowritexxx funtion.
Could you clarify the above doubts.Am I in the right direction or
somewhere out of the line
I couldnt find more information regarding DFU in the net also.
Thanks in advance.




zyx wrote:
Hi Doron,
Thanks for your help.Right now I am going thru the KMDF architecture
and it details.
zyx
Doron Holan [MS] wrote:
i suggest you write your driver using KMDF, see
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx and then
download the
WDK.

are you writing the firmware to the device via a HID interface? I
don't
understand the connection between DFU and HID, they are 2 separate
concepts

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.


"zyx" <vidhya_542001@xxxxxxxxxxx> wrote in message
news:1166013047.977083.6370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
Can anyone provide me any links that help in writing DFU class
HID
driver.Any sample code such as framework.I dont know were to
start.I
need to upgrade the firmware of my usb device when required.
I am new to windows driver.I jus know the skeleton of the
driver,the
basic routines such driver entry,Add device routine,few dispatch
functionalities,not all etc.I jus know few terms in the driver
and how
it works.
My requirement is to write a DFU class HID driver for a usb
device.
My questions are:
How will I signal my usb device to re-enumerate.Is there any
IRP_MN_XXX
to reset the device.If so from where will I send this IRP to
re-enumerate the device.If it is an IRP_MN_XXX definitely it
should be
handled in dispatchpnp( ).what all this I need to take care if
that
particular IRP is send.
Basically I am confused.where to start.
Could anyone help me in providing a skeleton code for a DFU class
HID
driver
Thanks in advance.
It would be great if you help.
zyx




.



Relevant Pages

  • Re: Help regarding DFU.
    ... I have found few things to reset the device ... I have another doubt regarding driver entry routine. ... My work is to upgrade the device firmware.I have gone thru USB Device ... the device so that the next time the device enumerates as a DFU device. ...
    (microsoft.public.windowsxp.device_driver.dev)
  • [PATCH 21/39] input: Microtouch USB driver update
    ... Changed reset from standard USB dev reset to vendor reset ... driver on freshmeat ...
    (Linux-Kernel)
  • [PATCH]: Documentation: Updated PCI Error Recovery
    ... PCI error handling doc. ... PCI Error Recovery ... -errors, and to be notified of, and respond to, a reset sequence. ... +including multiple instances of a device driver on multi-function ...
    (Linux-Kernel)
  • Re: USB stack / configuration 0
    ... well there are plenty of dumb things about USB:) ... > DFU interface. ... > has changes, the device now offers endpoints etc), attach a driver. ... > USB Stack thee device needs to be re-enumerated. ...
    (freebsd-hackers)
  • Re: pci error recovery procedure
    ... I am reviewing the error handlers of e1000 driver and got some ideas. ... for a full electical reset of the card, instead, it wants to perform ... error_resume could take care of multi-function card. ...
    (Linux-Kernel)

Loading