Re: Error : INVALID_PIPE_HANDLE on Interrupt pipe 0x81 (USB) by Sri
Sri
Thu Apr 28 01:48:04 CDT 2005
Hi,
I have one new observation related to this issue.
Till now I was testing the driver on win2k.
I tried the hardware and the same driver on "XP" platform and to my
surprise its working fine!!!.. I have NOT changed even a single line of code
in the driver and even the firmware is NOT changed!!!
I dont have any clue of what s happening. This driver is intended to be
used on either 2k or XP.
Plz help me out.
Execting some help.
Thanks,
Sri
"Sri" wrote:
> Hi,
> Thanks for the reply. I have one doubt. I know its about the hardware. But
> still am just posting it. Is there by any chance we have to do some
> additional configuration or something "extra" for USBN9603 board? Have u come
> across any such issues till now? Bcoz we have been using Cypress boards and
> we didnt have this issue. This is the first time am facing this problem.
> Moreover, the same driver is working "as - is" for a Cypress board.
> Expecting your reply.
>
> Thanks,
> Sri
>
> "Doron Holan [MS]" wrote:
>
> > looking over it quickly, it looks fine to me. you should start looking
> > around the code which sends the URB.
> >
> > 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.
> >
> >
> > "Sri" <Sri@discussions.microsoft.com> wrote in message
> > news:B2DB3B76-8440-4AE6-94EF-1D52BD9E1DF4@microsoft.com...
> > > Hi,
> > > Below am giving th code snippet that is done to read and parse the config
> > > desc.. Hope this will help to understand the prob..
> > >
> > > PUSB_CONFIGURATION_DESCRIPTOR configDes = NULL;
> > > Read the config desc...
> > >
> > > InterfaceDesc = USBD_ParseConfigurationDescriptorEx(configDes, configDes,
> > > -1, // Interested in any default interface.
> > > -1,
> > > -1,
> > > -1,
> > > -1);
> > >
> > > USBD_INTERFACE_LIST_ENTRY interfaces[2];
> > > PUSB_INTERFACE_DESCRIPTOR InterfaceDesc;
> > > interfaces[0].InterfaceDescriptor = InterfaceDesc;
> > > interfaces[0].Interface = NULL;
> > >
> > > interfaces[1].InterfaceDescriptor = NULL;
> > > interfaces[1].Interface = NULL;
> > >
> > > // Build an urb to select the configuration.
> > > urb = USBD_CreateConfigurationRequestEx(configDes, interfaces);
> > >
> > > if(!urb)
> > > {
> > > ...
> > > }
> > >
> > > interfaceInfo = &urb->UrbSelectConfiguration.Interface;
> > >
> > > for(uCounter=0; uCounter <
> > > interfaces[0].InterfaceDescriptor->bNumEndpoints;
> > > uCounter++)
> > > {
> > > interfaceInfo->Pipes[uCounter].MaximumTransferSize =
> > > MAX_TRANSFER_SIZE;
> > > }
> > >
> > > UsbBuildSelectConfigurationRequest(urb,
> > > (USHORT) urb->UrbHeader.Length,
> > > configDes);
> > >
> > > ntStatus = CallLowerDriver(fdo, urb);
> > >
> > > if(!NT_SUCCESS(ntStatus))
> > > {
> > > .....
> > > }
> > >
> > > // Save the configuration handle for this device
> > > pdx->hConfigHandle = urb->UrbSelectConfiguration.ConfigurationHandle;
> > >
> > > // Save the interface info for the current configuration.
> > > pdx->InterfaceInfo = ExAllocatePool(NonPagedPool,
> > > sizeof(USBD_INTERFACE_INFORMATION));
> > >
> > > RtlCopyMemory(pdx->InterfaceInfo, interfaceInfo,
> > > sizeof(USBD_INTERFACE_INFORMATION));
> > >
> > > // Dump the information..
> > > Print(("---------\n"));
> > > Print(("NumberOfPipes 0x%x\n", interfaceInfo->NumberOfPipes));
> > > Print(("Length 0x%x\n", interfaceInfo->Length));
> > > Print(("Alt Setting 0x%x\n", interfaceInfo->AlternateSetting));
> > > Print(("Interface Number 0x%x\n", interfaceInfo->InterfaceNumber));
> > > Print(("Class, subclass, protocol 0x%x 0x%x 0x%x\n",
> > > interfaceInfo->Class,
> > > interfaceInfo->SubClass,
> > > interfaceInfo->Protocol));
> > >
> > > for (uCounter = 0; uCounter < interfaceInfo->NumberOfPipes; uCounter++)
> > > {
> > > PUSBD_PIPE_INFORMATION pipeInformation;
> > >
> > > pipeInformation = &interfaceInfo->Pipes[uCounter];
> > >
> > > Print(("---------\n"));
> > > Print(("PipeType 0x%x\n", pipeInformation->PipeType));
> > > Print(("EndpointAddress 0x%x\n", pipeInformation->EndpointAddress));
> > > Print(("MaxPacketSize 0x%x\n", pipeInformation->MaximumPacketSize));
> > > Print(("Interval 0x%x\n", pipeInformation->Interval));
> > > Print(("Handle 0x%x\n", pipeInformation->PipeHandle));
> > > Print(("MaximumTransferSize 0x%x\n",
> > > pipeInformation->MaximumTransferSize));
> > >
> > > // Store the pipe handle for later use....
> > > if(pipeInformation->PipeType == USB_ENDPOINT_TYPE_INTERRUPT &&
> > > pipeInformation->EndpointAddress == 0x81)
> > > {
> > > pdx->hIntPipe = pipeInformation->PipeHandle;
> > > Print(("A valid handle : 0x%x is got to pipe
> > > %d\n",pipeInformation->PipeHandle, pipeInformation->EndpointAddress));
> > > }
> > > }
> > >
> > > Expecting some help...
> > >
> > > Thanks,
> > > Sri
> > >
> > > "Doron Holan [MS]" wrote:
> > >
> > >> how do you build the set config URB? what is the pipe handle value (ie
> > >> does
> > >> it look like a pointer)?
> > >>
> > >> 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.
> > >>
> > >>
> > >> "Sri" <Sri@discussions.microsoft.com> wrote in message
> > >> news:E1C03551-945E-4C90-8552-A5386BAB0C91@microsoft.com...
> > >> > Hi,
> > >> > I had developed a minidriver in DDK for a USB keyboard controller
> > >> > which
> > >> > supported polling for interrupt pipe on 0x81 and a vendor request -
> > >> > write
> > >> > operations. It was working fine. The development was done on Cypress
> > >> > FX2
> > >> > kit.
> > >> > Now I'm trying to use the same driver for USBN9603. But here am facing
> > >> > a
> > >> > prob. The enumeartion part is correct. Am able to do many transactions,
> > >> > like
> > >> > reading device desc, config desc, resetting the pipe etc, on the
> > >> > control
> > >> > endpoint. However if am starting any transaction on the pipe
> > >> > 0x81(Interrupt),
> > >> > the IRP is returning with the following error, ALWAYS :
> > >> > IRP error code : 0xc0000008
> > >> > URB error : 0x80000300
> > >> >
> > >> > The pipe handle is got from the 0x81 pipe's USBD_PIPE_INFORMATION
> > >> > structure
> > >> > only, while parsing the configuration descriptor.
> > >> >
> > >> > What could be wrong?
> > >> > I would appreciate any help on this matter.
> > >> >
> > >> > One more point is, the same driver has been working properly for
> > >> > another
> > >> > board based on Cypress FX2 board.
> > >> >
> > >> > Expecting help...
> > >> >
> > >> > Thanks
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >