USB Host shield attached to arduino mega does not upload the code

Hi,
I got my new arduino Mega with Atmega 2560. I bought a USB host shield to attach a ps4 controller to it. The Mega uploads code just fine. When i attach the USB Host Shield to it, the IDE fails in uploading the code and shoots out an error message. Any help on this will be appreciated. Thanks.

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 656 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

If in USB 3, updated drivers for it?

I did try updating the drivers. Seems like the mega works fine but the code doesnt upload when the host shield is attached

There are some bad USB host shields floating around. The following may help.