[haiku-bugs] Re: [Haiku] #15016: KDL (network related) when booting on a Hades Canyon NUC8.

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 05 May 2019 15:17:24 -0000

#15016: KDL (network related) when booting on a Hades Canyon NUC8.
----------------------------------------+----------------------------
   Reporter:  bga                       |      Owner:  nobody
       Type:  bug                       |     Status:  new
   Priority:  normal                    |  Milestone:  Unscheduled
  Component:  Drivers/Network/ipro1000  |    Version:  R1/Development
 Resolution:                            |   Keywords:
 Blocked By:                            |   Blocking:
Has a Patch:  0                         |   Platform:  All
----------------------------------------+----------------------------

Comment (by bga):

 Added some debug to figure out the order things happen, for my own
 benefit, and this is what I got:

 {{{
 2019-05-05 15:02:35 KERN: pci_reserve_device(0, 31, 6, ipro1000)
 2019-05-05 15:02:35 KERN: init_root_device(dev = 0xffffffffc0451cb0)
 2019-05-05 15:02:35 KERN: init_root_device(): Setting softc.
 2019-05-05 15:02:35 KERN: device_set_driver(dev = 0xffffffffc052a3b0)
 2019-05-05 15:02:35 KERN: device_set_driver() : Allocating new softc.
 2019-05-05 15:02:35 KERN: iflib_device_attach(dev = 0xffffffffc052a3b0)
 2019-05-05 15:02:35 KERN: iflib_device_register(dev = 0xffffffffc052a3b0)
 2019-05-05 15:02:35 KERN: iflib_device_register(): Setting device softc.
 2019-05-05 15:02:35 KERN: if_initname(0xffffffff80cc5800, igb, 66)
 2019-05-05 15:02:35 KERN: [ipro1000] ipro1000: /dev/net/ipro1000/0
 2019-05-05 15:02:35 KERN: [ipro1000] (igb) attach_pre capping queues at 4
 2019-05-05 15:02:35 KERN: [ipro1000] (igb) bus_alloc_resource(3, [16],
 0x0, 0xffffffffffffffff, 0x1,0x2)
 }}}

 So it appears that we allocate the device and the pass it down to the
 iflib stuff. Because we allocate a new softc when setting up the device,
 we need a way to know if iflib will do it too to avoid allocating it in
 the first place.

 Or as a hack, maybe device_set_softc() should free the memory if it is not
 NULL before assigning the new pointer.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15016#comment:20>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: