All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] fix drivers/scsi/sd.c warnings
From: Andrew Morton @ 2002-12-19  6:04 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

Somebody forgot to test with CONFIG_LBD=n:

drivers/scsi/sd.c: In function `sd_init_command':
drivers/scsi/sd.c:304: warning: right shift count >= width of type
drivers/scsi/sd.c:305: warning: right shift count >= width of type
drivers/scsi/sd.c:306: warning: right shift count >= width of type
drivers/scsi/sd.c:307: warning: right shift count >= width of type
drivers/scsi/sd.c: In function `sd_read_capacity':
drivers/scsi/sd.c:1016: warning: left shift count >= width of type
drivers/scsi/sd.c:1017: warning: left shift count >= width of type
drivers/scsi/sd.c:1018: warning: left shift count >= width of type
drivers/scsi/sd.c:1019: warning: left shift count >= width of type



--- 25/drivers/scsi/sd.c~scsi-warnings	Wed Dec 18 22:01:40 2002
+++ 25-akpm/drivers/scsi/sd.c	Wed Dec 18 22:02:41 2002
@@ -174,7 +174,7 @@ static int sd_init_command(struct scsi_c
 {
 	unsigned int this_count, timeout;
 	struct gendisk *disk;
-	sector_t block;
+	u64 block;
 	struct scsi_device *sdp = SCpnt->device;
 
 	timeout = SD_TIMEOUT;
@@ -1013,10 +1013,10 @@ repeat:
 			(buffer[2] << 8) |
 			buffer[3]);			
 	} else {
-		sdkp->capacity = 1 + (((sector_t)buffer[0] << 56) |
-			((sector_t)buffer[1] << 48) |
-			((sector_t)buffer[2] << 40) |
-			((sector_t)buffer[3] << 32) |
+		sdkp->capacity = 1 + (((u64)buffer[0] << 56) |
+			((u64)buffer[1] << 48) |
+			((u64)buffer[2] << 40) |
+			((u64)buffer[3] << 32) |
 			((sector_t)buffer[4] << 24) |
 			((sector_t)buffer[5] << 16) |
 			((sector_t)buffer[6] << 8)  |

_

^ permalink raw reply

* dosemu-1.1.4 and /var/lib/dosemu
From: Stephen Lee @ 2002-12-19  6:00 UTC (permalink / raw)
  To: dosemu

I've compiled dosemu-1.1.4 on a Redhat 7.2 (with all recent updates) box
with the default settings and did a systemwide installation:

./install_systemwide -fd /usr/local/dosemu/dosemu-freedos-bin.tgz -i
/usr/local/dosemu/

I then created a user account (dosemu) and ran xdosemu and got:


   DOSEMU will run in its own X window.
   To terminate it you have three choices:
   - type <Ctrl>-C _here_ (not in the dosemu window)
   - type <Ctrl><Alt><PgDn> in the dosemu window
   - execute 'exitemu' at the DOS prompt

   Hint: if you want $HOME as DOS drive D:, then use the '-home' option

Running unpriviledged in low feature mode
Linux kernel 2.4.18; CPU speed is 2019809000 Hz
Dosemu-1.1.4.0 Running on CPU=586, FPU=1
no console
CONF aborted with: 
*** error: /var/lib/dosemu does not exist
    ... giving up.

I then linked /var/lib/dosemu to /usr/local/dosemu/bin/dosemu but a that
did not fix the error. 'dosemu -D+a -o debug' dumps the following:

CONF: config variable parser_version_3 set
CONF: config variable c_system set
CONF: Parsing builtin file.
CONF: config variable version_3_style_used set

Any suggestions on what else to report or adjustments to make? I don't
recall Dosemu 1.1.3.7 giving me this problem.

Thanks,
Stephen


^ permalink raw reply

* 2.5.52-mm2
From: Andrew Morton @ 2002-12-19  5:53 UTC (permalink / raw)
  To: lkml, linux-mm

url: http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.52/2.5.52-mm2/

. Big reorganisation of shared pagetable code.  It is a cleanup, and
  there should be no functional changes.  The diff is considerably
  easier to read now.

  In this patchset, shared pagetables are configurable again, and the
  default is "off".  This is because the intent is that pagetable sharing
  always be enabled (on ia32 at least).  But we want it to work when it
  is disabled too.  So in this -mm, pagetable sahring is disabled. 
  Henceforth it will be enabled.  Make sense?

. Added Bill Irwin's patches, get them some additional testing.

. The per-cpu kmalloc infrastructure.

. Another update of the patch management scripts is at

	http://www.zip.com.au/~akpm/linux/patches/patch-scripts-0.9/

  no great changes here.  Various fixes and tweaks.



Changes since 2.5.52-mm1:

+shpte-reorg.patch

 The shared pagetable patch reorganisation.

+shpte-reorg-fixes.patch

 Make it work with CONFIG_SHAREPTE=n

-lockless-current_kernel_time.patch

 Dropped for now, because it is ia32-only and it is time to get some
 non-ia32 testing done.

+block-allocator-doc.patch

 Some commentary.

+ext2-rename-vars.patch

 Make ext2_new_block() understandable

+remove-memshared.patch

 Remvoe /proc/meminfo:MemShared

+bin2bcd.patch

 Code consolidation/cleanup

+log_buf_size.patch

 Configurable printk buffer size.

+semtimedop-update.patch

 Wire up semtimedop() for 32-bit ia32 apps on ia64.

+nfs-kmap_atomic.patch

 Use kmap_atomic in NFS

+ext3-bh-dirty-race.patch

 Fix a rare BUG in ext3

+unalign-radix-tree-nodes.patch

 Space saving for radix_tree_nodes

+htlb-0.patch
+htlb-1.patch
+htlb-2.patch
+htlb-3.patch

 hugetlbpage updates

+kmalloc_percpu.patch

 per-cpu kmalloc infrastructure

+kmalloc_percpu-rtcache.patch
+kmalloc_percpu-mibs-1.patch
+kmalloc_percpu-mibs-2.patch
+kmalloc_percpu-mibs-3.patch

 Applications thereof

+wli-01_numaq_io.patch
+wli-02_do_sak.patch
+wli-03_proc_super.patch
+wli-04_cap_set_pg.patch
+wli-06_uml_get_task.patch
+wli-07_numaq_mem_map.patch
+wli-08_numaq_pgdat.patch
+wli-09_has_stopped_jobs.patch
+wli-10_inode_wait.patch
+wli-11_pgd_ctor.patch
+wli-12_pidhash_size.patch
+wli-13_rmap_nrpte.patch

 Bill's stuff.



All 78 patches:


linus.patch
  cset-1.883.3.60-to-1.900.txt.gz

kgdb.patch

sync_fs-deadlock-fix.patch
  sync_fs deadlock fix

shrink_list-dirty-page-race.patch
  fix a page dirtying race in vmscan.c

slab-poisoning.patch
  more informative slab poisoning

nommu-generic_file_readonly_mmap.patch
  Add generic_file_readonly_mmap() for nommu

dio-return-partial-result.patch

aio-direct-io-infrastructure.patch
  AIO support for raw/O_DIRECT

deferred-bio-dirtying.patch
  bio dirtying infrastructure

aio-direct-io.patch
  AIO support for raw/O_DIRECT

aio-dio-debug.patch

dio-reduce-context-switch-rate.patch
  Reduced wakeup rate in direct-io code

cputimes_stat.patch
  Retore per-cpu time accounting, with a config option

reduce-random-context-switch-rate.patch
  Reduce context switch rate due to the random driver

inlines-net.patch

rbtree-iosched.patch
  rbtree-based IO scheduler

deadsched-fix.patch
  deadline scheduler fix

quota-smp-locks.patch
  Subject: [PATCH] Quota SMP locks

shpte-ng.patch
  pagetable sharing for ia32

shpte-nonlinear.patch
  shpte: support nonlinear mappings and clean up clear_share_range()

shpte-reorg.patch

shpte-reorg-fixes.patch
  shared pagetable reorg fixes

shpte-always-on.patch
  Force CONFIG_SHAREPTE=y for ia32

ptrace-flush.patch
  Subject: [PATCH] ptrace on 2.5.44

buffer-debug.patch
  buffer.c debugging

misc.patch
  misc fixes

warn-null-wakeup.patch

pentium-II.patch
  Pentium-II support bits

rcu-stats.patch
  RCU statistics reporting

auto-unplug.patch
  self-unplugging request queues

less-unplugging.patch
  Remove most of the blk_run_queues() calls

ext3-fsync-speedup.patch
  Clean up ext3_sync_file()

remove-PF_NOWARN.patch
  Remove PF_NOWARN

scheduler-tunables.patch
  scheduler tunables

blocking-kswapd.patch
  Give kswapd writeback higher priority than pdflush

block-allocator-doc.patch
  ext2/3 commentary and cleanup

spread-find_group_other.patch
  ext2/3: better starting group for S_ISREG files

ext3-alloc-spread.patch
  ext3: smarter block allocation startup

ext2-alloc-spread.patch
  ext2: smarter block allocation startup

ext2-rename-vars.patch
  rename locals in ext2_new_block()

ext3-use-after-free.patch
  ext3 use-after-free bugfix

dio-always-kmalloc.patch
  direct-io: dynamically allocate struct dio

file-nr-doc-fix.patch
  Docs: fix explanation of file-nr

set_page_dirty_lock.patch
  fix set_page_dirty vs truncate&free races

remove-memshared.patch
  Remove /proc/meminfo:MemShared

bin2bcd.patch
  BIN_TO_BCD consolidation

log_buf_size.patch
  move LOG_BUF_SIZE to header/config

semtimedop-update.patch
  Enable semtimedop for ia64 32-bit emulation.

nfs-kmap_atomic.patch
  use kmap_atomic instaed of kmap in NFS client

ext3-bh-dirty-race.patch
  ext3: fix buffer dirtying

unalign-radix-tree-nodes.patch
  don't cacheline-align radix_tree_nodes

htlb-0.patch
  hugetlb bugfixes

htlb-1.patch
  hugetlb: report shared memory attachment counts

htlb-2.patch
  hugetlb: fix MAP_FIXED handling

htlb-3.patch
  hugetlbfs: set inode->i_size

kmalloc_percpu.patch
  kmalloc_percpu -- stripped down version

kmalloc_percpu-rtcache.patch
  Make rt_cache_stat use kmalloc_percpu

kmalloc_percpu-mibs-1.patch
  Change Networking mibs to use kmalloc_percpu -- 1/3

kmalloc_percpu-mibs-2.patch
  Change Networking mibs to use kmalloc_percpu -- 2/3

kmalloc_percpu-mibs-3.patch
  Change Networking mibs to use kmalloc_percpu -- 3/3

wli-01_numaq_io.patch
  (undescribed patch)

wli-02_do_sak.patch
  (undescribed patch)

wli-03_proc_super.patch
  (undescribed patch)

wli-04_cap_set_pg.patch
  (undescribed patch)

wli-06_uml_get_task.patch
  (undescribed patch)

wli-07_numaq_mem_map.patch
  (undescribed patch)

wli-08_numaq_pgdat.patch
  (undescribed patch)

wli-09_has_stopped_jobs.patch
  (undescribed patch)

wli-10_inode_wait.patch
  (undescribed patch)

wli-11_pgd_ctor.patch
  (undescribed patch)

wli-12_pidhash_size.patch
  (undescribed patch)

wli-13_rmap_nrpte.patch
  (undescribed patch)

dcache_rcu-2.patch
  dcache_rcu-2-2.5.51.patch

dcache_rcu-3.patch
  dcache_rcu-3-2.5.51.patch

page-walk-api.patch

page-walk-scsi.patch

page-walk-api-update.patch
  pagewalk API update

gup-check-valid.patch
  valid page test in get_user_pages()
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply

* A bug with using limit match - nobody knows???
From: markooff @ 2002-12-19  5:50 UTC (permalink / raw)
  To: netfilter

Hello!

Perhaps it's not a really new topic on this board, but i've found this
problem recently
I share my DSL connection with 4 other people and
i was just trying to limit one of them (who used to download lots of films,
mp3s )
and when i tried to use inverted match limit just like

     iptables -I FORWARD -p tcp -d 192.168.0.3 -m ! limit --limit 5/s -j
DROP

i received an error message :

iptables v1.2.6a: Couldn't load match `!':/usr/lib/iptables/libipt_!.so:
cannot open shared object file: No such file or directory

Try `iptables -h' or 'iptables --help' for more information.

This looks like iptables treats an "!" after "-m" like an sparate match ,
not connected with limit expression
But in the Iptables Tutorial 1.1.15 by Oskar Andreasson  there is written :
"The limit match may also be inverted by adding a ! flag in front of the
limit match. It would then be expressed as -m ! limit. This means that all
packets will be matched after they have broken the limit."

I don't know, perhaps i've did somethig wrong (what it could be ??? ), but i
tried every possible combination of
m, limit and  ! expressions, without any results.

Ofcourse i'd managed to solve my problem by
root@horus:/etc# iptables -I FORWARD -p tcp -d 192.168.0.3 -j DROP
root@horus:/etc# iptables -I FORWARD -p tcp -d 192.168.0.3 -m limit --limit
5/s -j allowed

but it's not a proper solvation :))

Thanks a LOT

Pawel Markowski
markooff@interia.pl
markooff@uj.edu.pl
Linux Registered User
         #289621





^ permalink raw reply

* 2.5.52-mm2
From: Andrew Morton @ 2002-12-19  5:53 UTC (permalink / raw)
  To: lkml, linux-mm


url: http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.52/2.5.52-mm2/

. Big reorganisation of shared pagetable code.  It is a cleanup, and
  there should be no functional changes.  The diff is considerably
  easier to read now.

  In this patchset, shared pagetables are configurable again, and the
  default is "off".  This is because the intent is that pagetable sharing
  always be enabled (on ia32 at least).  But we want it to work when it
  is disabled too.  So in this -mm, pagetable sahring is disabled. 
  Henceforth it will be enabled.  Make sense?

. Added Bill Irwin's patches, get them some additional testing.

. The per-cpu kmalloc infrastructure.

. Another update of the patch management scripts is at

	http://www.zip.com.au/~akpm/linux/patches/patch-scripts-0.9/

  no great changes here.  Various fixes and tweaks.



Changes since 2.5.52-mm1:

+shpte-reorg.patch

 The shared pagetable patch reorganisation.

+shpte-reorg-fixes.patch

 Make it work with CONFIG_SHAREPTE=n

-lockless-current_kernel_time.patch

 Dropped for now, because it is ia32-only and it is time to get some
 non-ia32 testing done.

+block-allocator-doc.patch

 Some commentary.

+ext2-rename-vars.patch

 Make ext2_new_block() understandable

+remove-memshared.patch

 Remvoe /proc/meminfo:MemShared

+bin2bcd.patch

 Code consolidation/cleanup

+log_buf_size.patch

 Configurable printk buffer size.

+semtimedop-update.patch

 Wire up semtimedop() for 32-bit ia32 apps on ia64.

+nfs-kmap_atomic.patch

 Use kmap_atomic in NFS

+ext3-bh-dirty-race.patch

 Fix a rare BUG in ext3

+unalign-radix-tree-nodes.patch

 Space saving for radix_tree_nodes

+htlb-0.patch
+htlb-1.patch
+htlb-2.patch
+htlb-3.patch

 hugetlbpage updates

+kmalloc_percpu.patch

 per-cpu kmalloc infrastructure

+kmalloc_percpu-rtcache.patch
+kmalloc_percpu-mibs-1.patch
+kmalloc_percpu-mibs-2.patch
+kmalloc_percpu-mibs-3.patch

 Applications thereof

+wli-01_numaq_io.patch
+wli-02_do_sak.patch
+wli-03_proc_super.patch
+wli-04_cap_set_pg.patch
+wli-06_uml_get_task.patch
+wli-07_numaq_mem_map.patch
+wli-08_numaq_pgdat.patch
+wli-09_has_stopped_jobs.patch
+wli-10_inode_wait.patch
+wli-11_pgd_ctor.patch
+wli-12_pidhash_size.patch
+wli-13_rmap_nrpte.patch

 Bill's stuff.



All 78 patches:


linus.patch
  cset-1.883.3.60-to-1.900.txt.gz

kgdb.patch

sync_fs-deadlock-fix.patch
  sync_fs deadlock fix

shrink_list-dirty-page-race.patch
  fix a page dirtying race in vmscan.c

slab-poisoning.patch
  more informative slab poisoning

nommu-generic_file_readonly_mmap.patch
  Add generic_file_readonly_mmap() for nommu

dio-return-partial-result.patch

aio-direct-io-infrastructure.patch
  AIO support for raw/O_DIRECT

deferred-bio-dirtying.patch
  bio dirtying infrastructure

aio-direct-io.patch
  AIO support for raw/O_DIRECT

aio-dio-debug.patch

dio-reduce-context-switch-rate.patch
  Reduced wakeup rate in direct-io code

cputimes_stat.patch
  Retore per-cpu time accounting, with a config option

reduce-random-context-switch-rate.patch
  Reduce context switch rate due to the random driver

inlines-net.patch

rbtree-iosched.patch
  rbtree-based IO scheduler

deadsched-fix.patch
  deadline scheduler fix

quota-smp-locks.patch
  Subject: [PATCH] Quota SMP locks

shpte-ng.patch
  pagetable sharing for ia32

shpte-nonlinear.patch
  shpte: support nonlinear mappings and clean up clear_share_range()

shpte-reorg.patch

shpte-reorg-fixes.patch
  shared pagetable reorg fixes

shpte-always-on.patch
  Force CONFIG_SHAREPTE=y for ia32

ptrace-flush.patch
  Subject: [PATCH] ptrace on 2.5.44

buffer-debug.patch
  buffer.c debugging

misc.patch
  misc fixes

warn-null-wakeup.patch

pentium-II.patch
  Pentium-II support bits

rcu-stats.patch
  RCU statistics reporting

auto-unplug.patch
  self-unplugging request queues

less-unplugging.patch
  Remove most of the blk_run_queues() calls

ext3-fsync-speedup.patch
  Clean up ext3_sync_file()

remove-PF_NOWARN.patch
  Remove PF_NOWARN

scheduler-tunables.patch
  scheduler tunables

blocking-kswapd.patch
  Give kswapd writeback higher priority than pdflush

block-allocator-doc.patch
  ext2/3 commentary and cleanup

spread-find_group_other.patch
  ext2/3: better starting group for S_ISREG files

ext3-alloc-spread.patch
  ext3: smarter block allocation startup

ext2-alloc-spread.patch
  ext2: smarter block allocation startup

ext2-rename-vars.patch
  rename locals in ext2_new_block()

ext3-use-after-free.patch
  ext3 use-after-free bugfix

dio-always-kmalloc.patch
  direct-io: dynamically allocate struct dio

file-nr-doc-fix.patch
  Docs: fix explanation of file-nr

set_page_dirty_lock.patch
  fix set_page_dirty vs truncate&free races

remove-memshared.patch
  Remove /proc/meminfo:MemShared

bin2bcd.patch
  BIN_TO_BCD consolidation

log_buf_size.patch
  move LOG_BUF_SIZE to header/config

semtimedop-update.patch
  Enable semtimedop for ia64 32-bit emulation.

nfs-kmap_atomic.patch
  use kmap_atomic instaed of kmap in NFS client

ext3-bh-dirty-race.patch
  ext3: fix buffer dirtying

unalign-radix-tree-nodes.patch
  don't cacheline-align radix_tree_nodes

htlb-0.patch
  hugetlb bugfixes

htlb-1.patch
  hugetlb: report shared memory attachment counts

htlb-2.patch
  hugetlb: fix MAP_FIXED handling

htlb-3.patch
  hugetlbfs: set inode->i_size

kmalloc_percpu.patch
  kmalloc_percpu -- stripped down version

kmalloc_percpu-rtcache.patch
  Make rt_cache_stat use kmalloc_percpu

kmalloc_percpu-mibs-1.patch
  Change Networking mibs to use kmalloc_percpu -- 1/3

kmalloc_percpu-mibs-2.patch
  Change Networking mibs to use kmalloc_percpu -- 2/3

kmalloc_percpu-mibs-3.patch
  Change Networking mibs to use kmalloc_percpu -- 3/3

wli-01_numaq_io.patch
  (undescribed patch)

wli-02_do_sak.patch
  (undescribed patch)

wli-03_proc_super.patch
  (undescribed patch)

wli-04_cap_set_pg.patch
  (undescribed patch)

wli-06_uml_get_task.patch
  (undescribed patch)

wli-07_numaq_mem_map.patch
  (undescribed patch)

wli-08_numaq_pgdat.patch
  (undescribed patch)

wli-09_has_stopped_jobs.patch
  (undescribed patch)

wli-10_inode_wait.patch
  (undescribed patch)

wli-11_pgd_ctor.patch
  (undescribed patch)

wli-12_pidhash_size.patch
  (undescribed patch)

wli-13_rmap_nrpte.patch
  (undescribed patch)

dcache_rcu-2.patch
  dcache_rcu-2-2.5.51.patch

dcache_rcu-3.patch
  dcache_rcu-3-2.5.51.patch

page-walk-api.patch

page-walk-scsi.patch

page-walk-api-update.patch
  pagewalk API update

gup-check-valid.patch
  valid page test in get_user_pages()

^ permalink raw reply

* Re: how to delete a piece of rule in iptables?
From: Narendra Prabhu. B @ 2002-12-19  5:25 UTC (permalink / raw)
  To: ITM CS Ruslan O. Nesterov; +Cc: netfilter @ lists . netfilter . org
In-Reply-To: <4165816408.20021218165236@complexsystem.ru>


Hello,

There is a option --line-numbers, which can be used with -L in iptables.
Knowing the line/rule numbers ... u can later delete the specific rule.

Commands :

      #iptables -nL --line-numbers ---> this will show you the rulenumbers

      #iptables -D <chain-name> <rule-number>

Bye,
Narendra.


In the middle of difficulty..... lies Opportunity. (Albert Einstein)
--------------------------------------------------------------------
Narendra Prabhu. B             Free Software at its product-ive best.
DeepRoot Linux                             http://www.deeproot.co.in
                ---- Server Appliances ----
             ---- Linux Support and Services ----
-------------------------------------------------------------------

On Wed, 18 Dec 2002, ITM CS Ruslan O. Nesterov wrote:

> Hello bobo,
>
> Wednesday, December 18, 2002, 3:30:18 PM, you wrote:
>
> b>              i have insert some rules to iptables firewall.now,i would
> b> like to delete it  .
> b> but i only know to use iptalbes -L to empty them.
> b> but it lead to delete all the rules in it.
> b> how to do ??
>
>
> Try to use
> iptables -D INPUT 1
> this will delete rule 1 in input chain
>
> --
> Best regards,
>  ITM                            mailto:ruslan@complexsystem.ru




^ permalink raw reply

* unexpected IO-APIC
From: Carlos Madrid @ 2002-12-19  5:21 UTC (permalink / raw)
  To: linux-smp

I don't know how much of dmesg I should copy but here it is. What does it
mean? Would this have anything to do with eth0 problem I'm having? I'm
running p4 1.8 msi-6524 mdk 9.0.
Thanks,
Carlos
number of IO-APIC #2 registers: 24.
testing the IO APIC.......................

IO APIC #2......
.... register #00: 02000000
.......    : physical APIC id: 02
.... register #01: 00178014
.......     : max redirection entries: 0017
.......     : PRQ implemented: 1
.......     : IO APIC version: 0014
 WARNING: unexpected IO-APIC, please mail
          to linux-smp@vger.kernel.org
.... register #02: 00000000
.......     : arbitration: 00


^ permalink raw reply

* Re: Via KT400
From: Courtney Grimland @ 2002-12-19  5:26 UTC (permalink / raw)
  To: Tupshin Harper; +Cc: linux-kernel
In-Reply-To: <3E010F07.3000708@tupshin.com>

I have the 7VAXP.  I only had problems with AGP and sound, and using
2.4.20-ac2 absolutely everything on this board works (finally -
sound!).  AGP worked in 2.4.20-ac1 as well as 2.4.21-pre1.  I think
the the IDE issue was resolved in 2.4.20.

On Wed, 18 Dec 2002 16:12:55 -0800
Tupshin Harper <tupshin@tupshin.com> wrote:

> Matthew D. Pitts wrote:
> 
> >Has anyone on the list used a motherboard that uses the Via KT400
> >AGPset? I just purchased a Gigabyte GA-7VAX that has it.
> >
> >Matthew D. Pitts
> >
> >-
> >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/
> >  
> >
> I'm using exactly that motherboard with no problems. There was an
> issue with DMA not being enabled on the IDE controller, but at the
> time, using kernel 2.4.19-rc2-ac3 fixed it.  I'm not sure if this
> fix went into 2.4.20 or if you still need an ac kernel.
> 
> -Tupshin
> 
> -
> 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/

^ permalink raw reply

* Re: 3DFX framebuffer driver v0.2.2
From: idalton @ 2002-12-19  5:06 UTC (permalink / raw)
  To: linux-fbdev-devel
In-Reply-To: <E18O0I8-0005IH-00@sc8-sf-list1.sourceforge.net>


[-- Attachment #1.1: Type: text/plain, Size: 1922 bytes --]

On Mon, Dec 16, 2002 at 06:45:00PM +0000, joachim.henke@stud.tu-ilmenau.de wrote:
> On http://www.medex.hu/~danthe/tdfx/ I found a newer version of the tdfxfb
> driver. It was a patch against linux 2.4.4 . I don't know why it never went
> into the kernel. Maybe Linus was too busy at that time?
> 
> The current kernel still contains version 0.1.3 which is rather old. Much
> work has been done until version 0.2.2, mainly support for:
> 
> * non-8 dot wide fonts
> * multihead
> * full 8/16/24/32 bit color (fixes the ugly bootup penguin)
> * MIPS
> * module options
> 
> I think it's worth to give it a chance and to continue development on the
> base of that code. So I "ported" it to kernel 2.4.2x. Get this new patch
> here:
> 
> http://tu-ilmenau.de/~johe-ii/3dfx-0.2.2-2.4.21-pre1.diff.gz
> 
> I just merged the improvements that happened to v0.1.3 while it was in the
> kernel and did some source formating.
> 
> Be encouraged to test it, do further improvements and please take it into
> the kernel!

I try this out on 2.4.20 with other patching.
My machine is an Asus super 7 (K6 500) with PCI & AGP voodoo banshees.
BIOS requires boot VGA to be PCI.

Both heads are init by driver, BIOS head is head 0. Head 1 is
misdetected to be only 4096KB video memory, should be 16384KB as is head
0. After remapping a virtual console to fb/1, I have no video signal on
either head now until I fbset each to depth 16.

Tested system with mplayer output to tdfxfb driver. Video only on fb/0,
but with mplayer on console on fb/1 both heads are responsive.

Unfortunately I tried mplayer with DirectFB, it crashes unable to init,
and (it's enabled with xfs patch) I get into gdb. And my keventd kernel
thread is zombie. sysrq kessages appear on (current) fb console, but
consoles otherwise unresponsive.

I try mplayer with tdfxfb again. No complaints but also no image on fb/0



[-- Attachment #1.2: mnemaxa-uberpatch.dmesg --]
[-- Type: text/plain, Size: 8585 bytes --]

Linux version 2.4.20-usagi-tdfx (root@mnemaxa) (gcc version 2.95.4 20011002 (Debian prerelease)) #1 Wed Dec 18 16:34:09 PST 2002
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000017ffc000 (usable)
 BIOS-e820: 0000000017ffc000 - 0000000017fff000 (ACPI data)
 BIOS-e820: 0000000017fff000 - 0000000018000000 (ACPI NVS)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
383MB LOWMEM available.
ACPI: have wakeup address 0xc0001000
On node 0 totalpages: 98300
zone(0): 4096 pages.
zone(1): 94204 pages.
zone(2): 0 pages.
ACPI: RSDP (v000 ASUS                       ) @ 0x000f81e0
ACPI: RSDT (v001 ASUS   P5A-B    16944.11825) @ 0x17ffc000
ACPI: FADT (v001 ASUS   P5A-B    16944.11825) @ 0x17ffc080
ACPI: BOOT (v001 ASUS   P5A-B    16944.11825) @ 0x17ffc040
ACPI: DSDT (v001   ASUS P5A-B    00000.04096) @ 0x00000000
ACPI: BIOS passes blacklist
Kernel command line: root=/dev/hda2 ro vga=4 nmi_watchdog=1
Initializing CPU#0
Detected 501.033 MHz processor.
Console: colour VGA+ 80x30
Calibrating delay loop... 997.37 BogoMIPS
Memory: 384832k/393200k available (2084k kernel code, 7980k reserved, 1298k data, 116k init, 0k highmem)
kdb version 2.5 by Keith Owens, Scott Lurndal. Copyright SGI, All Rights Reserved
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode cache hash table entries: 32768 (order: 6, 262144 bytes)
Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
CPU: L1 I Cache: 32K (32 bytes/line), D cache 32K (32 bytes/line)
CPU:     After generic, caps: 008021bf 808029bf 00000000 00000002
CPU:             Common caps: 008021bf 808029bf 00000000 00000002
CPU: AMD-K6(tm) 3D processor stepping 0c
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: AMD K6
ACPI: Subsystem revision 20021205
PCI: PCI BIOS revision 2.10 entry at 0xf0720, last bus=1
PCI: Using configuration type 1
 tbxface-0099 [03] Acpi_load_tables      : ACPI Tables successfully acquired
Parsing all Control Methods:.......................................................................
Table [DSDT] - 215 Objects with 28 Devices 71 Methods 12 Regions
ACPI Namespace successfully loaded at root c047d4fc
evxfevnt-0074 [04] Acpi_enable           : Transition to ACPI mode successful
   evgpe-0263: *** Info: GPE Block0 defined as GPE0 to GPE15
   evgpe-0263: *** Info: GPE Block1 defined as GPE16 to GPE31
Executing all Device _STA and_INI methods:............................
28 Devices found containing: 28 _STA, 0 _INI methods
Completing Region/Field/Buffer/Package initialization:........................................
Initialized 9/12 Regions 0/0 Fields 20/20 Buffers 11/11 Packages (215 nodes)
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: System [ACPI] (supports S0 S1 S4 S5)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 *7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 *9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 7 *9 10 11 12 14 15)
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
PCI: Probing PCI hardware
 pci_irq-0297 [03] acpi_pci_irq_derive   : Unable to derive IRQ for device 00:0f.0
PCI: No IRQ known for interrupt pin A of device 00:0f.0<6>PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'
isapnp: Scanning for PnP cards...
isapnp: SB audio device quirk - increasing port range
isapnp: AWE32 quirk - adding two ports
isapnp: Card 'Creative SB AWE64  PnP'
isapnp: 1 Plug & Play card detected total
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
IPsec Security Association Database (SADB): initialized.
IPsec Security Policy Database (SPD): initialized.
IPsec PF_KEY V2: initialized
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
SGI XFS snapshot 2.4.20-2002-11-29_01:21_UTC with ACLs, quota, no debug enabled
ACPI: Power Button (FF) [PWRF]
ACPI: Processor [CPU0] (supports C1 C2 C3)
fb: MTRR's turned on
tdfxfb: allocating 1024 bytes for the hwcursor at offset 0x00fff000
Console: switching to colour frame buffer device 80x30
fb0: 3Dfx Banshee frame buffer device, 16384K @ 0xE2000000
PCI: Enabling device 01:00.0 (0000 -> 0003)
fb: MTRR's turned on
tdfxfb: allocating 1024 bytes for the hwcursor at offset 0x003ff000
fb1: 3Dfx Banshee frame buffer device, 4096K @ 0xE6000000
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS02 at 0x03e8 (irq = 4) is a 16550A
Real Time Clock Driver v1.10e
Non-volatile memory driver v1.2
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ALI15X3: IDE controller on PCI bus 00 dev 78
 pci_irq-0297 [02] acpi_pci_irq_derive   : Unable to derive IRQ for device 00:0f.0
PCI: No IRQ known for interrupt pin A of device 00:0f.0ALI15X3: chipset revision 193
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xa800-0xa807, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xa808-0xa80f, BIOS settings: hdc:pio, hdd:pio
hda: WDC AC36400L, ATA DISK drive
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
blk: queue c0495384, I/O limit 4095Mb (mask 0xffffffff)
hda: 12594960 sectors (6449 MB) w/256KiB Cache, CHS=13328/15/63, (U)DMA
Partition check:
 /dev/ide/host0/bus0/target0/lun0: p1 p2
loop: loaded (max 8 devices)
8139too Fast Ethernet driver 0.9.26
eth0: SMC1211TX EZCard 10/100 (RealTek RTL8139) at 0xdbc0e000, 00:e0:29:6e:d5:88, IRQ 7
eth0:  Identified 8139 chip type 'RTL-8139B'
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
uhci.c: USB Universal Host Controller Interface driver v1.1
PCI: Setting latency timer of device 00:02.0 to 64
usb-ohci.c: USB OHCI at membase 0xdbc10000, IRQ 9
usb-ohci.c: usb-00:02.0, Acer Laboratories Inc. [ALi] USB 1.1 Controller
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 (usagi-cvs/IPsec6 based StS) for NET4.0
IPv6 over IPv4 tunneling driver
cryptoapi: loaded
cryptoapi: Registered aes-ecb (0)
cryptoapi: Registered aes-cbc (65536)
cryptoapi: Registered aes-cfb (131072)
cryptoapi: Registered aes-ctr (262144)
cryptoapi: Registered aes-rtc (524288)
cryptoapi: Registered md5 (0)
cryptoapi: Registered sha1 (0)
cryptoloop: loaded
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 116k freed
hub.c: new USB device 00:02.0-2, assigned address 2
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:02.0-2.3, assigned address 3
usb.c: USB device 3 (vend/prod 0x553/0x2) is not claimed by any active driver.
hub.c: new USB device 00:02.0-2.4, assigned address 4
input0: USB HID v1.00 Mouse [0461:4d03] on usb1:4.0
Adding Swap: 524432k swap-space (priority 1)
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,2), internal journal
Linux video capture interface: v1.00
V4L-Driver for Vision CPiA based cameras v0.8.1
usb.c: registered new driver cpia
USB CPiA camera found
  CPiA Version: 1.20 (2.0)
  CPiA PnP-ID: 0553:0002:0100
  VP-Version: 1.0 0141
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply

* readdir within kernel
From: Herbert Poetzl @ 2002-12-19  5:06 UTC (permalink / raw)
  To: linux-fsdevel


hi all!

I would like to know if this is the right way to
read a directory contents for a given directory
dentry within a kernel module ...

suggestions and/or hints are very welcome ...


extern	filldir_t xxx_filler;


void	xxx_dump_dir(struct dentry *de)
{
    	struct file pf;
	struct inode *in = de->d_inode;
	int ret;	
		
	ret = init_private_file(&pf, de, FMODE_READ);
	if (!pf.f_op->readdir)
		goto out_close;
		
    	ret = vfs_readdir(&pf, xxx_filler, (void *)0);

out_close:
	if (pf.f_op->release)
		pf.f_op->release(in, &pf);
    	return;
}

many thanks,
Herbert


^ permalink raw reply

* char device kernel module won't write
From: Scott Nash @ 2002-12-19  5:08 UTC (permalink / raw)
  To: linux-kernel

I am trying to finish a driver to write to a small lcd screen.  I can write
to the screen all day but I need to get the write function to work.  This is
under kernel 2.2.16-22.  I started with the tagged fops set up.  Then to see
if it made a difference I fully declared the fops structure making sure all
the positions were acounted for with NULL or fuction call.  I basically have
nothing but open, release, read, write and llseek defined.  I selected a
major of 200 after not seeing it defined.  The device loads fine.  I made a
test program for it, which opens the device, writes one line and then
closes.  When I try to write,in the test, the debug statements for read
function come up and I get an oops.
Everything says that the write I wrote and placed in fops structure should
be called.  What I am trying to write to device is: struct lcdpacket{int
line;char text[18]};
I have tried to change places of read and write but those incompatible
pointers keep coming up.
I am debating on going on list, but please cc me right now.


^ permalink raw reply

* Re: Help in cross-compiler--gcc3.2-7.1 error
From: Daniel Jacobowitz @ 2002-12-19  4:58 UTC (permalink / raw)
  To: Chien-Lung Wu; +Cc: 'Brad Barrett', linux-mips
In-Reply-To: <A4E787A2467EF849B00585F14C9005590689B5@dprn03.deltartp.com>

On Wed, Dec 18, 2002 at 05:21:39PM -0500, Chien-Lung Wu wrote:
> Hi, Brad:
> 
> Thanks for your information.
> I download:
> 	binutils			v2.13.90.0.10 (H.J. Lu)
> 	GCC				v3.2-7.1 (H.J. Lu)
> 	glibc				v2.2.5
> 	glibc-linuxthreads	v2.2.5
> 
> and follow your build note to build a big-endian mips cross-compiler.
> 
> As I build the binutil-2.13.90.10, it is o.k.
> 
> However, as I build the gcc (1st), I get the error message:
> 
> make[1]: Leaving directory `/home/lineo/xcompiler/mips-gcc-3.2.7/libiberty'
> make[1]: Entering directory `/home/lineo/xcompiler/mips-gcc-3.2.7/gcc'
> gcc -DIN_GCC -DCROSS_COMPILE   -g -O2 -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
> -Wno-long-long
> -DHAVE_CONFIG_H -DGENERATOR_FILE  -o gengenrtl \
>  gengenrtl.o ../libiberty/libiberty.a
>  ../libiberty/libiberty.a: could not read symbols: Archive has no index; run
>  ranlib to add one
>  collect2: ld returned 1 exit status
>  make[1]: *** [gengenrtl] Error 1
>  make[1]: Leaving directory `/home/lineo/xcompiler/mips-gcc-3.2.7/gcc'
>  make: *** [all-gcc] Error 2
> 
> 
> Do I miss something?
> Since I download the gcc3.2-7.1.src.rpm (only srpm format), I use 
> 
> 	rpm --rebuild gcc3.2-7.1.src.rpm
> 
> then I got gcc-3.2-20020903.tar.bz2 and many patch files.
> 
> I umcompress the gcc-3.2-20020903.tar.bz2 using the command
> 	tar -xvIf gcc-3.2-20020903.tar.bz2 
> ==>I get the gcc-3.2-20020903.
> 
> Questions:
> 	Do I need to patch all the patch files? If so, how can I patch all
> of them?
> 	or is the tarball pached?
> 
> Regarding to the error message, is it caused by missing some patch files?
> How can I fix this problem?

I don't know anything about HJ's RPM setup, but that error means it ran
host ranlib on a MIPS library instead of running MIPS ranlib.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply

* [Linux-ia64] PMU program for regular interrupts
From: Peter Chubb @ 2002-12-19  4:53 UTC (permalink / raw)
  To: linux-ia64

To the people interested:  there's a skeleton of such a program at

 http://www.gelato.unsw.edu.au/patches/realfeel4.c

--
Dr Peter Chubb				    peterc@gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all almost the same.


^ permalink raw reply

* Re: IPv6 Programming
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2002-12-19  4:41 UTC (permalink / raw)
  To: aravind1001; +Cc: netdev
In-Reply-To: <20021219043628.876C33EDEC@server2.fastmail.fm>

In article <20021219043628.876C33EDEC@server2.fastmail.fm> (at Thu, 19 Dec 2002 00:36:28 -0400), "Aravind Ceyardass" <aravind1001@speedpost.net> says:

> New to IPv6 on Linux. I would like to know which version of Linux has got
> the header files for
> IPv6 programming?

It depends on what you mean by "IPv6 programming," but anyway,
glibc 2.1.3 or later, preferably, glibc 2.2.x or later.

--yoshfuji

^ permalink raw reply

* [BENCHMARK] scheduler tunables with contest - child_penalty
From: Con Kolivas @ 2002-12-19  4:45 UTC (permalink / raw)
  To: linux kernel mailing list; +Cc: Robert Love, Ingo Molnar



Here are contest results with 2.5.52-mm1 and different child_penalty settings
(default is 95):

noload:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           40.0    180     0       0       1.10
chi_pen75 [3]           40.0    180     0       0       1.10
2.5.52-mm1 [8]          39.7    180     0       0       1.10

cacherun:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           37.0    194     0       0       1.02
chi_pen75 [3]           37.0    193     0       0       1.02
2.5.52-mm1 [7]          36.9    194     0       0       1.02

process_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           54.0    130     15      64      1.49
chi_pen75 [3]           52.9    132     15      61      1.46
2.5.52-mm1 [7]          49.0    144     10      50      1.35

ctar_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           51.8    159     1       10      1.43
chi_pen75 [3]           50.9    160     1       10      1.41
2.5.52-mm1 [7]          55.5    156     1       10      1.53

xtar_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           73.1    120     1       8       2.02
chi_pen75 [3]           84.5    110     1       8       2.33
2.5.52-mm1 [7]          77.4    122     1       8       2.14

io_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           117.7   88      22      26      3.25
chi_pen75 [3]           109.4   96      20      24      3.02
2.5.52-mm1 [7]          80.5    108     10      19      2.22

io_other:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           108.1   92      21      26      2.99
chi_pen75 [3]           105.6   106     19      25      2.92
2.5.52-mm1 [7]          60.1    131     7       18      1.66

read_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           50.6    149     5       6       1.40
chi_pen75 [3]           50.7    150     5       6       1.40
2.5.52-mm1 [7]          49.9    149     5       6       1.38

list_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           44.1    166     0       9       1.22
chi_pen75 [3]           43.6    167     0       9       1.20
2.5.52-mm1 [7]          43.8    167     0       9       1.21

mem_load:
Kernel [runs]           Time    CPU%    Loads   LCPU%   Ratio
chi_pen50 [3]           108.1   72      37      2       2.99
chi_pen75 [3]           89.3    89      36      2       2.47
2.5.52-mm1 [7]          71.1    123     36      2       1.96

That sure changes things somewhat.

Con

^ permalink raw reply

* IPv6 Programming
From: Aravind Ceyardass @ 2002-12-19  4:36 UTC (permalink / raw)
  To: netdev


Hi,

New to IPv6 on Linux. I would like to know which version of Linux has got
the header files for
IPv6 programming?

Thanks in advance.


Aravind



-- 
http://fastmail.fm - Accessible with your email software
                      or over the web

^ permalink raw reply

* Re: modules oops in 2.5.52
From: Jeremy Fitzhardinge @ 2002-12-19  4:19 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Linux Kernel List
In-Reply-To: <20021219024313.759EC2C075@lists.samba.org>

On Wed, 2002-12-18 at 18:11, Rusty Russell wrote:
> In message <1040260444.1316.4.camel@ixodes.goop.org> you write:
> > Hi,
> > 
> > I just had an oops in the modules code:
> > 
> > Dec 18 16:58:59 ixodes kernel: Unable to handle kernel paging request at virt
> ual address f8980924
> > Dec 18 16:58:59 ixodes kernel:  printing eip:
> > Dec 18 16:58:59 ixodes kernel: f896756d
> > Dec 18 16:58:59 ixodes kernel: *pde = 01bfc067
> > Dec 18 16:58:59 ixodes kernel: *pte = 00000000
> > Dec 18 16:58:59 ixodes kernel: Oops: 0000
> > Dec 18 16:58:59 ixodes kernel: CPU:    0
> > Dec 18 16:58:59 ixodes kernel: EIP:    0060:[<f896756d>]    Not tainted
> > Dec 18 16:58:59 ixodes kernel: EFLAGS: 00010282
> > Dec 18 16:58:59 ixodes kernel: EIP is at __exitfn+0xd/0x4c [parport_pc]
> 
> Actually, you had an oops in the parport_pc code, in
> cleanup_module().  Now, *why* that oopsed, I don't know...

It looks like it might end up calling request_module() from within
cleanup_module(). Is that going to be a problem?
        
        J


^ permalink raw reply

* Re: [PATCH][2.4]  generic cluster APIC support for systems with more than 8 CPUs
From: James Cleverdon @ 2002-12-19  4:14 UTC (permalink / raw)
  To: Pallipadi, Venkatesh, Linux Kernel, Christoph Hellwig
  Cc: Martin Bligh, John Stultz, Nakajima, Jun, Mallick, Asit K,
	Saxena, Sunil
In-Reply-To: <C8C38546F90ABF408A5961FC01FDBF1912E193@fmsmsx405.fm.intel.com>

On Wednesday 18 December 2002 06:45 pm, Pallipadi, Venkatesh wrote:
> > From: James Cleverdon [mailto:jamesclv@us.ibm.com]
> >
> > > On Wednesday 18 December 2002 05:05 pm, Pallipadi, Venkatesh wrote:
> > > I am not really sure about the local APIC versions in summit. What I
> > > remember seeing on lkml was summit has older IOAPIC
> >
> > version. Can someone
> >
> > > clarify this?
> >
> > Sure, I can verify it.  The I/O APICs in shipped summit
> > chipsets contains a
> > version ID of 0x11 instead of 0x14 to 0x1F.  The high
> > performance folks
> > claimed that Intel specified 0x14 for the local APICs, but
> > left their orange
> > jacket docs saying 0x1X for I/O APICs until after the chips taped out.
> >
> > Whatever.  In any case, there are boxes in the field that
> > contain those
> > version numbers.  We can recognize them using the OEM and
> > product strings in
> > the MPS and ACPI tables, so it's only an annoyance.
>
> OK. In my patch I am looking at local APIC version > 0x14, to check xAPIC
> support. This should work on all systems irrespective of IOAPIC version.
> And even if there are problems here for summit, we can workaround it, by
> simply forcing xAPIC support at already existing OEM string check.
>
>
> Thanks,
> -Venkatesh

Yes, such a scheme should work fine.  (Had something like that in my patch, 
but it was cut out to avoid any chance of breaking flat P4 boxen.)

Once you've determined that you have a system with xAPICs, how do you intend 
to distinguish between those delivering interrupts through the serial bus vs. 
the system bus?  (Correct me if I'm wrong, but your patch didn't define the 
new I/O APIC register that contains the serial/parallel status bit.)

How will you decide between a box that always must use clustered APIC mode, 
like the x440, vs. one which can be operated in flat mode, like the x360?  (I 
only include the x360 in my summit patch to avoid having all the interrupts 
hit CPU 0.  Otherwise, it is a flat box that delivers interrupts through the 
system bus.)  What about other flat P4 systems?

-- 
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot com


^ permalink raw reply

* Re: BBS - recommendations?
From: Michael Melanson @ 2002-12-19  3:59 UTC (permalink / raw)
  To: Linux Hams mailing list
In-Reply-To: <Pine.LNX.4.44.0212181907500.3678-100000@jeeves.mvw.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm sure there's real software out there for just this purpose, but you could 
always roll your own. In fact, I don't think it would be that hard to make a 
simple message system. If you treat the ax.25 device as a TTY, then you can 
bind agetty to the device, and make the BBS software be the shell when they 
login.

Cheers

- -- 
Michael Melanson VE3MTM
ve3mtm@rac.ca
73 33
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+AUQhxg/UNuqCTUsRAmVnAJ9rYTdJYLCdx8eYKuGOmmehsJatswCgi2RV
UCXPbyvDnmcYA7RANSlbM3w=
=rKzO
-----END PGP SIGNATURE-----


^ permalink raw reply

* RE: Anti-virus for Sendmail
From: Steve Evans @ 2002-12-19  3:19 UTC (permalink / raw)
  To: linux-admin

www.mailscanner.info

Steve Evans
SDSU Foundation
(619) 594-0653 

-----Original Message-----
From: Imran Ali Rashid [mailto:imran@afapp.net] 
Sent: Tuesday, December 10, 2002 8:35 PM
To: linux-admin@vger.kernel.org
Subject: Re: Anti-virus for Sendmail 



This isn't a recommendation, But I believe Sophos makes anti virus
software as well. They offer two options. You could either have sophos
be the man in the middle which scans emails and then forwards them to
the real email server, or you could use the command line scanner with
particular settings to scan mails after they are queued and before they
are sent out. Like I said, Its just one of the few out there, and I
didn't get enough of a chance to experiment with it to recommend it. By
the way, its a commercial product and not open source.

----- Original Message -----
From: "dashielljt" <dashielljt@gmpexpress.net>
To: "Scott Taylor" <scott@dctchambers.com>
Cc: <linux-admin@vger.kernel.org>
Sent: Wednesday, December 11, 2002 6:30 AM
Subject: Re: Anti-virus for Sendmail


> Does anyone know of an antivirus package for linux that doesn't need 
> any gui interface to run?  I'm using text only here since my screen 
> reader likes it that way.  If the screen reader doesn't work on this 
> system either speakup or emacspeak the computer isn't providing me any

> useful output.
>
> Jude <dashielljt(at)gmpexpress-dot-net>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin"

> in the body of a message to majordomo@vger.kernel.org More majordomo 
> info at  http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe linux-admin"
in the body of a message to majordomo@vger.kernel.org More majordomo
info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: [PATCH 2.5.52] Use __set_current_state() instead of current-> state = (take 1)
From: Robert Love @ 2002-12-19  3:19 UTC (permalink / raw)
  To: Perez-Gonzalez, Inaky; +Cc: torvalds, linux-kernel
In-Reply-To: <A46BBDB345A7D5118EC90002A5072C7806CACA30@orsmsx116.jf.intel.com>

On Wed, 2002-12-18 at 21:40, Perez-Gonzalez, Inaky wrote:

> Well, I think it makes kind of sense. If we know we are
> returning to some place where nothing bad could happen
> with reordering ... well, so be it, don't use __set_...()

Oh, I see.  If it returns to somewhere that immediately e.g. puts it on
a wait queue.  In that case, yep: need the barrier version.

> And that would now really work when CONFIG_X86_OOSTORE=1 is required
> [after all, it is a write, so it'd need the equivalent of a wmb() or
> xchg()].

Is this a hint that your employer may have an x86 chip in the future
with weak ordering? :)

> Okay, changing that one too, just in case.

Good - better safe than sorry.

	Robert Love


^ permalink raw reply

* Re: [linux-lvm] lvm2 + 2.4.20
From: Joe Thornber @ 2002-12-19  3:08 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <Pine.LNX.4.44.0212190026320.11789-100000@server.piarista-kkt.sulinet.hu>

On Thu, Dec 19, 2002 at 12:28:18AM +0100, NagyZ wrote:
> hi!
> 
> i wondering.. there will be an other dm patchet for this kernel as like 
> for 2.5 ?

There will be more patchsets for the 2.4 kernel at some point.
However there is nothing critical on the list of changes, don't be
afraid to use the current patchset.

> how much time does take to upgrade my lvm1 metadata to lvm2?
> i have 1T+ data..
> ( i dont have a couple of hours.. max. 15-30 minutes )

I'll leave Alasdair to answer this one ...

- Joe

^ permalink raw reply

* Re: [uml-devel] Re: uml-patch-2.5.52-1
From: Jeff Dike @ 2002-12-19  3:18 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: linux-kernel, user-mode-linux-devel
In-Reply-To: <20021218055339.GF1922@holomorphy.com>

wli@holomorphy.com said:
> I have a pending patch against your tree. Could you review this, and
> if it pass, include it in your tree? 

It doesn't require much review.  It's fine, of course.

				Jeff


^ permalink raw reply

* RE: [PATCH][2.4]  generic cluster APIC support for systems with more than 8 CPUs
From: Martin J. Bligh @ 2002-12-19  3:10 UTC (permalink / raw)
  To: Pallipadi, Venkatesh, Linux Kernel
  Cc: John Stultz, Nakajima, Jun, jamesclv, Mallick, Asit K,
	Saxena, Sunil
In-Reply-To: <C8C38546F90ABF408A5961FC01FDBF1912E192@fmsmsx405.fm.intel.com>

Apologies if I'm somewhat jumpy - bear in mind that I've burnt a lot of 
hours
and torn out hair recently breaking up all the Summit patches (which I sent
you, but aren't generally published in their entirety yet). I've also got a
hell of a lot of time invested in making this area of code work as it is 
now ;-)
(as have others). Going through another iteration isn't top on my list of
favourite things to do right now ... what you're trying to do does actually 
seem
sane in general, I'm just not sure I like the method - probably fairly easy 
to
fix.

As a general approach thing, it would be much smoother if you took the path
of trying to make it totally obvious that whatever you're trying to change
doesn't hurt anyone else. Part of that is small easily readable patches,
part of that is choosing your constructs carefully, explaining what you're
doing and why it's safe, and not turning changes on by default ;-)

> 					numaq		summit/			all other
> 							other >8 CPU system	systems
> -------------------------------------------------------------------------
> ----- clustered_apic_mode		CLUSTERED	CLUSTERED			NONE
> configured_platform_type	NUMAQ		NONE				NONE
> -------------------------------------------------------------------------

OK, so you still seem to have a tristate here. What does this gain us over
the existing scheme?

clustered_apic_mode == CLUSTERED_APIC_NUMAQ   (equiv CLUSTERED / NUMAQ)
clustered_apic_mode == CLUSTERED_APIC_XAPIC   (equiv CLUSTERED / NONE)
clustered_apic_mode == CLUSTERED_APIC_NONE    (equiv NONE / NONE)

Or are their other situations you haven't outlined above?

> ----- Note that in the patch, wherever I said NUMA, I actually meant
> NUMAQ. I think I lost that Q, while I was trying to reduce the length of
> this variable  (CONFIGURED_PLATFORM_NUMAQ) :). Sorry about all the
> resulting confusion. Doing a  search and replace of NUMA by NUMAQ on my
> patch right now.

Cool, that starts to make a little more sense to me now then ...

> Noticeable changes here are
> - summit using CLUSTERED in place of XAPIC(Physical destination).
> - use "configured_platform_type" it basically separate out numaq specific
> stuff   (like, waking up the CPUs through NMI), from the generic cluster
> apic support.

Right ... that's all my fault. I started off with clustered_apic_mode as
a simple boolean switch to represent the P3's clustered apic mode ... then
abused it for anything NUMA-Q specific. Stuff that's numaq specific should
be changed to something like "if (x86_numaq)" instead of "if 
(clustered_apic_mode == ...)".
If we only have one platform type, it's going to make much more readable 
code
to just use a boolean here. Somewhere in a header file (where 
clustered_apic_mode
is defined):

#ifdef CONFIG_X86_NUMAQ
#define x86_numaq (1)
#else
#define x86_numaq (0)
#endif

Just makes the resultant c-code easier to read, and shoves all the ifdefs 
in a
header file. I used to think that people complaining about ifdefs in code 
was
annoying, but having tried to read the results of ifdef hell ... I rapidly 
came
to the conclusion they're right ... the whole apic handling code area is 
enough to
make your head hurt even if it's as readable as possible ;-)

I can't deny that the current code has a few problems re style and 
cleanliness ...
I've been off doing 2.5 for ages, and that will be pretty clean after it's
broken into subarch.

> We are trying to use a common APIC destination mode for all systems with
> more than 8 CPUs. This is by having the logical clusters of the CPUs. I
> am hoping that this mode works fine on summit. Another option is to allow
> summit to continue using  physical mode, if there is any binding reason
> to do so. But anyway NUMAQ specific stuff has to be separated from
> cluster APIC stuff.

Look at the 2.5 summit stuff I sent you - I think 2.5 uses logical on 
Summit.
Historical split ... don't ask.

>> You seem to have lost turning on CONFIG_X86_NUMA.
>
> I dont see CONFIG_X86_NUMA getting used anywhere in 2.4.21-pre1. Am I
> missing something here??

I think it's used in some patches floating around ... as a general rule,
please don't delete stuff as cleanups at the same time as adding new 
features,
the resultant tangle is very hard to verify correct (I have the scars from
trying to untangle such things, and they're fresh and they hurt ;-))

>> Errrm ... on by default?
>
> I was just trying to be little ambitious :). Will remove that now..

Cool ;-)

>> And that was off before for NUMA-Q ... you seem to have turned it on.
>> Unless you've inverted the meaning of clustered_apic_mode, which is
>> going to confuse the hell out of everyone?
>
> NO. This check is happening inside calculate_ldr() routine, and NUMAQ
> never comes to calculate_ldr(), as (according to the comments), it is the
> BIOS that programs  LDR in NUMAQ. So only thing we have to worry about in
> calculate_ldr() is  non-NUMAQ systems.

I don't have a view in front of me, but the fact there's a
"if (clustered_apic_mode != CLUSTERED_APIC_NUMAQ)" in there right now
makes me suspect it's needed. It's *possible* it's unneeded, but I'm
suspicious.

> I am trying to get the stuff which are _only_ specific to NUMAQ, under
> "platform type" check. And the stuff specific to cluster APIC setup under
> "apic mode" check.

See above ... I'm not sure you need anything this invasive to do what you
want. However, I do have a better idea what you're trying to do now ;-)

> Can you please review the complete patch now. I am not sure whether my
> explaination  was clear enough. Let me know if have any questions.

I'll try to go through the updated one when you send it. Hint: smaller
patches with explanations of why they're safe are much easier to read.
Andrew Morton has managed to beat this lesson into me after a while ;-)

M.


^ permalink raw reply

* watchdog driver for W83627HF chip
From: zhz @ 2002-12-19  2:54 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

hi, man,
 
    I have written the watchdog driver for the Winbond W83627HF 
chip.  The attachment is the driver source code. Any suggestion is
welcome.
    Thanks a lot.
                            
Regards, 
Zhou HongZhen

[-- Attachment #2: w83627hf_wdt.c --]
[-- Type: application/octet-stream, Size: 15443 bytes --]


/*
 * 	W83627HF watchdog driver for Linux 2.2.x
 *
 * 	(c) Copyright 2002	Zhou HongZhen.
 *
 *	This program is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU General Public License
 *	as published by the Free Software Foundation; either version
 *	2 of the License, or (at your option) any later version.
 *
 *	(c) Copyright 2002	Zhou HongZhen <inetbash@yahoo.com>
 *	                                      <netdiff@netease.com>
 *
 *	Release 1.0.
 *
 *	Fixes
 *
 * */

#include <linux/module.h>
#include <linux/config.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <asm/param.h>
#include <asm/io.h>
#include <linux/ioport.h>
#include <asm/system.h>
#include <asm/semaphore.h>
#include <linux/sysctl.h>
#include <asm/uaccess.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/watchdog.h>

#if 0
#define W83627HF_WDT_DEBUG
#endif

#if 0
#undef CONFIG_WATCHDOG_NOWAYOUT
#else
#define CONFIG_WATCHDOG_NOWAYOUT
#endif

#ifdef W83627HF_WDT_DEBUG
#define assert_w83627hf_wdt(p) if (1) {\
	if (!(p)) \
		panic("assert failed in %s line %d\n", __FILE__, __LINE__);\
} else

#else
#define assert_w83627hf_wdt(p)
#endif

#define W83627HF_LPCIP 0x295 /* LPC Index Port */
#define W83627HF_LPCDP 0x296 /* LPC Data Port */

#define W83627HF_EFER 0x2E /* Extended Function Enable Register */
#define W83627HF_EFIR 0x2E /* Extended Function Index Register*/
#define W83627HF_EFDR 0x2F /* Extended Function Data Register */

#define W83627HF_ENTER_EFM 0x87 /* enter externed function mode */
#define W83627HF_EXIT_EFM 0xAA /* exit externed function mode */

/* default watchdog timeout value -- 12s */
#define W83627HF_WDT_DEF_TIMO 0x0C 
#define W83627HF_WDT_MAX_TIMO 0xFF
#define W83627HF_WDT_MIN_TIMO 0x01
/* #define W83627HF_WDT_MIN_TIMO 0x05 */

/* default watchdog timeout unit -- second */
#define W83627HF_WDT_DEF_TIMU 0x00

/* only one can open the watchdog device */
static unsigned long wdt_is_open = 0;
#ifndef CONFIG_WATCHDOG_NOWAYOUT
static unsigned long wdt_expect_close = 0;
#endif

/* 0x01--0xFF seconds(minutes). 0x00 to disable watchdog. */
static unsigned int w83627hf_margin = W83627HF_WDT_DEF_TIMO;
static unsigned int w83627hf_timeunit = W83627HF_WDT_DEF_TIMU;

#define W83627HF_WDT_MAGIC_NUM 13
#define W83627HF_WDT_MAGIC_U 3
#define W83627HF_WDT_MAGIC_M 1
/* magic word which change margin and timeunit */
static char w83627hf_wdt_magic[W83627HF_WDT_MAGIC_NUM] = "?M?UFH72638W";

#define w83627hf_wdt_feed() if (1) {\
	w83627hf_timeunit = w83627hf_timeunit ? \
		0x08 : 0x00;\
\
	if (W83627HF_WDT_MAX_TIMO < w83627hf_margin) \
		w83627hf_margin = W83627HF_WDT_MAX_TIMO;\
\
	if (0!=w83627hf_margin &&\
		W83627HF_WDT_MIN_TIMO>w83627hf_margin) \
		w83627hf_margin = W83627HF_WDT_MIN_TIMO; \
\
	outb(W83627HF_ENTER_EFM, W83627HF_EFER); \
	outb(W83627HF_ENTER_EFM, W83627HF_EFER); \
\
	outb(0x07, W83627HF_EFIR);\
	outb(0x08, W83627HF_EFDR);\
\
	outb(0xF5, W83627HF_EFIR);\
	outb((unsigned char)w83627hf_timeunit, W83627HF_EFDR);\
\
	outb(0xF6, W83627HF_EFIR);\
	outb((unsigned char)w83627hf_margin, W83627HF_EFDR);\
\
	outb(W83627HF_EXIT_EFM, W83627HF_EFER); \
} else

#define w83627hf_wdt_stop() if (1) {\
	outb(W83627HF_ENTER_EFM, W83627HF_EFER); \
	outb(W83627HF_ENTER_EFM, W83627HF_EFER); \
\
	outb(0x07, W83627HF_EFIR);\
	outb(0x08, W83627HF_EFDR);\
\
	/* 0x00 to disable watchdog */\
	outb(0xF6, W83627HF_EFIR);\
	outb(0x00, W83627HF_EFDR);\
\
	outb(W83627HF_EXIT_EFM, W83627HF_EFER); \
} else


#ifdef W83627HF_WDT_DEBUG
/* watchdog sysctl configuration(just for debug) */

enum {
	SYSCTL_W83627HF_WDT_MARGIN=1,
	SYSCTL_W83627HF_WDT_TIMEUNIT,
	SYSCTL_W83627HF_WDT_FEED
};

enum {
	SYSCTL_W83627HF_WDT=21
};

static int sysctl_w83627hf_wdt_noused = 0;

static int w83627hf_wdt_sysctl_feed(struct ctl_table *table, int write,
	struct file *filp, void *buffer, size_t *lenp);

static struct ctl_table sysctl_w83627hf_wdt_dir[] = {
	{SYSCTL_W83627HF_WDT_MARGIN, "margin",
		&w83627hf_margin, sizeof(int),
		0644, 0, &proc_dointvec},
	{SYSCTL_W83627HF_WDT_TIMEUNIT, "timeunit",
		&w83627hf_timeunit, sizeof(int),
		0644, 0, &proc_dointvec},
	{SYSCTL_W83627HF_WDT_FEED, "feed",
		&sysctl_w83627hf_wdt_noused, sizeof(int),
		0200, 0, &w83627hf_wdt_sysctl_feed},
	{0}
};

static struct ctl_table sysctl_w83627hf_wdt_root[] = {
	{SYSCTL_W83627HF_WDT, "w83627hf_wdt",
		0, 0, 0555, sysctl_w83627hf_wdt_dir},
	{0}
};

static struct ctl_table_header *sysctl_w83627hf_wdt_header = 0;

/*
 * When you write something into /proc/sys/w83627hf_wdt/feed, the dog begin
 * watch the system for you.
 * Remember to feed it again before the dog burks.
 * Set /proc/sys/w83627hf_wdt/margin to 0, and update 
 * /proc/sys/w83627hf_wdt/feed will stop the dog.
 * */
int w83627hf_wdt_sysctl_feed(struct ctl_table *table, int write,
	struct file *filp, void *buffer, size_t *lenp)
{
	if (!write)
		return -EPERM;

	w83627hf_wdt_feed();

	return 0;
}

int w83627hf_wdt_sysctl_create(void)
{
	sysctl_w83627hf_wdt_header =
		register_sysctl_table(sysctl_w83627hf_wdt_root, 0);
	if (0 == sysctl_w83627hf_wdt_header) {
		printk("W83627HF WDT: register_sysctl_table() failed\n");
		return -1;
	}

	return 0;
}

void w83627hf_wdt_sysctl_clean(void)
{
	unregister_sysctl_table(sysctl_w83627hf_wdt_header);
	sysctl_w83627hf_wdt_header = 0;
}
#endif

/*
 * Read the margin and timeunit from watchdog device, just for debug.
 * */
static ssize_t w83627hf_wdt_read(struct file *file, char *buf,
	size_t len, loff_t *ppos)
{
	unsigned char t[2];

	assert_w83627hf_wdt(wdt_is_open);

	if (ppos != &file->f_pos) {
#ifdef W83627HF_WDT_DEBUG
		printk("W83627HF WDT: device can NOT be seek\n");
#endif
		return -ESPIPE;
	}

	if (2 > len) {
#ifdef W83627HF_WDT_DEBUG
		printk("W83627HF WDT: read invalid data length %d\n", len);
#endif
		return -EINVAL;
	}

	outb(W83627HF_ENTER_EFM, W83627HF_EFER);
	outb(W83627HF_ENTER_EFM, W83627HF_EFER);

	outb(0x07, W83627HF_EFIR);
	outb(0x08, W83627HF_EFDR);

	outb(0xF5, W83627HF_EFIR);
	t[0] = (0x08 & inb(W83627HF_EFDR)) ? 0x01 : 0x00;

	outb(0xF6, W83627HF_EFIR);
	t[1] = inb(W83627HF_EFDR);

	outb(W83627HF_EXIT_EFM, W83627HF_EFER);

	if (copy_to_user(buf, t, 2)) {
#ifdef W83627HF_WDT_DEBUG
		printk("W83627HF WDT: copy_to_user failed\n");
#endif
		return -EFAULT;
	}

	return 2;
}

static ssize_t w83627hf_wdt_write(struct file *file, const char *data,
	size_t len, loff_t *ppos)
{
	size_t i;
	int j = 0, seek = 0;
	unsigned int timeunit = 0;

	assert_w83627hf_wdt(wdt_is_open);

	if (ppos != &file->f_pos) {
#ifdef W83627HF_WDT_DEBUG
		printk("W83627HF WDT: device can NOT be seek\n");
#endif
		return -ESPIPE;
	}

	if (0 == len)
		goto ping;

	for (i=0; i<len; i++){
		switch (data[i]) {
		case 'W':
			j = W83627HF_WDT_MAGIC_NUM - 2;
			seek = 1;
			break;
#ifndef CONFIG_WATCHDOG_NOWAYOUT
		case 'V':
			wdt_expect_close = 1;
			printk(KERN_DEBUG "expect_close changed\n");
			j = 0;
			seek = 0;
			break;
#endif
		default:
			if (0 == seek) {
				assert_w83627hf_wdt(0 == j);
				break;
			}
			assert_w83627hf_wdt(1 == seek);
			assert_w83627hf_wdt(0 <= j - 1);

			if (W83627HF_WDT_MAGIC_U == j) {
				assert_w83627hf_wdt('?' ==
					w83627hf_wdt_magic[j - 1]);
				if (1 == data[i]) 
					timeunit = 1;
				else
					timeunit = 0;
				j--;
			} else if (W83627HF_WDT_MAGIC_M == j) {
				assert_w83627hf_wdt('?' ==
					w83627hf_wdt_magic[j - 1]);
				if (0<=data[i] &&
					W83627HF_WDT_DEF_TIMO>=data[i]) {
					w83627hf_margin = data[i];
					w83627hf_timeunit = timeunit;
					printk(KERN_DEBUG "margin chanded! "
						"margin == %d, unit == %d\n", 
						w83627hf_margin, 
						w83627hf_timeunit);
				}
				j = 0;
				seek = 0;
			} else if (data[i] == w83627hf_wdt_magic[j - 1]) {
				j--;
			} else {
				j = 0;
				seek = 0;
			}

			break;
		}
	}

ping:
	if (wdt_is_open) {
		w83627hf_wdt_feed();
	}

	return len;
}

static int w83627hf_wdt_ioctl(struct inode *inode, struct file *file,
	unsigned int cmd, unsigned long arg)
{
	int ret = 0;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
	int time;
#endif
	struct watchdog_info ident = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
		WDIOF_SETTIMEOUT |
#endif
		0,
		1,
		"W83627HF"
	};

	assert_w83627hf_wdt(wdt_is_open);

	if (WATCHDOG_MINOR != MINOR(inode->i_rdev))
		return -ENODEV;

	switch (cmd) {
	case WDIOC_GETSUPPORT:
		if (copy_to_user((struct watchdog_info *)arg, &ident,
			sizeof(ident)))
			ret = -EFAULT;
		break;
	case WDIOC_KEEPALIVE:
		if (wdt_is_open) {
			w83627hf_wdt_feed();
		}
		break;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
	case WDIOC_SETTIMEOUT:
		if (copy_from_user(&time, (int *)arg, sizeof(int))) {
			ret = -EFAULT;
			break;
		}

		printk(KERN_DEBUG "W83627HF WDT: w83627hf_margin %d.\n",
			w83627hf_margin);

		if (W83627HF_WDT_MAX_TIMO < time) {
			printk("W83627HF WDT: w83637hf_margin > 0xFF\n");
			time = W83627HF_WDT_MAX_TIMO;
		}

		if (0!=time && W83627HF_WDT_MIN_TIMO>time) {
			printk("W83627HF WDT: w83627hf_margin < 0x01\n");
			time = W83627HF_WDT_MIN_TIMO;
		}

		w83627hf_margin = time;
		/* Fall */
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,18)
	case WDIOC_GETTIMEOUT:
		if (copy_to_user((int *)arg, &w83627hf_margin,
			sizeof(int)))
			ret = -EFAULT;
#endif
		break;
#endif
	default:
		ret = -ENOTTY;
		break;
	}

	return ret;
}

/*
 * Once the user application open the device file, watchdog start work.
 * You MUST feed the dog before it burks.
 * */
static int w83627hf_wdt_open(struct inode *inode, struct file *file)
{
	if (WATCHDOG_MINOR != MINOR(inode->i_rdev))
		return -ENODEV;

	/* only one can open this device */
	if (wdt_is_open)
		return -EBUSY;
	wdt_is_open = 1;

	MOD_INC_USE_COUNT;

#ifndef CONFIG_WATCHDOG_NOWAYOUT
	wdt_expect_close = 0;
#endif

	if (W83627HF_WDT_MAX_TIMO < w83627hf_margin) {
		printk("W83627HF WDT: w83627hf_margin > 0xFF\n");
		w83627hf_margin = W83627HF_WDT_MAX_TIMO;
	}

	if (0!=w83627hf_margin &&
		W83627HF_WDT_MIN_TIMO>w83627hf_margin) {
		printk("W83627HF WDT: w83627hf_margin < 0x01\n");
		w83627hf_margin = W83627HF_WDT_MIN_TIMO;
	}

	/* enter the extended function mode */
	outb(W83627HF_ENTER_EFM, W83627HF_EFER);
	outb(W83627HF_ENTER_EFM, W83627HF_EFER);

	/*
	 * watchdog timer is controlled by CRF5, CRF6, CRF7 of logical
	 * device 8.
	 * */
	outb(0x2B, W83627HF_EFIR);
	outb(0xC0, W83627HF_EFDR);

	/* write CR07 to select logical device A */
	outb(0x07, W83627HF_EFIR);
	outb(0x0A, W83627HF_EFDR);

	/* disable watchdog IRQ */
	outb(0xF7, W83627HF_EFIR);
	outb(0x00, W83627HF_EFDR);

	/* write CR07 to select logical device 8 */
	outb(0x07, W83627HF_EFIR);
	outb(0x08, W83627HF_EFDR);

	/* count time base second(NOT minute). */
	outb(0xF5, W83627HF_EFIR);
	outb((unsigned char)W83627HF_WDT_DEF_TIMU, W83627HF_EFDR);

	/* write the timeout vlaue into CRF6 */
	outb(0xF6, W83627HF_EFIR);
	outb((unsigned char)w83627hf_margin, W83627HF_EFDR);

	/* watchdog will NOT be reset upon a mouse/keyboard interrupt. */
	outb(0xF7, W83627HF_EFIR);
	outb(0x00, W83627HF_EFDR);

	/* exit extended function mode */
	outb(W83627HF_EXIT_EFM, W83627HF_EFER);

	printk(KERN_INFO "W83627HF WDT: wake up, current timeout %d.\n",
		w83627hf_margin);

	return 0;
}

static int w83627hf_wdt_release(struct inode *inode, struct file *file)
{
	assert_w83627hf_wdt(wdt_is_open);

	if (WATCHDOG_MINOR != MINOR(inode->i_rdev))
		return -ENODEV;

#ifndef CONFIG_WATCHDOG_NOWAYOUT
	if (wdt_expect_close) {
		if(wdt_is_open) {
			w83627hf_wdt_stop();
		}
	}

	wdt_expect_close = 0;
#endif

	wdt_is_open = 0;

	MOD_DEC_USE_COUNT;

	printk(KERN_INFO "W83627HF WDT: sleeping again.\n");

	return 0;
}

/*
 * probe the W83627HF chip.
 * */
static int w83627hf_probe(void)
{
	unsigned char device;
	unsigned char chip;
	int ret = -1;

	if (0 > check_region(W83627HF_LPCIP, 2)) {
		ret = -EBUSY;
		goto out;
	}

	outb(0x49, W83627HF_LPCIP);
	device = inb(W83627HF_LPCDP);
	if (0x01 != (device >> 1)) {
		/*printk("W83627HF WDT: Device ID %x != 0x01\n", device >> 1);*/
		goto out;
	}

	outb(0x58, W83627HF_LPCIP);
	chip = inb(W83627HF_LPCDP);
	if (0x21 != chip) {
		/*printk("W83627HF WDT: Chip ID %x != 0x21\n", chip);*/
		goto out;
	}

	/*printk(KERN_INFO "W83627HF WDT: W83627HF chip found\n");*/
	ret = 0;

out:
	return ret;
}

static int w83627hf_wdt_notify(struct notifier_block *this, unsigned long code,
	void *unused)
{
	if (SYS_DOWN==code || SYS_HALT==code) {
		if (wdt_is_open) {
			w83627hf_wdt_stop();
#ifndef CONFIG_WATCHDOG_NOWAYOUT
			wdt_expect_close = 0;
#endif
			wdt_is_open = 0;
		}
	}

	return NOTIFY_DONE;
}

static struct notifier_block w83627hf_wdt_notifier=
{
	w83627hf_wdt_notify,
	0,
	0
};

static struct file_operations w83627hf_wdt_fops = {
	llseek:		0,
	read:		w83627hf_wdt_read,
	write:		w83627hf_wdt_write,
	readdir:	0,
	poll:		0,
	ioctl:		w83627hf_wdt_ioctl,
	mmap:		0,
	open:		w83627hf_wdt_open,
	flush:		0,
	release:	w83627hf_wdt_release,
};

static struct miscdevice w83627hf_wdt_miscdev = {
	WATCHDOG_MINOR,
	"watchdog",
	&w83627hf_wdt_fops
};

int init_module(void)
{
	int ret;

	if ((ret = w83627hf_probe()))
		goto out;

	ret = -1;
	request_region(W83627HF_LPCIP, 2, "W83627HF_WDT");

	if (misc_register(&w83627hf_wdt_miscdev)) {
		printk("W83627HF WDT: misc_register() failed\n");
		goto clean_region;
	}

	if (register_reboot_notifier(&w83627hf_wdt_notifier)) {
		printk("W83627HF WDT: register_reboot_notifier() failed\n");
		goto clean_miscdev;
	}

#ifdef W83627HF_WDT_DEBUG
	if (w83627hf_wdt_sysctl_create())
		goto clean_notifier;
#endif

	if (W83627HF_WDT_MAX_TIMO < w83627hf_margin) {
		printk("W83627HF WDT: w83627hf_margin > 0xFF\n");
		w83627hf_margin = W83627HF_WDT_MAX_TIMO;
	}

	if (W83627HF_WDT_MIN_TIMO > w83627hf_margin) {
		printk("W83627HF WDT: w83627hf_margin < 0x01\n");
		w83627hf_margin = W83627HF_WDT_MIN_TIMO;
	}

	printk(KERN_INFO "W83627HF WDT: sleeping.\n");

	ret = 0;
	goto out;

#ifdef W83627HF_WDT_DEBUG
clean_notifier:
	unregister_reboot_notifier(&w83627hf_wdt_notifier);
#endif
clean_miscdev:
	misc_deregister(&w83627hf_wdt_miscdev);
clean_region:
	release_region(W83627HF_LPCIP, 2);
out:
	return ret;
}

void cleanup_module(void)
{
#ifdef W83627HF_WDT_DEBUG
	w83627hf_wdt_sysctl_clean();
#endif
	unregister_reboot_notifier(&w83627hf_wdt_notifier);
	misc_deregister(&w83627hf_wdt_miscdev);
	release_region(W83627HF_LPCIP, 2);
}

MODULE_PARM(w83627hf_margin, "i");
MODULE_PARM_DESC(w83627hf_magin, "WDT timeout (default 12 <0x01-0xFF>)");
MODULE_AUTHOR("Zhou HongZhen -- <inetbash@yahoo.com>|<netdiff@netease.com>");
MODULE_DESCRIPTION("Watchdog driver for Winbond W83627HF chip");
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
MODULE_LICENSE("GPL");
#endif

EXPORT_NO_SYMBOLS;


^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.