From 796083cb1d45d52d40ae2c933afcfc56d91ef427 Mon Sep 17 00:00:00 2001 From: Ben Cahill Date: Thu, 29 Nov 2007 11:09:45 +0800 Subject: iwlwifi: add comments to EEPROM stuff Add comments to EEPROM stuff. Signed-off-by: Ben Cahill Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-3945.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 953a9bec063..51b90309ce5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -2202,6 +2202,7 @@ int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv) &rate_cmd); } +/* Called when initializing driver */ int iwl3945_hw_set_hw_setting(struct iwl3945_priv *priv) { memset((void *)&priv->hw_setting, 0, @@ -2284,6 +2285,14 @@ struct pci_device_id iwl3945_hw_card_ids[] = { {0} }; +/* + * Clear the OWNER_MSK, to establish driver (instead of uCode running on + * embedded controller) as EEPROM reader; each read is a series of pulses + * to/from the EEPROM chip, not a single event, so even reads could conflict + * if they weren't arbitrated by some ownership mechanism. Here, the driver + * simply claims ownership, which should be safe when this function is called + * (i.e. before loading uCode!). + */ inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) { _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); -- cgit v1.2.3