cxgb4: assume flash part size to be 4MB, if it can't be determined
authorCasey Leedom <leedom@chelsio.com>
Sat, 7 Jul 2018 07:08:07 +0000 (12:38 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 10:57:33 +0000 (19:57 +0900)
commit843789f6dd6ae1651a77ac99c13bcaf191ebe05c
tree15bf3d7537ffdfd30786676118e348a06dcca86b
parent7f978e859f41e4d95a3ea14794d2577f755d7924
cxgb4: assume flash part size to be 4MB, if it can't be determined

t4_get_flash_params() fails in a fatal fashion if the FLASH part isn't
one of the recognized parts. But this leads to desperate efforts to update
drivers when various FLASH parts which we are using suddenly become
unavailable and we need to substitute new FLASH parts.  This has lead to
more than one Customer Field Emergency when a Customer has an old driver
and suddenly can't use newly shipped adapters.

This commit fixes this by simply assuming that the FLASH part is 4MB in
size if it can't be identified. Note that all Chelsio adapters will have
flash parts which are at least 4MB in size.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c