Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-28 Thread Oliver Neukum
Am Donnerstag, den 24.05.2018, 12:31 + schrieb guido@kiener- muenchen.de: > Zitat von Oliver Neukum : > > > Am Montag, den 21.05.2018, 21:00 + schrieb guido@kiener- > > muenchen.de: > > > > > > I looked for a race here, but I do not find a race between open and > > > release, > > > since

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-24 Thread guido
Zitat von Oliver Neukum : Am Montag, den 21.05.2018, 21:00 + schrieb guido@kiener- muenchen.de: I looked for a race here, but I do not find a race between open and release, since a refcount of "file_data->data->kref" is always hold by usbtmc_probe/disconnect. However I see a race between

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-23 Thread Oliver Neukum
Am Montag, den 21.05.2018, 21:00 + schrieb guido@kiener- muenchen.de: > > I looked for a race here, but I do not find a race between open and release, > since a refcount of "file_data->data->kref" is always hold by > usbtmc_probe/disconnect. > > However I see a race between usbtmc_open and us

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-21 Thread guido
Zitat von Greg KH : @@ -122,7 +141,7 @@ static int usbtmc_open(struct inode *inode, struct file *filp) { struct usb_interface *intf; struct usbtmc_device_data *data; - int retval = 0; + struct usbtmc_file_data *file_data; intf = usb_find_interface(&usbtmc

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 12:36:56PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote: > > > > > > Zitat von Greg KH : > > > > > > > On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > > > > >

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
Zitat von Greg KH : On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote: Zitat von Greg KH : > On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > > - Add 'struct usbtmc_file_data' for each file handle to cache last > > srq_byte (=Status Byte with SRQ) rece

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > > > - Add 'struct usbtmc_file_data' for each file handle to cache last > > > srq_byte (=Status Byte with SRQ) received by usbtm

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: - Add 'struct usbtmc_file_data' for each file handle to cache last srq_byte (=Status Byte with SRQ) received by usbtmc_interrupt(..) - usbtmc488_ioctl_read_stb returns cached srq_byte when available for each

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-17 Thread Greg KH
On Thu, May 17, 2018 at 09:44:40AM -0700, Randy Dunlap wrote: > On 05/17/2018 09:20 AM, Greg KH wrote: > >> + file_data = kzalloc(sizeof(*file_data), GFP_KERNEL); > >> + if (!file_data) > >> + return -ENOMEM; > >> + > >> + pr_debug("%s - called\n", __func__); > > Please do not add "trac

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-17 Thread Randy Dunlap
On 05/17/2018 09:20 AM, Greg KH wrote: >> +file_data = kzalloc(sizeof(*file_data), GFP_KERNEL); >> +if (!file_data) >> +return -ENOMEM; >> + >> +pr_debug("%s - called\n", __func__); > Please do not add "tracing" functions like this. The kernel has a > wonderful built-in fun

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-17 Thread Greg KH
On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > - Add 'struct usbtmc_file_data' for each file handle to cache last > srq_byte (=Status Byte with SRQ) received by usbtmc_interrupt(..) > > - usbtmc488_ioctl_read_stb returns cached srq_byte when available for > each file handle to