Notice: We have migrated to GitLab launching 2024-05-01 see here:

#2796 closed defect (fixed)

GRETH: Interrupt Handler broken (patch attached)

Reported by: Christian Spindeldreier Owned by: Daniel Hellstrom
Priority: high Milestone: 4.11
Component: network/legacy Version: 4.11
Severity: major Keywords: GRETH leon sparc interrupt event broken
Cc: Blocked By:


The interrupt handler in the driver manager based Leon ethernet driver (GRETH) is broken (/src/lib/libbsp/sparc/shared/net/greth.c)

The interrupt handler uses rtems_event_send() to send a Event to the daemon Task which fails with RTEMS_INVALID_ID in rtems-4.11.

To fix this the inline function rtems_bsdnet_event_send() defined in rtems_bsdnet_internal.h should be used. A corresponding patch is attached.

Attachments (1)

greth.patch (497 bytes) - added by Christian Spindeldreier on 10/25/16 at 09:35:21.
GRETH interrupt handler patch

Download all attachments as: .zip

Change History (9)

Changed on 10/25/16 at 09:35:21 by Christian Spindeldreier

Attachment: greth.patch added

GRETH interrupt handler patch

comment:1 Changed on 10/25/16 at 15:04:12 by Gedare Bloom

Owner: set to Daniel Hellstrom
Status: newassigned

comment:2 Changed on 10/26/16 at 07:57:40 by Daniel Hellstrom

You're right this looks wrong, the rest of the driver uses rtems_bsdnet_event_*() interface. I haven't tried your patch or the GRETH driver on the master for a while now, but the patch looks OK to be committed.

comment:3 Changed on 01/12/17 at 13:49:36 by Cláudio Silva

The patch works correctly.
rtems_bsdnet_event_* uses rtems_event_system_* so they don't work with the rtems_event_send currently in the driver.
The second greth driver "c/src/libchip/network/greth.c" is already correct.
Can someone commit?

comment:4 Changed on 01/12/17 at 14:25:37 by Joel Sherrill

I will commit this but need a name to put on the commit.

Also this needs to go on the 4.11 branch.

I will handle it once I get the proper attribution. Thanks.

comment:5 in reply to:  4 Changed on 01/12/17 at 15:12:16 by Christian Spindeldreier

Replying to joel.sherrill:

I will commit this but need a name to put on the commit.

Oh i am sorry i did not now that my missing real name was the blocking the commit.

As you should see now i am Christian Spindeldreier working at the Institute of Microelectronic Systems, Leibniz University Hannover (Germany)

comment:6 Changed on 01/12/17 at 15:38:41 by Christian Spindeldreier <spindel@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"a1e4e3bf31985af787caa984b7e38d878049122a/rtems"]:

GRETH: Interrupt Handler Uses Wrong Events

closes #2796.

comment:7 Changed on 01/12/17 at 15:39:54 by Christian Spindeldreier <spindel@…>

In [changeset:"af9143fba5f5c85709469c4ef087fbb4c2882a74/rtems"]:

GRETH: Interrupt Handler Uses Wrong Events

closes #2796.

comment:8 Changed on 01/12/17 at 15:42:17 by Joel Sherrill

Attribution wasn't the primary thing holding it up. Daniel needed to review it.

But when I went to commit it, I realized that I didn't know the right name to put on it. :)

FYI submitting patches from git using git format-patch, etc. is better since it keeps the maintainers from writing the change message. :)

Thanks for the patch. It should now be correctly on the 4.11 branch and master. If not, reopen the ticket and ping it.

Note: See TracTickets for help on using tickets.