#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:
Blocking:

Description

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 Oct 25, 2016 at 9:35:21 AM.
GRETH interrupt handler patch

Download all attachments as: .zip

Change History (9)

Changed on Oct 25, 2016 at 9:35:21 AM by Christian Spindeldreier

Attachment: greth.patch added

GRETH interrupt handler patch

comment:1 Changed on Oct 25, 2016 at 3:04:12 PM by Gedare Bloom

Owner: set to Daniel Hellstrom
Status: newassigned

comment:2 Changed on Oct 26, 2016 at 7:57:40 AM 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 Jan 12, 2017 at 1:49:36 PM 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 Jan 12, 2017 at 2:25:37 PM 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 Jan 12, 2017 at 3:12:16 PM 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 Jan 12, 2017 at 3:38:41 PM by Christian Spindeldreier <spindel@…>

Resolution: fixed
Status: assignedclosed

In a1e4e3bf31985af787caa984b7e38d878049122a/rtems:

GRETH: Interrupt Handler Uses Wrong Events

closes #2796.

comment:7 Changed on Jan 12, 2017 at 3:39:54 PM by Christian Spindeldreier <spindel@…>

In af9143fba5f5c85709469c4ef087fbb4c2882a74/rtems:

GRETH: Interrupt Handler Uses Wrong Events

closes #2796.

comment:8 Changed on Jan 12, 2017 at 3:42:17 PM 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.