pcmcia cdrom/irq sharing problem?
Hi all, I've just upgraded my system to today's -CURRENT (I was running a -CURRENT from April 2001). Although I encountered some problems, the UPDATING file got me through (I love the way FreeBSD documents stuff) and my system is running fine (background fsck, great!) except for my PCMCIA CDROM player. I have a Sony VAIO Z600 laptop by the way. I was hoping somebody can point me in the right direction (searching the web/mailinglist archives didn't help). My CDROM player was always correctly identified with my previous install as NinjaATA on irq 3 (slot 0 on pccard0). After the upgrade, it is recognised, but assigned irq 9 (which is not in pccard.conf) after which the system hangs until the card is removed. This irq is (and was) shared with fxp0, pcm0. I've turned off PnP in the BIOS to no avail. I've tried a NEWCARD kernel, which does not even recognise the card. My PCMCIA wireless card works fine (also on irq 9). Attached are kernel messages when inserting the card (with the april 2001 -CURRENT, today's -CURRENT with oldcard and today's -CURRENT with newcard), dmesg output and kernel config file. Regards, Walter. -- Walter Belgers Si hoc signum legere potes, operis boni in rebus [EMAIL PROTECTED] Latinis alacribus et fructuosis potiri potes! kernel messages with April 2001 kernel Sep 19 20:18:32 bwerk /boot/kernel/kernel: pccard: card inserted, slot 0 Sep 19 20:18:31 bwerk pccardd[178]: Card (NinjaATA-) [V1.0] [AP00 ] matched (NinjaATA-) [(null)] [(null)] Sep 19 20:18:37 bwerk /boot/kernel/kernel: ata4 at port 0x180-0x187,0x386 iomem 0xd4000-0xd4fff irq 3 slot 0 on pccard0 Sep 19 20:18:37 bwerk /boot/kernel/kernel: ata4-slave: identify retries exceeded Sep 19 20:18:37 bwerk /boot/kernel/kernel: acd0: CDROM TOSHIBA CD-ROM XM-1902B at ata4-master BIOSPIO Sep 19 20:18:37 bwerk pccardd[178]: ata4: NinjaATA inserted. Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb0: card inserted: event=0x, state=3510 Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccard0: chip_socket_enable Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb_pcic_socket_enable: Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb0: pccbb_power: CARD_VCC_0V and CARD_VPP_0V [44] Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb0: pccbb_power: CARD_VCC_5V and CARD_VPP_VCC [15] Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb0: pccbb_pcic_wait_ready: status 0x7f Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb0: card type is mem Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccard0: read_cis Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb_pcic_mem_map window 0 bus 10001000+400+e000 card addr 0 Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb_pcic_do_mem_map window 0: 8001 8001 3fff 10 (10001000+0400.1000*e000) Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccbb_pcic_do_mem_map window 0: 8001 8001 7fff 10 (10001000+0400.1000*e000) Oct 16 10:59:37 bwerk /boot/kernel/kernel: cis mem map c8569000 Oct 16 10:59:37 bwerk /boot/kernel/kernel: pccard0: CIS tuple chain: Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_DEVICE type=funcspec speed=100ns Oct 16 10:59:37 bwerk /boot/kernel/kernel: 01 03 dc 00 ff Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_VERS_1 Oct 16 10:59:37 bwerk /boot/kernel/kernel: 15 1a 04 01 20 00 4e 69 6e 6a 61 41 54 41 2d 00 Oct 16 10:59:37 bwerk /boot/kernel/kernel: 56 31 2e 30 00 41 50 30 30 20 00 ff Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_CONFIG Oct 16 10:59:37 bwerk /boot/kernel/kernel: 1a 05 01 23 00 02 03 Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_CFTABLE_ENTRY Oct 16 10:59:37 bwerk /boot/kernel/kernel: 1b 15 e1 01 3d 11 55 1e fc 23 f0 61 80 01 07 86 Oct 16 10:59:37 bwerk /boot/kernel/kernel: 03 01 30 68 d0 10 00 Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_CFTABLE_ENTRY Oct 16 10:59:37 bwerk /boot/kernel/kernel: 1b 0f 22 38 f0 61 90 01 07 96 03 01 30 68 d0 10 Oct 16 10:59:37 bwerk /boot/kernel/kernel: 00 Oct 16 10:59:37 bwerk /boot/kernel/kernel: CISTPL_CFTABLE_ENTRY Oct 16 10:59:37 bwerk /boot/kernel/kernel: 1b 0f 23 38 f0 61 a0 01 07 a6 03 01 30 68 d0 10 Oct 16 10:59:38 bwerk /boot/kernel/kernel: 00 Oct 16 10:59:38 bwerk /boot/kernel/kernel: CISTPL_NO_LINK Oct 16 10:59:38 bwerk /boot/kernel/kernel: 14 00 Oct 16 10:59:38 bwerk /boot/kernel/kernel: CISTPL_END Oct 16 10:59:38 bwerk /boot/kernel/kernel: ff Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: check_cis_quirks Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: CIS version PCCARD 2.0 or 2.1 Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: CIS info: , NinjaATA-, V1.0, AP00 Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: Manufacturer code 0x, product 0x Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: function 0: unspecified, ccr addr 200 mask 3 Oct 16 10:59:38 bwerk /boot/kernel/kernel: pccard0: function 0, config table entry 33: I/O card; irq mask d068; iomask 10, iospace 180-187 386-387; memspace 0-fff; rdybsy_active wp_active
Re: pcmcia cdrom/irq sharing problem?
Hi all, I've just upgraded my system to today's -CURRENT (I was running a -CURRENT from April 2001). Although I encountered some problems, the UPDATING file got me through (I love the way FreeBSD documents stuff) and my system is running fine (background fsck, great!) except for my PCMCIA CDROM player. I have a Sony VAIO Z600 laptop by the way. I was hoping somebody can point me in the right direction (searching the web/mailinglist archives didn't help). My CDROM player was always correctly identified with my previous install as NinjaATA on irq 3 (slot 0 on pccard0). After the upgrade, it is recognised, but assigned irq 9 (which is not in pccard.conf) after which the system hangs until the card is removed. This irq is (and was) shared with fxp0, pcm0. I've turned off PnP in the BIOS to no avail. I've tried a NEWCARD kernel, which does not even recognise the card. My PCMCIA wireless card works fine (also on irq 9). Attached are kernel messages when inserting the card (with the april 2001 -CURRENT, today's -CURRENT with oldcard and today's -CURRENT with newcard), dmesg output and kernel config file. I had a similar problem, though it was with my ed0-compatible pcmcia network card. At some point in the past pccardd stopped assigning correct IRQ to it, wich resulted in famous `ed0 timeout' error. I've workarounded the problem by replacing `?' with real IRQ number in my pccard.conf, however I understand that it is only a temporarly solution. -Maxim To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pcmcia cdrom/irq sharing problem?
Maxim Sobolev wrote: My CDROM player was always correctly identified with my previous install as NinjaATA on irq 3 (slot 0 on pccard0). After the upgrade, it is recognised, but assigned irq 9 (which is not in pccard.conf) after which the system hangs until the card is removed. This irq is (and was) shared with fxp0, pcm0. I had a similar problem, though it was with my ed0-compatible pcmcia network card. At some point in the past pccardd stopped assigning correct IRQ to it, wich resulted in famous `ed0 timeout' error. I've workarounded the problem by replacing `?' with real IRQ number in my pccard.conf, however I understand that it is only a temporarly solution. I forgot to say: I tried that as well, to no avail, it still takes irq 9 instead of 3 which I put in pccard.conf (and yes, I did start pccardd with the correct pccard.conf). Also using pccardd -i 3 did not work. Regards, Walter. -- Walter Belgers Si hoc signum legere potes, operis boni in rebus [EMAIL PROTECTED] Latinis alacribus et fructuosis potiri potes! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pcmcia cdrom/irq sharing problem?
In message [EMAIL PROTECTED] Walter Belgers writes: : Maxim Sobolev wrote: : My CDROM player was always correctly identified with my previous install : as NinjaATA on irq 3 (slot 0 on pccard0). After the upgrade, it is : recognised, but assigned irq 9 (which is not in pccard.conf) after which : the system hangs until the card is removed. This irq is (and was) shared : with fxp0, pcm0. : : I had a similar problem, though it was with my ed0-compatible : pcmcia network card. At some point in the past pccardd stopped : assigning correct IRQ to it, wich resulted in famous `ed0 : timeout' error. I've workarounded the problem by replacing `?' : with real IRQ number in my pccard.conf, however I understand that : it is only a temporarly solution. : : I forgot to say: I tried that as well, to no avail, it still takes irq 9 : instead of 3 which I put in pccard.conf (and yes, I did start pccardd : with the correct pccard.conf). Also using pccardd -i 3 did not work. There's a bug in the ata driver that Ian Downes has a patch for. Since cardbus bridges are now using level interrupts to allow sharing (which is why it used irq 9, the same as your bridge), cards that assert interrupt, but don't clear it, will cause the machine to hang in an interrupt storm. Ian's patches fix that. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pcmcia cdrom/irq sharing problem? - solved
Warner Losh wrote: There's a bug in the ata driver that Ian Downes has a patch for. Yes - Ian sent it to me (thanks!) and indeed it does work. I've attached the version that will fix -CURRENT. Cheers, Walter. -- Walter Belgers Si hoc signum legere potes, operis boni in rebus [EMAIL PROTECTED] Latinis alacribus et fructuosis potiri potes! --- ata-all.c.orig Tue Oct 16 17:05:36 2001 +++ ata-all.c Tue Oct 16 17:07:16 2001 @@ -156,7 +156,7 @@ ata_attach(device_t dev) { struct ata_softc *scp; -int error, rid; +int error, rid, s; if (!dev) return ENXIO; @@ -181,6 +181,7 @@ * otherwise attach what the probe has found in scp-devices. */ if (!ata_delayed_attach) { + s = splbio(); if (scp-devices ATA_ATA_SLAVE) if (ata_getparam(scp, ATA_SLAVE, ATA_C_ATA_IDENTIFY)) scp-devices = ~ATA_ATA_SLAVE; @@ -205,6 +206,7 @@ if (scp-devices ATA_ATAPI_SLAVE) atapi_attach(scp, ATA_SLAVE); #endif + splx(s); } return 0; } @@ -723,7 +725,7 @@ /* wait for BUSY to go inactive */ for (timeout = 0; timeout 31; timeout++) { - if (stat0 ATA_S_BUSY) { + if (mask 0x01 stat0 ATA_S_BUSY) { ATA_OUTB(scp-r_io, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); stat0 = ATA_INB(scp-r_io, ATA_STATUS); @@ -738,7 +740,7 @@ scp-devices |= ATA_ATAPI_MASTER; } } -if (stat1 ATA_S_BUSY) { +if (mask 0x02 stat1 ATA_S_BUSY) { ATA_OUTB(scp-r_io, ATA_DRIVE, ATA_D_IBM | ATA_SLAVE); DELAY(10); stat1 = ATA_INB(scp-r_io, ATA_STATUS);