public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* CDROMPLAYTRKIND ioctl causing server hang
@ 2004-08-27  8:27 Ganesh_Borse
  2004-08-27 16:38 ` Philippe Troin
  0 siblings, 1 reply; 2+ messages in thread
From: Ganesh_Borse @ 2004-08-27  8:27 UTC (permalink / raw)
  To: linux-kernel-owner, linux-kernel

Hi,

(1)
Doing CDROMPLAYTRKIND ioctl on bus powered USB CD drive:TEAC CD-ROM 210-PU causes server to hang.
CD drive was connected to USB port directly. Known good audio CD was inserted .

OS is Red Hat Linux AS 3.0, kernel 2.4.21-4.ELsmp.

As soon as this ioctl is called on /dev/scd node, kernel printk's the following messages in /var/log/messages file:
	Aug 24 10:42:15 PE2600-7XP2B1S kernel: sr2: CDROM (ioctl) reports ILLEGAL REQUEST.
	Aug 24 10:42:15 PE2600-7XP2B1S kernel: usb-uhci.c: interrupt, status 3, frame# 1495
	Aug 24 10:42:20 PE2600-7XP2B1S kernel: usb-uhci.c: interrupt, status 3, frame# 312
	Aug 24 10:42:50 PE2600-7XP2B1S kernel: usb_control/bulk_msg: timeout
	Aug 24 10:42:50 PE2600-7XP2B1S kernel: usb-uhci.c: interrupt, status 3, frame# 1685
	Aug 24 10:43:11 PE2600-7XP2B1S kernel: usb_control/bulk_msg: timeout
	Aug 24 10:43:11 PE2600-7XP2B1S kernel: usb.c: USB disconnect on device 00:1d.0-2 address 2

After the last line (USB disconnect..) logged in messages file, server hangs. Even the ssh connection from other server hangs. We have to switch off the server manually by pressing power switch.

(2)
I read on some Linux related posts on internet that CDROMPLAYTRKIND ioctl is not supported by SCSI drivers (ide-scsi, usb-scsi, etc.).
I used CDROMPLAYMSF for playing the CD and above problem did not occur. ioctl passed.

(3)
Also, when I connected this USB CD drive to an external hub (self-powered), ioctl failed but the server did not hang. However, the drive got disconnected.

(4)
Is there a known issue in 2.4.21-4 kernel related to CDROMPLAYTRKIND ioctl or usb driver? If yes, what is Bugzilla id for it?

Please guide.

Thanks,
Ganesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CDROMPLAYTRKIND ioctl causing server hang
  2004-08-27  8:27 CDROMPLAYTRKIND ioctl causing server hang Ganesh_Borse
@ 2004-08-27 16:38 ` Philippe Troin
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Troin @ 2004-08-27 16:38 UTC (permalink / raw)
  To: Ganesh_Borse; +Cc: linux-kernel-owner, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

<Ganesh_Borse@Dell.com> writes:

> (4) Is there a known issue in 2.4.21-4 kernel related to
> CDROMPLAYTRKIND ioctl or usb driver? If yes, what is Bugzilla id for
> it?

This patch does it for me, but of course it's a ugly hack...

Phil.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linux-2.4.27-2-scsicdrom.patch --]
[-- Type: text/x-patch, Size: 1073 bytes --]

diff -ruN linux-2.4.27.orig/drivers/scsi/sr.c linux-2.4.27/drivers/scsi/sr.c
--- linux-2.4.27.orig/drivers/scsi/sr.c	Fri Jun 13 07:51:36 2003
+++ linux-2.4.27/drivers/scsi/sr.c	Mon Aug  9 15:34:08 2004
@@ -59,7 +59,7 @@
 MODULE_PARM(xa_test, "i");	/* see sr_ioctl.c */
 
 #define MAX_RETRIES	3
-#define SR_TIMEOUT	(30 * HZ)
+#define SR_TIMEOUT	(180 * HZ)
 
 static int sr_init(void);
 static void sr_finish(void);
diff -ruN linux-2.4.27.orig/drivers/scsi/sr_ioctl.c linux-2.4.27/drivers/scsi/sr_ioctl.c
--- linux-2.4.27.orig/drivers/scsi/sr_ioctl.c	Thu Nov 28 15:53:14 2002
+++ linux-2.4.27/drivers/scsi/sr_ioctl.c	Mon Aug  9 15:34:08 2004
@@ -392,9 +392,9 @@
 		sr_cmd[4] = ti->cdti_trk0;
 		sr_cmd[5] = ti->cdti_ind0;
 		sr_cmd[7] = ti->cdti_trk1;
-		sr_cmd[8] = ti->cdti_ind1;
+		sr_cmd[8] = (ti->cdti_ind1 == 99 ? 0 : ti->cdti_ind1);
 
-		result = sr_do_ioctl(target, sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL);
+		result = sr_do_ioctl(target, sr_cmd, NULL, 0, 1, SCSI_DATA_NONE, NULL);
 		if (result == -EDRIVE_CANT_DO_THIS)
 			result = sr_fake_playtrkind(cdi, ti);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-27 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-27  8:27 CDROMPLAYTRKIND ioctl causing server hang Ganesh_Borse
2004-08-27 16:38 ` Philippe Troin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox