Paul Durrant 写道:
On 23/05/07, Johnny Cheung <[EMAIL PROTECTED]> wrote:

You have mentioned that you need to reset the h/w after the block_disable(). Could you leave the MSIs enable (without calling block_disable/block_enable)
while doing the h/w reset?

I tried that, but it's very difficult to avoid races between the
driver interrupt handler and certain data structures which go away
whilst the NIC is being reset. I really need to make sure that
interrupts don't happen during this time.
Typically, one general lock will help on this.
And for your issue, I recommend that you can use the legacy interrupt(Fixed interrupt) first, then to see if it can generate interrupts, then you can focus on the MSI related issues.

Thanks,
Jason

Actually according to the spec, clearing the
PCI_MSI_ENABLE_BIT will cause the device to trigger INTx interrupt instead of MSI. Thus, any interrupt generated after clearing the PCI_MSI_ENABLE_BIT
will likely be lost. Unless you have quiesced the device and make sure
no more
MSI will be generated, you should not call block_disable/ddi_intr_enable.

Yes, ordinarily I would quiesce interrupts at the device first.


Also from your debug output, I noticed that the device has two MSIs and
their
corresponding vectors are 0x62 and 0x63 after the first initial block
enable.
While the 2nd time, the MSIs have vectors 0x61 and 0x62 which are not
aligned
properly. There is a bug using the non-aligned based vector for multi-MSIs
but it was fixed in snv_44. Since you are using a much newer build, you
shouldn't
encounter this problem. Anyway, I will have to look into the codes and get back to you on this. In the mean time, just to make sure, instead of using
block_enable/block_disable, could you change that to
ddi_intr_enable/ddi_intr_disable
with a for loop? It should do the same job for you.


I can't use ddi_intr_disable/enable because the 'block' capability is
set, so these functions return DDI_EINVAL. It has to be a block
disable/enable.
I can work around the problem by tearing things down and re-allocating
the interrupt handles each time so it's not a showstopper for me; but
it does seem like a bug.

Paul


_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to