ALT Linux Bugzilla
– Attachment 483 Details for
Bug 4770
[FR] add nsc-ircc "noprobe" arg patch
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
nsc-ircc patch ("noprobe" for NSC PC97338)
nsc-ircc.c.patch (text/plain), 1.97 KB, created by
Michael Shigorin
on 2004-07-12 13:28:17 MSD
(
hide
)
Description:
nsc-ircc patch ("noprobe" for NSC PC97338)
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2004-07-12 13:28:17 MSD
Size:
1.97 KB
patch
obsolete
>--- linux/drivers/net/irda/nsc-ircc.c.orig 2003-11-25 09:34:37.000000000 +0100 >+++ linux/drivers/net/irda/nsc-ircc.c 2003-11-25 11:03:51.000000000 +0100 >@@ -80,6 +80,7 @@ > static unsigned int io[] = { ~0, ~0, ~0, ~0 }; > static unsigned int irq[] = { 0, 0, 0, 0, 0 }; > static unsigned int dma[] = { 0, 0, 0, 0, 0 }; >+static unsigned int noprobe[] = { 0, 0, 0, 0 }; > > static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info); > static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info); >@@ -161,13 +162,40 @@ > int cfg_base; > int cfg, id; > int reg; >- int i = 0; >+ int i; >+ >+ /* attach to devices specified by the user with noprobe */ >+ for (i=0; i<4; i++) { >+ if (noprobe[i]) { >+ IRDA_DEBUG(2, "%s(), Attaching to unknown controller " >+ "at 0x%x (irq %u, dma %u) ...\n", >+ io[i], irq[i], dma[i]); >+ memset(&info, 0, sizeof(chipio_t)); >+ info.fir_base = io[i]; >+ info.dma = dma[i]; >+ info.irq = irq[i]; >+ >+ if (nsc_ircc_open(i, &info) == 0) >+ ret = 0; >+ } >+ } >+ >+ if (noprobe[0] && noprobe[1] && noprobe[2] && noprobe[3]) >+ return ret; >+ >+ i = 0; > > /* Probe for all the NSC chipsets we know about */ > for (chip=chips; chip->name ; chip++) { > IRDA_DEBUG(2, "%s(), Probing for %s ...\n", > __FUNCTION__, chip->name); >- >+ >+ while (noprobe[i]) >+ i++; >+ >+ if (i == 4) >+ break; >+ > /* Try all config registers for this chip */ > for (cfg=0; cfg<3; cfg++) { > cfg_base = chip->cfg[cfg]; >@@ -253,8 +281,10 @@ > > IRDA_DEBUG(2, "%s()\n", __FUNCTION__); > >- MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, >- info->cfg_base); >+ if (!noprobe[i]) { >+ MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, >+ info->cfg_base); >+ } > > if ((nsc_ircc_setup(info)) == -1) > return -1; >@@ -2058,6 +2088,8 @@ > MODULE_PARM_DESC(dma, "DMA channels"); > MODULE_PARM(dongle_id, "i"); > MODULE_PARM_DESC(dongle_id, "Type-id of used dongle"); >+MODULE_PARM(noprobe, "1-4i"); >+MODULE_PARM_DESC(noprobe, "Do not probe chipset, just attach"); > > int init_module(void) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4770
: 483