Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256636
b: refs/heads/master
c: 9f42617
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Jul 9, 2011
1 parent 9ccfeca commit cd10475
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 215fa444c2a6d571f1f915cf3dc7a8b01cc51a0a
refs/heads/master: 9f426173e54a4f0882f9516c226f3165a3bd5474
11 changes: 7 additions & 4 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card)
#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8

#define OHCI1394_REGISTER_SIZE 0x800
#define OHCI_LOOP_COUNT 500
#define OHCI1394_PCI_HCI_Control 0x40
#define SELF_ID_BUF_SIZE 0x800
#define OHCI_TCODE_PHY_PACKET 0x0e
Expand Down Expand Up @@ -1967,14 +1966,18 @@ static irqreturn_t irq_handler(int irq, void *data)

static int software_reset(struct fw_ohci *ohci)
{
u32 val;
int i;

reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_softReset);
for (i = 0; i < 500; i++) {
val = reg_read(ohci, OHCI1394_HCControlSet);
if (!~val)
return -ENODEV; /* Card was ejected. */

for (i = 0; i < OHCI_LOOP_COUNT; i++) {
if ((reg_read(ohci, OHCI1394_HCControlSet) &
OHCI1394_HCControl_softReset) == 0)
if (!(val & OHCI1394_HCControl_softReset))
return 0;

msleep(1);
}

Expand Down

0 comments on commit cd10475

Please sign in to comment.