DragonFly bugs List (threaded) for 2008-05
DragonFly BSD
DragonFly bugs List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: an0: device timeout on x31


From: Jost Tobias Springenberg <jspringe@xxxxxx>
Date: Sun, 18 May 2008 17:26:31 +0200

> BTW, is your card MPI350?  Its TX desc setup looks suspecious:
> ~line 2615 if_an.c
>                         for (i = 0; i < sizeof(an_tx_desc) / 4 ; i++) {
>                                 CSR_MEM_AUX_WRITE_4(sc, AN_TX_DESC_OFFSET
>                                     /* zero for now */
>                                     + (0 * sizeof(an_tx_desc))
>                                     + (i * 4),
>                                     ((u_int32_t*)&an_tx_desc)[i]);
>                         }
> 
> Physical address of the buffer is at the high end of the TX desc, but
> valid bit is at the low end of the TX desc, which means we tell
> hardware the TX desc is valid before we tell it the buffer's physical
> address.  This probably explains the watchdog timeout.
> 
> I think if your card is MPI350, you probably want to change the above code into:
>                         for (i = sizeof(an_tx_desc) / 4 - 1; i >= 0; --i) {
>                                 CSR_MEM_AUX_WRITE_4(sc, AN_TX_DESC_OFFSET
>                                     /* zero for now */
>                                     + (0 * sizeof(an_tx_desc))
>                                     + (i * 4),
>                                     ((u_int32_t*)&an_tx_desc)[i]);
>                         }
> 

Yes my card is MPI350 i applied your patch and also tried the changes you suggested:
freezes are gone but the timeout problem remains ..
I guess the card does not like the INTR bits :).
After pushing my previous patch back in I finally seem to have a working device!

Should I post a diff with all the changes, so that you can commit them back to HEAD ?
As far as I can see the changes should not affect anything else but MPI350.

Thanks for the great fast responses, I guess I never would have sorted it out all by myself :=).
You can now call yourselves the only bsd that has a MPI350 firmware friendly an driver, 
as it seems that neither FreeBSD nor NetBSD have a working solution right now (as far as i can tell reading their code), and OpenBSD did not even recognize my card.

Best Regards,
Tobias


-- 
Jost Tobias Springenberg <jspringe@uos.de>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]