2006-01-30 15:36:56

by René Rebe

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: [PATCH] Adaptec USBXchange and USB2Xchange support

Hi,

On Monday 30 January 2006 16:22, Oliver Neukum wrote:
> Am Montag, 30. Januar 2006 14:22 schrieb Ren? Rebe:
> > +???????/* Stop CPU */
> > +???????err = usbxchange_set_reset(dev, cpureg, 1);
> > +???????err = usbxchange_set_reset(dev, cpureg, 1);
> > +???????if (err < 0) {
> > +???????????????printk(KERN_ERR "%s - error stopping dongle CPU: error = %d\n",
> > +??????????????? ? ? ? __FUNCTION__, err);
> > +???????????????return err;
> > +???????}
>
> [..]
>
> > +???????/* De-assert reset (let the CPU run) */
> > +???????err = usbxchange_set_reset(dev, cpureg, 1);
> > +???????err = usbxchange_set_reset(dev, cpureg, 0);
> > +???????if (err < 0) {
> > +???????????????printk(KERN_ERR "%s - error resetting dongle CPU: error = %d\n",
> > +??????????????? ? ? ? __FUNCTION__, err);
> > +???????????????return err;
> > +???????}
>
> Do you really want to ignore errors the first usbxchange_set_reset()s return?

It is not really likely that the first one fails and the second succeeds. But yes,
I could add an if (err == 0) before the 2nd send and skip it when the first already
failed.

I can resent with more suggestions accumulated.

Yours,

--
Ren? Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
http://www.exactcode.de | http://www.t2-project.org
+49 (0)30 255 897 45