siimage: fix wrong ->swdma_mask
[firefly-linux-kernel-4.4.55.git] / drivers / net / ucc_geth.c
index 60844a6f4928d8be1def7f3a1e406f0ec7102e28..16b9acdabbe8205af3d98f3c2b93ca25f0a133b6 100644 (file)
@@ -46,8 +46,9 @@
 
 #undef DEBUG
 
-#define DRV_DESC "QE UCC Gigabit Ethernet Controller version:Sept 11, 2006"
+#define DRV_DESC "QE UCC Gigabit Ethernet Controller"
 #define DRV_NAME "ucc_geth"
+#define DRV_VERSION "1.1"
 
 #define ugeth_printk(level, format, arg...)  \
         printk(level format "\n", ## arg)
@@ -2133,6 +2134,8 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
        }
        for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) {
                bd = ugeth->p_tx_bd_ring[i];
+               if (!bd)
+                       continue;
                for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) {
                        if (ugeth->tx_skbuff[i][j]) {
                                dma_unmap_single(NULL,
@@ -2300,6 +2303,10 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
        ug_info = ugeth->ug_info;
        uf_info = &ug_info->uf_info;
 
+       /* Create CQs for hash tables */
+       INIT_LIST_HEAD(&ugeth->group_hash_q);
+       INIT_LIST_HEAD(&ugeth->ind_hash_q);
+
        if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) ||
              (uf_info->bd_mem_part == MEM_PART_MURAM))) {
                ugeth_err("%s: Bad memory partition value.", __FUNCTION__);
@@ -3132,13 +3139,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
                for (j = 0; j < NUM_OF_PADDRS; j++)
                        ugeth_82xx_filtering_clear_addr_in_paddr(ugeth, (u8) j);
 
-               /* Create CQs for hash tables */
-               if (ug_info->maxGroupAddrInHash > 0) {
-                       INIT_LIST_HEAD(&ugeth->group_hash_q);
-               }
-               if (ug_info->maxIndAddrInHash > 0) {
-                       INIT_LIST_HEAD(&ugeth->ind_hash_q);
-               }
                p_82xx_addr_filt =
                    (struct ucc_geth_82xx_address_filtering_pram *) ugeth->
                    p_rx_glbl_pram->addressfiltering;
@@ -4007,4 +4007,5 @@ module_exit(ucc_geth_exit);
 
 MODULE_AUTHOR("Freescale Semiconductor, Inc");
 MODULE_DESCRIPTION(DRV_DESC);
+MODULE_VERSION(DRV_VERSION);
 MODULE_LICENSE("GPL");