Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Joe Perches
On Mon, 2017-06-19 at 09:15 +0800, Greg Kroah-Hartman wrote: > On Sun, Jun 18, 2017 at 09:58:27AM +0100, Okash Khawaja wrote: > > This patch adds functionality to validate and convert either a device > > name or 'ser' member of synth into dev_t. [] > > --- a/drivers/staging/speakup/spk_ttyio.c [] >

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Okash Khawaja
On Mon, Jun 19, 2017 at 09:15:33AM +0800, Greg Kroah-Hartman wrote: > > +int ser_to_dev(int ser, dev_t *dev_no) > > +{ > > + if (ser < 0 || ser > (255 - 64)) { > > +pr_err("speakup: Invalid ser param. \ > > + Must be between 0 and 191 inclusive.\n"); > >

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Greg Kroah-Hartman
On Sun, Jun 18, 2017 at 10:33:35PM -0700, Joe Perches wrote: > On Mon, 2017-06-19 at 09:15 +0800, Greg Kroah-Hartman wrote: > > On Sun, Jun 18, 2017 at 09:58:27AM +0100, Okash Khawaja wrote: > > > This patch adds functionality to validate and convert either a device > > > name or 'ser' member of sy

[PATCH 2/2] hyper-v: read TSC frequency from a synthetic MSR

2017-06-18 Thread Vitaly Kuznetsov
It was found that SMI_TRESHOLD of 5 is not enough for Hyper-V guests in nested environment and falling back to counting jiffies is not an option for Gen2 guests as they don't have PIT. As Hyper-V provides TSC frequency in a synthetic MSR we can just use this information instead of doing a error

[PATCH 1/2] hyper-v: check frequency MSRs presence according to the specification

2017-06-18 Thread Vitaly Kuznetsov
Hyper-V TLFS specifies two bits which should be checked before accessing frequency MSRs: - AccessFrequencyMsrs (BIT(11) in EAX) which indicates if we have access to frequency MSRs. - FrequencyMsrsAvailable (BIT(8) in EDX) which indicates is these MSRs are present. Rename and specify these bits

[PATCH 0/2] hyper-v: avoid tsc calibration

2017-06-18 Thread Vitaly Kuznetsov
TSC calibration on virtual machines is always error prone. It was found that in nested environments Gen2 instances may get stuck on boot. As Hyper-V hosts provide us with all the required information we can easily avoid calibration. This is already done for other hypervisors (KVM, Vmware). Vitaly

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Greg Kroah-Hartman
On Sun, Jun 18, 2017 at 09:58:27AM +0100, Okash Khawaja wrote: > This patch adds functionality to validate and convert either a device > name or 'ser' member of synth into dev_t. Subsequent patch in this set > will call it to convert user-specified device into device number. For > device name, this

Re: Do I need a driver to remotely access I2C device on PCIe card?

2017-06-18 Thread Greg KH
On Sun, Jun 18, 2017 at 07:46:38PM +, Nisha Miller wrote: > Email bounced, so I'm posting again > > Hi, > > I'm positing this after spending a lot of time googling for a solution and > coming up with zilch. > > I have a NVMe SSD PCIe card with an I2C chip on it. I want to read/write to

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Joe Perches
On Sun, 2017-06-18 at 22:54 +0300, Andy Shevchenko wrote: > On Sun, Jun 18, 2017 at 8:22 PM, Okash Khawaja > wrote: > > On Sun, Jun 18, 2017 at 04:35:21PM +0300, Andy Shevchenko wrote: > > > > + if (ser < 0 || ser > (255 - 64)) { > > > > +pr_err("speakup: Invalid ser param.

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Andy Shevchenko
On Sun, Jun 18, 2017 at 8:22 PM, Okash Khawaja wrote: > On Sun, Jun 18, 2017 at 04:35:21PM +0300, Andy Shevchenko wrote: >> > + if (ser < 0 || ser > (255 - 64)) { >> >> > +pr_err("speakup: Invalid ser param. \ >> > + Must be between 0 and 191 in

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Okash Khawaja
Hi, Thanks for the reviews. Couple of things inlined below. On Sun, Jun 18, 2017 at 04:35:21PM +0300, Andy Shevchenko wrote: > > > +const char *lp_supported[] = { "acntsa", "bns", "dummy", "txprt" }; > > static ? Sure! > > + if (ser < 0 || ser > (255 - 64)) { > > > +pr_e

[PATCH] staging: ccree: removed spaces after opening parentheses.

2017-06-18 Thread Jeremy Sowden
Removed spaces after opening parentheses in ssi_ivgen.c. Signed-off-by: Jeremy Sowden --- drivers/staging/ccree/ssi_ivgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_ivgen.c b/drivers/staging/ccree/ssi_ivgen.c index cd606ab6cd53..88f2080

Re: [patch v2 3/3] staging: speakup: make ttyio synths use device name

2017-06-18 Thread Andy Shevchenko
On Sun, Jun 18, 2017 at 11:58 AM, Okash Khawaja wrote: > This patch introduces new module parameter, dev, which takes a string > representing the device that the external synth is connected to, e.g. > ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. > That way, speakup can supp

Re: [patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Andy Shevchenko
On Sun, Jun 18, 2017 at 11:58 AM, Okash Khawaja wrote: > This patch adds functionality to validate and convert either a device > name or 'ser' member of synth into dev_t. Subsequent patch in this set > will call it to convert user-specified device into device number. For > device name, this patch

Re: [patch v2 1/3] tty: add function to convert device name to number

2017-06-18 Thread Andy Shevchenko
On Sun, Jun 18, 2017 at 11:58 AM, Okash Khawaja wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). It does this by scanning tty_drivers list for > corresponding device name and index. If the driver is not registered, > this function returns -ENODEV.

[patch v2 3/3] staging: speakup: make ttyio synths use device name

2017-06-18 Thread Okash Khawaja
This patch introduces new module parameter, dev, which takes a string representing the device that the external synth is connected to, e.g. ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. That way, speakup can support more than ttyS*. As of this patch, it only supports ttyS*, t

[patch v2 2/3] staging: speakup: check and convert dev name or ser to dev_t

2017-06-18 Thread Okash Khawaja
This patch adds functionality to validate and convert either a device name or 'ser' member of synth into dev_t. Subsequent patch in this set will call it to convert user-specified device into device number. For device name, this patch does some basic sanity checks on the string passed in. It curren

[patch v2 1/3] tty: add function to convert device name to number

2017-06-18 Thread Okash Khawaja
The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). It does this by scanning tty_drivers list for corresponding device name and index. If the driver is not registered, this function returns -ENODEV. It also acquires tty_mutex. Signed-off-by: Okash Khawaja ---

[patch v2 0/3] staging: speakup: support more than ttyS*

2017-06-18 Thread Okash Khawaja
Hi, The patchset now contains a separate patch for dev name-to-number conversion functionality inside tty_io.c. These patches extend speakup support to ttyUSB* and lp*. They introduce a new module param dev whose function is similar to ser but instead of taking serial port number as argument, it