diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-15 10:31:40 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-26 15:51:28 -0500 |
commit | bd2371ebcc71d0a276ae341d735326a8beab6627 (patch) | |
tree | ac78665bd644b365f1ac74b6f656b83ea70e288d /drivers/net/e1000/e1000_hw.c | |
parent | 2b65326e67f89899e8bcaed1989d8cfb0ed01f55 (diff) |
e1000: For sanity, reformat e1000_set_mac_type(), struct e1000_hw[_stats]
Makes future changes a bit more readable.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000/e1000_hw.c')
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 270 |
1 files changed, 135 insertions, 135 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 3655d902b0bd..0201ca548cd1 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -308,141 +308,141 @@ e1000_phy_init_script(struct e1000_hw *hw) | |||
308 | int32_t | 308 | int32_t |
309 | e1000_set_mac_type(struct e1000_hw *hw) | 309 | e1000_set_mac_type(struct e1000_hw *hw) |
310 | { | 310 | { |
311 | DEBUGFUNC("e1000_set_mac_type"); | 311 | DEBUGFUNC("e1000_set_mac_type"); |
312 | 312 | ||
313 | switch (hw->device_id) { | 313 | switch (hw->device_id) { |
314 | case E1000_DEV_ID_82542: | 314 | case E1000_DEV_ID_82542: |
315 | switch (hw->revision_id) { | 315 | switch (hw->revision_id) { |
316 | case E1000_82542_2_0_REV_ID: | 316 | case E1000_82542_2_0_REV_ID: |
317 | hw->mac_type = e1000_82542_rev2_0; | 317 | hw->mac_type = e1000_82542_rev2_0; |
318 | break; | 318 | break; |
319 | case E1000_82542_2_1_REV_ID: | 319 | case E1000_82542_2_1_REV_ID: |
320 | hw->mac_type = e1000_82542_rev2_1; | 320 | hw->mac_type = e1000_82542_rev2_1; |
321 | break; | 321 | break; |
322 | default: | 322 | default: |
323 | /* Invalid 82542 revision ID */ | 323 | /* Invalid 82542 revision ID */ |
324 | return -E1000_ERR_MAC_TYPE; | 324 | return -E1000_ERR_MAC_TYPE; |
325 | } | 325 | } |
326 | break; | 326 | break; |
327 | case E1000_DEV_ID_82543GC_FIBER: | 327 | case E1000_DEV_ID_82543GC_FIBER: |
328 | case E1000_DEV_ID_82543GC_COPPER: | 328 | case E1000_DEV_ID_82543GC_COPPER: |
329 | hw->mac_type = e1000_82543; | 329 | hw->mac_type = e1000_82543; |
330 | break; | 330 | break; |
331 | case E1000_DEV_ID_82544EI_COPPER: | 331 | case E1000_DEV_ID_82544EI_COPPER: |
332 | case E1000_DEV_ID_82544EI_FIBER: | 332 | case E1000_DEV_ID_82544EI_FIBER: |
333 | case E1000_DEV_ID_82544GC_COPPER: | 333 | case E1000_DEV_ID_82544GC_COPPER: |
334 | case E1000_DEV_ID_82544GC_LOM: | 334 | case E1000_DEV_ID_82544GC_LOM: |
335 | hw->mac_type = e1000_82544; | 335 | hw->mac_type = e1000_82544; |
336 | break; | 336 | break; |
337 | case E1000_DEV_ID_82540EM: | 337 | case E1000_DEV_ID_82540EM: |
338 | case E1000_DEV_ID_82540EM_LOM: | 338 | case E1000_DEV_ID_82540EM_LOM: |
339 | case E1000_DEV_ID_82540EP: | 339 | case E1000_DEV_ID_82540EP: |
340 | case E1000_DEV_ID_82540EP_LOM: | 340 | case E1000_DEV_ID_82540EP_LOM: |
341 | case E1000_DEV_ID_82540EP_LP: | 341 | case E1000_DEV_ID_82540EP_LP: |
342 | hw->mac_type = e1000_82540; | 342 | hw->mac_type = e1000_82540; |
343 | break; | 343 | break; |
344 | case E1000_DEV_ID_82545EM_COPPER: | 344 | case E1000_DEV_ID_82545EM_COPPER: |
345 | case E1000_DEV_ID_82545EM_FIBER: | 345 | case E1000_DEV_ID_82545EM_FIBER: |
346 | hw->mac_type = e1000_82545; | 346 | hw->mac_type = e1000_82545; |
347 | break; | 347 | break; |
348 | case E1000_DEV_ID_82545GM_COPPER: | 348 | case E1000_DEV_ID_82545GM_COPPER: |
349 | case E1000_DEV_ID_82545GM_FIBER: | 349 | case E1000_DEV_ID_82545GM_FIBER: |
350 | case E1000_DEV_ID_82545GM_SERDES: | 350 | case E1000_DEV_ID_82545GM_SERDES: |
351 | hw->mac_type = e1000_82545_rev_3; | 351 | hw->mac_type = e1000_82545_rev_3; |
352 | break; | 352 | break; |
353 | case E1000_DEV_ID_82546EB_COPPER: | 353 | case E1000_DEV_ID_82546EB_COPPER: |
354 | case E1000_DEV_ID_82546EB_FIBER: | 354 | case E1000_DEV_ID_82546EB_FIBER: |
355 | case E1000_DEV_ID_82546EB_QUAD_COPPER: | 355 | case E1000_DEV_ID_82546EB_QUAD_COPPER: |
356 | hw->mac_type = e1000_82546; | 356 | hw->mac_type = e1000_82546; |
357 | break; | 357 | break; |
358 | case E1000_DEV_ID_82546GB_COPPER: | 358 | case E1000_DEV_ID_82546GB_COPPER: |
359 | case E1000_DEV_ID_82546GB_FIBER: | 359 | case E1000_DEV_ID_82546GB_FIBER: |
360 | case E1000_DEV_ID_82546GB_SERDES: | 360 | case E1000_DEV_ID_82546GB_SERDES: |
361 | case E1000_DEV_ID_82546GB_PCIE: | 361 | case E1000_DEV_ID_82546GB_PCIE: |
362 | case E1000_DEV_ID_82546GB_QUAD_COPPER: | 362 | case E1000_DEV_ID_82546GB_QUAD_COPPER: |
363 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: | 363 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: |
364 | hw->mac_type = e1000_82546_rev_3; | 364 | hw->mac_type = e1000_82546_rev_3; |
365 | break; | 365 | break; |
366 | case E1000_DEV_ID_82541EI: | 366 | case E1000_DEV_ID_82541EI: |
367 | case E1000_DEV_ID_82541EI_MOBILE: | 367 | case E1000_DEV_ID_82541EI_MOBILE: |
368 | case E1000_DEV_ID_82541ER_LOM: | 368 | case E1000_DEV_ID_82541ER_LOM: |
369 | hw->mac_type = e1000_82541; | 369 | hw->mac_type = e1000_82541; |
370 | break; | 370 | break; |
371 | case E1000_DEV_ID_82541ER: | 371 | case E1000_DEV_ID_82541ER: |
372 | case E1000_DEV_ID_82541GI: | 372 | case E1000_DEV_ID_82541GI: |
373 | case E1000_DEV_ID_82541GI_LF: | 373 | case E1000_DEV_ID_82541GI_LF: |
374 | case E1000_DEV_ID_82541GI_MOBILE: | 374 | case E1000_DEV_ID_82541GI_MOBILE: |
375 | hw->mac_type = e1000_82541_rev_2; | 375 | hw->mac_type = e1000_82541_rev_2; |
376 | break; | 376 | break; |
377 | case E1000_DEV_ID_82547EI: | 377 | case E1000_DEV_ID_82547EI: |
378 | case E1000_DEV_ID_82547EI_MOBILE: | 378 | case E1000_DEV_ID_82547EI_MOBILE: |
379 | hw->mac_type = e1000_82547; | 379 | hw->mac_type = e1000_82547; |
380 | break; | 380 | break; |
381 | case E1000_DEV_ID_82547GI: | 381 | case E1000_DEV_ID_82547GI: |
382 | hw->mac_type = e1000_82547_rev_2; | 382 | hw->mac_type = e1000_82547_rev_2; |
383 | break; | 383 | break; |
384 | case E1000_DEV_ID_82571EB_COPPER: | 384 | case E1000_DEV_ID_82571EB_COPPER: |
385 | case E1000_DEV_ID_82571EB_FIBER: | 385 | case E1000_DEV_ID_82571EB_FIBER: |
386 | case E1000_DEV_ID_82571EB_SERDES: | 386 | case E1000_DEV_ID_82571EB_SERDES: |
387 | case E1000_DEV_ID_82571EB_QUAD_COPPER: | 387 | case E1000_DEV_ID_82571EB_QUAD_COPPER: |
388 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: | 388 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: |
389 | hw->mac_type = e1000_82571; | 389 | hw->mac_type = e1000_82571; |
390 | break; | 390 | break; |
391 | case E1000_DEV_ID_82572EI_COPPER: | 391 | case E1000_DEV_ID_82572EI_COPPER: |
392 | case E1000_DEV_ID_82572EI_FIBER: | 392 | case E1000_DEV_ID_82572EI_FIBER: |
393 | case E1000_DEV_ID_82572EI_SERDES: | 393 | case E1000_DEV_ID_82572EI_SERDES: |
394 | case E1000_DEV_ID_82572EI: | 394 | case E1000_DEV_ID_82572EI: |
395 | hw->mac_type = e1000_82572; | 395 | hw->mac_type = e1000_82572; |
396 | break; | 396 | break; |
397 | case E1000_DEV_ID_82573E: | 397 | case E1000_DEV_ID_82573E: |
398 | case E1000_DEV_ID_82573E_IAMT: | 398 | case E1000_DEV_ID_82573E_IAMT: |
399 | case E1000_DEV_ID_82573L: | 399 | case E1000_DEV_ID_82573L: |
400 | hw->mac_type = e1000_82573; | 400 | hw->mac_type = e1000_82573; |
401 | break; | 401 | break; |
402 | case E1000_DEV_ID_80003ES2LAN_COPPER_SPT: | 402 | case E1000_DEV_ID_80003ES2LAN_COPPER_SPT: |
403 | case E1000_DEV_ID_80003ES2LAN_SERDES_SPT: | 403 | case E1000_DEV_ID_80003ES2LAN_SERDES_SPT: |
404 | case E1000_DEV_ID_80003ES2LAN_COPPER_DPT: | 404 | case E1000_DEV_ID_80003ES2LAN_COPPER_DPT: |
405 | case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: | 405 | case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: |
406 | hw->mac_type = e1000_80003es2lan; | 406 | hw->mac_type = e1000_80003es2lan; |
407 | break; | 407 | break; |
408 | case E1000_DEV_ID_ICH8_IGP_M_AMT: | 408 | case E1000_DEV_ID_ICH8_IGP_M_AMT: |
409 | case E1000_DEV_ID_ICH8_IGP_AMT: | 409 | case E1000_DEV_ID_ICH8_IGP_AMT: |
410 | case E1000_DEV_ID_ICH8_IGP_C: | 410 | case E1000_DEV_ID_ICH8_IGP_C: |
411 | case E1000_DEV_ID_ICH8_IFE: | 411 | case E1000_DEV_ID_ICH8_IFE: |
412 | case E1000_DEV_ID_ICH8_IFE_GT: | 412 | case E1000_DEV_ID_ICH8_IFE_GT: |
413 | case E1000_DEV_ID_ICH8_IFE_G: | 413 | case E1000_DEV_ID_ICH8_IFE_G: |
414 | case E1000_DEV_ID_ICH8_IGP_M: | 414 | case E1000_DEV_ID_ICH8_IGP_M: |
415 | hw->mac_type = e1000_ich8lan; | 415 | hw->mac_type = e1000_ich8lan; |
416 | break; | 416 | break; |
417 | default: | 417 | default: |
418 | /* Should never have loaded on this device */ | 418 | /* Should never have loaded on this device */ |
419 | return -E1000_ERR_MAC_TYPE; | 419 | return -E1000_ERR_MAC_TYPE; |
420 | } | 420 | } |
421 | 421 | ||
422 | switch (hw->mac_type) { | 422 | switch (hw->mac_type) { |
423 | case e1000_ich8lan: | 423 | case e1000_ich8lan: |
424 | hw->swfwhw_semaphore_present = TRUE; | 424 | hw->swfwhw_semaphore_present = TRUE; |
425 | hw->asf_firmware_present = TRUE; | 425 | hw->asf_firmware_present = TRUE; |
426 | break; | 426 | break; |
427 | case e1000_80003es2lan: | 427 | case e1000_80003es2lan: |
428 | hw->swfw_sync_present = TRUE; | 428 | hw->swfw_sync_present = TRUE; |
429 | /* fall through */ | 429 | /* fall through */ |
430 | case e1000_82571: | 430 | case e1000_82571: |
431 | case e1000_82572: | 431 | case e1000_82572: |
432 | case e1000_82573: | 432 | case e1000_82573: |
433 | hw->eeprom_semaphore_present = TRUE; | 433 | hw->eeprom_semaphore_present = TRUE; |
434 | /* fall through */ | 434 | /* fall through */ |
435 | case e1000_82541: | 435 | case e1000_82541: |
436 | case e1000_82547: | 436 | case e1000_82547: |
437 | case e1000_82541_rev_2: | 437 | case e1000_82541_rev_2: |
438 | case e1000_82547_rev_2: | 438 | case e1000_82547_rev_2: |
439 | hw->asf_firmware_present = TRUE; | 439 | hw->asf_firmware_present = TRUE; |
440 | break; | 440 | break; |
441 | default: | 441 | default: |
442 | break; | 442 | break; |
443 | } | 443 | } |
444 | 444 | ||
445 | return E1000_SUCCESS; | 445 | return E1000_SUCCESS; |
446 | } | 446 | } |
447 | 447 | ||
448 | /***************************************************************************** | 448 | /***************************************************************************** |