Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15409
b: refs/heads/master
c: 546513f
h: refs/heads/master
i:
  15407: d509177
v: v3
  • Loading branch information
Stefan Richter authored and Jody McIntyre committed Dec 1, 2005
1 parent 99778ca commit c4cb296
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 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: d7758461b9a8253f1c125e5907579e0594d29e3b
refs/heads/master: 546513f9fd96cba613cc2d025ee03d32d79394b7
21 changes: 6 additions & 15 deletions trunk/drivers/ieee1394/ieee1394_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ void hpsb_packet_sent(struct hpsb_host *host, struct hpsb_packet *packet,
int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt)
{
struct hpsb_packet *packet;
quadlet_t d = 0;
int retval = 0;

if (rootid >= ALL_NODES || rootid < -1 || gapcnt > 0x3f || gapcnt < -1 ||
Expand All @@ -472,26 +473,16 @@ int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt)
return -EINVAL;
}

packet = hpsb_alloc_packet(0);
if (!packet)
return -ENOMEM;

packet->host = host;
packet->header_size = 8;
packet->data_size = 0;
packet->expect_response = 0;
packet->no_waiter = 0;
packet->type = hpsb_raw;
packet->header[0] = 0;
if (rootid != -1)
packet->header[0] |= rootid << 24 | 1 << 23;
d |= PHYPACKET_PHYCONFIG_R | rootid << PHYPACKET_PORT_SHIFT;
if (gapcnt != -1)
packet->header[0] |= gapcnt << 16 | 1 << 22;
d |= PHYPACKET_PHYCONFIG_T | gapcnt << PHYPACKET_GAPCOUNT_SHIFT;

packet->header[1] = ~packet->header[0];
packet = hpsb_make_phypacket(host, d);
if (!packet)
return -ENOMEM;

packet->generation = get_hpsb_generation(host);

retval = hpsb_send_packet_and_wait(packet);
hpsb_free_packet(packet);

Expand Down

0 comments on commit c4cb296

Please sign in to comment.