View | Details | Raw Unified | Return to bug 4770
Collapse All | Expand All

(-)linux/drivers/net/irda/nsc-ircc.c.orig (-4 / +36 lines)
Lines 80-85 Link Here
80
static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
80
static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
81
static unsigned int irq[] = { 0, 0, 0, 0, 0 };
81
static unsigned int irq[] = { 0, 0, 0, 0, 0 };
82
static unsigned int dma[] = { 0, 0, 0, 0, 0 };
82
static unsigned int dma[] = { 0, 0, 0, 0, 0 };
83
static unsigned int noprobe[] = { 0, 0, 0, 0 };
83
84
84
static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info);
85
static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info);
85
static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info);
86
static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info);
Lines 161-173 Link Here
161
	int cfg_base;
162
	int cfg_base;
162
	int cfg, id;
163
	int cfg, id;
163
	int reg;
164
	int reg;
164
	int i = 0;
165
	int i;
166
167
	/* attach to devices specified by the user with noprobe */
168
	for (i=0; i<4; i++) {
169
		if (noprobe[i]) {
170
			IRDA_DEBUG(2, "%s(), Attaching to unknown controller "
171
				      "at 0x%x (irq %u, dma %u) ...\n",
172
				      io[i], irq[i], dma[i]);
173
			memset(&info, 0, sizeof(chipio_t));
174
			info.fir_base = io[i];
175
			info.dma = dma[i];
176
			info.irq = irq[i];
177
178
			if (nsc_ircc_open(i, &info) == 0)
179
				ret = 0;
180
		}
181
	}
182
183
	if (noprobe[0] && noprobe[1] && noprobe[2] && noprobe[3])
184
		return ret;
185
186
	i = 0;
165
187
166
	/* Probe for all the NSC chipsets we know about */
188
	/* Probe for all the NSC chipsets we know about */
167
	for (chip=chips; chip->name ; chip++) {
189
	for (chip=chips; chip->name ; chip++) {
168
		IRDA_DEBUG(2, "%s(), Probing for %s ...\n", 
190
		IRDA_DEBUG(2, "%s(), Probing for %s ...\n", 
169
			__FUNCTION__, chip->name);
191
			__FUNCTION__, chip->name);
170
		
192
193
		while (noprobe[i])
194
			i++;
195
196
		if (i == 4)
197
			break;
198
171
		/* Try all config registers for this chip */
199
		/* Try all config registers for this chip */
172
		for (cfg=0; cfg<3; cfg++) {
200
		for (cfg=0; cfg<3; cfg++) {
173
			cfg_base = chip->cfg[cfg];
201
			cfg_base = chip->cfg[cfg];
Lines 253-260 Link Here
253
281
254
	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
282
	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
255
283
256
	MESSAGE("%s, Found chip at base=0x%03x\n", driver_name,
284
	if (!noprobe[i]) {
257
		info->cfg_base);
285
		MESSAGE("%s, Found chip at base=0x%03x\n", driver_name,
286
			info->cfg_base);
287
	}
258
288
259
	if ((nsc_ircc_setup(info)) == -1)
289
	if ((nsc_ircc_setup(info)) == -1)
260
		return -1;
290
		return -1;
Lines 2058-2063 Link Here
2058
MODULE_PARM_DESC(dma, "DMA channels");
2088
MODULE_PARM_DESC(dma, "DMA channels");
2059
MODULE_PARM(dongle_id, "i");
2089
MODULE_PARM(dongle_id, "i");
2060
MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");
2090
MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");
2091
MODULE_PARM(noprobe, "1-4i");
2092
MODULE_PARM_DESC(noprobe, "Do not probe chipset, just attach");
2061
2093
2062
int init_module(void)
2094
int init_module(void)
2063
{
2095
{

Return to bug 4770