[haiku-bugs] Re: [Haiku] #9601: [attansic_l1] crashes on boot

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Fri, 25 Mar 2016 13:17:05 -0000

#9601: [attansic_l1] crashes on boot
-------------------------------------------+----------------------------
   Reporter:  bob_ok                       |      Owner:  3dEyes
       Type:  bug                          |     Status:  new
   Priority:  normal                       |  Milestone:  R1
  Component:  Drivers/Network/attansic_l1  |    Version:  R1/Development
 Resolution:                               |   Keywords:
 Blocked By:                               |   Blocking:
Has a Patch:  0                            |   Platform:  x86
-------------------------------------------+----------------------------

Comment (by korli):

 Relevant lines:
 {{{
 [attansic_l1] (age) Using 1 MSI messages.
 [attansic_l1] (age) bus_alloc_resource(1, [1], 0x0, 0xffffffff, 0x1,0x2)
 [attansic_l1] (age) Read request size : 512 bytes.
 [attansic_l1] (age) TLP payload size : 128 bytes.
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe166e418 tag flags 0x0 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe165c568 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe165c478 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe165c3d8 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe165c068 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:323)
 bus_dma_tag_create returned tag 0xe1667c50 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:535)
 bus_dmamem_alloc: tag 0xe165c568 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:728)
 bus_dmamap_load: tag 0xe165c568 tag flags 0x40 error 0 nsegs 1
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:535)
 bus_dmamem_alloc: tag 0xe165c478 tag flags 0x40 error 0
 [attansic_l1]
 
(/home/korli/githaiku/haiku/src/libs/compat/freebsd_network/fbsd_busdma_x86.c:728)
 bus_dmamap_load: tag 0xe165c478 tag flags 0x40 error -2147454972 nsegs 2
 [attansic_l1] (age) could not load DMA'able memory for Rx ring.
 [attansic_l1] (age) PCI VPD capability not found!
 }}}

 -2147454972 => EFBIG  this hints to an [http://cgit.haiku-
 os.org/haiku/tree/src/libs/compat/freebsd_network/fbsd_busdma_x86.c#n687
 exit] in the loop of _bus_dmamap_load_buffer().

 We alloc only one segment [http://cgit.haiku-os.org/haiku/tree/src/add-
 ons/kernel/drivers/network/attansic_l1/dev/age/if_age.c#n901 if_age.c line
 901] and that alloc uses a simple malloc which could deliver allocations
 on a boundary [http://cgit.haiku-
 os.org/haiku/tree/src/libs/compat/freebsd_network/fbsd_busdma_x86.c#n515
 fbsd_busdma_x86.c line 515].
 However the code at [http://cgit.haiku-
 os.org/haiku/tree/src/libs/compat/freebsd_network/fbsd_busdma_x86.c#n680
 fbsd_busdma_x86.c line 680] should extend the first page segment when a
 page boundary is met.
 The failure is still unclear, but I suppose this code could be tested in
 the context of another driver.

--
Ticket URL: <https://dev.haiku-os.org/ticket/9601#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: