Re: ATAng regression: cdcontrol close not working
It seems Lars Eggert wrote: Lars Eggert wrote: Soren Schmidt wrote: Is there any other patch I can try? I've just confirmed that this bug still exists with today's kernel. I cant reproduce the no matter what I try, sorry... Would remote access to the machine in question help you? FYI, this is still an issue: s = ioctl(fd, CDIOCCLOSE, 0) IOError: [Errno 16] Device busy Hmm, if the call to do the close fails there isn't much I can do... I can't reproduce the problem on any of the dozens of ATAPI CDROM's I have in the closet, so if you want to get further with this, you'll have to instrument the code and find out exactly why this fails. Maybe then I can find a solution that can work, and not break anything. -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
Soren Schmidt wrote: FYI, this is still an issue: s = ioctl(fd, CDIOCCLOSE, 0) IOError: [Errno 16] Device busy Hmm, if the call to do the close fails there isn't much I can do... I can't reproduce the problem on any of the dozens of ATAPI CDROM's I have in the closet, so if you want to get further with this, you'll have to instrument the code and find out exactly why this fails. Maybe then I can find a solution that can work, and not break anything. I'll see what I can find out. It probably doesn't help you to know that the same hardware worked fine with the old ATA code... Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
Lars Eggert wrote: Soren Schmidt wrote: Is there any other patch I can try? I've just confirmed that this bug still exists with today's kernel. I cant reproduce the no matter what I try, sorry... Would remote access to the machine in question help you? FYI, this is still an issue: s = ioctl(fd, CDIOCCLOSE, 0) IOError: [Errno 16] Device busy Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
Bruce Evans wrote: On Thu, 30 Oct 2003, Soren Schmidt wrote: Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the close case, does it work then ? Problem is that the call to read toc might fail early, but its worth a shot.. I tried this, but it didn't change anything. (See my mail from last week.) I was mistaken in thinking that my patch fixed this. It only works for 1 drive, as does at acd^H^Htapi-cd.c rev.1.148. Is there any other patch I can try? I've just confirmed that this bug still exists with today's kernel. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
It seems Lars Eggert wrote: Bruce Evans wrote: On Thu, 30 Oct 2003, Soren Schmidt wrote: Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the close case, does it work then ? Problem is that the call to read toc might fail early, but its worth a shot.. I tried this, but it didn't change anything. (See my mail from last week.) Then I'm out of tricks since the close command fails then... I was mistaken in thinking that my patch fixed this. It only works for 1 drive, as does at acd^H^Htapi-cd.c rev.1.148. Is there any other patch I can try? I've just confirmed that this bug still exists with today's kernel. I cant reproduce the no matter what I try, sorry... -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
Soren Schmidt wrote: Is there any other patch I can try? I've just confirmed that this bug still exists with today's kernel. I cant reproduce the no matter what I try, sorry... Would remote access to the machine in question help you? Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
On Thu, 30 Oct 2003, Soren Schmidt wrote: It seems Lars Eggert wrote: I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... I must have missed that commit message, sorry. This is the drive I am having the issues with: acd0: CDRW PHILIPS DVD+RW-D28 at ata1-master UDMA33 Sending CDIOCCLOSE from a short C snippet shows that the ioctl yields EBUSY. Hmm, now that a real stupid return code from the drive IMNHO... Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the close case, does it work then ? Problem is that the call to read toc might fail early, but its worth a shot.. I was mistaken in thinking that my patch fixed this. It only works for 1 drive, as does at acd^H^Htapi-cd.c rev.1.148. Some boot messages: acd0: CDRW RICOH CD-RW MP7320A at ata1-slave UDMA33 acd1: CDROM ATAPI 44X CDROM at ata2-slave PIO4 (cd1:ata2:0:1:0): Recovered Sense (cd1:ata2:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd1:ata2:0:1:0): CAM Status: SCSI Status Error (cd1:ata2:0:1:0): SCSI Status: Check Condition (cd1:ata2:0:1:0): NOT READY asc:3a,0 (cd1:ata2:0:1:0): Medium not present cd1 at ata2 bus 0 target 1 lun 0 cd1: ATAPI 44X CDROM 3.40 Removable CD-ROM SCSI-0 device cd1: 16.000MB/s transfers cd1: Attempt to query device size failed: NOT READY, Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present cd0 at ata1 bus 0 target 1 lun 0 cd0: RICOH CD-RW MP7320A bp13 Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present These drives now have the following behaviour for eject/close: cd0, acd1, cd1: eject and close just work acd0: eject works. Close fails with EBUSY. None of acd_start_stop(cdp, [0-3]) (called from ddb, ignoring errors) closes the tray when it is open. The related bugs in the cd driver are only that the messages are too verbose. The above boot messages show only some of them. Eject + close gives the following messages (all unwanted): (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present This is with my modified version of scsi_cd.c. The current one is similarly verbose, but doesn't do as many read-capacity's. Bruce ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
Soren Schmidt wrote: It seems Pav Lucistnik wrote: This patch works for me. Any chance to get it committed? I'll look at it... FYI, the issue is still present with yesterday's -current. Will Pav Lucistnik's patch be committed soon? Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
It seems Lars Eggert wrote: FYI, the issue is still present with yesterday's -current. Will Pav Lucistnik's patch be committed soon? I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... revision 1.148 date: 2003/10/12 13:11:57; author: sos; state: Exp; lines: +21 -22 Redo the code that handles eject/close. -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
Soren Schmidt wrote: It seems Lars Eggert wrote: FYI, the issue is still present with yesterday's -current. Will Pav Lucistnik's patch be committed soon? I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... I must have missed that commit message, sorry. This is the drive I am having the issues with: acd0: CDRW PHILIPS DVD+RW-D28 at ata1-master UDMA33 I also have atapicam in the kernel: cd0: PHILIPS DVD+RW-D28 1.62 Removable CD-ROM SCSI-0 device I have the same issue as the original poster: cdcontrol -f /dev/acd0 eject - ejects tray cdcontrol -f /dev/acd0 close - does nothing cdcontrol -f /dev/cd0 eject - ejects tray cdcontrol -f /dev/cd0 close - retracts tray cdcontrol does not show any messages, even with -v. Sending CDIOCCLOSE from a short C snippet shows that the ioctl yields EBUSY. (I also tried to get a ktrace, but that just shows Events dropped where the trace becomes interesting. Issue with -current?) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
On 30-Oct-2003 Lars Eggert wrote: Soren Schmidt wrote: It seems Lars Eggert wrote: FYI, the issue is still present with yesterday's -current. Will Pav Lucistnik's patch be committed soon? I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... I must have missed that commit message, sorry. This is the drive I am having the issues with: acd0: CDRW PHILIPS DVD+RW-D28 at ata1-master UDMA33 I also have atapicam in the kernel: cd0: PHILIPS DVD+RW-D28 1.62 Removable CD-ROM SCSI-0 device I have the same issue as the original poster: cdcontrol -f /dev/acd0 eject - ejects tray cdcontrol -f /dev/acd0 close - does nothing cdcontrol -f /dev/cd0 eject - ejects tray cdcontrol -f /dev/cd0 close - retracts tray cdcontrol does not show any messages, even with -v. Sending CDIOCCLOSE from a short C snippet shows that the ioctl yields EBUSY. (I also tried to get a ktrace, but that just shows Events dropped where the trace becomes interesting. Issue with -current?) You ran out of ktrace objects (check your dmesg). You can resize the pool via the kern.ktrace.request_pool sysctl. -- John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/ Power Users Use the Power to Serve! - http://www.FreeBSD.org/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
It seems Lars Eggert wrote: I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... I must have missed that commit message, sorry. This is the drive I am having the issues with: acd0: CDRW PHILIPS DVD+RW-D28 at ata1-master UDMA33 Sending CDIOCCLOSE from a short C snippet shows that the ioctl yields EBUSY. Hmm, now that a real stupid return code from the drive IMNHO... Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the close case, does it work then ? Problem is that the call to read toc might fail early, but its worth a shot.. -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
V t, 30. 10. 2003 v 20:43, Lars Eggert pe: FYI, the issue is still present with yesterday's -current. Will Pav Lucistnik's patch be committed soon? I've already committed a solution that works on all the drives I could test on (some of which failed before), if this still fails for you I'd like a more detailed description of what exactly goes wrong... I must have missed that commit message, sorry. This is the drive I am having the issues with: acd0: CDRW PHILIPS DVD+RW-D28 at ata1-master UDMA33 I also have atapicam in the kernel: cd0: PHILIPS DVD+RW-D28 1.62 Removable CD-ROM SCSI-0 device I have the same issue as the original poster: cdcontrol -f /dev/acd0 eject - ejects tray cdcontrol -f /dev/acd0 close - does nothing Works for me (with 1.148 revision of atapi-cd.c). You're in it alone now, Lars. -- Pav Lucistnik [EMAIL PROTECTED] What do we know about love? Love is like a pear. Pear is sweet and have a specific shape. Try to exactly define the shape of a pear. -- Marigold: 50 Years Of Poetry -- Pav Lucistnik [EMAIL PROTECTED] Co vime o lasce? Laska je jako hruska. Hruska je sladka a ma urcity tvar. Zkuste presne definovat tvar hrusky. -- Marigold: Pul stoleti poezie signature.asc Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?=
Re: ATAng regression: cdcontrol close not working
Soren Schmidt wrote: Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the close case, does it work then ? If you mean as below, no, that didn't help: Index: atapi-cd.c === RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.149 diff -u -r1.149 atapi-cd.c --- atapi-cd.c 18 Oct 2003 17:24:51 - 1.149 +++ atapi-cd.c 30 Oct 2003 21:31:23 - @@ -1884,11 +1884,10 @@ if (cdp-cap.mechanism MST_EJECT) { if (close) { - if (!(error = acd_start_stop(cdp, 3))) { - acd_read_toc(cdp); - acd_prevent_allow(cdp, 1); - cdp-flags |= F_LOCKED; - } +error = acd_start_stop(cdp, 3); + acd_read_toc(cdp); + acd_prevent_allow(cdp, 1); + cdp-flags |= F_LOCKED; } else { acd_start_stop(cdp, 0); Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: ATAng regression: cdcontrol close not working
V so, 06. 09. 2003 v 21:41, Bruce Evans pe: On Sat, 6 Sep 2003, Pav Lucistnik wrote: after recent ATAng changes, cdcontrol close stopped working with my CD-ROM drive. It used to close the tray. It works with -f /dev/cd0 but not with /dev/acd0. cdcontrol eject still works fine. I use the following fix: %%% Index: atapi-cd.c === RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.142 diff -u -2 -r1.142 atapi-cd.c --- atapi-cd.c5 Sep 2003 10:40:16 - 1.142 +++ atapi-cd.c6 Sep 2003 17:16:16 - @@ -1870,7 +1913,7 @@ int error; -if ((error = acd_start_stop(cdp, 0)) == EBUSY) { +if ((error = acd_start_stop(cdp, 0)) == EBUSY || close) { if (!close) - return 0; + return EBUSY; if ((error = acd_start_stop(cdp, 3))) return error; @@ -1882,6 +1925,4 @@ if (error) return error; -if (close) - return 0; acd_prevent_allow(cdp, 0); cdp-flags = ~F_LOCKED; %%% acd_eject() doesn't seem to have been changed by ATAng, so I don't see how close it could have ever worked, but I seem to remember it working. This patch works for me. Any chance to get it committed? Relevant dmesg parts: ... cd0 at ata1 bus 0 target 0 lun 0 cd0: TEAC CD-532E-B 1.0A Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: cd present [357072 x 2048 byte records] I do have atapicam in my kernel. Close works on cd0 and cd1 for me without the above patch. The code for eject and close in scsi_cd.c is easier to understand. Yes, for me too. I haven't tought to try cdcontrol on /dev/cd0 before, thank you for the tip. -- Pav Lucistnik [EMAIL PROTECTED] What do we know about love? Love is like a pear. Pear is sweet and have a specific shape. Try to exactly define the shape of a pear. -- Marigold: 50 Years Of Poetry signature.asc Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?=
Re: ATAng regression: cdcontrol close not working
On Sun, 14 Sep 2003, Pav Lucistnik wrote: V so, 06. 09. 2003 v 21:41, Bruce Evans pí¹e: On Sat, 6 Sep 2003, Pav Lucistnik wrote: after recent ATAng changes, cdcontrol close stopped working with my CD-ROM drive. It used to close the tray. It works with -f /dev/cd0 but not with /dev/acd0. cdcontrol eject still works fine. I use the following fix: %%% Index: atapi-cd.c === RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.142 diff -u -2 -r1.142 atapi-cd.c --- atapi-cd.c 5 Sep 2003 10:40:16 - 1.142 +++ atapi-cd.c 6 Sep 2003 17:16:16 - @@ -1870,7 +1913,7 @@ int error; -if ((error = acd_start_stop(cdp, 0)) == EBUSY) { +if ((error = acd_start_stop(cdp, 0)) == EBUSY || close) { if (!close) - return 0; + return EBUSY; if ((error = acd_start_stop(cdp, 3))) return error; @@ -1882,6 +1925,4 @@ if (error) return error; -if (close) - return 0; acd_prevent_allow(cdp, 0); cdp-flags = ~F_LOCKED; %%% acd_eject() doesn't seem to have been changed by ATAng, so I don't see how close it could have ever worked, but I seem to remember it working. This patch works for me. Any chance to get it committed? Up to the maintainer :-). Bruce ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ATAng regression: cdcontrol close not working
It seems Pav Lucistnik wrote: This patch works for me. Any chance to get it committed? I'll look at it... -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
ATAng regression: cdcontrol close not working
Hi, after recent ATAng changes, cdcontrol close stopped working with my CD-ROM drive. It used to close the tray. It works with -f /dev/cd0 but not with /dev/acd0. cdcontrol eject still works fine. Relevant dmesg parts: atapci0: VIA 8235 UDMA133 controller port 0xfc00-0xfc0f at device 17.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] GEOM: create disk ad0 dp=0xc266cb70 ad0: 17206MB WDC AC418000D [34960/16/63] at ata0-master UDMA66 GEOM: create disk ad1 dp=0xc266c770 ad1: 76319MB ST380011A [155061/16/63] at ata0-slave UDMA100 acd0: CDROM CD-532E-B at ata1-master PIO4 GEOM: create disk ad3 dp=0xc26df370 ad3: 4126MB ST34311A [8944/15/63] at ata1-slave UDMA33 Mounting root from ufs:/dev/ad0s1a cd0 at ata1 bus 0 target 0 lun 0 cd0: TEAC CD-532E-B 1.0A Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: cd present [357072 x 2048 byte records] I do have atapicam in my kernel. -- Pav Lucistnik [EMAIL PROTECTED] What do we know about love? Love is like a pear. Pear is sweet and have a specific shape. Try to exactly define the shape of a pear. -- Marigold: 50 Years Of Poetry signature.asc Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?=
Re: ATAng regression: cdcontrol close not working
On Sat, 6 Sep 2003, Pav Lucistnik wrote: after recent ATAng changes, cdcontrol close stopped working with my CD-ROM drive. It used to close the tray. It works with -f /dev/cd0 but not with /dev/acd0. cdcontrol eject still works fine. I use the following fix: %%% Index: atapi-cd.c === RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.142 diff -u -2 -r1.142 atapi-cd.c --- atapi-cd.c 5 Sep 2003 10:40:16 - 1.142 +++ atapi-cd.c 6 Sep 2003 17:16:16 - @@ -1870,7 +1913,7 @@ int error; -if ((error = acd_start_stop(cdp, 0)) == EBUSY) { +if ((error = acd_start_stop(cdp, 0)) == EBUSY || close) { if (!close) - return 0; + return EBUSY; if ((error = acd_start_stop(cdp, 3))) return error; @@ -1882,6 +1925,4 @@ if (error) return error; -if (close) - return 0; acd_prevent_allow(cdp, 0); cdp-flags = ~F_LOCKED; %%% acd_eject() doesn't seem to have been changed by ATAng, so I don't see how close it could have ever worked, but I seem to remember it working. Relevant dmesg parts: ... cd0 at ata1 bus 0 target 0 lun 0 cd0: TEAC CD-532E-B 1.0A Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: cd present [357072 x 2048 byte records] I do have atapicam in my kernel. Close works on cd0 and cd1 for me without the above patch. The code for eject and close in scsi_cd.c is easier to understand. Bruce ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]