aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-06-05 14:50:53 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-06-18 18:12:35 -0400
commitaffc9c24ade666f9903163c12686da567dbfe06f (patch)
tree3beff66f52c3201bd24b6dd6777c2942373c9881
parente896ec4302f45fdaf2fc78aec0093eca5478fe28 (diff)
firewire: fw-ohci: write selfIDBufferPtr before LinkControl.rcvSelfID
OHCI 1.1 clause 5.10 requires that selfIDBufferPtr is valid when a 1 is written into LinkControl.rcvSelfID. This driver bug has so far not been known to cause harm because most chips obviously accept a later selfIDBufferPtr write, at least before HCControl.linkEnable is written. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
-rw-r--r--drivers/firewire/fw-ohci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 481d3f3e2ef7..96e3cce36931 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1473,6 +1473,7 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
1473 reg_write(ohci, OHCI1394_HCControlClear, 1473 reg_write(ohci, OHCI1394_HCControlClear,
1474 OHCI1394_HCControl_noByteSwapData); 1474 OHCI1394_HCControl_noByteSwapData);
1475 1475
1476 reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->self_id_bus);
1476 reg_write(ohci, OHCI1394_LinkControlClear, 1477 reg_write(ohci, OHCI1394_LinkControlClear,
1477 OHCI1394_LinkControl_rcvPhyPkt); 1478 OHCI1394_LinkControl_rcvPhyPkt);
1478 reg_write(ohci, OHCI1394_LinkControlSet, 1479 reg_write(ohci, OHCI1394_LinkControlSet,
@@ -1488,7 +1489,6 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
1488 ar_context_run(&ohci->ar_request_ctx); 1489 ar_context_run(&ohci->ar_request_ctx);
1489 ar_context_run(&ohci->ar_response_ctx); 1490 ar_context_run(&ohci->ar_response_ctx);
1490 1491
1491 reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->self_id_bus);
1492 reg_write(ohci, OHCI1394_PhyUpperBound, 0x00010000); 1492 reg_write(ohci, OHCI1394_PhyUpperBound, 0x00010000);
1493 reg_write(ohci, OHCI1394_IntEventClear, ~0); 1493 reg_write(ohci, OHCI1394_IntEventClear, ~0);
1494 reg_write(ohci, OHCI1394_IntMaskClear, ~0); 1494 reg_write(ohci, OHCI1394_IntMaskClear, ~0);