1. 24 Feb, 2012 4 commits
    • Yinghai Lu's avatar
      PCI: add a PCI resource reallocation config option · b07f2ebc
      Yinghai Lu authored
      
      
      Add a new config option, PCI_REALLOC_ENABLE_AUTO, which will
      automatically try to re-allocate PCI resources if PCI_IOV support is
      enabled and the SR-IOV resources are unassigned.  Behavior can still be
      controlled using the pci=realloc= parameter.
      
      -v2: According to Jesse, adding one CONFIG option for distribution to
           disable it or enable it.
      -v3: update Kconfig text (jbarnes)
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      b07f2ebc
    • Yinghai Lu's avatar
      PCI: print out suggestion about using pci=realloc · eb572e7c
      Yinghai Lu authored
      
      
      let user know they could try if pci=realloc could help.
      
      -v2: update suggestion text.
      
      Suggested-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      eb572e7c
    • Yinghai Lu's avatar
      PCI: prepare pci=realloc for multiple options · b55438fd
      Yinghai Lu authored
      
      
      Let the user could enable and disable with pci=realloc=on or pci=realloc=off
      
      Also
      1. move variable and functions near the place they are used.
      2. change macro to function
      3. change related functions and variable to static and _init
      4. update parameter description accordingly.
      
      This will let us add a config option to control default behavior, and
      still allow the user to turn off automatic reallocation if it fails on
      their platform until a permanent solution is found.
      
      -v2: still honor pci=realloc, and treat it as pci=realloc=on
           also use enum instead of ...
      -v3: update kernel-paramenters.txt according to Jesse.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      b55438fd
    • Yinghai Lu's avatar
      PCI: Retry on IORESOURCE_IO type allocations · 0c5be0cb
      Yinghai Lu authored
      When enabling pci reallocation for a pci bridge, we clear the small size
      in in bridge and re-assign with requested + optional size for first
      several tries, but Ram mention could have problem with one case:
      	https://bugzilla.kernel.org/show_bug.cgi?id=15960
      
      After checking the booting log in
      	https://lkml.org/lkml/2010/4/19/44
      	[regression, bisected] Xonar DX invalid PCI I/O range since 977d17bb
      
      
      
      We should not stop too early for io ports.
      	Apr 19 10:19:38 [kernel] pci 0000:04:00.0: BAR 7: can't assign io (size 0x4000)
      	Apr 19 10:19:38 [kernel] pci 0000:05:01.0: BAR 8: assigned [mem 0x80400000-0x805fffff]
      	Apr 19 10:19:38 [kernel] pci 0000:05:01.0: BAR 7: can't assign io (size 0x2000)
      	Apr 19 10:19:38 [kernel] pci 0000:05:02.0: BAR 7: can't assign io (size 0x1000)
      	Apr 19 10:19:38 [kernel] pci 0000:05:03.0: BAR 7: can't assign io (size 0x1000)
      	Apr 19 10:19:38 [kernel] pci 0000:08:00.0: BAR 7: can't assign io (size 0x1000)
      	Apr 19 10:19:38 [kernel] pci 0000:09:04.0: BAR 0: can't assign io (size 0x100)
      and clear 00:1c.0 to retry again.
      
      This patch removes IORESOUCE_IO checking, and tries one more time.  It
      gives us a chance to get an allocation for the 00:1c.0 io port range
      because the range from 0x4000 to 0x8000 will be freed and we can use it.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      0c5be0cb
  2. 23 Feb, 2012 11 commits
  3. 17 Feb, 2012 3 commits
  4. 14 Feb, 2012 22 commits