Пример #1
0
void emac_serr_dump_0(struct net_device *dev)
{
	struct ibm_ocp_mal *mal = ((struct ocp_enet_private *)dev->priv)->mal;
	unsigned long int mal_error, plb_error, plb_addr;

	mal_error = get_mal_dcrn(mal, DCRN_MALESR);
	printk(KERN_DEBUG "ppc405_eth_serr: %s channel %ld \n",
	       (mal_error & 0x40000000) ? "Receive" :
	       "Transmit", (mal_error & 0x3e000000) >> 25);
	printk(KERN_DEBUG "  -----  latched error  -----\n");
	if (mal_error & MALESR_DE)
		printk(KERN_DEBUG "  DE: descriptor error\n");
	if (mal_error & MALESR_OEN)
		printk(KERN_DEBUG "  ONE: OPB non-fullword error\n");
	if (mal_error & MALESR_OTE)
		printk(KERN_DEBUG "  OTE: OPB timeout error\n");
	if (mal_error & MALESR_OSE)
		printk(KERN_DEBUG "  OSE: OPB slave error\n");

	if (mal_error & MALESR_PEIN) {
		plb_error = mfdcr(DCRN_PLB0_BESR);
		printk(KERN_DEBUG
		       "  PEIN: PLB error, PLB0_BESR is 0x%x\n",
		       (unsigned int)plb_error);
		plb_addr = mfdcr(DCRN_PLB0_BEAR);
		printk(KERN_DEBUG
		       "  PEIN: PLB error, PLB0_BEAR is 0x%x\n",
		       (unsigned int)plb_addr);
	}
}
Пример #2
0
void emac_serr_dump_1(struct net_device *dev)
{
	struct ibm_ocp_mal *mal = ((struct ocp_enet_private *)dev->priv)->mal;
	int mal_error = get_mal_dcrn(mal, DCRN_MALESR);

	printk(KERN_DEBUG "  -----  cumulative errors  -----\n");
	if (mal_error & MALESR_DEI)
		printk(KERN_DEBUG "  DEI: descriptor error interrupt\n");
	if (mal_error & MALESR_ONEI)
		printk(KERN_DEBUG "  OPB non-fullword error interrupt\n");
	if (mal_error & MALESR_OTEI)
		printk(KERN_DEBUG "  OTEI: timeout error interrupt\n");
	if (mal_error & MALESR_OSEI)
		printk(KERN_DEBUG "  OSEI: slave error interrupt\n");
	if (mal_error & MALESR_PBEI)
		printk(KERN_DEBUG "  PBEI: PLB bus error interrupt\n");
}
Пример #3
0
static void emac_mal_dump(struct mal_instance *mal)
{
	int i;

	printk("** MAL %s Registers **\n"
	       "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n"
	       "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n"
	       "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n",
	       mal->ofdev->node->full_name,
	       get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR),
	       get_mal_dcrn(mal, MAL_IER),
	       get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR),
	       get_mal_dcrn(mal, MAL_TXEOBISR), get_mal_dcrn(mal, MAL_TXDEIR),
	       get_mal_dcrn(mal, MAL_RXCASR), get_mal_dcrn(mal, MAL_RXCARR),
	       get_mal_dcrn(mal, MAL_RXEOBISR), get_mal_dcrn(mal, MAL_RXDEIR)
	    );

	printk("TX|");
	for (i = 0; i < mal->num_tx_chans; ++i) {
		if (i && !(i % 4))
			printk("\n   ");
		printk("CTP%d = 0x%08x ", i, get_mal_dcrn(mal, MAL_TXCTPR(i)));
	}
	printk("\nRX|");
	for (i = 0; i < mal->num_rx_chans; ++i) {
		if (i && !(i % 4))
			printk("\n   ");
		printk("CTP%d = 0x%08x ", i, get_mal_dcrn(mal, MAL_RXCTPR(i)));
	}
	printk("\n   ");
	for (i = 0; i < mal->num_rx_chans; ++i) {
		u32 r = get_mal_dcrn(mal, MAL_RCBS(i));
		if (i && !(i % 3))
			printk("\n   ");
		printk("RCBS%d = 0x%08x (%d) ", i, r, r * 16);
	}
	printk("\n");
}
Пример #4
0
void emac_mal_dump(struct net_device *dev)
{
	struct ibm_ocp_mal *mal = ((struct ocp_enet_private *)dev->priv)->mal;

	printk(KERN_DEBUG " MAL DEBUG ********** \n");
	printk(KERN_DEBUG " MCR      ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALCR));
	printk(KERN_DEBUG " ESR      ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALESR));
	printk(KERN_DEBUG " IER      ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALIER));
#ifdef CONFIG_40x
	printk(KERN_DEBUG " DBR      ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALDBR));
#endif				/* CONFIG_40x */
	printk(KERN_DEBUG " TXCASR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCASR));
	printk(KERN_DEBUG " TXCARR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCARR));
	printk(KERN_DEBUG " TXEOBISR ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXEOBISR));
	printk(KERN_DEBUG " TXDEIR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXDEIR));
	printk(KERN_DEBUG " RXCASR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXCASR));
	printk(KERN_DEBUG " RXCARR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXCARR));
	printk(KERN_DEBUG " RXEOBISR ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXEOBISR));
	printk(KERN_DEBUG " RXDEIR   ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXDEIR));
	printk(KERN_DEBUG " TXCTP0R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCTP0R));
	printk(KERN_DEBUG " TXCTP1R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCTP1R));
	printk(KERN_DEBUG " TXCTP2R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCTP2R));
	printk(KERN_DEBUG " TXCTP3R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALTXCTP3R));
	printk(KERN_DEBUG " RXCTP0R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXCTP0R));
	printk(KERN_DEBUG " RXCTP1R  ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRXCTP1R));
	printk(KERN_DEBUG " RCBS0    ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRCBS0));
	printk(KERN_DEBUG " RCBS1    ==> 0x%x\n",
	       (unsigned int)get_mal_dcrn(mal, DCRN_MALRCBS1));
}
Пример #5
0
static void emac_mal_dump(struct ibm_ocp_mal *mal)
{
	struct ocp_func_mal_data *maldata = mal->def->additions;
	int i;

	printk("** MAL%d Registers **\n"
	       "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n"
	       "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n"
	       "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n",
	       mal->def->index,
	       get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR),
	       get_mal_dcrn(mal, MAL_IER),
	       get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR),
	       get_mal_dcrn(mal, MAL_TXEOBISR), get_mal_dcrn(mal, MAL_TXDEIR),
	       get_mal_dcrn(mal, MAL_RXCASR), get_mal_dcrn(mal, MAL_RXCARR),
	       get_mal_dcrn(mal, MAL_RXEOBISR), get_mal_dcrn(mal, MAL_RXDEIR)
	    );

	printk("TX|");
	for (i = 0; i < maldata->num_tx_chans; ++i) {
		if (i && !(i % 4))
			printk("\n   ");
		printk("CTP%d = 0x%08x ", i, get_mal_dcrn(mal, MAL_TXCTPR(i)));
	}
	printk("\nRX|");
	for (i = 0; i < maldata->num_rx_chans; ++i) {
		if (i && !(i % 4))
			printk("\n   ");
		printk("CTP%d = 0x%08x ", i, get_mal_dcrn(mal, MAL_RXCTPR(i)));
	}
	printk("\n   ");
	for (i = 0; i < maldata->num_rx_chans; ++i) {
		u32 r = get_mal_dcrn(mal, MAL_RCBS(i));
		if (i && !(i % 3))
			printk("\n   ");
		printk("RCBS%d = 0x%08x (%d) ", i, r, r * 16);
	}
	printk("\n");
}