Hi, After applying this patch I have seen the following error: In file included from ./include/linux/uuid.h:12, from ./include/linux/mod_devicetable.h:13, from ./include/linux/pci.h:27, from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23: In function ‘memcpy’, inlined from ‘amdgpu_fru_get_product_info’ at drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:137:2: ./include/linux/string.h:376:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter 376 | __read_overflow2(); | ^~~~~~~~~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:266: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Did I miss something? P.s: I'm using gcc 9.3.0 (Arch Linux 9.3.0-1) Best Regards On 04/07, Deucher, Alexander wrote: > [AMD Official Use Only - Internal Distribution Only] > > Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > ________________________________ > From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Kent Russell <kent.russell@xxxxxxx> > Sent: Monday, April 6, 2020 11:52 AM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx> > Cc: Russell, Kent <Kent.Russell@xxxxxxx> > Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4 > > There is at least 1 VG20 DID that does not have an FRU, and trying to read > that will cause a hang. For now, explicitly support reading the FRU for > Arcturus and for the WKS VG20 DIDs, and skip for everything else. > This re-enables serial number reporting for server cards > > v2: Add ASIC check > v3: Don't default to true for pre-VG20 > v4: Use DID instead of parsing the VBIOS > > Signed-off-by: Kent Russell <kent.russell@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c > index bfe4259f9508..9d17761721de 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c > @@ -20,6 +20,8 @@ > * OTHER DEALINGS IN THE SOFTWARE. > * > */ > +#include <linux/pci.h> > + > #include "amdgpu.h" > #include "amdgpu_i2c.h" > #include "smu_v11_0_i2c.h" > @@ -31,8 +33,16 @@ > > bool is_fru_eeprom_supported(struct amdgpu_device *adev) > { > - /* TODO: Resolve supported ASIC type */ > - > + /* TODO: Gaming SKUs don't have the FRU EEPROM. > + * Use this hack to address hangs on modprobe on gaming SKUs > + * until a proper solution can be implemented by only supporting > + * it on Arcturus, and the explicit chip IDs for VG20 Server cards > + */ > + if ((adev->asic_type == CHIP_ARCTURUS) || > + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a0) || > + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a1) || > + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a4)) > + return true; > return false; > } > > -- > 2.17.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208800660&sdata=EMsjck3eT5RA19qGVLjoFVaX25zgPq8axwUxSR4HyOY%3D&reserved=0 > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208840485&sdata=9ZL1XLDOi2qBIMV8obDmCIB1G6PKi%2FXegRfFDZtfMfA%3D&reserved=0 -- Rodrigo Siqueira https://siqueira.tech
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx