kernels/linux-2.4.0/drivers/ieee1394/ieee1394_core.c
/**
 * hpsb_send_packet - transmit a packet on the bus
 * @packet: packet to send
 *
 * The packet is sent through the host specified in the packet->host field.
 * Before sending, the packet's transmit speed is automatically determined using
 * the local speed map when it is an async, non-broadcast packet.
 *
 * Possibilities for failure are that host is either not initialized, in bus
 * reset, the packet's generation number doesn't match the current generation
 * number or the host reports a transmit error.
 *
 * Return value: False (0) on failure, true (1) otherwise.
 */
transmit a packet on the bus
@packet: packet to send

The packet is sent through the host specified in the packet->host field.
Before sending, the packet's transmit speed is automatically determined using
the local speed map when it is an async, non-broadcast packet.

Possibilities for failure are that host is either not initialized, in bus
reset, the packet's generation number doesn't match the current generation
number or the host reports a transmit error.

Return value: False (0) on failure, true (1) otherwise.
transmit a packet on the bus @packet : packet to send The packet is sent through the host specified in the packet - > host field . Before sending the packet ' s transmit speed is automatically determined using the local speed map when it is an async non - broadcast packet . Possibilities for failure are that host is either not initialized in bus reset the packet ' s generation number doesn ' t match the current generation number or the host reports a transmit error . Return value : False ( 0 ) on failure true ( 1 ) otherwise .
int hpsb_send_packet(struct hpsb_packet *packet)
{
        struct hpsb_host *host = packet->host;
        if (!host->initialized || host->in_bus_reset 
            || (packet->generation != get_hpsb_generation())) {
                return 0;
        }
        packet->state = queued;
        if (packet->type == async && packet->node_id != ALL_NODES) {
                packet->speed_code =
                        host->speed_map[(host->node_id & NODE_MASK) * 64
                                       + (packet->node_id & NODE_MASK)];
        }
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
        switch (packet->speed_code) {
        case 2:
                dump_packet("send packet 400:", packet->header,
                            packet->header_size);
                break;
        case 1:
                dump_packet("send packet 200:", packet->header,
                            packet->header_size);
                break;
        default:
                dump_packet("send packet 100:", packet->header,
                            packet->header_size);
        }
#endif
        return host->template->transmit_packet(host, packet);
}
int hpsb_send_packet ( struct hpsb_packet * packet ) { struct hpsb_host * host = packet -> host ; if ( ! host -> initialized || host -> in_bus_reset || ( packet -> generation != get_hpsb_generation ( ) ) ) { return 0 ; } packet -> state = queued ; if ( packet -> type == async && packet -> node_id != ALL_NODES ) { packet -> speed_code = host -> speed_map [ ( host -> node_id & NODE_MASK ) * 64 + ( packet -> node_id & NODE_MASK ) ] ; } #ifdef CONFIG_IEEE1394_VERBOSEDEBUG switch ( packet -> speed_code ) { case 2 : dump_packet ( " " , packet -> header , packet -> header_size ) ; break ; case 1 : dump_packet ( " " , packet -> header , packet -> header_size ) ; break ; default : dump_packet ( " " , packet -> header , packet -> header_size ) ; } #endif return host -> template -> transmit_packet ( host , packet ) ; }
hpsb_send_packet - transmit a packet on the bus
 @packet: packet to send
hpsb_send_packet - transmit a packet on the bus @packet : packet to send