Skip to contentSkip to conversation

typo in sbc_mediagx.c

DISCUSSION Amy Fong 4 participants 7 messages Oct 16, 2000 – Oct 17, 2000 Memory technology devices (MTD)

lore
Share & tools
lore

Amy Fong

author
#0 lore raw
afong@ifurita:~/mtd/2.2.18-test/mtd/kernel$ diff -uNr sbc_mediagx.c.orig
sbc_mediagx.c      
--- sbc_mediagx.c.orig  Mon Oct 16 14:57:44 2000
+++ sbc_mediagx.c       Mon Oct 16 14:52:52 2000
@@ -67,7 +67,7 @@
     { name: "SBC-MediaGX flash boot partition", 
       offset: 0, 
       size: 640*1024 },
-    { mame: "SBC-MediaGX flash partition 1", 
+    { name: "SBC-MediaGX flash partition 1", 
       offset: 640*1024, 
       size: 2*1024*1024-640*1024 },
     { name: "SBC-MediaGX flash partition 2", 

To unsubscribe, send "unsubscribe mtd" to [email protected]

#1 lore raw

Fixed.

Quoted 7 lines · Amy Fong
afong@ifurita:~/mtd/2.2.18-test/mtd/kernel$ diff -uNr sbc_mediagx.c.orig
sbc_mediagx.c      

sbc_mediagx.c Mon Oct 16 14:52:52 2000 line 73

Quoted 8 lines
sbc_mediagx.c Mon Oct 16 14:52:52 2000 renamed from sbc_mediagx.c.orig Mon Oct 16 14:57:44 2000 +1 -1
@@ -67,7 +67,7 @@
     { name: "SBC-MediaGX flash boot partition", 
       offset: 0, 
       size: 640*1024 },
-    { mame: "SBC-MediaGX flash partition 1", 
+    { name: "SBC-MediaGX flash partition 1", 
       offset: 640*1024, 
       size: 2*1024*1024-640*1024 },
     { name: "SBC-MediaGX flash partition 2", 

To unsubscribe, send "unsubscribe mtd" to [email protected]

#2 lore raw
Quoted 1 line · [email protected] said:

Fixed.

Thanks.

Note that if you're using mtdblock.c you'll need to use v1.23 - 1.24 is my first attempt at using a kernel thread and it doesn't actually appear to work. It'll probably be a few days before I get a chance to look at it again - volunteers are welcome if you feel so inclined :)

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]

#3 lore raw
Quoted 6 lines
Quoted 1 line · [email protected] said:

Fixed.

Thanks.

Quoted 7 lines

Note that if you're using mtdblock.c you'll need to use v1.23 - 1.24 is my first attempt at using a kernel thread and it doesn't actually appear to work. It'll probably be a few days before I get a chance to look at it again - volunteers are welcome if you feel so inclined :)

--
dwmw2

Uh yeah. You're using the QUEUE_EMPTY macro which doesn't really exist in 2.2 or at least exists as

include/lists.h:

#define QUEUE_EMPTY(head, listnam) \
        ((QUEUE_FIRST(head, listnam) == QUEUE_LAST(head, listnam)) && \
	((u_long)QUEUE_FIRST(head, listnam) == (u_long)head))

as opposed to

2.4's include/blk.h
#define QUEUE_EMPTY list_empty(&blk_dev[MAJOR_NR].request_queue.queue_head)

<twitch>

;)

To unsubscribe, send "unsubscribe mtd" to [email protected]

#4 lore raw
Quoted 2 lines · [email protected] said:

Uh yeah. You're using the QUEUE_EMPTY macro which doesn't really
exist in 2.2 or at least exists as

Hmmm. It doesn't work in 2.4 either. But I've illustrated how I think it can be done with a kernel thread. If anyone disagrees with me sufficiently, I'm quite happy to be proved wrong, as long as the proof is under GPL.

Of course, if you agree with my method in spite of my implementation, you're welcome to fix that too :)

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]

#5 lore raw
Quoted 9 lines
Quoted 2 lines · [email protected] said:

Uh yeah. You're using the QUEUE_EMPTY macro which doesn't really
exist in 2.2 or at least exists as

Hmmm. It doesn't work in 2.4 either. But I've illustrated how I think it can be done with a kernel thread. If anyone disagrees with me sufficiently, I'm quite happy to be proved wrong, as long as the proof is under GPL.

Quoted 6 lines

Of course, if you agree with my method in spite of my implementation, you're welcome to fix that too :)

--
dwmw2

This seems to work so far... (I hope I got the kernel version correct) (with 2.2.18pre11)

mtdblock.c.tmp Tue Oct 17 14:27:28 2000 renamed from mtdblock.c Tue Oct 17 14:29:10 2000 +4 -0
@@ -298,7 +298,11 @@
        again:
                set_current_state(TASK_UNINTERRUPTIBLE);
                spin_lock_irq(&io_request_lock);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,46)
                if (QUEUE_EMPTY) {
+#else
+               if (!CURRENT) {
+#endif
                        spin_unlock_irq(&io_request_lock);
                        schedule();
                        if (leaving)

Oh... while I'm at it, can we add this into the Config.in? (for 2.2.16 and the 2.4's)

mtd-patch-2.2.16 Tue Oct 17 14:44:20 2000 renamed from home/afong/mtd/mtd/patches/mtd-patch-2.2.16 Mon Jun 26 04:22:56 2000 +0 -0
@@ -212,6 +212,10 @@
      define_bool CONFIG_SGI_PARTITION y
    fi
 +  tristate 'Journalling Flash filesystem (JFFS) support

(experimental)' CONFIG_JFFS_FS
++ if [ "$CONFIG_JFFS_FS" = "y" -o "$CONFIG_JFFS_FS" = "m" ]; then
++ int 'JFFS verbose level 0 (quiet), 1, 2, or 3'
CONFIG_JFFS_FS_VERBOSE 0
++ fi
+
fi

if [ "$CONFIG_NET" = "y" ]; then

To unsubscribe, send "unsubscribe mtd" to [email protected]

#6 lore raw

Committed, thanks. I didn't bother with the version check - !CURRENT ought to still work in 2.4.

I've amended the 2.2.16 patch, and just deleted the 2.4 patches - there's no point in them now that MTD is in Linus' tree.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]