mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:16 Alan Cox
  2003-03-27 18:17 ` Matti Aarnio
  0 siblings, 1 reply; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:16 UTC (permalink / raw)
  To: linux-kernel, torvalds


One from Jens - fix up the problems with older Samsung disks that don't
abort unknown commands sometimes

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/ide/ide-disk.c linux-2.5.66-ac1/drivers/ide/ide-disk.c
--- linux-2.5.66-bk3/drivers/ide/ide-disk.c	2003-03-27 17:13:19.000000000 +0000
+++ linux-2.5.66-ac1/drivers/ide/ide-disk.c	2003-03-26 20:23:01.000000000 +0000
@@ -1098,6 +1098,7 @@
  * in above order (i.e., if value of higher priority is available,
  * reset will be ignored).
  */
+#define IDE_STROKE_LIMIT	(32000*1024*2)
 static void init_idedisk_capacity (ide_drive_t  *drive)
 {
 	struct hd_driveid *id = drive->id;
@@ -1118,7 +1119,7 @@
 		drive->cyl = (unsigned int) capacity_2 / (drive->head * drive->sect);
 		drive->select.b.lba	= 1;
 		set_max_ext = idedisk_read_native_max_address_ext(drive);
-		if (set_max_ext > capacity_2) {
+		if (set_max_ext > capacity_2 && capacity_2 > IDE_STROKE_LIMIT) {
 #ifdef CONFIG_IDEDISK_STROKE
 			set_max_ext = idedisk_read_native_max_address_ext(drive);
 			set_max_ext = idedisk_set_max_address_ext(drive, set_max_ext);
@@ -1145,7 +1146,7 @@
 		drive->select.b.lba = 1;
 	}
 
-	if (set_max > capacity) {
+	if (set_max > capacity && capacity > IDE_STROKE_LIMIT) {
 #ifdef CONFIG_IDEDISK_STROKE
 		set_max = idedisk_read_native_max_address(drive);
 		set_max = idedisk_set_max_address(drive, set_max);

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

* Re: PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
  2003-03-27 18:16 PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS Alan Cox
@ 2003-03-27 18:17 ` Matti Aarnio
  2003-03-27 19:04   ` Alan Cox
  2003-03-27 21:34   ` Henning P. Schmiedehausen
  0 siblings, 2 replies; 17+ messages in thread
From: Matti Aarnio @ 2003-03-27 18:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, torvalds

It is Alan's privilege to choose whatever he wants for the email
subject,  but the sad part is, that every time a reference is
made to  AIC7XXX in email subject, vger's keepers get tons of
spam-rejections.

Tons of sites have bad lookups matching only "XXX" substring, and not 
checking if that happens to be a substring in some word...

I have no doubt that some sites will reject even this letter
due to what I quoted in previous paragraph.

/Matti Aarnio

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

* Re: PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
  2003-03-27 18:17 ` Matti Aarnio
@ 2003-03-27 19:04   ` Alan Cox
  2003-03-27 20:16     ` Gerhard Mack
  2003-03-27 21:34   ` Henning P. Schmiedehausen
  1 sibling, 1 reply; 17+ messages in thread
From: Alan Cox @ 2003-03-27 19:04 UTC (permalink / raw)
  To: Matti Aarnio; +Cc: Linux Kernel Mailing List, Linus Torvalds

On Thu, 2003-03-27 at 18:17, Matti Aarnio wrote:
> It is Alan's privilege to choose whatever he wants for the email
> subject,  but the sad part is, that every time a reference is
> made to  AIC7XXX in email subject, vger's keepers get tons of
> spam-rejections.

Let me absolutely clear I did it to fix the bounces from my
script not because I think the list admin sucks.

If the XXX substring is such a problem its time to increase
the pain factor. I think XXX will begin appearing in the body
of all my changelogs 8)

XXX subject bouncers to kernel.org should get kicked off but I
appreciate you have rather more useful things to be doing 8)



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

* Re: PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
  2003-03-27 19:04   ` Alan Cox
@ 2003-03-27 20:16     ` Gerhard Mack
  0 siblings, 0 replies; 17+ messages in thread
From: Gerhard Mack @ 2003-03-27 20:16 UTC (permalink / raw)
  To: Alan Cox; +Cc: Matti Aarnio, Linux Kernel Mailing List

Why not simply drop the lot of em off the list?

On 27 Mar 2003, Alan Cox wrote:

> Date: 27 Mar 2003 19:04:41 +0000
> From: Alan Cox <alan@lxorguk.ukuu.org.uk>
> To: Matti Aarnio <matti.aarnio@zmailer.org>
> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
>      Linus Torvalds <torvalds@transmeta.com>
> Subject: Re: PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
>
> On Thu, 2003-03-27 at 18:17, Matti Aarnio wrote:
> > It is Alan's privilege to choose whatever he wants for the email
> > subject,  but the sad part is, that every time a reference is
> > made to  AIC7XXX in email subject, vger's keepers get tons of
> > spam-rejections.
>
> Let me absolutely clear I did it to fix the bounces from my
> script not because I think the list admin sucks.
>
> If the XXX substring is such a problem its time to increase
> the pain factor. I think XXX will begin appearing in the body
> of all my changelogs 8)
>
> XXX subject bouncers to kernel.org should get kicked off but I
> appreciate you have rather more useful things to be doing 8)
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

--
Gerhard Mack

gmack@innerfire.net

<>< As a computer I find your faith in technology amusing.


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

* Re: PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
  2003-03-27 18:17 ` Matti Aarnio
  2003-03-27 19:04   ` Alan Cox
@ 2003-03-27 21:34   ` Henning P. Schmiedehausen
  1 sibling, 0 replies; 17+ messages in thread
From: Henning P. Schmiedehausen @ 2003-03-27 21:34 UTC (permalink / raw)
  To: linux-kernel

Matti Aarnio <matti.aarnio@zmailer.org> writes:

>It is Alan's privilege to choose whatever he wants for the email
>subject,  but the sad part is, that every time a reference is
>made to  AIC7XXX in email subject, vger's keepers get tons of
>spam-rejections.

>Tons of sites have bad lookups matching only "XXX" substring, and not 
>checking if that happens to be a substring in some word...

It would be a positive signal to net hygiene if you simply drop sites
which do such bounces off the list with a final message to the
subscriber and its postmaster with an automated message for the
reason.

Spam-Filtering is one thing. Harassing the LKM list admins because the
spam filtering got out of control is not.

And people starting to change their message subjects to be
"politically correct" because any combination of the letters "x", "x"
and "x" gets rejected is simply a bad sign.  IMHO.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:26 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:26 UTC (permalink / raw)
  To: linux-kernel, torvalds

S/390 typo fixes
(Steven Cole)

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/include/asm-s390/bitops.h linux-2.5.66-ac1/include/asm-s390/bitops.h
--- linux-2.5.66-bk3/include/asm-s390/bitops.h	2003-03-27 17:13:28.000000000 +0000
+++ linux-2.5.66-ac1/include/asm-s390/bitops.h	2003-03-20 18:46:00.000000000 +0000
@@ -51,7 +51,7 @@
 
 #ifdef CONFIG_SMP
 /*
- * SMP save set_bit routine based on compare and swap (CS)
+ * SMP safe set_bit routine based on compare and swap (CS)
  */
 static inline void set_bit_cs(int nr, volatile unsigned long *ptr)
 {
@@ -76,7 +76,7 @@
 }
 
 /*
- * SMP save clear_bit routine based on compare and swap (CS)
+ * SMP safe clear_bit routine based on compare and swap (CS)
  */
 static inline void clear_bit_cs(int nr, volatile unsigned long *ptr)
 {
@@ -101,7 +101,7 @@
 }
 
 /*
- * SMP save change_bit routine based on compare and swap (CS)
+ * SMP safe change_bit routine based on compare and swap (CS)
  */
 static inline void change_bit_cs(int nr, volatile unsigned long *ptr)
 {
@@ -126,7 +126,7 @@
 }
 
 /*
- * SMP save test_and_set_bit routine based on compare and swap (CS)
+ * SMP safe test_and_set_bit routine based on compare and swap (CS)
  */
 static inline int
 test_and_set_bit_cs(int nr, volatile unsigned long *ptr)
@@ -153,7 +153,7 @@
 }
 
 /*
- * SMP save test_and_clear_bit routine based on compare and swap (CS)
+ * SMP safe test_and_clear_bit routine based on compare and swap (CS)
  */
 static inline int
 test_and_clear_bit_cs(int nr, volatile unsigned long *ptr)
@@ -180,7 +180,7 @@
 }
 
 /*
- * SMP save test_and_change_bit routine based on compare and swap (CS) 
+ * SMP safe test_and_change_bit routine based on compare and swap (CS) 
  */
 static inline int
 test_and_change_bit_cs(int nr, volatile unsigned long *ptr)

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:25 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:25 UTC (permalink / raw)
  To: linux-kernel, torvalds

Wrong kind of NUL fix for asm headers
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/include/asm-i386/uaccess.h linux-2.5.66-ac1/include/asm-i386/uaccess.h
--- linux-2.5.66-bk3/include/asm-i386/uaccess.h	2003-03-27 17:13:28.000000000 +0000
+++ linux-2.5.66-ac1/include/asm-i386/uaccess.h	2003-03-22 19:59:05.000000000 +0000
@@ -510,9 +510,9 @@
  *
  * Context: User context only.  This function may sleep.
  *
- * Get the size of a NULL-terminated string in user space.
+ * Get the size of a NUL-terminated string in user space.
  *
- * Returns the size of the string INCLUDING the terminating NULL.
+ * Returns the size of the string INCLUDING the terminating NUL.
  * On exception, returns 0.
  *
  * If there is a limit on the length of a valid string, you may wish to


(Steven Cole)

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:24 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:24 UTC (permalink / raw)
  To: linux-kernel, torvalds

PC9800 uses different IDE i/o bases for legacy mode devices

(Osamu Tomita)

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/include/asm-i386/ide.h linux-2.5.66-ac1/include/asm-i386/ide.h
--- linux-2.5.66-bk3/include/asm-i386/ide.h	2003-03-27 17:13:28.000000000 +0000
+++ linux-2.5.66-ac1/include/asm-i386/ide.h	2003-03-14 01:19:57.000000000 +0000
@@ -26,6 +26,9 @@
 static __inline__ int ide_default_irq(unsigned long base)
 {
 	switch (base) {
+#ifdef CONFIG_X86_PC9800
+		case 0x640: return 9;
+#endif
 		case 0x1f0: return 14;
 		case 0x170: return 15;
 		case 0x1e8: return 11;
@@ -40,12 +43,17 @@
 static __inline__ unsigned long ide_default_io_base(int index)
 {
 	switch (index) {
+#ifdef CONFIG_X86_PC9800
+		case 0:
+		case 1:	return 0x640;
+#else
 		case 0:	return 0x1f0;
 		case 1:	return 0x170;
 		case 2: return 0x1e8;
 		case 3: return 0x168;
 		case 4: return 0x1e0;
 		case 5: return 0x160;
+#endif
 		default:
 			return 0;
 	}
@@ -56,13 +64,24 @@
 {
 	unsigned long reg = data_port;
 	int i;
+#ifdef CONFIG_X86_PC9800
+	unsigned long increment = data_port == 0x640 ? 2 : 1;
+#endif
 
 	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
 		hw->io_ports[i] = reg;
+#ifdef CONFIG_X86_PC9800
+		reg += increment;
+#else
 		reg += 1;
+#endif
 	}
 	if (ctrl_port) {
 		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
+#ifdef CONFIG_X86_PC9800
+	} else if (data_port == 0x640) {
+		hw->io_ports[IDE_CONTROL_OFFSET] = 0x74c;
+#endif
 	} else {
 		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
 	}

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:23 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:23 UTC (permalink / raw)
  To: linux-kernel, torvalds

Quota should not reference user addresses directly
(Stanford Checker, Chris Wright)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/fs/quota.c linux-2.5.66-ac1/fs/quota.c
--- linux-2.5.66-bk3/fs/quota.c	2003-03-27 17:13:35.000000000 +0000
+++ linux-2.5.66-ac1/fs/quota.c	2003-03-22 20:36:49.000000000 +0000
@@ -221,12 +221,17 @@
 	uint cmds, type;
 	struct super_block *sb = NULL;
 	struct block_device *bdev;
+	char *tmp;
 	int ret = -ENODEV;
 
 	cmds = cmd >> SUBCMDSHIFT;
 	type = cmd & SUBCMDMASK;
 
-	bdev = lookup_bdev(special);
+	tmp = getname(special);
+	if (IS_ERR(tmp))
+		return PTR_ERR(tmp);
+	bdev = lookup_bdev(tmp);
+	putname(tmp);
 	if (IS_ERR(bdev))
 		return PTR_ERR(bdev);
 	sb = get_super(bdev);

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:22 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:22 UTC (permalink / raw)
  To: linux-kernel, torvalds

fs/exec.c does not need __NO_VERSION__
(Christoph Hellwig I think)

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/fs/exec.c linux-2.5.66-ac1/fs/exec.c
--- linux-2.5.66-bk3/fs/exec.c	2003-03-27 17:13:35.000000000 +0000
+++ linux-2.5.66-ac1/fs/exec.c	2003-03-22 19:57:38.000000000 +0000
@@ -38,7 +38,6 @@
 #include <linux/binfmts.h>
 #include <linux/swap.h>
 #include <linux/utsname.h>
-#define __NO_VERSION__
 #include <linux/module.h>
 #include <linux/namei.h>
 #include <linux/proc_fs.h>

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:22 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:22 UTC (permalink / raw)
  To: linux-kernel, torvalds

Make cramfs compile again

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/fs/cramfs/inode.c linux-2.5.66-ac1/fs/cramfs/inode.c
--- linux-2.5.66-bk3/fs/cramfs/inode.c	2003-03-27 17:13:33.000000000 +0000
+++ linux-2.5.66-ac1/fs/cramfs/inode.c	2003-03-26 20:16:08.000000000 +0000
@@ -43,6 +43,7 @@
 static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inode * cramfs_inode)
 {
 	struct inode * inode = new_inode(sb);
+	static struct timespec zerotime = { 0, 0 };
 
 	if (inode) {
 		inode->i_mode = cramfs_inode->mode;
@@ -51,7 +52,8 @@
 		inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;
 		inode->i_blksize = PAGE_CACHE_SIZE;
 		inode->i_gid = cramfs_inode->gid;
-		inode->i_mtime = inode->i_atime = inode->i_ctime = 0;
+		/* Struct copy intentional */
+		inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
 		inode->i_ino = CRAMINO(cramfs_inode);
 		/* inode->i_nlink is left 1 - arguably wrong for directories,
 		   but it's the best we can do without reading the directory

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:21 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:21 UTC (permalink / raw)
  To: linux-kernel, torvalds

Merge the serial config entries for PC9800
(Osamu Tomita)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/serial/Kconfig linux-2.5.66-ac1/drivers/serial/Kconfig
--- linux-2.5.66-bk3/drivers/serial/Kconfig	2003-03-27 17:13:06.000000000 +0000
+++ linux-2.5.66-ac1/drivers/serial/Kconfig	2003-03-18 17:05:10.000000000 +0000
@@ -372,14 +372,25 @@
 	bool "Use NEC V850E on-chip UART for console"
 	depends on V850E_NB85E_UART
 
+config SERIAL98
+	tristate "PC-9800 8251-based primary serial port support"
+	depends on X86_PC9800
+	help
+	  If you want to use standard primary serial ports on PC-9800, 
+	  say Y.  Otherwise, say N.
+
+config SERIAL98_CONSOLE
+        bool "Support for console on PC-9800 standard serial port"
+        depends on SERIAL98=y
+
 config SERIAL_CORE
 	tristate
-	default m if SERIAL_AMBA!=y && SERIAL_CLPS711X!=y && SERIAL_21285!=y && !SERIAL_SA1100 && !SERIAL_ANAKIN && !SERIAL_UART00 && SERIAL_8250!=y && SERIAL_MUX!=y && !SERIAL_ROCKETPORT && !SERIAL_SUNCORE && !V850E_NB85E_UART && (SERIAL_AMBA=m || SERIAL_CLPS711X=m || SERIAL_21285=m || SERIAL_8250=m || SERIAL_MUX=m)
-	default y if SERIAL_AMBA=y || SERIAL_CLPS711X=y || SERIAL_21285=y || SERIAL_SA1100 || SERIAL_ANAKIN || SERIAL_UART00 || SERIAL_8250=y || SERIAL_MUX=y || SERIAL_ROCKETPORT || SERIAL_SUNCORE || V850E_NB85E_UART
+	default m if SERIAL_AMBA!=y && SERIAL_CLPS711X!=y && SERIAL_21285!=y && !SERIAL_SA1100 && !SERIAL_ANAKIN && !SERIAL_UART00 && SERIAL_8250!=y && SERIAL_MUX!=y && !SERIAL_ROCKETPORT && !SERIAL_SUNCORE && !V850E_NB85E_UART && (SERIAL_AMBA=m || SERIAL_CLPS711X=m || SERIAL_21285=m || SERIAL_8250=m || SERIAL_MUX=m || SERIAL98=m)
+	default y if SERIAL_AMBA=y || SERIAL_CLPS711X=y || SERIAL_21285=y || SERIAL_SA1100 || SERIAL_ANAKIN || SERIAL_UART00 || SERIAL_8250=y || SERIAL_MUX=y || SERIAL_ROCKETPORT || SERIAL_SUNCORE || V850E_NB85E_UART || SERIAL98=y
 
 config SERIAL_CORE_CONSOLE
 	bool
-	depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUNCORE || V850E_NB85E_UART_CONSOLE
+	depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUNCORE || V850E_NB85E_UART_CONSOLE || SERIAL98_CONSOLE
 	default y
 
 config SERIAL_68328
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/serial/Makefile linux-2.5.66-ac1/drivers/serial/Makefile
--- linux-2.5.66-bk3/drivers/serial/Makefile	2003-03-27 17:13:06.000000000 +0000
+++ linux-2.5.66-ac1/drivers/serial/Makefile	2003-03-14 01:07:59.000000000 +0000
@@ -27,3 +27,4 @@
 obj-$(CONFIG_SERIAL_68360) += 68360serial.o
 obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o
 obj-$(CONFIG_V850E_NB85E_UART) += nb85e_uart.o
+obj-$(CONFIG_SERIAL98) += serial98.o

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:20 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:20 UTC (permalink / raw)
  To: linux-kernel, torvalds

Fix up 3w-xxxx. I didnt test SMP and it shows

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/scsi/3w-xxxx.c linux-2.5.66-ac1/drivers/scsi/3w-xxxx.c
--- linux-2.5.66-bk3/drivers/scsi/3w-xxxx.c	2003-03-27 17:13:11.000000000 +0000
+++ linux-2.5.66-ac1/drivers/scsi/3w-xxxx.c	2003-03-26 20:10:23.000000000 +0000
@@ -677,7 +677,7 @@
 			dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): caught TW_AEN_LISTEN.\n");
 			memset(tw_ioctl->data_buffer, 0, tw_ioctl->data_buffer_length);
 
-			spin_lock_irqsave(&tw_dev->host->host_lock, flags);
+			spin_lock_irqsave(tw_dev->host->host_lock, flags);
 			if (tw_dev->aen_head == tw_dev->aen_tail) {
 				tw_aen_code = TW_AEN_QUEUE_EMPTY;
 			} else {
@@ -688,7 +688,7 @@
 					tw_dev->aen_head = tw_dev->aen_head + 1;
 				}
 			}
-			spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
+			spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
 			memcpy(tw_ioctl->data_buffer, &tw_aen_code, sizeof(tw_aen_code));
 			break;
 		case TW_CMD_PACKET_WITH_DATA:

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:18 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:18 UTC (permalink / raw)
  To: linux-kernel, torvalds

Forward port the replacement to the horribly broken locking in 2.5
radio_cadet driver.

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/media/radio/radio-cadet.c linux-2.5.66-ac1/drivers/media/radio/radio-cadet.c
--- linux-2.5.66-bk3/drivers/media/radio/radio-cadet.c	2003-03-27 17:13:02.000000000 +0000
+++ linux-2.5.66-ac1/drivers/media/radio/radio-cadet.c	2003-03-23 23:41:29.000000000 +0000
@@ -23,7 +23,9 @@
  * 2002-01-17	Adam Belay <ambx1@neo.rr.com>
  *		Updated to latest pnp code
  *
-*/
+ * 2003-01-31	Alan Cox <alan@redhat.com>
+ *		Cleaned up locking, delay code, general odds and ends
+ */
 
 #include <linux/module.h>	/* Modules 			*/
 #include <linux/init.h>		/* Initdata			*/
@@ -43,11 +45,11 @@
 static int curtuner=0;
 static int tunestat=0;
 static int sigstrength=0;
-static wait_queue_head_t tunerq,rdsq,readq;
+static wait_queue_head_t readq;
 struct timer_list tunertimer,rdstimer,readtimer;
 static __u8 rdsin=0,rdsout=0,rdsstat=0;
 static unsigned char rdsbuf[RDS_BUFFER];
-static int cadet_lock=0;
+static spinlock_t cadet_io_lock;
 
 static int cadet_probe(void);
 
@@ -58,37 +60,19 @@
  */
 static __u16 sigtable[2][4]={{5,10,30,150},{28,40,63,1000}};
 
-static void cadet_wake(unsigned long qnum)
-{
-        switch(qnum) {
-	case 0:           /* cadet_setfreq */
-	        wake_up(&tunerq);
-		break;
-	case 1:           /* cadet_getrds */
-	        wake_up(&rdsq);
-		break;
-	}	
-}
-
-
-
 static int cadet_getrds(void)
 {
         int rdsstat=0;
 
-	cadet_lock++;
+	spin_lock(&cadet_io_lock);
         outb(3,io);                 /* Select Decoder Control/Status */
 	outb(inb(io+1)&0x7f,io+1);  /* Reset RDS detection */
-	cadet_lock--;
-	init_timer(&rdstimer);
-	rdstimer.function=cadet_wake;
-	rdstimer.data=(unsigned long)1;
-	rdstimer.expires=jiffies+(HZ/10);
-	init_waitqueue_head(&rdsq);
-	add_timer(&rdstimer);
-	sleep_on(&rdsq);
+	spin_unlock(&cadet_io_lock);
 	
-	cadet_lock++;
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(HZ/10);
+
+	spin_lock(&cadet_io_lock);	
         outb(3,io);                 /* Select Decoder Control/Status */
 	if((inb(io+1)&0x80)!=0) {
 	        rdsstat|=VIDEO_TUNER_RDS_ON;
@@ -96,32 +80,24 @@
 	if((inb(io+1)&0x10)!=0) {
 	        rdsstat|=VIDEO_TUNER_MBS_ON;
 	}
-	cadet_lock--;
+	spin_unlock(&cadet_io_lock);
 	return rdsstat;
 }
 
-
-
-
 static int cadet_getstereo(void)
 {
-        if(curtuner!=0) {          /* Only FM has stereo capability! */
+	int ret = 0;
+        if(curtuner != 0)	/* Only FM has stereo capability! */
 	        return 0;
-	}
-        cadet_lock++;
+
+	spin_lock(&cadet_io_lock);
         outb(7,io);          /* Select tuner control */
-        if((inb(io+1)&0x40)==0) {
-	        cadet_lock--;
-                return 1;    /* Stereo pilot detected */
-        }
-        else {
-	        cadet_lock--;
-                return 0;    /* Mono */
-        }
+	if( (inb(io+1) & 0x40) == 0)
+        	ret = 1;
+        spin_unlock(&cadet_io_lock);
+        return ret;
 }
 
-
-
 static unsigned cadet_gettune(void)
 {
         int curvol,i;
@@ -130,7 +106,9 @@
         /*
          * Prepare for read
          */
-	cadet_lock++;
+
+	spin_lock(&cadet_io_lock);
+	
         outb(7,io);       /* Select tuner control */
         curvol=inb(io+1); /* Save current volume/mute setting */
         outb(0x00,io+1);  /* Ensure WRITE-ENABLE is LOW */
@@ -152,13 +130,11 @@
          * Restore volume/mute setting
          */
         outb(curvol,io+1);
-	cadet_lock--;
+	spin_unlock(&cadet_io_lock);
 
 	return fifo;
 }
 
-
-
 static unsigned cadet_getfreq(void)
 {
         int i;
@@ -191,14 +167,13 @@
         return freq;
 }
 
-
-
 static void cadet_settune(unsigned fifo)
 {
         int i;
 	unsigned test;  
 
-	cadet_lock++;
+	spin_lock(&cadet_io_lock);
+	
 	outb(7,io);                /* Select tuner control */
 	/*
 	 * Write the shift register
@@ -217,11 +192,9 @@
 		test=0x1c|((fifo>>23)&0x02);
 		outb(test,io+1);
 	}
-	cadet_lock--;
+	spin_unlock(&cadet_io_lock);
 }
 
-
-
 static void cadet_setfreq(unsigned freq)
 {
         unsigned fifo;
@@ -253,92 +226,90 @@
         /*
          * Save current volume/mute setting
          */
-	cadet_lock++;
+
+	spin_lock(&cadet_io_lock);
 	outb(7,io);                /* Select tuner control */
         curvol=inb(io+1); 
+        spin_unlock(&cadet_io_lock);
 
 	/*
 	 * Tune the card
 	 */
 	for(j=3;j>-1;j--) {
 	        cadet_settune(fifo|(j<<16));
+	        
+	        spin_lock(&cadet_io_lock);
 		outb(7,io);         /* Select tuner control */
 		outb(curvol,io+1);
-		cadet_lock--;
-		init_timer(&tunertimer);
-		tunertimer.function=cadet_wake;
-		tunertimer.data=(unsigned long)0;
-		tunertimer.expires=jiffies+(HZ/10);
-		init_waitqueue_head(&tunerq);
-		add_timer(&tunertimer);
-		sleep_on(&tunerq);
+		spin_unlock(&cadet_io_lock);
+		
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ/10);
+
 		cadet_gettune();
-		if((tunestat&0x40)==0) {   /* Tuned */
+		if((tunestat & 0x40) == 0) {   /* Tuned */
 		        sigstrength=sigtable[curtuner][j];
 			return;
 		}
-		cadet_lock++;
 	}
-	cadet_lock--;
 	sigstrength=0;
 }
 
 
 static int cadet_getvol(void)
 {
-        cadet_lock++;
+	int ret = 0;
+	
+	spin_lock(&cadet_io_lock);
+	
         outb(7,io);                /* Select tuner control */
-        if((inb(io+1)&0x20)!=0) {
-	        cadet_lock--;
-                return 0xffff;
-        }
-        else {
-	        cadet_lock--;
-                return 0;
-        }
+        if((inb(io + 1) & 0x20) != 0)
+        	ret = 0xffff;
+        
+        spin_unlock(&cadet_io_lock);
+        return ret;
 }
 
 
 static void cadet_setvol(int vol)
 {
-        cadet_lock++;
+	spin_lock(&cadet_io_lock);
         outb(7,io);                /* Select tuner control */
-        if(vol>0) {
+        if(vol>0)
                 outb(0x20,io+1);
-        }
-        else {
+        else
                 outb(0x00,io+1);
-        }
-	cadet_lock--;
+	spin_unlock(&cadet_io_lock);
 }  
 
-
-
 void cadet_handler(unsigned long data)
 {
 	/*
 	 * Service the RDS fifo
 	 */
-        if(cadet_lock==0) {
+
+	if(spin_trylock(&cadet_io_lock))
+	{
 	        outb(0x3,io);       /* Select RDS Decoder Control */
 		if((inb(io+1)&0x20)!=0) {
 		        printk(KERN_CRIT "cadet: RDS fifo overflow\n");
 		}
 		outb(0x80,io);      /* Select RDS fifo */
 		while((inb(io)&0x80)!=0) {
-		        rdsbuf[rdsin++]=inb(io+1);
-			if(rdsin==rdsout) {
-			        printk(KERN_CRIT "cadet: RDS buffer overflow\n");
-			}
+		        rdsbuf[rdsin]=inb(io+1);
+			if(rdsin==rdsout)
+			        printk(KERN_WARNING "cadet: RDS buffer overflow\n");
+			else
+				rdsin++;
 		}
+		spin_unlock(&cadet_io_lock);
 	}
 
 	/*
 	 * Service pending read
 	 */
-	if( rdsin!=rdsout) {
+	if( rdsin!=rdsout)
 	        wake_up_interruptible(&readq);
-	}
 
 	/* 
 	 * Clean up and exit
@@ -359,10 +330,10 @@
 	unsigned char readbuf[RDS_BUFFER];
 
         if(rdsstat==0) {
-	        cadet_lock++;
+		spin_lock(&cadet_io_lock);
 	        rdsstat=1;
 		outb(0x80,io);        /* Select RDS fifo */
-		cadet_lock--;
+		spin_unlock(&cadet_io_lock);
 		init_timer(&readtimer);
 		readtimer.function=cadet_handler;
 		readtimer.data=(unsigned long)0;
@@ -370,14 +341,13 @@
 		add_timer(&readtimer);
 	}
 	if(rdsin==rdsout) {
-  	        if (file->f_flags & O_NONBLOCK) {
+  	        if (file->f_flags & O_NONBLOCK)
 		        return -EWOULDBLOCK;
-		}
 	        interruptible_sleep_on(&readq);
 	}		
-	while((i<count)&&(rdsin!=rdsout)) {
+	while( i<count && rdsin!=rdsout)
 	        readbuf[i++]=rdsbuf[rdsout++];
-	}
+
 	if (copy_to_user(data,readbuf,i))
 	        return -EFAULT;
 	return i;
@@ -515,10 +485,8 @@
 
 static int cadet_release(struct inode *inode, struct file *file)
 {
-        if(rdsstat==1) {
-                del_timer(&readtimer);
-		rdsstat=0;
-	}
+	del_timer_sync(&readtimer);
+	rdsstat=0;
 	users--;
 	return 0;
 }
@@ -595,13 +563,15 @@
 	return -1;
 }
 
-	/* 
-	 * io should only be set if the user has used something like
-	 * isapnp (the userspace program) to initialize this card for us
-	 */
+/* 
+ * io should only be set if the user has used something like
+ * isapnp (the userspace program) to initialize this card for us
+ */
 
 static int __init cadet_init(void)
 {
+	spin_lock_init(&cadet_io_lock);
+	
 	/*
 	 *	If a probe was requested then probe ISAPnP first (safest)
 	 */

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:17 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:17 UTC (permalink / raw)
  To: linux-kernel, torvalds

Vojtech Pavlik

The ide fixes for the VIA8235 obsolete this hack

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/ide/ide-timing.h linux-2.5.66-ac1/drivers/ide/ide-timing.h
--- linux-2.5.66-bk3/drivers/ide/ide-timing.h	2003-03-27 17:13:18.000000000 +0000
+++ linux-2.5.66-ac1/drivers/ide/ide-timing.h	2003-03-07 17:35:09.000000000 +0000
@@ -245,14 +245,6 @@
 	}
 
 /*
- * If the drive is an ATAPI device it may need slower address setup timing,
- * so we stay on the safe side.
- */
-
-	if (drive->media != ide_disk)
-		p.setup = 120;
-
-/*
  * Convert the timing to bus clock counts.
  */
 

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:17 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:17 UTC (permalink / raw)
  To: linux-kernel, torvalds

Ensure hdparm errors to the user when the request isnt allowed
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/ide/ide-taskfile.c linux-2.5.66-ac1/drivers/ide/ide-taskfile.c
--- linux-2.5.66-bk3/drivers/ide/ide-taskfile.c	2003-03-27 17:13:18.000000000 +0000
+++ linux-2.5.66-ac1/drivers/ide/ide-taskfile.c	2003-03-26 20:22:22.000000000 +0000
@@ -1670,7 +1670,7 @@
 
 #else
 
-	int err = 0;
+	int err = -EIO;
 	u8 args[4], *argbuf = args;
 	u8 xfer_rate = 0;
 	int argsize = 0;


(Jens Axboe)

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

* PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS
@ 2003-03-27 18:16 Alan Cox
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Cox @ 2003-03-27 18:16 UTC (permalink / raw)
  To: linux-kernel, torvalds

Add a comment that the irq_nosync stuff needs revisiting
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.66-bk3/drivers/ide/ide-iops.c linux-2.5.66-ac1/drivers/ide/ide-iops.c
--- linux-2.5.66-bk3/drivers/ide/ide-iops.c	2003-03-27 17:13:18.000000000 +0000
+++ linux-2.5.66-ac1/drivers/ide/ide-iops.c	2003-03-26 20:05:24.000000000 +0000
@@ -903,6 +903,14 @@
          * Select the drive, and issue the SETFEATURES command
          */
 	disable_irq_nosync(hwif->irq);
+	
+	/*
+	 *	FIXME: we race against the running IRQ here if
+	 *	this is called from non IRQ context. If we use
+	 *	disable_irq() we hang on the error path. Work
+	 *	is needed.
+	 */
+	 
 	udelay(1);
 	SELECT_DRIVE(drive);
 	SELECT_MASK(drive, 0);

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

end of thread, other threads:[~2003-03-27 21:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-27 18:16 PATCH: DRIVERNAME SUPPRESSED DUE TO KERNEL.ORG FILTER BUGS Alan Cox
2003-03-27 18:17 ` Matti Aarnio
2003-03-27 19:04   ` Alan Cox
2003-03-27 20:16     ` Gerhard Mack
2003-03-27 21:34   ` Henning P. Schmiedehausen
2003-03-27 18:16 Alan Cox
2003-03-27 18:17 Alan Cox
2003-03-27 18:17 Alan Cox
2003-03-27 18:18 Alan Cox
2003-03-27 18:20 Alan Cox
2003-03-27 18:21 Alan Cox
2003-03-27 18:22 Alan Cox
2003-03-27 18:22 Alan Cox
2003-03-27 18:23 Alan Cox
2003-03-27 18:24 Alan Cox
2003-03-27 18:25 Alan Cox
2003-03-27 18:26 Alan Cox

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

all inboxes | Powered by JetHome®