Date: Thu, 09 May 2002 07:26:07 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: "M. Warner Losh" <imp@village.org> Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: Problems with Dell Inspiron 2500/NEWCARD/Xircom CBEM56G Message-ID: <XFMail.20020509072607.jhb@FreeBSD.org> In-Reply-To: <20020508.213149.133750004.imp@village.org>
index | next in thread | previous in thread | raw e-mail
On 09-May-2002 M. Warner Losh wrote:
> In message: <002801c1f503$c6db1c80$0128a8c0@SCOTT>
> "Scott Penno" <scott.penno@gennex.com.au> writes:
>: I removed apm from the kernel which appeared to be playing having with acpi
>: and things are now working a treat. The card works fine, however I do
>: receive the following message, 'cardbus0: <unknown card> (vendor=0x115d,
>: dev=0x0103) at 0.1 irq 5'. I've had a look through various lists and
>: couldn't find a resolution. Is this a real drama and if so, how do I
>: correct it?
>
> That's caused by the sioprobe routine not likeing the cardbus card for
> reasons that I've not had time to adequately track down.
Speaking of sio, I have an unrelated patch I'd like you to review that
makes sio play nicer and share it's IRQ resource for PCI and pccard. I
needed this for work last week:
Index: sio.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/sio.c,v
retrieving revision 1.374
diff -u -r1.374 sio.c
--- sio.c 26 Apr 2002 20:24:10 -0000 1.374
+++ sio.c 5 May 2002 03:35:19 -0000
@@ -866,10 +866,11 @@
#endif /* COM_ESP */
int
-sioattach(dev, xrid, rclk)
+sioattach(dev, xrid, rclk, shareirq)
device_t dev;
int xrid;
u_long rclk;
+ int shareirq;
{
struct com_s *com;
#ifdef COM_ESP
@@ -1114,16 +1115,17 @@
rid = 0;
com->irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1,
- RF_ACTIVE);
+ shareirq ? RF_ACTIVE | RF_SHAREABLE : RF_ACTIVE);
if (com->irqres) {
- ret = BUS_SETUP_INTR(device_get_parent(dev), dev, com->irqres,
- INTR_TYPE_TTY | INTR_FAST,
- siointr, com, &com->cookie);
- if (ret) {
+ if (!shareirq)
+ ret = BUS_SETUP_INTR(device_get_parent(dev), dev,
+ com->irqres, INTR_TYPE_TTY | INTR_FAST, siointr,
+ com, &com->cookie);
+ if (shareirq || ret) {
ret = BUS_SETUP_INTR(device_get_parent(dev), dev,
com->irqres, INTR_TYPE_TTY,
siointr, com, &com->cookie);
- if (ret == 0)
+ if (!shareirq && ret == 0)
device_printf(dev, "unable to activate
interrupt in fast mode - using normal mode\n");
}
if (ret)
Index: sio_isa.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/sio_isa.c,v
retrieving revision 1.8
diff -u -r1.8 sio_isa.c
--- sio_isa.c 23 Mar 2002 12:13:34 -0000 1.8
+++ sio_isa.c 2 May 2002 14:23:26 -0000
@@ -158,7 +158,7 @@
sio_isa_attach(dev)
device_t dev;
{
- return (sioattach(dev, 0, 0UL));
+ return (sioattach(dev, 0, 0UL, 0));
}
DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0);
Index: sio_pccard.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/sio_pccard.c,v
retrieving revision 1.6
diff -u -r1.6 sio_pccard.c
--- sio_pccard.c 20 Mar 2002 02:07:41 -0000 1.6
+++ sio_pccard.c 2 May 2002 14:23:38 -0000
@@ -105,7 +105,7 @@
sio_pccard_attach(dev)
device_t dev;
{
- return (sioattach(dev, 0, 0UL));
+ return (sioattach(dev, 0, 0UL, 1));
}
static int
Index: sio_pci.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/sio_pci.c,v
retrieving revision 1.7
diff -u -r1.7 sio_pci.c
--- sio_pci.c 20 Mar 2002 19:38:26 -0000 1.7
+++ sio_pci.c 2 May 2002 14:24:14 -0000
@@ -93,7 +93,7 @@
if (id->desc == NULL)
return (ENXIO);
sio_pci_kludge_unit(dev);
- return (sioattach(dev, id->rid, 0UL));
+ return (sioattach(dev, id->rid, 0UL, 1));
}
/*
Index: sio_puc.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/sio_puc.c,v
retrieving revision 1.3
diff -u -r1.3 sio_puc.c
--- sio_puc.c 20 Mar 2002 02:07:41 -0000 1.3
+++ sio_puc.c 2 May 2002 14:24:09 -0000
@@ -71,7 +71,7 @@
if (BUS_READ_IVAR(device_get_parent(dev), dev, PUC_IVAR_FREQ,
&rclk) != 0)
rclk = DEFAULT_RCLK;
- return (sioattach(dev, 0, rclk));
+ return (sioattach(dev, 0, rclk, 1));
}
static int
Index: siovar.h
===================================================================
RCS file: /usr/cvs/src/sys/dev/sio/siovar.h,v
retrieving revision 1.5
diff -u -r1.5 siovar.h
--- siovar.h 20 Mar 2002 02:07:41 -0000 1.5
+++ siovar.h 2 May 2002 14:20:21 -0000
@@ -63,7 +63,7 @@
#define CLR_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) &
~(bit))
#endif /* PC98 */
-int sioattach(device_t dev, int xrid, u_long rclk);
+int sioattach(device_t dev, int xrid, u_long rclk, int shareirq);
int siodetach(device_t dev);
int sioprobe(device_t dev, int xrid, u_long rclk, int noprobe);
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020509072607.jhb>
