[Prism54-devel] suggestion to shorten interrupt code path
Jean-Baptiste Note
jean-baptiste.note at wanadoo.fr
Fri Apr 22 08:33:20 UTC 2005
Hello Rainer,
I'm afraid of spitting out another dumb remark, but...
> [*] for instance, I happen to know one cause of 'mgmt timeouts'
> (device bug, sometimes asserts update but doesn't send data
> => little endian frame length converted to little endian
> a 2nd time => kmalloc failure in mgt_receive)
The XH8196 driver ( a buggy linux softmac driver from intersil that
someone got from a vendor of PCI cards ) has the following snippet of
code before accessing the control block (which is allocated as
_consistent_ ) :
/* flush the Control Block in the d-cache */
pci_map_single( ((struct pci_hif_local_data*)lp->hif_local_data)->pci_device,
((struct pci_hif_local_data*)lp->hif_local_data)->driver_mem_address,
sizeof(struct control_block), PCI_DMA_FROMDEVICE );
/* visit the queues */
/* unmap the Control Block memory */
pci_unmap_single( hif_lp->pci_device, hif_lp->device_host_address,
sizeof(struct control_block), PCI_DMA_FROMDEVICE );
>From what i understood, this should not be necessary for consistent
mappings. But i think they knew what they were doing, and they do it all
the same. Do you know / can you see if it would be a workaround for the
problem ?
You can find the exact file and code at the followin URL :
http://gxaafoot.homelinux.org/cgi-bin/archzoom.cgi/jean-baptiste.note@m4x.org--libre/XH8196--devo--0--base-0/module/sm_drv_pci.c
in the interrupt function (sm_drv_pci_interrupt).
Thanks,
JB
--
Jean-Baptiste Note
+33 (0)6 83 03 42 38
jean-baptiste.note at wanadoo.fr
More information about the Prism54-devel
mailing list