Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-13 Thread ira.weiny
On Thu, May 12, 2016 at 01:40:06PM -0600, Jason Gunthorpe wrote: > On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: > > > >>+static inline int check_ioctl_access(unsigned int cmd, unsigned long arg) > > >>+{ > > >>+ int read_cmd, write_cmd, read_ok, write_ok; > > >>+ > > >>+

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-13 Thread ira.weiny
On Thu, May 12, 2016 at 01:40:06PM -0600, Jason Gunthorpe wrote: > On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: > > > >>+static inline int check_ioctl_access(unsigned int cmd, unsigned long arg) > > >>+{ > > >>+ int read_cmd, write_cmd, read_ok, write_ok; > > >>+ > > >>+

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-13 Thread Dennis Dalessandro
On Thu, May 12, 2016 at 03:28:21PM -0600, Jason Gunthorpe wrote: On Thu, May 12, 2016 at 03:48:16PM -0400, Doug Ledford wrote: were going to rip out the EEPROM code. In any case, the best fix would be to rebase the two series that are remaining and move any "rip out things like eeprom support"

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-13 Thread Dennis Dalessandro
On Thu, May 12, 2016 at 03:28:21PM -0600, Jason Gunthorpe wrote: On Thu, May 12, 2016 at 03:48:16PM -0400, Doug Ledford wrote: were going to rip out the EEPROM code. In any case, the best fix would be to rebase the two series that are remaining and move any "rip out things like eeprom support"

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 03:48:16PM -0400, Doug Ledford wrote: > were going to rip out the EEPROM code. In any case, the best fix would > be to rebase the two series that are remaining and move any "rip out > things like eeprom support" patches to prior to the ioctl patches and > make it so that

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 03:48:16PM -0400, Doug Ledford wrote: > were going to rip out the EEPROM code. In any case, the best fix would > be to rebase the two series that are remaining and move any "rip out > things like eeprom support" patches to prior to the ioctl patches and > make it so that

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Doug Ledford
On 05/12/2016 03:40 PM, Jason Gunthorpe wrote: > On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: >>> I thought we agreed to get rid of this as well? It certainly does not >>> belong here, and as a general rule, I don't think ioctls should be >>> doing capable tests.. >> >>

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Doug Ledford
On 05/12/2016 03:40 PM, Jason Gunthorpe wrote: > On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: >>> I thought we agreed to get rid of this as well? It certainly does not >>> belong here, and as a general rule, I don't think ioctls should be >>> doing capable tests.. >> >>

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: > >I thought we agreed to get rid of this as well? It certainly does not > >belong here, and as a general rule, I don't think ioctls should be > >doing capable tests.. > > Yeah. I left it in this patch set because this just

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: > >I thought we agreed to get rid of this as well? It certainly does not > >belong here, and as a general rule, I don't think ioctls should be > >doing capable tests.. > > Yeah. I left it in this patch set because this just

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Dennis Dalessandro
On Thu, May 12, 2016 at 11:43:32AM -0600, Jason Gunthorpe wrote: On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: + case HFI1_IOCTL_EP_INFO: + case HFI1_IOCTL_EP_ERASE_CHIP: + case HFI1_IOCTL_EP_ERASE_RANGE: + case HFI1_IOCTL_EP_READ_RANGE: +

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Dennis Dalessandro
On Thu, May 12, 2016 at 11:43:32AM -0600, Jason Gunthorpe wrote: On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: + case HFI1_IOCTL_EP_INFO: + case HFI1_IOCTL_EP_ERASE_CHIP: + case HFI1_IOCTL_EP_ERASE_RANGE: + case HFI1_IOCTL_EP_READ_RANGE: +

RE: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Hefty, Sean
> On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: > > + case HFI1_IOCTL_EP_INFO: > > + case HFI1_IOCTL_EP_ERASE_CHIP: > > + case HFI1_IOCTL_EP_ERASE_RANGE: > > + case HFI1_IOCTL_EP_READ_RANGE: > > + case HFI1_IOCTL_EP_WRITE_RANGE: > > + if

RE: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Hefty, Sean
> On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: > > + case HFI1_IOCTL_EP_INFO: > > + case HFI1_IOCTL_EP_ERASE_CHIP: > > + case HFI1_IOCTL_EP_ERASE_RANGE: > > + case HFI1_IOCTL_EP_READ_RANGE: > > + case HFI1_IOCTL_EP_WRITE_RANGE: > > + if

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: > + case HFI1_IOCTL_EP_INFO: > + case HFI1_IOCTL_EP_ERASE_CHIP: > + case HFI1_IOCTL_EP_ERASE_RANGE: > + case HFI1_IOCTL_EP_READ_RANGE: > + case HFI1_IOCTL_EP_WRITE_RANGE: > + if

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2016 at 10:18:47AM -0700, Dennis Dalessandro wrote: > + case HFI1_IOCTL_EP_INFO: > + case HFI1_IOCTL_EP_ERASE_CHIP: > + case HFI1_IOCTL_EP_ERASE_RANGE: > + case HFI1_IOCTL_EP_READ_RANGE: > + case HFI1_IOCTL_EP_WRITE_RANGE: > + if

[PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Dennis Dalessandro
IOCTL is more suited to what user space commands need to do than the write() interface. Add IOCTL definitions for all existing write commands and the handling for those. The write() interface will be removed in a follow on patch. Reviewed-by: Mitko Haralanov

[PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-12 Thread Dennis Dalessandro
IOCTL is more suited to what user space commands need to do than the write() interface. Add IOCTL definitions for all existing write commands and the handling for those. The write() interface will be removed in a follow on patch. Reviewed-by: Mitko Haralanov Reviewed-by: Mike Marciniszyn