Messages in this thread Patch in this message | | | From | Frans Pop <> | Subject | Re: [PATCH] pcmcia: ensure correct logging in do_io_probe [v2] | Date | Sat, 15 Nov 2008 16:24:24 +0100 |
| |
On Sunday 09 November 2008, Dominik Brodowski wrote: > On Fri, Nov 07, 2008 at 03:22:42PM +0100, Frans Pop wrote: > > During early probing of the parent PCI bridge I/O window no socket > > has been allocated yet. > > In that case print &s->cb_dev->dev instead of &s->dev as device. > > similar to the other patch, this won't work: &skt->cb_dev is only > available and set if the parent device is a PCI device; therefore, > &skt->dev is the only thing we can use.
OK.
I still feel I'm missing something in the debug logging. Shouldn't there be a line saying something like the following? yenta_cardbus 0000:02:06.0: Assigned pcmcia socket 0
> An alternative approach would be to move this initialization code only > after we've set dev_name. Could you test whether this approach works > for you, please?
Tested on two different systems: Toshiba Satellite A40 running i386 (with atheros wlan card already inserted during boot) and HP 2510p running x86_64 (with same card inserted after boot). Both with patch applied against current mainline git. I've not seen any problems and wireless worked in both cases.
There are some differences in the logs (see attachments). I only see the IO probes on the Toshiba, not on the HP. I'd guess that's expected.
Tested-by: Frans Pop <elendil@planet.nl>
This does leave one minor issue from my previous patch. Please consider applying the attached patch.
Cheers, FJP
From: Frans Pop <elendil@planet.nl>
pcmcia: properly close previous dev_printk if kzalloc fails in do_io_probe
Signed-off-by: Frans Pop <elendil@planet.nl>
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 17f4ecf..da95252 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -206,6 +206,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base, /* First, what does a floating port look like? */ b = kzalloc(256, GFP_KERNEL); if (!b) { + printk("\n"); dev_printk(KERN_ERR, &s->dev, "do_io_probe: unable to kmalloc 256 bytes"); return;yenta_cardbus 0000:02:06.0: CardBus bridge found [103c:30c9] yenta_cardbus 0000:02:06.0: ISA IRQ mask 0x0cb8, PCI irq 18 yenta_cardbus 0000:02:06.0: Socket status: 30000006 pci_bus 0000:02: Raising subordinate bus# of parent bus (#02) from #03 to #06 yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge I/O window: 0x3000 - 0x3fff yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge Memory window: 0xe0100000 - 0xe03fffff yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge Memory window: 0x80000000 - 0x83ffffff pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 yenta_cardbus 0000:01:0b.0: CardBus bridge found [1179:0001] yenta_cardbus 0000:01:0b.0: ISA IRQ mask 0x0c38, PCI irq 18 yenta_cardbus 0000:01:0b.0: Socket status: 30000020 yenta_cardbus 0000:01:0b.0: pcmcia: parent PCI bridge I/O window: 0xc000 - 0xcfff pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc000-0xcfff: clean. yenta_cardbus 0000:01:0b.0: pcmcia: parent PCI bridge Memory window: 0xcff00000 - 0xcfffffff yenta_cardbus 0000:01:0b.0: pcmcia: parent PCI bridge Memory window: 0x28000000 - 0x2bffffff pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean.
| |