/title>
aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/atm/fore200e.c
blob: f7d6ebaa0418fd2d877bda38d66d2d0a27188f83 (plain) (tree)
1
  























                                                                                    



                             








                              
                           








                          
                  

                            
                       














































                                                                                                

                                                                 

































































                                                                                            


                            


 














                                                                                                            
                                                                         




















                                                                                                        
                             


















































































































































                                                                                               
                               


























                                                                             



















                                                                   
                 

























































































































                                                                                                           
                    
































                                                                                  
                    






























































































                                                                                                 
                       

 
                  
 
                                                        



                            
                                                                   



                           
                                                                                                    
 

                                                 
 



                                                                                                            
    
                        

 
                                                                                                    
 
                                                 
 

                                                                                          
 
                                                              

 
                                                                                                           
 
                                                 
 
                                                                                                                
    
                                                                     

 
                                                                                                              
 
                                                 
 
                                                                                                                
 
                                                                        

 




                                                                                          
 
                                                 
 
                                                           
 


                                                                             
 

                                                                  
 
                                              
    
                 

 
                                            
                                                                                       
 
                                                 
 

                                                              

 
                                                              
 

                                                                                   

 
                                                            
 
                                                                                  

 
                                                           
 

                                                                                   

 
                                                         
 


                                                                        

 
                                                             
 

                                                 
 




                                                                                                
 



                                                                                    
 
                                                                                      
    
                                                                                               
 

                                                                              
 

                                                  
 

                                             

 
                                                         
 
                                                 
 




                                                                                 
 
                                                                   
 

                                                   

 
                                                                                           
 


                                                 
 



                                                             
 



                                                             
 

                                                                                 
    
                 

 
                                                                        
 

                                                 
 
                                                      
 

                                                                    
 
                        
























                                                                                    
                           




















































































































































































































                                                                                                     
                         





























































































































































                                                                                                                   
                                      















































































































































































                                                                                                                   
                                                                    















                                                                                                        
                                        
                                                                    
                                              
 
                                





                                                               
                                          



















                                                                              
                            































































                                                                                                           
                                        
                                                               
                                          







                                              
                        







































































































































































































                                                                                                                  
                                                                              













































                                                                                                  
                                                                                                          


























































































































                                                                                                         







                                                                               












                                                                             




























































                                                                                               
                                        
                                                                                        
                                              





                                                               
                                          














                                                       
                    

                                               
                                                                                                             


















                                                                                      
                    

                                           
                                                                                     






                                                  
                    


                      
                                                              

                                                                                          
                                                             




                                                                                   
                




             
                    

















                                                                                 
                                                                                    





















                                                                                                  
                                  





















                                                                 
                    





























































                                                                                                      
                    


























































                                                                                       
                    





























































                                                                                       
                    








































                                                                                        
                     












                                                                                            
                    






                                                                
                                    










































                                                                                
                     










                                                                                               
                    























                                                                                          
                     












                                                                                          




                          
 
                    




                                                     

                          







                                                                
                                                                




                                                           

                                                                                          


                   
                                        













                                                                                    







                                                                     

                                                                    
 
                                                                                                
                                                                             
                     




                                                                    
            
 


                               


 
                    

























                                                                           
                    













                                               
                                                 


























                                              
 




                                                        










































                                                                         
                                                         















                                                           
                 












                                                                                 
                                                            













































                                                                      





                                















                                                                             
                                            
 
                
 
                                                                                                
 




                                                                     
 
                 
                                                        

      



                                                           
 
                   

 
                                                
 
                 



                                                    
      

 

























                                                                    
                                                  



                                                    
                              





















































                                                                                                         

                                










































                                                                                         

                                                                           










                                                          






                                                                             









                                                         





                                                                           






                                                   


                                                                            














                                                            








                                                                                   














                                                           








                                                                                  









                                                                




                                                                          

































































                                                                                           
                                                   
                 
                                        







                                       










                             
                  
                                        







                                       













                              
                      








                                    
      
/*
  A FORE Systems 200E-series driver for ATM on Linux.
  Christophe Lizzi (lizzi@cnam.fr), October 1999-March 2003.

  Based on the PCA-200E driver from Uwe Dannowski (Uwe.Dannowski@inf.tu-dresden.de).

  This driver simultaneously supports PCA-200E and SBA-200E adapters
  on i386, alpha (untested), powerpc, sparc and sparc64 architectures.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/


#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/interrupt.h>
#include <linux/bitops.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/atmdev.h>
#include <linux/sonet.h>
#include <linux/atm_suni.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <asm/io.h>
#include <asm/string.h>
#include <asm/page.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>

#ifdef CONFIG_SBUS
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/idprom.h>
#include <asm/openprom.h>
#include <asm/oplib.h>
#include <asm/pgtable.h>
#endif

#if defined(CONFIG_ATM_FORE200E_USE_TASKLET) /* defer interrupt work to a tasklet */
#define FORE200E_USE_TASKLET
#endif

#if 0 /* enable the debugging code of the buffer supply queues */
#define FORE200E_BSQ_DEBUG
#endif

#if 1 /* ensure correct handling of 52-byte AAL0 SDUs expected by atmdump-like apps */
#define FORE200E_52BYTE_AAL0_SDU
#endif

#include "fore200e.h"
#include "suni.h"