tgec              270 drivers/net/ethernet/freescale/fman/fman_tgec.c static int check_init_parameters(struct fman_mac *tgec)
tgec              272 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (tgec->max_speed < SPEED_10000) {
tgec              276 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (tgec->addr == 0) {
tgec              280 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec->exception_cb) {
tgec              284 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec->event_cb) {
tgec              358 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct fman_mac *tgec = (struct fman_mac *)handle;
tgec              359 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              372 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_REM_FAULT);
tgec              374 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_LOC_FAULT);
tgec              376 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_TX_ECC_ER);
tgec              378 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_TX_FIFO_UNFL);
tgec              380 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_TX_FIFO_OVFL);
tgec              382 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_TX_ER);
tgec              384 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_FIFO_OVFL);
tgec              386 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_ECC_ER);
tgec              388 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_JAB_FRM);
tgec              390 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_OVRSZ_FRM);
tgec              392 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_RUNT_FRM);
tgec              394 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_FRAG_FRM);
tgec              396 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_LEN_ER);
tgec              398 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_CRC_ER);
tgec              400 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exception_cb(tgec->dev_id, FM_MAC_EX_10G_RX_ALIGN_ER);
tgec              403 drivers/net/ethernet/freescale/fman/fman_tgec.c static void free_init_resources(struct fman_mac *tgec)
tgec              405 drivers/net/ethernet/freescale/fman/fman_tgec.c 	fman_unregister_intr(tgec->fm, FMAN_MOD_MAC, tgec->mac_id,
tgec              409 drivers/net/ethernet/freescale/fman/fman_tgec.c 	free_hash_table(tgec->multicast_addr_hash);
tgec              410 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->multicast_addr_hash = NULL;
tgec              413 drivers/net/ethernet/freescale/fman/fman_tgec.c 	free_hash_table(tgec->unicast_addr_hash);
tgec              414 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->unicast_addr_hash = NULL;
tgec              426 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_enable(struct fman_mac *tgec, enum comm_mode mode)
tgec              428 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              431 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              444 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_disable(struct fman_mac *tgec, enum comm_mode mode)
tgec              446 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              449 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              462 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_set_promiscuous(struct fman_mac *tgec, bool new_val)
tgec              464 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              467 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              480 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_cfg_max_frame_len(struct fman_mac *tgec, u16 new_val)
tgec              482 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (is_init_done(tgec->cfg))
tgec              485 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->cfg->max_frame_length = new_val;
tgec              490 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_set_tx_pause_frames(struct fman_mac *tgec, u8 __maybe_unused priority,
tgec              493 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              495 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              503 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_accept_rx_pause_frames(struct fman_mac *tgec, bool en)
tgec              505 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              508 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              521 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_modify_mac_address(struct fman_mac *tgec, enet_addr_t *p_enet_addr)
tgec              523 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              526 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->addr = ENET_ADDR_TO_UINT64(*p_enet_addr);
tgec              527 drivers/net/ethernet/freescale/fman/fman_tgec.c 	set_mac_address(tgec->regs, (u8 *)(*p_enet_addr));
tgec              532 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_add_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr)
tgec              534 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              539 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              563 drivers/net/ethernet/freescale/fman/fman_tgec.c 		      &tgec->multicast_addr_hash->lsts[hash]);
tgec              569 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_set_allmulti(struct fman_mac *tgec, bool enable)
tgec              572 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              574 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              587 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->allmulti_enabled = enable;
tgec              592 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_set_tstamp(struct fman_mac *tgec, bool enable)
tgec              594 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              597 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              612 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_del_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr)
tgec              614 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              620 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              631 drivers/net/ethernet/freescale/fman/fman_tgec.c 	list_for_each(pos, &tgec->multicast_addr_hash->lsts[hash]) {
tgec              640 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec->allmulti_enabled) {
tgec              641 drivers/net/ethernet/freescale/fman/fman_tgec.c 		if (list_empty(&tgec->multicast_addr_hash->lsts[hash]))
tgec              649 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_get_version(struct fman_mac *tgec, u32 *mac_version)
tgec              651 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              653 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              661 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_set_exception(struct fman_mac *tgec,
tgec              664 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct tgec_regs __iomem *regs = tgec->regs;
tgec              667 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!is_init_done(tgec->cfg))
tgec              673 drivers/net/ethernet/freescale/fman/fman_tgec.c 			tgec->exceptions |= bit_mask;
tgec              675 drivers/net/ethernet/freescale/fman/fman_tgec.c 			tgec->exceptions &= ~bit_mask;
tgec              688 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_init(struct fman_mac *tgec)
tgec              694 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (is_init_done(tgec->cfg))
tgec              698 drivers/net/ethernet/freescale/fman/fman_tgec.c 	    (fman_reset_mac(tgec->fm, tgec->mac_id) != 0)) {
tgec              703 drivers/net/ethernet/freescale/fman/fman_tgec.c 	err = check_init_parameters(tgec);
tgec              707 drivers/net/ethernet/freescale/fman/fman_tgec.c 	cfg = tgec->cfg;
tgec              709 drivers/net/ethernet/freescale/fman/fman_tgec.c 	MAKE_ENET_ADDR_FROM_UINT64(tgec->addr, eth_addr);
tgec              710 drivers/net/ethernet/freescale/fman/fman_tgec.c 	set_mac_address(tgec->regs, (u8 *)eth_addr);
tgec              714 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (tgec->fm_rev_info.major <= 2)
tgec              715 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec->exceptions &= ~(TGEC_IMASK_REM_FAULT |
tgec              718 drivers/net/ethernet/freescale/fman/fman_tgec.c 	err = init(tgec->regs, cfg, tgec->exceptions);
tgec              720 drivers/net/ethernet/freescale/fman/fman_tgec.c 		free_init_resources(tgec);
tgec              726 drivers/net/ethernet/freescale/fman/fman_tgec.c 	err = fman_set_mac_max_frame(tgec->fm, tgec->mac_id,
tgec              730 drivers/net/ethernet/freescale/fman/fman_tgec.c 		free_init_resources(tgec);
tgec              735 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (tgec->fm_rev_info.major == 2) {
tgec              736 drivers/net/ethernet/freescale/fman/fman_tgec.c 		struct tgec_regs __iomem *regs = tgec->regs;
tgec              746 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->multicast_addr_hash = alloc_hash_table(TGEC_HASH_TABLE_SIZE);
tgec              747 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec->multicast_addr_hash) {
tgec              748 drivers/net/ethernet/freescale/fman/fman_tgec.c 		free_init_resources(tgec);
tgec              753 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->unicast_addr_hash = alloc_hash_table(TGEC_HASH_TABLE_SIZE);
tgec              754 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec->unicast_addr_hash) {
tgec              755 drivers/net/ethernet/freescale/fman/fman_tgec.c 		free_init_resources(tgec);
tgec              760 drivers/net/ethernet/freescale/fman/fman_tgec.c 	fman_register_intr(tgec->fm, FMAN_MOD_MAC, tgec->mac_id,
tgec              761 drivers/net/ethernet/freescale/fman/fman_tgec.c 			   FMAN_INTR_TYPE_ERR, tgec_err_exception, tgec);
tgec              764 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->cfg = NULL;
tgec              769 drivers/net/ethernet/freescale/fman/fman_tgec.c int tgec_free(struct fman_mac *tgec)
tgec              771 drivers/net/ethernet/freescale/fman/fman_tgec.c 	free_init_resources(tgec);
tgec              773 drivers/net/ethernet/freescale/fman/fman_tgec.c 	kfree(tgec->cfg);
tgec              774 drivers/net/ethernet/freescale/fman/fman_tgec.c 	kfree(tgec);
tgec              781 drivers/net/ethernet/freescale/fman/fman_tgec.c 	struct fman_mac *tgec;
tgec              787 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec = kzalloc(sizeof(*tgec), GFP_KERNEL);
tgec              788 drivers/net/ethernet/freescale/fman/fman_tgec.c 	if (!tgec)
tgec              794 drivers/net/ethernet/freescale/fman/fman_tgec.c 		tgec_free(tgec);
tgec              799 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->cfg = cfg;
tgec              803 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->regs = base_addr;
tgec              804 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->addr = ENET_ADDR_TO_UINT64(params->addr);
tgec              805 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->max_speed = params->max_speed;
tgec              806 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->mac_id = params->mac_id;
tgec              807 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->exceptions = (TGEC_IMASK_MDIO_SCAN_EVENT	|
tgec              822 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->exception_cb = params->exception_cb;
tgec              823 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->event_cb = params->event_cb;
tgec              824 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->dev_id = params->dev_id;
tgec              825 drivers/net/ethernet/freescale/fman/fman_tgec.c 	tgec->fm = params->fm;
tgec              828 drivers/net/ethernet/freescale/fman/fman_tgec.c 	fman_get_revision(tgec->fm, &tgec->fm_rev_info);
tgec              830 drivers/net/ethernet/freescale/fman/fman_tgec.c 	return tgec;
tgec               39 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_set_promiscuous(struct fman_mac *tgec, bool new_val);
tgec               40 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_modify_mac_address(struct fman_mac *tgec, enet_addr_t *enet_addr);
tgec               41 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_cfg_max_frame_len(struct fman_mac *tgec, u16 new_val);
tgec               42 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_enable(struct fman_mac *tgec, enum comm_mode mode);
tgec               43 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_disable(struct fman_mac *tgec, enum comm_mode mode);
tgec               44 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_init(struct fman_mac *tgec);
tgec               45 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_free(struct fman_mac *tgec);
tgec               46 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_accept_rx_pause_frames(struct fman_mac *tgec, bool en);
tgec               47 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_set_tx_pause_frames(struct fman_mac *tgec, u8 priority,
tgec               49 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_set_exception(struct fman_mac *tgec,
tgec               51 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_add_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr);
tgec               52 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_del_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr);
tgec               53 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_get_version(struct fman_mac *tgec, u32 *mac_version);
tgec               54 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_set_allmulti(struct fman_mac *tgec, bool enable);
tgec               55 drivers/net/ethernet/freescale/fman/fman_tgec.h int tgec_set_tstamp(struct fman_mac *tgec, bool enable);