Re: [PATCH] USB: add USB test and measurement class driver - round 2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oliver Neukum
Date: Thursday, August 28, 2008 - 3:10 am

Am Donnerstag 28 August 2008 01:47:20 schrieb Greg KH:

OK, here we go again.


[..]


We have excellent endianness conversion macros.


smp_rmb(); /* we must make sure we don't read a stale terminator */


even if usb_bulk_msg() failed?


endianness macro


That'll get out of sync if -EFAULT is returned


This and usbtmc_read() need a test for disconnection. Open() and disconnect
are guarded in usbcore, read & write are not. By reference count you've made
sure you have a valid device descriptor, but the device may have been reprobed.


endianness macro


error case?

[..]

memory leak


memory leak

[..]

smp_wmb(); /* must hit RAM before enablement */


smp_rmb(); /* must hit RAM after the terminator */	\

There are subtle penalties to avoiding ioctl(). Among them is the loss
of atomicity.
[..]

check for disconnect as in read & write


This is missing a whole lot of "break;"


If you ignore an error return, be open about it.


The groups might never have been created.


You must set a flag for read, write and ioctl.

	Regards
		Oliver
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] USB: add USB test and measurement class driver ..., Oliver Neukum, (Thu Aug 28, 3:10 am)