igb: add additional error handling to the phy code
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 5 Oct 2009 06:35:42 +0000 (06:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Oct 2009 21:59:24 +0000 (14:59 -0700)
commit2553bb2681645bf932db2845121b8f33954f6f39
tree3aa34b3b94bb1fab528870a7dc72caa182e3587f
parentab576389b733b458495529f81839f499b3fece78
igb: add additional error handling to the phy code

This update adds additional exception handling to the phy code to handle
situations where it may be called incorrectly.  In addition it adds some
bounds checking to the cable length checks to prevent an array overrun in
the event that the hardware returned a different value than expected.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/e1000_phy.c