Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-23 Thread Shuah Khan
On Fri, 2012-10-12 at 12:35 -0700, Jonathan Nieder wrote: > Shuah Khan wrote: > > On Fri, 2012-10-12 at 11:38 -0700, Jonathan Nieder wrote: > > >> To save Willy time: am I correct in guessing the upstream commit you > >> are referring to is 98fc5a693bbdda498a556654c70d1e31a186c988 > >> (x86/amd-io

Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Jonathan Nieder
Shuah Khan wrote: > On Fri, 2012-10-12 at 11:38 -0700, Jonathan Nieder wrote: >> To save Willy time: am I correct in guessing the upstream commit you >> are referring to is 98fc5a693bbdda498a556654c70d1e31a186c988 >> (x86/amd-iommu: Use get_device_id and check_device where appropriate, >> 2009-11-

Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Shuah Khan
On Fri, 2012-10-12 at 11:38 -0700, Jonathan Nieder wrote: > Shuah Khan wrote: > > > This bug is in linux-2.6.32 and an equivalent fix in linux-2.6.33 and has > > been > > carried forward to later kernels and is in the upstream kernel. This > > equivalent > > fix includes restructuring and consol

Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Jonathan Nieder
Shuah Khan wrote: > This bug is in linux-2.6.32 and an equivalent fix in linux-2.6.33 and has been > carried forward to later kernels and is in the upstream kernel. This > equivalent > fix includes restructuring and consolidating device checks into a routine > check_device(). Instead of back-port

Re: [PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Alex Williamson
On Fri, 2012-10-12 at 10:29 -0600, Shuah Khan wrote: > amd_iommu_attach_device() checks if device id is within the limits > of amd_iommu_last_bdf and instead checking if devid > amd_iommu_last_bdf, > it checks devid >= amd_iommu_last_bdf. As a result the last device attach > fails because amd_iommu

[PATCH -stable] amd_iommu: attach device fails on the last pci device

2012-10-12 Thread Shuah Khan
amd_iommu_attach_device() checks if device id is within the limits of amd_iommu_last_bdf and instead checking if devid > amd_iommu_last_bdf, it checks devid >= amd_iommu_last_bdf. As a result the last device attach fails because amd_iommu_attach_device() returns an -EINVAL. This bug is in linux-2.