To best answer your question we must first recognize that Jesus never sinned: 1 Peter 2:21-22. So no, Jesus was never disobedient.
The 2 passages of Scripture you mentioned are not contradictory but complimentary:
1.) Jesus learned obedience through suffering (meaning that suffering acted as a means to learn proper obedience to His Father and the Law). Jesus came to fulfill both of those purposes in terms of obedience as a Man. {John 5:30, John 4:34}
We read that Jesus' obedience in all things lead to "many being made righteous":
"For as by one man’s disobedience many were made sinners, so also by
one Man’s obedience many will be made righteous." (Romans 5:19)
2.) Jesus learned obedience unto death in that He never stopped obeying His Father and fulfilling all righteousness.
Jesus had to do certain things in the Law to fulfill them in our place:
"Then Jesus came from Galilee to John at the Jordan to be baptized by
him. And John tried to prevent Him, saying, “I need to be baptized
by You, and are You coming to me?”
But Jesus answered and said to him, “Permit it to be so now, for
thus it is fitting for us to fulfill all righteousness.” Then he
allowed Him." (Matthew 3:13-15)
3.) By extension, Jesus had to obey or fulfill certain tasks and prophecies in the Law and the Scriptures in order to learn such obedience:
“Do not think that I came to destroy the Law or the Prophets. I did
not come to destroy but to fulfill. For assuredly, I say to you, till
heaven and earth pass away, one jot or one tittle will by no means
pass from the law till all is fulfilled." (Matthew 5:17-18)
Again, Jesus demonstrates obedience to His Father and to the fulfillments of the Law in our place by fulfilling prophecy:
Then He said to them, “These are the words which I spoke to you while
I was still with you, that all things must be fulfilled which were
written in the Law of Moses and the Prophets and the Psalms concerning
Me.”
And He opened their understanding, that they might comprehend the
Scriptures.
Then He said to them, “Thus it is written, and thus it was necessary
for the Christ to suffer and to rise from the dead the third day,
and that repentance and remission of sins should be preached in His
name to all nations, beginning at Jerusalem.
He had to learn obedience as a Man (Luke 2:52)
So to answer you plainly, He did both principles of obedience in Philippians 2:8, and Hebrews 5:8-9.