Skip to contentSkip to conversation

Linux 2.6.16.1

PATCH In review Greg KH 7 participants 12 messages Mar 28, 2006 – Apr 5, 2006 1 message not in the archive

Subsystems (18)
Networking Media (V4L/DVB) SCSI USB +14 more subsystems
lore
Share & tools
lore

Greg KH

author
#0 lore raw

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

The diffstat and short summary of the fixes are below.

I'll also be replying to this message with a copy of the patch between 2.6.16 and 2.6.16.1, as it is small enough to do so.

The updated 2.6.16.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git
and can be browsed at the normal kernel.org git web browser:
www.kernel.org/git/

thanks,

greg k-h

--------

 Makefile                                     |    2 -
 arch/i386/kernel/cpu/cpufreq/speedstep-smi.c |    4 +-
 arch/i386/kernel/dmi_scan.c                  |    2 -
 drivers/base/cpu.c                           |    2 -
 drivers/base/firmware_class.c                |    6 ++-
 drivers/block/cciss.c                        |    2 -
 drivers/md/dm.c                              |   45 +++++++++++++++------------
 drivers/media/video/Kconfig                  |    1 
 drivers/media/video/tuner-types.c            |    4 +-
 drivers/scsi/sata_mv.c                       |    7 +++-
 drivers/video/i810/i810_main.c               |    2 -
 fs/9p/vfs_inode.c                            |    3 -
 fs/proc/proc_misc.c                          |    2 -
 fs/sysfs/dir.c                               |    1 
 fs/sysfs/inode.c                             |    6 +++
 fs/sysfs/symlink.c                           |    1 
 fs/xfs/linux-2.6/xfs_aops.c                  |    2 -
 include/linux/cpu.h                          |    2 -
 include/linux/raid/raid1.h                   |    2 -
 include/linux/rtc.h                          |    4 +-
 kernel/sched.c                               |    9 ++++-
 net/core/sock.c                              |    5 +--
 net/ipv4/ip_output.c                         |    6 ---
 23 files changed, 70 insertions(+), 50 deletions(-)

Summary of changes from v2.6.16 to v2.6.16.1
============================================

Alasdair G Kergon:
dm: bio split bvec fix

Alexey Kuznetsov:

      TCP: Do not use inet->id of global tcp_socket when sending RST (CVE-2006-1242)

Andrew Morton:
get_cpu_sysdev() signedness fix
Fix speedstep-smi assembly bug in speedstep_smi_ownership

Andrey Panin:
DMI: fix DMI onboard device discovery

Anton Blanchard:
fix scheduler deadlock

Antonino A. Daplas:

      i810fb_cursor(): use GFP_ATOMIC

David S. Miller:
NET: Ensure device name passed to SO_BINDTODEVICE is NULL terminated.

Greg Kroah-Hartman:
sysfs: sysfs_remove_dir() needs to invalidate the dentry
sysfs: fix a kobject leak in sysfs_add_link on the error path Linux 2.6.16.1

Hans Verkuil:
V4L/DVB (3324): Fix Samsung tuner frequency ranges

Jeff Garzik:
sata_mv: fix irq port status usage

Jeff Moyer:
firmware: fix BUG: in fw_realloc_buffer

Joe Korty:
rtc.h broke strace(1) builds

Latchesar Ionkov:
v9fs: assign dentry ops to negative dentries

Mark Lord:
2.6.xx: sata_mv: another critical fix

Michael Krufky:
Kconfig: VIDEO_DECODER must select FW_LOADER

Nathan Scott:
XFS writeout fix

Neil Brown:
DM: Fix bug: BIO_RW_BARRIER requests to md/raid1 hang.

Neil Horman:
proc: fix duplicate line in /proc/devices

Patrick McHardy:
cciss: fix use-after-free in cciss_init_one

author
#1 lore raw
Makefile +1 -1
index cb57905..fcc862a 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 16
-EXTRAVERSION =
+EXTRAVERSION = .1
 NAME=Sliding Snow Leopard
 
 # *DOCUMENTATION*
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +3 -1
index 28cc5d5..cfc4276 100644
@@ -75,7 +75,9 @@ static int speedstep_smi_ownership (void
 	__asm__ __volatile__(
 		"out %%al, (%%dx)\n"
 		: "=D" (result)
-		: "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic)
+		: "a" (command), "b" (function), "c" (0), "d" (smi_port),
+			"D" (0), "S" (magic)
+		: "memory"
 	);
 
 	dprintk("result is %x\n", result);
arch/i386/kernel/dmi_scan.c +1 -1
index 6a93d75..ca2a0cb 100644
@@ -106,7 +106,7 @@ static void __init dmi_save_devices(stru
 	struct dmi_device *dev;
 
 	for (i = 0; i < count; i++) {
-		char *d = ((char *) dm) + (i * 2);
+		char *d = (char *)(dm + 1) + (i * 2);
 
 		/* Skip disabled device */
 		if ((*d & 0x80) == 0)
drivers/base/cpu.c +1 -1
index 07a7f97..29f3d75 100644
@@ -141,7 +141,7 @@ int __devinit register_cpu(struct cpu *c
 	return error;
 }
 
-struct sys_device *get_cpu_sysdev(int cpu)
+struct sys_device *get_cpu_sysdev(unsigned cpu)
 {
 	if (cpu < NR_CPUS)
 		return cpu_sys_devices[cpu];
drivers/base/firmware_class.c +4 -2
index e97e911..4723182 100644
@@ -211,18 +211,20 @@ static int
 fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
 {
 	u8 *new_data;
+	int new_size = fw_priv->alloc_size;
 
 	if (min_size <= fw_priv->alloc_size)
 		return 0;
 
-	new_data = vmalloc(fw_priv->alloc_size + PAGE_SIZE);
+	new_size = ALIGN(min_size, PAGE_SIZE);
+	new_data = vmalloc(new_size);
 	if (!new_data) {
 		printk(KERN_ERR "%s: unable to alloc buffer\n", __FUNCTION__);
 		/* Make sure that we don't keep incomplete data */
 		fw_load_abort(fw_priv);
 		return -ENOMEM;
 	}
-	fw_priv->alloc_size += PAGE_SIZE;
+	fw_priv->alloc_size = new_size;
 	if (fw_priv->fw->data) {
 		memcpy(new_data, fw_priv->fw->data, fw_priv->fw->size);
 		vfree(fw_priv->fw->data);
drivers/block/cciss.c +1 -1
index 0d65394..c149d57 100644
@@ -3269,8 +3269,8 @@ clean2:
 	unregister_blkdev(hba[i]->major, hba[i]->devname);
 clean1:
 	release_io_mem(hba[i]);
-	free_hba(i);
 	hba[i]->busy_initializing = 0;
+	free_hba(i);
 	return(-1);
 }
 
drivers/md/dm.c +25 -20

55 lines not on this page · raw message

drivers/media/video/Kconfig +1 -0
index d82c8a3..ef42a26 100644
@@ -349,6 +349,7 @@ config VIDEO_AUDIO_DECODER
 config VIDEO_DECODER
 	tristate "Add support for additional video chipsets"
 	depends on VIDEO_DEV && I2C && EXPERIMENTAL
+	select FW_LOADER
 	---help---
 	  Say Y here to compile drivers for SAA7115, SAA7127 and CX25840
 	  video decoders.
drivers/media/video/tuner-types.c +2 -2
index 6fe7817..5f3d46d 100644
@@ -1087,8 +1087,8 @@ static struct tuner_params tuner_tnf_533
 /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */
 
 static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = {
-	{ 16 * 175.75 /*MHz*/, 0x01, },
-	{ 16 * 410.25 /*MHz*/, 0x02, },
+	{ 16 * 130.00 /*MHz*/, 0x01, },
+	{ 16 * 364.50 /*MHz*/, 0x02, },
 	{ 16 * 999.99        , 0x08, },
 };
 
drivers/scsi/sata_mv.c +5 -2
index 2770005..b00af08 100644
@@ -1102,6 +1102,7 @@ static u8 mv_get_crpb_status(struct ata_
 	void __iomem *port_mmio = mv_ap_base(ap);
 	struct mv_port_priv *pp = ap->private_data;
 	u32 out_ptr;
+	u8 ata_status;
 
 	out_ptr = readl(port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
 
@@ -1109,6 +1110,8 @@ static u8 mv_get_crpb_status(struct ata_
 	assert(((out_ptr >> EDMA_RSP_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK) ==
 	       pp->rsp_consumer);
 
+	ata_status = pp->crpb[pp->rsp_consumer].flags >> CRPB_FLAG_STATUS_SHIFT;
+
 	/* increment our consumer index... */
 	pp->rsp_consumer = mv_inc_q_index(&pp->rsp_consumer);
 
@@ -1123,7 +1126,7 @@ static u8 mv_get_crpb_status(struct ata_
 	writelfl(out_ptr, port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
 
 	/* Return ATA status register for completed CRPB */
-	return (pp->crpb[pp->rsp_consumer].flags >> CRPB_FLAG_STATUS_SHIFT);
+	return ata_status;
 }
 
 /**
@@ -1192,7 +1195,6 @@ static void mv_host_intr(struct ata_host
 	u32 hc_irq_cause;
 	int shift, port, port0, hard_port, handled;
 	unsigned int err_mask;
-	u8 ata_status = 0;
 
 	if (hc == 0) {
 		port0 = 0;
@@ -1210,6 +1212,7 @@ static void mv_host_intr(struct ata_host
 		hc,relevant,hc_irq_cause);
 
 	for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) {
+		u8 ata_status = 0;
 		ap = host_set->ports[port];
 		hard_port = port & MV_PORT_MASK;	/* range 0-3 */
 		handled = 0;	/* ensure ata_status is set if handled++ */
drivers/video/i810/i810_main.c +1 -1
index d8467c0..788297e 100644
@@ -1508,7 +1508,7 @@ static int i810fb_cursor(struct fb_info 
 		int size = ((cursor->image.width + 7) >> 3) *
 			cursor->image.height;
 		int i;
-		u8 *data = kmalloc(64 * 8, GFP_KERNEL);
+		u8 *data = kmalloc(64 * 8, GFP_ATOMIC);
 
 		if (data == NULL)
 			return -ENOMEM;
fs/9p/vfs_inode.c +1 -2
index 3ad8455..651a9e1 100644
@@ -614,6 +614,7 @@ static struct dentry *v9fs_vfs_lookup(st
 
 	sb = dir->i_sb;
 	v9ses = v9fs_inode2v9ses(dir);
+	dentry->d_op = &v9fs_dentry_operations;
 	dirfid = v9fs_fid_lookup(dentry->d_parent);
 
 	if (!dirfid) {
@@ -681,8 +682,6 @@ static struct dentry *v9fs_vfs_lookup(st
 		goto FreeFcall;
 
 	fid->qid = fcall->params.rstat.stat.qid;
-
-	dentry->d_op = &v9fs_dentry_operations;
 	v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb);
 
 	d_add(dentry, inode);
fs/proc/proc_misc.c +1 -1
index 1d24fea..826c131 100644
@@ -312,7 +312,7 @@ static void *devinfo_next(struct seq_fil
 		case BLK_HDR:
 			info->state = BLK_LIST;
 			(*pos)++;
-			break;
+			/*fallthrough*/
 		case BLK_LIST:
 			if (get_blkdev_info(info->blkdev,&idummy,&ndummy)) {
 				/*
fs/sysfs/dir.c +1 -0
index 49bd219..cfd290d 100644
@@ -302,6 +302,7 @@ void sysfs_remove_dir(struct kobject * k
 	 * Drop reference from dget() on entrance.
 	 */
 	dput(dentry);
+	kobj->dentry = NULL;
 }
 
 int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
fs/sysfs/inode.c +5 -1
index 689f7bc..6beee6f 100644
@@ -227,12 +227,16 @@ void sysfs_drop_dentry(struct sysfs_dire
 void sysfs_hash_and_remove(struct dentry * dir, const char * name)
 {
 	struct sysfs_dirent * sd;
-	struct sysfs_dirent * parent_sd = dir->d_fsdata;
+	struct sysfs_dirent * parent_sd;
+
+	if (!dir)
+		return;
 
 	if (dir->d_inode == NULL)
 		/* no inode means this hasn't been made visible yet */
 		return;
 
+	parent_sd = dir->d_fsdata;
 	mutex_lock(&dir->d_inode->i_mutex);
 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
 		if (!sd->s_element)
fs/sysfs/symlink.c +1 -0
index e38d633..e5ce6e7 100644
@@ -66,6 +66,7 @@ static int sysfs_add_link(struct dentry 
 	if (!error)
 		return 0;
 
+	kobject_put(target);
 	kfree(sl->link_name);
 exit2:
 	kfree(sl);
fs/xfs/linux-2.6/xfs_aops.c +1 -1
index 74d8be8..a980736 100644
@@ -616,7 +616,7 @@ xfs_is_delayed_page(
 				acceptable = (type == IOMAP_UNWRITTEN);
 			else if (buffer_delay(bh))
 				acceptable = (type == IOMAP_DELAY);
-			else if (buffer_mapped(bh))
+			else if (buffer_dirty(bh) && buffer_mapped(bh))
 				acceptable = (type == 0);
 			else
 				break;
include/linux/cpu.h +1 -1
index 0ed1d48..d612b89 100644
@@ -32,7 +32,7 @@ struct cpu {
 };
 
 extern int register_cpu(struct cpu *, int, struct node *);
-extern struct sys_device *get_cpu_sysdev(int cpu);
+extern struct sys_device *get_cpu_sysdev(unsigned cpu);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void unregister_cpu(struct cpu *, struct node *);
 #endif
include/linux/raid/raid1.h +1 -1
index 9d5494a..3009c81 100644
@@ -130,6 +130,6 @@ struct r1bio_s {
  * with failure when last write completes (and all failed).
  * Record that bi_end_io was called with this flag...
  */
-#define	R1BIO_Returned 4
+#define	R1BIO_Returned 6
 
 #endif
include/linux/rtc.h +2 -2
index 0b2ba67..b739ac1 100644
@@ -11,8 +11,6 @@
 #ifndef _LINUX_RTC_H_
 #define _LINUX_RTC_H_
 
-#include <linux/interrupt.h>
-
 /*
  * The struct used to pass data via the following ioctl. Similar to the
  * struct tm in <time.h>, but it needs to be here so that the kernel 
@@ -95,6 +93,8 @@ struct rtc_pll_info {
 
 #ifdef __KERNEL__
 
+#include <linux/interrupt.h>
+
 typedef struct rtc_task {
 	void (*func)(void *private_data);
 	void *private_data;
kernel/sched.c +7 -2
index 4d46e90..4e7efac 100644
@@ -237,6 +237,7 @@ struct runqueue {
 
 	task_t *migration_thread;
 	struct list_head migration_queue;
+	int cpu;
 #endif
 
 #ifdef CONFIG_SCHEDSTATS
@@ -1660,6 +1661,9 @@ unsigned long nr_iowait(void)
 /*
  * double_rq_lock - safely lock two runqueues
  *
+ * We must take them in cpu order to match code in
+ * dependent_sleeper and wake_dependent_sleeper.
+ *
  * Note this does not disable interrupts like task_rq_lock,
  * you need to do so manually before calling.
  */
@@ -1671,7 +1675,7 @@ static void double_rq_lock(runqueue_t *r
 		spin_lock(&rq1->lock);
 		__acquire(rq2->lock);	/* Fake it out ;) */
 	} else {
-		if (rq1 < rq2) {
+		if (rq1->cpu < rq2->cpu) {
 			spin_lock(&rq1->lock);
 			spin_lock(&rq2->lock);
 		} else {
@@ -1707,7 +1711,7 @@ static void double_lock_balance(runqueue
 	__acquires(this_rq->lock)
 {
 	if (unlikely(!spin_trylock(&busiest->lock))) {
-		if (busiest < this_rq) {
+		if (busiest->cpu < this_rq->cpu) {
 			spin_unlock(&this_rq->lock);
 			spin_lock(&busiest->lock);
 			spin_lock(&this_rq->lock);
@@ -6035,6 +6039,7 @@ void __init sched_init(void)
 		rq->push_cpu = 0;
 		rq->migration_thread = NULL;
 		INIT_LIST_HEAD(&rq->migration_queue);
+		rq->cpu = i;
 #endif
 		atomic_set(&rq->nr_iowait, 0);
 
net/core/sock.c +3 -2
index 6e00811..5621198 100644
@@ -404,8 +404,9 @@ set_rcvbuf:
 			if (!valbool) {
 				sk->sk_bound_dev_if = 0;
 			} else {
-				if (optlen > IFNAMSIZ) 
-					optlen = IFNAMSIZ; 
+				if (optlen > IFNAMSIZ - 1)
+					optlen = IFNAMSIZ - 1;
+				memset(devname, 0, sizeof(devname));
 				if (copy_from_user(devname, optval, optlen)) {
 					ret = -EFAULT;
 					break;
net/ipv4/ip_output.c +1 -5
index 8ee4d01..f75ff1d 100644
@@ -1249,11 +1249,7 @@ int ip_push_pending_frames(struct sock *
 	iph->tos = inet->tos;
 	iph->tot_len = htons(skb->len);
 	iph->frag_off = df;
-	if (!df) {
-		__ip_select_ident(iph, &rt->u.dst, 0);
-	} else {
-		iph->id = htons(inet->id++);
-	}
+	ip_select_ident(iph, &rt->u.dst, sk);
 	iph->ttl = ttl;
 	iph->protocol = sk->sk_protocol;
 	iph->saddr = rt->rt_src;
author
#2 lore raw
In reply to Greg KH
Quoted 9 lines · Greg KH

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

The diffstat and short summary of the fixes are below.

I'll also be replying to this message with a copy of the patch between 2.6.16 and 2.6.16.1, as it is small enough to do so.

The updated 2.6.16.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git

Oops, that should be:

	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git

sorry about that...

Hm, we shouldn't be using "rsync" as part of a git url these days. What's the recommended way of writing kernel.org git tree addresses now?

thanks,

greg k-h

#3 lore raw
Quoted 11 lines · Greg KH
Quoted 9 lines · Greg KH

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

The diffstat and short summary of the fixes are below.

I'll also be replying to this message with a copy of the patch between 2.6.16 and 2.6.16.1, as it is small enough to do so.

The updated 2.6.16.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git

Quoted 7 lines

Oops, that should be:

	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git

sorry about that...

Hm, we shouldn't be using "rsync" as part of a git url these days. What's the recommended way of writing kernel.org git tree addresses now?

git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git

?

Signature · 1 line
Jens Axboe
#4 lore raw
In reply to Greg KH
Quoted 1 line · Greg KH

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

I still get this error :

# make
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  CHK     usr/initramfs_list
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `isd200_Initialization':
: undefined reference to `ide_fix_driveid'
make: *** [.tmp_vmlinux1] Error 1

Attached .conf

#5 lore raw

PATCH 1/1 isd200: limit to BLK_DEV_IDE

Quoted 6 lines · Beber
Quoted 1 line · Greg KH

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

I still get this error :

# make

...

Quoted 3 lines

drivers/built-in.o: In function `isd200_Initialization':
: undefined reference to `ide_fix_driveid'
make: *** [.tmp_vmlinux1] Error 1

Was this reported earlier?

Please test the patch below.
It works for me with your config and various others.

From: Randy Dunlap <[email protected]>

Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE are set to (y, m) since isd200 calls ide_fix_driveid() in the BLK_DEV_IDE code.

---
 drivers/usb/storage/Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/usb/storage/Kconfig +1 -1
@@ -48,7 +48,7 @@ config USB_STORAGE_FREECOM
 
 config USB_STORAGE_ISD200
 	bool "ISD-200 USB/ATA Bridge support"
-	depends on USB_STORAGE && BLK_DEV_IDE
+	depends on USB_STORAGE && (BLK_DEV_IDE=y || BLK_DEV_IDE=m && USB_STORAGE=m)
 	---help---
 	  Say Y here if you want to use USB Mass Store devices based
 	  on the In-Systems Design ISD-200 USB/ATA bridge.
#6 lore raw

Re: [PATCH] isd200: limit to BLK_DEV_IDE

Quoted 13 lines · Randy.Dunlap

Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE are set to (y, m) since isd200 calls ide_fix_driveid() in the BLK_DEV_IDE code.

---
 drivers/usb/storage/Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

drivers/usb/storage/Kconfig config USB_STORAGE_FREECOM · line 51

Quoted 5 lines
drivers/usb/storage/Kconfig +1 -1
@@ -48,7 +48,7 @@ config USB_STORAGE_FREECOM
 
 config USB_STORAGE_ISD200
 	bool "ISD-200 USB/ATA Bridge support"
-	depends on USB_STORAGE && BLK_DEV_IDE
+	depends on USB_STORAGE && (BLK_DEV_IDE=y || BLK_DEV_IDE=m && USB_STORAGE=m)

Hmm. That expression is _really_ hard to figure out.

It would be more logical to make it

	depends on USB_STORAGE && (BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE)

or, even more preferably, split up the rules as two separate dependencies:

	depends on USB_STORAGE
	depends on BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE

(where that second thing really _should_ be expressible as

depends on BLK_DEV_IDE >= USB_STORAGE

but the kconfig language doesn't support that syntax..)

Linus

#7 lore raw

Re: [PATCH] isd200: limit to BLK_DEV_IDE

Quoted 15 lines · Linus Torvalds
Quoted 14 lines · Randy.Dunlap

Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE are set to (y, m) since isd200 calls ide_fix_driveid() in the BLK_DEV_IDE code.

---
 drivers/usb/storage/Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/usb/storage/Kconfig +0 -0
@@ -48,7 +48,7 @@ config USB_STORAGE_FREECOM
 
Quoted 6 lines

drivers/usb/storage/Kconfig config USB_STORAGE_FREECOM · line 51

Quoted 4 lines
drivers/usb/storage/Kconfig +1 -1
 config USB_STORAGE_ISD200
 	bool "ISD-200 USB/ATA Bridge support"
-	depends on USB_STORAGE && BLK_DEV_IDE
+	depends on USB_STORAGE && (BLK_DEV_IDE=y || BLK_DEV_IDE=m && USB_STORAGE=m)

Hmm. That expression is _really_ hard to figure out.

Yes, I just modeled it on some other similar Kconfigs.

Quoted 6 lines

It would be more logical to make it

	depends on USB_STORAGE && (BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE)

or, even more preferably, split up the rules as two separate dependencies:

Quoted 8 lines
	depends on USB_STORAGE
	depends on BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE

(where that second thing really _should_ be expressible as

depends on BLK_DEV_IDE >= USB_STORAGE

but the kconfig language doesn't support that syntax..)

In some way, the original line made sense to me:

	depends on USB_STORAGE && BLK_DEV_IDE

where we have: =y && =m

so if USB_STORAGE_ISD200 were a tristate, it would have been limited to 'm', but since it's a bool, it's not limited.

New patch is below.

Signature · 23 lines
From: Randy Dunlap <[email protected]>

Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE
are set to (y, m) since isd200 calls ide_fix_driveid() in the
BLK_DEV_IDE code.

Signed-off-by: Randy Dunlap <[email protected]>
---
 drivers/usb/storage/Kconfig |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2616-z.orig/drivers/usb/storage/Kconfig
+++ linux-2616-z/drivers/usb/storage/Kconfig
@@ -48,7 +48,8 @@ config USB_STORAGE_FREECOM

 config USB_STORAGE_ISD200
 	bool "ISD-200 USB/ATA Bridge support"
-	depends on USB_STORAGE && BLK_DEV_IDE
+	depends on USB_STORAGE
+	depends on BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE
 	---help---
 	  Say Y here if you want to use USB Mass Store devices based
 	  on the In-Systems Design ISD-200 USB/ATA bridge.
#8 lore raw

Re: [PATCH] isd200: limit to BLK_DEV_IDE

Quoted 7 lines · Randy.Dunlap

In some way, the original line made sense to me:

	depends on USB_STORAGE && BLK_DEV_IDE

where we have: =y && =m

so if USB_STORAGE_ISD200 were a tristate, it would have been limited to 'm', but since it's a bool, it's not limited.

Oh, the original makes _tons_ of sense. It's just that it doesn't show the real dependency.

It's perfectly fine to say

	bool
	depends on USB_STORAGE && BLK_DEV_IDE

and the bool will be true whenever usb storage and blk-dev-ide both are enabled somehow. So far so fine.

It's just that in this case, it simply wasn't enough. It didn't _just_ depend on BLK_DEV_IDE, it depended on it being available at link-time. So the original Kconfig rule made perfect sense, it just didn't match the real dependency.

Linus

#9 lore raw

Re: [PATCH] isd200: limit to BLK_DEV_IDE

In reply to Randy.Dunlap

Le Thu, 30 Mar 2006 14:35:26 -0800 (PST), "Randy.Dunlap" <[email protected]> m'a avoué:

Quoted 7 lines · Beber
Quoted 6 lines · Greg KH
Quoted 1 line

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

I still get this error :

Quoted 7 lines
Quoted 1 line
# make

...

Quoted 3 lines

drivers/built-in.o: In function `isd200_Initialization':
: undefined reference to `ide_fix_driveid'
make: *** [.tmp_vmlinux1] Error 1

Was this reported earlier?

Yes, it was, but ignored, so I repost it ;)

Quoted 2 lines

Please test the patch below.
It works for me with your config and various others.

It work here too.
Thanks

Signature · 3 lines
/* Beber : beber (AT) gna (DOT) org
 * http://guybrush.ath.cx, irc://irc.freenode.net/#{e.fr,gentoofr}
 * Guybrush @ Melee */
#11 lore raw

Re: [stable] Re: [PATCH] isd200: limit to BLK_DEV_IDE

In reply to a message not in the archive
Quoted 20 lines · Beber
Quoted 19 lines · Bertrand Jacquin

Le Thu, 30 Mar 2006 14:35:26 -0800 (PST), "Randy.Dunlap" <[email protected]> m'a avou?:

Quoted 7 lines · Beber
Quoted 6 lines · Greg KH
Quoted 1 line

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

I still get this error :

Quoted 7 lines
Quoted 1 line
# make

...

Quoted 3 lines

drivers/built-in.o: In function `isd200_Initialization':
: undefined reference to `ide_fix_driveid'
make: *** [.tmp_vmlinux1] Error 1

Was this reported earlier?

Yes, it was, but ignored, so I repost it ;)

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Please test the patch below.
It works for me with your config and various others.

It work here too.
Thanks

I look on last GIT history and didn't find this applyed upstream. Will it be ?

No one has forwarded it to the stable group, so it's a bit hard to apply it to the tree if that doesn't happen :)

thanks,

greg k-h

#12 lore raw

Re: [stable] Re: [PATCH] isd200: limit to BLK_DEV_IDE

Quoted 24 lines · On Wed, 5 Apr 2006 11:45:32 -0700 Greg KH wrote:
Quoted 23 lines · Beber
Quoted 22 lines · Bertrand Jacquin

Le Thu, 30 Mar 2006 14:35:26 -0800 (PST), "Randy.Dunlap" <[email protected]> m'a avou?:

Quoted 7 lines · Beber
Quoted 6 lines · Greg KH
Quoted 1 line

We (the -stable team) are announcing the release of the 2.6.16.1 kernel.

I still get this error :

Quoted 7 lines
Quoted 1 line
# make

...

Quoted 3 lines

drivers/built-in.o: In function `isd200_Initialization':
: undefined reference to `ide_fix_driveid'
make: *** [.tmp_vmlinux1] Error 1

Was this reported earlier?

Yes, it was, but ignored, so I repost it ;)

Quoted 2 lines

Please test the patch below.
It works for me with your config and various others.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

It work here too.
Thanks

I look on last GIT history and didn't find this applyed upstream. Will it be ?

No one has forwarded it to the stable group, so it's a bit hard to apply it to the tree if that doesn't happen :)

ok, I just did that...

---
~Randy