[parisc-linux-cvs] DIFF 2.4.16-pa29

Grant Grundler grundler@dsl2.external.hp.com
Sat, 29 Dec 2001 15:04:52 -0700 (MST)


Sorry,
I should have posted this diff when I committed...since then, helge
has reported SCSI hangs (locking up the system) with the __down_interruptible
change in place. Need to verify what the code path is and if I actually
committed what James sent.

grant

Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -p -r1.233 -r1.234
--- Makefile	2001/12/27 21:54:13	1.233
+++ Makefile	2001/12/29 05:35:12	1.234
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 16
-EXTRAVERSION = -pa28
+EXTRAVERSION = -pa29
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: arch/parisc/kernel/semaphore.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/semaphore.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- arch/parisc/kernel/semaphore.c	2001/07/06 03:41:35	1.10
+++ arch/parisc/kernel/semaphore.c	2001/12/29 05:35:13	1.11
@@ -31,6 +31,7 @@ void __up(struct semaphore *sem)
 #define wakers(count) (-1 - count)
 
 #define DOWN_HEAD							\
+	int ret = 0;							\
 	DECLARE_WAITQUEUE(wait, current);				\
 									\
 	/* Note that someone is waiting */				\
@@ -45,7 +46,7 @@ void __up(struct semaphore *sem)
 
 #define DOWN_TAIL							\
 	spin_lock_irq(&sem->sentry);					\
-	if (wakers(sem->count) == 0)					\
+	if (wakers(sem->count) == 0 && ret == 0)			\
 		goto lost_race;	/* Someone stole our wakeup */		\
 	__remove_wait_queue(&sem->wait, &wait);				\
 	current->state = TASK_RUNNING;					\
@@ -74,8 +75,6 @@ void __down(struct semaphore * sem)
 
 int __down_interruptible(struct semaphore * sem)
 {
-	int ret = 0;
-
 	DOWN_HEAD
 
 	for(;;) {
Index: drivers/scsi/lasi700.c
===================================================================
RCS file: /var/cvs/linux/drivers/scsi/lasi700.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- drivers/scsi/lasi700.c	2001/12/26 22:41:16	1.5
+++ drivers/scsi/lasi700.c	2001/12/29 05:35:13	1.6
@@ -197,6 +197,7 @@ lasi700_release(struct Scsi_Host *host)
 	kfree(hostdata);
 	free_irq(host->irq, host);
 	release_mem_region(host->base, 64);
+	unregister_parisc_driver(&lasi700_driver);
 	return 1;
 }