/* Return value: 0 on success, negative errno on failure.  */
int hpsb_send_packet_and_wait(struct hpsb_packet *packet)
/* Return value: 0 on success, negative errno on failure.  */
int hpsb_send_packet_and_wait(struct hpsb_packet *packet)
{
	struct completion done;
	int retval;
	init_completion(&done);
	hpsb_set_packet_complete_task(packet, complete_packet, &done);
	retval = hpsb_send_packet(packet);
	if (retval == 0)
		wait_for_completion(&done);
	return retval;
}