Hewlett-Packard Co. and former CEO Mark Hurd have settled their legal dispute over his decision to become co-president of rival Oracle Corp.

HP announced Monday that it has dropped a lawsuit against Hurd under a settlement agreement that requires him to give up 346,030 shares of HP stock, or nearly $14 million (as of Monday’s closing price of $39.39), effectively waiving about half of his severance package.