diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 5dee8e512c7d..7d95de9d034a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -4687,14 +4687,23 @@ struct pci_device_id iwl4965_hw_card_ids[] = { | |||
4687 | {0} | 4687 | {0} |
4688 | }; | 4688 | }; |
4689 | 4689 | ||
4690 | /* | ||
4691 | * The device's EEPROM semaphore prevents conflicts between driver and uCode | ||
4692 | * when accessing the EEPROM; each access is a series of pulses to/from the | ||
4693 | * EEPROM chip, not a single event, so even reads could conflict if they | ||
4694 | * weren't arbitrated by the semaphore. | ||
4695 | */ | ||
4690 | int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv) | 4696 | int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv) |
4691 | { | 4697 | { |
4692 | u16 count; | 4698 | u16 count; |
4693 | int rc; | 4699 | int rc; |
4694 | 4700 | ||
4695 | for (count = 0; count < EEPROM_SEM_RETRY_LIMIT; count++) { | 4701 | for (count = 0; count < EEPROM_SEM_RETRY_LIMIT; count++) { |
4702 | /* Request semaphore */ | ||
4696 | iwl4965_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 4703 | iwl4965_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
4697 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); | 4704 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); |
4705 | |||
4706 | /* See if we got it */ | ||
4698 | rc = iwl4965_poll_bit(priv, CSR_HW_IF_CONFIG_REG, | 4707 | rc = iwl4965_poll_bit(priv, CSR_HW_IF_CONFIG_REG, |
4699 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, | 4708 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, |
4700 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, | 4709 | CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, |