Commit 890de95e authored by Li Yang's avatar Li Yang Committed by Jeff Garzik

ucc_geth: add support to netif message level

Adds netif message level control to the ucc_geth driver.  The level can
be set by module parameter and ethtool.
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent ac421852
......@@ -60,11 +60,19 @@
#else
#define ugeth_vdbg(fmt, args...) do { } while (0)
#endif /* UGETH_VERBOSE_DEBUG */
#define UGETH_MSG_DEFAULT (NETIF_MSG_IFUP << 1 ) - 1
void uec_set_ethtool_ops(struct net_device *netdev);
static DEFINE_SPINLOCK(ugeth_lock);
static struct {
u32 msg_enable;
} debug = { -1 };
module_param_named(debug, debug.msg_enable, int, 0);
MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 0xffff=all)");
static struct ucc_geth_info ugeth_primary_info = {
.uf_info = {
.bd_mem_part = MEM_PART_SYSTEM,
......@@ -282,6 +290,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth,
for (i = 0; i < num_entries; i++) {
if ((snum = qe_get_snum()) < 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("fill_init_enet_entries: Can not get SNUM.");
return snum;
}
......@@ -292,8 +301,8 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth,
init_enet_offset =
qe_muram_alloc(thread_size, thread_alignment);
if (IS_ERR_VALUE(init_enet_offset)) {
ugeth_err
("fill_init_enet_entries: Can not allocate DPRAM memory.");
if (netif_msg_ifup(ugeth))
ugeth_err("fill_init_enet_entries: Can not allocate DPRAM memory.");
qe_put_snum((u8) snum);
return -ENOMEM;
}
......@@ -1487,8 +1496,8 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth)
ret_val = init_preamble_length(ug_info->prel, &ug_regs->maccfg2);
if (ret_val != 0) {
ugeth_err
("%s: Preamble length must be between 3 and 7 inclusive.",
if (netif_msg_probe(ugeth))
ugeth_err("%s: Preamble length must be between 3 and 7 inclusive.",
__FUNCTION__);
return ret_val;
}
......@@ -1727,6 +1736,7 @@ static int ugeth_enable(struct ucc_geth_private *ugeth, enum comm_dir mode)
/* check if the UCC number is in range. */
if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: ucc_num out of range.", __FUNCTION__);
return -EINVAL;
}
......@@ -1755,6 +1765,7 @@ static int ugeth_disable(struct ucc_geth_private * ugeth, enum comm_dir mode)
/* check if the UCC number is in range. */
if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: ucc_num out of range.", __FUNCTION__);
return -EINVAL;
}
......@@ -2307,7 +2318,9 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
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__);
if (netif_msg_probe(ugeth))
ugeth_err("%s: Bad memory partition value.",
__FUNCTION__);
return -EINVAL;
}
......@@ -2316,9 +2329,10 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
if ((ug_info->bdRingLenRx[i] < UCC_GETH_RX_BD_RING_SIZE_MIN) ||
(ug_info->bdRingLenRx[i] %
UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT)) {
if (netif_msg_probe(ugeth))
ugeth_err
("%s: Rx BD ring length must be multiple of 4,"
" no smaller than 8.", __FUNCTION__);
("%s: Rx BD ring length must be multiple of 4, no smaller than 8.",
__FUNCTION__);
return -EINVAL;
}
}
......@@ -2326,6 +2340,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
/* Tx BD lengths */
for (i = 0; i < ug_info->numQueuesTx; i++) {
if (ug_info->bdRingLenTx[i] < UCC_GETH_TX_BD_RING_SIZE_MIN) {
if (netif_msg_probe(ugeth))
ugeth_err
("%s: Tx BD ring length must be no smaller than 2.",
__FUNCTION__);
......@@ -2336,6 +2351,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
/* mrblr */
if ((uf_info->max_rx_buf_length == 0) ||
(uf_info->max_rx_buf_length % UCC_GETH_MRBLR_ALIGNMENT)) {
if (netif_msg_probe(ugeth))
ugeth_err
("%s: max_rx_buf_length must be non-zero multiple of 128.",
__FUNCTION__);
......@@ -2344,12 +2360,14 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
/* num Tx queues */
if (ug_info->numQueuesTx > NUM_TX_QUEUES) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: number of tx queues too large.", __FUNCTION__);
return -EINVAL;
}
/* num Rx queues */
if (ug_info->numQueuesRx > NUM_RX_QUEUES) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: number of rx queues too large.", __FUNCTION__);
return -EINVAL;
}
......@@ -2357,6 +2375,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
/* l2qt */
for (i = 0; i < UCC_GETH_VLAN_PRIORITY_MAX; i++) {
if (ug_info->l2qt[i] >= ug_info->numQueuesRx) {
if (netif_msg_probe(ugeth))
ugeth_err
("%s: VLAN priority table entry must not be"
" larger than number of Rx queues.",
......@@ -2368,6 +2387,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
/* l3qt */
for (i = 0; i < UCC_GETH_IP_PRIORITY_MAX; i++) {
if (ug_info->l3qt[i] >= ug_info->numQueuesRx) {
if (netif_msg_probe(ugeth))
ugeth_err
("%s: IP priority table entry must not be"
" larger than number of Rx queues.",
......@@ -2377,6 +2397,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
}
if (ug_info->cam && !ug_info->ecamptr) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: If cam mode is chosen, must supply cam ptr.",
__FUNCTION__);
return -EINVAL;
......@@ -2385,6 +2406,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
if ((ug_info->numStationAddresses !=
UCC_GETH_NUM_OF_STATION_ADDRESSES_1)
&& ug_info->rxExtendedFiltering) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: Number of station addresses greater than 1 "
"not allowed in extended parsing mode.",
__FUNCTION__);
......@@ -2400,6 +2422,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
uf_info->uccm_mask |= (UCCE_TXBF_SINGLE_MASK << i);
/* Initialize the general fast UCC block. */
if (ucc_fast_init(uf_info, &ugeth->uccf)) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: Failed to init uccf.", __FUNCTION__);
ucc_geth_memclean(ugeth);
return -ENOMEM;
......@@ -2453,7 +2476,9 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
numThreadsRxNumerical = 8;
break;
default:
ugeth_err("%s: Bad number of Rx threads value.", __FUNCTION__);
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Bad number of Rx threads value.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
return -EINVAL;
break;
......@@ -2476,7 +2501,9 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
numThreadsTxNumerical = 8;
break;
default:
ugeth_err("%s: Bad number of Tx threads value.", __FUNCTION__);
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Bad number of Tx threads value.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
return -EINVAL;
break;
......@@ -2528,6 +2555,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
ug_info->backToBackInterFrameGap,
&ug_regs->ipgifg);
if (ret_val != 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: IPGIFG initialization parameter too large.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -2545,6 +2573,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
ug_info->collisionWindow,
&ug_regs->hafdup);
if (ret_val != 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Half Duplex initialization parameter too large.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -2598,6 +2627,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
tx_bd_ring_offset[j]);
}
if (!ugeth->p_tx_bd_ring[j]) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate memory for Tx bd rings.",
__FUNCTION__);
......@@ -2633,6 +2663,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
rx_bd_ring_offset[j]);
}
if (!ugeth->p_rx_bd_ring[j]) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate memory for Rx bd rings.",
__FUNCTION__);
......@@ -2649,6 +2680,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
GFP_KERNEL);
if (ugeth->tx_skbuff[j] == NULL) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Could not allocate tx_skbuff",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -2680,6 +2712,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
GFP_KERNEL);
if (ugeth->rx_skbuff[j] == NULL) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Could not allocate rx_skbuff",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -2712,6 +2745,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
qe_muram_alloc(sizeof(struct ucc_geth_tx_global_pram),
UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->tx_glbl_pram_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_tx_glbl_pram.",
__FUNCTION__);
......@@ -2734,6 +2768,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
32 * (numThreadsTxNumerical == 1),
UCC_GETH_THREAD_DATA_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->thread_dat_tx_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_thread_data_tx.",
__FUNCTION__);
......@@ -2762,6 +2797,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
sizeof(struct ucc_geth_send_queue_qd),
UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->send_q_mem_reg_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_send_q_mem_reg.",
__FUNCTION__);
......@@ -2805,6 +2841,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
qe_muram_alloc(sizeof(struct ucc_geth_scheduler),
UCC_GETH_SCHEDULER_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->scheduler_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_scheduler.",
__FUNCTION__);
......@@ -2853,9 +2890,11 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
(struct ucc_geth_tx_firmware_statistics_pram),
UCC_GETH_TX_STATISTICS_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->tx_fw_statistics_pram_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for"
" p_tx_fw_statistics_pram.", __FUNCTION__);
" p_tx_fw_statistics_pram.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
return -ENOMEM;
}
......@@ -2892,6 +2931,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
qe_muram_alloc(sizeof(struct ucc_geth_rx_global_pram),
UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->rx_glbl_pram_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_rx_glbl_pram.",
__FUNCTION__);
......@@ -2913,6 +2953,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
sizeof(struct ucc_geth_thread_data_rx),
UCC_GETH_THREAD_DATA_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->thread_dat_rx_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_thread_data_rx.",
__FUNCTION__);
......@@ -2936,6 +2977,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
(struct ucc_geth_rx_firmware_statistics_pram),
UCC_GETH_RX_STATISTICS_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->rx_fw_statistics_pram_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for"
" p_rx_fw_statistics_pram.", __FUNCTION__);
......@@ -2958,6 +3000,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
sizeof(struct ucc_geth_rx_interrupt_coalescing_entry)
+ 4, UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->rx_irq_coalescing_tbl_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for"
" p_rx_irq_coalescing_tbl.", __FUNCTION__);
......@@ -3026,6 +3069,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
sizeof(struct ucc_geth_rx_prefetched_bds)),
UCC_GETH_RX_BD_QUEUES_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->rx_bd_qs_tbl_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_rx_bd_qs_tbl.",
__FUNCTION__);
......@@ -3103,6 +3147,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
/* initialize extended filtering */
if (ug_info->rxExtendedFiltering) {
if (!ug_info->extendedFilteringChainPointer) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Null Extended Filtering Chain Pointer.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -3115,6 +3160,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
qe_muram_alloc(sizeof(struct ucc_geth_exf_global_pram),
UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT);
if (IS_ERR_VALUE(ugeth->exf_glbl_param_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for"
" p_exf_glbl_param.", __FUNCTION__);
......@@ -3162,6 +3208,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
*/
if (!(ugeth->p_init_enet_param_shadow =
kmalloc(sizeof(struct ucc_geth_init_pram), GFP_KERNEL))) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate memory for"
" p_UccInitEnetParamShadows.", __FUNCTION__);
......@@ -3197,6 +3244,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_8_BYTES)
&& (ug_info->largestexternallookupkeysize !=
QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_16_BYTES)) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Invalid largest External Lookup Key Size.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -3223,6 +3271,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
/* Rx needs one extra for terminator */
, size, UCC_GETH_THREAD_RX_PRAM_ALIGNMENT,
ug_info->riscRx, 1)) != 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Can not fill p_init_enet_param_shadow.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -3238,6 +3287,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
sizeof(struct ucc_geth_thread_tx_pram),
UCC_GETH_THREAD_TX_PRAM_ALIGNMENT,
ug_info->riscTx, 0)) != 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Can not fill p_init_enet_param_shadow.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -3247,6 +3297,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
/* Load Rx bds with buffers */
for (i = 0; i < ug_info->numQueuesRx; i++) {
if ((ret_val = rx_bd_buffer_set(ugeth, (u8) i)) != 0) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Can not fill Rx bds with buffers.",
__FUNCTION__);
ucc_geth_memclean(ugeth);
......@@ -3257,6 +3308,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
/* Allocate InitEnet command parameter structure */
init_enet_pram_offset = qe_muram_alloc(sizeof(struct ucc_geth_init_pram), 4);
if (IS_ERR_VALUE(init_enet_pram_offset)) {
if (netif_msg_ifup(ugeth))
ugeth_err
("%s: Can not allocate DPRAM memory for p_init_enet_pram.",
__FUNCTION__);
......@@ -3429,7 +3481,8 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
if (!skb ||
(!(bd_status & (R_F | R_L))) ||
(bd_status & R_ERRORS_FATAL)) {
ugeth_vdbg("%s, %d: ERROR!!! skb - 0x%08x",
if (netif_msg_rx_err(ugeth))
ugeth_err("%s, %d: ERROR!!! skb - 0x%08x",
__FUNCTION__, __LINE__, (u32) skb);
if (skb)
dev_kfree_skb_any(skb);
......@@ -3459,6 +3512,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
skb = get_new_skb(ugeth, bd);
if (!skb) {
if (netif_msg_rx_err(ugeth))
ugeth_warn("%s: No Rx Data Buffer", __FUNCTION__);
ugeth->stats.rx_dropped++;
break;
......@@ -3650,6 +3704,7 @@ static int ucc_geth_open(struct net_device *dev)
/* Test station address */
if (dev->dev_addr[0] & ENET_GROUP_ADDR) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Multicast address used for station address"
" - is this what you wanted?", __FUNCTION__);
return -EINVAL;
......@@ -3657,12 +3712,14 @@ static int ucc_geth_open(struct net_device *dev)
err = ucc_struct_init(ugeth);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot configure internal struct, aborting.", dev->name);
return err;
}
err = ucc_geth_startup(ugeth);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot configure net device, aborting.",
dev->name);
return err;
......@@ -3670,6 +3727,7 @@ static int ucc_geth_open(struct net_device *dev)
err = adjust_enet_interface(ugeth);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot configure net device, aborting.",
dev->name);
return err;
......@@ -3688,6 +3746,7 @@ static int ucc_geth_open(struct net_device *dev)
err = init_phy(dev);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot initialize PHY, aborting.", dev->name);
return err;
}
......@@ -3698,6 +3757,7 @@ static int ucc_geth_open(struct net_device *dev)
request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, 0,
"UCC Geth", dev);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot get IRQ for net device, aborting.",
dev->name);
ucc_geth_stop(ugeth);
......@@ -3706,6 +3766,7 @@ static int ucc_geth_open(struct net_device *dev)
err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot enable net device, aborting.", dev->name);
ucc_geth_stop(ugeth);
return err;
......@@ -3789,6 +3850,13 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
return -ENODEV;
ug_info = &ugeth_info[ucc_num];
if (ug_info == NULL) {
if (netif_msg_probe(&debug))
ugeth_err("%s: [%d] Missing additional data!",
__FUNCTION__, ucc_num);
return -ENODEV;
}
ug_info->uf_info.ucc_num = ucc_num;
prop = of_get_property(np, "rx-clock", NULL);
......@@ -3867,16 +3935,11 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ug_info->mdio_bus = res.start;
if (netif_msg_probe(&debug))
printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d) \n",
ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs,
ug_info->uf_info.irq);
if (ug_info == NULL) {
ugeth_err("%s: [%d] Missing additional data!", __FUNCTION__,
ucc_num);
return -ENODEV;
}
/* Create an ethernet device instance */
dev = alloc_etherdev(sizeof(*ugeth));
......@@ -3910,12 +3973,13 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
dev->mtu = 1500;
dev->set_multicast_list = ucc_geth_set_multi;
ugeth->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1;
ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT);
ugeth->phy_interface = phy_interface;
ugeth->max_speed = max_speed;
err = register_netdev(dev);
if (err) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: Cannot register net device, aborting.",
dev->name);
free_netdev(dev);
......@@ -3971,6 +4035,7 @@ static int __init ucc_geth_init(void)
if (ret)
return ret;
if (netif_msg_drv(&debug))
printk(KERN_INFO "ucc_geth: " DRV_DESC "\n");
for (i = 0; i < 8; i++)
memcpy(&(ugeth_info[i]), &ugeth_primary_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment