why OHCI driver behaves differently ?

> Hi all

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?

Thanks in advance,
srinivasa


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi all

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons I
found for the failure is due to RESET_PIPE right after enumeration of the
device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this kind
of errors ? Anybody has faced similar problems ? Is there any solution for
this problem ?

Thanks in advance,
srinivasa


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Mark

I am calling RESET_PIPE at PASSIVE_LEVEL only . It fails even If reverse the
order. It fails with an error Access violation . The call fails after
calling “IoCallDriver” and in the debugger it shows like below when I
stepped through the code :

usbdrv!TsUsb_ResetPipeInProcess+cb:
f4aaee8f 8bd3 mov edx,ebx
kd> p
Access violation - code c0000005 (!!! second chance !!!)
openhci+459:
eb2c0459 8b4920 mov ecx,[ecx+0x20]

any ideas what I can do next ?

Thanks in advance,
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Saturday, December 15, 2001 9:04 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

When you reverse the order, does the second one (the one that used to be
first) fail or does the first one fail (the one that used to be second)?

I would reexamine all the URB and IRP params very carefully.

Are they separately created IRPs and URB’s or are you recycling them?

Marc Reinig
System Solutions

-----Original Message-----

Hi Mark

I am calling RESET_PIPE at PASSIVE_LEVEL only . It fails even If reverse the
order. It fails with an error Access violation . The call fails after
calling “IoCallDriver” and in the debugger it shows like below when I
stepped through the code :

usbdrv!TsUsb_ResetPipeInProcess+cb:
f4aaee8f 8bd3 mov edx,ebx
kd> p
Access violation - code c0000005 (!!! second chance !!!)
openhci+459:
eb2c0459 8b4920 mov ecx,[ecx+0x20]

-----Original Message-----

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Mark

I found one more thing . If the Packet size is set to Zero , will the
“openhci.sys” fails ? It looks like when the Packet size is set to zero for
an end point , it is failing . I checked this by changing the values in the
enumeration table of the device and the one which was failing before is not
failing now .

Any ideas why it is happening ?

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Saturday, December 15, 2001 9:04 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

If you are talking about the MaxPacketSize of an endpoint, as set in the
Endpoint Descriptor, then 0 is specifically not allowed for Bulk or Control
(8,16,32,and 64 are the only valid values), and while it is not specifically
forbidden for interrupt or isochronous, it wouldn’t make any sense. How
would you transfer any data?

If you are not talking about the MaxPacketSize, you need to clarify what
Packet size and enumeration table you are talking about.

Marc Reinig
System Solutions

-----Original Message-----

I found one more thing . If the Packet size is set to Zero , will the
“openhci.sys” fails ? It looks like when the Packet size is set to zero for
an end point , it is failing . I checked this by changing the values in the
enumeration table of the device and the one which was failing before is not
failing now .

Any ideas why it is happening ?

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Saturday, December 15, 2001 9:04 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes, it’s TRUE.
Both OHCI and EHCI are failed.

----- Original Message -----
From: “Srinivasa Rao Deevi”
To: “NT Developers Interest List”
Sent: Sunday, December 16, 2001 9:52 AM
Subject: [ntdev] RE: why OHCI driver behaves differently ?

| Hi Mark
|
| I am calling RESET_PIPE at PASSIVE_LEVEL only . It fails even If reverse
the
| order. It fails with an error Access violation . The call fails after
| calling “IoCallDriver” and in the debugger it shows like below when I
| stepped through the code :
|
| usbdrv!TsUsb_ResetPipeInProcess+cb:
| f4aaee8f 8bd3 mov edx,ebx
| kd> p
| Access violation - code c0000005 (!!! second chance !!!)
| openhci+459:
| eb2c0459 8b4920 mov ecx,[ecx+0x20]
|
| any ideas what I can do next ?
|
| Thanks in advance,
| srinivasa
|
|
|
| -----Original Message-----
| From: Marc Reinig [mailto:xxxxx@pacbell.net]
| Sent: Saturday, December 15, 2001 9:04 AM
| To: NT Developers Interest List
| Subject: [ntdev] RE: why OHCI driver behaves differently ?
|
|
| Shrinivasa,
|
| Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
| Does anything change if you reverse the order in which you call the
| interfaces?
|
| Marc Reinig
| System Solutions
|
|
| -----Original Message-----
| From: xxxxx@lists.osr.com
| [mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi
|
| > I have developed a USB driver which works fine with the systems that has
| > UHCI drivers but fails with OHCI driver . The driver is tested with
Driver
| > Verifier Tool too . when the system crashed , the bluescreen points to
the
| > ‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The
reasons
| > I found for the failure is due to RESET_PIPE right after enumeration of
| > the device . I have two interfaces in the driver, it fails with the
second
| > interface pipes not with the first interface pipes . Another exception I
| > found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
| > Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
| > kind of errors ? Anybody has faced similar problems ? Is there any
| > solution for this problem ?
|
|
|
| —
| You are currently subscribed to ntdev as: xxxxx@microtune.com
| To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
|
| —
| You are currently subscribed to ntdev as: xxxxx@asix.com.tw
| To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
|


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Mark

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Intially it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Saturday, December 15, 2001 7:51 PM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

If you are talking about the MaxPacketSize of an endpoint, as set in the
Endpoint Descriptor, then 0 is specifically not allowed for Bulk or Control
(8,16,32,and 64 are the only valid values), and while it is not specifically
forbidden for interrupt or isochronous, it wouldn’t make any sense. How
would you transfer any data?

If you are not talking about the MaxPacketSize, you need to clarify what
Packet size and enumeration table you are talking about.

Marc Reinig
System Solutions

-----Original Message-----

I found one more thing . If the Packet size is set to Zero , will the
“openhci.sys” fails ? It looks like when the Packet size is set to zero for
an end point , it is failing . I checked this by changing the values in the
enumeration table of the device and the one which was failing before is not
failing now .

Any ideas why it is happening ?

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Saturday, December 15, 2001 9:04 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Shrinivasa,

Are you sure you are calling RESET_PIPE from PASSIVE_LEVEL in both cases?
Does anything change if you reverse the order in which you call the
interfaces?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi

I have developed a USB driver which works fine with the systems that has
UHCI drivers but fails with OHCI driver . The driver is tested with Driver
Verifier Tool too . when the system crashed , the bluescreen points to the
‘openhci.sys’ driver with KERNEL_MODE_EXCEPTION_NOT_HANDLED . The reasons
I found for the failure is due to RESET_PIPE right after enumeration of
the device . I have two interfaces in the driver, it fails with the second
interface pipes not with the first interface pipes . Another exception I
found is DRIVER_IRQL_NOT_LESS_OR_EQUAL . The driver has been tested with
Driver Verifier Tool with UHCI driver . Why OHCI driver is showing this
kind of errors ? Anybody has faced similar problems ? Is there any
solution for this problem ?


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You’re correct. A MaxPacketSize of zero is actually allright for both iso
and interrupt enpoints. It’s a way of telling the system no bandwidth is
currently required. Iso MaxPacketSize only needs to be <= 1023 bytes, full
speed interrupts need to be <=64 and low speed interrupts need to be <= 8.
None of them need to be a multiple of 8 and zero is OK

I assume your enpoints for each interface have different numbers. I.e.,
there is no sharing of endpoints between interfaces.

Marc Reinig
System Solutions

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains
interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Initially
it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a
problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

> If you are talking about the MaxPacketSize of an endpoint, as set in the
> Endpoint Descriptor, then 0 is specifically not allowed for Bulk or
Control
> (8,16,32,and 64 are the only valid values), and while it is not
specifically
> forbidden for interrupt or isochronous, it wouldn’t make any sense. How
> would you transfer any data?

> If you are not talking about the MaxPacketSize, you need to clarify what
> Packet size and enumeration table you are talking about.

> > I found one more thing . If the Packet size is set to Zero , will the
> > “openhci.sys” fails ? It looks like when the Packet size is set to
zero for
> > an end point , it is failing . I checked this by changing the values
in the
> > enumeration table of the device and the one which was failing before
is not
> > failing now .


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Marc

Thanks for the reply. All the end points have different numbers . There is
no sharing of end point numbers in two interfaces . I think that I did not
answer your question in my last mail regarding recycling of IRP’s and URB’s
. I am allocating new IRP and URB each time before resetting pipe . And I
checked the IRP and URB too, which contains the valid data before I call
IoCallDriver from my driver .

Can we assume that Openhci.sys is not working as “uhci.sys” is working ?

And Driver Verifier Tool works only with uhci.sys driver ? Because Verifier
Tool did not find any bugs with “uhci.sys” driver but it fails with
“openhci.sys” .

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 11:09 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

You’re correct. A MaxPacketSize of zero is actually allright for both iso
and interrupt enpoints. It’s a way of telling the system no bandwidth is
currently required. Iso MaxPacketSize only needs to be <= 1023 bytes, full
speed interrupts need to be <=64 and low speed interrupts need to be <= 8.
None of them need to be a multiple of 8 and zero is OK

I assume your enpoints for each interface have different numbers. I.e.,
there is no sharing of endpoints between interfaces.

Marc Reinig
System Solutions

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains
interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Initially
it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a
problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

> If you are talking about the MaxPacketSize of an endpoint, as set in the
> Endpoint Descriptor, then 0 is specifically not allowed for Bulk or
Control
> (8,16,32,and 64 are the only valid values), and while it is not
specifically
> forbidden for interrupt or isochronous, it wouldn’t make any sense. How
> would you transfer any data?

> If you are not talking about the MaxPacketSize, you need to clarify what
> Packet size and enumeration table you are talking about.

> > I found one more thing . If the Packet size is set to Zero , will the
> > “openhci.sys” fails ? It looks like when the Packet size is set to
zero for
> > an end point , it is failing . I checked this by changing the values
in the
> > enumeration table of the device and the one which was failing before
is not
> > failing now .


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For sure they do not work the same. However, one may be sensitive to a bug
in your code the other is not. Or it may indeed be a bug in OCHI or UHCI.

However, whenever I find myself assumng my problems are due to bugs in the
OS, I ask my friends to give me a good kick, so I can go back and find the
bugs in my code ;=)

Are you saying Driver Verifier did not find bugs in UHCI, but finds them
with OHCI or that you didn’t run Driver Verifier with OHCI and but your
driver failed when you did?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi
Sent: Monday, December 17, 2001 11:59 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Hi Marc

Thanks for the reply. All the end points have different numbers . There is
no sharing of end point numbers in two interfaces . I think that I did not
answer your question in my last mail regarding recycling of IRP’s and URB’s
. I am allocating new IRP and URB each time before resetting pipe . And I
checked the IRP and URB too, which contains the valid data before I call
IoCallDriver from my driver .

Can we assume that Openhci.sys is not working as “uhci.sys” is working ?

And Driver Verifier Tool works only with uhci.sys driver ? Because Verifier
Tool did not find any bugs with “uhci.sys” driver but it fails with
“openhci.sys” .

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 11:09 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

You’re correct. A MaxPacketSize of zero is actually allright for both iso
and interrupt enpoints. It’s a way of telling the system no bandwidth is
currently required. Iso MaxPacketSize only needs to be <= 1023 bytes, full
speed interrupts need to be <=64 and low speed interrupts need to be <= 8.
None of them need to be a multiple of 8 and zero is OK

I assume your enpoints for each interface have different numbers. I.e.,
there is no sharing of endpoints between interfaces.

Marc Reinig
System Solutions

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains
interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Initially
it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a
problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

> If you are talking about the MaxPacketSize of an endpoint, as set in the
> Endpoint Descriptor, then 0 is specifically not allowed for Bulk or
Control
> (8,16,32,and 64 are the only valid values), and while it is not
specifically
> forbidden for interrupt or isochronous, it wouldn’t make any sense. How
> would you transfer any data?

> If you are not talking about the MaxPacketSize, you need to clarify what
> Packet size and enumeration table you are talking about.

> > I found one more thing . If the Packet size is set to Zero , will the
> > “openhci.sys” fails ? It looks like when the Packet size is set to
zero for
> > an end point , it is failing . I checked this by changing the values
in the
> > enumeration table of the device and the one which was failing before
is not
> > failing now .


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Marc

Thanks for the reply . I agree with you . It makes sense before pointing
some thing wrong, better we check our driver first .
With out modifying driver on the Host , with just little modification
(Packet size changed to > 0 ) in the Firmware makes to work properly . That
made me to think may be OHCI driver at fault . I tried to reselect the
configuaration with Packet size as zero , still it was failing . I
understand that whenever packet size set to Zero, REsetting pipe always
fails.
Well, I don’t have any problem with Bulk and Interrupt end points . But when
I am working with Iso end points , Driver Verfier tool finds some errors
like DRIVER_IRQL_LESS_OR_NOT_EQUAL . This might be due to the way things are
handled in ohci and uhci drivers. I definitely agree with you said like
Driver Verifier tool is sensitive to ohci driver rather uhci driver .

My question is how can we believe these kind of tools , if they behave
differently with different kind of Host controller drivers ?

Could you please suggest what I should look for this kind of problems .

Thanks once again for your help .

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

For sure they do not work the same. However, one may be sensitive to a bug
in your code the other is not. Or it may indeed be a bug in OCHI or UHCI.

However, whenever I find myself assumng my problems are due to bugs in the
OS, I ask my friends to give me a good kick, so I can go back and find the
bugs in my code ;=)

Are you saying Driver Verifier did not find bugs in UHCI, but finds them
with OHCI or that you didn’t run Driver Verifier with OHCI and but your
driver failed when you did?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi
Sent: Monday, December 17, 2001 11:59 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Hi Marc

Thanks for the reply. All the end points have different numbers . There is
no sharing of end point numbers in two interfaces . I think that I did not
answer your question in my last mail regarding recycling of IRP’s and URB’s
. I am allocating new IRP and URB each time before resetting pipe . And I
checked the IRP and URB too, which contains the valid data before I call
IoCallDriver from my driver .

Can we assume that Openhci.sys is not working as “uhci.sys” is working ?

And Driver Verifier Tool works only with uhci.sys driver ? Because Verifier
Tool did not find any bugs with “uhci.sys” driver but it fails with
“openhci.sys” .

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 11:09 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

You’re correct. A MaxPacketSize of zero is actually allright for both iso
and interrupt enpoints. It’s a way of telling the system no bandwidth is
currently required. Iso MaxPacketSize only needs to be <= 1023 bytes, full
speed interrupts need to be <=64 and low speed interrupts need to be <= 8.
None of them need to be a multiple of 8 and zero is OK

I assume your enpoints for each interface have different numbers. I.e.,
there is no sharing of endpoints between interfaces.

Marc Reinig
System Solutions

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains
interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Initially
it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a
problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

> If you are talking about the MaxPacketSize of an endpoint, as set in the
> Endpoint Descriptor, then 0 is specifically not allowed for Bulk or
Control
> (8,16,32,and 64 are the only valid values), and while it is not
specifically
> forbidden for interrupt or isochronous, it wouldn’t make any sense. How
> would you transfer any data?

> If you are not talking about the MaxPacketSize, you need to clarify what
> Packet size and enumeration table you are talking about.

> > I found one more thing . If the Packet size is set to Zero , will the
> > “openhci.sys” fails ? It looks like when the Packet size is set to
zero for
> > an end point , it is failing . I checked this by changing the values
in the
> > enumeration table of the device and the one which was failing before
is not
> > failing now .


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Well, I don’t have any problem with Bulk and Interrupt end points . But
when

I am working with Iso end points , Driver Verfier tool finds some errors
like DRIVER_IRQL_LESS_OR_NOT_EQUAL . This might be due to the way things
are
handled in ohci and uhci drivers. I definitely agree with you said like
Driver Verifier tool is sensitive to ohci driver rather uhci driver .

My question is how can we believe these kind of tools , if they behave
differently with different kind of Host controller drivers ?

The tool is trying to tell you that you have a problem. The problem is
showing up with OHCI and not UHCI because they are different pieces of code,
probably written by different people and each handles things differently.
One is not sensitive to the problem you are introducing, the other is. But
I will bet, it is your code not OHCI.

Trust the tool. It is telling you you are doing something wrong. Go with
it. Find out what is causing DRIVER_IRQL_LESS_OR_NOT_EQUAL and fix it.
Could be a lot of things. Can’t tell without more info.

Marc Reinig
System Solutions

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

For sure they do not work the same. However, one may be sensitive to a bug
in your code the other is not. Or it may indeed be a bug in OCHI or UHCI.

However, whenever I find myself assumng my problems are due to bugs in the
OS, I ask my friends to give me a good kick, so I can go back and find the
bugs in my code ;=)

Are you saying Driver Verifier did not find bugs in UHCI, but finds them
with OHCI or that you didn’t run Driver Verifier with OHCI and but your
driver failed when you did?

Marc Reinig
System Solutions

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Srinivasa Rao Deevi
Sent: Monday, December 17, 2001 11:59 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

Hi Marc

Thanks for the reply. All the end points have different numbers . There is
no sharing of end point numbers in two interfaces . I think that I did not
answer your question in my last mail regarding recycling of IRP’s and URB’s
. I am allocating new IRP and URB each time before resetting pipe . And I
checked the IRP and URB too, which contains the valid data before I call
IoCallDriver from my driver .

Can we assume that Openhci.sys is not working as “uhci.sys” is working ?

And Driver Verifier Tool works only with uhci.sys driver ? Because Verifier
Tool did not find any bugs with “uhci.sys” driver but it fails with
“openhci.sys” .

Thanks in advance
srinivasa

-----Original Message-----
From: Marc Reinig [mailto:xxxxx@pacbell.net]
Sent: Monday, December 17, 2001 11:09 AM
To: NT Developers Interest List
Subject: [ntdev] RE: why OHCI driver behaves differently ?

You’re correct. A MaxPacketSize of zero is actually allright for both iso
and interrupt enpoints. It’s a way of telling the system no bandwidth is
currently required. Iso MaxPacketSize only needs to be <= 1023 bytes, full
speed interrupts need to be <=64 and low speed interrupts need to be <= 8.
None of them need to be a multiple of 8 and zero is OK

I assume your enpoints for each interface have different numbers. I.e.,
there is no sharing of endpoints between interfaces.

Marc Reinig
System Solutions

Thanks for the reply . Yes, I am talking about MaxPacketSize only .
Actually, I do have two interfaces , the first interface contains
interrupt
and Bulk end points , the second interface contains Iso end points with
multiple alternate settings . I do have different alternate settings
including MaxPacketSize set to zero as one alternate setting . Initially
it
would be set to Zero packet size later when the application sending some
data depending on the size the driver selects required alternate setting .
For Iso pipes , I use packet sizes like 0,9,17, 25 … etc. Is that a
problem
? Is there any requirement that it should be multiple of 8 for Iso end
points ?

> If you are talking about the MaxPacketSize of an endpoint, as set in the
> Endpoint Descriptor, then 0 is specifically not allowed for Bulk or
Control
> (8,16,32,and 64 are the only valid values), and while it is not
specifically
> forbidden for interrupt or isochronous, it wouldn’t make any sense. How
> would you transfer any data?

> If you are not talking about the MaxPacketSize, you need to clarify what
> Packet size and enumeration table you are talking about.

> > I found one more thing . If the Packet size is set to Zero , will the
> > “openhci.sys” fails ? It looks like when the Packet size is set to
zero for
> > an end point , it is failing . I checked this by changing the values
in the
> > enumeration table of the device and the one which was failing before
is not
> > failing now .


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pacbell.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com