Thierry Reding | 1 Sep 2011 07:13
Picon

Re: [PATCH 07/21] [staging] tm6000: Remove artificial delay.

* Mauro Carvalho Chehab wrote:
> Em 04-08-2011 04:14, Thierry Reding escreveu:
> > ---
> >  drivers/staging/tm6000/tm6000-core.c |    3 ---
> >  1 files changed, 0 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
> > index e14bd3d..2c156dd 100644
> > --- a/drivers/staging/tm6000/tm6000-core.c
> > +++ b/drivers/staging/tm6000/tm6000-core.c
> >  <at>  <at>  -86,9 +86,6  <at>  <at>  int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
> >  	}
> >  
> >  	kfree(data);
> > -
> > -	msleep(5);
> > -
> >  	return ret;
> >  }
> >  
> 
> This delay is needed by some tm5600/6000 devices. Maybe it is due to
> some specific chipset revision, but I can't remember anymore what
> device(s) were affected.
> 
> The right thing to do seems to whitelist the devices that don't need
> any delay there.

This was actually the first thing I patched because I couldn't see any need
for it (the Cinergy Hybrid USB Stick worked fine without) and it made the
(Continue reading)

Mauro Carvalho Chehab | 1 Sep 2011 07:47
Picon
Favicon

Re: [PATCH 07/21] [staging] tm6000: Remove artificial delay.

Em 01-09-2011 02:13, Thierry Reding escreveu:
> * Mauro Carvalho Chehab wrote:
>> Em 04-08-2011 04:14, Thierry Reding escreveu:
>>> ---
>>>  drivers/staging/tm6000/tm6000-core.c |    3 ---
>>>  1 files changed, 0 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
>>> index e14bd3d..2c156dd 100644
>>> --- a/drivers/staging/tm6000/tm6000-core.c
>>> +++ b/drivers/staging/tm6000/tm6000-core.c
>>>  <at>  <at>  -86,9 +86,6  <at>  <at>  int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
>>>  	}
>>>  
>>>  	kfree(data);
>>> -
>>> -	msleep(5);
>>> -
>>>  	return ret;
>>>  }
>>>  
>>
>> This delay is needed by some tm5600/6000 devices. Maybe it is due to
>> some specific chipset revision, but I can't remember anymore what
>> device(s) were affected.
>>
>> The right thing to do seems to whitelist the devices that don't need
>> any delay there.
> 
> This was actually the first thing I patched because I couldn't see any need
(Continue reading)

Thierry Reding | 1 Sep 2011 08:27
Picon

[PATCH 1/2] [media] tm6000: Add fast USB access quirk

Some devices support fast access to registers using the USB interface
while others require a certain delay after each operation. This commit
adds a quirk that can be enabled by devices that don't need the delay.

Signed-off-by: Thierry Reding <thierry.reding <at> avionic-design.de>
---
 drivers/staging/tm6000/tm6000-core.c |    3 ++-
 drivers/staging/tm6000/tm6000.h      |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index 64fc1c6..93a0772 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
 <at>  <at>  -89,7 +89,8  <at>  <at>  int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,

 	kfree(data);

-	msleep(5);
+	if ((dev->quirks & TM6000_QUIRK_NO_USB_DELAY) == 0)
+		msleep(5);

 	mutex_unlock(&dev->usb_lock);
 	return ret;
diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h
index dac2063..0e35812 100644
--- a/drivers/staging/tm6000/tm6000.h
+++ b/drivers/staging/tm6000/tm6000.h
 <at>  <at>  -169,6 +169,10  <at>  <at>  struct tm6000_endpoint {
 	unsigned			maxsize;
(Continue reading)

Thierry Reding | 1 Sep 2011 08:27
Picon

[PATCH 2/2] [media] tm6000: Enable fast USB quirk on Cinergy Hybrid

The Cinergy Hybrid cards are known not to need an artificial delay after
USB accesses so the quirk can safely be enabled.

Signed-off-by: Thierry Reding <thierry.reding <at> avionic-design.de>
---
 drivers/staging/tm6000/tm6000-cards.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c
index 5393976..aa18173 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
 <at>  <at>  -1002,6 +1002,16  <at>  <at>  static int fill_board_specific_data(struct tm6000_core *dev)
 	dev->vinput[2] = tm6000_boards[dev->model].vinput[2];
 	dev->rinput = tm6000_boards[dev->model].rinput;

+	/* setup per-model quirks */
+	switch (dev->model) {
+	case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
+		dev->quirks |= TM6000_QUIRK_NO_USB_DELAY;
+		break;
+
+	default:
+		break;
+	}
+
 	/* initialize hardware */
 	rc = tm6000_init(dev);
 	if (rc < 0)
--

-- 
(Continue reading)

Thierry Reding | 1 Sep 2011 08:33
Picon

Re: [PATCH 1/2] [media] tm6000: Add fast USB access quirk

* Thierry Reding wrote:
> Some devices support fast access to registers using the USB interface
> while others require a certain delay after each operation. This commit
> adds a quirk that can be enabled by devices that don't need the delay.
> 
> Signed-off-by: Thierry Reding <thierry.reding <at> avionic-design.de>
> ---
>  drivers/staging/tm6000/tm6000-core.c |    3 ++-
>  drivers/staging/tm6000/tm6000.h      |    6 ++++++
>  2 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
> index 64fc1c6..93a0772 100644
> --- a/drivers/staging/tm6000/tm6000-core.c
> +++ b/drivers/staging/tm6000/tm6000-core.c
>  <at>  <at>  -89,7 +89,8  <at>  <at>  int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
>  
>  	kfree(data);
>  
> -	msleep(5);
> +	if ((dev->quirks & TM6000_QUIRK_NO_USB_DELAY) == 0)
> +		msleep(5);

This is of course completely wrong. The quirk as defined below is actually a
bit position. I'll send another update where the quirk is defined as bit mask
for the given position.

Thierry

>  
(Continue reading)

Thierry Reding | 1 Sep 2011 08:43
Picon

[PATCH v2 1/2] [media] tm6000: Add fast USB access quirk

Some devices support fast access to registers using the USB interface
while others require a certain delay after each operation. This commit
adds a quirk that can be enabled by devices that don't need the delay.

Signed-off-by: Thierry Reding <thierry.reding <at> avionic-design.de>
---
 drivers/staging/tm6000/tm6000-core.c |    3 ++-
 drivers/staging/tm6000/tm6000.h      |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index 64fc1c6..93a0772 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
 <at>  <at>  -89,7 +89,8  <at>  <at>  int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,

 	kfree(data);

-	msleep(5);
+	if ((dev->quirks & TM6000_QUIRK_NO_USB_DELAY) == 0)
+		msleep(5);

 	mutex_unlock(&dev->usb_lock);
 	return ret;
diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h
index dac2063..5bdce84 100644
--- a/drivers/staging/tm6000/tm6000.h
+++ b/drivers/staging/tm6000/tm6000.h
 <at>  <at>  -169,6 +169,8  <at>  <at>  struct tm6000_endpoint {
 	unsigned			maxsize;
(Continue reading)

Thierry Reding | 1 Sep 2011 08:43
Picon

[PATCH v2 2/2] [media] tm6000: Enable fast USB quirk on Cinergy Hybrid

The Cinergy Hybrid cards are known not to need an artificial delay after
USB accesses so the quirk can safely be enabled.

Signed-off-by: Thierry Reding <thierry.reding <at> avionic-design.de>
---
 drivers/staging/tm6000/tm6000-cards.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c
index 5393976..aa18173 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
 <at>  <at>  -1002,6 +1002,16  <at>  <at>  static int fill_board_specific_data(struct tm6000_core *dev)
 	dev->vinput[2] = tm6000_boards[dev->model].vinput[2];
 	dev->rinput = tm6000_boards[dev->model].rinput;

+	/* setup per-model quirks */
+	switch (dev->model) {
+	case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
+		dev->quirks |= TM6000_QUIRK_NO_USB_DELAY;
+		break;
+
+	default:
+		break;
+	}
+
 	/* initialize hardware */
 	rc = tm6000_init(dev);
 	if (rc < 0)
--

-- 
(Continue reading)


Gmane