diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/ieee1394_core.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index f2f5e4805b5f..ff8a40980607 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -463,6 +463,7 @@ void hpsb_packet_sent(struct hpsb_host *host, struct hpsb_packet *packet, | |||
463 | int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt) | 463 | int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt) |
464 | { | 464 | { |
465 | struct hpsb_packet *packet; | 465 | struct hpsb_packet *packet; |
466 | quadlet_t d = 0; | ||
466 | int retval = 0; | 467 | int retval = 0; |
467 | 468 | ||
468 | if (rootid >= ALL_NODES || rootid < -1 || gapcnt > 0x3f || gapcnt < -1 || | 469 | if (rootid >= ALL_NODES || rootid < -1 || gapcnt > 0x3f || gapcnt < -1 || |
@@ -472,26 +473,16 @@ int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt) | |||
472 | return -EINVAL; | 473 | return -EINVAL; |
473 | } | 474 | } |
474 | 475 | ||
475 | packet = hpsb_alloc_packet(0); | ||
476 | if (!packet) | ||
477 | return -ENOMEM; | ||
478 | |||
479 | packet->host = host; | ||
480 | packet->header_size = 8; | ||
481 | packet->data_size = 0; | ||
482 | packet->expect_response = 0; | ||
483 | packet->no_waiter = 0; | ||
484 | packet->type = hpsb_raw; | ||
485 | packet->header[0] = 0; | ||
486 | if (rootid != -1) | 476 | if (rootid != -1) |
487 | packet->header[0] |= rootid << 24 | 1 << 23; | 477 | d |= PHYPACKET_PHYCONFIG_R | rootid << PHYPACKET_PORT_SHIFT; |
488 | if (gapcnt != -1) | 478 | if (gapcnt != -1) |
489 | packet->header[0] |= gapcnt << 16 | 1 << 22; | 479 | d |= PHYPACKET_PHYCONFIG_T | gapcnt << PHYPACKET_GAPCOUNT_SHIFT; |
490 | 480 | ||
491 | packet->header[1] = ~packet->header[0]; | 481 | packet = hpsb_make_phypacket(host, d); |
482 | if (!packet) | ||
483 | return -ENOMEM; | ||
492 | 484 | ||
493 | packet->generation = get_hpsb_generation(host); | 485 | packet->generation = get_hpsb_generation(host); |
494 | |||
495 | retval = hpsb_send_packet_and_wait(packet); | 486 | retval = hpsb_send_packet_and_wait(packet); |
496 | hpsb_free_packet(packet); | 487 | hpsb_free_packet(packet); |
497 | 488 | ||