X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fieee1394%2Fieee1394_transactions.c;h=675b3135d5f19a78816976b0835deb54468c94af;hb=3879f5d6f03b66626af014cbb6071ad4d79b1c42;hp=c39c70a8aa9fce1e8eae54cdd0df6ab3a0c4a1e5;hpb=4c75f7416f51b0c6855952467a5db04f9c598f09;p=mv-sheeva.git diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c index c39c70a8aa9..675b3135d5f 100644 --- a/drivers/ieee1394/ieee1394_transactions.c +++ b/drivers/ieee1394/ieee1394_transactions.c @@ -235,7 +235,6 @@ int hpsb_packet_success(struct hpsb_packet *packet) packet->node_id); return -EAGAIN; } - BUG(); case ACK_BUSY_X: case ACK_BUSY_A: @@ -282,7 +281,6 @@ int hpsb_packet_success(struct hpsb_packet *packet) packet->ack_code, packet->node_id, packet->tcode); return -EAGAIN; } - BUG(); } struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node, @@ -503,8 +501,6 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation, if (length == 0) return -EINVAL; - BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet - packet = hpsb_make_readpacket(host, node, addr, length); if (!packet) { @@ -552,8 +548,6 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, if (length == 0) return -EINVAL; - BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet - packet = hpsb_make_writepacket(host, node, addr, buffer, length); if (!packet) @@ -573,16 +567,12 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, return retval; } -#if 0 - int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation, - u64 addr, int extcode, quadlet_t * data, quadlet_t arg) + u64 addr, int extcode, quadlet_t *data, quadlet_t arg) { struct hpsb_packet *packet; int retval = 0; - BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet - packet = hpsb_make_lockpacket(host, node, addr, extcode, data, arg); if (!packet) return -ENOMEM; @@ -594,49 +584,12 @@ int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation, retval = hpsb_packet_success(packet); - if (retval == 0) { + if (retval == 0) *data = packet->data[0]; - } - hpsb_lock_fail: +hpsb_lock_fail: hpsb_free_tlabel(packet); hpsb_free_packet(packet); return retval; } - -int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, - quadlet_t * buffer, size_t length, u32 specifier_id, - unsigned int version) -{ - struct hpsb_packet *packet; - int retval = 0; - u16 specifier_id_hi = (specifier_id & 0x00ffff00) >> 8; - u8 specifier_id_lo = specifier_id & 0xff; - - HPSB_VERBOSE("Send GASP: channel = %d, length = %Zd", channel, length); - - length += 8; - - packet = hpsb_make_streampacket(host, NULL, length, channel, 3, 0); - if (!packet) - return -ENOMEM; - - packet->data[0] = cpu_to_be32((host->node_id << 16) | specifier_id_hi); - packet->data[1] = - cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff)); - - memcpy(&(packet->data[2]), buffer, length - 8); - - packet->generation = generation; - - packet->no_waiter = 1; - - retval = hpsb_send_packet(packet); - if (retval < 0) - hpsb_free_packet(packet); - - return retval; -} - -#endif /* 0 */