Page MenuHomeFreeBSD

Fix an off-by-one error, d_unit starts at 0.
AbandonedPublic

Authored by andrew on Feb 20 2016, 5:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 10:44 AM
Unknown Object (File)
Dec 12 2023, 2:23 AM
Unknown Object (File)
Nov 13 2023, 11:20 AM
Unknown Object (File)
Nov 1 2023, 9:19 PM
Unknown Object (File)
Oct 25 2023, 5:47 AM
Unknown Object (File)
Sep 10 2023, 2:18 AM
Unknown Object (File)
Sep 5 2023, 4:07 AM
Unknown Object (File)
Aug 10 2023, 7:41 AM
Subscribers

Details

Summary

This fixes netbooting on ThunderX. I haven't tested it anywhere else.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2587
Build 2604: arc lint + arc unit

Event Timeline

andrew retitled this revision from to Fix an off-by-one error, d_unit starts at 0..
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
smh requested changes to this revision.Feb 20 2016, 7:42 PM
smh edited edge metadata.
smh added inline comments.
sys/boot/efi/libefi/efinet.c
104

Its very hard for someone to make this mistake, so even though this seems right, it would be good understand why it was like this.

314

This reverts r295210 which will cause an issue.

This revision now requires changes to proceed.Feb 20 2016, 7:42 PM
sys/boot/efi/libefi/efinet.c
104

It was added in rS277943. Based on the commit message I still think it's wrong.

314

In the report that led to rS295210 there was only an issue on interface 1 and 2, not interface 0. I suspect the above will fix the issue. The reported is listed as a reviewer on this patch so it can be tested before being committed.

From my reading of the grub efi network driver code It looks like it depends on the exclusive flag so I would expect it to just be an issue where we were trying to use the wrong handle.

This current diff doesn't change netbooting for me, it's even worse because as it can't open the network device in exclusive mode it cannot netboot.
Andrew sent me this patch to test instead : http://www.pastebin.ca/3379018
This works for netbooting my HP laptop and definitly increase the speed.

sys/boot/efi/libefi/efinet.c
104

Indeed, PR 202097 reports that rS277943 broke PXE booting.

emaste requested changes to this revision.Mar 29 2016, 8:02 PM
emaste edited edge metadata.

@andrew has an updated patch in progress

andrew added a subscriber: jhb.

Not needed, @jhb fixed this in rS300810