* Patch for latest ppc405_enet.c in source.mvista.com
@ 2002-02-06 4:35 Amit D. Chaudhary
2002-02-06 8:22 ` Armin
0 siblings, 1 reply; 2+ messages in thread
From: Amit D. Chaudhary @ 2002-02-06 4:35 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
Hi,
Please find attached and pasted below patch for ppc405_enet.c for comments.
The bk tree at source.mvista.com was based on 2.4.18-pre7 today when I
picked it up.
One change involves setting the flags for EMAC_IER, the manual does not
mention any defaults hence using 0 for it did not seem appropriate.
The second is a minor change of stats as the code uses transmit channel
0, the check for flag in ISR ought to be for the same.
Regards
Amit
--- ppc405_enet.c Tue Feb 5 18:52:43 2002
+++ ppc405_enet-3.c Tue Feb 5 19:38:23 2002
@@ -291,6 +291,12 @@ ppc405_enet_open(struct net_device *dev)
mtdcr(DCRN_MALIER, MALIER_DE |
MALIER_NE | MALIER_TE | MALIER_OPBE | MALIER_PLBE);
+
/* set the EMAC IER (Interrupt Enable Register) */
+
+
emac_ier = EMAC_ISR_PP | EMAC_ISR_BP | EMAC_ISR_RP |
+
EMAC_ISR_SE | EMAC_ISR_PTLE | EMAC_ISR_ALE |
+
EMAC_ISR_BFCS | EMAC_ISR_ORE | EMAC_ISR_IRE;
+
emacp->em0iser = emac_ier;
eieio();
@@ -1214,11 +1220,12 @@ ppc405_eth_mac(int irq, void *dev_instan
/* if (tmp_em0isr & EMAC_ISR_DBDM) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_DB0 ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_SE0 ) fep->stats.ZZZ++; */
-/*
if (tmp_em0isr & EMAC_ISR_TE0 ) fep->stats.ZZZ++; */
+
if (tmp_em0isr & EMAC_ISR_TE0)
+
fep->stats.tx_aborted_errors++;
/* if (tmp_em0isr & EMAC_ISR_DB1 ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_SE1 ) fep->stats.ZZZ++; */
+/*
if (tmp_em0isr & EMAC_ISR_TE0 ) fep->stats.ZZZ++; */
if (tmp_em0isr & EMAC_ISR_TE1)
-
fep->stats.tx_aborted_errors++;
/* if (tmp_em0isr & EMAC_ISR_MOS ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_MOF ) fep->stats.ZZZ++; */
[-- Attachment #2: ppc405_enet.diff --]
[-- Type: text/plain, Size: 1244 bytes --]
--- ppc405_enet.c Tue Feb 5 18:52:43 2002
+++ ppc405_enet-3.c Tue Feb 5 19:38:23 2002
@@ -291,6 +291,12 @@ ppc405_enet_open(struct net_device *dev)
mtdcr(DCRN_MALIER, MALIER_DE |
MALIER_NE | MALIER_TE | MALIER_OPBE | MALIER_PLBE);
+ /* set the EMAC IER (Interrupt Enable Register) */
+
+ emac_ier = EMAC_ISR_PP | EMAC_ISR_BP | EMAC_ISR_RP |
+ EMAC_ISR_SE | EMAC_ISR_PTLE | EMAC_ISR_ALE |
+ EMAC_ISR_BFCS | EMAC_ISR_ORE | EMAC_ISR_IRE;
+
emacp->em0iser = emac_ier;
eieio();
@@ -1214,11 +1220,12 @@ ppc405_eth_mac(int irq, void *dev_instan
/* if (tmp_em0isr & EMAC_ISR_DBDM) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_DB0 ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_SE0 ) fep->stats.ZZZ++; */
-/* if (tmp_em0isr & EMAC_ISR_TE0 ) fep->stats.ZZZ++; */
+ if (tmp_em0isr & EMAC_ISR_TE0)
+ fep->stats.tx_aborted_errors++;
/* if (tmp_em0isr & EMAC_ISR_DB1 ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_SE1 ) fep->stats.ZZZ++; */
+/* if (tmp_em0isr & EMAC_ISR_TE0 ) fep->stats.ZZZ++; */
if (tmp_em0isr & EMAC_ISR_TE1)
- fep->stats.tx_aborted_errors++;
/* if (tmp_em0isr & EMAC_ISR_MOS ) fep->stats.ZZZ++; */
/* if (tmp_em0isr & EMAC_ISR_MOF ) fep->stats.ZZZ++; */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch for latest ppc405_enet.c in source.mvista.com
2002-02-06 4:35 Patch for latest ppc405_enet.c in source.mvista.com Amit D. Chaudhary
@ 2002-02-06 8:22 ` Armin
0 siblings, 0 replies; 2+ messages in thread
From: Armin @ 2002-02-06 8:22 UTC (permalink / raw)
To: Amit D. Chaudhary; +Cc: linuxppc-embedded
Amit D. Chaudhary wrote:
> Hi,
>
> Please find attached and pasted below patch for ppc405_enet.c for comments.
> The bk tree at source.mvista.com was based on 2.4.18-pre7 today when I
> picked it up.
>
> One change involves setting the flags for EMAC_IER, the manual does not
> mention any defaults hence using 0 for it did not seem appropriate.
>
> The second is a minor change of stats as the code uses transmit channel
> 0, the check for flag in ISR ought to be for the same.
>
> Regards
> Amit
>
>
> --- ppc405_enet.c Tue Feb 5 18:52:43 2002
> +++ ppc405_enet-3.c Tue Feb 5 19:38:23 2002
Amit,
Thanks for the patch. It wont apply as-is (ppc405_enet-3.c does not
exist). Since it is a smalll patch I will clean it up and submitted later.
-- armin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-06 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-06 4:35 Patch for latest ppc405_enet.c in source.mvista.com Amit D. Chaudhary
2002-02-06 8:22 ` Armin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).