Skip to content

Commit

Permalink
nsc-ircc: default to dongle type 9 on IBM hardware
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Garrett authored and David S. Miller committed Jul 31, 2008
1 parent 5aa10ca commit 1fa9817
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/irda/nsc-ircc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
{ }
};

Expand Down Expand Up @@ -930,7 +930,10 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
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 */

Expand Down
3 changes: 3 additions & 0 deletions drivers/net/irda/nsc-ircc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 1fa9817

Please sign in to comment.