[PATCH] blk API update (and bug fix) to CDU535 cdrom driver

linux

[PATCH] blk API update (and bug fix) to CDU535 cdrom driver

Postby Felipe W Damasio » Thu, 11 Sep 2003 03:20:27 GMT

This is a multi-part message in MIME format.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to  XXXX@XXXXX.COM 
More majordomo info at   http://www.**--****.com/ 
Please read the FAQ at   http://www.**--****.com/ 
	Hi Jens,




	This patch I think fixes all these, doesn't it?

	It applies on top of my latest cli-sti-removal patch that I sent you.

	The only place I'm not sure is on releasing the queue lock before 
calling schedule_timeout.

	Please apply if it looks good to you.

	Thanks for all your help!

Felipe


Re: [PATCH] blk API update (and bug fix) to CDU535 cdrom driver

Postby Felipe W Damasio » Thu, 11 Sep 2003 05:50:08 GMT

This is a multi-part message in MIME format.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to  XXXX@XXXXX.COM 
More majordomo info at   http://www.**--****.com/ 
Please read the FAQ at   http://www.**--****.com/ 
	Hi,




	Sure thing, patch attached:

	- cli-sti removal
	- blk API update
	- set_current_state
	- Remove 'panic' line.

	Please don't forget to remove BROKEN_ON_SMP from 
drivers/cdrom/Kconfig on then cdu535 dependecies (I sent you a patch 
for that as well).

	Thanks for your help Jens,

Felipe


Re: [PATCH] blk API update (and bug fix) to CDU535 cdrom driver

Postby Matthew Wilcox » Fri, 12 Sep 2003 05:10:05 GMT

This cli-sti removal seems exactly as broken as all the ones i've {*filter*} on
kernel-janitors.  There's no evidence that I can see for locking in the
interrupt handler.  Here's a race example:

CPU 1				CPU 2
sony_sleep();
spin_lock_irq(&sonycd535_lock);
enable_interrupts();
				cdu535_interrupt();
				disable_interrupts();
				if (waitqueue_active(&cdu535_irq_wait)) {

prepare_to_wait(&cdu535_irq_wait, &wait, TASK_INTERRUPTIBLE);
spin_unlock_irq(&sonycd535_lock);

Either you need to move prepare_to_wait before enable_interrupts or
grab the sonycd535_lock in interrupt context.

Hang on a minute.  This driver is always polled, and never interrupt
driven.  There's no problem because this code path is never executed :-P
Nevertheless, it's probaby worth fixing so other more complex drivers
(eg cdu31a) don't copy it wrongly.

BTW, I bet sony_sleep() shouldn't be calling the new-and-improved yield().

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to  XXXX@XXXXX.COM 
More majordomo info at   http://www.**--****.com/ 
Please read the FAQ at   http://www.**--****.com/ 



Return to linux

 

Who is online

Users browsing this forum: No registered users and 70 guest