Hello, This is my first iteration to make softing_cs driver compile under linux-2.6.33 kernel. Please not it just compiles. I had no way to verify actual operation yet.
The pcmcia_request_window() is postponed a little, as some flags must be set before this call (I believe). It is a small change, but with some noise in the patch. Oliver (or anyone else with a softing pcmcia card), are you able to verify this with a net-next-2.6 kernel? Otherwise, I'll have to see if I get it working. Signed-off-by: Kurt Van Dijck <[email protected]> --- Index: drivers/net/can/softing/softing_cs.c =================================================================== --- drivers/net/can/softing/softing_cs.c (revision 1144) +++ drivers/net/can/softing/softing_cs.c (working copy) @@ -356,21 +356,26 @@ csdev->win.Base = mem->win[0].host_addr; csdev->win.Size = mem->win[0].len; csdev->win.AccessSpeed = 0; - ret = pcmcia_request_window(&pdev, &csdev->win, &pdev->win); - if (ret) { - dev_alert(&pdev->dev, - "pcmcia_request_window() mismatch\n"); - goto do_next; - } /* softing specific: choose slower access for old cards */ if (sdev->desc->generation < 2) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) pdev->win->ctl.flags = MAP_ACTIVE | MAP_USE_WAIT; pdev->win->ctl.speed = 3; +#else + csdev->win.Attributes |= WIN_USE_WAIT; + csdev->win.AccessSpeed = 3; +#endif + } + ret = pcmcia_request_window(pdev, &csdev->win, &pdev->win); + if (ret) { + dev_alert(&pdev->dev, + "pcmcia_request_window() mismatch\n"); + goto do_next; } map.Page = 0; map.CardOffset = mem->win[0].card_addr; - if (pcmcia_map_mem_page(pdev->win, &map)) { + if (pcmcia_map_mem_page(pdev, pdev->win, &map)) { dev_alert(&pdev->dev, "pcmcia_map_mem_page() mismatch\n"); goto do_next_win; @@ -435,7 +440,9 @@ card->nbus = 2; /* pcmcia presets */ pcmcia->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) pcmcia->irq.IRQInfo1 = IRQ_LEVEL_ID; +#endif pcmcia->irq.Handler = 0; pcmcia->conf.Attributes = 0; pcmcia->conf.IntType = INT_MEMORY_AND_IO; _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
