Skip to contentSkip to conversation

potential bug in cxgb3

RFC Al Viro 1 participant 1 message Dec 23, 2007

Subsystems (2)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

int t3_seeprom_wp(struct adapter *adapter, int enable)

{
        return t3_seeprom_write(adapter, EEPROM_STAT_ADDR, enable ? 0xc : 0);
}

looks fishy, since t3_seeprom_write() takes the last argument in little-endian, converts to host-endian and feeds it to pci_write_config_dword(). Passing it a host-endian instead will end up with different values seen by the card on l-e and b-e hosts. Shouldn't it be s/0xc/cpu_to_le32(0xc) ?