I manage a team of engineers. For the most part everyone is self-motivated and doesn't need much management. There is one engineer in particular, though, that is very difficult to work with. He has very strong ideas about how things should be done, yet is terrible about understanding the needs of the business or other departments. He feels insecure about his job yet doesn't do much to change his work style. We're pretty sure he produces poor documentation with the intent of improving his job security.
He also talks a lot. I don't mind people talking with each other, but to a point where it doesn't take away from your work. When he talks with me, I'm happy to hear what's going on for him but then when I start to give signals that I need to get back to work, he's very slow to get it. And in particular, he seems to talk with one other sympathetic engineer a lot. The other engineer otherwise works pretty hard but I've seen their conversations go on for 20-30 minutes at a time.
I think he feels the need to talk because of insecurities about his job and about his personal life, but this is a workplace and while he's here I need him to focus. What can I do about this?