[PATCH] UEAGLE : add iso support and commestic stuff

Alexey Dobriyan adobriyan at gmail.com
Fri Jan 13 13:44:41 EST 2006


On Fri, Jan 13, 2006 at 06:51:30PM +0100, matthieu castet wrote:
> this patch mainly adds the support for isochronous pipe.
> There are also some cosmetic stuff (please tell me if you want them in a
> extra patch).

This patch should be shrinked by >50% by dropping unrelated changes.
It'd make it much easier to read.

> --- Linux.orig/drivers/usb/atm/ueagle-atm.c
> +++ Linux/drivers/usb/atm/ueagle-atm.c
> @@ -628,8 +631,7 @@
>  			dsp_name = FW_DIR "DSPep.bin";
>  	}
>  
> -	ret = request_firmware(&sc->dsp_firm,
> -				dsp_name, &sc->usb_dev->dev);
> +	ret = request_firmware(&sc->dsp_firm, dsp_name, &sc->usb_dev->dev);
>  	if (ret < 0) {
>  		uea_err(INS_TO_USBDEV(sc),
>  		       "requesting firmware %s failed with error %d\n",
> @@ -744,7 +746,6 @@
>  		return ret;
>  
>  	return (ret == 0) ? -ETIMEDOUT : 0;
> -
>  }
>  
>  #define UCDC_SEND_ENCAPSULATED_COMMAND 0x00
> @@ -1184,8 +1186,7 @@
>  		}
>  	}
>  
> -	/* finish to send the fpga
> -	 */
> +	/* finish to send the fpga */
>  	ret = uea_request(sc, 0xe, 1, 0, NULL);
>  	if (ret < 0) {
>  		uea_err(INS_TO_USBDEV(sc),
> @@ -1193,9 +1194,7 @@
>  		goto err1;
>  	}
>  
> -	/*
> -	 * Tell the modem we finish : de-assert reset
> -	 */
> +	/* Tell the modem we finish : de-assert reset */
>  	value = 0;
>  	ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
>  	if (ret < 0)
> @@ -1268,23 +1268,19 @@
>   */
>  static void uea_intr(struct urb *urb, struct pt_regs *regs)
>  {
> -	struct uea_softc *sc = (struct uea_softc *)urb->context;
> -	struct intr_pkt *intr;
> +	struct uea_softc *sc = urb->context;
> +	struct intr_pkt *intr = urb->transfer_buffer;
>  	uea_enters(INS_TO_USBDEV(sc));
>  
> -	if (urb->status < 0) {
> +	if (unlikely(urb->status < 0)) {
>  		uea_err(INS_TO_USBDEV(sc), "uea_intr() failed with %d\n",
>  		       urb->status);
>  		return;
>  	}
>  
> -	intr = (struct intr_pkt *) urb->transfer_buffer;
> -
>  	/* device-to-host interrupt */
>  	if (intr->bType != 0x08 || sc->booting) {
> -		uea_err(INS_TO_USBDEV(sc), "wrong intr\n");
> -		// rebooting ?
> -		// sc->reset = 1;
> +		uea_err(INS_TO_USBDEV(sc), "wrong interrupt\n");
>  		goto resubmit;
>  	}
>  
> @@ -1300,7 +1296,7 @@
>  		break;
>  
>  	default:
> -		uea_err(INS_TO_USBDEV(sc), "unknown intr %u\n",
> +		uea_err(INS_TO_USBDEV(sc), "unknown interrupt %u\n",
>  		       le16_to_cpu(intr->wInterrupt));
>  	}
>  
> @@ -1379,7 +1375,7 @@
>  	int ret;
>  	uea_enters(INS_TO_USBDEV(sc));
>  	ret = kthread_stop(sc->kthread);
> -	uea_info(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
> +	uea_dbg(INS_TO_USBDEV(sc), "kthread finish with status %d\n", ret);
>  
>  	/* stop any pending boot process */
>  	flush_scheduled_work();
> @@ -1636,9 +1632,7 @@
>  	if (ret < 0)
>  		return ret;
>  
> -	/* ADI930 has only 2 interfaces and inbound traffic
> -	 * is on interface 1
> -	 */
> +	/* ADI930 has only 2 interfaces and inbound traffic is on interface 1 */
>  	if (UEA_CHIP_VERSION(id) != ADI930) {
>  		/* interface 2 is for inbound traffic */
>  		ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



More information about the Usbatm mailing list