diff options
| -rw-r--r-- | drivers/net/ethernet/intel/e100.c | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index ada720b42ff6..535f94fac4a1 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c | |||
| @@ -1249,20 +1249,35 @@ static const struct firmware *e100_request_firmware(struct nic *nic) | |||
| 1249 | const struct firmware *fw = nic->fw; | 1249 | const struct firmware *fw = nic->fw; |
| 1250 | u8 timer, bundle, min_size; | 1250 | u8 timer, bundle, min_size; |
| 1251 | int err = 0; | 1251 | int err = 0; |
| 1252 | bool required = false; | ||
| 1252 | 1253 | ||
| 1253 | /* do not load u-code for ICH devices */ | 1254 | /* do not load u-code for ICH devices */ |
| 1254 | if (nic->flags & ich) | 1255 | if (nic->flags & ich) |
| 1255 | return NULL; | 1256 | return NULL; |
| 1256 | 1257 | ||
| 1257 | /* Search for ucode match against h/w revision */ | 1258 | /* Search for ucode match against h/w revision |
| 1258 | if (nic->mac == mac_82559_D101M) | 1259 | * |
| 1260 | * Based on comments in the source code for the FreeBSD fxp | ||
| 1261 | * driver, the FIRMWARE_D102E ucode includes both CPUSaver and | ||
| 1262 | * | ||
| 1263 | * "fixes for bugs in the B-step hardware (specifically, bugs | ||
| 1264 | * with Inline Receive)." | ||
| 1265 | * | ||
| 1266 | * So we must fail if it cannot be loaded. | ||
| 1267 | * | ||
| 1268 | * The other microcode files are only required for the optional | ||
| 1269 | * CPUSaver feature. Nice to have, but no reason to fail. | ||
| 1270 | */ | ||
| 1271 | if (nic->mac == mac_82559_D101M) { | ||
| 1259 | fw_name = FIRMWARE_D101M; | 1272 | fw_name = FIRMWARE_D101M; |
| 1260 | else if (nic->mac == mac_82559_D101S) | 1273 | } else if (nic->mac == mac_82559_D101S) { |
| 1261 | fw_name = FIRMWARE_D101S; | 1274 | fw_name = FIRMWARE_D101S; |
| 1262 | else if (nic->mac == mac_82551_F || nic->mac == mac_82551_10) | 1275 | } else if (nic->mac == mac_82551_F || nic->mac == mac_82551_10) { |
| 1263 | fw_name = FIRMWARE_D102E; | 1276 | fw_name = FIRMWARE_D102E; |
| 1264 | else /* No ucode on other devices */ | 1277 | required = true; |
| 1278 | } else { /* No ucode on other devices */ | ||
| 1265 | return NULL; | 1279 | return NULL; |
| 1280 | } | ||
| 1266 | 1281 | ||
| 1267 | /* If the firmware has not previously been loaded, request a pointer | 1282 | /* If the firmware has not previously been loaded, request a pointer |
| 1268 | * to it. If it was previously loaded, we are reinitializing the | 1283 | * to it. If it was previously loaded, we are reinitializing the |
| @@ -1273,10 +1288,17 @@ static const struct firmware *e100_request_firmware(struct nic *nic) | |||
| 1273 | err = request_firmware(&fw, fw_name, &nic->pdev->dev); | 1288 | err = request_firmware(&fw, fw_name, &nic->pdev->dev); |
| 1274 | 1289 | ||
| 1275 | if (err) { | 1290 | if (err) { |
| 1276 | netif_err(nic, probe, nic->netdev, | 1291 | if (required) { |
| 1277 | "Failed to load firmware \"%s\": %d\n", | 1292 | netif_err(nic, probe, nic->netdev, |
| 1278 | fw_name, err); | 1293 | "Failed to load firmware \"%s\": %d\n", |
| 1279 | return ERR_PTR(err); | 1294 | fw_name, err); |
| 1295 | return ERR_PTR(err); | ||
| 1296 | } else { | ||
| 1297 | netif_info(nic, probe, nic->netdev, | ||
| 1298 | "CPUSaver disabled. Needs \"%s\": %d\n", | ||
| 1299 | fw_name, err); | ||
| 1300 | return NULL; | ||
| 1301 | } | ||
| 1280 | } | 1302 | } |
| 1281 | 1303 | ||
| 1282 | /* Firmware should be precisely UCODE_SIZE (words) plus three bytes | 1304 | /* Firmware should be precisely UCODE_SIZE (words) plus three bytes |
