Sub panel grounding with only a 3 wire
I have an old house with an existing sub panel on the second floor that has only a three wire with ground feeding it. I just had a home inspection that said the panel was not properly grounded/bonded. The ground wire is attached to the neutral bar with the common and other ground wires. I'm assuming this is wrong. I don't have the ability to run any new wires to this panel. There is not a separate ground attached to a grounding bar in this panel. I can only work with the ground from the main panel that is part of the 3 wire. Is there a configuration that I can use that will pass code?