From: Stefan Richter Date: Tue, 21 Jun 2011 13:24:26 +0000 (+0200) Subject: firewire: ohci: add a comment on PHY reg access serialization X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=b14c369d87d7fbf120ad21919d34a8f1290290f1;p=linux-edison.git firewire: ohci: add a comment on PHY reg access serialization Signed-off-by: Stefan Richter --- diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 3b6f3429fb4..a818dc83469 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -513,6 +513,12 @@ static inline void flush_writes(const struct fw_ohci *ohci) reg_read(ohci, OHCI1394_Version); } +/* + * Beware! read_phy_reg(), write_phy_reg(), update_phy_reg(), and + * read_paged_phy_reg() require the caller to hold ohci->phy_reg_mutex. + * In other words, only use ohci_read_phy_reg() and ohci_update_phy_reg() + * directly. Exceptions are intrinsically serialized contexts like pci_probe. + */ static int read_phy_reg(struct fw_ohci *ohci, int addr) { u32 val;