|
Bugzilla – Full Text Bug Listing |
| Summary: | hald cdrom polling causes scsi errors | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Ludwig Nussel <lnussel> |
| Component: | Basesystem | Assignee: | Danny Al-Gaaf <dalgaaf> |
| Status: | VERIFIED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Beta 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | SG_IO variant of the test program | ||
|
Description
Ludwig Nussel
2006-01-24 12:14:23 UTC
@Kay could you take a look at this ... I have no idea Jens, any idea what's going wrong with this device and where to look for?
HAL does every two seconds an:
open("/dev/sr0", O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE)
ok, it's the GPCMD_GET_EVENT_STATUS_NOTIFICATION part, which causes: -------------- $ dmesg -c (scsi0:A:6:0): No or incomplete CDB sent to device. scsi0: Issued Channel A Bus Reset. 1 SCBs aborted -------------- This test case triggers it. Anything I can fix here? ------------- struct cdrom_generic_command cgc; struct request_sense sense; unsigned char buffer[8]; int fd; memset (&cgc, 0, sizeof (struct cdrom_generic_command)); memset (&sense, 0, sizeof (struct request_sense)); memset (buffer, 0, sizeof (buffer)); cgc.cmd[0] = GPCMD_GET_EVENT_STATUS_NOTIFICATION; cgc.cmd[1] = 1; cgc.cmd[4] = 16; cgc.cmd[8] = sizeof (buffer); cgc.timeout = 600; cgc.buffer = buffer; cgc.buflen = sizeof (buffer); cgc.data_direction = CGC_DATA_READ; cgc.sense = &sense; cgc.quiet = 1; fd = open(argv[1], O_RDONLY|O_NONBLOCK|O_EXCL|O_LARGEFILE); ioctl(fd, CDROM_SEND_PACKET, &cgc); close(fd); ------------------ Hmm that looks perfectly valid. I wonder if the cdb len gets set incorrectly in the SCSI layer. Hmm no, it gets 10 which is correct. Kay, can you try the attached test program? Created attachment 65305 [details]
SG_IO variant of the test program
Just compile and run as ./geteven <device>
Ludwig, care to try Jens' test program and see if it still prints the error log. [0] root@g241:~ # ./sgio /dev/sr0 status 0 0006041600020000 [0] root@g241:~ # eject /dev/sr0 [0] root@g241:~ # ./sgio /dev/sr0 status 0 0006041603010000 [0] root@g241:~ # seems to work fine. no errors in /var/log/messages, no hangs. Jens, using SG_IO seems to work without the error. Should I switch the code in HAL or is this something to be fixed in the kernel? Just switch the code in HAL, it's better to use SG_IO anyways. I don't know what is going wrong with CDROM_SEND_PACKET right now, but we can look at that later. Thanks Jens. Switched to SG_IO and comitted it to HAL CVS: http://cvs.freedesktop.org/hal/hal/hald/linux2/addons/addon-storage.c?r1=1.14&r2=1.15&makepatch=1&diff_format=u Added patch to package. |