/* Frees all URBs in the free list and marks the transmission as disabled.  */
void zd_usb_disable_tx(struct zd_usb *usb)
/* Frees all URBs in the free list and marks the transmission as disabled.  */
void zd_usb_disable_tx(struct zd_usb *usb)
{
	struct zd_usb_tx *tx = &usb->tx;
	unsigned long flags;
	struct list_head *pos, *n;
	spin_lock_irqsave(&tx->lock, flags);
	list_for_each_safe(pos, n, &tx->free_urb_list) {
		list_del(pos);
		usb_free_urb(list_entry(pos, struct urb, urb_list));
	}
	tx->enabled = 0;
	tx->submitted_urbs = 0;
	spin_unlock_irqrestore(&tx->lock, flags);
}