switch (eeprom_size) { case EEPROM_SIZE_16KB: eeprom->word_size = 8192; break; case EEPROM_SIZE_8KB: eeprom->word_size = 4096; break; case EEPROM_SIZE_4KB: eeprom->word_size = 2048; break; case EEPROM_SIZE_2KB: eeprom->word_size = 1024; break; case EEPROM_SIZE_1KB: eeprom->word_size = 512; break; case EEPROM_SIZE_512B: eeprom->word_size = 256; break; case EEPROM_SIZE_128B: default: eeprom->word_size = 64; break; } } 
eeprom->word_size = 1 << (eeprom_size + EEPROM_WORD_SIZE_SHIFT); 
e1000_init_eeprom_params(struct e1000_hw *hw){    struct e1000_eeprom_info *eeprom = &hw->eeprom;    uint32_t eecd = E1000_READ_REG(hw, EECD);    uint16_t eeprom_size;    DEBUGFUNC("e1000_init_eeprom_params");    switch (hw->mac_type) {    case e1000_82542_rev2_0:    case e1000_82542_rev2_1:    case e1000_82543:    case e1000_82544:        eeprom->type = e1000_eeprom_microwire;        eeprom->word_size = 64;        eeprom->opcode_bits = 3;        eeprom->address_bits = 6;        eeprom->delay_usec = 50;        break;    case e1000_82540:    case e1000_82545:    case e1000_82545_rev_3:    case e1000_82546:    case e1000_82546_rev_3:        eeprom->type = e1000_eeprom_microwire;        eeprom->opcode_bits = 3;        eeprom->delay_usec = 50;        if(eecd & E1000_EECD_SIZE) {            eeprom->word_size = 256;            eeprom->address_bits = 8;        } else {            eeprom->word_size = 64;            eeprom->address_bits = 6;        }        break;    case e1000_82541:    case e1000_82541_rev_2:    case e1000_82547:    case e1000_82547_rev_2:        if (eecd & E1000_EECD_TYPE) {            eeprom->type = e1000_eeprom_spi;            eeprom->opcode_bits = 8;            eeprom->delay_usec = 1;            if (eecd & E1000_EECD_ADDR_BITS) {                eeprom->page_size = 32;                eeprom->address_bits = 16;            } else {                eeprom->page_size = 8;                eeprom->address_bits = 8;            }        } else {            eeprom->type = e1000_eeprom_microwire;            eeprom->opcode_bits = 3;            eeprom->delay_usec = 50;            if (eecd & E1000_EECD_ADDR_BITS) {                eeprom->word_size = 256;                eeprom->address_bits = 8;            } else {                eeprom->word_size = 64;                eeprom->address_bits = 6;            }        }        break;    default:        break;    }    if (eeprom->type == e1000_eeprom_spi) {        eeprom->word_size = 64;        if (e1000_read_eeprom(hw, EEPROM_CFG, 1, &eeprom_size) == 0) {            eeprom_size &= EEPROM_SIZE_MASK;            switch (eeprom_size) {            case EEPROM_SIZE_16KB:                eeprom->word_size = 8192;                break;            case EEPROM_SIZE_8KB:                eeprom->word_size = 4096;                break;            case EEPROM_SIZE_4KB:                eeprom->word_size = 2048;                break;            case EEPROM_SIZE_2KB:                eeprom->word_size = 1024;                break;            case EEPROM_SIZE_1KB:                eeprom->word_size = 512;                break;            case EEPROM_SIZE_512B:                eeprom->word_size = 256;                break;            case EEPROM_SIZE_128B:            default:                eeprom->word_size = 64;                break;            }        }    }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_hw.c/buggy/drivers/net/e1000/e1000_hw.c