* [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware
@ 2008-07-30 19:37 akpm
2008-07-31 0:00 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2008-07-30 19:37 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, mjg59, ben.collins, samuel
From: Matthew Garrett <mjg59@srcf.ucam.org>
This is necessary to set the dongle type on the nsc driver in order to get
it to work correctly. Thinkpads all appear to use dongle type 9. This
patch defaults nsc devices with an IBM PnP descriptor to use type 9.
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/irda/nsc-ircc.c | 7 +++++--
drivers/net/irda/nsc-ircc.h | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
diff -puN drivers/net/irda/nsc-ircc.c~nsc-ircc-default-to-dongle-type-9-on-ibm-hardware drivers/net/irda/nsc-ircc.c
--- a/drivers/net/irda/nsc-ircc.c~nsc-ircc-default-to-dongle-type-9-on-ibm-hardware
+++ a/drivers/net/irda/nsc-ircc.c
@@ -151,8 +151,8 @@ static char *dongle_types[] = {
static chipio_t pnp_info;
static const struct pnp_device_id nsc_ircc_pnp_table[] = {
{ .id = "NSC6001", .driver_data = 0 },
- { .id = "IBM0071", .driver_data = 0 },
{ .id = "HWPC224", .driver_data = 0 },
+ { .id = "IBM0071", .driver_data = NSC_FORCE_DONGLE_TYPE9 },
{ }
};
@@ -930,7 +930,10 @@ static int nsc_ircc_pnp_probe(struct pnp
pnp_info.dma = -1;
pnp_succeeded = 1;
- /* There don't seem to be any way to get the cfg_base.
+ if (id->driver_data & NSC_FORCE_DONGLE_TYPE9)
+ dongle_id = 0x9;
+
+ /* There doesn't seem to be any way of getting the cfg_base.
* On my box, cfg_base is in the PnP descriptor of the
* motherboard. Oh well... Jean II */
diff -puN drivers/net/irda/nsc-ircc.h~nsc-ircc-default-to-dongle-type-9-on-ibm-hardware drivers/net/irda/nsc-ircc.h
--- a/drivers/net/irda/nsc-ircc.h~nsc-ircc-default-to-dongle-type-9-on-ibm-hardware
+++ a/drivers/net/irda/nsc-ircc.h
@@ -35,6 +35,9 @@
#include <linux/types.h>
#include <asm/io.h>
+/* Features for chips (set in driver_data) */
+#define NSC_FORCE_DONGLE_TYPE9 0x00000001
+
/* DMA modes needed */
#define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
#define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */
_
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware
2008-07-30 19:37 [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware akpm
@ 2008-07-31 0:00 ` David Miller
2008-07-31 0:07 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2008-07-31 0:00 UTC (permalink / raw)
To: akpm; +Cc: netdev, mjg59, ben.collins, samuel
From: akpm@linux-foundation.org
Date: Wed, 30 Jul 2008 12:37:40 -0700
> This is necessary to set the dongle type on the nsc driver in order to get
> it to work correctly. Thinkpads all appear to use dongle type 9. This
> patch defaults nsc devices with an IBM PnP descriptor to use type 9.
>
> Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
> Signed-off-by: Ben Collins <ben.collins@canonical.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Ugly, but what can we do? :-)
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware
2008-07-31 0:00 ` David Miller
@ 2008-07-31 0:07 ` Andrew Morton
2008-07-31 0:13 ` Matthew Garrett
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2008-07-31 0:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev, mjg59, ben.collins, samuel
On Wed, 30 Jul 2008 17:00:57 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: akpm@linux-foundation.org
> Date: Wed, 30 Jul 2008 12:37:40 -0700
>
> > This is necessary to set the dongle type on the nsc driver in order to get
> > it to work correctly. Thinkpads all appear to use dongle type 9. This
> > patch defaults nsc devices with an IBM PnP descriptor to use type 9.
> >
> > Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
> > Signed-off-by: Ben Collins <ben.collins@canonical.com>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> Ugly, but what can we do? :-)
yes, it seems a reasonable compromise short of a full-blown
blacklisting thingy.
> Applied, thanks!
I have a feeling that 2.6.25.x and 2.6.26.x will want this one too. I
found it hard to judge how important this fix actually is. But
thinkpads are pretty common!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware
2008-07-31 0:07 ` Andrew Morton
@ 2008-07-31 0:13 ` Matthew Garrett
0 siblings, 0 replies; 4+ messages in thread
From: Matthew Garrett @ 2008-07-31 0:13 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Miller, netdev, ben.collins, samuel
On Wed, Jul 30, 2008 at 05:07:20PM -0700, Andrew Morton wrote:
> I have a feeling that 2.6.25.x and 2.6.26.x will want this one too. I
> found it hard to judge how important this fix actually is. But
> thinkpads are pretty common!
It's never automatically worked on Thinkpads, so I'm not too worried.
Anyone who's tried using this has either given up (and so won't notice
it's started working in a stable update) or already passes the dongle
argument manually.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-31 0:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 19:37 [patch 08/11] nsc-ircc: default to dongle type 9 on IBM hardware akpm
2008-07-31 0:00 ` David Miller
2008-07-31 0:07 ` Andrew Morton
2008-07-31 0:13 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).