diff options
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r-- | drivers/firewire/fw-card.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index d929eb6fef6a..34863b60e23f 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c | |||
@@ -395,9 +395,9 @@ fw_card_add(struct fw_card *card, | |||
395 | card->link_speed = link_speed; | 395 | card->link_speed = link_speed; |
396 | card->guid = guid; | 396 | card->guid = guid; |
397 | 397 | ||
398 | /* FIXME: add #define's for phy registers. */ | ||
399 | /* Activate link_on bit and contender bit in our self ID packets.*/ | 398 | /* Activate link_on bit and contender bit in our self ID packets.*/ |
400 | if (card->driver->update_phy_reg(card, 4, 0, 0x80 | 0x40) < 0) | 399 | if (card->driver->update_phy_reg(card, 4, 0, |
400 | PHY_LINK_ACTIVE | PHY_CONTENDER) < 0) | ||
401 | return -EIO; | 401 | return -EIO; |
402 | 402 | ||
403 | /* The subsystem grabs a reference when the card is added and | 403 | /* The subsystem grabs a reference when the card is added and |
@@ -483,7 +483,8 @@ static struct fw_card_driver dummy_driver = { | |||
483 | void | 483 | void |
484 | fw_core_remove_card(struct fw_card *card) | 484 | fw_core_remove_card(struct fw_card *card) |
485 | { | 485 | { |
486 | card->driver->update_phy_reg(card, 4, 0x80 | 0x40, 0); | 486 | card->driver->update_phy_reg(card, 4, |
487 | PHY_LINK_ACTIVE | PHY_CONTENDER, 0); | ||
487 | fw_core_initiate_bus_reset(card, 1); | 488 | fw_core_initiate_bus_reset(card, 1); |
488 | 489 | ||
489 | down_write(&fw_bus_type.subsys.rwsem); | 490 | down_write(&fw_bus_type.subsys.rwsem); |
@@ -531,6 +532,11 @@ EXPORT_SYMBOL(fw_card_put); | |||
531 | int | 532 | int |
532 | fw_core_initiate_bus_reset(struct fw_card *card, int short_reset) | 533 | fw_core_initiate_bus_reset(struct fw_card *card, int short_reset) |
533 | { | 534 | { |
534 | return card->driver->update_phy_reg(card, short_reset ? 5 : 1, 0, 0x40); | 535 | int reg = short_reset ? 5 : 1; |
536 | /* The following values happen to be the same bit. However be | ||
537 | * explicit for clarity. */ | ||
538 | int bit = short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET; | ||
539 | |||
540 | return card->driver->update_phy_reg(card, reg, 0, bit); | ||
535 | } | 541 | } |
536 | EXPORT_SYMBOL(fw_core_initiate_bus_reset); | 542 | EXPORT_SYMBOL(fw_core_initiate_bus_reset); |